Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com X-Mailer: 21.2 (beta41) "Polyhymnia" XEmacs Lucid (via feedmail 8 I) To: martin DOT vermeer AT hut DOT fi Cc: cygwin-apps AT cygwin DOT com Subject: Patch for libwmf-0.1.21b to compile under cygwin-1.1.8 with libpng support X-Face: I-*}xvwusAv%MlABo'jVNP7TDXf5bb*L[q,r{DnsR1GoL07^Wf)sAu%>!LjXAFlZZN+`OQu }?#du]C)[*%ERKR#+l#sX'EoNbSO~|.x AT ogoS5|"-u? Date: 07 Feb 2001 11:59:06 +0100 Message-ID: Lines: 81 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Here is a patch for libwmf-0.1.21b to compile under cygwin-1.1.8 with libpng support. The main problem is that cygwin uses shared libraries from o ftp://ftp.franken.de/pub/win32/develop/gnuwin32/cygwin/mirrors/cygnus/contrib/libpng/libpng-1.0.9-3.tar.gz and configure doesn't detect libpng because it uses png_info_init to detect the png library. From libpng.txt: The old libpng functions png_read_init(), png_write_init(), png_info_init(), png_read_destroy(), and png_write_destory() have been moved to PNG_INTERNAL in version 0.95 to discourage their use. These functions will be removed from libpng version 2.0.0. And from png.c /* Allocate the memory for an info_struct for the application. We don't * really need the png_ptr, but it could potentially be useful in the * future. This should be used in favour of malloc(sizeof(png_info)) * and png_info_init() so that applications that want to use a shared * libpng don't have to be recompiled if png_info changes size. */ diff -upr /gnu/libwmf/configure libwmf/configure --- /gnu/libwmf/configure Wed Nov 29 07:02:00 2000 +++ libwmf/configure Tue Feb 6 15:52:36 2001 @@ -2626,9 +2626,9 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6 -echo "configure:2631: checking for png_info_init in -lpng" >&5 -ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'` + echo $ac_n "checking for png_create_info_struct in -lpng""... $ac_c" 1>&6 +echo "configure:2631: checking for png_create_info_struct in -lpng" >&5 +ac_lib_var=`echo png'_'png_create_info_struct | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2640,10 +2640,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then diff -upr /gnu/libwmf/configure.in libwmf/configure.in --- /gnu/libwmf/configure.in Sat Nov 25 17:31:31 2000 +++ libwmf/configure.in Tue Feb 6 15:51:25 2001 @@ -245,7 +245,7 @@ AC_ARG_WITH(png, AC_CHECK_HEADER(png.h, AC_CHECK_HEADER(pngconf.h, - AC_CHECK_LIB(png, png_info_init, + AC_CHECK_LIB(png, png_create_info_struct, AC_DEFINE(HasPNG) if test "x${PNG_DIR}" != "x"; then PNG_CFLAGS="-I${PNG_DIR}/include" diff -upr /gnu/libwmf/wmftofig.c libwmf/wmftofig.c --- /gnu/libwmf/wmftofig.c Thu Nov 9 10:18:44 2000 +++ libwmf/wmftofig.c Thu Feb 1 17:50:32 2001 @@ -1,6 +1,9 @@ #include #include #include +#ifdef __CYGWIN__ +#include +#endif #include "xfwmfapi.h" Ciao Volker