teasame / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

configure doesn't use $PNG_INCLUDES etc. when checking for libpng #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm not sure what best way to fix this is, but the following does the trick:

diff --git a/configure.ac b/configure.ac
index 8009c4d..c47d59d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,10 @@ AC_ARG_WITH(pngincludedir,
 AC_ARG_WITH(pnglibdir,
             [--with-pnglibdir=DIR    use PNG libraries from DIR],
             [PNG_LIBS="-L$withval"])
-
+OLDCPPFLAGS=$CPPFLAGS
+OLDLIBS=$LIBS
+CPPFLAGS=$PNG_INCLUDES
+LIBS=$PNG_LIBS
 AC_CHECK_HEADER(png.h,
   AC_CHECK_LIB(png, main,
                [PNG_LIBS="$PNG_LIBS -lpng"
@@ -48,6 +51,8 @@ AC_CHECK_HEADER(png.h,
                [$MATH_LIBS]),
   AC_MSG_WARN(png library not available - no png.h)
 )
+CPPFLAGS=$OLDCPPFLAGS
+LIBS=$OLDLIBS
 AC_SUBST(PNG_LIBS)
 AC_SUBST(PNG_INCLUDES)

Original issue reported on code.google.com by jrmui...@gmail.com on 20 Jul 2011 at 7:06

GoogleCodeExporter commented 9 years ago
fixed as per https://review.webmproject.org/#change,2725

Original comment by pascal.m...@gmail.com on 2 Aug 2011 at 9:27