document the various suffixes for -size and also the new option -ignore_readdir_race
[findutils.git] / configure.in
blob78d7fe59262a351024b30b7fd8cb100e6701bfaa
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(find/pred.c)
3 AM_CONFIG_HEADER(config.h)
4 AC_CANONICAL_HOST
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.2.0-CVS)
11 AC_SUBST(INCLUDES)dnl
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
18    very expensive.]))
20 dnl Checks for programs.
21 AC_PROG_CC
22 AC_PROG_CPP
23 AC_AIX
24 AC_MINIX
25 AC_ISC_POSIX
26 AC_PROG_CC_STDC
27 AM_C_PROTOTYPES
28 AC_PROG_INSTALL
29 AC_PROG_RANLIB
30 AC_PROG_MAKE_SET
31 AC_SYS_LARGEFILE
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.
39 AC_HEADER_STDC
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)
43 AC_HEADER_MAJOR
44 AC_HEADER_DIRENT
45 AC_HEADER_STAT
46 AC_HEADER_SYS_WAIT
48 AC_MSG_CHECKING(how to get filesystem type)
49 fstype=no
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_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)
64 if test $fstype = no; then  
65 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT, 1, [Define to use 4.3BSD getmntent to get filesystem type.]) fstype=4.3BSD)
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.
75 AC_TYPE_UID_T
76 AC_TYPE_SIZE_T
77 AC_CHECK_TYPE(ssize_t, int)
78 AC_TYPE_PID_T
79 AC_CHECK_TYPE(ino_t, unsigned long)
80 AC_CHECK_TYPE(dev_t, unsigned long)
81 AC_TYPE_MODE_T
82 AC_STRUCT_ST_BLOCKS
83 AC_CHECK_MEMBERS([struct stat.st_rdev])
84 AC_STRUCT_TM
85 AC_STRUCT_TIMEZONE
87 dnl Checks for library functions.
89 AC_FUNC_STRFTIME
90 AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strftime strspn strstr \
91      strtol strtoul waitpid)
93 AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent)
94 AC_FUNC_VPRINTF
95 AC_FUNC_ALLOCA
96 AC_FUNC_GETMNTENT
97 AC_FUNC_CLOSEDIR_VOID
99 gl_XALLOC
101 dnl internationalization macros
102 AM_GNU_GETTEXT
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)
108 AC_OUTPUT(
109         Makefile 
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
115         )