directfb (1.2.10.0-4) 05_link_dynamic.patch

Summary

 configure.in         |   21 ++++-----------------
 src/core/Makefile.am |    3 +++
 2 files changed, 7 insertions(+), 17 deletions(-)

    
download this patch

Patch contents

Status: sent-upstream

--- a/configure.in
+++ b/configure.in
@@ -726,19 +726,6 @@ AC_ARG_ENABLE(png,
   enable_png="$enableval", enable_png=yes)
 
 if test "$enable_png" = "yes"; then
-  dnl Test for libz
-  if test -z "$ZLIB_LIBS"; then
-    AC_CHECK_LIB(z, gzsetparams,
-      [
-	AC_CHECK_HEADER(zlib.h,
-	  ZLIB_LIBS='-lz',
-	  AC_MSG_WARN([
-*** libz header files not found. PNG image provider will not be built.]))
-      ],[
-        AC_MSG_WARN([ *** libz not found. PNG image provider will not be built.])
-      ])
-  fi
-
   AC_PATH_PROG(LIBPNG_CONFIG, libpng-config, no)
   if test "$LIBPNG_CONFIG" = no; then
       PNG=no
@@ -750,7 +737,7 @@ if test "$enable_png" = "yes"; then
   fi
 
   dnl Test for libpng
-  if test -z "$LIBPNG" && test -n "$ZLIB_LIBS"; then
+  if test -z "$LIBPNG"; then
     AC_CHECK_LIB(png, png_read_info,
       [
 	AC_CHECK_HEADER(png.h,
@@ -761,7 +748,7 @@ if test "$enable_png" = "yes"; then
         AC_MSG_WARN([
 *** PNG library not found. PNG image provider will not be built.])
 	],
-      $ZLIB_LIBS -lm)
+      -lm)
     if test "$png_ok" = yes; then
       AC_MSG_CHECKING([for png_structp in png.h])
       AC_TRY_COMPILE([#include <png.h>],
@@ -773,7 +760,7 @@ if test "$enable_png" = "yes"; then
       AC_MSG_RESULT($png_ok)
       if test "$png_ok" = yes; then
 	PNG=yes
-        LIBPNG="-lpng $ZLIB_LIBS -lm"
+        LIBPNG="-lpng -lm"
       else
 	PNG=no
         AC_MSG_WARN([
@@ -1420,7 +1407,7 @@ AM_CONDITIONAL(BUILD_TOOLS, test "$with_
 AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = "yes")
 
 CFLAGS="$CFLAGS $DFB_INTERNAL_CFLAGS"
-DFB_LDFLAGS="$LDFLAGS $ZLIB_LIBS"
+DFB_LDFLAGS="$LDFLAGS"
 
 
 
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -80,3 +80,6 @@ libdirectfb_core_la_SOURCES = \
 	windows.c		\
 	windowstack.c		\
 	wm.c
+
+libdirectfb_core_la_LIBADD = @ZLIB_LIBS@
+