From a0548db9f54485522e8ac2c36db21f717566dac1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 1 Feb 2016 00:54:58 +0100 Subject: [PATCH] Don't link with system lzma and jbig when using built-in libtiff It doesn't make much sense to have dependencies on the system libraries when using a built-in library as this makes the binaries using wxWidgets unportable to the systems without the matching versions of these libraries which was probably the goal if the built-in library is used. --- configure | 7 +++++++ configure.in | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d7ce1d6d18..030e3f22fd 100755 --- a/configure +++ b/configure @@ -4765,6 +4765,11 @@ $as_echo "builtin version" >&6; } fi +if test "$wxUSE_LIBTIFF" = "builtin" ; then + wxUSE_LIBJBIG=no + wxUSE_LIBLZMA=no +else + withstring=without defaultval=$wxUSE_ALL_FEATURES if test -z "$defaultval"; then @@ -4852,6 +4857,8 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $result" >&5 $as_echo "$result" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libxpm" >&5 $as_echo_n "checking for --with-libxpm... " >&6; } diff --git a/configure.in b/configure.in index 21308989ea..885c249d4d 100644 --- a/configure.in +++ b/configure.in @@ -531,8 +531,17 @@ 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) + +dnl We don't provide built-in versions of these libraries, so if the use of +dnl system libraries is explicitly disabled, we can't use them at all. +if test "$wxUSE_LIBTIFF" = "builtin" ; then + wxUSE_LIBJBIG=no + wxUSE_LIBLZMA=no +else + 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) +fi + 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)