bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] prereq.m4 and jm-macros.m4 merge with coreutils


From: Paul Eggert
Subject: [Bug-gnulib] prereq.m4 and jm-macros.m4 merge with coreutils
Date: 16 Aug 2003 22:14:54 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Here is my attempt to merge the prereq.m4 and jm-macros.m4 of gnulib
and coreutils.  This is mostly for documentation, I think, since these
modules are used only by coreutils.  I've installed this into gnulib,
and will soon send a patch to Jim to merge all this stuff back into
coreutils.


2003-08-16  Jim Meyering  <address@hidden>
        and Paul Eggert  <address@hidden>

        Merges from coreutils, etc.

        * prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
        Require every macro that gnulib/modules/* suggests for us.
        (jm_PREREQ_ADDEXT): New macro.
        (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
        Require jm_AC_TYPE_LONG_LONG instead of invoking it.

        * jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
        using the latest version from cvs.  This avoids problems with #line
        directives using a vendor (Sun) compiler.
        (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
        Don't set GETGROUPS_LIB here; now it's
        done via getgroups.m4's wrapper function.
        AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
        rather than just in sh-util/configure.in, so that the
        now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
        same.
        Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
        AC_FUNC_GETLOADAVG where to find getloadavg.c.
        Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
        UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
        gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
        Remove code that is now done by the newly-required macros.
        Append $(EXEEXT) to DF_PROG.
        AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
        Do not invoke or require the following here,
        since prereq.m4 or some gnulib .m4 now does this for us:
        gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
        jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
        jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
        jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
        jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
        AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
        vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
        AC_FUNC_OBSTACK.
        Do not replace the following functions, as this is now the job
        of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
        getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
        strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
        atexit getpass, strdup, getpagesize.
        Replace 'raise'.
        Do not check for the following functions, as this is now the job
        of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
        getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
        setregid.
        (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
        Check for sys/sysctl.h.
        (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
        jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
        of checking for ssize_t ourselves.

Index: prereq.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/prereq.m4,v
retrieving revision 1.59
retrieving revision 1.60
diff -p -u -r1.59 -r1.60
--- prereq.m4   31 Dec 2002 13:43:06 -0000      1.59
+++ prereq.m4   17 Aug 2003 05:08:45 -0000      1.60
@@ -1,31 +1,132 @@
-#serial 27
+#serial 35
 
-dnl These are the prerequisite macros for files in the lib/
-dnl directories of the fileutils, sh-utils, and textutils packages.
+dnl We use jm_ for non Autoconf macros.
+m4_pattern_forbid([^jm_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
+m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
+
+# These are the prerequisite macros for files in the lib/
+# directory of the coreutils package.
 
 AC_DEFUN([jm_PREREQ],
 [
-  gl_BACKUPFILE
-  jm_PREREQ_C_STACK
-  gl_CANON_HOST
-  gl_DIRNAME
-  jm_PREREQ_ERROR
-  gl_EXCLUDE
-  gl_GETPAGESIZE
-  gl_HARD_LOCALE
-  gl_HASH
-  gl_HUMAN
-  gl_MBSWIDTH
-  gl_FUNC_MEMCHR
-  gl_PHYSMEM
-  gl_POSIXVER
-  gl_QUOTEARG
-  gl_READUTMP
-  gl_REGEX
-  jm_PREREQ_STAT
-  gl_FUNC_STRNLEN
-  gl_XGETCWD
-  gl_XREADLINK
+  # We don't yet use c-stack.c.
+  # AC_REQUIRE([gl_C_STACK])
+
+  AC_REQUIRE([AM_FUNC_GETLINE])
+  AC_REQUIRE([AM_STDBOOL_H])
+  AC_REQUIRE([UTILS_FUNC_MKDIR_TRAILING_SLASH])
+  AC_REQUIRE([UTILS_FUNC_MKSTEMP])
+  AC_REQUIRE([gl_BACKUPFILE])
+  AC_REQUIRE([gl_CANON_HOST])
+  AC_REQUIRE([gl_CLOSEOUT])
+  AC_REQUIRE([gl_DIRNAME])
+  AC_REQUIRE([gl_ERROR])
+  AC_REQUIRE([gl_EXCLUDE])
+  AC_REQUIRE([gl_EXITFAIL])
+  AC_REQUIRE([gl_FILEBLOCKS])
+  AC_REQUIRE([gl_FILEMODE])
+  AC_REQUIRE([gl_FILE_TYPE])
+  AC_REQUIRE([gl_FSUSAGE])
+  AC_REQUIRE([gl_FUNC_ALLOCA])
+  AC_REQUIRE([gl_FUNC_ATEXIT])
+  AC_REQUIRE([gl_FUNC_DUP2])
+  AC_REQUIRE([gl_FUNC_EUIDACCESS])
+  AC_REQUIRE([gl_FUNC_FNMATCH_GNU])
+  AC_REQUIRE([gl_FUNC_GETHOSTNAME])
+  AC_REQUIRE([gl_FUNC_GETLOADAVG])
+  AC_REQUIRE([gl_FUNC_GETPASS])
+  AC_REQUIRE([gl_FUNC_GETUSERSHELL])
+  AC_REQUIRE([gl_FUNC_MEMCHR])
+  AC_REQUIRE([gl_FUNC_MEMCPY])
+  AC_REQUIRE([gl_FUNC_MEMMOVE])
+  AC_REQUIRE([gl_FUNC_MEMRCHR])
+  AC_REQUIRE([gl_FUNC_MEMSET])
+  AC_REQUIRE([gl_FUNC_MKTIME])
+  AC_REQUIRE([gl_FUNC_READLINK])
+  AC_REQUIRE([gl_FUNC_RMDIR])
+  AC_REQUIRE([gl_FUNC_RPMATCH])
+  AC_REQUIRE([gl_FUNC_SIG2STR])
+  AC_REQUIRE([gl_FUNC_STPCPY])
+  AC_REQUIRE([gl_FUNC_STRCSPN])
+  AC_REQUIRE([gl_FUNC_STRDUP])
+  AC_REQUIRE([gl_FUNC_STRNDUP])
+  AC_REQUIRE([gl_FUNC_STRNLEN])
+  AC_REQUIRE([gl_FUNC_STRPBRK])
+  AC_REQUIRE([gl_FUNC_STRSTR])
+  AC_REQUIRE([gl_FUNC_STRTOD])
+  AC_REQUIRE([gl_FUNC_STRTOIMAX])
+  AC_REQUIRE([gl_FUNC_STRTOLL])
+  AC_REQUIRE([gl_FUNC_STRTOL])
+  AC_REQUIRE([gl_FUNC_STRTOULL])
+  AC_REQUIRE([gl_FUNC_STRTOUL])
+  AC_REQUIRE([gl_FUNC_STRTOUMAX])
+  AC_REQUIRE([gl_FUNC_STRVERSCMP])
+  AC_REQUIRE([gl_FUNC_VASNPRINTF])
+  AC_REQUIRE([gl_FUNC_VASPRINTF])
+  AC_REQUIRE([gl_GETDATE])
+  AC_REQUIRE([gl_GETNDELIM2])
+  AC_REQUIRE([gl_GETOPT])
+  AC_REQUIRE([gl_GETPAGESIZE])
+  AC_REQUIRE([gl_HARD_LOCALE])
+  AC_REQUIRE([gl_HASH])
+  AC_REQUIRE([gl_HUMAN])
+  AC_REQUIRE([gl_MBSWIDTH])
+  AC_REQUIRE([gl_MEMCOLL])
+  AC_REQUIRE([gl_MODECHANGE])
+  AC_REQUIRE([gl_MOUNTLIST])
+  AC_REQUIRE([gl_OBSTACK])
+  AC_REQUIRE([gl_PATHMAX])
+  AC_REQUIRE([gl_PATH_CONCAT])
+  AC_REQUIRE([gl_PHYSMEM])
+  AC_REQUIRE([gl_POSIXTM])
+  AC_REQUIRE([gl_POSIXVER])
+  AC_REQUIRE([gl_QUOTEARG])
+  AC_REQUIRE([gl_QUOTE])
+  AC_REQUIRE([gl_READUTMP])
+  AC_REQUIRE([gl_REGEX])
+  AC_REQUIRE([gl_SAFE_READ])
+  AC_REQUIRE([gl_SAFE_WRITE])
+  AC_REQUIRE([gl_SAME])
+  AC_REQUIRE([gl_SAVEDIR])
+  AC_REQUIRE([gl_SAVE_CWD])
+  AC_REQUIRE([gl_SETTIME])
+  AC_REQUIRE([gl_SHA])
+  AC_REQUIRE([gl_STDIO_SAFER])
+  AC_REQUIRE([gl_STRCASE])
+  AC_REQUIRE([gl_TIMESPEC])
+  AC_REQUIRE([gl_UNICODEIO])
+  AC_REQUIRE([gl_UNISTD_SAFER])
+  AC_REQUIRE([gl_USERSPEC])
+  AC_REQUIRE([gl_UTIMENS])
+  AC_REQUIRE([gl_XALLOC])
+  AC_REQUIRE([gl_XGETCWD])
+  AC_REQUIRE([gl_XREADLINK])
+  AC_REQUIRE([gl_XSTRTOD])
+  AC_REQUIRE([gl_XSTRTOL])
+  AC_REQUIRE([gl_YESNO])
+  AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
+  AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
+  AC_REQUIRE([jm_FUNC_LSTAT])
+  AC_REQUIRE([jm_FUNC_MALLOC])
+  AC_REQUIRE([jm_FUNC_MEMCMP])
+  AC_REQUIRE([jm_FUNC_NANOSLEEP])
+  AC_REQUIRE([jm_FUNC_PUTENV])
+  AC_REQUIRE([jm_FUNC_REALLOC])
+  AC_REQUIRE([jm_FUNC_STAT])
+  AC_REQUIRE([jm_FUNC_UTIME])
+  AC_REQUIRE([jm_PREREQ_ADDEXT])
+  AC_REQUIRE([jm_PREREQ_STAT])
+  AC_REQUIRE([jm_XSTRTOIMAX])
+  AC_REQUIRE([jm_XSTRTOUMAX])
+  AC_REQUIRE([vb_FUNC_RENAME])
+])
+
+AC_DEFUN([jm_PREREQ_ADDEXT],
+[
+  dnl For addext.c.
+  AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
+  AC_CHECK_FUNCS(pathconf)
+  AC_CHECK_HEADERS(limits.h string.h unistd.h)
 ])
 
 AC_DEFUN([jm_PREREQ_STAT],
@@ -33,7 +134,12 @@ AC_DEFUN([jm_PREREQ_STAT],
   AC_CHECK_HEADERS(sys/sysmacros.h sys/statvfs.h sys/vfs.h inttypes.h)
   AC_CHECK_HEADERS(sys/param.h sys/mount.h)
   AC_CHECK_FUNCS(statvfs)
-  jm_AC_TYPE_LONG_LONG
+
+  # For `struct statfs' on Ultrix 4.4.
+  AC_CHECK_HEADERS([netinet/in.h nfs/nfs_clnt.h nfs/vfs.h],,,
+    [AC_INCLUDES_DEFAULT])
+
+  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
 
   statxfs_includes="\
 $ac_includes_default
@@ -43,10 +149,17 @@ $ac_includes_default
 #if HAVE_SYS_VFS_H
 # include <sys/vfs.h>
 #endif
-#if ( ! HAVE_SYS_STATVFS_H && ! HAVE_SYS_VFS_H && HAVE_SYS_MOUNT_H && 
HAVE_SYS_PARAM_H )
+#if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
+# if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
 /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
-# include <sys/param.h>
-# include <sys/mount.h>
+#  include <sys/param.h>
+#  include <sys/mount.h>
+# elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
+/* Ultrix 4.4 needs these for the declaration of struct statfs.  */
+#  include <netinet/in.h>
+#  include <nfs/nfs_clnt.h>
+#  include <nfs/vfs.h>
+# endif
 #endif
 "
   AC_CHECK_MEMBERS([struct statfs.f_basetype],,,[$statxfs_includes])
