diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 97 |
1 files changed, 60 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac index 45575bed..879901de 100644 --- a/configure.ac +++ b/configure.ac @@ -344,31 +344,53 @@ fi AC_CHECK_FUNCS(pread64 lseek64) dnl Test for zlib -AC_ARG_ENABLE([zlib], - [AS_HELP_STRING([--enable-zlib],[Build with zlib])], - [],[enable_zlib="no"]) +AC_ARG_ENABLE(zlib, + AC_HELP_STRING([--disable-zlib], + [Don't build against zlib.]), + enable_zlib=$enableval, + enable_zlib="try") + +AC_ARG_ENABLE([zlib_uncompress], + AS_HELP_STRING([--enable-zlib-uncompress], + [Use zlib to uncompress flate streams (not totally safe)]), + enable_zlib_uncompress=$enableval, + enable_zlib_uncompress="no") + if test x$enable_zlib = xyes; then - AC_CHECK_LIB([z], [inflate],, - AC_MSG_ERROR("*** zlib library not found ***")) - AC_CHECK_HEADERS([zlib.h],, - AC_MSG_ERROR("*** zlib headers not found ***")) + AC_CHECK_LIB([z], [inflate],, + AC_MSG_ERROR("*** zlib library not found ***")) + AC_CHECK_HEADERS([zlib.h],, + AC_MSG_ERROR("*** zlib headers not found ***")) elif test x$enable_zlib = xtry; then - AC_CHECK_LIB([z], [inflate], - [enable_zlib="yes"], - [enable_zlib="no"]) - AC_CHECK_HEADERS([zlib.h],, - [enable_zlib="no"]) + AC_CHECK_LIB([z], [inflate], + [enable_zlib="yes"], + [enable_zlib="no"]) + AC_CHECK_HEADERS([zlib.h],, + [enable_zlib="no"]) fi if test x$enable_zlib = xyes; then - ZLIB_LIBS="-lz" - AC_SUBST(ZLIB_LIBS) - AC_DEFINE(ENABLE_ZLIB) + ZLIB_LIBS="-lz" + AC_SUBST(ZLIB_LIBS) + AC_DEFINE(ENABLE_ZLIB, 1, [Build against zlib.]) + + if test x$enable_zlib_uncompress = xyes; then + AC_DEFINE(ENABLE_ZLIB_UNCOMPRESS, 1, + [Use zlib instead of builtin zlib decoder to uncompress flate streams.]) + fi +else + if test x$enable_zlib_uncompress = xyes; then + echo " Warning: --enable-zlib-uncompress is incompatible with --disable-zlib." + fi + enable_zlib_uncompress="no" fi AM_CONDITIONAL(BUILD_ZLIB, test x$enable_zlib = xyes) AH_TEMPLATE([ENABLE_ZLIB], - [Use zlib instead of builtin zlib decoder.]) + [Build against zlib.]) +AM_CONDITIONAL(BUILD_ZLIB_UNCOMPRESS, test x$enable_zlib_uncompress = xyes) +AH_TEMPLATE([ENABLE_ZLIB_UNCOMPRESS], + [Use zlib instead of builtin zlib decoder to uncompress flate streams.]) dnl Test for libcurl AC_ARG_ENABLE(libcurl, @@ -989,24 +1011,25 @@ poppler-cpp-uninstalled.pc]) echo "" echo "Building poppler with support for:" -echo " font configuration: $with_font_configuration" -echo " splash output: $enable_splash_output" +echo " font configuration: $with_font_configuration" +echo " splash output: $enable_splash_output" if test x$enable_cmyk = xyes;then echo " with CMYK support" fi -echo " cairo output: $use_cairo" -echo " qt4 wrapper: $enable_poppler_qt4" -echo " qt5 wrapper: $enable_poppler_qt5" -echo " glib wrapper: $use_glib" -echo " introspection: $found_introspection" -echo " cpp wrapper: $enable_poppler_cpp" -echo " use gtk-doc: $enable_gtk_doc" -echo " use libjpeg: $enable_libjpeg" -echo " use libpng: $enable_libpng" -echo " use libtiff: $enable_libtiff" -echo " use zlib: $enable_zlib" -echo " use libcurl: $enable_libcurl" -echo " use libopenjpeg: $enable_libopenjpeg" +echo " cairo output: $use_cairo" +echo " qt4 wrapper: $enable_poppler_qt4" +echo " qt5 wrapper: $enable_poppler_qt5" +echo " glib wrapper: $use_glib" +echo " introspection: $found_introspection" +echo " cpp wrapper: $enable_poppler_cpp" +echo " use gtk-doc: $enable_gtk_doc" +echo " use libjpeg: $enable_libjpeg" +echo " use libpng: $enable_libpng" +echo " use libtiff: $enable_libtiff" +echo " use zlib compress: $enable_zlib" +echo " use zlib uncompress: $enable_zlib_uncompress" +echo " use libcurl: $enable_libcurl" +echo " use libopenjpeg: $enable_libopenjpeg" if test x$enable_libopenjpeg = xyes;then if test x$openjpeg1 = xyes;then echo " with openjpeg1" @@ -1014,7 +1037,7 @@ if test x$enable_libopenjpeg = xyes;then echo " with openjpeg2" fi fi -echo " use cms: $enable_cms" +echo " use cms: $enable_cms" if test x$enable_cms = xyes;then if test x$lcms1 = xyes;then echo " with lcms1" @@ -1023,10 +1046,10 @@ if test x$enable_cms = xyes;then fi fi if test x$enable_build_type != xno;then - echo " build type: $enable_build_type" + echo " build type: $enable_build_type" fi -echo " command line utils: $enable_utils" -echo " test data dir: $TESTDATADIR" +echo " command line utils: $enable_utils" +echo " test data dir: $TESTDATADIR" echo "" if test x$enable_splash_output = xno -a x$enable_cairo_output = xno; then @@ -1041,8 +1064,8 @@ if test x$enable_libjpeg != xyes; then echo " Warning: Using libjpeg is recommended. The internal DCT decoder is unmaintained." fi -if test x$enable_zlib != xno; then - echo " Warning: Using zlib is not totally safe" +if test x$enable_zlib_uncompress != xno; then + echo " Warning: Using zlib for decompression is not totally safe" fi if test x$enable_libopenjpeg != xyes; then |