1 dnl Process this file with autoconf to produce a configure script.
3 AM_CONFIG_HEADER(config.h)
5 AM_INIT_AUTOMAKE(findutils, 4.1.1)
8 AC_ARG_ENABLE(id-cache,
9 [ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod],
12 [ --with-afs support -fstype afs],
14 CPPFLAGS="$CPPFLAGS -I/usr/afsws/include"
15 LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"])
18 dnl Checks for programs.
25 dnl Try to get a POSIX.1 environment.
30 dnl Checks for libraries.
31 AC_CHECK_LIB(sun, getpwnam)
33 dnl Checks for header files.
34 AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h)
41 AC_MSG_CHECKING(how to get filesystem type)
43 # The order of these tests is important.
44 AC_TRY_CPP([#include <sys/statvfs.h>
45 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
46 if test $fstype = no; then
47 AC_TRY_CPP([#include <sys/statfs.h>
48 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
50 if test $fstype = no; then
51 AC_TRY_CPP([#include <sys/statfs.h>
52 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
54 if test $fstype = no; then
55 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
57 if test $fstype = no; then
58 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
60 if test $fstype = no; then
61 AC_TRY_CPP([#include <sys/mount.h>
62 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
64 AC_MSG_RESULT($fstype)
66 dnl Checks for typedefs, structures, and compiler characteristics.
71 AC_CHECK_TYPE(ino_t, unsigned long)
72 AC_CHECK_TYPE(dev_t, unsigned long)
79 dnl Checks for library functions.
82 AC_REPLACE_FUNCS(memcmp memset mktime stpcpy strdup strftime strspn strstr strtol)
83 AC_CHECK_FUNCS(fchdir getcwd strerror basename endgrent endpwent)
89 AC_OUTPUT(Makefile lib/Makefile find/Makefile xargs/Makefile \
90 locate/Makefile doc/Makefile testsuite/Makefile,