findutils/configure.in
2003-05-26 18:25:40 +00:00

116 lines
3.4 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
AC_INIT(find/pred.c)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
dnl Set of available languages.
ALL_LINGUAS="da de es et fr gl id it ko nl pl pt_BR ru sv tr"
AM_INIT_AUTOMAKE(findutils, 4.1.20)
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.]))
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_PROG_CC_STDC
AM_C_PROTOTYPES
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_SYS_LARGEFILE
dnl Try to get a POSIX.1 environment.
dnl Checks for libraries.
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 inttypes.h fcntl.h locale.h)
AC_CHECK_HEADERS(sys/param.h)
AC_HEADER_MAJOR
AC_HEADER_DIRENT
AC_HEADER_STAT
AC_HEADER_SYS_WAIT
AC_MSG_CHECKING(how to get filesystem type)
fstype=no
# The order of these tests is important.
AC_TRY_CPP([#include <sys/statvfs.h>
#include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS, 1, [Define to use SVR4 statvfs to get filesystem type.]) fstype=SVR4)
if test $fstype = no; then
AC_TRY_CPP([#include <sys/statfs.h>
#include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS, 1, [Define to use SVR3.2 statfs to get filesystem type.]) fstype=SVR3)
fi
if test $fstype = no; then
AC_TRY_CPP([#include <sys/statfs.h>
#include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS, 1, [Define to use AIX3 statfs to get filesystem type.]) fstype=AIX)
fi
if test $fstype = no; then
AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT, 1, [Define to use 4.3BSD getmntent to get filesystem type.]) fstype=4.3BSD)
fi
if test $fstype = no; then
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)
fi
if test $fstype = no; then
AC_TRY_CPP([#include <sys/mount.h>
#include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT, 1, [Define to use Ultrix getmnt to get filesystem type.]) fstype=Ultrix)
fi
AC_MSG_RESULT($fstype)
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_STRUCT_TM
AC_STRUCT_TIMEZONE
dnl Checks for library functions.
AC_FUNC_STRFTIME
AC_REPLACE_FUNCS(memcmp memset stpcpy strdup strftime strspn strstr \
strtol strtoul waitpid)
AC_CHECK_FUNCS(fchdir getcwd strerror endgrent endpwent)
AC_FUNC_VPRINTF
AC_FUNC_ALLOCA
AC_FUNC_GETMNTENT
AC_FUNC_CLOSEDIR_VOID
gl_XALLOC
dnl internationalization macros
AM_GNU_GETTEXT
# 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_OUTPUT(
Makefile
find/Makefile find/testsuite/Makefile
xargs/Makefile xargs/testsuite/Makefile
locate/Makefile locate/testsuite/Makefile
intl/Makefile po/Makefile.in po/Makefile
doc/Makefile lib/Makefile
)