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.2)
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.
29 dnl Try to get a POSIX.1 environment.
31 dnl Checks for libraries.
32 AC_CHECK_LIB(sun, getpwnam)
34 dnl Checks for header files.
35 AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h)
42 AC_MSG_CHECKING(how to get filesystem type)
44 # The order of these tests is important.
45 AC_TRY_CPP([#include <sys/statvfs.h>
46 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
47 if test $fstype = no; then
48 AC_TRY_CPP([#include <sys/statfs.h>
49 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
51 if test $fstype = no; then
52 AC_TRY_CPP([#include <sys/statfs.h>
53 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
55 if test $fstype = no; then
56 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
58 if test $fstype = no; then
59 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
61 if test $fstype = no; then
62 AC_TRY_CPP([#include <sys/mount.h>
63 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
65 AC_MSG_RESULT($fstype)
67 dnl Checks for typedefs, structures, and compiler characteristics.
72 AC_CHECK_TYPE(ino_t, unsigned long)
73 AC_CHECK_TYPE(dev_t, unsigned long)
81 dnl Checks for library functions.
84 AC_REPLACE_FUNCS(memcmp memset mktime stpcpy strdup strftime strspn strstr strtol)
88 AC_CHECK_FUNC(getstr, ,
89 LIBOBJS="$LIBOBJS getline.o"
93 AC_CHECK_FUNCS(fchdir getcwd strerror basename endgrent endpwent)
99 # This is necessary so that .o files in LIBOBJS are also built via
100 # the ANSI2KNR-filtering rules.
101 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
102 AC_OUTPUT(Makefile lib/Makefile find/Makefile find/testsuite/Makefile
103 xargs/Makefile xargs/testsuite/Makefile locate/Makefile
105 doc/Makefile m4/Makefile,