]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-sharedlibs.m4
Don't generate certificates that expire on Feb 29th (Issue #5643)
[thirdparty/cups.git] / config-scripts / cups-sharedlibs.m4
index 33bb30f53d9528081bb3082e2d5f441d83a1232e..6070f211e3188711e614d3d37dd4fb2f261c4153 100644 (file)
@@ -1,14 +1,11 @@
 dnl
 dnl Shared library support for CUPS.
 dnl
-dnl Copyright 2007-2013 by Apple Inc.
-dnl Copyright 1997-2005 by Easy Software Products, all rights reserved.
+dnl Copyright © 2007-2018 by Apple Inc.
+dnl Copyright © 1997-2005 by Easy Software Products, all rights reserved.
 dnl
-dnl These coded instructions, statements, and computer programs are the
-dnl property of Apple Inc. and are protected by Federal copyright
-dnl law.  Distribution and use rights are outlined in the file "LICENSE.txt"
-dnl which should have been included with this file.  If this file is
-dnl file is missing or damaged, see the license at "http://www.cups.org/".
+dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more
+dnl information.
 dnl
 
 PICFLAG=1
@@ -18,60 +15,56 @@ AC_ARG_ENABLE(shared, [  --disable-shared        do not create shared libraries]
 
 cupsbase="cups"
 LIBCUPSBASE="lib$cupsbase"
+LIBCUPSIMAGE=""
 LIBCUPSSTATIC="lib$cupsbase.a"
 
 if test x$enable_shared != xno; then
-       case "$uname" in
-               SunOS*)
+       case "$host_os_name" in
+               sunos*)
                        LIBCUPS="lib$cupsbase.so.2"
-                       LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSIMAGE="libcupsimage.so.2"
-                       LIBCUPSMIME="libcupsmime.so.1"
-                       LIBCUPSPPDC="libcupsppdc.so.1"
+                       if test "x$cupsimagebase" != x; then
+                               LIBCUPSIMAGE="lib$cupsimagebase.so.2"
+                       fi
                        DSO="\$(CC)"
                        DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G"
                        ;;
-               Linux | GNU | *BSD*)
+               linux* | gnu* | *bsd*)
                        LIBCUPS="lib$cupsbase.so.2"
-                       LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSIMAGE="libcupsimage.so.2"
-                       LIBCUPSMIME="libcupsmime.so.1"
-                       LIBCUPSPPDC="libcupsppdc.so.1"
+                       if test "x$cupsimagebase" != x; then
+                               LIBCUPSIMAGE="lib$cupsimagebase.so.2"
+                       fi
                        DSO="\$(CC)"
                        DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared"
                        ;;
-               Darwin*)
+               darwin*)
                        LIBCUPS="lib$cupsbase.2.dylib"
-                       LIBCUPSCGI="libcupscgi.1.dylib"
-                       LIBCUPSIMAGE="libcupsimage.2.dylib"
-                       LIBCUPSMIME="libcupsmime.1.dylib"
-                       LIBCUPSPPDC="libcupsppdc.1.dylib"
+                       if test "x$cupsimagebase" != x; then
+                               LIBCUPSIMAGE="lib$cupsimagebase.2.dylib"
+                       fi
                        DSO="\$(CC)"
                        DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -dynamiclib -single_module -lc"
+                       DSOFLAGS="$DSOFLAGS -Wl,-no_warn_inits -dynamiclib -single_module -lc"
                        ;;
                *)
                        echo "Warning: shared libraries may not be supported.  Trying -shared"
                        echo "         option with compiler."
                        LIBCUPS="lib$cupsbase.so.2"
-                       LIBCUPSCGI="libcupscgi.so.1"
-                       LIBCUPSIMAGE="libcupsimage.so.2"
-                       LIBCUPSMIME="libcupsmime.so.1"
-                       LIBCUPSPPDC="libcupsppdc.so.1"
+                       if test "x$cupsimagebase" != x; then
+                               LIBCUPSIMAGE="lib$cupsimagebase.so.2"
+                       fi
                        DSO="\$(CC)"
                        DSOXX="\$(CXX)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared"
                        ;;
        esac
 else
        PICFLAG=0
        LIBCUPS="lib$cupsbase.a"
