]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoscan.pl (@kinds, %generic_macro): New.
authorAkim Demaille <akim@epita.fr>
Wed, 24 Jan 2001 07:58:46 +0000 (07:58 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 24 Jan 2001 07:58:46 +0000 (07:58 +0000)
(&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.

ChangeLog
acheaders
autoscan.in
autoscan.pl
bin/autoscan.in
lib/autoscan/headers

index b70eaee51655a05ff621354d40bc18f5fe37ca6a..381f96d5861a5bc1634fda81c2af5d7d33086560 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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
index fce653dca4ea2780557abc3bcc23e61ce3f603b5..1b84723b545f4d2bf219675c622838cbc4ae3949 100644 (file)
--- a/acheaders
+++ b/acheaders
@@ -1,28 +1,75 @@
 # 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
index 327b0d3241e37eb084b336388d428039724182d9..cc0708017650dc53d70c015a1289bef1a2e0b7d6 100644 (file)
@@ -42,6 +42,20 @@ $verbose = 0;
 %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('.');
@@ -171,8 +185,7 @@ sub init_tables
   # 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";
@@ -181,11 +194,12 @@ sub init_tables
          # 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);
@@ -605,12 +619,12 @@ sub check_configure_ac
          # 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])"});
            }
        }
index 327b0d3241e37eb084b336388d428039724182d9..cc0708017650dc53d70c015a1289bef1a2e0b7d6 100644 (file)
@@ -42,6 +42,20 @@ $verbose = 0;
 %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('.');
@@ -171,8 +185,7 @@ sub init_tables
   # 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";
@@ -181,11 +194,12 @@ sub init_tables
          # 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);
@@ -605,12 +619,12 @@ sub check_configure_ac
          # 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])"});
            }
        }
index 327b0d3241e37eb084b336388d428039724182d9..cc0708017650dc53d70c015a1289bef1a2e0b7d6 100644 (file)
@@ -42,6 +42,20 @@ $verbose = 0;
 %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('.');
@@ -171,8 +185,7 @@ sub init_tables
   # 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";
@@ -181,11 +194,12 @@ sub init_tables
          # 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);
@@ -605,12 +619,12 @@ sub check_configure_ac
          # 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])"});
            }
        }
index fce653dca4ea2780557abc3bcc23e61ce3f603b5..1b84723b545f4d2bf219675c622838cbc4ae3949 100644 (file)
@@ -1,28 +1,75 @@
 # 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