source: vendor/findutils/4.3.2/configure.in@ 3170

Last change on this file since 3170 was 3170, checked in by bird, 18 years ago

findutils 4.3.2

File size: 7.4 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([GNU findutils], 4.3.2, [bug-findutils@gnu.org])
3AM_INIT_AUTOMAKE
4
5AC_CONFIG_SRCDIR([find/pred.c])
6AC_CONFIG_HEADERS([config.h])
7AC_CANONICAL_HOST
8AC_CONFIG_MACRO_DIR(gnulib/m4)
9
10dnl Set of available languages.
11ALL_LINGUAS="be bg ca da de el eo es et fi fr ga gl hr hu id it ja ko lg ms nl pl pt pt_BR ro ru rw sk sl sr sv tr vi zh_CN zh_TW"
12
13AC_SUBST(INCLUDES)dnl
14
15dnl check for --with-fts
16FIND_WITH_FTS
17
18AC_ARG_ENABLE(id-cache,
19[ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod],
20 AC_DEFINE(CACHE_IDS, 1, [Define if you want find -nouser and -nogroup to make tables of
21 used UIDs and GIDs at startup instead of using getpwuid or
22 getgrgid when needed. Speeds up -nouser and -nogroup unless you
23 are running NIS or Hesiod, which make password and group calls
24 very expensive.]))
25
26AC_ARG_ENABLE(debug,
27 AS_HELP_STRING(--enable-debug,Enable debugging output which is likely to be interesting to people debugging findutils),
28 [ac_cv_debug=$enableval],[ac_cv_debug=no])
29
30AC_ARG_ENABLE(leaf-optimisation,
31 AS_HELP_STRING(--enable-leaf-optimisation,Enable an optimisation which saves lstat calls to identify subdirectories on filesystems having traditional Unix semantics),
32 [ac_cv_leaf_optimisation=$enableval],[ac_cv_leaf_optimisation=yes])
33
34AC_ARG_ENABLE(d_type-optimization,
35 AS_HELP_STRING(--enable-d_type-optimization,Make use of the file type data returned in struct dirent.d_type by readdir()),
36 [ac_cv_d_type=$enableval],[ac_cv_d_type=yes])
37
38dnl This one has no default, because otherwise we would have to say
39dnl both --enable-d_type-optimisation=no and --enable-d_type-optimization=no
40dnl to turn it off.
41AC_ARG_ENABLE(d_type-optimisation,
42 AS_HELP_STRING(--enable-d_type-optimisation,Synonym for --enable-d_type-optimization),
43 [ac_cv_d_type=$enableval],[])
44
45
46AC_MSG_CHECKING([whether debug output should be produced])
47if test x$ac_cv_debug = xno; then
48 AC_MSG_RESULT([no])
49else
50 AC_MSG_RESULT([yes])
51 AC_DEFINE(DEBUG, 1, [Define if you want to see find's innards])
52 AC_DEFINE(DEBUG_STAT, 1, [Define if you want to see a message every time find calls the stat() system call])
53fi
54
55AC_MSG_CHECKING([for leaf optimisation])
56if test x$ac_cv_leaf_optimisation = xno; then
57 AC_MSG_RESULT([no])
58else
59 AC_MSG_RESULT([yes])
60 AC_DEFINE(LEAF_OPTIMISATION, 1, [Define if you want to use the leaf optimisation (this can still be turned off with -noleaf)])
61fi
62
63
64
65dnl Checks for programs.
66AC_PROG_CC
67AC_PROG_CPP
68
69AC_AIX
70
71
72dnl AC_MINIX
73dnl for gnulib
74gl_EARLY
75dnl gl_EARLY calls AC_GNU_SOURCE anyway.
76
77
78AC_ISC_POSIX
79AM_C_PROTOTYPES
80
81AC_PROG_INSTALL
82AC_PROG_RANLIB
83dnl AC_PROG_LIBTOOL
84AC_PROG_MAKE_SET
85AC_SYS_LARGEFILE
86
87
88gl_INIT
89
90
91
92dnl Older versions of gnulib/m4/nls.m4 provide AM_MKINSTALLDIRS.
93dnl The current version of gnulib does not, but the version of
94dnl po/Makefile.in.in that comes with gettext-0.14.6 expects
95dnl that @MKINSTALLDIRS@ will be expanded.
96AM_MKINSTALLDIRS
97
98dnl lib/regexprops needs to be a native program, because we need to
99dnl run it in order to generate the documentation about the properties
100dnl of regular expressions. See lib/Makefile.am.
101AM_CONDITIONAL(CROSS_COMPILING, [[test "x$cross_compiling" = xyes]])
102
103dnl Try to get a POSIX.1 environment.
104
105dnl Checks for libraries. If getpwnam() isn't present in the
106dnl C library, try -lsun.
107AC_CHECK_FUNC(getpwnam, [],
108[AC_CHECK_LIB(sun, getpwnam)])
109
110dnl Checks for header files.
111AC_HEADER_STDC
112dnl Assume unistd.h is present - coreutils does too.
113AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h)
114AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h)
115AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h)
116dnl find.c needs sys/utsname.h because it calls uname(2).
117AC_CHECK_HEADERS(sys/utsname.h)
118AC_HEADER_MAJOR
119AC_HEADER_DIRENT
120AC_HEADER_STAT
121AC_HEADER_SYS_WAIT
122
123
124dnl Checks for typedefs, structures, and compiler characteristics.
125
126AC_TYPE_UID_T
127AC_TYPE_SIZE_T
128AC_CHECK_TYPE(ssize_t, int)
129AC_TYPE_PID_T
130AC_CHECK_TYPE(ino_t, unsigned long)
131AC_CHECK_TYPE(dev_t, unsigned long)
132AC_TYPE_MODE_T
133AC_STRUCT_ST_BLOCKS
134AC_CHECK_MEMBERS([struct stat.st_rdev])
135
136AC_MSG_CHECKING([whether we should use struct dirent.d_type, if available])
137if test x$ac_cv_d_type = xno; then
138 AC_MSG_RESULT([no])
139else
140 AC_MSG_RESULT([yes])
141 AC_DEFINE(USE_STRUCT_DIRENT_D_TYPE, 1,
142 [Defined if you specify --enable-d_type-optimisation to configure.])
143 AC_CHECK_MEMBERS([struct dirent.d_type],[
144 AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
145 [Define to 1 if your 'struct dirent' has a d_type member])],
146 [],[
147#include <sys/types.h>
148#include <dirent.h>])
149fi
150
151
152AC_STRUCT_TM
153AC_STRUCT_TIMEZONE
154
155dnl Checks for library functions that are provided by gnulib.
156AC_FUNC_STRFTIME
157AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strstr strtol strtoul)
158AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent setlocale)
159AC_FUNC_VPRINTF
160AC_FUNC_ALLOCA
161AC_FUNC_CLOSEDIR_VOID
162
163dnl We don't just use AC_FUNC_GETMNTENT directly because it
164dnl will try to use -lsun on platforms which have getmntent() in the
165dnl C library, for example UNICOS.
166AC_CHECK_FUNC(getmntent, [], [AC_FUNC_GETMNTENT])
167AC_CHECK_FUNCS(getmntent)
168AC_CHECK_FUNCS(setmntent endmntent)
169
170
171dnl Checks for library functions that are provided by findlib.
172FINDLIB_REPLACE_FUNCS(waitpid strspn)
173FINDLIB_REPLACE_FUNCS(forcefindlib)
174
175dnl gl_XALLOC
176gl_FUNC_ALLOCA
177
178dnl Use gl_INCLUDED_REGEX so that findutils will build on systems like
179dnl Solaris, which lacks those functions in libc (see GNU Savannah bug
180dnl #11710) (Sun Sep 4 20:15:11 2005: gl_INCLUDED_REGEX no longer seems
181dnl to be available in gnulib CVS)
182gl_REGEX
183
184AC_PREREQ(2.59)
185
186# Define intmax_t to 'signed long' or 'signed long long'
187# if it is not already defined in <stdint.h> or <inttypes.h>.
188dnl Derived from gnulib's uintmax_t which was from Paul Eggert.
189AC_DEFUN([jy_AC_TYPE_INTMAX_T],
190[
191 if test $ac_cv_header_inttypes_h = no && test $ac_cv_header_stdint_h = no; then
192 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
193 test $ac_cv_type_long_long = yes \
194 && ac_type='long long' \
195 || ac_type='long'
196 AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
197 [Define to signed long or signed long long
198 if <stdint.h> and <inttypes.h> don't define.])
199 else
200 AC_DEFINE(HAVE_INTMAX_T, 1,
201 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
202 fi
203])
204
205jy_AC_TYPE_INTMAX_T
206jy_SORTZ
207
208
209AC_CHECK_MEMBER(struct dirent.d_type,,,[
210#include <sys/types.h>
211#include <dirent.h>])
212
213
214dnl internationalization macros
215AM_GNU_GETTEXT([external])
216AM_GNU_GETTEXT_VERSION(0.14.5)
217
218dnl regextype.c and regexprops.c are designed to be usable outside findutils,
219dnl but findutils doesn't want to support all the regex types in gnulib,
220dnl and wants to support an additional one (RE_SYNTAX_EMACS|RE_DOT_NEWLINE).
221dnl Hence they need to know if they are being compiled into findutils or not.
222AC_DEFINE([FINDUTILS], 1, [Define if we are compiling GNU findutils])
223
224
225# This is necessary so that .o files in LIBOBJS are also built via
226# the ANSI2KNR-filtering rules.
227#LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
228##AC_CONFIG_SUBDIRS(gnulib)
229AC_CONFIG_FILES(gnulib/Makefile gnulib/lib/Makefile)
230AC_CONFIG_FILES(m4/Makefile)
231AC_CONFIG_FILES([Makefile
232 find/Makefile find/testsuite/Makefile
233 xargs/Makefile xargs/testsuite/Makefile
234 locate/Makefile locate/testsuite/Makefile
235 po/Makefile.in po/Makefile
236 doc/Makefile lib/Makefile
237 ])
238AC_OUTPUT
239dnl intl/Makefile
Note: See TracBrowser for help on using the repository browser.