mirror of
git://git.sv.gnu.org/autoconf
synced 2025-03-19 14:40:24 +08:00
* autoscan.in (&scan_makefile): Improve programs regexp to parse
things like "g++", "file.c" and "some-conf" as tokens. (&scan_file): Match C++ files extensions. If the filename extension is C++ then ask for c++.
This commit is contained in:
parent
c88e42ae6f
commit
d026b456c5
@ -1,3 +1,10 @@
|
||||
2001-07-10 Jens Petersen <petersen@redhat.com>
|
||||
|
||||
* autoscan.in (&scan_makefile): Improve programs regexp to parse
|
||||
things like "g++", "file.c" and "some-conf" as tokens.
|
||||
(&scan_file): Match C++ files extensions.
|
||||
If the filename extension is C++ then ask for c++.
|
||||
|
||||
2001-07-05 Steven G. Johnson <stevenj@alum.mit.edu>
|
||||
|
||||
* aclang.m4 (AC_F77_DUMMY_MAIN): Use AC_TRY_LINK, not
|
||||
|
@ -26,6 +26,7 @@ cc AC_PROG_CC
|
||||
gcc AC_PROG_CC
|
||||
cpp AC_PROG_CPP
|
||||
CC AC_PROG_CXX
|
||||
c++ AC_PROG_CXX
|
||||
g++ AC_PROG_CXX
|
||||
install AC_PROG_INSTALL
|
||||
lex AC_PROG_LEX
|
||||
|
11
autoscan.in
11
autoscan.in
@ -265,7 +265,6 @@ sub scan_c_file ($)
|
||||
my ($file) = @_;
|
||||
|
||||
push (@cfiles, $File::Find::name);
|
||||
push (@{$used{'programs'}{"cc"}}, $File::Find::name);
|
||||
|
||||
# Nonzero if in a multiline comment.
|
||||
my $in_comment = 0;
|
||||
@ -346,7 +345,7 @@ sub scan_makefile ($)
|
||||
push (@{$used{'libraries'}{$1}}, "$File::Find::name:$.");
|
||||
}
|
||||
# Tokens in the code.
|
||||
while (s/\b([a-zA-Z_]\w*)\b/ /)
|
||||
while (s/\b([a-zA-Z_][\w\+\.-]+)/ /)
|
||||
{
|
||||
push (@{$used{'programs'}{$1}}, "$File::Find::name:$.");
|
||||
}
|
||||
@ -396,8 +395,14 @@ sub scan_file ()
|
||||
# Strip a useless leading `./'.
|
||||
$File::Find::name =~ s,^\./,,;
|
||||
|
||||
if (/\.[chlymC](\.in)?$/ || /\.cc(\.in)?$/)
|
||||
if (/\.[chlym](\.in)?$/)
|
||||
{
|
||||
push (@{$used{'programs'}{"cc"}}, $File::Find::name);
|
||||
scan_c_file ($_);
|
||||
}
|
||||
elsif (/\.(cc|cpp|cxx|CC|C|hh|hpp|hxx|HH|H|yy|ypp|ll|lpp)(\.in)?$/)
|
||||
{
|
||||
push (@{$used{'programs'}{"c++"}}, $File::Find::name);
|
||||
scan_c_file ($_);
|
||||
}
|
||||
elsif (/^[Mm]akefile(\.in)?$/ || /^GNUmakefile(\.in)?$/)
|
||||
|
@ -265,7 +265,6 @@ sub scan_c_file ($)
|
||||
my ($file) = @_;
|
||||
|
||||
push (@cfiles, $File::Find::name);
|
||||
push (@{$used{'programs'}{"cc"}}, $File::Find::name);
|
||||
|
||||
# Nonzero if in a multiline comment.
|
||||
my $in_comment = 0;
|
||||
@ -346,7 +345,7 @@ sub scan_makefile ($)
|
||||
push (@{$used{'libraries'}{$1}}, "$File::Find::name:$.");
|
||||
}
|
||||
# Tokens in the code.
|
||||
while (s/\b([a-zA-Z_]\w*)\b/ /)
|
||||
while (s/\b([a-zA-Z_][\w\+\.-]+)/ /)
|
||||
{
|
||||
push (@{$used{'programs'}{$1}}, "$File::Find::name:$.");
|
||||
}
|
||||
@ -396,8 +395,14 @@ sub scan_file ()
|
||||
# Strip a useless leading `./'.
|
||||
$File::Find::name =~ s,^\./,,;
|
||||
|
||||
if (/\.[chlymC](\.in)?$/ || /\.cc(\.in)?$/)
|
||||
if (/\.[chlym](\.in)?$/)
|
||||
{
|
||||
push (@{$used{'programs'}{"cc"}}, $File::Find::name);
|
||||
scan_c_file ($_);
|
||||
}
|
||||
elsif (/\.(cc|cpp|cxx|CC|C|hh|hpp|hxx|HH|H|yy|ypp|ll|lpp)(\.in)?$/)
|
||||
{
|
||||
push (@{$used{'programs'}{"c++"}}, $File::Find::name);
|
||||
scan_c_file ($_);
|
||||
}
|
||||
elsif (/^[Mm]akefile(\.in)?$/ || /^GNUmakefile(\.in)?$/)
|
||||
|
@ -26,6 +26,7 @@ cc AC_PROG_CC
|
||||
gcc AC_PROG_CC
|
||||
cpp AC_PROG_CPP
|
||||
CC AC_PROG_CXX
|
||||
c++ AC_PROG_CXX
|
||||
g++ AC_PROG_CXX
|
||||
install AC_PROG_INSTALL
|
||||
lex AC_PROG_LEX
|
||||
|
Loading…
x
Reference in New Issue
Block a user