PACKAGE=wiredtiger AC_PREREQ(2.63) AC_INIT(WiredTiger, m4_normalize(m4_include([build_posix/aclocal/version.m4])), [support@wiredtiger.com]) m4_include([build_posix/aclocal/version-set.m4]) AC_CONFIG_AUX_DIR([build_posix/gnu-support]) AC_CONFIG_MACRO_DIR([build_posix/aclocal]) AC_CONFIG_SRCDIR([RELEASE]) AM_INIT_AUTOMAKE([1.10 foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])]) AM_OPTIONS # If CFLAGS was not set on entry and we are not debugging, default to -O3 wt_test_CFLAGS=${CFLAGS+set} if test "$wt_test_CFLAGS" != set && test "$wt_cv_enable_debug" != "yes"; then CFLAGS="-O3" fi define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl LT_PREREQ(2.2.6) LT_INIT([pic-only]) AC_SUBST([LIBTOOL_DEPS]) AC_PROG_CC(cc gcc) # AC_PROG_CXX(c++ g++) # Add debugging flags if requested and not already in CFLAGS if test "$wt_cv_enable_debug" = "yes"; then case "$CFLAGS" in *-g*) ;; *) AM_CFLAGS="$AM_CFLAGS -g" ;; esac fi if test "$GCC" = "yes"; then # The Solaris gcc compiler gets the additional -pthreads flag. if test "`uname -s`" = "SunOS"; then AM_CFLAGS="$AM_CFLAGS -pthreads" fi else # The Solaris native compiler gets the additional -mt flag. if test "`uname -s`" = "SunOS"; then AM_CFLAGS="$AM_CFLAGS -mt" fi fi AM_CONDITIONAL([DEBUG], [test "$wt_cv_enable_debug" = "yes"]) # Java and Python APIs if test "$wt_cv_enable_java" = "yes" -o "$wt_cv_enable_python" = "yes"; then AX_PKG_SWIG(2.0.4, [], [AC_MSG_WARN([SWIG is required to rebuild Java or Python APIs.])]) fi if test "$wt_cv_enable_java" = "yes"; then JAVAC=${JAVAC-javac} AX_PROG_JAVAC AX_PROG_JAR AX_JNI_INCLUDE_DIR if test "$wt_cv_enable_debug" = "yes"; then AX_CHECK_JUNIT fi for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS ; do JNI_CPPFLAGS="$JNI_CPPFLAGS -I$JNI_INCLUDE_DIR" done AC_SUBST(JNI_CPPFLAGS) fi if test "$wt_cv_enable_python" = "yes"; then AM_PATH_PYTHON([2.6]) if test -n "$with_python_prefix" ; then PYTHON_INSTALL_ARG="-d $with_python_prefix" fi AC_SUBST(PYTHON_INSTALL_ARG) fi AM_TYPES AC_PROG_INSTALL AC_CHECK_HEADERS([pthread_np.h]) AC_CHECK_LIB(pthread, pthread_create) AC_CHECK_LIB(dl, dlopen) AC_CHECK_LIB(rt, sched_yield) AC_CHECK_FUNCS([\ clock_gettime fcntl ftruncate gettimeofday posix_fadvise\ posix_fallocate posix_madvise posix_memalign strtouq sync_file_range]) AC_SYS_LARGEFILE AC_MSG_CHECKING([if the adaptive mutex type is available]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);]])], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_MUTEX_ADAPTIVE], [1], [Define if adaptive mutexes are supported.])], [AC_MSG_RESULT([no])]) AC_C_BIGENDIAN # Linux requires _GNU_SOURCE to be defined and buffers aligned to 4KB # boundaries for O_DIRECT to work. BUFFER_ALIGNMENT=0 if test "$ac_cv_func_posix_memalign" = "yes" ; then case "`uname -s`" in Linux) AM_CFLAGS="$AM_CFLAGS -D_GNU_SOURCE" BUFFER_ALIGNMENT=4096 ;; esac fi AC_DEFINE_UNQUOTED(WT_BUFFER_ALIGNMENT_DEFAULT, $BUFFER_ALIGNMENT, [Default alignment of bufffers used for I/O]) AC_SUBST(AM_CFLAGS) # test/format requires an installed Berkeley DB release tree. bdbdir=`ls -d "$ac_pwd/db" /usr/local/BerkeleyDB* 2>/dev/null | head -1` if ! test -d "$bdbdir" ; then bdbdir="NO_BERKELEY_DB_LIBRARY_FOUND" fi AM_CONDITIONAL([HAVE_BERKELEY_DB], [test -d $bdbdir]) AC_SUBST(BERKELEY_DB_PATH, [$bdbdir]) # test/format optionally supports the MEMRATA KVS library. memrata_dir=`ls -d "$ac_pwd/memrata" 2>/dev/null | head -1` if ! test -d "$memrata_dir" ; then memrata_dir="NO_MEMRATA_LIBRARY_FOUND" fi AM_CONDITIONAL([HAVE_MEMRATA], [test -d $memrata_dir]) AC_SUBST(MEMRATA_PATH, [$memrata_dir]) # Warn that diagnostic builds should not be used in production if test "$wt_cv_enable_diagnostic" = "yes"; then AC_MSG_WARN( [DIAGNOSTIC BUILDS ARE NOT RECOMMENDED FOR PRODUCTION DEPLOYMENT.]) fi # Output files AC_CONFIG_HEADERS([wiredtiger_config.h:build_posix/config.hin]) # BEGIN check existence -- maintained by reconf and Make.subdirs # END check existence AC_CONFIG_FILES([ Makefile wiredtiger.h:src/include/wiredtiger.in wiredtiger.pc:build_posix/wiredtiger.pc.in ]) AC_OUTPUT