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-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
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
my ($file) = @_;
push (@cfiles, $File::Find::name);
- push (@{$used{'programs'}{"cc"}}, $File::Find::name);
# Nonzero if in a multiline comment.
my $in_comment = 0;
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:$.");
}
# 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)?$/)
my ($file) = @_;
push (@cfiles, $File::Find::name);
- push (@{$used{'programs'}{"cc"}}, $File::Find::name);
# Nonzero if in a multiline comment.
my $in_comment = 0;
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:$.");
}
# 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)?$/)
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