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 |
---|
5 | |
---|
6 | dnl Set of available languages. |
---|
7 | ALL_LINGUAS="da de es et fr gl id it ko nl pl pt_BR ru sv" |
---|
8 | |
---|
9 | AM_INIT_AUTOMAKE(findutils, 4.1.7) |
---|
10 | |
---|
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.])) |
---|
19 | |
---|
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 |
---|
32 | |
---|
33 | jm_CHECK_ALL_TYPES |
---|
34 | |
---|
35 | dnl Try to get a POSIX.1 environment. |
---|
36 | |
---|
37 | dnl Checks for libraries. |
---|
38 | AC_CHECK_LIB(sun, getpwnam) |
---|
39 | |
---|
40 | dnl Checks for header files. |
---|
41 | AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h) |
---|
42 | AC_HEADER_STDC |
---|
43 | AC_HEADER_MAJOR |
---|
44 | AC_HEADER_DIRENT |
---|
45 | AC_HEADER_STAT |
---|
46 | AC_HEADER_SYS_WAIT |
---|
47 | |
---|
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) |
---|
56 | fi |
---|
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) |
---|
60 | fi |
---|
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) |
---|
63 | fi |
---|
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) |
---|
66 | fi |
---|
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) |
---|
70 | fi |
---|
71 | AC_MSG_RESULT($fstype) |
---|
72 | |
---|
73 | dnl Checks for typedefs, structures, and compiler characteristics. |
---|
74 | |
---|
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 | jm_AC_TYPE_UINTMAX_T |
---|
83 | AC_STRUCT_ST_BLOCKS |
---|
84 | AC_CHECK_MEMBERS([struct stat.st_rdev]) |
---|
85 | AC_STRUCT_TM |
---|
86 | AC_STRUCT_TIMEZONE |
---|
87 | |
---|
88 | dnl Checks for library functions. |
---|
89 | |
---|
90 | AC_FUNC_STRFTIME |
---|
91 | AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strftime strspn strstr \ |
---|
92 | strtol strtoul waitpid) |
---|
93 | |
---|
94 | jm_MACROS |
---|
95 | |
---|
96 | AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent) |
---|
97 | AC_FUNC_VPRINTF |
---|
98 | AC_FUNC_ALLOCA |
---|
99 | AC_FUNC_GETMNTENT |
---|
100 | AC_FUNC_CLOSEDIR_VOID |
---|
101 | |
---|
102 | dnl internationalization macros |
---|
103 | AM_GNU_GETTEXT |
---|
104 | |
---|
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" |
---|
110 | |
---|
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/'` |
---|
114 | AC_OUTPUT( |
---|
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 |
---|
121 | ) |
---|