X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=configure.ac;h=e084593ba2eb8af3e0d40bb332da8bd555025a91;hb=384139e1887e55e60d7e5b7852cb45a59b4d5367;hp=1edb8a44d0f7abaaebfbd87f5b838c53d49c72cb;hpb=68bb0f2c7a9d5c59f7a27e4f8450417b04660235;p=thirdparty%2Fsarg.git diff --git a/configure.ac b/configure.ac index 1edb8a4..e084593 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,16 @@ dnl Process this file with autoconf or autoreconf to produce a configure script. AC_INIT([sarg],[2.4.0-pre2]) AC_CONFIG_SRCDIR([log.c]) -AC_CONFIG_AUX_DIR(cfgaux) +AC_CONFIG_AUX_DIR([cfgaux]) +AC_CONFIG_MACRO_DIR([m4]) + +dnl We don't use automake but the following macro is required to +dnl install "install-sh" that is required by configure. +dnl I may be a bug in autoconf 2.69... +dnl But if it is enabled, the AM_GNU_GETTEXT produce a warning! +dnl The solution for now is to manually run automake -a before +dnl running the configure script +dnl AM_INIT_AUTOMAKE AC_CANONICAL_HOST @@ -189,6 +198,30 @@ AS_IF([test "x$with_zlib" != "xno" ], zlib_status="disabled" ]) +# Build with bzlib +AC_ARG_WITH([bzlib], + AS_HELP_STRING([--with-bzlib],[Compile with support to decompress bz2 files]), + [],[with_bzlib=check]) +AS_IF([test "x$with_bzlib" != "xno" ], +[ + AC_CHECK_HEADERS(bzlib.h) + AS_IF([test "x$ac_cv_header_bzlib_h" = "xyes"], + [ + AC_CHECK_LIB([bz2],[BZ2_bzReadOpen], + [ + LIBS="-lbz2 ${LIBS}" + HAVE_BZLIB_LIB="yes" + ],[ + HAVE_BZLIB_LIB="" + ]) + AS_IF([test "x$HAVE_BZLIB_LIB" != "xyes"],[AC_MSG_ERROR([bzlib was not found])]) + ],[ + bzlib_status="not found" + ]) +],[ + bzlib_status="disabled" +]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_STRUCT_TM @@ -441,3 +474,9 @@ AS_IF([test "x$zlib_status" = "xdisabled"],[ ],[test "x$zlib_status" = "xnot found"],[ AC_MSG_NOTICE([zlib.h was not found so it won't be possible to process gzipped files]) ]) + +AS_IF([test "x$bzlib_status" = "xdisabled"],[ + AC_MSG_NOTICE([Not building with bzlib as requested on the configuration command line]) +],[test "x$bzlib_status" = "xnot found"],[ + AC_MSG_NOTICE([bzlib.h was not found so it won't be possible to process bzipped files]) +])