$NetBSD: patch-ad,v 1.15 2010/05/21 10:05:20 sbd Exp $ libtoolize. --- config-scripts/cups-sharedlibs.m4.orig 2009-02-10 17:05:35.000000000 +0000 +++ config-scripts/cups-sharedlibs.m4 @@ -18,6 +18,24 @@ DSOFLAGS="${DSOFLAGS:=}" AC_ARG_ENABLE(shared, [ --disable-shared do not create shared libraries]) +AC_ARG_ENABLE(libtool, [ --enable-libtool[=LIBTOOL_PATH] + turn on building with libtool (UNSUPPORTED!), default=no]) + +if test x$enable_libtool != xno; then + echo "WARNING: libtool is not supported or endorsed by Easy Software Products." + echo " WE DO NOT PROVIDE TECHNICAL SUPPORT FOR LIBTOOL PROBLEMS." + echo " (even if you have a support contract)" + enable_shared=no + if test x$enable_libtool = xyes; then + LIBTOOL=libtool + else + LIBTOOL=$enable_libtool + fi +else + LIBTOOL= +fi +AC_SUBST(LIBTOOL) + if test x$enable_shared != xno; then case "$uname" in SunOS*) @@ -126,6 +144,15 @@ if test x$enable_shared != xno; then DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)" ;; esac +elif test x$enable_libtool != xno; then + LIBCUPS="libcups.la" + LIBCUPSCGI="libcupscgi.la" + LIBCUPSDRIVER="libcupsdriver.la" + LIBCUPSIMAGE="libcupsimage.la" + LIBCUPSMIME="libcupsmime.la" + LIBCUPSPPDC="libcupsppdc.la" + DSO="\$(CC)" + DSOXX="\$(CXX)" else PICFLAG=0 LIBCUPS="libcups.a" @@ -156,8 +183,13 @@ AC_SUBST(LIBCUPSMIME) AC_SUBST(LIBCUPSPPDC) if test x$enable_shared = xno; then - LINKCUPS="../cups/libcups.a" - LINKCUPSIMAGE="../filter/libcupsimage.a" + if test x$enable_libtool = xno; then + LINKCUPS="../cups/libcups.a" + LINKCUPSIMAGE="../filter/libcupsimage.a" + else + LINKCUPS="../cups/\$(LIBCUPS)" + LINKCUPSIMAGE="../filter/\$(LIBCUPSIMAGE)" + fi else if test $uname = AIX; then LINKCUPS="-lcups_s" @@ -182,10 +214,11 @@ if test "$DSO" != ":"; then DSOLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(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 + if test x$enable_libtool = xno; then + # 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 needs the path, even for /usr/lib... case "$uarch" in @@ -233,7 +266,8 @@ if test "$DSO" != ":"; then EXPORT_LDFLAGS="-Wl,-rpath,$libdir" fi ;; - esac + esac + fi else DSOLIBS="" IMGLIBS="\$(LIBTIFF) \$(LIBPNG) \$(LIBJPEG) \$(LIBZ)"