Fixes the configure problem when the png option is not specified.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6509 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
5dfe62a97b
commit
c2d5dd32b5
49
configure.in
49
configure.in
@ -576,27 +576,34 @@ AC_CHECK_LIB(z,gzgets,
|
||||
IMAGELIBS="-lfltk_z $IMAGELIBS"
|
||||
fi)
|
||||
|
||||
AC_ARG_ENABLE(localpng, [ --enable-localpng use local PNG library, default=auto],
|
||||
[if test x$enable_localpng = xyes; then
|
||||
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)
|
||||
AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||
PNGINC="-I../png"
|
||||
PNG="png"
|
||||
IMAGELIBS="-lfltk_png $IMAGELIBS"
|
||||
else
|
||||
PNGINC=""
|
||||
PNG=""
|
||||
IMAGELIBS="-lpng $IMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBPNG)
|
||||
AC_DEFINE(HAVE_PNG_GET_VALID)
|
||||
AC_CHECK_LIB(png,png_set_tRNS_to_alpha,
|
||||
AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA))
|
||||
AC_CHECK_HEADER(png.h,
|
||||
AC_DEFINE(HAVE_PNG_H))
|
||||
fi])
|
||||
# Handle the PNG lib linking mode (use fltk local or system lib)
|
||||
# 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])
|
||||
#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
|
||||
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)
|
||||
AC_DEFINE(HAVE_PNG_H)
|
||||
AC_DEFINE(HAVE_PNG_GET_VALID)
|
||||
AC_DEFINE(HAVE_PNG_SET_TRNS_TO_ALPHA)
|
||||
PNGINC="-I../png"
|
||||
PNG="png"
|
||||
IMAGELIBS="-lfltk_png $IMAGELIBS"
|
||||
# AC_MSG_WARN("*** USING PNG LOCAL SETUP")
|
||||
else
|
||||
PNGINC=""
|
||||
PNG=""
|
||||
IMAGELIBS="-lpng $IMAGELIBS"
|
||||
AC_DEFINE(HAVE_LIBPNG)
|
||||
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
|
||||
|
||||
AC_SUBST(JPEG)
|
||||
AC_SUBST(JPEGINC)
|
||||
|
Loading…
Reference in New Issue
Block a user