-       LIBCUPSCGI="libcupscgi.a"
-       LIBCUPSIMAGE="libcupsimage.a"
-       LIBCUPSMIME="libcupsmime.a"
-       LIBCUPSPPDC="libcupsppdc.a"
+       if test "x$cupsimagebase" != x; then
+               LIBCUPSIMAGE="lib$cupsimagebase.a"
+       fi
        DSO=":"
        DSOXX=":"
 fi
@@ -81,47 +74,29 @@ AC_SUBST(DSOXX)
 AC_SUBST(DSOFLAGS)
 AC_SUBST(LIBCUPS)
 AC_SUBST(LIBCUPSBASE)
-AC_SUBST(LIBCUPSCGI)
 AC_SUBST(LIBCUPSIMAGE)
-AC_SUBST(LIBCUPSMIME)
-AC_SUBST(LIBCUPSPPDC)
 AC_SUBST(LIBCUPSSTATIC)
 
 if test x$enable_shared = xno; then
-       LINKCUPS="../cups/lib$cupsbase.a"
-       LINKCUPSIMAGE="../filter/libcupsimage.a"
-
-       EXTLINKCUPS="-lcups"
-       EXTLINKCUPSIMAGE="-lcupsimage"
+       LINKCUPS="../cups/lib$cupsbase.a \$(LIBS)"
+       EXTLINKCUPS="-lcups \$LIBS"
 else
-       LINKCUPS="-l${cupsbase}"
-       LINKCUPSIMAGE="-lcupsimage"
-
+       LINKCUPS="-L../cups -l${cupsbase}"
        EXTLINKCUPS="-lcups"
-       EXTLINKCUPSIMAGE="-lcupsimage"
 fi
 
 AC_SUBST(EXTLINKCUPS)
-AC_SUBST(EXTLINKCUPSIMAGE)
 AC_SUBST(LINKCUPS)
-AC_SUBST(LINKCUPSIMAGE)
 
 dnl Update libraries for DSOs...
 EXPORT_LDFLAGS=""
 
 if test "$DSO" != ":"; then
-       # When using DSOs the image libraries are linked to libcupsimage.so
-       # rather than to the executables.  This makes things smaller if you
-       # are using any static libraries, and it also allows us to distribute
-       # a single DSO rather than a bunch...
-       DSOLIBS="\$(LIBZ)"
-       IMGLIBS=""
-
        # Tell the run-time linkers where to find a DSO.  Some platforms
        # need this option, even when the library is installed in a
        # standard location...
-       case $uname in
-                SunOS*)
+       case $host_os_name in
+                sunos*)
                        # Solaris...
                        if test $exec_prefix != /usr; then
                                DSOFLAGS="-R$libdir $DSOFLAGS"
@@ -129,7 +104,7 @@ if test "$DSO" != ":"; then
                                EXPORT_LDFLAGS="-R$libdir"
                        fi
                        ;;
-                *BSD*)
+                *bsd*)
                         # *BSD...
                        if test $exec_prefix != /usr; then
                                DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
@@ -137,7 +112,7 @@ if test "$DSO" != ":"; then
                                EXPORT_LDFLAGS="-Wl,-R$libdir"
                        fi
                        ;;
-                Linux | GNU)
+                linux* | gnu*)
                         # Linux, and HURD...
                        if test $exec_prefix != /usr; then
                                DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
@@ -146,11 +121,6 @@ if test "$DSO" != ":"; then
                        fi
                        ;;
        esac
-else
-       DSOLIBS=""
-       IMGLIBS="\$(LIBZ)"
 fi
 
-AC_SUBST(DSOLIBS)
-AC_SUBST(IMGLIBS)
 AC_SUBST(EXPORT_LDFLAGS)