+ # 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)
+ LIBS=$fetish_saved_libs
+ AC_CHECK_FUNCS(gettimeofday)
+
+ AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
+ AC_REQUIRE([jm_FUNC_UTIME])
+
+ AC_CHECK_FUNCS( \
+ acl \
+ bcopy \
+ endgrent \
+ endpwent \
+ fchdir \
+ fdatasync \
+ fseeko \
+ ftime \
+ ftruncate \
+ getcwd \
+ gethrtime \
+ getmntinfo \
+ hasmntopt \
+ isascii \
+ lchown \
+ listmntent \
+ localeconv \
+ memcpy \
+ mempcpy \
+ mkfifo \
+ realpath \
+ resolvepath \
+ sethostname \
+ strchr \
+ strerror \
+ strrchr \
+ sysinfo \
+ wcrtomb \
+ tzset \
+ )
+
+ AM_FUNC_GETLINE
+ if test $am_cv_func_working_getline != yes; then
+ AC_CHECK_FUNCS(getdelim)
+ fi
+ AM_FUNC_OBSTACK
+
+ AM_FUNC_STRTOD
+ AC_SUBST(POW_LIBM)
+ test $am_cv_func_strtod_needs_libm = yes && POW_LIBM=-lm
+
+ # See if linking `seq' requires -lm.
+ # It does on nearly every system. The single exception (so far) is
+ # BeOS which has all the math functions in the normal runtime library
+ # and doesn't have a separate math library.
+
+ AC_SUBST(SEQ_LIBM)
+ ac_seq_body='
+ static double x, y;
+ x = floor (x);
+ x = rint (x);
+ x = modf (x, &y);'
+ AC_TRY_LINK([#include <math.h>], $ac_seq_body, ,
+ [ac_seq_save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>], $ac_seq_body, SEQ_LIBM=-lm)
+ LIBS="$ac_seq_save_LIBS"
+ ])
+
+ jm_LANGINFO_CODESET
+ jm_GLIBC21
+ jm_ICONV
+ 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)
+ fi
+ AC_REQUIRE([jm_AC_DOS])
+
+])
+
+# These tests must be run before any use of AC_CHECK_TYPE,
+# because that macro compiles code that tests e.g., HAVE_UNISTD_H.
+# See the definition of ac_includes_default in `configure'.
+AC_DEFUN(jm_CHECK_ALL_HEADERS,
+[
+ AC_CHECK_HEADERS( \
+ errno.h \
+ fcntl.h \
+ fenv.h \
+ float.h \
+ limits.h \
+ memory.h \
+ mntent.h \
+ mnttab.h \
+ netdb.h \
+ paths.h \
+ stdlib.h \
+ stddef.h \
+ stdint.h \
+ string.h \
+ sys/acl.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 \
+ syslog.h \
+ termios.h \
+ unistd.h \
+ utime.h \
+ values.h \
+ )