diff options
Diffstat (limited to 'build_posix')
-rw-r--r-- | build_posix/Make.base | 8 | ||||
-rw-r--r-- | build_posix/Make.subdirs | 9 | ||||
-rw-r--r-- | build_posix/aclocal/options.m4 | 54 | ||||
-rwxr-xr-x | build_posix/makemake | 2 | ||||
-rwxr-xr-x | build_posix/reconf | 3 |
5 files changed, 66 insertions, 10 deletions
diff --git a/build_posix/Make.base b/build_posix/Make.base index b8dc92d67e9..c2d0a39511f 100644 --- a/build_posix/Make.base +++ b/build_posix/Make.base @@ -59,3 +59,11 @@ $(srcdir)/docs/man/man3/wiredtiger.3: $(srcdir)/docs/index.html clean-local: rm -rf WT_TEST + +libwiredtiger_la_LIBADD = +if HAVE_BUILTIN_EXTENSION_SNAPPY +libwiredtiger_la_LIBADD += ext/compressors/snappy/libwiredtiger_snappy.la +endif +if HAVE_BUILTIN_EXTENSION_ZLIB +libwiredtiger_la_LIBADD += ext/compressors/zlib/libwiredtiger_zlib.la +endif diff --git a/build_posix/Make.subdirs b/build_posix/Make.subdirs index ed79c19d7b5..249fba04f34 100644 --- a/build_posix/Make.subdirs +++ b/build_posix/Make.subdirs @@ -5,10 +5,6 @@ # # If the directory exists, it is added to AUTO_SUBDIRS. # If a condition is included, the subdir is made conditional via AM_CONDITIONAL -api/leveldb LEVELDB -bench/tcbench -bench/wtperf -examples/c ext/collators/reverse ext/compressors/bzip2 BZIP2 ext/compressors/nop @@ -16,6 +12,11 @@ ext/compressors/snappy SNAPPY ext/compressors/zlib ZLIB ext/datasources/helium HAVE_HELIUM ext/test/kvs_bdb HAVE_BERKELEY_DB +. +api/leveldb LEVELDB +bench/tcbench +bench/wtperf +examples/c lang/java JAVA lang/python PYTHON test/bloom diff --git a/build_posix/aclocal/options.m4 b/build_posix/aclocal/options.m4 index 1ca7c677233..8318c16e15d 100644 --- a/build_posix/aclocal/options.m4 +++ b/build_posix/aclocal/options.m4 @@ -13,6 +13,34 @@ no) wt_cv_enable_attach=no;; esac AC_MSG_RESULT($wt_cv_enable_attach) +AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_SNAPPY, + [Snappy support automatically loaded.]) +AH_TEMPLATE(HAVE_BUILTIN_EXTENSION_ZLIB, + [Zlib support automatically loaded.]) +AC_MSG_CHECKING(if --with-builtins option specified) +AC_ARG_WITH(builtins, + [AS_HELP_STRING([--with-builtins], + [builtin extension names (snappy, zlib).])], + [with_builtins=$withval], + [with_builtins=]) + +# Validate and setup each builtin extension library. +builtin_list=`echo "$with_builtins"|tr -s , ' '` +for builtin_i in $builtin_list; do + case "$builtin_i" in + snappy) AC_DEFINE(HAVE_BUILTIN_EXTENSION_SNAPPY) + wt_cv_with_builtin_extension_snappy=yes;; + zlib) AC_DEFINE(HAVE_BUILTIN_EXTENSION_ZLIB) + wt_cv_with_builtin_extension_zlib=yes;; + *) AC_MSG_ERROR([Unknown builtin extension "$builtin_i"]);; + esac +done +AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_SNAPPY], + [test "$wt_cv_with_builtin_extension_snappy" = "yes"]) +AM_CONDITIONAL([HAVE_BUILTIN_EXTENSION_ZLIB], + [test "$wt_cv_with_builtin_extension_zlib" = "yes"]) +AC_MSG_RESULT($with_builtins) + AC_MSG_CHECKING(if --enable-bzip2 option specified) AC_ARG_ENABLE(bzip2, [AS_HELP_STRING([--enable-bzip2], @@ -116,8 +144,17 @@ AC_ARG_ENABLE(snappy, [AS_HELP_STRING([--enable-snappy], [Build the snappy compressor extension.])], r=$enableval, r=no) case "$r" in -no) wt_cv_enable_snappy=no;; -*) wt_cv_enable_snappy=yes;; +no) if test "$wt_cv_with_builtin_extension_snappy" = "yes"; then + wt_cv_enable_snappy=yes + else + wt_cv_enable_snappy=no + fi + ;; +*) if test "$wt_cv_with_builtin_extension_snappy" = "yes"; then + AC_MSG_ERROR( + [Only one of --enable-snappy --with-builtins=snappy allowed]) + fi + wt_cv_enable_snappy=yes;; esac AC_MSG_RESULT($wt_cv_enable_snappy) if test "$wt_cv_enable_snappy" = "yes"; then @@ -164,8 +201,17 @@ AC_ARG_ENABLE(zlib, [AS_HELP_STRING([--enable-zlib], [Build the zlib compressor extension.])], r=$enableval, r=no) case "$r" in -no) wt_cv_enable_zlib=no;; -*) wt_cv_enable_zlib=yes;; +no) if test "$wt_cv_with_builtin_extension_zlib" = "yes"; then + wt_cv_enable_zlib=yes + else + wt_cv_enable_zlib=no + fi + ;; +*) if test "$wt_cv_with_builtin_extension_zlib" = "yes"; then + AC_MSG_ERROR( + [Only one of --enable-zlib --with-builtins=zlib allowed]) + fi + wt_cv_enable_zlib=yes;; esac AC_MSG_RESULT($wt_cv_enable_zlib) if test "$wt_cv_enable_zlib" = "yes"; then diff --git a/build_posix/makemake b/build_posix/makemake index 44d5571e279..6623519f7e7 100755 --- a/build_posix/makemake +++ b/build_posix/makemake @@ -6,7 +6,7 @@ # (in release trees, some of the subdirs might be excluded). (sed -n '1,/BEGIN SUBDIRS/p' Make.base -echo "SUBDIRS = ." +echo "SUBDIRS =" sed -e 's/#.*$//' -e '/^$/d' Make.subdirs | (while read dir cond ; do test -d ../$dir || continue if test -n "$cond" ; then diff --git a/build_posix/reconf b/build_posix/reconf index 9249acaccf0..8700c5da43d 100755 --- a/build_posix/reconf +++ b/build_posix/reconf @@ -54,7 +54,8 @@ echo "# This file is built automatically from build_posix/configure.ac.in." sed -n '1,/BEGIN check existence/p' configure.ac.in -sed -e 's/#.*$//' -e '/^$/d' Make.subdirs | while read dir cond ; do +sed -e 's/#.*$//' -e '/^$/d' -e '/^\.$/d' Make.subdirs | \ +while read dir cond ; do test -d ../$dir || continue echo 'AC_CONFIG_FILES(['$dir/Makefile'])' done |