]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltdl.m4: Renamed from...
authorAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Thu, 16 Dec 1999 11:40:16 +0000 (11:40 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Thu, 16 Dec 1999 11:40:16 +0000 (11:40 +0000)
* 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.

ChangeLog
Makefile.am
bootstrap
configure.in
doc/libtool.texi
libltdl/Makefile.am
libtoolize.in
ltdl.m4 [moved from libltdl/ltdl.m4 with 100% similarity]

index d4f62091e98286435ba62489f845319193eb4e87..83c9cba4b21c94dd097a7737d99500ff7b697c7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 1999-12-16  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
 
+       * 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.
index 0d2d23928440cee35f1df2f39395b6869240d981..7749527f6fabdab8ae67ef3fbe2b7ed8883400a5 100644 (file)
@@ -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)
index 48b1330531a1f27faae600a26b0025cbb746daaa..35d69793c323c311eb610c822dc55be99593f7a6 100755 (executable)
--- 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
index 9acfdd5d62aa7378d93db93d004b3fa3bc01b49e..33c52beb2a3e1107a913fe6902ebe58309a9ca2a 100644 (file)
@@ -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)
index 19b8d3d5c9ca43a3c2c21a9752001df721ffc87c..34e03d57dd5601ca513c7eaef9560cf958665982 100644 (file)
@@ -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
index aa484bba7bbe0e73f8d1f1ff695331aab146326a..dafd5854d5180f44b823ac9abece4179103d6718 100644 (file)
@@ -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
index 6c9ad0b30f790942a5f4a41c142c0899944e3cc8..71e4be5caea2f5b908dfa0824a23af42bc22cf2f 100644 (file)
@@ -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
 
 
similarity index 100%
rename from libltdl/ltdl.m4
rename to ltdl.m4