| 1 | dnl Process this file with autoconf to produce a configure script.
|
|---|
| 2 | AC_INIT([GNU findutils], 4.3.2, [[email protected]])
|
|---|
| 3 | AM_INIT_AUTOMAKE
|
|---|
| 4 |
|
|---|
| 5 | AC_CONFIG_SRCDIR([find/pred.c])
|
|---|
| 6 | AC_CONFIG_HEADERS([config.h])
|
|---|
| 7 | AC_CANONICAL_HOST
|
|---|
| 8 | AC_CONFIG_MACRO_DIR(gnulib/m4)
|
|---|
| 9 |
|
|---|
| 10 | dnl Set of available languages.
|
|---|
| 11 | ALL_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 |
|
|---|
| 13 | AC_SUBST(INCLUDES)dnl
|
|---|
| 14 |
|
|---|
| 15 | dnl check for --with-fts
|
|---|
| 16 | FIND_WITH_FTS
|
|---|
| 17 |
|
|---|
| 18 | AC_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 |
|
|---|
| 26 | AC_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 |
|
|---|
| 30 | AC_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 |
|
|---|
| 34 | AC_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 |
|
|---|
| 38 | dnl This one has no default, because otherwise we would have to say
|
|---|
| 39 | dnl both --enable-d_type-optimisation=no and --enable-d_type-optimization=no
|
|---|
| 40 | dnl to turn it off.
|
|---|
| 41 | AC_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 |
|
|---|
| 46 | AC_MSG_CHECKING([whether debug output should be produced])
|
|---|
| 47 | if test x$ac_cv_debug = xno; then
|
|---|
| 48 | AC_MSG_RESULT([no])
|
|---|
| 49 | else
|
|---|
| 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])
|
|---|
| 53 | fi
|
|---|
| 54 |
|
|---|
| 55 | AC_MSG_CHECKING([for leaf optimisation])
|
|---|
| 56 | if test x$ac_cv_leaf_optimisation = xno; then
|
|---|
| 57 | AC_MSG_RESULT([no])
|
|---|
| 58 | else
|
|---|
| 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)])
|
|---|
| 61 | fi
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 | dnl Checks for programs.
|
|---|
| 66 | AC_PROG_CC
|
|---|
| 67 | AC_PROG_CPP
|
|---|
| 68 |
|
|---|
| 69 | AC_AIX
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 | dnl AC_MINIX
|
|---|
| 73 | dnl for gnulib
|
|---|
| 74 | gl_EARLY
|
|---|
| 75 | dnl gl_EARLY calls AC_GNU_SOURCE anyway.
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 | AC_ISC_POSIX
|
|---|
| 79 | AM_C_PROTOTYPES
|
|---|
| 80 |
|
|---|
| 81 | AC_PROG_INSTALL
|
|---|
| 82 | AC_PROG_RANLIB
|
|---|
| 83 | dnl AC_PROG_LIBTOOL
|
|---|
| 84 | AC_PROG_MAKE_SET
|
|---|
| 85 | AC_SYS_LARGEFILE
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | gl_INIT
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 | dnl Older versions of gnulib/m4/nls.m4 provide AM_MKINSTALLDIRS.
|
|---|
| 93 | dnl The current version of gnulib does not, but the version of
|
|---|
| 94 | dnl po/Makefile.in.in that comes with gettext-0.14.6 expects
|
|---|
| 95 | dnl that @MKINSTALLDIRS@ will be expanded.
|
|---|
| 96 | AM_MKINSTALLDIRS
|
|---|
| 97 |
|
|---|
| 98 | dnl lib/regexprops needs to be a native program, because we need to
|
|---|
| 99 | dnl run it in order to generate the documentation about the properties
|
|---|
| 100 | dnl of regular expressions. See lib/Makefile.am.
|
|---|
| 101 | AM_CONDITIONAL(CROSS_COMPILING, [[test "x$cross_compiling" = xyes]])
|
|---|
| 102 |
|
|---|
| 103 | dnl Try to get a POSIX.1 environment.
|
|---|
| 104 |
|
|---|
| 105 | dnl Checks for libraries. If getpwnam() isn't present in the
|
|---|
| 106 | dnl C library, try -lsun.
|
|---|
| 107 | AC_CHECK_FUNC(getpwnam, [],
|
|---|
| 108 | [AC_CHECK_LIB(sun, getpwnam)])
|
|---|
| 109 |
|
|---|
| 110 | dnl Checks for header files.
|
|---|
| 111 | AC_HEADER_STDC
|
|---|
| 112 | dnl Assume unistd.h is present - coreutils does too.
|
|---|
| 113 | AC_CHECK_HEADERS(fcntl.h string.h limits.h errno.h stdlib.h stddef.h)
|
|---|
| 114 | AC_CHECK_HEADERS(unistd.h sys/types.h inttypes.h fcntl.h locale.h stdint.h)
|
|---|
| 115 | AC_CHECK_HEADERS(sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h)
|
|---|
| 116 | dnl find.c needs sys/utsname.h because it calls uname(2).
|
|---|
| 117 | AC_CHECK_HEADERS(sys/utsname.h)
|
|---|
| 118 | AC_HEADER_MAJOR
|
|---|
| 119 | AC_HEADER_DIRENT
|
|---|
| 120 | AC_HEADER_STAT
|
|---|
| 121 | AC_HEADER_SYS_WAIT
|
|---|
| 122 |
|
|---|
| 123 |
|
|---|
| 124 | dnl Checks for typedefs, structures, and compiler characteristics.
|
|---|
| 125 |
|
|---|
| 126 | AC_TYPE_UID_T
|
|---|
| 127 | AC_TYPE_SIZE_T
|
|---|
| 128 | AC_CHECK_TYPE(ssize_t, int)
|
|---|
| 129 | AC_TYPE_PID_T
|
|---|
| 130 | AC_CHECK_TYPE(ino_t, unsigned long)
|
|---|
| 131 | AC_CHECK_TYPE(dev_t, unsigned long)
|
|---|
| 132 | AC_TYPE_MODE_T
|
|---|
| 133 | AC_STRUCT_ST_BLOCKS
|
|---|
| 134 | AC_CHECK_MEMBERS([struct stat.st_rdev])
|
|---|
| 135 |
|
|---|
| 136 | AC_MSG_CHECKING([whether we should use struct dirent.d_type, if available])
|
|---|
| 137 | if test x$ac_cv_d_type = xno; then
|
|---|
| 138 | AC_MSG_RESULT([no])
|
|---|
| 139 | else
|
|---|
| 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>])
|
|---|
| 149 | fi
|
|---|
|
|---|