]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtoolize.m4sh (func_scan_files): Avoid matching our own
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 17 Jan 2008 05:36:21 +0000 (05:36 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 17 Jan 2008 05:36:21 +0000 (05:36 +0000)
macro code when scanning configure.ac and aclocal.m4.
Don't produce spurious output if AC_PROG_RANLIB is found.
* tests/old-m4-iface.at (AM_PROG_LIBTOOL): Add a (weak) check
that we don't match our own macro code when searching for user
code calling us.
* TODO: Updated.

ChangeLog
TODO
libtoolize.m4sh
tests/old-m4-iface.at

index 2ee274a27717a4b81d16704de4fcd1a21ec62f53..83584419aebd471ca70a101ff01bfddd4b8ec6fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libtoolize.m4sh (func_scan_files): Avoid matching our own
+       macro code when scanning configure.ac and aclocal.m4.
+       Don't produce spurious output if AC_PROG_RANLIB is found.
+       * tests/old-m4-iface.at (AM_PROG_LIBTOOL): Add a (weak) check
+       that we don't match our own macro code when searching for user
+       code calling us.
+       * TODO: Updated.
+
 2008-01-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        New variable LTDLDEPS for use in output_DEPENDENCIES.
diff --git a/TODO b/TODO
index 633cccb4fb5af3f834d096b481d56bc715529dd6..8a9ed7e87f5e61575f6a8b26b1ab53ac7a6e81f1 100644 (file)
--- a/TODO
+++ b/TODO
@@ -103,6 +103,8 @@ GNU Libtool
   processes per copied file, a list of files to copy is built and all
   files copied with a single pair of tar processes.
 
+* Write test case that adds libtool macros to aclocal.m4.
+
 
 2. In the future
 ================
@@ -278,7 +280,7 @@ GNU Libtool
   it easier to add new platforms.
 
 -- 
-  Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+  Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
   Written by Gary V. Vaughan, 2004
 
   This file is part of GNU Libtool.
index 667abc0dbb103e03e42630068dc59d498795cf78..ec422bdaf119683a442bd932481ae75bf006c994 100644 (file)
@@ -418,14 +418,18 @@ func_scan_files ()
            s,^.*LT_CONFIG_LTDL_DIR([[   ]*\([^])]*\).*$,ac_ltdldir=\1,
            p
        }
+       /\@<:@A[CM]_PROG_LIBTOOL/d
        /A[CM]_PROG_LIBTOOL/ {
            s,^.*$,seen_libtool=:,
            p
        }
+       /the.*option into.*LT_INIT.*parameter/d
+       /\@<:@LT_INIT/d
        /LT_INIT/                {
            s,^.*$,seen_libtool=:,
            p
        }
+       /\@<:@LTDL_INIT/d
        /LTDL_INIT/          {
            s,^.*LTDL_INIT([[   ]*\([^])]*\).*$,ltdl_options="\1",
            s,^.*LTDL_INIT[     ]*$,seen_ltdl=:,
@@ -960,7 +964,7 @@ func_check_macros ()
     else
       # Don't trace for this, we're just checking the user didn't invoke it
       # directly from configure.ac.
-      $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB &&
+      $SED 's,dnl .*$,,; s,# .*$,,' "$configure_ac" | grep AC_PROG_RANLIB >/dev/null &&
         func_echo "\`AC_PROG_RANLIB' is rendered obsolete by \`LT_INIT'"
     fi
 
index d481c9764454bf33ef5ce69498ee5ecb5b5335ea..f36f97f5270e659d25e0da32341c53e73a55ec1b 100644 (file)
@@ -86,6 +86,17 @@ LT_AT_BOOTSTRAP([ignore], [ignore], [ignore], [ignore], [--force])
 
 LT_AT_EXEC_CHECK([./old], 0, [Hello, World!])
 
+# Now, test that libtoolize doesn't mistakenly think the user called
+# any libtool macros if in fact she didn't.
+sed '/AM_PROG_LIBTOOL/d' configure.in >configure.int
+mv -f configure.int configure.in
+AT_CHECK([$LIBTOOLIZE -n], [0], [stdout], [stderr])
+# ensure no shell errors:
+AT_CHECK([grep -v "^libtoolize: " stderr], [1])
+AT_CHECK([grep "Remember to add.*LT_INIT.*to configure.in" stdout], [0], [ignore])
+AT_CHECK([grep "Consider adding.*LT_WITH_LTDL" stdout], [1])
+AT_CHECK([grep "Remember to add.*LT_CONFIG_LTDL_DIR" stdout], [1])
+
 AT_CLEANUP