1 dnl Process this file with autoconf to produce a configure script.
3 AM_CONFIG_HEADER(config.h)
6 dnl Set of available languages.
7 ALL_LINGUAS="da de es et fr gl id it ko nl pl pt_BR ru sv tr"
9 AM_INIT_AUTOMAKE(findutils, 4.1.20)
12 AC_ARG_ENABLE(id-cache,
13 [ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod],
14 AC_DEFINE(CACHE_IDS, 1, [Define if you want find -nouser and -nogroup to make tables of
15 used UIDs and GIDs at startup instead of using getpwuid or
16 getgrgid when needed. Speeds up -nouser and -nogroup unless you
17 are running NIS or Hesiod, which make password and group calls
20 dnl Checks for programs.
33 dnl Try to get a POSIX.1 environment.
35 dnl Checks for libraries.
36 AC_CHECK_LIB(sun, getpwnam)
38 dnl Checks for header files.
40 AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h stdlib.h stddef.h)
41 AC_CHECK_HEADERS(unistd.h inttypes.h fcntl.h locale.h)
42 AC_CHECK_HEADERS(sys/param.h)
48 AC_MSG_CHECKING(how to get filesystem type)
50 # The order of these tests is important.
51 AC_TRY_CPP([#include <sys/statvfs.h>
52 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS, 1, [Define to use SVR4 statvfs to get filesystem type.]) fstype=SVR4)
53 if test $fstype = no; then
54 AC_TRY_CPP([#include <sys/statfs.h>
55 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS, 1, [Define to use SVR3.2 statfs to get filesystem type.]) fstype=SVR3)
57 if test $fstype = no; then
58 AC_TRY_CPP([#include <sys/statfs.h>
59 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS, 1, [Define to use AIX3 statfs to get filesystem type.]) fstype=AIX)
61 if test $fstype = no; then
62 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT, 1, [Define to use 4.3BSD getmntent to get filesystem type.]) fstype=4.3BSD)
64 if test $fstype = no; then
65 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS, 1, [Define to use 4.4BSD and OSF1 statfs to get filesystem type.]) fstype=4.4BSD/OSF1)
67 if test $fstype = no; then
68 AC_TRY_CPP([#include <sys/mount.h>
69 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT, 1, [Define to use Ultrix getmnt to get filesystem type.]) fstype=Ultrix)
71 AC_MSG_RESULT($fstype)
73 dnl Checks for typedefs, structures, and compiler characteristics.
77 AC_CHECK_TYPE(ssize_t, int)
79 AC_CHECK_TYPE(ino_t, unsigned long)
80 AC_CHECK_TYPE(dev_t, unsigned long)
83 AC_CHECK_MEMBERS([struct stat.st_rdev])
87 dnl Checks for library functions.
90 AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strftime strspn strstr \
91 strtol strtoul waitpid)
93 AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent)
101 dnl internationalization macros
104 # This is necessary so that .o files in LIBOBJS are also built via
105 # the ANSI2KNR-filtering rules.
106 #LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
107 AC_CONFIG_SUBDIRS(gnulib)
110 find/Makefile find/testsuite/Makefile
111 xargs/Makefile xargs/testsuite/Makefile
112 locate/Makefile locate/testsuite/Makefile
113 intl/Makefile po/Makefile.in po/Makefile
114 doc/Makefile lib/Makefile