]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/ltversion.in: New file to capture what version number macros
authorGary V. Vaughan <gary@gnu.org>
Fri, 6 Feb 2004 17:23:40 +0000 (17:23 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 6 Feb 2004 17:23:40 +0000 (17:23 +0000)
are being used.
* Makefile.am (m4/ltversion.m4): New rule to create it from
m4/ltversion.in.
(nodist_pkgmacro_DATA): Add m4/ltversion.m4.
(EXTRA_DIST): Add m4/ltversion.in.
* m4/libtool.m4 (AC_LIBTOOL_SETUP): AC_REQUIRE LTVERSION_VERSION
from ltversion.m4.
* bootstrap: Call the Makefile.am to create an initial
m4/ltversion.m4.
* ltmain.in: Diagnose version mismatches of various flavours.
* TODO: Remove mismatch item.
* NEWS: Updated.

ChangeLog
Makefile.am
NEWS
TODO
bootstrap
ltmain.in
m4/libtool.m4
m4/ltversion.in [new file with mode: 0644]

index 6e27c26ac9db944db7fff728592e07dab92d40a3..854499ae1d3b32039b47108dc8e586147fe898e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2004-02-06  Gary V. Vaughan  <gary@gnu.org>
 
+       * m4/ltversion.in: New file to capture what version number macros
+       are being used.
+       * Makefile.am (m4/ltversion.m4): New rule to create it from
+       m4/ltversion.in.
+       (nodist_pkgmacro_DATA): Add m4/ltversion.m4.
+       (EXTRA_DIST): Add m4/ltversion.in.
+       * m4/libtool.m4 (AC_LIBTOOL_SETUP): AC_REQUIRE LTVERSION_VERSION
+       from ltversion.m4.
+       * bootstrap: Call the Makefile.am to create an initial
+       m4/ltversion.m4.
+       * ltmain.in: Diagnose version mismatches of various flavours.
+       * TODO: Remove mismatch item.
+       * NEWS: Updated.
+
        * Makefile.am ($(top_builddir)/config.status): Removed.
        * configure.ac (CONFIG_STATUS_DEPENDENCIES): This substitution is
        how automake-1.8 now informs all Makefiles when config.status
index 41d9127f05c9386a4a7b10d6216327a3b9d9695c..067aab2ebba9ee5fd784ae6c007073e0749814ca 100644 (file)
@@ -36,7 +36,25 @@ dist_pkgdata_DATA = config/config.guess config/config.sub config/ltmain.sh
 # We maintain our own macros to provent problems with ancient definitions.
 # lt~obsolete.m4 doesn't belong here, it's for bootstrapping us only
 pkgmacrodir = $(pkgdatadir)/m4
-pkgmacro_DATA = m4/libtool.m4 m4/ltdl.m4 m4/ltsugar.m4
+dist_pkgmacro_DATA = m4/libtool.m4 m4/ltdl.m4 m4/ltsugar.m4
+nodist_pkgmacro_DATA = m4/ltversion.m4
+EXTRA_DIST += m4/ltversion.in
+
+# We build ltversion.m4 here, instead of from config.status,
+# because config.status is rerun each time one og configure's
+# dependencies change and ltversion.m4 happens to be a configure
+# dependency.  configure and ltversion.m4 vould be rebuilt in
+# a loop otherwise.
+# Use `$(top_srcdir)/m4' for the benefit of non-GNU makes: this is
+# how ltversion.m4 appears in our dependencies.
+$(top_srcdir)/m4/ltversion.m4: $(top_srcdir)/m4/ltversion.in stamp-vcl
+       set `$(MKSTAMP) < $(top_srcdir)/ChangeLog`; \
+       sed -e "s,[@]MACRO_VERSION[@],$(VERSION),g" \
+           -e "s,[@]MACRO_REVISION[@],$$1,g" \
+           -e "s,[@]configure_input[@],Generated from ltversion.in; do not edit by hand.,g" \
+       $(top_srcdir)/m4/ltversion.in > $@t
+       chmod a-w $@t
+       mv -f $@t $@
 
 # The standalone libtool script, and the libtool distributor.
 bin_SCRIPTS = libtool libtoolize
diff --git a/NEWS b/NEWS
index 68fc53c0fdfb45b41ef7c2dba0df418c62df17a5..5e62856232fbd8a426247e3f5128c027e92b74ee 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,13 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.5b: 2004-??-??; CVS version 1.5a, Libtool team:
+* The /^_?LT_[A-Z_]+$/ namespace is now reserved for Libtool's own macros.
+  If you have any shell variables in this namespace they will need to be
+  renamed.  If you have any macros in this namespace please rename them to
+  prevent any possible future clash with libtool supplied macros.
 * New LT_PREREQ macro for specifying minimum libtool requirement.
+* The libtool script will complain if it was built from mismatched ltmain.sh
+  and libtool m4 macro versions.
 * Like automake, libtoolize no longer installs config.guess and config.sub by
   default.  Use new --install option to get the old behaviour.
 * libtool script is now created by config.status.  Instead of interrogating
diff --git a/TODO b/TODO
index f38bf159c8ca367d1e7346261a9ef06dd7a5297e..e6b119d3cbee26fb54505c75b8cbe7a36556f2da 100644 (file)
--- a/TODO
+++ b/TODO
@@ -15,10 +15,6 @@ to ltconfig.
     or if a specific module type can only be loaded by one of them, how report its dlerror?
    Also report dlerror() for dlclose and dlsym if available
  - Make sure that the dependency_libs of a dlpreopened module won't be loaded.
-* Check whether the version of libtool.m4 is compatible with
-ltconfig/ltmain.sh.  Meanwhile, the recommended approach for
-developers using automake is to insert libtool.m4 in acinclude.m4.
 
 * We could have an option to hardcode paths into libraries, as well as
 binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'.  This is not
@@ -63,8 +59,8 @@ respective ltdl.m4 macros.
 
 * Godmar Back writes:
   libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others.
-  These functions are not async-signal-safe. While this does not make 
-  libltdl unusable, it restricts its usefulness and puts an 
+  These functions are not async-signal-safe. While this does not make
+  libltdl unusable, it restricts its usefulness and puts an
   unnecessary burden on the user.
 
   As a remedy, I'd recommend to replace those functions with functions
@@ -74,7 +70,7 @@ respective ltdl.m4 macros.
   out from which you can steal the latter.
 
   I believe relying on async-signal-safe functions to the greatest extent
-  possible would greatly improve libltdl's ability to be embedded in and 
+  possible would greatly improve libltdl's ability to be embedded in and
   used by other systems.
 
 * Arrange that EXEEXT suffixes are stripped from wrapper script names
index 428cf6e25be8c8a4bf06bcdadcb1e29f9b2bf9d1..07c3e5bd14e6e6db8a9f78745692c5638c502d58 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -41,6 +41,8 @@ if test -z "$reconfdirs"; then
   reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
 fi
 
+make top_srcdir=. -f Makefile.am ./m4/ltversion.m4
+
 for file in $fakes; do
   cat > $file <<'EOF'
 #! /bin/sh
index 30a20e3c301ae783e4344510b534873735671be9..d41cb0704aa7f9214d2ddceeb44697b270f804e3 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -65,6 +65,74 @@ mkdir="mkdir"
 mv="mv -f"
 rm="rm -f"
 
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+package_revision=`( set $TIMESTAMP; echo $1; )`
+if test "$package_revision" != "$macro_revision"; then
+  if test "$VERSION" != "$macro_version"; then
+    if test -z "$macro_version"; then
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this AC_PROG_LIBTOOL comes from an older release.
+$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this AC_PROG_LIBTOOL comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+    fi
+  else
+    cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition used by this AC_PROG_LIBTOOL comes from revision
+$progname: $macro_revision.
+$progname: You should recreate aclocal.m4 with macro's from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+  fi
+
+  # $? = 63 is used to indicate version mismatch to missing.
+  exit 63
+fi
+
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+package_revision=`( set $TIMESTAMP; echo $1; )`
+if test "$package_revision" != "$macro_revision"; then
+  if test "$VERSION" != "$macro_version"; then
+    if test -z "$macro_version"; then
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this AC_PROG_LIBTOOL comes from an older release.
+$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this AC_PROG_LIBTOOL comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macro's from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+    fi
+  else
+    cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition used by this AC_PROG_LIBTOOL comes from revision
+$progname: $macro_revision.
+$progname: You should recreate aclocal.m4 with macro's from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+  fi
+
+  # $? = 63 is used to indicate version mismatch to missing.
+  exit 63
+fi
+
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
 Xsed="${SED}"' -e 1s/^X//'
@@ -571,7 +639,7 @@ exec_cmd=
       exit 1
       ;;
     esac
-    
+
     func_infer_tag $base_compile
 
     for arg in $later; do
index 8a1376467e360936a8faf7e4b86e5a06a184d212..7dfa6d031eae6300c2e2f2a81362ddfa69322aab 100644 (file)
@@ -97,6 +97,7 @@ dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
 AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
diff --git a/m4/ltversion.in b/m4/ltversion.in
new file mode 100644 (file)
index 0000000..8297507
--- /dev/null
@@ -0,0 +1,14 @@
+# ltversion.m4 -- version numbers                      -*- Autoconf -*-
+# @configure_input@
+
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [@MACRO_VERSION@])
+m4_define([LT_PACKAGE_REVISION], [@MACRO_REVISION@])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='@MACRO_VERSION@'
+macro_revision='@MACRO_REVISION@'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])