don't check for libjpeg,libtiff and libpng when building wxMGL,

they are part of libmgl and we want to reuse them (for two reasons: one, they are
dynamically loaded at runtime; and two, we get symbols conflicts otherwise


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-01-26 00:21:42 +00:00
parent bdffd806c3
commit 81809c07b4
2 changed files with 544 additions and 513 deletions

944
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1464,32 +1464,41 @@ PNG_INCLUDE=
PNG_LINK= PNG_LINK=
if test "$wxUSE_LIBPNG" != "no" ; then if test "$wxUSE_LIBPNG" != "no" ; then
AC_DEFINE(wxUSE_LIBPNG) AC_DEFINE(wxUSE_LIBPNG)
if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then
AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead])
wxUSE_LIBPNG=sys
fi
dnl for the check below to have a chance to succeed, we must already have dnl for the check below to have a chance to succeed, we must already have
dnl libz somewhere dnl libz somewhere (don't do this when bulding wxMGL since its libpng
if test "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then dnl doesn't depend on zlib)
if test "$wxUSE_MGL" != 1 -a "$wxUSE_LIBPNG" = "sys" -a "$wxUSE_ZLIB" != "sys" ; then
AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead]) AC_MSG_WARN([system png library doesn't work without system zlib, will use built-in instead])
wxUSE_LIBPNG=builtin wxUSE_LIBPNG=builtin
fi fi
if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then if test "$wxUSE_MGL" != 1 ; then
AC_CHECK_HEADER(png.h, dnl Don't check for libpng when building wxMGL, libmgl contains it
AC_CHECK_LIB(png, png_check_sig, if test "$wxUSE_LIBPNG" = "sys" -o "$wxUSE_LIBPNG" = "yes" ; then
PNG_LINK=" -lpng", AC_CHECK_HEADER(png.h,
, AC_CHECK_LIB(png, png_check_sig,
[-lz -lm]) PNG_LINK=" -lpng",
) ,
[-lz -lm])
)
if test "x$PNG_LINK" = "x" ; then if test "x$PNG_LINK" = "x" ; then
if test "$wxUSE_LIBPNG" = "sys" ; then if test "$wxUSE_LIBPNG" = "sys" ; then
AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version]) AC_MSG_ERROR([system png library not found! Use --with-libpng=builtin to use built-in version])
else
AC_MSG_WARN([system png library not found, will use built-in instead])
wxUSE_LIBPNG=builtin
fi
else else
AC_MSG_WARN([system png library not found, will use built-in instead]) dnl we are using the system library
wxUSE_LIBPNG=builtin wxUSE_LIBPNG=yes
fi fi
else
dnl we are using the system library
wxUSE_LIBPNG=yes
fi fi
fi fi
@@ -1509,40 +1518,48 @@ JPEG_LINK=
if test "$wxUSE_LIBJPEG" != "no" ; then if test "$wxUSE_LIBJPEG" != "no" ; then
AC_DEFINE(wxUSE_LIBJPEG) AC_DEFINE(wxUSE_LIBJPEG)
if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBJPEG" = "builtin" ; then
dnl can't use AC_CHECK_HEADER as jconfig.h defines things like AC_MSG_WARN([wxMGL doesn't work with builtin jpeg library, will use MGL one instead])
dnl HAVE_STDLIB_H which are already defined and this provokes wxUSE_LIBJPEG=sys
dnl a compiler warning which configure considers as an error... fi
AC_MSG_CHECKING(for jpeglib.h)
AC_CACHE_VAL(ac_cv_header_jpeglib_h, if test "$wxUSE_MGL" != 1 ; then
AC_TRY_COMPILE( dnl Don't check for libjpeg when building wxMGL, libmgl contains it
[ if test "$wxUSE_LIBJPEG" = "sys" -o "$wxUSE_LIBJPEG" = "yes" ; then
#undef HAVE_STDLIB_H dnl can't use AC_CHECK_HEADER as jconfig.h defines things like
#include <stdio.h> dnl HAVE_STDLIB_H which are already defined and this provokes
#include <jpeglib.h> dnl a compiler warning which configure considers as an error...
], AC_MSG_CHECKING(for jpeglib.h)
[ AC_CACHE_VAL(ac_cv_header_jpeglib_h,
], AC_TRY_COMPILE(
ac_cv_header_jpeglib_h=yes, [
ac_cv_header_jpeglib_h=no #undef HAVE_STDLIB_H
#include <stdio.h>
#include <jpeglib.h>
],
[
],
ac_cv_header_jpeglib_h=yes,
ac_cv_header_jpeglib_h=no
)
) )
) AC_MSG_RESULT($ac_cv_header_jpeglib_h)
AC_MSG_RESULT($ac_cv_header_jpeglib_h)
if test "$ac_cv_header_jpeglib_h" = "yes"; then if test "$ac_cv_header_jpeglib_h" = "yes"; then
AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg") AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK=" -ljpeg")
fi fi
if test "x$JPEG_LINK" = "x" ; then if test "x$JPEG_LINK" = "x" ; then
if test "$wxUSE_LIBJPEG" = "sys" ; then if test "$wxUSE_LIBJPEG" = "sys" ; then
AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version]) AC_MSG_ERROR([system jpeg library not found! Use --with-libjpeg=builtin to use built-in version])
else else
AC_MSG_WARN([system jpeg library not found, will use built-in instead]) AC_MSG_WARN([system jpeg library not found, will use built-in instead])
wxUSE_LIBJPEG=builtin wxUSE_LIBJPEG=builtin
fi
else
dnl we are using the system library
wxUSE_LIBJPEG=sys
fi fi
else
dnl we are using the system library
wxUSE_LIBJPEG=sys
fi fi
fi fi