]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-sharedlibs.m4
Remove svn:keywords since they cause svn_load_dirs.pl to complain about every file.
[thirdparty/cups.git] / config-scripts / cups-sharedlibs.m4
index 2e52b24363b584fa64aad9f9e994e28f50617d74..a39d1d300a2681ff89850b8a0ee8de3a0a5fc56e 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-sharedlibs.m4 5112 2006-02-16 04:41:59Z mike $"
+dnl "$Id: cups-sharedlibs.m4 181 2006-06-22 20:01:18Z jlovell $"
 dnl
 dnl   Shared library support for the Common UNIX Printing System (CUPS).
 dnl
@@ -33,31 +33,31 @@ if test x$enable_shared != xno; then
                        LIBCUPS="libcups.so.2"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        DSO="\$(CC)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-h,\$@ -G \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -Wl,-h,\`basename \$@\` -G \$(OPTIM)"
                        ;;
                HP-UX*)
                        LIBCUPS="libcups.sl.2"
                        LIBCUPSIMAGE="libcupsimage.sl.2"
                        DSO="\$(LD)"
-                       DSOFLAGS="$DSOFLAGS -b -z +h \$@"
+                       DSOFLAGS="$DSOFLAGS -b -z +h \`basename \$@\`"
                        ;;
                IRIX)
                        LIBCUPS="libcups.so.2"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        DSO="\$(CC)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-rpath,\$(libdir),-set_version,sgi2.6,-soname,\$@ -shared \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -set_version,sgi2.6,-soname,\`basename \$@\` -shared \$(OPTIM)"
                        ;;
                OSF1* | Linux | GNU | *BSD*)
                        LIBCUPS="libcups.so.2"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        DSO="\$(CC)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
                        ;;
                Darwin*)
                        LIBCUPS="libcups.2.dylib"
                        LIBCUPSIMAGE="libcupsimage.2.dylib"
                        DSO="\$(CC)"
-                       DSOFLAGS="$DSOFLAGS \$(RC_CFLAGS) -dynamiclib -single_module -lc"
+                       DSOFLAGS="$DSOFLAGS -dynamiclib -single_module -lc"
                        ;;
                AIX*)
                        LIBCUPS="libcups_s.a"
@@ -71,7 +71,7 @@ if test x$enable_shared != xno; then
                        LIBCUPS="libcups.so.2"
                        LIBCUPSIMAGE="libcupsimage.so.2"
                        DSO="\$(CC)"
-                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\$@ -shared \$(OPTIM)"
+                       DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
                        ;;
        esac
 else
@@ -81,8 +81,15 @@ else
        DSO=":"
 fi
 
+# 32-bit and 64-bit libraries need variations of the standard
+# DSOFLAGS...
+DSO32FLAGS="$DSOFLAGS"
+DSO64FLAGS="$DSOFLAGS"
+
 AC_SUBST(DSO)
 AC_SUBST(DSOFLAGS)
+AC_SUBST(DSO32FLAGS)
+AC_SUBST(DSO64FLAGS)
 AC_SUBST(LIBCUPS)
 AC_SUBST(LIBCUPSIMAGE)
 
@@ -110,41 +117,55 @@ if test "$DSO" != ":"; then
        # 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="\$(LIBPNG) \$(LIBTIFF) \$(LIBJPEG) \$(LIBZ)"
+       DSOLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"
        IMGLIBS=""
 
-       # The *BSD, HP-UX, and Solaris run-time linkers need help when
-       # deciding where to find a DSO.  Add linker options to tell them
-       # where to find the DSO (usually in /usr/lib...  duh!)
+       # 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
                 HP-UX*)
-                       # HP-UX
+                       # HP-UX needs the path, even for /usr/lib...
                        DSOFLAGS="+s +b $libdir $DSOFLAGS"
+                       DSO32FLAGS="+s +b $LIB32DIR $DSO32FLAGS"
+                       DSO64FLAGS="+s +b $LIB64DIR $DSO64FLAGS"
                        LDFLAGS="$LDFLAGS -Wl,+s,+b,$libdir"
                        EXPORT_LDFLAGS="-Wl,+s,+b,$libdir"
-                       ;;
+                       ;;
                 SunOS*)
-                       # Solaris
-                       DSOFLAGS="-R$libdir $DSOFLAGS"
-                       LDFLAGS="$LDFLAGS -R$libdir"
-                       EXPORT_LDFLAGS="-R$libdir"
-                       ;;
+                       # Solaris...
+                       if test $exec_prefix != /usr; then
+                               DSOFLAGS="-R$libdir $DSOFLAGS"
+                               DSO32FLAGS="-R$LIB32DIR $DSO32FLAGS"
+                               DSO64FLAGS="-R$LIB64DIR $DSO64FLAGS"
+                               LDFLAGS="$LDFLAGS -R$libdir"
+                               EXPORT_LDFLAGS="-R$libdir"
+                       fi
+                       ;;
                 *BSD*)
-                        # *BSD
-                       DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
-                        LDFLAGS="$LDFLAGS -Wl,-R$libdir"
-                        EXPORT_LDFLAGS="-Wl,-R$libdir"
-                        ;;
-                Linux | GNU)
-                        # Linux and HURD
-                       DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
-                        LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
-                        EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
-                        ;;
+                        # *BSD...
+                       if test $exec_prefix != /usr; then
+                               DSOFLAGS="-Wl,-R$libdir $DSOFLAGS"
+                               DSO32FLAGS="-Wl,-R$LIB32DIR $DSO32FLAGS"
+                               DSO64FLAGS="-Wl,-R$LIB64DIR $DSO64FLAGS"
+                               LDFLAGS="$LDFLAGS -Wl,-R$libdir"
+                               EXPORT_LDFLAGS="-Wl,-R$libdir"
+                       fi
+                       ;;
+                IRIX | Linux | GNU)
+                        # IRIX, Linux, and HURD...
+                       if test $exec_prefix != /usr; then
+                               DSOFLAGS="-Wl,-rpath,$libdir $DSOFLAGS"
+                               DSO32FLAGS="-Wl,-rpath,$LIB32DIR $DSO32FLAGS"
+                               DSO64FLAGS="-Wl,-rpath,$LIB64DIR $DSO64FLAGS"
+                               LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir"
+                               EXPORT_LDFLAGS="-Wl,-rpath,$libdir"
+                       fi
+                       ;;
        esac
 else
        DSOLIBS=""
-       IMGLIBS="\$(LIBPNG) \$(LIBTIFF) \$(LIBJPEG) \$(LIBZ)"
+       IMGLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"
 fi
 
 AC_SUBST(DSOLIBS)
@@ -152,5 +173,5 @@ AC_SUBST(IMGLIBS)
 AC_SUBST(EXPORT_LDFLAGS)
 
 dnl
-dnl End of "$Id: cups-sharedlibs.m4 5112 2006-02-16 04:41:59Z mike $".
+dnl End of "$Id: cups-sharedlibs.m4 181 2006-06-22 20:01:18Z jlovell $".
 dnl