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=" de es fr it ko nl pl pt_BR ru sv gl et"
9 AM_INIT_AUTOMAKE(findutils, 4.1.6)
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.
35 dnl Try to get a POSIX.1 environment.
37 dnl Checks for libraries.
38 AC_CHECK_LIB(sun, getpwnam)
40 dnl Checks for header files.
41 AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.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)
84 AC_CHECK_MEMBERS((struct stat.st_rdev))
88 dnl Checks for library functions.
91 AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strftime strspn strstr \
92 strtol strtoul waitpid)
96 AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent)
100 AC_FUNC_CLOSEDIR_VOID
102 dnl internationalization macros
105 # These no-op lines work around a bug in automake 1.4:
106 # it doesn't recognize the assignments to LIBOBJS in m4/*.m4.
107 : LIBOBJS="$LIBOBJS fnmatch.o lstat.o"
108 : LIBOBJS="$LIBOBJS malloc.o memcmp.o mktime.o"
109 : LIBOBJS="$LIBOBJS realloc.o regex.o stat.o strftime.o"
111 # This is necessary so that .o files in LIBOBJS are also built via
112 # the ANSI2KNR-filtering rules.
113 LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
115 Makefile lib/Makefile lib/posix/Makefile
116 find/Makefile find/testsuite/Makefile
117 xargs/Makefile xargs/testsuite/Makefile
118 locate/Makefile locate/testsuite/Makefile
119 intl/Makefile po/Makefile.in
120 doc/Makefile m4/Makefile