]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4 (AC_LIBTOOL_SETUP): Catch unexpanded macros with
authorGary V. Vaughan <gary@gnu.org>
Fri, 6 Feb 2004 14:38:56 +0000 (14:38 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 6 Feb 2004 14:38:56 +0000 (14:38 +0000)
beginning with LT_ and _LT_.
* configure.ac (LT_MAJOR, LT_MINOR, LT_MICRO, LT_ALPHA): Renamed
to lt_major, lt_minor, lt_micro, lt_alpha to save triggering the
unexpanded macros error.

ChangeLog
configure.ac
m4/libtool.m4

index 19fa8724868b76d776ee7384f2fbd1a19789b60a..251d079dc1977a0461d614fad075d5e91a8ccc36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2004-02-06  Gary V. Vaughan  <gary@gnu.org>
 
+       * m4/libtool.m4 (AC_LIBTOOL_SETUP): Catch unexpanded macros with
+       beginning with LT_ and _LT_.
+       * configure.ac (LT_MAJOR, LT_MINOR, LT_MICRO, LT_ALPHA): Renamed
+       to lt_major, lt_minor, lt_micro, lt_alpha to save triggering the
+       unexpanded macros error.
+
        * m4/libtool.m4 (AC_PROVIDE_IFELSE): Removed.  We now require
        Autoconf 2.58, which ships this macro anyway.
 
index 38ffd2e06f7d30a6c26d3aa3a874c35dd7b92301..d318c29faa66ac0b1dd07dd03a9983fbcdad6066 100644 (file)
@@ -48,41 +48,41 @@ dnl AC_CONFIG_FILES([tests/atlocal])
 #      http://www.gnu.org/software/libtool/contribute.html
 
 # First we break the version number up into its constituent parts.
-LT_MAJOR=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
-LT_MINOR=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
-LT_MICRO=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
-LT_ALPHA=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`
+lt_major=`echo "AC_PACKAGE_VERSION" | sed ['s,\..*$,,g']`
+lt_minor=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.\([0-9]*\).*$,\1,']`
+lt_micro=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9]*\.[0-9]*\(\.[0-9]*\).*$,\1,']`
+lt_alpha=`echo "AC_PACKAGE_VERSION" | sed ['s,^[0-9.]*,,']`
 
-test "$LT_MINOR" = "AC_PACKAGE_VERSION" && LT_MINOR=0
-test "$LT_MICRO" = "AC_PACKAGE_VERSION" && LT_MICRO=""
+test "$lt_minor" = "AC_PACKAGE_VERSION" && lt_minor=0
+test "$lt_micro" = "AC_PACKAGE_VERSION" && lt_micro=""
 
 # Then we try to work out what the release before this one would have been
 # numbered.  The only time we come unstuck is when this is the first release
-# from a stable branch (LT_MICRO=LT_ALPHA=""), so LASTRELEASE is the last
+# from a stable branch (lt_micro=lt_alpha=""), so LASTRELEASE is the last
 # release from the old stable branch, and we don't know what version that
 # was, so leave it unset so that the Makefile can complain.
-case $LT_ALPHA in
+case $lt_alpha in
   [[ab]])
-    case $LT_MICRO in
+    case $lt_micro in
       [.[01]])
-       LASTRELEASE="$LT_MAJOR.$LT_MINOR" ;;
+       LASTRELEASE="$lt_major.$lt_minor" ;;
       *)
-       LASTRELEASE="$LT_MAJOR.$LT_MINOR$LT_MICRO" ;;
+       LASTRELEASE="$lt_major.$lt_minor$lt_micro" ;;
     esac
     ;;
   [[cegikmoqsuwy]])
     LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'c-y' 'b-w'` ;;
   [[dfhjlnprtvxz]])
     LASTRELEASE=`echo "AC_PACKAGE_VERSION" | tr 'd-z' 'b-x'` ;;
-  *) # No LT_ALPHA component
-    case $LT_MICRO in
+  *) # No lt_alpha component
+    case $lt_micro in
       .0)
        LASTRELEASE="" ;;
       .1)
-        LASTRELEASE="$LT_MAJOR.$LT_MINOR" ;;
+        LASTRELEASE="$lt_major.$lt_minor" ;;
       .*)
-       lt_micro_value=`echo $LT_MICRO | sed 's,^\.,,'`
-       LASTRELEASE="$LT_MAJOR.$LT_MINOR.`expr $lt_micro_value - 1`" ;;
+       lt_micro_value=`echo $lt_micro | sed 's,^\.,,'`
+       LASTRELEASE="$lt_major.$lt_minor.`expr $lt_micro_value - 1`" ;;
       *)
        LASTRELEASE="" ;;
     esac
@@ -94,7 +94,7 @@ AC_SUBST([LASTRELEASE])
 # It is assumed that we only want to see the date extension for cvs libtool
 # versions (i.e. "odd" letters) and not actual alpha releases.
 TIMESTAMP=
-case $LT_ALPHA in
+case $lt_alpha in
   [[acegikmoqsuwy]])
     TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog`
     AS_BOX([Configuring AC_PACKAGE_TARNAME (Build:$TIMESTAMP) AC_PACKAGE_VERSION])
index 6f2b87f8dd06e4e58785d2e32659d31c3c5a634e..8a1376467e360936a8faf7e4b86e5a06a184d212 100644 (file)
@@ -93,6 +93,9 @@ test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
 # ----------------
 AC_DEFUN([AC_LIBTOOL_SETUP],
 [AC_PREREQ(2.58)dnl We use AC_INCLUDES_DEFAULT
+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([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl