Commit c3d8a29a authored by Alexandre Julliard's avatar Alexandre Julliard

windowscodecs: Use the bundled libpng.

parent 9f9441c9
......@@ -641,8 +641,6 @@ MPG123_LIBS
MPG123_CFLAGS
TIFF_LIBS
TIFF_CFLAGS
PNG_LIBS
PNG_CFLAGS
JXRLIB_LIBS
JXRLIB_CFLAGS
JPEG_LIBS
......@@ -881,7 +879,6 @@ with_opengl
with_osmesa
with_oss
with_pcap
with_png
with_pthread
with_pulse
with_quicktime
......@@ -1978,8 +1975,6 @@ JPEG_CFLAGS
JPEG_LIBS
JXRLIB_CFLAGS
JXRLIB_LIBS
PNG_CFLAGS
PNG_LIBS
TIFF_CFLAGS
TIFF_LIBS
MPG123_CFLAGS
......@@ -2666,7 +2661,6 @@ Optional Packages:
--without-osmesa do not use the OSMesa library
--without-oss do not use the OSS sound support
--without-pcap do not use the Packet Capture library
--without-png do not use PNG
--without-pthread do not use the pthread library
--without-pulse do not use PulseAudio sound support
--without-quicktime do not use QuickTime support
......@@ -2791,8 +2785,6 @@ Some influential environment variables:
JXRLIB_CFLAGS
C compiler flags for jxrlib, overriding pkg-config
JXRLIB_LIBS Linker flags for jxrlib, overriding pkg-config
PNG_CFLAGS C compiler flags for libpng, overriding pkg-config
PNG_LIBS Linker flags for libpng, overriding pkg-config
TIFF_CFLAGS C compiler flags for libtiff-4, overriding pkg-config
TIFF_LIBS Linker flags for libtiff-4, overriding pkg-config
MPG123_CFLAGS
......@@ -4176,12 +4168,6 @@ if test "${with_pcap+set}" = set; then :
fi
# Check whether --with-png was given.
if test "${with_png+set}" = set; then :
withval=$with_png;
fi
# Check whether --with-pthread was given.
if test "${with_pthread+set}" = set; then :
withval=$with_pthread; if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi
......@@ -16022,110 +16008,6 @@ esac
fi
if test "x$with_png" != "xno"
then
if ${PNG_CFLAGS:+false} :; then :
if ${PKG_CONFIG+:} false; then :
PNG_CFLAGS=`$PKG_CONFIG --cflags libpng 2>/dev/null`
fi
fi
test "$cross_compiling" = yes || PNG_CFLAGS=${PNG_CFLAGS:-$X_CFLAGS}
if ${PNG_LIBS:+false} :; then :
if ${PKG_CONFIG+:} false; then :
PNG_LIBS=`$PKG_CONFIG --libs libpng 2>/dev/null`
fi
fi
test "$cross_compiling" = yes || PNG_LIBS=${PNG_LIBS:-$X_LIBS}
$as_echo "$as_me:${as_lineno-$LINENO}: libpng cflags: $PNG_CFLAGS" >&5
$as_echo "$as_me:${as_lineno-$LINENO}: libpng libs: $PNG_LIBS" >&5
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
for ac_header in png.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
if test "x$ac_cv_header_png_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_PNG_H 1
_ACEOF
fi
done
if test "$ac_cv_header_png_h" = "yes"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lpng" >&5
$as_echo_n "checking for -lpng... " >&6; }
if ${ac_cv_lib_soname_png+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lpng $PNG_LIBS -lm -lz $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 png_create_read_struct ();
int
main ()
{
return png_create_read_struct ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
case "$LIBEXT" in
dll) ac_cv_lib_soname_png=`$ac_cv_path_LDD conftest.exe | grep "png" | sed -e "s/dll.*/dll/"';2,$d'` ;;
dylib) ac_cv_lib_soname_png=`$OTOOL -L conftest$ac_exeext | grep "libpng[0-9]*\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libpng[0-9]*\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_png=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libpng[0-9]*\\.$LIBEXT" | sed -e "s/^.*\\[\\(libpng[0-9]*\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
if ${ac_cv_lib_soname_png:+false} :; then :
ac_cv_lib_soname_png=`$LDD conftest$ac_exeext | grep "libpng[0-9]*\\.$LIBEXT" | sed -e "s/^.*\(libpng[0-9]*\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
fi ;;
esac
else
ac_cv_lib_soname_png=
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_soname_save_LIBS
fi
if ${ac_cv_lib_soname_png:+false} :; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
PNG_CFLAGS=""
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_png" >&5
$as_echo "$ac_cv_lib_soname_png" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBPNG "$ac_cv_lib_soname_png"
_ACEOF
fi
else
PNG_CFLAGS=""
fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
if test "x$ac_cv_lib_soname_png" = "x"; then :
case "x$with_png" in
x) as_fn_append wine_warnings "|libpng ${notice_platform}development files not found, PNG won't be supported." ;;
xno) ;;
*) as_fn_error $? "libpng ${notice_platform}development files not found, PNG won't be supported.
This is an error since --with-png was requested." "$LINENO" 5 ;;
esac
fi
if test "x$with_tiff" != "xno"
then
if ${TIFF_CFLAGS:+false} :; then :
......@@ -19739,8 +19621,6 @@ JPEG_CFLAGS = $JPEG_CFLAGS
JPEG_LIBS = $JPEG_LIBS
JXRLIB_CFLAGS = $JXRLIB_CFLAGS
JXRLIB_LIBS = $JXRLIB_LIBS
PNG_CFLAGS = $PNG_CFLAGS
PNG_LIBS = $PNG_LIBS
TIFF_CFLAGS = $TIFF_CFLAGS
TIFF_LIBS = $TIFF_LIBS
MPG123_CFLAGS = $MPG123_CFLAGS
......
......@@ -75,7 +75,6 @@ AC_ARG_WITH(osmesa, AS_HELP_STRING([--without-osmesa],[do not use the OSMesa
AC_ARG_WITH(oss, AS_HELP_STRING([--without-oss],[do not use the OSS sound support]))
AC_ARG_WITH(pcap, AS_HELP_STRING([--without-pcap],[do not use the Packet Capture library]),
[if test "x$withval" = "xno"; then ac_cv_header_pcap_pcap_h=no; fi])
AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]))
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
AC_ARG_WITH(pulse, AS_HELP_STRING([--without-pulse],[do not use PulseAudio sound support]))
......@@ -1813,22 +1812,6 @@ fi
WINE_NOTICE_WITH(jxrlib,[test "x$ac_cv_lib_soname_jxrglue" = "x"],
[jxrlib ${notice_platform}development files not found, JPEG-XR won't be supported.])
dnl **** Check for libpng ****
if test "x$with_png" != "xno"
then
WINE_PACKAGE_FLAGS(PNG,[libpng],,[$X_CFLAGS],[$X_LIBS],
[AC_CHECK_HEADERS([png.h])
if test "$ac_cv_header_png_h" = "yes"
then
WINE_CHECK_SONAME(png,png_create_read_struct,,
[PNG_CFLAGS=""],[$PNG_LIBS -lm -lz],[[libpng[[0-9]]*]])
else
PNG_CFLAGS=""
fi])
fi
WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"],
[libpng ${notice_platform}development files not found, PNG won't be supported.])
dnl **** Check for libtiff ****
if test "x$with_tiff" != "xno"
then
......
MODULE = windowscodecs.dll
IMPORTLIB = windowscodecs
IMPORTS = windowscodecs uuid ole32 oleaut32 propsys rpcrt4 shlwapi user32 gdi32 advapi32
EXTRAINCL = $(JPEG_CFLAGS) $(PNG_CFLAGS) $(TIFF_CFLAGS)
IMPORTS = $(PNG_PE_LIBS) windowscodecs uuid ole32 oleaut32 propsys rpcrt4 shlwapi user32 gdi32 advapi32
EXTRAINCL = $(PNG_PE_CFLAGS) $(JPEG_CFLAGS) $(TIFF_CFLAGS)
EXTRALIBS = $(APPLICATIONSERVICES_LIBS)
C_SRCS = \
......
......@@ -251,7 +251,7 @@ HRESULT PngDecoder_CreateInstance(REFIID iid, void** ppv)
struct decoder *decoder;
struct decoder_info decoder_info;
hr = get_unix_decoder(&CLSID_WICPngDecoder, &decoder_info, &decoder);
hr = png_decoder_create(&decoder_info, &decoder);
if (SUCCEEDED(hr))
hr = CommonDecoder_CreateInstance(decoder, &decoder_info, iid, ppv);
......@@ -265,7 +265,7 @@ HRESULT PngEncoder_CreateInstance(REFIID iid, void** ppv)
struct encoder *encoder;
struct encoder_info encoder_info;
hr = get_unix_encoder(&CLSID_WICPngEncoder, &encoder_info, &encoder);
hr = png_encoder_create(&encoder_info, &encoder);
if (SUCCEEDED(hr))
hr = CommonEncoder_CreateInstance(encoder, &encoder_info, iid, ppv);
......
......@@ -69,10 +69,6 @@ HRESULT CDECL stream_write(IStream *stream, const void *buffer, ULONG write, ULO
HRESULT CDECL decoder_create(const CLSID *decoder_clsid, struct decoder_info *info, struct decoder **result)
{
if (IsEqualGUID(decoder_clsid, &CLSID_WICPngDecoder)||
IsEqualGUID(decoder_clsid, &CLSID_WICPngDecoder2))
return png_decoder_create(info, result);
if (IsEqualGUID(decoder_clsid, &CLSID_WICTiffDecoder))
return tiff_decoder_create(info, result);
......@@ -84,9 +80,6 @@ HRESULT CDECL decoder_create(const CLSID *decoder_clsid, struct decoder_info *in
HRESULT CDECL encoder_create(const CLSID *encoder_clsid, struct encoder_info *info, struct encoder **result)
{
if (IsEqualGUID(encoder_clsid, &CLSID_WICPngEncoder))
return png_encoder_create(info, result);
if (IsEqualGUID(encoder_clsid, &CLSID_WICTiffEncoder))
return tiff_encoder_create(info, result);
......
......@@ -450,9 +450,6 @@
/* Define to 1 if you have the `pipe2' function. */
#undef HAVE_PIPE2
/* Define to 1 if you have the <png.h> header file. */
#undef HAVE_PNG_H
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
......@@ -1025,9 +1022,6 @@
/* Define to the soname of the libOSMesa library. */
#undef SONAME_LIBOSMESA
/* Define to the soname of the libpng library. */
#undef SONAME_LIBPNG
/* Define to the soname of the libsane library. */
#undef SONAME_LIBSANE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment