2004-06-24 21:10:31 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2004-07-06 01:22:18 +00:00
|
|
|
AC_PREREQ(2.57)
|
|
|
|
AC_INIT(LLADD, 0.1, sears@cs.berkeley.edu)
|
2004-06-24 21:10:31 +00:00
|
|
|
AM_INIT_AUTOMAKE(hello,0.1)
|
|
|
|
AC_CONFIG_SRCDIR([config.h.in])
|
|
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
## Need AC_PROG_LIBTOOL
|
|
|
|
AC_PROG_LIBTOOL
|
2005-03-02 05:46:29 +00:00
|
|
|
AC_PROG_RANLIB
|
2004-06-24 21:10:31 +00:00
|
|
|
# Checks for libraries.
|
|
|
|
|
2004-07-06 01:22:18 +00:00
|
|
|
#AM_PATH_CHECK(,[have_check="yes"],
|
|
|
|
# AC_MSG_WARN([Check not found; cannot run unit tests!])
|
|
|
|
# [have_check="no"])
|
|
|
|
#AM_CONDITIONAL(HAVE_CHECK, test x"$have_check", "xyes")
|
|
|
|
|
2005-03-13 02:24:01 +00:00
|
|
|
#AM_PATH_CHECK(,[have_check=true],
|
|
|
|
# AC_MSG_WARN([Check not found; cannot run unit tests!])
|
|
|
|
# [have_check=false])
|
|
|
|
#AM_CONDITIONAL(HAVE_CHECK, test x$have_check = xtrue)
|
2004-06-24 21:10:31 +00:00
|
|
|
|
2004-06-28 21:10:10 +00:00
|
|
|
## alas, it won't link if this is put in here.. instead, it's linked in manually in the test directory...
|
|
|
|
|
|
|
|
#AC_ARG_ENABLE(efence,
|
|
|
|
#[ --enable-efence Use electric fence (www.perens.com)],
|
|
|
|
#[case "$enableval" in \
|
|
|
|
# yes) efence=yes ;; \
|
|
|
|
# no) efence=no;; \
|
|
|
|
# *) efence=no;; \
|
|
|
|
#esac], [efence=no])
|
|
|
|
#
|
|
|
|
#dnl Check for efence
|
|
|
|
#if test $efence = yes; then
|
|
|
|
#AC_CHECK_LIB(efence,memalign)
|
|
|
|
#fi
|
|
|
|
|
2005-03-12 22:11:18 +00:00
|
|
|
|
2005-01-20 22:55:54 +00:00
|
|
|
# Linux has a broken O_DIRECT flag, but we allow people to override it from
|
|
|
|
# the command line.
|
|
|
|
test_host_prw=yes
|
|
|
|
AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
|
|
|
|
AC_TRY_LINK([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <fcntl.h>], [
|
|
|
|
open("a", O_RDONLY | O_DIRECT, 0);
|
|
|
|
], [db_cv_open_o_direct=yes; test_host_prw=no], [db_cv_open_o_direct=no])])
|
|
|
|
if test "$test_host_prw" = "no" -a "$db_cv_open_o_direct" = "yes"; then
|
|
|
|
case "$host_os" in
|
|
|
|
linux*)
|
|
|
|
db_cv_open_o_direct=no;
|
|
|
|
AC_MSG_WARN(
|
|
|
|
[O_DIRECT interface ignored on $host_os-$host_vendor.]);;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
if test "$db_cv_open_o_direct" = "yes"; then
|
|
|
|
AC_DEFINE(HAVE_O_DIRECT)
|
|
|
|
AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])
|
|
|
|
fi
|
|
|
|
|
2005-03-13 02:24:01 +00:00
|
|
|
AC_CONFIG_DB
|
|
|
|
|
|
|
|
AC_CHECK_LIB([check], [suite_create], , AC_MSG_WARN([Check not found; cannot run unit tests!]))
|
|
|
|
|
|
|
|
## This perl script thing is a total hack, but we need to define HAVE_LIBCHECK
|
|
|
|
## inside of an AM_CONDITIONAL to get conditional compilation to work.
|
|
|
|
AM_CONDITIONAL(HAVE_LIBCHECK, echo $LIBS | [
|
|
|
|
perl -ne 'if($_=~/-lcheck/)
|
|
|
|
{ print qq(Check found, make check will run full test suite.
|
|
|
|
); exit 0; } else { print qq(
|
|
|
|
--------------------------------
|
|
|
|
|
2005-01-20 22:55:54 +00:00
|
|
|
|
2005-03-13 02:24:01 +00:00
|
|
|
Check not found! Most tests will be skipped by make check!
|
2005-01-20 22:55:54 +00:00
|
|
|
|
2005-03-13 02:24:01 +00:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
); exit 1; }'])
|
|
|
|
|
|
|
|
#have_libcheck", "xyes")
|
|
|
|
#AC_CHECK_LIB([check],
|
|
|
|
# [suite_create], AC_MSG_WARN([Check not found; cannot run unit tests!]
|
|
|
|
# have_check=yes,
|
|
|
|
# AC_MSG_WARN([Check not found; cannot run unit tests!]))
|
|
|
|
#AM_CONDITIONAL(HAVE_CHECK, test x"$have_check", "xyes")
|
|
|
|
#AC_CHECK_FUNC([tcase_set_timeout])
|
|
|
|
#AM_CONDITIONAL(HAVE_CHECK, test xyes, xyes)
|
2004-07-06 01:22:18 +00:00
|
|
|
AC_CHECK_LIB([m], [sqrt])
|
|
|
|
AC_CHECK_LIB([pthread], [pthread_create])
|
2005-03-02 05:46:29 +00:00
|
|
|
AC_CHECK_LIB([confuse], [cfg_set_validate_func])
|
2004-06-24 21:10:31 +00:00
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
2004-07-06 01:22:18 +00:00
|
|
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h memory.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h errno.h])
|
2004-06-24 21:10:31 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
2004-12-30 23:07:47 +00:00
|
|
|
AC_STRUCT_TM
|
2004-06-24 21:10:31 +00:00
|
|
|
|
|
|
|
# Checks for library functions.
|
2004-12-30 23:07:47 +00:00
|
|
|
AC_FUNC_ERROR_AT_LINE
|
2004-06-24 21:10:31 +00:00
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_MEMCMP
|
2004-12-30 23:07:47 +00:00
|
|
|
AC_FUNC_REALLOC
|
2004-06-24 21:10:31 +00:00
|
|
|
AC_FUNC_STAT
|
2005-03-13 02:24:01 +00:00
|
|
|
AC_CHECK_FUNCS([bzero fdatasync getcwd gettimeofday inet_ntoa localtime_r memmove memset mkdir powl posix_memalign socket sqrt strchr strdup strerror strrchr strstr strtoul tcase_set_timeout])
|
2004-06-24 21:10:31 +00:00
|
|
|
|
2005-03-12 22:11:18 +00:00
|
|
|
#AC_CONFIG_LIBMYSQLD
|
|
|
|
|
|
|
|
|
2004-06-24 21:10:31 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2004-12-30 23:07:47 +00:00
|
|
|
benchmarks/Makefile
|
|
|
|
benchmarks/berkeleyDB/Makefile
|
2004-06-24 21:10:31 +00:00
|
|
|
libdfa/Makefile
|
|
|
|
lladd/Makefile
|
|
|
|
pbl/Makefile
|
|
|
|
src/2pc/Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/apps/Makefile
|
|
|
|
src/apps/cht/Makefile
|
2006-06-15 22:30:08 +00:00
|
|
|
src/apps/readOnlyHash/Makefile
|
2004-06-24 21:10:31 +00:00
|
|
|
src/apps/cyrus/Makefile
|
|
|
|
src/libdfa/Makefile
|
|
|
|
src/lladd/Makefile
|
|
|
|
src/pbl/Makefile
|
2004-12-30 23:07:47 +00:00
|
|
|
src/pobj/Makefile
|
2004-06-24 21:10:31 +00:00
|
|
|
src/timing/Makefile
|
|
|
|
test/2pc/Makefile
|
|
|
|
test/Makefile
|
|
|
|
test/cht/Makefile
|
|
|
|
test/dfa/Makefile
|
|
|
|
test/lladd-old/Makefile
|
2004-07-06 01:22:18 +00:00
|
|
|
test/lladd/Makefile
|
2004-06-24 21:10:31 +00:00
|
|
|
test/messages/Makefile
|
2004-07-06 01:22:18 +00:00
|
|
|
test/monotree/Makefile
|
2004-12-30 23:07:47 +00:00
|
|
|
test/pobj/Makefile
|
2004-10-18 18:24:54 +00:00
|
|
|
utilities/Makefile
|
|
|
|
])
|
2004-06-24 21:10:31 +00:00
|
|
|
AC_OUTPUT
|