mirror of https://github.com/fltk/fltk
Use pkg-config to find libpng - still does the simple test as a backup...
This commit is contained in:
parent
b5516449a6
commit
944ae5b040
17
configure.ac
17
configure.ac
|
@ -766,7 +766,22 @@ AS_IF([test x$enable_localzlib != xyes], [
|
|||
# but only, if the builtin lib is not requested
|
||||
syspnglib_ok=no
|
||||
syspnginc_ok=no
|
||||
AS_IF([test x$enable_localpng != xyes], [
|
||||
AS_IF([test x$enable_localpng != xyes -a x$PKGCONFIG != x], [
|
||||
AC_MSG_CHECKING([for libpng-1.6.x])
|
||||
AS_IF([$PKGCONFIG --exists libpng16], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE([HAVE_PNG_H], 1, [Have PNG library?])
|
||||
syspnginc_ok=yes
|
||||
syspnglib_ok=yes
|
||||
PNGINC="$($PKGCONFIG --cflags libpng16)"
|
||||
IMAGELIBS="$($PKGCONFIG --libs libpng16) $IMAGELIBS"
|
||||
STATICIMAGELIBS="$($PKGCONFIG --libs libpng16) $STATICIMAGELIBS"
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test x$enable_localpng != xyes -a $syspnglib_ok = no], [
|
||||
AC_CHECK_LIB([png], [png_read_info], [
|
||||
AC_CHECK_HEADER([png.h], [
|
||||
AC_DEFINE([HAVE_PNG_H])
|
||||
|
|
Loading…
Reference in New Issue