summaryrefslogtreecommitdiff
path: root/build_posix
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2013-05-01 17:13:26 +1000
committerAlex Gorrod <alexg@wiredtiger.com>2013-05-01 17:13:26 +1000
commit274922e65b357cee7ca0a90d135adc7bcc03c29b (patch)
tree1e255b374a0c4e2fd2af6a15d2cd57778c47cb15 /build_posix
parent51bc2038cad6d033d188ffd1e925f8183e80e5fd (diff)
downloadmongo-274922e65b357cee7ca0a90d135adc7bcc03c29b.tar.gz
Have configure check for header and library when bzip is enabled.
Diffstat (limited to 'build_posix')
-rw-r--r--build_posix/aclocal/options.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/build_posix/aclocal/options.m4 b/build_posix/aclocal/options.m4
index 6856cdd0769..f77375dbf00 100644
--- a/build_posix/aclocal/options.m4
+++ b/build_posix/aclocal/options.m4
@@ -19,7 +19,15 @@ AC_ARG_ENABLE(bzip2,
[Build the bzip2 compressor extension.])], r=$enableval, r=no)
case "$r" in
no) wt_cv_enable_bzip2=no;;
-*) wt_cv_enable_bzip2=yes;;
+*) AC_CHECK_HEADER(bzlib.h)
+ AC_CHECK_LIB(bz2)
+ 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])