From 08b29035fc0ec45a67025e2db020fe9d3c5b9ed9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 20 Mar 1998 22:16:20 +0000 Subject: [PATCH] fixed aclocal bug --- ChangeLog | 3 +++ aclocal.in | 7 ++++++- tests/ChangeLog | 2 ++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/aclocalii.test | 17 +++++++++++++++++ 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100755 tests/aclocalii.test diff --git a/ChangeLog b/ChangeLog index a6735f28..0e065275 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Fri Mar 20 00:26:10 1998 Tom Tromey + * aclocal.in (add_file): If &search fails, and macro matches AM_, + then print error. Test aclocalii.test. + De-ansi-fication fixes from Harlan Stenn: * ansi2knr.c (main): Accept "-" argument to mean stdin. * automake.in (handle_yacc_lex_cxx): Preprocess C source before diff --git a/aclocal.in b/aclocal.in index 80c818a3..aeda622f 100644 --- a/aclocal.in +++ b/aclocal.in @@ -331,7 +331,12 @@ sub add_file } # This function constructed dynamically. - &search; + if (! &search && /(^|\s+)(AM_[A-Z_]+)/) + { + # Macro not found, but AM_ prefix found. + warn "aclocal: configure.in: $.: macro \`$2' not found in library\n"; + $exit_status = 1; + } } local ($macro); diff --git a/tests/ChangeLog b/tests/ChangeLog index 925c5194..06bf8135 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,7 @@ Fri Mar 20 00:32:16 1998 Tom Tromey + * aclocalii.test: New file. + * javasubst.test: New file. Thu Mar 19 14:11:45 1998 Tom Tromey diff --git a/tests/Makefile.am b/tests/Makefile.am index ca43b870..f0bebc68 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,7 +29,7 @@ xsource.test libobj6.test depend3.test output5.test ammissing.test \ install.test libobj7.test objc.test cond3.test cxxcpp.test \ aclocal.test alpha.test whoami.test unused.test condman.test \ texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \ -java.test sinclude.test javaprim.test javasubst.test +java.test sinclude.test javaprim.test javasubst.test aclocalii.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 2128b4db..c935f830 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -90,7 +90,7 @@ xsource.test libobj6.test depend3.test output5.test ammissing.test \ install.test libobj7.test objc.test cond3.test cxxcpp.test \ aclocal.test alpha.test whoami.test unused.test condman.test \ texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \ -java.test sinclude.test javaprim.test javasubst.test +java.test sinclude.test javaprim.test javasubst.test aclocalii.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/aclocalii.test b/tests/aclocalii.test new file mode 100755 index 00000000..5dcae3da --- /dev/null +++ b/tests/aclocalii.test @@ -0,0 +1,17 @@ +#! /bin/sh + +# Test to make sure include of include detects missing macros +. $srcdir/defs || exit 1 + +echo GNOME_X_CHECKS >> configure.in + +mkdir macros + +cat > macros/gnome.m4 << 'END' +AC_DEFUN([GNOME_X_CHECKS], [ + AM_PATH_GTK(0.99.5,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) +]) +END + +$ACLOCAL -I macros && exit 1 +exit 0 -- 2.43.5