mirror of
git://git.sv.gnu.org/findutils.git
synced 2026-01-28 20:43:21 +01:00
199 lines
5.6 KiB
Plaintext
199 lines
5.6 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
AC_INIT
|
|
AC_CONFIG_SRCDIR([find/pred.c])
|
|
AC_CONFIG_HEADERS([config.h])
|
|
AC_CANONICAL_HOST
|
|
AC_CONFIG_MACRO_DIR(gnulib/m4)
|
|
|
|
dnl Set of available languages.
|
|
ALL_LINGUAS="da de es et fr gl id it ko nl pl pt_BR ru sv tr sk"
|
|
|
|
AM_INIT_AUTOMAKE(findutils, 4.2.16-CVS)
|
|
|
|
AC_SUBST(INCLUDES)dnl
|
|
AC_ARG_ENABLE(id-cache,
|
|
[ --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod],
|
|
AC_DEFINE(CACHE_IDS, 1, [Define if you want find -nouser and -nogroup to make tables of
|
|
used UIDs and GIDs at startup instead of using getpwuid or
|
|
getgrgid when needed. Speeds up -nouser and -nogroup unless you
|
|
are running NIS or Hesiod, which make password and group calls
|
|
very expensive.]))
|
|
|
|
AC_ARG_ENABLE(debug,
|
|
AS_HELP_STRING(--enable-debug,Enable debugging output which is likely to be interesting to people debugging findutils),
|
|
[ac_cv_debug=$enableval],[ac_cv_debug=no])
|
|
|
|
AC_ARG_ENABLE(d_type-optimization,
|
|
AS_HELP_STRING(--enable-d_type-optimization,Make use of the file type data returned in struct dirent.d_type by readdir()),
|
|
[ac_cv_d_type=$enableval],[ac_cv_d_type=yes])
|
|
|
|
dnl This one has no default, because otherwise we would have to say
|
|
dnl both --enable-d_type-optimisation=no and --enable-d_type-optimization=no
|
|
dnl to turn it off.
|
|
AC_ARG_ENABLE(d_type-optimisation,
|
|
AS_HELP_STRING(--enable-d_type-optimisation,Synonym for --enable-d_type-optimization),
|
|
[ac_cv_d_type=$enableval],[])
|
|
|
|
|
|
AC_MSG_CHECKING([whether debug output should be produced])
|
|
if test x$ac_cv_debug = xno; then
|
|
AC_MSG_RESULT([no])
|
|
else
|
|
AC_MSG_RESULT([yes])
|
|
AC_DEFINE(DEBUG, 1, [Define if you want to see find's innards])
|
|
AC_DEFINE(DEBUG_STAT, 1, [Define if you want to see a message every time find calls the stat() system call])
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
|
|
AC_AIX
|
|
|
|
|
|
dnl AC_MINIX
|
|
dnl for gnulib
|
|
gl_EARLY
|
|
dnl gl_EARLY calls AC_GNU_SOURCE anyway.
|
|
|
|
|
|
AC_ISC_POSIX
|
|
AM_C_PROTOTYPES
|
|
|
|
AC_PROG_INSTALL
|
|
AC_PROG_RANLIB
|
|
dnl AC_PROG_LIBTOOL
|
|
AC_PROG_MAKE_SET
|
|
AC_SYS_LARGEFILE
|
|
|
|
|
|
gl_INIT
|
|
|
|
dnl Try to get a POSIX.1 environment.
|
|
|
|
dnl Checks for libraries. If getpwnam() isn't present in the
|
|
dnl C library, try -lsun.
|
|
AC_CHECK_FUNC(getpwnam, [],
|
|
[AC_CHECK_LIB(sun, getpwnam)])
|
|
|
|
dnl Checks for header files.
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h errno.h stdlib.h stddef.h)
|
|
AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h)
|
|
AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h)
|
|
AC_HEADER_MAJOR
|
|
AC_HEADER_DIRENT
|
|
AC_HEADER_STAT
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_UID_T
|
|
AC_TYPE_SIZE_T
|
|
AC_CHECK_TYPE(ssize_t, int)
|
|
AC_TYPE_PID_T
|
|
AC_CHECK_TYPE(ino_t, unsigned long)
|
|
AC_CHECK_TYPE(dev_t, unsigned long)
|
|
AC_TYPE_MODE_T
|
|
AC_STRUCT_ST_BLOCKS
|
|
AC_CHECK_MEMBERS([struct stat.st_rdev])
|
|
|
|
AC_MSG_CHECKING([whether we should use struct dirent.d_type, if available])
|
|
if test x$ac_cv_d_type = xno; then
|
|
AC_MSG_RESULT([no])
|
|
else
|
|
AC_MSG_RESULT([yes])
|
|
AC_DEFINE(USE_STRUCT_DIRENT_D_TYPE, 1,
|
|
[Defined if you specify --enable-d_type-optimisation to configure.])
|
|
AC_CHECK_MEMBERS([struct dirent.d_type],[
|
|
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
|
|
[Define to 1 if your 'struct dirent' has a d_type member])],
|
|
[],[
|
|
#include <sys/types.h>
|
|
#include <dirent.h>])
|
|
fi
|
|
|
|
|
|
AC_STRUCT_TM
|
|
AC_STRUCT_TIMEZONE
|
|
|
|
dnl Checks for library functions that are provided by gnulib.
|
|
AC_FUNC_STRFTIME
|
|
AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strstr strtol strtoul)
|
|
AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent setlocale)
|
|
AC_FUNC_VPRINTF
|
|
AC_FUNC_ALLOCA
|
|
AC_FUNC_CLOSEDIR_VOID
|
|
|
|
dnl We don't just use AC_FUNC_GETMNTENT directly because it
|
|
dnl will try to use -lsun on platforms which have getmntent() in the
|
|
dnl C library, for example UNICOS.
|
|
AC_CHECK_FUNC(getmntent, [], [AC_FUNC_GETMNTENT])
|
|
AC_CHECK_FUNCS(getmntent)
|
|
AC_CHECK_FUNCS(setmntent endmntent)
|
|
|
|
|
|
dnl Checks for library functions that are provided by findlib.
|
|
FINDLIB_REPLACE_FUNCS(waitpid strspn)
|
|
FINDLIB_REPLACE_FUNCS(forcefindlib)
|
|
|
|
dnl gl_XALLOC
|
|
gl_FUNC_ALLOCA
|
|
|
|
dnl Use gl_INCLUDED_REGEX so that findutils will build on systems like
|
|
dnl Solaris, which lacks those functions in libc (see GNU Savannah bug
|
|
dnl #11710)
|
|
gl_INCLUDED_REGEX([gnulib/lib/regex.c])
|
|
|
|
AC_PREREQ(2.59)
|
|
|
|
# Define intmax_t to 'signed long' or 'signed long long'
|
|
# if it is not already defined in <stdint.h> or <inttypes.h>.
|
|
dnl Derived from gnulib's uintmax_t which was from Paul Eggert.
|
|
AC_DEFUN([jy_AC_TYPE_INTMAX_T],
|
|
[
|
|
if test $ac_cv_header_inttypes_h = no && test $ac_cv_header_stdint_h = no; then
|
|
AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
|
|
test $ac_cv_type_long_long = yes \
|
|
&& ac_type='long long' \
|
|
|| ac_type='long'
|
|
AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
|
|
[Define to signed long or signed long long
|
|
if <stdint.h> and <inttypes.h> don't define.])
|
|
else
|
|
AC_DEFINE(HAVE_INTMAX_T, 1,
|
|
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
|
|
fi
|
|
])
|
|
|
|
jy_AC_TYPE_INTMAX_T
|
|
jy_SORTZ
|
|
|
|
|
|
AC_CHECK_MEMBER(struct dirent.d_type,,,[
|
|
#include <sys/types.h>
|
|
#include <dirent.h>])
|
|
|
|
|
|
dnl internationalization macros
|
|
AM_GNU_GETTEXT([external])
|
|
|
|
# This is necessary so that .o files in LIBOBJS are also built via
|
|
# the ANSI2KNR-filtering rules.
|
|
#LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
|
##AC_CONFIG_SUBDIRS(gnulib)
|
|
AC_CONFIG_FILES(gnulib/Makefile gnulib/lib/Makefile gnulib/m4/Makefile)
|
|
AC_CONFIG_FILES(m4/Makefile)
|
|
AC_CONFIG_FILES([Makefile
|
|
find/Makefile find/testsuite/Makefile
|
|
xargs/Makefile xargs/testsuite/Makefile
|
|
locate/Makefile locate/testsuite/Makefile
|
|
po/Makefile.in po/Makefile
|
|
doc/Makefile lib/Makefile
|
|
])
|
|
AC_OUTPUT
|
|
dnl intl/Makefile
|