diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2013-05-01 17:13:26 +1000 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2013-05-01 17:13:26 +1000 |
commit | 274922e65b357cee7ca0a90d135adc7bcc03c29b (patch) | |
tree | 1e255b374a0c4e2fd2af6a15d2cd57778c47cb15 /build_posix | |
parent | 51bc2038cad6d033d188ffd1e925f8183e80e5fd (diff) | |
download | mongo-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.m4 | 10 |
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]) |