--------------------- PatchSet 5981 Date: 2007/10/18 19:04:12 Author: rousskov Branch: ecap Tag: (none) Log: Moved Libtool libltdl directory to lib/libLtdl to keep all 3rd-party libs in one place. Will commit the lib/libLtdl directory itself soon. Bootstrap.sh currently moves all files from the generated libltdl into lib/libLtdl. A better approach may be to use the --ltdl option of libtoolize. Will investigate. Changed configure options to assume that ltdl is always used if modules are used. The --disable-loadable-modules option can be used to disable libltdl building, linking, and support for loadable modules (both preloaded and dynamic). I wanted to use the simpler --disable-modules name, but since existing configure options and messages already refer to "modules", it seemed better to qualify support for what kind of modules is being disabled. Members: Makefile.am:1.12.30.1->1.12.30.2 bootstrap.sh:1.22.2.1->1.22.2.2 configure.in:1.159.2.1->1.159.2.2 src/Makefile.am:1.131.2.1->1.131.2.2 Index: squid3/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid3/Makefile.am,v retrieving revision 1.12.30.1 retrieving revision 1.12.30.2 diff -u -r1.12.30.1 -r1.12.30.2 --- squid3/Makefile.am 18 Oct 2007 17:11:40 -0000 1.12.30.1 +++ squid3/Makefile.am 18 Oct 2007 19:04:12 -0000 1.12.30.2 @@ -1,20 +1,12 @@ ## Process this file with automake to produce Makefile.in # -# $Id: Makefile.am,v 1.12.30.1 2007/10/18 17:11:40 rousskov Exp $ +# $Id: Makefile.am,v 1.12.30.2 2007/10/18 19:04:12 rousskov Exp $ # AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign -if WITH_LIBLTDL -DIST_SUBDIRS = libltdl -SUBDIRS = libltdl -else -DIST_SUBDIRS = -SUBDIRS = -endif - -DIST_SUBDIRS += lib snmplib scripts src icons errors contrib doc helpers test-suite tools -SUBDIRS += lib @makesnmplib@ scripts src icons errors doc helpers test-suite tools +DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers test-suite tools +SUBDIRS = lib @makesnmplib@ scripts src icons errors doc helpers test-suite tools DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* Index: squid3/bootstrap.sh =================================================================== RCS file: /cvsroot/squid-sf//squid3/bootstrap.sh,v retrieving revision 1.22.2.1 retrieving revision 1.22.2.2 diff -u -r1.22.2.1 -r1.22.2.2 --- squid3/bootstrap.sh 18 Oct 2007 17:11:40 -0000 1.22.2.1 +++ squid3/bootstrap.sh 18 Oct 2007 19:04:12 -0000 1.22.2.2 @@ -63,19 +63,34 @@ fi bootstrap libtoolize$ltver $extras --force --copy --automake + echo "Warning: libtoolize 1.x does not update libtool.m4." - if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.in + # customize generated libltdl, if any + if test -d libltdl then + src=libltdl + # do not bundle with the huge standard license text - rm -fv libltdl/COPYING.LIB - makefile=libltdl/Makefile.in + rm -fv $src/COPYING.LIB + makefile=$src/Makefile.in sed 's/COPYING.LIB/ /g' $makefile > $makefile.new; chmod u+w $makefile mv $makefile.new $makefile - chmod u-w $makefile - fi + # leave writable, do not run chmod u-w $makefile - echo "Warning: libtoolize 1.x does not update libtool.m4." + dest=lib/libLtdl + # move $src to $dest, preserving CVS structure + if test -d $dest # already exists + then + echo updating $dest + # TODO: only move files that changed + mv $src/* $dest/ + rmdir $src + else + echo "Warning: Creating $dest which should have existed." + mv $src $dest + fi + fi } # Adjust paths of required autool packages Index: squid3/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid3/configure.in,v retrieving revision 1.159.2.1 retrieving revision 1.159.2.2 diff -u -r1.159.2.1 -r1.159.2.2 --- squid3/configure.in 18 Oct 2007 17:11:41 -0000 1.159.2.1 +++ squid3/configure.in 18 Oct 2007 19:04:12 -0000 1.159.2.2 @@ -1,7 +1,7 @@ dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.159.2.1 2007/10/18 17:11:41 rousskov Exp $ +dnl $Id: configure.in,v 1.159.2.2 2007/10/18 19:04:12 rousskov Exp $ dnl dnl dnl @@ -11,7 +11,7 @@ AC_CONFIG_AUX_DIR(cfgaux) AC_CONFIG_SRCDIR([src/main.cc]) AM_INIT_AUTOMAKE([tar-ustar]) -AC_REVISION($Revision: 1.159.2.1 $)dnl +AC_REVISION($Revision: 1.159.2.2 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -30,50 +30,51 @@ AC_PROG_CXX AC_CANONICAL_HOST -dnl TODO: we need an --enable-modules option as well -AC_MSG_CHECKING(whether to use embedded libltdl) -AC_ARG_WITH(libltdl, +use_loadable_modules=1 +AC_MSG_CHECKING(whether to use loadable modules) +AC_ARG_ENABLE(loadable-modules, [ AC_HELP_STRING( - [--with-libltdl], - [handle loadable modules using libltdl]) + [--disable-loadable-modules], + [do not support loadable modules]) ], [ - case "${withval}" in - yes) libltdl=yes ;; - no) libltdl=no ;; - *) AC_MSG_ERROR(bad value ${withval} for --with-libltdl) ;; + case "${enableval}" in + yes) use_loadable_modules=yes ;; + no) use_loadable_modules=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-loadable-modules) ;; esac - AC_MSG_RESULT([$libltdl, explicitly]) + AC_MSG_RESULT([$use_loadable_modules, explicitly]) ], [ - libltdl=yes; - AC_MSG_RESULT([$libltdl, implicitly]) + use_loadable_modules=yes; + AC_MSG_RESULT([$use_loadable_modules, implicitly]) ] -) +) -AM_CONDITIONAL(WITH_LIBLTDL, test "x$libltdl" = xyes) +AM_CONDITIONAL(USE_LOADABLE_MODULES, test $use_loadable_modules = yes) -if test "x$libltdl" = xyes +if test $use_loadable_modules = yes; then + AC_DEFINE(USE_LOADABLE_MODULES, 1, [Support Loadable Modules]) AC_ENABLE_SHARED else AC_DISABLE_SHARED fi + AC_LIBTOOL_DLOPEN -if test "x$libltdl" = xyes +if test $use_loadable_modules = yes; then - AC_LIBLTDL_CONVENIENCE + AC_LIBLTDL_CONVENIENCE(lib/libLtdl) fi AC_PROG_LIBTOOL AC_LTDL_DLLIB -# must configure the subdir unconditionally for "make distcheck" to work +# Do we need these unconditionally for "make distcheck" to work? AC_SUBST(INCLTDL) AC_SUBST(LIBLTDL) -AC_CONFIG_SUBDIRS(libltdl) -if test "x$libltdl" != "xyes" +if test $use_loadable_modules != yes; then # Why is this needed? Should not libtool's AC_LIBTOOL_DLOPEN do that? LIBADD_DL=${lt_cv_dlopen_libs} @@ -3364,4 +3365,8 @@ AC_CONFIG_SUBDIRS(lib/libTrie) +# must configure libltdl subdir unconditionally for "make distcheck" to work +AC_CONFIG_SUBDIRS(lib/libLtdl) + + AC_OUTPUT Index: squid3/src/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Makefile.am,v retrieving revision 1.131.2.1 retrieving revision 1.131.2.2 diff -u -r1.131.2.1 -r1.131.2.2 --- squid3/src/Makefile.am 18 Oct 2007 17:11:42 -0000 1.131.2.1 +++ squid3/src/Makefile.am 18 Oct 2007 19:04:13 -0000 1.131.2.2 @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.131.2.1 2007/10/18 17:11:42 rousskov Exp $ +# $Id: Makefile.am,v 1.131.2.2 2007/10/18 19:04:13 rousskov Exp $ # # Uncomment and customize the following to suit your needs: # @@ -671,7 +671,7 @@ @AUTH_OBJS@ \ @ICAP_LIBS@ -if WITH_LIBLTDL +if USE_LOADABLE_MODULES squid_LDADD += \ @LIBLTDL@ squid_LDFLAGS = \