+2004-07-28 Gary V. Vaughan <gary@gnu.org>
+
+ Fix a long-standing bug where macro_version was always empty in
+ the generated m4/ltversion.m4. Except for CVS revisions:
+
+ * ltmain.in (package_revision): Don't try to deduce it from
+ TIMESTAMP, since that is empty for release versions; simply
+ substitute it...
+ * configure.ac (package_revision): ...from here, having
+ precalculated it before resetting TIMESTAMP for release versions.
+ * bootstrap: Force regeneration of m4/ltversion.m4, but retain
+ timestamps if there is no change to the content.
+
2004-07-28 Gary V. Vaughan <gary@gnu.org>
To take full advantage of this, libtool must be bootstrapped with
reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
fi
-make top_srcdir=. -f Makefile.am ./m4/ltversion.m4
+# Extract the version number from the configure.ac file, and make
+# sure that ltversion.m4 is up to date (preserving the timestamp
+# if possible).
+mv ./m4/ltversion.m4 .ltversion.m4T
+set -- `sed '/AC_INIT/{s/[][,]//g; p;};d' configure.ac`
+make top_srcdir=. VERSION="$2" -f Makefile.am ./m4/ltversion.m4
+if cmp -s ./m4/ltversion.m4 .ltversion.m4T; then
+ rm -f ./m4/ltversion.m4
+ mv .ltversion.m4T ./m4/ltversion.m4
+else
+ rm -f .ltversion.m4T
+fi
for file in $fakes; do
cat > $file <<'EOF'
# This is a sanity check so we can see which version is used in bug reports.
# 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=
+TIMESTAMP=`${CONFIG_SHELL} ${ac_aux_dir}/mkstamp < ${srcdir}/ChangeLog`
+package_revision=`( set $TIMESTAMP; echo $1; )`
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])
- echo
+ [[bdfhjlnprtvxz]])
+ TIMESTAMP=
;;
esac
+AS_BOX([Configuring AC_PACKAGE_TARNAME${TIMESTAMP:+" (Build:$TIMESTAMP)"} AC_PACKAGE_VERSION])
+echo
AC_SUBST([TIMESTAMP])
+AC_SUBST([package_revision])
## ------------------------ ##
## -------- ##
## Outputs. ##
## -------- ##
-AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
+AC_CONFIG_FILES([Makefile libltdl/Makefile libltdl/loaders/Makefile
doc/Makefile tests/Makefile])
AC_OUTPUT
PACKAGE=@PACKAGE@
VERSION=@VERSION@
TIMESTAMP="@TIMESTAMP@"
+package_revision=@package_revision@
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# 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: definition of this LT_INIT comes from an older release.
$progname: You should recreate aclocal.m4 with macros 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: definition of this LT_INIT comes from $PACKAGE $macro_version.
$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
$progname: and run autoconf again.
_LT_EOF
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: but the definition of this LT_INIT comes from revision $macro_revision.
$progname: You should recreate aclocal.m4 with macros from revision $package_revision
$progname: of $PACKAGE $VERSION and run autoconf again.
_LT_EOF