dnl Process this file with autoconf to produce a configure script. AC_INIT(tdb.c) AM_INIT_AUTOMAKE(tdb,1.0.6) AM_CONFIG_HEADER(config.h) WARNS="" AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wshadow -O0 -ggdb3",AC_DEFINE(NDEBUG)) AC_SUBST(WARNS) AC_DEFINE(STANDALONE) dnl Checks for programs. AC_PROG_CC AM_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_RANLIB dnl Checks for libraries. AC_CHECK_LIB(gdbm, gdbm_open, [have_gdbm=true],[have_gdbm=false]) if test "x$have_gdbm" = "xfalse";then AC_MSG_WARN(WARNING: tdbspeed and tdbtest are disabled. They need gdbm.) fi AC_CHECK_LIB(dl, dlopen,[have_dllib=true],[have_dllib=false]) if test "x$have_dllib" = "xfalse";then AC_MSG_WARN(WARNING: tdbtorture is disabled. It needs libdl.) fi AM_CONDITIONAL(BUILD_TDBSPEED,$have_gdbm) AM_CONDITIONAL(BUILD_TDBTEST,$have_gdbm) AM_CONDITIONAL(BUILD_TDBTORTURE,$have_dllib) AC_ARG_WITH(spinlocks, [ --with-spinlocks use spin locks instead of fcntl locks ]) if test "x$with_spinlocks" = "xyes"; then AC_DEFINE(USE_SPINLOCKS) case "$host_cpu" in sparc) AC_DEFINE(SPARC_SPINLOCKS) ;; i386|i486|i586|i686) AC_DEFINE(INTEL_SPINLOCKS) ;; mips) AC_DEFINE(MIPS_SPINLOCKS) ;; powerpc) AC_DEFINE(POWERPC_SPINLOCKS) ;; esac fi AM_CONDITIONAL(USE_SPINLOCKS, test "x$with_spinlocks" = "xyes") dnl Checks for header files. dnl AC_HEADER_STDC dnl AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_C_CONST dnl AC_TYPE_MODE_T dnl AC_TYPE_SIZE_T dnl AC_HEADER_TIME dnl Checks for library functions. dnl AC_FUNC_MEMCMP AC_FUNC_MMAP dnl AC_CHECK_FUNCS(gettimeofday strdup strerror) AC_OUTPUT(Makefile)