From 10a958562db7fe82f62cf17e77b0f216e229d727 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 17 Jun 2020 22:46:48 +0100 Subject: [PATCH 1/2] Fix configure for builtin libtiff We need to ensure the configure arguments to disable features are passed in immediately before calling, because the builtin is the fallback if the system library is not found. Fixes #18791 --- configure | 25 +++++-------------------- configure.in | 19 ++++++++----------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 650b207713..2c0e7970aa 100755 --- a/configure +++ b/configure @@ -1028,7 +1028,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1455,7 +1454,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1708,15 +1706,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1854,7 +1843,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -2007,7 +1996,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -21854,13 +21842,6 @@ fi fi fi -if test "$wxUSE_LIBTIFF" = "builtin"; then - ac_configure_args="$ac_configure_args --disable-webp --disable-zstd" - if test "$wxUSE_LIBLZMA" = "no"; then - ac_configure_args="$ac_configure_args --disable-lzma" - fi -fi - JBIG_LINK= if test "$wxUSE_LIBJBIG" = "yes"; then @@ -22135,6 +22116,10 @@ $as_echo "$as_me: WARNING: system tiff library not found, will use built-in inst fi fi if test "$wxUSE_LIBTIFF" = "builtin" ; then + ac_configure_args="$ac_configure_args --disable-webp --disable-zstd" + if test "$wxUSE_LIBLZMA" = "no"; then + ac_configure_args="$ac_configure_args --disable-lzma" + fi if test "$wxUSE_LIBJPEG" = "no"; then ac_configure_args="$ac_configure_args --disable-jpeg" fi diff --git a/configure.in b/configure.in index b99a2aae7b..5c82a9c1e6 100644 --- a/configure.in +++ b/configure.in @@ -2622,17 +2622,6 @@ if test "$wxUSE_LIBLZMA" != "no"; then fi fi -dnl Disable the use of lzma, webp and zstd in built-in libtiff explicitly, as -dnl otherwise we'd depend on the system libraries, which is typically -dnl undesirable when using builtin libraries. If we use lzma ourselves, keep it -dnl enabled. -if test "$wxUSE_LIBTIFF" = "builtin"; then - ac_configure_args="$ac_configure_args --disable-webp --disable-zstd" - if test "$wxUSE_LIBLZMA" = "no"; then - ac_configure_args="$ac_configure_args --disable-lzma" - fi -fi - dnl ------------------------------------------------------------------------ dnl Check for jbig library dnl ------------------------------------------------------------------------ @@ -2704,6 +2693,14 @@ if test "$wxUSE_LIBTIFF" != "no" ; then fi fi if test "$wxUSE_LIBTIFF" = "builtin" ; then + dnl Disable the use of lzma, webp and zstd in built-in libtiff explicitly, as + dnl otherwise we'd depend on the system libraries, which is typically + dnl undesirable when using builtin libraries. If we use lzma ourselves, keep it + dnl enabled. + ac_configure_args="$ac_configure_args --disable-webp --disable-zstd" + if test "$wxUSE_LIBLZMA" = "no"; then + ac_configure_args="$ac_configure_args --disable-lzma" + fi if test "$wxUSE_LIBJPEG" = "no"; then dnl we have to prevent the builtin libtiff configure from building the dnl library with JPEG support as this was explicitly disabled by user, From b7600b0b1b852983866e540338cde43b1b8f49d0 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 17 Jun 2020 23:14:01 +0100 Subject: [PATCH 2/2] Ensure jbig support is disabled for builtin libtiff --- configure | 3 +-- configure.in | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 2c0e7970aa..baf5559ac2 100755 --- a/configure +++ b/configure @@ -21885,8 +21885,6 @@ if test "x$ac_cv_lib_jbig_jbg_dec_init" = xyes; then : JBIG_LINK=" -ljbig" fi -else - ac_configure_args="$ac_configure_args --disable-jbig" fi @@ -22123,6 +22121,7 @@ $as_echo "$as_me: WARNING: system tiff library not found, will use built-in inst if test "$wxUSE_LIBJPEG" = "no"; then ac_configure_args="$ac_configure_args --disable-jpeg" fi + ac_configure_args="$ac_configure_args --disable-jbig" subdirs="$subdirs src/tiff" diff --git a/configure.in b/configure.in index 5c82a9c1e6..8928ffe038 100644 --- a/configure.in +++ b/configure.in @@ -2629,8 +2629,6 @@ dnl ------------------------------------------------------------------------ JBIG_LINK= if test "$wxUSE_LIBJBIG" = "yes"; then AC_CHECK_LIB(jbig, jbg_dec_init, JBIG_LINK=" -ljbig") -else - ac_configure_args="$ac_configure_args --disable-jbig" fi dnl ------------------------------------------------------------------------ @@ -2710,6 +2708,9 @@ if test "$wxUSE_LIBTIFF" != "no" ; then dnl we need to hack around this ac_configure_args="$ac_configure_args --disable-jpeg" fi + dnl We don't provide a built-in version of the libjbig library, so + dnl disable it for the builtin libtiff. + ac_configure_args="$ac_configure_args --disable-jbig" AC_CONFIG_SUBDIRS([src/tiff]) fi fi