[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to make `Undefined Macros' slightly less stringent
From: |
David Benson |
Subject: |
patch to make `Undefined Macros' slightly less stringent |
Date: |
Thu, 9 Nov 2000 09:37:53 -0800 (PST) |
The following very short patch prevents shell variables merely containing
the letters AC_ from triggering the "Undefined macros" warning.
To provoke this bug, try adding
JAVAC_OPTIONS=-g
to any configure.in. Autoconf will complain because AC_ is
a subscring of that line.
This patch forces the AC_ to be after a non-alphanumeric,
or at the start of the line.
It might be desirable to include _ in the added character sets,
doing so would suppress MY_AC_MACRO() from being caught if undefined.
who cares i guess...
- Dave
=====================================================================
--- autoconf.orig Thu Nov 9 09:24:17 2000
+++ autoconf Thu Nov 9 09:27:43 2000
@@ -131,9 +131,11 @@
pattern="AC_"
status=0
-if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
+if grep "^[^#]*[^A-Za-z0-9]${pattern}" $tmpout > /dev/null 2>&1 ||
+ grep "^${pattern}" $tmpout > /dev/null 2>&1; then
echo "autoconf: Undefined macros:" >&2
- sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
+ sed -n "s/^[^#]*[^A-Za-z0-9]\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p;
+ s/^\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p;" $tmpout |
while read macro; do
grep -n "^[^#]*$macro" $infile /dev/null
test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
- patch to make `Undefined Macros' slightly less stringent,
David Benson <=