fixed aclocal bug
authorTom Tromey <tromey@redhat.com>
Fri, 20 Mar 1998 22:16:24 +0000 (22:16 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 20 Mar 1998 22:16:24 +0000 (22:16 +0000)
ChangeLog
aclocal.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/aclocalii.test [new file with mode: 0755]

index a6735f2..0e06527 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Fri Mar 20 00:26:10 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * 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
index 80c818a..aeda622 100644 (file)
@@ -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);
index 925c519..06bf813 100644 (file)
@@ -1,5 +1,7 @@
 Fri Mar 20 00:32:16 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * aclocalii.test: New file.
+
        * javasubst.test: New file.
 
 Thu Mar 19 14:11:45 1998  Tom Tromey  <tromey@cygnus.com>
index ca43b87..f0bebc6 100644 (file)
@@ -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)
 
index 2128b4d..c935f83 100644 (file)
@@ -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 (executable)
index 0000000..5dcae3d
--- /dev/null
@@ -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