104 |
{ |
{ |
105 |
my $srcdir; |
my $srcdir; |
106 |
|
|
107 |
getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include, |
getopt ('I|include=s' => \@include, |
108 |
'B|prepend-include=s' => \@prepend_include, |
'B|prepend-include=s' => \@prepend_include, |
109 |
'W|warnings=s' => \@warning); |
'W|warnings=s' => \@warning); |
110 |
|
|
127 |
|
|
128 |
# Preach. |
# Preach. |
129 |
my $config_h_top = find_file ("config.h.top?", |
my $config_h_top = find_file ("config.h.top?", |
130 |
reverse(@prepend_include), @include); |
reverse (@prepend_include), @include); |
131 |
my $config_h_bot = find_file ("config.h.bot?", |
my $config_h_bot = find_file ("config.h.bot?", |
132 |
reverse(@prepend_include), @include); |
reverse (@prepend_include), @include); |
133 |
my $acconfig_h = find_file ("acconfig.h?", |
my $acconfig_h = find_file ("acconfig.h?", |
134 |
reverse(@prepend_include), @include); |
reverse (@prepend_include), @include); |
135 |
if ($config_h_top || $config_h_bot || $acconfig_h) |
if ($config_h_top || $config_h_bot || $acconfig_h) |
136 |
{ |
{ |
137 |
my $msg = << "END"; |
my $msg = << "END"; |
252 |
# Check that all the symbols have a template. |
# Check that all the symbols have a template. |
253 |
{ |
{ |
254 |
my $in = new Autom4te::XFile ("$tmp/config.hin"); |
my $in = new Autom4te::XFile ("$tmp/config.hin"); |
255 |
|
my $suggest_ac_define = 1; |
256 |
while ($_ = $in->getline) |
while ($_ = $in->getline) |
257 |
{ |
{ |
258 |
my ($symbol) = /^\#\s*\w+\s+(\w+)/ |
my ($symbol) = /^\#\s*\w+\s+(\w+)/ |
262 |
foreach (sort keys %symbol) |
foreach (sort keys %symbol) |
263 |
{ |
{ |
264 |
print STDERR "$me: missing template: $_\n"; |
print STDERR "$me: missing template: $_\n"; |
265 |
|
if ($suggest_ac_define) |
266 |
|
{ |
267 |
|
print STDERR "Use AC_DEFINE([$_], [], [Description])"; |
268 |
|
$suggest_ac_define = 0; |
269 |
|
} |
270 |
|
|
271 |
} |
} |
272 |
exit 1 |
exit 1 |
273 |
if keys %symbol; |
if keys %symbol; |