libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

77ter-gary-diagnose-version-mismatch.patch


From: Gary V. Vaughan
Subject: 77ter-gary-diagnose-version-mismatch.patch
Date: Fri, 06 Feb 2004 16:00:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay to commit?
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAI7oIFRMICSmD1gYRAhDWAJ9G+9TjD2ZF6tuZods3bWU63R6XHgCfVzpI
TY4QQBXYdhV2j4I1Kfksj1g=
=3f2l
-----END PGP SIGNATURE-----
Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        * 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.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.99
diff -u -p -u -r1.99 Makefile.am
--- Makefile.am 6 Feb 2004 14:51:56 -0000 1.99
+++ Makefile.am 6 Feb 2004 15:29:43 -0000
@@ -36,7 +36,25 @@ dist_pkgdata_DATA = config/config.guess 
 # 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,address@hidden@],$(VERSION),g" \
+           -e "s,address@hidden@],$$1,g" \
+           -e "s,address@hidden@],Generated from ltversion.in; do not edit by 
hand.,g" \
+       $(top_srcdir)/m4/ltversion.in > address@hidden
+       chmod a-w address@hidden
+       mv -f address@hidden $@
 
 # The standalone libtool script, and the libtool distributor.
 bin_SCRIPTS = libtool libtoolize
Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.134
diff -u -p -u -r1.134 NEWS
--- NEWS 6 Feb 2004 13:58:06 -0000 1.134
+++ NEWS 6 Feb 2004 15:29:43 -0000
@@ -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
Index: TODO
===================================================================
RCS file: /cvsroot/libtool/libtool/TODO,v
retrieving revision 1.49
diff -u -p -u -r1.49 TODO
--- TODO 20 Mar 2003 20:24:21 -0000 1.49
+++ TODO 6 Feb 2004 15:29:43 -0000
@@ -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: bootstrap
===================================================================
RCS file: /cvsroot/libtool/libtool/bootstrap,v
retrieving revision 1.37
diff -u -p -u -r1.37 bootstrap
--- bootstrap 4 Jan 2004 20:45:24 -0000 1.37
+++ bootstrap 6 Feb 2004 15:29:43 -0000
@@ -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: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.372
diff -u -p -u -r1.372 ltmain.in
--- ltmain.in 5 Feb 2004 14:53:15 -0000 1.372
+++ ltmain.in 6 Feb 2004 15:29:52 -0000
@@ -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 LT_INIT_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 LT_INIT_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 LT_INIT_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 LT_INIT_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 LT_INIT_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 LT_INIT_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: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.40
diff -u -p -u -r1.40 libtool.m4
--- m4/libtool.m4 6 Feb 2004 14:38:56 -0000 1.40
+++ m4/libtool.m4 6 Feb 2004 15:29:53 -0000
@@ -97,6 +97,7 @@ dnl Autoconf doesn't catch unexpanded LT
 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
Index: m4/ltversion.in
===================================================================
RCS file: m4/ltversion.in
diff -N m4/ltversion.in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ m4/ltversion.in 6 Feb 2004 15:29:53 -0000
@@ -0,0 +1,14 @@
+# ltversion.m4 -- version numbers                      -*- Autoconf -*-
+# @configure_input@
+
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], address@hidden@])
+m4_define([LT_PACKAGE_REVISION], address@hidden@])
+
+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)
+])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]