mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
Use the exact PNG_INCLUDES/PNG_LIBS when testing for -lpng
(and same for jpeg) fixes issue #87 Change-Id: I857a828058f9653be21fe97437bf5a0d2c30835e
This commit is contained in:
parent
ad9b45f1c8
commit
a31f843a9f
20
configure.ac
20
configure.ac
@ -38,6 +38,11 @@ AC_ARG_WITH(pnglibdir,
|
||||
[--with-pnglibdir=DIR use PNG libraries from DIR],
|
||||
[PNG_LIBS="-L$withval"])
|
||||
|
||||
SAVED_CPPFLAGS=$CPPFLAGS
|
||||
SAVED_LIBS=$LIBS
|
||||
CPPFLAGS="$PNG_INCLUDES $CPPFLAGS"
|
||||
LIBS="$PNG_LIBS $LIBS"
|
||||
|
||||
AC_CHECK_HEADER(png.h,
|
||||
AC_CHECK_LIB(png, main,
|
||||
[PNG_LIBS="$PNG_LIBS -lpng"
|
||||
@ -51,6 +56,9 @@ AC_CHECK_HEADER(png.h,
|
||||
AC_SUBST(PNG_LIBS)
|
||||
AC_SUBST(PNG_INCLUDES)
|
||||
|
||||
CPPFLAGS=$SAVED_CPPFLAGS
|
||||
LIBS=$SAVED_LIBS
|
||||
|
||||
dnl === check for JPEG support ===
|
||||
|
||||
JPEG_INCLUDES=""
|
||||
@ -62,6 +70,11 @@ AC_ARG_WITH(jpeglibdir,
|
||||
[--with-jpeglibdir=DIR use JPEG libraries from DIR],
|
||||
[JPEG_LIBS="-L$withval"])
|
||||
|
||||
SAVED_CPPFLAGS=$CPPFLAGS
|
||||
SAVED_LIBS=$LIBS
|
||||
CPPFLAGS="$JPEG_INCLUDES $CPPFLAGS"
|
||||
LIBS="$JPEG_LIBS $LIBS"
|
||||
|
||||
AC_CHECK_HEADER(jpeglib.h,
|
||||
AC_CHECK_LIB(jpeg, jpeg_set_defaults,
|
||||
[JPEG_LIBS="$JPEG_LIBS -ljpeg"
|
||||
@ -75,13 +88,16 @@ AC_CHECK_HEADER(jpeglib.h,
|
||||
AC_SUBST(JPEG_LIBS)
|
||||
AC_SUBST(JPEG_INCLUDES)
|
||||
|
||||
CPPFLAGS=$SAVED_CPPFLAGS
|
||||
LIBS=$SAVED_LIBS
|
||||
|
||||
dnl === check for WIC support ===
|
||||
|
||||
if test "$target_os" = "mingw32"; then
|
||||
AC_CHECK_HEADERS([wincodec.h shlwapi.h windows.h])
|
||||
if test "$ac_cv_header_wincodec_h" = "yes"; then
|
||||
AC_MSG_CHECKING(for Windows Imaging Component support)
|
||||
saved_LIBS=$LIBS
|
||||
SAVED_LIBS=$LIBS
|
||||
LIBS="-lshlwapi -lole32 $LIBS"
|
||||
# match include structure from [cd]webp.c
|
||||
wic_headers="
|
||||
@ -113,7 +129,7 @@ if test "$target_os" = "mingw32"; then
|
||||
)
|
||||
AC_LANG_POP
|
||||
|
||||
test "$wic_support" = "yes" || LIBS=$saved_LIBS
|
||||
test "$wic_support" = "yes" || LIBS=$SAVED_LIBS
|
||||
AC_MSG_RESULT(${wic_support-no})
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user