diff options
author | Tom Tromey <tromey@redhat.com> | 1996-08-10 23:15:36 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 1996-08-10 23:15:36 +0000 |
commit | 293f0a04096fa52e88545f31f7c36bac6eb77d43 (patch) | |
tree | b6436c4a80043d36d55273c309cabbe54b8f00ed /aclocal.in | |
parent | 80f1b2dc3ae4914e0acdadc4bdf44bcbf3628319 (diff) | |
download | automake-293f0a04096fa52e88545f31f7c36bac6eb77d43.tar.gz |
ansi2knr rework. strtod fix. aclocal fixes
Diffstat (limited to 'aclocal.in')
-rw-r--r-- | aclocal.in | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/aclocal.in b/aclocal.in index 457c7773e..4180c347b 100644 --- a/aclocal.in +++ b/aclocal.in @@ -24,6 +24,9 @@ $output = ''; # Output file name. $output_file = 'aclocal.m4'; +# Which macros have been seen. +%macro_seen = (); + # Which files have been seen. %file_seen = (); @@ -44,12 +47,13 @@ $verbosity = 0; 'fp_WITH_REGEX', 'gm_PROG_LIBTOOL', 'jm_MAINTAINER_MODE', - 'md_PATH_PROG', - 'md_TYPE_PTRDIFF_T', - 'ud_GNU_GETTEXT', - 'ud_LC_MESSAGES', - 'ud_PATH_LISPDIR', - 'ud_WITH_NLS' +# These aren't quite obsolete. +# 'md_PATH_PROG', +# 'md_TYPE_PTRDIFF_T', +# 'ud_GNU_GETTEXT', +# 'ud_LC_MESSAGES', +# 'ud_PATH_LISPDIR', +# 'ud_WITH_NLS' ); $obsolete_rx = '(' . join ('|', @obsolete_macros) . ')'; @@ -211,10 +215,23 @@ sub add_file while (<FILE>) { $output .= $_; + + # See if we're defining a macro that was already seen. This + # is mostly a special case for `acinclude.m4'. + if (/AC_DEFUN\(\[?([^])]*)\]?/) + { + if ($1 ne $file && $file_seen{$1}) + { + warn "$fullfile: $.: duplicated macro \`$1'\n"; + $exit_status = 1; + } + $macro_seen{$1} = 1; + } + # See if some other macro is required. if (/AC_REQUIRE\(\[?([^])]*)\]?\)/) { - push (@rlist, $1); + push (@rlist, $1) unless defined $macro_seen{$1}; } } $output .= "\n"; |