summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2008-11-10 20:11:36 +0000
committerFabien Costantini <fabien@onepost.net>2008-11-10 20:11:36 +0000
commit9481db94d90d587c0714fcce30a0a14454d02c2f (patch)
tree1f93e1ba36595ea1fbfdcc6a429d67828703ce57
parent04f6740b35b8998c4fab43256895b3165fcb51e2 (diff)
Now we finally can check as well if a correct PNG header was found, if it is not the case or the lib is not found, then syslib will be updated adequately. Reused latest Al AC_CHECK_HEADER() and included them from the begining in the syslib_ok test. Tested with default,disable,enable png.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6512 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--configure.in24
1 files changed, 18 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 176fc9a46..12847316b 100644
--- a/configure.in
+++ b/configure.in
@@ -580,11 +580,25 @@ AC_CHECK_LIB(z,gzgets,
# If --enable-(resp. --disable-)localpng parameter is not set by user
# Then we check the png lib usability with result in syspng_lib variable
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, default=auto])
-# does not work correctly under cygwin ? (header not found )
-#AC_CHECK_LIB(png, png_read_info, [AC_CHECK_HEADER(png.h, syslib_ok=yes)])
-AC_CHECK_LIB(png, png_read_info,[syspnglib_ok=yes], [syspnglib_ok=no])
+
+# Now check if system lib is usable, we check Lib AND include availability with inc variant
+syspnglib_ok=no
+syspnginc_ok=no
+AC_CHECK_LIB(png, png_read_info,
+ [AC_CHECK_HEADER(png.h,
+ AC_DEFINE(HAVE_PNG_H)
+ syspnginc_ok=yes)
+ AC_CHECK_HEADER(libpng/png.h,
+ AC_DEFINE(HAVE_LIBPNG_PNG_H)
+ syspnginc_ok=yes)
+ if test x$syspnginc_ok = xyes; then
+ syspnglib_ok=yes
+ else
+ syspnglib_ok=no
+ fi])
#AC_MSG_WARN("*** USING LIB OK : $syspnglib_ok")
-# The following is executed if the lib was not found or if local lib is required explicitly
+
+# The following is executed if the lib was not found usable or if local lib is required explicitly
if test x$enable_localpng = xyes -o x$syspnglib_ok = xno ; then
ac_cv_lib_png_png_set_tRNS_to_alpha=yes
AC_DEFINE(HAVE_LIBPNG)
@@ -601,8 +615,6 @@ else
IMAGELIBS="-lpng $IMAGELIBS"
AC_DEFINE(HAVE_LIBPNG)
AC_DEFINE(HAVE_PNG_GET_VALID)
- AC_CHECK_HEADER(png.h, AC_DEFINE(HAVE_PNG_H))
- AC_CHECK_HEADER(libpng/png.h, AC_DEFINE(HAVE_LIBPNG_PNG_H))
AC_CHECK_LIB(png,png_set_tRNS_to_alpha, AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA))
# AC_MSG_WARN("*** USING PNG LIB SETUP")
fi