summaryrefslogtreecommitdiff
path: root/build_posix
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-05-01 11:00:08 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-05-01 11:00:08 -0400
commit58b6978fa1911faadeaeecda07cb5a723a367216 (patch)
treeb3780e0cc65144c131d2373ae188d43450a4c04d /build_posix
parent17fc7dd7045eca1a393baf3743fcc873d567038b (diff)
downloadmongo-58b6978fa1911faadeaeecda07cb5a723a367216.tar.gz
Simplify the autoconf that checks for bzip2 headers/libraries.
Pull the header/library checks outside of the existing AC_MSG_XX conditionals, otherwise the autoconf output gets messy. Add matching checks for the snappy headers/libraries.
Diffstat (limited to 'build_posix')
-rw-r--r--build_posix/aclocal/options.m430
1 files changed, 19 insertions, 11 deletions
diff --git a/build_posix/aclocal/options.m4 b/build_posix/aclocal/options.m4
index 80c92571ecd..e2512bc260d 100644
--- a/build_posix/aclocal/options.m4
+++ b/build_posix/aclocal/options.m4
@@ -19,18 +19,17 @@ AC_ARG_ENABLE(bzip2,
[Build the bzip2 compressor extension.])], r=$enableval, r=no)
case "$r" in
no) wt_cv_enable_bzip2=no;;
-*) AC_CHECK_HEADER(bzlib.h)
- AC_CHECK_LIB(bz2, bzip2_compress)
- if test "$ac_cv_header_bzlib_h" = "no"; then
- AC_MSG_ERROR([--enable-bzip2 requires bzlib.h])
- fi
- if test "$ac_cv_lib_bz2" = "no"; then
- AC_MSG_ERROR([--enable-bzip2 requires bz2 library])
- fi
+*)
wt_cv_enable_bzip2=yes;;
esac
AC_MSG_RESULT($wt_cv_enable_bzip2)
-AM_CONDITIONAL([BZIP2], [test x$wt_cv_enable_bzip2 = xyes])
+if test "$wt_cv_enable_bzip2" = "yes"; then
+ AC_CHECK_HEADER(bzlib.h,,
+ [AC_MSG_ERROR([--enable-bzip2 requires bzlib.h])])
+ AC_CHECK_LIB(bz2, BZ2_bzCompress,,
+ [AC_MSG_ERROR([--enable-bzip2 requires bz2 library])])
+fi
+AM_CONDITIONAL([BZIP2], [test "$wt_cv_enable_bzip2" = "yes"])
AC_MSG_CHECKING(if --enable-debug option specified)
AC_ARG_ENABLE(debug,
@@ -88,10 +87,19 @@ AC_ARG_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;;
+*)
+ wt_cv_enable_snappy=yes;;
esac
AC_MSG_RESULT($wt_cv_enable_snappy)
-AM_CONDITIONAL([SNAPPY], [test x$wt_cv_enable_snappy = xyes])
+if test "$wt_cv_enable_snappy" = "yes"; then
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADER(snappy.h,,
+ [AC_MSG_ERROR([--enable-snappy requires snappy.h])])
+ AC_LANG_POP([C++])
+ AC_CHECK_LIB(snappy, snappy_compress,,
+ [AC_MSG_ERROR([--enable-snappy requires snappy library])])
+fi
+AM_CONDITIONAL([SNAPPY], [test "$wt_cv_enable_snappy" = "yes"])
AC_MSG_CHECKING(if --with-spinlock option specified)
AH_TEMPLATE(SPINLOCK_TYPE, [Spinlock type from mutex.h.])