summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2008-11-10 21:05:22 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2008-11-10 21:05:22 +0000
commit6c279f990996aeb7a0994433cd6acb183299d4d6 (patch)
tree182d5c9d575315064a3a75087e91d3405af18283
parent9481db94d90d587c0714fcce30a0a14454d02c2f (diff)
Test the system png lib and headers only, if --enable-localpng is _not_ set.
Commented out an obsolete statement. Added a check for png_get_valid, if using the system lib. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6513 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--configure.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 12847316b..b1d44f72c 100644
--- a/configure.in
+++ b/configure.in
@@ -581,10 +581,12 @@ AC_CHECK_LIB(z,gzgets,
# 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])
-# Now check if system lib is usable, we check Lib AND include availability with inc variant
+# Now check if system lib is usable, we check Lib AND include availability with inc variant,
+# but only, if the builtin lib is not requested
syspnglib_ok=no
syspnginc_ok=no
-AC_CHECK_LIB(png, png_read_info,
+if test x$enable_localpng != xyes ; then
+ AC_CHECK_LIB(png, png_read_info,
[AC_CHECK_HEADER(png.h,
AC_DEFINE(HAVE_PNG_H)
syspnginc_ok=yes)
@@ -596,11 +598,12 @@ AC_CHECK_LIB(png, png_read_info,
else
syspnglib_ok=no
fi])
+fi
#AC_MSG_WARN("*** USING LIB OK : $syspnglib_ok")
# 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_cv_lib_png_png_set_tRNS_to_alpha=yes
AC_DEFINE(HAVE_LIBPNG)
AC_DEFINE(HAVE_PNG_H)
AC_DEFINE(HAVE_PNG_GET_VALID)
@@ -614,7 +617,7 @@ else
PNG=""
IMAGELIBS="-lpng $IMAGELIBS"
AC_DEFINE(HAVE_LIBPNG)
- AC_DEFINE(HAVE_PNG_GET_VALID)
+ AC_CHECK_LIB(png,png_get_valid, AC_DEFINE(HAVE_PNG_GET_VALID))
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