configure.ac: find libpng in /usr/X11 on MacOS

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Mon May 25 05:00:20 CDT 2009


Hi,

http://bugs.winehq.org/show_bug.cgi?id=18568
>Check out how fontconfig is handled, it has the same problem.
Thank you for the hint, here's the patch that fixes the issue.

>From 4c6d8cd5db9de4fe0e79392e8e3a99c6f289beae Mon Sep 17 00:00:00 2001
>From: =?utf-8?q?J=C3=B6rg=20H=C3=B6hle?= <hoehle at users.sourceforge.net>
Date: Sat, 23 May 2009 12:39:50 +0200
Subject: configure: find libpng in /usr/X11 on MacOS

---
 configure.ac                         |   13 +++++++++++++
 dlls/oleaut32/Makefile.in            |    1 +
 programs/winemenubuilder/Makefile.in |    1 +
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index fc88e58..a7b6850 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1299,6 +1299,19 @@ dnl **** Check for libpng ****
 if test "$ac_cv_header_png_h" = "yes"
 then
     WINE_CHECK_SONAME(png,png_create_read_struct,,,-lm -lz,[[libpng[[0-9]]*]])
+elif test -n "$X_CFLAGS" -a "x$with_png" != "xno"
+then
+    dnl libpng is in the X directory on Mac OS X
+    ac_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+    $as_unset ac_cv_header_png_h
+    AC_CHECK_HEADERS([png.h])
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    if test "$ac_cv_header_png_h" = "yes"
+    then
+        AC_SUBST(PNGINCL,"$X_CFLAGS")
+        WINE_CHECK_SONAME(png,png_create_read_struct,,,[$X_LIBS -lm -lz],[[libpng[[0-9]]*]])
+    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.])
diff --git a/dlls/oleaut32/Makefile.in b/dlls/oleaut32/Makefile.in
index cbc1ca1..5d41598 100644
--- a/dlls/oleaut32/Makefile.in
+++ b/dlls/oleaut32/Makefile.in
@@ -8,6 +8,7 @@ IMPORTS   = uuid ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll
 DELAYIMPORTS = comctl32 urlmon
 EXTRADEFS = -D_OLEAUT32_ -DCOM_NO_WINDOWS_H \
     -DENTRY_PREFIX=OLEAUTPS_ -DPROXY_CLSID=CLSID_PSDispatch -DPROXY_DELEGATION -DREGISTER_PROXY_DLL
+EXTRAINCL = @PNGINCL@
 
 C_SRCS = \
 	connpt.c \
diff --git a/programs/winemenubuilder/Makefile.in b/programs/winemenubuilder/Makefile.in
index 050b3b3..3f14801 100644
--- a/programs/winemenubuilder/Makefile.in
+++ b/programs/winemenubuilder/Makefile.in
@@ -6,6 +6,7 @@ VPATH     = @srcdir@
 MODULE    = winemenubuilder.exe
 APPMODE   = -mwindows
 IMPORTS   = uuid shell32 ole32 user32 advapi32 kernel32
+EXTRAINCL = @PNGINCL@
 
 C_SRCS = \
 	winemenubuilder.c
-- 
1.5.4.3



More information about the wine-patches mailing list