Link with liblzma when using built-in libtiff if it's available.
New version of libtiff includes code using liblzma if it's available, so we need to link with it in this case. Closes #14963. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
42
configure
vendored
42
configure
vendored
@@ -22875,6 +22875,48 @@ $as_echo "$as_me: WARNING: system tiff library not found, will use built-in inst
|
||||
ac_configure_args="$ac_configure_args --disable-jpeg"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
|
||||
$as_echo_n "checking for lzma_code in -llzma... " >&6; }
|
||||
if ${ac_cv_lib_lzma_lzma_code+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-llzma $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char lzma_code ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return lzma_code ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_lzma_lzma_code=yes
|
||||
else
|
||||
ac_cv_lib_lzma_lzma_code=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5
|
||||
$as_echo "$ac_cv_lib_lzma_lzma_code" >&6; }
|
||||
if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then :
|
||||
LIBS="$LIBS -llzma"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
subdirs="$subdirs src/tiff"
|
||||
|
||||
|
@@ -2700,6 +2700,11 @@ if test "$wxUSE_LIBTIFF" != "no" ; then
|
||||
dnl we need to hack around this
|
||||
ac_configure_args="$ac_configure_args --disable-jpeg"
|
||||
fi
|
||||
|
||||
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"])
|
||||
|
||||
AC_CONFIG_SUBDIRS([src/tiff])
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user