prevent builtin libtiff from using libjpeg if --without-libjpeg was specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
100
configure.in
100
configure.in
@@ -2437,6 +2437,52 @@ if test "$wxUSE_LIBPNG" != "no" ; then
|
||||
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 Check for jpeg library
|
||||
dnl ------------------------------------------------------------------------
|
||||
@@ -2513,51 +2559,15 @@ if test "$wxUSE_LIBJPEG" != "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])
|
||||
else dnl wxUSE_LIBJPEG = "no"
|
||||
if test "$wxUSE_LIBTIFF" = "builtin"; 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,
|
||||
dnl but unfortunately it needs --disable-jpeg and not --without-libjpeg
|
||||
dnl (which will be passed to it anyhow as configure passes arguments to
|
||||
dnl the top-level script to all the other ones called recursively), so
|
||||
dnl we need to hack around this
|
||||
ac_configure_args="$ac_configure_args --disable-jpeg"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user