Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas


Modified Files:
        configure.in 


Log Message:


libpng checks using pkg-config :)

===================================================================
RCS file: /cvs/e/e17/libs/evas/configure.in,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -3 -r1.169 -r1.170
--- configure.in        13 Jul 2006 19:48:09 -0000      1.169
+++ configure.in        14 Jul 2006 20:37:05 -0000      1.170
@@ -646,11 +646,15 @@
 #######################################
 ## PNG
 have_png="no";
-AC_CHECK_HEADER(png.h,
-  [ have_png="yes" ],
-  [ have_png="no" ]
-)
 AC_MSG_CHECKING(whether to enable png image loader)
+if   pkg-config --exists libpng12; then
+  have_png="yes";
+elif pkg-config --exists libpng10; then
+  have_png="yes";
+elif pkg-config --exists libpng; then
+  have_png="yes";
+fi
+
 AC_ARG_ENABLE(image-loader-png, 
   [  --enable-image-loader-png       enable PNG image loader], [
       if test x"$enableval" = x"yes" ; then
@@ -665,26 +669,20 @@
   ]
 )
 if test "x$have_png" = "xyes"; then
-  AC_CHECK_HEADER(png.h,
-    [ have_png="yes" ],
-    [ have_png="no" ]
-  )
-fi
-# RHEL 3 has broken png libs. the default /usr/include/png*.h files are from
-# libpng 1.0 but the default libpng.so is from 1.2 - bad bad. need to try link
-# to libpng10 first.
-if test "x$have_png" = "xyes"; then
-  AC_DEFINE(BUILD_LOADER_PNG, 1, [PNG Image Loader Support])
-  png_cflags=""
-  AC_CHECK_LIB(png10, png_check_sig, [
-    png_libs="-lpng10 -lz -lm"
-  ], [
-    AC_CHECK_LIB(png, png_check_sig, [
-      png_libs="-lpng -lz -lm"
-    ], [
-      have_png="no"
-    ], -lz -lm)
-  ], -lz -lm)
+  if   pkg-config --exists libpng12; then
+    png_cflags=`pkg-config --cflags libpng12`
+    png_libs=`pkg-config --libs libpng12`
+    AC_MSG_CHECKING(libpng 1.2.x)
+  elif pkg-config --exists libpng10; then
+    png_cflags=`pkg-config --cflags libpng10`
+    png_libs=`pkg-config --libs libpng10`
+    AC_MSG_CHECKING(libpng 1.0.x)
+  elif pkg-config --exists libpng; then
+    png_cflags=`pkg-config --cflags libpng`
+    png_libs=`pkg-config --libs libpng`
+    AC_MSG_CHECKING(generic system libpng)
+  fi
+  AC_MSG_RESULT($have_png)
 fi
 
 AM_CONDITIONAL(BUILD_LOADER_PNG, test x$have_png = xyes)




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to