From 3cb49512086a4b9a4eb810da9053b1d488317e82 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 10 Jun 2013 15:52:17 +0000 Subject: [PATCH] Link with libjbig when using built-in libtiff under Unix. If libjbig is available, the built-in libtiff build process picks it up and uses it, requiring all the code linking with libtiff to link with it too, so add it to the list of the libraries in this case. This is the same change as was already done for liblzma dependency in r74033, see #14963. Closes #15244. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 41 +++++++++++++++++++++++++++++++++++++++++ configure.in | 3 +++ 2 files changed, 44 insertions(+) diff --git a/configure b/configure index 48cf932fd3..5adab9ed6d 100755 --- a/configure +++ b/configure @@ -22916,6 +22916,47 @@ if test "x$ac_cv_lib_lzma_lzma_code" = xyes; then : fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jbg_dec_init in -ljbig" >&5 +$as_echo_n "checking for jbg_dec_init in -ljbig... " >&6; } +if ${ac_cv_lib_jbig_jbg_dec_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljbig $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 jbg_dec_init (); +int +main () +{ +return jbg_dec_init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_jbig_jbg_dec_init=yes +else + ac_cv_lib_jbig_jbg_dec_init=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_jbig_jbg_dec_init" >&5 +$as_echo "$ac_cv_lib_jbig_jbg_dec_init" >&6; } +if test "x$ac_cv_lib_jbig_jbg_dec_init" = xyes; then : + LIBS="$LIBS -ljbig" +fi + + subdirs="$subdirs src/tiff" diff --git a/configure.in b/configure.in index e59926b81b..700c4ed76e 100644 --- a/configure.in +++ b/configure.in @@ -2705,6 +2705,9 @@ if test "$wxUSE_LIBTIFF" != "no" ; then dnl LZMA compression and using it requires linking with liblzma. AC_CHECK_LIB(lzma, lzma_code, [LIBS="$LIBS -llzma"]) + dnl Similarly for jbig + AC_CHECK_LIB(jbig, jbg_dec_init, [LIBS="$LIBS -ljbig"]) + AC_CONFIG_SUBDIRS([src/tiff]) fi fi -- 2.45.2