try to fix the problem of built-in libtiff not finding libjpeg introduced in r49598

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-10 11:50:58 +00:00
parent d1e660b50a
commit 2956d9e1d8
2 changed files with 211 additions and 212 deletions

309
configure vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.in Id: configure.in 49607 2007-11-03 16:44:04Z PC . # From configure.in Id: configure.in 49661 2007-11-05 22:32:45Z VZ .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0. # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
# #
@@ -29165,159 +29165,6 @@ echo "$as_me: WARNING: system png library not found or too old, will use built-i
fi fi
TIFF_LINK=
TIFF_PREREQ_LINKS=-lm
if test "$wxUSE_LIBTIFF" != "no" ; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_LIBTIFF 1
_ACEOF
if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
if test "$wxUSE_LIBJPEG" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK"
fi
if test "$wxUSE_ZLIB" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
fi
{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
if test "${ac_cv_header_tiffio_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <tiffio.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_tiffio_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_tiffio_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
if test $ac_cv_header_tiffio_h = yes; then
{ echo "$as_me:$LINENO: checking for TIFFError in -ltiff" >&5
echo $ECHO_N "checking for TIFFError in -ltiff... $ECHO_C" >&6; }
if test "${ac_cv_lib_tiff_TIFFError+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltiff $TIFF_PREREQ_LINKS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 TIFFError ();
int
main ()
{
return TIFFError ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_tiff_TIFFError=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_tiff_TIFFError=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFError" >&5
echo "${ECHO_T}$ac_cv_lib_tiff_TIFFError" >&6; }
if test $ac_cv_lib_tiff_TIFFError = yes; then
TIFF_LINK=" -ltiff"
fi
fi
if test "x$TIFF_LINK" = "x" ; then
if test "$wxUSE_LIBTIFF" = "sys" ; then
{ { echo "$as_me:$LINENO: error: system tiff library not found! Use --with-libtiff=builtin to use built-in version" >&5
echo "$as_me: error: system tiff library not found! Use --with-libtiff=builtin to use built-in version" >&2;}
{ (exit 1); exit 1; }; }
else
{ echo "$as_me:$LINENO: WARNING: system tiff library not found, will use built-in instead" >&5
echo "$as_me: WARNING: system tiff library not found, will use built-in instead" >&2;}
wxUSE_LIBTIFF=builtin
fi
else
wxUSE_LIBTIFF=sys
fi
fi
if test "$wxUSE_LIBTIFF" = "builtin" ; then
subdirs="$subdirs src/tiff"
fi
fi
JPEG_LINK= JPEG_LINK=
if test "$wxUSE_LIBJPEG" != "no" ; then if test "$wxUSE_LIBJPEG" != "no" ; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
@@ -29985,10 +29832,162 @@ fi
fi fi
fi fi
fi fi
fi
TIFF_LINK=
TIFF_PREREQ_LINKS=-lm
if test "$wxUSE_LIBTIFF" != "no" ; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_LIBTIFF 1
_ACEOF
if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
if test "$wxUSE_LIBJPEG" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK"
fi
if test "$wxUSE_ZLIB" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
fi
{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
if test "${ac_cv_header_tiffio_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else else
if test "$wxUSE_LIBTIFF" = "builtin"; then cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <tiffio.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_tiffio_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_tiffio_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
if test $ac_cv_header_tiffio_h = yes; then
{ echo "$as_me:$LINENO: checking for TIFFError in -ltiff" >&5
echo $ECHO_N "checking for TIFFError in -ltiff... $ECHO_C" >&6; }
if test "${ac_cv_lib_tiff_TIFFError+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltiff $TIFF_PREREQ_LINKS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 TIFFError ();
int
main ()
{
return TIFFError ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_tiff_TIFFError=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_tiff_TIFFError=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFError" >&5
echo "${ECHO_T}$ac_cv_lib_tiff_TIFFError" >&6; }
if test $ac_cv_lib_tiff_TIFFError = yes; then
TIFF_LINK=" -ltiff"
fi
fi
if test "x$TIFF_LINK" = "x" ; then
if test "$wxUSE_LIBTIFF" = "sys" ; then
{ { echo "$as_me:$LINENO: error: system tiff library not found! Use --with-libtiff=builtin to use built-in version" >&5
echo "$as_me: error: system tiff library not found! Use --with-libtiff=builtin to use built-in version" >&2;}
{ (exit 1); exit 1; }; }
else
{ echo "$as_me:$LINENO: WARNING: system tiff library not found, will use built-in instead" >&5
echo "$as_me: WARNING: system tiff library not found, will use built-in instead" >&2;}
wxUSE_LIBTIFF=builtin
fi
else
wxUSE_LIBTIFF=sys
fi
fi
if test "$wxUSE_LIBTIFF" = "builtin" ; then
if test "$wxUSE_LIBJPEG" = "no"; then
ac_configure_args="$ac_configure_args --disable-jpeg" ac_configure_args="$ac_configure_args --disable-jpeg"
fi fi
subdirs="$subdirs src/tiff"
fi
fi fi

View File

@@ -2437,56 +2437,12 @@ if test "$wxUSE_LIBPNG" != "no" ; then
fi fi
fi fi
dnl ------------------------------------------------------------------------
dnl Check for tiff library
dnl ------------------------------------------------------------------------
TIFF_LINK=
TIFF_PREREQ_LINKS=-lm
if test "$wxUSE_LIBTIFF" != "no" ; then
AC_DEFINE(wxUSE_LIBTIFF)
if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
dnl libtiff may depend on libjpeg and libz so use them in the test
dnl below or it would fail
if test "$wxUSE_LIBJPEG" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK"
fi
if test "$wxUSE_ZLIB" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
fi
AC_CHECK_HEADER(tiffio.h,
[
AC_CHECK_LIB(tiff, TIFFError,
TIFF_LINK=" -ltiff",
,
$TIFF_PREREQ_LINKS)
],
[],
[ ]
)
if test "x$TIFF_LINK" = "x" ; then
if test "$wxUSE_LIBTIFF" = "sys" ; then
AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version])
else
AC_MSG_WARN([system tiff library not found, will use built-in instead])
wxUSE_LIBTIFF=builtin
fi
else
dnl we are using the system library
wxUSE_LIBTIFF=sys
fi
fi
if test "$wxUSE_LIBTIFF" = "builtin" ; then
AC_CONFIG_SUBDIRS([src/tiff])
fi
fi
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl Check for jpeg library dnl Check for jpeg library
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl this check must be done before the check for libtiff as libtiff uses
dnl libjpeg itself
JPEG_LINK= JPEG_LINK=
if test "$wxUSE_LIBJPEG" != "no" ; then if test "$wxUSE_LIBJPEG" != "no" ; then
AC_DEFINE(wxUSE_LIBJPEG) AC_DEFINE(wxUSE_LIBJPEG)
@@ -2559,9 +2515,51 @@ if test "$wxUSE_LIBJPEG" != "no" ; then
fi fi
fi fi
fi fi
else fi
dnl wxUSE_LIBJPEG = "no"
if test "$wxUSE_LIBTIFF" = "builtin"; then dnl ------------------------------------------------------------------------
dnl Check for tiff library
dnl ------------------------------------------------------------------------
TIFF_LINK=
TIFF_PREREQ_LINKS=-lm
if test "$wxUSE_LIBTIFF" != "no" ; then
AC_DEFINE(wxUSE_LIBTIFF)
if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
dnl libtiff may depend on libjpeg and libz so use them in the test
dnl below or it would fail
if test "$wxUSE_LIBJPEG" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $JPEG_LINK"
fi
if test "$wxUSE_ZLIB" = "sys"; then
TIFF_PREREQ_LINKS="$TIFF_PREREQ_LINKS $ZLIB_LINK"
fi
AC_CHECK_HEADER(tiffio.h,
[
AC_CHECK_LIB(tiff, TIFFError,
TIFF_LINK=" -ltiff",
,
$TIFF_PREREQ_LINKS)
],
[],
[ ]
)
if test "x$TIFF_LINK" = "x" ; then
if test "$wxUSE_LIBTIFF" = "sys" ; then
AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version])
else
AC_MSG_WARN([system tiff library not found, will use built-in instead])
wxUSE_LIBTIFF=builtin
fi
else
dnl we are using the system library
wxUSE_LIBTIFF=sys
fi
fi
if test "$wxUSE_LIBTIFF" = "builtin" ; then
if test "$wxUSE_LIBJPEG" = "no"; then
dnl we have to prevent the builtin libtiff configure from building the dnl we have to prevent the builtin libtiff configure from building the
dnl library with JPEG support as this was explicitly disabled by user, dnl library with JPEG support as this was explicitly disabled by user,
dnl but unfortunately it needs --disable-jpeg and not --without-libjpeg dnl but unfortunately it needs --disable-jpeg and not --without-libjpeg
@@ -2570,6 +2568,8 @@ else
dnl we need to hack around this dnl we need to hack around this
ac_configure_args="$ac_configure_args --disable-jpeg" ac_configure_args="$ac_configure_args --disable-jpeg"
fi fi
AC_CONFIG_SUBDIRS([src/tiff])
fi
fi fi
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------