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
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"
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
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)
# 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)
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