]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
adapt to wx conventions for scroll wheel differences between horizontal and vertical...
[wxWidgets.git] / configure.in
index e00e614b72f3f397e667d3697d5562d92c5b9a01..e87b56cfcc21116e94204043d19b406dc628701f 100644 (file)
@@ -585,6 +585,8 @@ dnl ---------------------------------------------------------------------------
 WX_ARG_SYS_WITH(libpng,    [  --with-libpng           use libpng (PNG image format)], wxUSE_LIBPNG)
 WX_ARG_SYS_WITH(libjpeg,   [  --with-libjpeg          use libjpeg (JPEG file format)], wxUSE_LIBJPEG)
 WX_ARG_SYS_WITH(libtiff,   [  --with-libtiff          use libtiff (TIFF file format)], wxUSE_LIBTIFF)
+WX_ARG_WITHOUT(libjbig,    [  --without-libjbig       don't use libjbig in libtiff even if available)], wxUSE_LIBJBIG)
+WX_ARG_WITHOUT(liblzma,    [  --without-liblzma       don't use liblzma in libtiff even if available)], wxUSE_LIBLZMA)
 WX_ARG_SYS_WITH(libxpm,    [  --with-libxpm           use libxpm (XPM file format)], wxUSE_LIBXPM)
 WX_ARG_WITH(libiconv,      [  --with-libiconv         use libiconv (character conversion)], wxUSE_LIBICONV)
 WX_ARG_WITH(libmspack,     [  --with-libmspack        use libmspack (CHM help files loading)], wxUSE_LIBMSPACK)
@@ -2700,6 +2702,24 @@ if test "$wxUSE_LIBTIFF" != "no" ; then
             dnl we need to hack around this
             ac_configure_args="$ac_configure_args --disable-jpeg"
         fi
+
+        if test "$wxUSE_LIBLZMA" = "yes"; then
+            dnl If libtiff configure detects lzma library, it enables support for
+            dnl LZMA compression and using it requires linking with liblzma.
+            AC_CHECK_LIB(lzma, lzma_code, [LIBS="$LIBS -llzma"])
+        else
+            dnl Prevent libtiff configure from looking for liblzma if it's
+            dnl explicitly disabled.
+            ac_configure_args="$ac_configure_args --disable-lzma"
+        fi
+
+        dnl Similarly for jbig
+        if test "$wxUSE_LIBJBIG" = "yes"; then
+            AC_CHECK_LIB(jbig, jbg_dec_init, [LIBS="$LIBS -ljbig"])
+        else
+            ac_configure_args="$ac_configure_args --disable-jbig"
+        fi
+
         AC_CONFIG_SUBDIRS([src/tiff])
     fi
 fi