1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_HEADER(config.h)
6 AC_ARG_ENABLE(id-cache,
7 [ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod],
10 [ --with-afs support -fstype afs],
12 CPPFLAGS="$CPPFLAGS -I/usr/afsws/include"
13 LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"])
16 dnl Checks for programs.
23 dnl Try to get a POSIX.1 environment.
28 dnl Checks for libraries.
29 AC_CHECK_LIB(sun, getpwnam)
31 dnl Checks for header files.
32 AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h)
39 AC_MSG_CHECKING(how to get filesystem type)
41 # The order of these tests is important.
42 AC_TRY_CPP([#include <sys/statvfs.h>
43 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
44 if test $fstype = no; then
45 AC_TRY_CPP([#include <sys/statfs.h>
46 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
48 if test $fstype = no; then
49 AC_TRY_CPP([#include <sys/statfs.h>
50 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
52 if test $fstype = no; then
53 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
55 if test $fstype = no; then
56 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
58 if test $fstype = no; then
59 AC_TRY_CPP([#include <sys/mount.h>
60 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
62 AC_MSG_RESULT($fstype)
64 dnl Checks for typedefs, structures, and compiler characteristics.
69 AC_CHECK_TYPE(ino_t, unsigned long)
70 AC_CHECK_TYPE(dev_t, unsigned long)
77 dnl Checks for library functions.
79 AC_REPLACE_FUNCS(memcmp memset mktime stpcpy strdup strftime strspn strstr strtol)
80 AC_CHECK_FUNCS(fchdir getcwd strerror)
87 AC_OUTPUT(Makefile lib/Makefile find/Makefile xargs/Makefile \
88 locate/Makefile doc/Makefile testsuite/Makefile,