autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

27-autoscan-acheaders.patch


From: Akim Demaille
Subject: 27-autoscan-acheaders.patch
Date: Tue, 23 Jan 2001 21:55:18 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * 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.

Index: acheaders
--- acheaders Fri, 17 Sep 1999 22:50:06 +0200 akim (ace/22_acheaders 1.1 666)
+++ acheaders Tue, 23 Jan 2001 21:42:37 +0100 akim (ace/22_acheaders 1.1 666)
@@ -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: autoscan.pl
--- autoscan.pl Tue, 23 Jan 2001 21:28:15 +0100 akim (ace/13_autoscan.p 1.28 
664)
+++ autoscan.pl Tue, 23 Jan 2001 21:43:36 +0100 akim (ace/13_autoscan.p 1.28 
664)
@@ -42,6 +42,20 @@
 %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])"});
            }
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]