* 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.
This commit is contained in:
Gary V. Vaughan 2004-02-06 14:38:56 +00:00
parent 849a7b9f99
commit 2c0e1e7b8c
3 changed files with 26 additions and 17 deletions

View File

@ -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.

View 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])

3
m4/libtool.m4 vendored
View 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