(&init_tables): Use them.
* acheaders: Run `autoconf -t AC_CHECK_HEADERS:'$1'' on the fileutils,
and include all these headers in here.
Don't specify `AC_CHECK_HEADERS' as it's the default.
+2001-01-24 Akim Demaille <akim@epita.fr>
+
+ * autoscan.pl (@kinds, %generic_macro): New.
+ (&init_tables): Use them.
+ * acheaders: Run `autoconf -t AC_CHECK_HEADERS:'$1'' on the fileutils,
+ and include all these headers in here.
+ Don't specify `AC_CHECK_HEADERS' as it's the default.
+
2001-01-24 Akim Demaille <akim@epita.fr>
* autoscan.pl: Just like the previous patch, but for
# Ones that have their own macros.
+X11/Xlib.h AC_PATH_X
dirent.h AC_HEADER_DIRENT
-sys/ndir.h AC_HEADER_DIRENT
-sys/dir.h AC_HEADER_DIRENT
+float.h AC_HEADER_STDC
ndir.h AC_HEADER_DIRENT
-sys/mkdev.h AC_HEADER_MAJOR
-string.h AC_HEADER_STDC
-stdlib.h AC_HEADER_STDC
-stddef.h AC_HEADER_STDC
stdarg.h AC_HEADER_STDC
-float.h AC_HEADER_STDC
+stddef.h AC_HEADER_STDC
+stdlib.h AC_HEADER_STDC
+string.h AC_HEADER_STDC
+sys/dir.h AC_HEADER_DIRENT
+sys/mkdev.h AC_HEADER_MAJOR
+sys/ndir.h AC_HEADER_DIRENT
sys/wait.h AC_HEADER_SYS_WAIT
-X11/Xlib.h AC_PATH_X
-# Others.
-fcntl.h AC_CHECK_HEADERS
-limits.h AC_CHECK_HEADERS
-malloc.h AC_CHECK_HEADERS
-paths.h AC_CHECK_HEADERS
-sgtty.h AC_CHECK_HEADERS
-strings.h AC_CHECK_HEADERS
-sys/file.h AC_CHECK_HEADERS
-sys/ioctl.h AC_CHECK_HEADERS
-sys/time.h AC_CHECK_HEADERS
-sys/window.h AC_CHECK_HEADERS
-syslog.h AC_CHECK_HEADERS
-termio.h AC_CHECK_HEADERS
-unistd.h AC_CHECK_HEADERS
+# Others, to checked with AC_CHECK_HEADERS.
+OS.h
+alloca.h
+argz.h
+arpa/inet.h
+errno.h
+fcntl.h
+fenv.h
+float.h
+fs_info.h
+inttypes.h
+langinfo.h
+libintl.h
+limits.h
+locale.h
+mach/mach.h
+malloc.h
+memory.h
+mntent.h
+mnttab.h
+netdb.h
+netinet/in.h
+nl_types.h
+nlist.h
+paths.h
+sgtty.h
+shadow.h
+stddef.h
+stdio_ext.h
+stdlib.h
+string.h
+strings.h
+sys/acl.h
+sys/file.h
+sys/filsys.h
+sys/fs/s5param.h
+sys/fs_types.h
+sys/fstyp.h
+sys/ioctl.h
+sys/mntent.h
+sys/mount.h
+sys/param.h
+sys/socket.h
+sys/statfs.h
+sys/statvfs.h
+sys/systeminfo.h
+sys/time.h
+sys/timeb.h
+sys/vfs.h
+sys/wait.h
+sys/window.h
+syslog.h
+termio.h
+termios.h
+unistd.h
+utime.h
+utmp.h
+utmpx.h
+values.h
+wchar.h
+wctype.h
%programs_macros = ();
%needed_macros = ();
+my @kinds =
+ ('functions', 'headers', 'identifiers', 'programs', 'makevars');
+
+# For each kind, the default macro.
+my %generic_macro =
+ (
+ "functions" => "AC_CHECK_FUNCTIONS",
+ "headers" => "AC_CHECK_HEADERS",
+ "identifiers" => "AC_CHECK_TYPES",
+ "programs" => "AC_CHECK_PROGS"
+ );
+
+
+
&parse_args;
&init_tables;
&find('.');
# a new Autoconf macro should probably be written for that case,
# instead of duplicating the code in lots of configure.ac files.
- foreach $kind ('functions', 'headers', 'identifiers', 'programs',
- 'makevars')
+ foreach $kind (@kinds)
{
open(TABLE, "<$datadir/ac$kind") ||
die "$me: cannot open $datadir/ac$kind: $!\n";
# Ignore blank lines and comments.
next
if /^\s*$/ || /^\s*\#/;
- unless (/^(\S+)\s+(\S.*)$/)
+ unless (/^(\S+)\s+(\S.*)$/ || /^(\S+)\s*$/)
{
die "$me: cannot parse definition in $datadir/ac$kind:\n$_\n";
}
- ($word, $macro) = ($1, $2);
+ $word = $1;
+ $macro = $2 || $generic_macro{$kind};
eval "\$$kind" . "_macros{\$word} = \$macro";
}
close(TABLE);
# separated macros. But there is no point.
foreach $word (split (/\s|,/, $args[0]))
{
+ # AC_CHECK_MEMBERS wants `struct' or `union'.
if ($macro eq "AC_CHECK_MEMBERS"
&& $word =~ /^stat.st_/)
{
$word = "struct " . $word;
}
- print STDERR "DELETE: $macro($word)\n";
delete ($needed_macros{"$macro([$word])"});
}
}
%programs_macros = ();
%needed_macros = ();
+my @kinds =
+ ('functions', 'headers', 'identifiers', 'programs', 'makevars');
+
+# For each kind, the default macro.
+my %generic_macro =
+ (
+ "functions" => "AC_CHECK_FUNCTIONS",
+ "headers" => "AC_CHECK_HEADERS",
+ "identifiers" => "AC_CHECK_TYPES",
+ "programs" => "AC_CHECK_PROGS"
+ );
+
+
+
&parse_args;
&init_tables;
&find('.');
# a new Autoconf macro should probably be written for that case,
# instead of duplicating the code in lots of configure.ac files.
- foreach $kind ('functions', 'headers', 'identifiers', 'programs',
- 'makevars')
+ foreach $kind (@kinds)
{
open(TABLE, "<$datadir/ac$kind") ||
die "$me: cannot open $datadir/ac$kind: $!\n";
# Ignore blank lines and comments.
next
if /^\s*$/ || /^\s*\#/;
- unless (/^(\S+)\s+(\S.*)$/)
+ unless (/^(\S+)\s+(\S.*)$/ || /^(\S+)\s*$/)
{
die "$me: cannot parse definition in $datadir/ac$kind:\n$_\n";
}
- ($word, $macro) = ($1, $2);
+ $word = $1;
+ $macro = $2 || $generic_macro{$kind};
eval "\$$kind" . "_macros{\$word} = \$macro";
}
close(TABLE);
# separated macros. But there is no point.
foreach $word (split (/\s|,/, $args[0]))
{
+ # AC_CHECK_MEMBERS wants `struct' or `union'.
if ($macro eq "AC_CHECK_MEMBERS"
&& $word =~ /^stat.st_/)
{
$word = "struct " . $word;
}
- print STDERR "DELETE: $macro($word)\n";
delete ($needed_macros{"$macro([$word])"});
}
}
%programs_macros = ();
%needed_macros = ();
+my @kinds =
+ ('functions', 'headers', 'identifiers', 'programs', 'makevars');
+
+# For each kind, the default macro.
+my %generic_macro =
+ (
+ "functions" => "AC_CHECK_FUNCTIONS",
+ "headers" => "AC_CHECK_HEADERS",
+ "identifiers" => "AC_CHECK_TYPES",
+ "programs" => "AC_CHECK_PROGS"
+ );
+
+
+
&parse_args;
&init_tables;
&find('.');
# a new Autoconf macro should probably be written for that case,
# instead of duplicating the code in lots of configure.ac files.
- foreach $kind ('functions', 'headers', 'identifiers', 'programs',
- 'makevars')
+ foreach $kind (@kinds)
{
open(TABLE, "<$datadir/ac$kind") ||
die "$me: cannot open $datadir/ac$kind: $!\n";
# Ignore blank lines and comments.
next
if /^\s*$/ || /^\s*\#/;
- unless (/^(\S+)\s+(\S.*)$/)
+ unless (/^(\S+)\s+(\S.*)$/ || /^(\S+)\s*$/)
{
die "$me: cannot parse definition in $datadir/ac$kind:\n$_\n";
}
- ($word, $macro) = ($1, $2);
+ $word = $1;
+ $macro = $2 || $generic_macro{$kind};
eval "\$$kind" . "_macros{\$word} = \$macro";
}
close(TABLE);
# separated macros. But there is no point.
foreach $word (split (/\s|,/, $args[0]))
{
+ # AC_CHECK_MEMBERS wants `struct' or `union'.
if ($macro eq "AC_CHECK_MEMBERS"
&& $word =~ /^stat.st_/)
{
$word = "struct " . $word;
}
- print STDERR "DELETE: $macro($word)\n";
delete ($needed_macros{"$macro([$word])"});
}
}
# Ones that have their own macros.
+X11/Xlib.h AC_PATH_X
dirent.h AC_HEADER_DIRENT
-sys/ndir.h AC_HEADER_DIRENT
-sys/dir.h AC_HEADER_DIRENT
+float.h AC_HEADER_STDC
ndir.h AC_HEADER_DIRENT
-sys/mkdev.h AC_HEADER_MAJOR
-string.h AC_HEADER_STDC
-stdlib.h AC_HEADER_STDC
-stddef.h AC_HEADER_STDC
stdarg.h AC_HEADER_STDC
-float.h AC_HEADER_STDC
+stddef.h AC_HEADER_STDC
+stdlib.h AC_HEADER_STDC
+string.h AC_HEADER_STDC
+sys/dir.h AC_HEADER_DIRENT
+sys/mkdev.h AC_HEADER_MAJOR
+sys/ndir.h AC_HEADER_DIRENT
sys/wait.h AC_HEADER_SYS_WAIT
-X11/Xlib.h AC_PATH_X
-# Others.
-fcntl.h AC_CHECK_HEADERS
-limits.h AC_CHECK_HEADERS
-malloc.h AC_CHECK_HEADERS
-paths.h AC_CHECK_HEADERS
-sgtty.h AC_CHECK_HEADERS
-strings.h AC_CHECK_HEADERS
-sys/file.h AC_CHECK_HEADERS
-sys/ioctl.h AC_CHECK_HEADERS
-sys/time.h AC_CHECK_HEADERS
-sys/window.h AC_CHECK_HEADERS
-syslog.h AC_CHECK_HEADERS
-termio.h AC_CHECK_HEADERS
-unistd.h AC_CHECK_HEADERS
+# Others, to checked with AC_CHECK_HEADERS.
+OS.h
+alloca.h
+argz.h
+arpa/inet.h
+errno.h
+fcntl.h
+fenv.h
+float.h
+fs_info.h
+inttypes.h
+langinfo.h
+libintl.h
+limits.h
+locale.h
+mach/mach.h
+malloc.h
+memory.h
+mntent.h
+mnttab.h
+netdb.h
+netinet/in.h
+nl_types.h
+nlist.h
+paths.h
+sgtty.h
+shadow.h
+stddef.h
+stdio_ext.h
+stdlib.h
+string.h
+strings.h
+sys/acl.h
+sys/file.h
+sys/filsys.h
+sys/fs/s5param.h
+sys/fs_types.h
+sys/fstyp.h
+sys/ioctl.h
+sys/mntent.h
+sys/mount.h
+sys/param.h
+sys/socket.h
+sys/statfs.h
+sys/statvfs.h
+sys/systeminfo.h
+sys/time.h
+sys/timeb.h
+sys/vfs.h
+sys/wait.h
+sys/window.h
+syslog.h
+termio.h
+termios.h
+unistd.h
+utime.h
+utmp.h
+utmpx.h
+values.h
+wchar.h
+wctype.h