Index: jm-macros.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/jm-macros.m4,v
retrieving revision 1.144
retrieving revision 1.145
diff -p -u -r1.144 -r1.145
--- jm-macros.m4        31 Dec 2002 13:43:06 -0000      1.144
+++ jm-macros.m4        17 Aug 2003 05:08:45 -0000      1.145
@@ -1,10 +1,28 @@
-#serial 49   -*- autoconf -*-
+#serial 67   -*- autoconf -*-
+
+m4_undefine([AC_LANG_SOURCE(C)])
+dnl The following is identical to the definition in c.m4
+dnl from the autoconf cvs repository on 2003-03-07.
+dnl FIXME: remove this code once we upgrade to autoconf-2.58.
+
+# We can't use '#line $LINENO "configure"' here, since
+# Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09)
+# rejects $LINENO greater than 32767, and some configure scripts
+# are longer than 32767 lines.
+m4_define([AC_LANG_SOURCE(C)],
+[/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$1])
+
 
 dnl Misc type-related macros for fileutils, sh-utils, textutils.
 
 AC_DEFUN([jm_MACROS],
 [
-  AC_PREREQ(2.52g)
+  AC_PREREQ(2.57)
 
   GNU_PACKAGE="GNU $PACKAGE"
   AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
@@ -13,7 +31,6 @@ AC_DEFUN([jm_MACROS],
 
   AM_MISSING_PROG(HELP2MAN, help2man)
   AC_SUBST(OPTIONAL_BIN_PROGS)
-  AC_SUBST(OPTIONAL_BIN_ZCRIPTS)
   AC_SUBST(MAN)
   AC_SUBST(DF_PROG)
 
@@ -21,11 +38,8 @@ AC_DEFUN([jm_MACROS],
   AC_REQUIRE([AC_ISC_POSIX])dnl
 
   jm_CHECK_ALL_TYPES
-  gl_REGEX
 
   AC_REQUIRE([UTILS_HOST_OS])
-  AC_REQUIRE([UTILS_FUNC_MKDIR_TRAILING_SLASH])
-  AC_REQUIRE([jm_BISON])
   AC_REQUIRE([jm_ASSERT])
   AC_REQUIRE([jm_CHECK_TYPE_STRUCT_UTIMBUF])
   AC_REQUIRE([jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
@@ -36,59 +50,34 @@ AC_DEFUN([jm_MACROS],
 
   AC_REQUIRE([UTILS_FUNC_DIRFD])
   AC_REQUIRE([AC_FUNC_ACL])
+  AC_REQUIRE([AC_FUNC_FTW])
   AC_REQUIRE([jm_FUNC_LCHOWN])
   AC_REQUIRE([fetish_FUNC_RMDIR_NOTEMPTY])
   AC_REQUIRE([jm_FUNC_CHOWN])
-  AC_REQUIRE([gl_FUNC_MKTIME])
-  AC_REQUIRE([jm_FUNC_LSTAT])
   AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-  AC_REQUIRE([jm_FUNC_STAT])
-  AC_REQUIRE([jm_FUNC_REALLOC])
-  AC_REQUIRE([jm_FUNC_MALLOC])
   AC_REQUIRE([AC_FUNC_STRERROR_R])
-  AC_REQUIRE([jm_FUNC_NANOSLEEP])
-  AC_REQUIRE([jm_FUNC_READDIR])
-  AC_REQUIRE([jm_FUNC_MEMCMP])
-  AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
-  AC_REQUIRE([AC_FUNC_FNMATCH_GNU])
   AC_REQUIRE([jm_FUNC_GROUP_MEMBER])
-  AC_REQUIRE([jm_FUNC_PUTENV])
   AC_REQUIRE([jm_AFS])
-  AC_REQUIRE([jm_AC_PREREQ_XSTRTOUMAX])
-  AC_REQUIRE([jm_AC_PREREQ_XSTRTOIMAX])
   AC_REQUIRE([jm_AC_FUNC_LINK_FOLLOWS_SYMLINK])
-  AC_REQUIRE([AC_FUNC_ERROR_AT_LINE])
-  AC_REQUIRE([jm_FUNC_GNU_STRFTIME])
   AC_REQUIRE([jm_FUNC_FPENDING])
 
+  # This is for od and stat, and any other program that
+  # uses the PRI.MAX macros from inttypes.h.
+  AC_REQUIRE([gt_INTTYPES_PRI])
+
   AC_REQUIRE([jm_FUNC_GETGROUPS])
-  test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
 
   AC_REQUIRE([AC_FUNC_FSEEKO])
-  AC_REQUIRE([AC_FUNC_VPRINTF])
   AC_REQUIRE([AC_FUNC_ALLOCA])
+
+  AC_CONFIG_LIBOBJ_DIR([lib])
   AC_FUNC_GETLOADAVG([lib])
+
   AC_REQUIRE([jm_SYS_PROC_UPTIME])
   AC_REQUIRE([jm_FUNC_FTRUNCATE])
-  AC_REQUIRE([vb_FUNC_RENAME])
-
-  AC_REPLACE_FUNCS(strcasecmp strncasecmp)
-  AC_REPLACE_FUNCS(dup2)
-  AC_REPLACE_FUNCS(gethostname getusershell)
-  AC_REPLACE_FUNCS(sig2str)
-  AC_REPLACE_FUNCS(strcspn stpcpy strstr strtol strtoul)
-  AC_REPLACE_FUNCS(strpbrk)
-  AC_REPLACE_FUNCS(euidaccess memcmp rmdir rpmatch strndup strverscmp)
-  AC_REPLACE_FUNCS(atexit)
-  AC_REPLACE_FUNCS(getpass)
 
-  dnl used by e.g. intl/*domain.c and lib/canon-host.c
-  AC_REPLACE_FUNCS(strdup)
-
-  AC_REPLACE_FUNCS(memchr memcpy memmove memrchr memset)
-  AC_CHECK_FUNCS(getpagesize)
-
-  AC_REQUIRE([UTILS_FUNC_MKSTEMP])
+  # raise is used by at least sort and ls.
+  AC_REPLACE_FUNCS(raise)
 
   # By default, argmatch should fail calling usage (1).
   AC_DEFINE(ARGMATCH_DIE, [usage (1)],
@@ -102,36 +91,18 @@ AC_DEFUN([jm_MACROS],
   AC_FUNC_SETVBUF_REVERSED
 
   # used by sleep and shred
-  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
-  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
-
-  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
-  # programs in the package would end up linked with that potentially-shared
-  # library, inducing unnecessary run-time overhead.
-  fetish_saved_libs=$LIBS
-    AC_SEARCH_LIBS(clock_gettime, [rt posix4],
-                  [LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
-    AC_SUBST(LIB_CLOCK_GETTIME)
-    AC_CHECK_FUNCS(clock_gettime clock_settime)
-  LIBS=$fetish_saved_libs
+  AC_REQUIRE([gl_CLOCK_TIME])
   AC_CHECK_FUNCS(gettimeofday)
   AC_FUNC_GETTIMEOFDAY_CLOBBER
 
   AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
-  AC_REQUIRE([jm_FUNC_UTIME])
 
   AC_CHECK_FUNCS( \
-    bcopy \
-    canonicalize_file_name \
     endgrent \
     endpwent \
-    fchdir \
     fdatasync \
-    ftime \
     ftruncate \
-    getcwd \
     gethrtime \
-    getmntinfo \
     hasmntopt \
     isascii \
     iswspace \
@@ -142,23 +113,23 @@ AC_DEFUN([jm_MACROS],
     mempcpy \
     mkfifo \
     realpath \
-    resolvepath \
     sethostname \
     strchr \
     strerror \
     strrchr \
+    sysctl \
     sysinfo \
     wcrtomb \
     tzset \
   )
 
-  AM_FUNC_GETLINE
-  if test $am_cv_func_working_getline != yes; then
-    AC_CHECK_FUNCS(getdelim)
-  fi
-  AC_FUNC_OBSTACK
+  # for test.c
+  AC_CHECK_FUNCS(setreuid setregid)
 
   AC_FUNC_STRTOD
+  AC_REQUIRE([UTILS_SYS_OPEN_MAX])
+  AC_REQUIRE([GL_FUNC_GETCWD_PATH_MAX])
+  AC_REQUIRE([GL_FUNC_READDIR])
 
   # See if linking `seq' requires -lm.
   # It does on nearly every system.  The single exception (so far) is
@@ -184,16 +155,18 @@ AC_DEFUN([jm_MACROS],
   jm_FUNC_UNLINK_BUSY_TEXT
 
   # These tests are for df.
-  jm_LIST_MOUNTED_FILESYSTEMS([list_mounted_fs=yes], [list_mounted_fs=no])
-  jm_FSTYPENAME
-  jm_FILE_SYSTEM_USAGE([space=yes], [space=no])
-  if test $list_mounted_fs = yes && test $space = yes; then
-    DF_PROG=df
-    AC_LIBOBJ(fsusage)
-    AC_LIBOBJ(mountlist)
+  AC_REQUIRE([gl_FSUSAGE])
+  AC_REQUIRE([gl_MOUNTLIST])
+  if test $gl_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
+    DF_PROG='df$(EXEEXT)'
   fi
   AC_REQUIRE([jm_AC_DOS])
+  AC_REQUIRE([AC_FUNC_CANONICALIZE_FILE_NAME])
 
+  # If any of these functions don't exist (e.g. DJGPP 2.03),
+  # use the corresponding stub.
+  AC_CHECK_FUNC([fchdir], , [AC_LIBOBJ(fchdir-stub)])
+  AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)])
 ])
 
 # These tests must be run before any use of AC_CHECK_TYPE,
@@ -204,7 +177,6 @@ AC_DEFUN([jm_CHECK_ALL_HEADERS],
   AC_CHECK_HEADERS( \
     errno.h  \
     fcntl.h \
-    fenv.h \
     float.h \
     hurd.h \
     limits.h \
@@ -229,6 +201,7 @@ AC_DEFUN([jm_CHECK_ALL_HEADERS],
     sys/socket.h \
     sys/statfs.h \
     sys/statvfs.h \
+    sys/sysctl.h \
     sys/systeminfo.h \
     sys/time.h \
     sys/timeb.h \
@@ -273,12 +246,9 @@ AC_DEFUN([jm_CHECK_ALL_TYPES],
   ])
   AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
 
-  AC_REQUIRE([AC_STRUCT_TM])
-  AC_REQUIRE([AC_STRUCT_TIMEZONE])
   AC_REQUIRE([AC_HEADER_STAT])
   AC_REQUIRE([AC_STRUCT_ST_MTIM_NSEC])
   AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
-  AC_REQUIRE([jm_CHECK_TYPE_STRUCT_TIMESPEC])
 
   AC_REQUIRE([AC_TYPE_GETGROUPS])
   AC_REQUIRE([AC_TYPE_MODE_T])
@@ -289,9 +259,10 @@ AC_DEFUN([jm_CHECK_ALL_TYPES],
   AC_REQUIRE([AC_TYPE_UID_T])
   AC_CHECK_TYPE(ino_t, unsigned long)
 
+  gt_TYPE_SSIZE_T
+
   dnl This relies on the fact that autoconf 2.14a's implementation of
   dnl AC_CHECK_TYPE checks includes unistd.h.
-  AC_CHECK_TYPE(ssize_t, int)
   AC_CHECK_TYPE(major_t, unsigned int)
   AC_CHECK_TYPE(minor_t, unsigned int)
 




reply via email to

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