From: Alexandre Oliva Date: Thu, 16 Dec 1999 11:40:16 +0000 (+0000) Subject: * ltdl.m4: Renamed from... X-Git-Tag: release-1-3d~237 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7a4a733021fa6fa93fe4138a41348e404b59457;p=thirdparty%2Flibtool.git * ltdl.m4: Renamed from... * libltdl/ltdl.m4: that no longer exists. * configure.in (ACINCLUDE_M4_LIST): Removed libltdl/acinclude.m4. * Makefile.am (aclocal_macros): Added ltdl.m4. (libltdl/acinclude.m4): Concatenate libtool.m4 and ltdl.m4. * bootstrap: Likewise. * libltdl/Makefile.am (ACLOCAL): Remove the definition. Relying upon -I may lead to duplicates. * doc/libtool.texi: Suggest appending ltdl.m4 to acinclude.m4. * libtoolize.in: Check AC_LIB_LTDL version number in aclocal.m4. --- diff --git a/ChangeLog b/ChangeLog index d4f62091e..83c9cba4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 1999-12-16 Alexandre Oliva + * ltdl.m4: Renamed from... + * libltdl/ltdl.m4: that no longer exists. + * configure.in (ACINCLUDE_M4_LIST): Removed libltdl/acinclude.m4. + * Makefile.am (aclocal_macros): Added ltdl.m4. + (libltdl/acinclude.m4): Concatenate libtool.m4 and ltdl.m4. + * bootstrap: Likewise. + * libltdl/Makefile.am (ACLOCAL): Remove the definition. Relying + upon -I may lead to duplicates. + * doc/libtool.texi: Suggest appending ltdl.m4 to acinclude.m4. + * libtoolize.in: Check AC_LIB_LTDL version number in aclocal.m4. + * libltdl/configure.in (with_auxdir): Do not use it as the argument of AC_CONFIG_AUX_DIR, automake requires a literal here. Use AC_CONFIG_AUX_DIRS/DIR_DEFAULT instead. diff --git a/Makefile.am b/Makefile.am index 0d2d23928..7749527f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ CPPLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS= @LIBS@ -aclocal_macros = libtool.m4 +aclocal_macros = libtool.m4 ltdl.m4 EXTRA_DIST = $(aclocal_macros) libtoolize.in ltconfig.in ltmain.in \ mkstamp ChangeLog.0 @@ -81,7 +81,7 @@ update-timestamps: (rm -f $@ && cp ltconfig.T $@ && rm -f ltconfig.T) @srcdir@/ltmain.sh: $(srcdir)/ltmain.in $(top_srcdir)/configure.in $(TSDEPS) - rm -f ltmain.shT + -rm -f ltmain.shT date=`$(SHELL) $(srcdir)/mkstamp < $(srcdir)/ChangeLog` && \ sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT @@ -89,11 +89,17 @@ update-timestamps: (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT) # All our rules should depend on these demo files. -all-recursive: $(ACINCLUDE_M4_LIST) +all-recursive: $(srcdir)/libltdl/acinclude.m4 $(ACINCLUDE_M4_LIST) + +@srcdir@/libltdl/acinclude.m4: $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4 + -rm -f $@ $@T + cat $(srcdir)/libtool.m4 $(srcdir)/ltdl.m4 > $@T + mv $@T $@ @ACINCLUDE_M4_LIST@: $(srcdir)/libtool.m4 - rm -f $@ - cp $(srcdir)/libtool.m4 $@ + -rm -f $@ $@T + cat $(srcdir)/libtool.m4 > $@T + mv $@T $@ .PHONY: configure-subdirs configure-subdirs distdir: $(DIST_MAKEFILE_LIST) diff --git a/bootstrap b/bootstrap index 48b133053..35d69793c 100755 --- a/bootstrap +++ b/bootstrap @@ -14,11 +14,12 @@ aclocal automake --gnu --add-missing autoconf -for sub in demo depdemo libltdl mdemo cdemo; do +for sub in libltdl demo depdemo mdemo cdemo; do cd $sub rm -f acinclude.m4 - cp ../libtool.m4 acinclude.m4 - aclocal -I . + cat ../libtool.m4 > acinclude.m4 + case "$sub" in libltdl) cat ../ltdl.m4 >> acinclude.m4 ;; esac + aclocal test "$sub" = libltdl && autoheader automake --gnits --add-missing autoconf diff --git a/configure.in b/configure.in index 9acfdd5d6..33c52beb2 100644 --- a/configure.in +++ b/configure.in @@ -66,10 +66,10 @@ dnl included in the distribution CONF_SUBDIRS="cdemo demo depdemo mdemo" AC_SUBST(CONF_SUBDIRS) -ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4 ${srcdir}/libltdl/acinclude.m4 " +ACINCLUDE_M4_LIST="${srcdir}/acinclude.m4" DIST_MAKEFILE_LIST= for dir in $CONF_SUBDIRS; do - ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST${srcdir}/$dir/acinclude.m4 " + ACINCLUDE_M4_LIST="$ACINCLUDE_M4_LIST ${srcdir}/$dir/acinclude.m4" DIST_MAKEFILE_LIST="$DIST_MAKEFILE_LIST$dir/Makefile " done AC_SUBST(ACINCLUDE_M4_LIST) diff --git a/doc/libtool.texi b/doc/libtool.texi index 19b8d3d5c..34e03d57d 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -3061,20 +3061,19 @@ objects to your package, or else which flavor of libltdl you want to use: a convenience library or an installable libtool library. The most simplistic way to add @code{ltdl} to your package is to copy -the source files, @file{ltdl.c} and @file{ltdl.h}, to a source -directory withing your package and to build and link them along with -the rest of your sources. To help you do this, the m4 macros for -autoconf are available in @file{ltdl.m4}. You must ensure that they -are available in @file{aclocal.m4} before you run autoconf -- either -by copying @file{ltdl.m4} to the macro directory of your package (if -you have one) before running aclocal, or else @code{cat}ting its contents -directly to the end of @file{aclocal.m4} if you are not using automake. -Having made the macros available, you must add a call to the -@samp{AC_LIB_LTDL} macro to your package's @file{configure.in} to perform -the configure time checks required to build @file{ltdl.o} correctly. -This method has problems if you then try to link the package binaries -with an installed libltdl, or a library which depends on libltdl, which -will cause problems with multiple symbol definitions. +the source files, @file{ltdl.c} and @file{ltdl.h}, to a source directory +withing your package and to build and link them along with the rest of +your sources. To help you do this, the m4 macros for autoconf are +available in @file{ltdl.m4}. You must ensure that they are available in +@file{aclocal.m4} before you run autoconf -- by appending the contents +of @file{ltdl.m4} to @file{acinclude.m4}, if you are using automake, or +to @file{aclocal.m4} if you are not. Having made the macros available, +you must add a call to the @samp{AC_LIB_LTDL} macro to your package's +@file{configure.in} to perform the configure time checks required to +build @file{ltdl.o} correctly. This method has problems if you then try +to link the package binaries with an installed libltdl, or a library +which depends on libltdl: you may have problems with duplicate symbol +definitions. One advantage of the convenience library is that it is not installed, so the fact that you use libltdl will not be apparent to the user, and it diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am index aa484bba7..dafd5854d 100644 --- a/libltdl/Makefile.am +++ b/libltdl/Makefile.am @@ -2,9 +2,6 @@ AUTOMAKE_OPTIONS = no-dependencies foreign -## for ltdl.m4 -ACLOCAL = @ACLOCAL@ -I . - if INSTALL_LTDL include_HEADERS = ltdl.h lib_LTLIBRARIES = libltdl.la diff --git a/libtoolize.in b/libtoolize.in index 6c9ad0b30..71e4be5ca 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -38,6 +38,7 @@ pkgdatadir=@pkgdatadir@ aclocaldir=@aclocaldir@ libtool_m4="$aclocaldir/libtool.m4" +ltdl_m4="$aclocaldir/ltdl.m4" dry_run=no help="Try \`$progname --help' for more information." @@ -224,6 +225,41 @@ if test -z "$automake"; then else echo "You should $updatemsg." fi + + if grep '^AC_LIB_LTDL' configure.in >/dev/null 2>&1; then + if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then + updatemsg="update your \`aclocal.m4' by running aclocal" + else + updatemsg="add the contents of \`$ltdl_m4' to \`aclocal.m4'" + fi + + if egrep '^AC_DEFUN\(AC_LIB_LTDL' aclocal.m4 >/dev/null 2>&1; then + # Check the version number on ltdl.m4 and the one used in aclocal.m4. + instserial=`grep '^# serial ' $ltdl_m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` + + if test -z "$instserial"; then + echo "$progname: warning: no serial number on \`$ltdl_m4'" 1>&2 + else + # If the local macro has no serial number, we assume it's ancient. + localserial=`grep '^# serial ' aclocal.m4 | grep 'AC_LIB_LTDL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` + + test -z "$localserial" && localserial=0 + + if test "$localserial" -lt "$instserial"; then + echo "You should $updatemsg." + elif test "$localserial" -gt "$instserial"; then + echo "$progname: \`$ltld_m4' is serial $instserial, less than $localserial in \`aclocal.m4'" 1>&2 + if test -z "$force"; then + echo "Use \`--force' to replace newer libtool files with this version." 1>&2 + exit 1 + fi + echo "To remain compatible, you should $updatemsg." + fi + fi + else + echo "You should $updatemsg." + fi + fi fi diff --git a/libltdl/ltdl.m4 b/ltdl.m4 similarity index 100% rename from libltdl/ltdl.m4 rename to ltdl.m4