From: Ralf Wildenhues Date: Thu, 20 Nov 2008 06:13:36 +0000 (+0100) Subject: Check for bogus aclocal.m4 contents in bootstrap and dist-hook. X-Git-Tag: v2.2.7b~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3745830dcbc27ed4f4a760850713e721f326be64;p=thirdparty%2Flibtool.git Check for bogus aclocal.m4 contents in bootstrap and dist-hook. * Makefile.am (dist-hook): Bail out if shipped aclocal.m4 files contain LT_INIT, AC_PROG_LIBTOOL, or AM_PROG_LIBTOOL macro definitions. These can only come from bogus pull-ins from older installed Libtool macro files. * bootstrap: Likewise. Report by Akim Demaille. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 4ad511a0a..35ca37ecc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-11-20 Ralf Wildenhues + + Check for bogus aclocal.m4 contents in bootstrap and dist-hook. + * Makefile.am (dist-hook): Bail out if shipped aclocal.m4 files + contain LT_INIT, AC_PROG_LIBTOOL, or AM_PROG_LIBTOOL macro + definitions. These can only come from bogus pull-ins from older + installed Libtool macro files. + * bootstrap: Likewise. + Report by Akim Demaille. + 2008-11-16 Ralf Wildenhues Fix $ECHO abuse exposed by recent patch. diff --git a/Makefile.am b/Makefile.am index 8b19ea574..a09ed3d1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -433,6 +433,13 @@ dist-hook: case $(VERSION) in \ *[a-z]) cp -p $(srcdir)/README.alpha $(distdir)/README ;; \ esac; else :; fi +## Ensure aclocal has not wrongly picked up old macro definitions. + for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \ + if grep $$macro $(srcdir)/aclocal.m4 $(srcdir)/libltdl/aclocal.m4; then \ + echo "Bogus $$macro macro contents in an aclocal.m4 file." >&2; \ + exit 1; \ + else :; fi; \ + done ## ----------- ## diff --git a/bootstrap b/bootstrap index 8ce6ac7dc..f8b44c18d 100755 --- a/bootstrap +++ b/bootstrap @@ -183,6 +183,13 @@ rm -f Makefile libltdl/Makefile libtool vcl.tmp # to be regenerated at make-time with proper substitutions in place: touch $auxdir/ltmain.m4sh +for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do + if grep $macro aclocal.m4 libltdl/aclocal.m4; then + echo "Bogus $macro macro contents in an aclocal.m4 file." >&2 + exit 1 + else :; fi +done + # Commit script caveat: cat <