revise FIND_*() macros

they should set CFLAGS, not INCLUDE
This commit is contained in:
John Cupitt 2018-07-02 20:22:41 +01:00
parent d756705929
commit 039c716f63
6 changed files with 36 additions and 36 deletions

View File

@ -40,9 +40,9 @@ if test "$GIFLIB_INCLUDES" = ""; then
], [ ], [
# gif_lib.h is not in the standard search path, try # gif_lib.h is not in the standard search path, try
# $prefix # $prefix
giflib_save_INCLUDES="$INCLUDES" giflib_save_CFLAGS="$CFLAGS"
INCLUDES="-I${prefix}/include $INCLUDES" CFLAGS="-I${prefix}/include $CFLAGS"
AC_TRY_COMPILE([#include <gif_lib.h>],[int a;],[ AC_TRY_COMPILE([#include <gif_lib.h>],[int a;],[
GIFLIB_INCLUDES="-I${prefix}/include" GIFLIB_INCLUDES="-I${prefix}/include"
@ -50,17 +50,17 @@ if test "$GIFLIB_INCLUDES" = ""; then
GIFLIB_INCLUDES="no" GIFLIB_INCLUDES="no"
]) ])
INCLUDES=$giflib_save_INCLUDES CFLAGS=$giflib_save_CFLAGS
]) ])
fi fi
# Now for the libraries # Now for the libraries
if test "$GIFLIB_LIBS" = ""; then if test "$GIFLIB_LIBS" = ""; then
giflib_save_LIBS="$LIBS" giflib_save_LIBS="$LIBS"
giflib_save_INCLUDES="$INCLUDES" giflib_save_CFLAGS="$CFLAGS"
LIBS="-lgif $LIBS" LIBS="-lgif $LIBS"
INCLUDES="$GIFLIB_INCLUDES $INCLUDES" CFLAGS="$GIFLIB_INCLUDES $CFLAGS"
# Try the standard search path first # Try the standard search path first
AC_TRY_LINK([#include <gif_lib.h>],[DGifSlurp(0)], [ AC_TRY_LINK([#include <gif_lib.h>],[DGifSlurp(0)], [
@ -78,7 +78,7 @@ if test "$GIFLIB_LIBS" = ""; then
]) ])
LIBS="$giflib_save_LIBS" LIBS="$giflib_save_LIBS"
INCLUDES="$giflib_save_INCLUDES" CFLAGS="$giflib_save_CFLAGS"
fi fi
AC_SUBST(GIFLIB_LIBS) AC_SUBST(GIFLIB_LIBS)

View File

@ -41,9 +41,9 @@ if test "$JPEG_INCLUDES" = ""; then
], [ ], [
# jpeglib.h is not in the standard search path, try # jpeglib.h is not in the standard search path, try
# $prefix # $prefix
jpeg_save_INCLUDES="$INCLUDES" jpeg_save_CFLAGS="$CFLAGS"
INCLUDES="-I${prefix}/include $INCLUDES" CFLAGS="-I${prefix}/include $CFLAGS"
AC_TRY_COMPILE([#include <stdio.h> AC_TRY_COMPILE([#include <stdio.h>
#include <jpeglib.h>],[int a;],[ #include <jpeglib.h>],[int a;],[
@ -52,17 +52,17 @@ if test "$JPEG_INCLUDES" = ""; then
JPEG_INCLUDES="no" JPEG_INCLUDES="no"
]) ])
INCLUDES=$jpeg_save_INCLUDES CFLAGS=$jpeg_save_CFLAGS
]) ])
fi fi
# Now for the libraries # Now for the libraries
if test "$JPEG_LIBS" = ""; then if test "$JPEG_LIBS" = ""; then
jpeg_save_LIBS="$LIBS" jpeg_save_LIBS="$LIBS"
jpeg_save_INCLUDES="$INCLUDES" jpeg_save_CFLAGS="$CFLAGS"
LIBS="-ljpeg $LIBS" LIBS="-ljpeg $LIBS"
INCLUDES="$JPEG_INCLUDES $INCLUDES" CFLAGS="$JPEG_INCLUDES $CFLAGS"
# Try the standard search path first # Try the standard search path first
AC_TRY_LINK([#include <stdio.h> AC_TRY_LINK([#include <stdio.h>
@ -84,7 +84,7 @@ if test "$JPEG_LIBS" = ""; then
]) ])
LIBS="$jpeg_save_LIBS" LIBS="$jpeg_save_LIBS"
INCLUDES="$jpeg_save_INCLUDES" CFLAGS="$jpeg_save_CFLAGS"
fi fi
AC_SUBST(JPEG_LIBS) AC_SUBST(JPEG_LIBS)

View File

@ -40,9 +40,9 @@ if test "$PNG_INCLUDES" = ""; then
], [ ], [
# png.h is not in the standard search path, try # png.h is not in the standard search path, try
# $prefix # $prefix
png_save_INCLUDES="$INCLUDES" png_save_CFLAGS="$CFLAGS"
INCLUDES="-I${prefix}/include $INCLUDES" CFLAGS="-I${prefix}/include $CFLAGS"
AC_TRY_COMPILE([#include <png.h>],[int a;],[ AC_TRY_COMPILE([#include <png.h>],[int a;],[
PNG_INCLUDES="-I${prefix}/include" PNG_INCLUDES="-I${prefix}/include"
@ -50,17 +50,17 @@ if test "$PNG_INCLUDES" = ""; then
PNG_INCLUDES="no" PNG_INCLUDES="no"
]) ])
INCLUDES=$png_save_INCLUDES CFLAGS=$png_save_CFLAGS
]) ])
fi fi
# Now for the libraries # Now for the libraries
if test "$PNG_LIBS" = ""; then if test "$PNG_LIBS" = ""; then
png_save_LIBS="$LIBS" png_save_LIBS="$LIBS"
png_save_INCLUDES="$INCLUDES" png_save_CFLAGS="$CFLAGS"
LIBS="-lpng $LIBS" LIBS="-lpng $LIBS"
INCLUDES="$PNG_INCLUDES $INCLUDES" CFLAGS="$PNG_INCLUDES $CFLAGS"
# Try the standard search path first # Try the standard search path first
AC_TRY_LINK([#include <png.h>],[png_access_version_number()], [ AC_TRY_LINK([#include <png.h>],[png_access_version_number()], [
@ -78,7 +78,7 @@ if test "$PNG_LIBS" = ""; then
]) ])
LIBS="$png_save_LIBS" LIBS="$png_save_LIBS"
INCLUDES="$png_save_INCLUDES" CFLAGS="$png_save_CFLAGS"
fi fi
AC_SUBST(PNG_LIBS) AC_SUBST(PNG_LIBS)

View File

@ -40,9 +40,9 @@ if test "$TIFF_INCLUDES" = ""; then
], [ ], [
# tiff.h is not in the standard search path, try # tiff.h is not in the standard search path, try
# $prefix # $prefix
tiff_save_INCLUDES="$INCLUDES" tiff_save_CFLAGS="$CFLAGS"
INCLUDES="-I${prefix}/include $INCLUDES" CFLAGS="-I${prefix}/include $CFLAGS"
AC_TRY_COMPILE([#include <tiff.h>],[int a;],[ AC_TRY_COMPILE([#include <tiff.h>],[int a;],[
TIFF_INCLUDES="-I${prefix}/include" TIFF_INCLUDES="-I${prefix}/include"
@ -50,17 +50,17 @@ if test "$TIFF_INCLUDES" = ""; then
TIFF_INCLUDES="no" TIFF_INCLUDES="no"
]) ])
INCLUDES=$tiff_save_INCLUDES CFLAGS=$tiff_save_CFLAGS
]) ])
fi fi
# Now for the libraries # Now for the libraries
if test "$TIFF_LIBS" = ""; then if test "$TIFF_LIBS" = ""; then
tiff_save_LIBS="$LIBS" tiff_save_LIBS="$LIBS"
tiff_save_INCLUDES="$INCLUDES" tiff_save_CFLAGS="$CFLAGS"
LIBS="-ltiff -lm $LIBS" LIBS="-ltiff -lm $LIBS"
INCLUDES="$TIFF_INCLUDES $INCLUDES" CFLAGS="$TIFF_INCLUDES $CFLAGS"
# Try the standard search path first # Try the standard search path first
AC_TRY_LINK([#include <tiff.h>],[TIFFGetVersion()], [ AC_TRY_LINK([#include <tiff.h>],[TIFFGetVersion()], [
@ -78,7 +78,7 @@ if test "$TIFF_LIBS" = ""; then
]) ])
LIBS="$tiff_save_LIBS" LIBS="$tiff_save_LIBS"
INCLUDES="$tiff_save_INCLUDES" CFLAGS="$tiff_save_CFLAGS"
fi fi
AC_SUBST(TIFF_LIBS) AC_SUBST(TIFF_LIBS)

View File

@ -41,9 +41,9 @@ if test "$LIBWEBP_INCLUDES" = ""; then
], [ ], [
# webp/decode.h is not in the standard search path, try # webp/decode.h is not in the standard search path, try
# $prefix # $prefix
libwebp_save_INCLUDES="$INCLUDES" libwebp_save_CFLAGS="$CFLAGS"
INCLUDES="-I${prefix}/include $INCLUDES" CFLAGS="-I${prefix}/include $CFLAGS"
AC_TRY_COMPILE([#include <webp/decode.h>],[int a;],[ AC_TRY_COMPILE([#include <webp/decode.h>],[int a;],[
LIBWEBP_INCLUDES="-I${prefix}/include" LIBWEBP_INCLUDES="-I${prefix}/include"
@ -51,17 +51,17 @@ if test "$LIBWEBP_INCLUDES" = ""; then
LIBWEBP_INCLUDES="no" LIBWEBP_INCLUDES="no"
]) ])
INCLUDES=$libwebp_save_INCLUDES CFLAGS=$libwebp_save_CFLAGS
]) ])
fi fi
# Now for the libraries # Now for the libraries
if test "$LIBWEBP_LIBS" = ""; then if test "$LIBWEBP_LIBS" = ""; then
libwebp_save_LIBS="$LIBS" libwebp_save_LIBS="$LIBS"
libwebp_save_INCLUDES="$INCLUDES" libwebp_save_CFLAGS="$CFLAGS"
LIBS="-lwebp $LIBS" LIBS="-lwebp $LIBS"
INCLUDES="$LIBWEBP_INCLUDES $INCLUDES" CFLAGS="$LIBWEBP_INCLUDES $CFLAGS"
# Try the standard search path first # Try the standard search path first
AC_TRY_LINK([#include <webp/decode.h>],[WebPInitDecoderConfig(0)], [ AC_TRY_LINK([#include <webp/decode.h>],[WebPInitDecoderConfig(0)], [
@ -79,7 +79,7 @@ if test "$LIBWEBP_LIBS" = ""; then
]) ])
LIBS="$libwebp_save_LIBS" LIBS="$libwebp_save_LIBS"
INCLUDES="$libwebp_save_INCLUDES" CFLAGS="$libwebp_save_CFLAGS"
fi fi
AC_SUBST(LIBWEBP_LIBS) AC_SUBST(LIBWEBP_LIBS)

View File

@ -42,9 +42,9 @@ if test "$ZLIB_INCLUDES" = ""; then
], [ ], [
# zlib.h is not in the standard search path, try # zlib.h is not in the standard search path, try
# $prefix # $prefix
zlib_save_INCLUDES="$INCLUDES" zlib_save_CFLAGS="$CFLAGS"
INCLUDES="-I${prefix}/include $INCLUDES" CFLAGS="-I${prefix}/include $CFLAGS"
AC_TRY_COMPILE([#include <stdio.h> AC_TRY_COMPILE([#include <stdio.h>
#include <zlib.h>],[int a;],[ #include <zlib.h>],[int a;],[
@ -53,17 +53,17 @@ if test "$ZLIB_INCLUDES" = ""; then
ZLIB_INCLUDES="no" ZLIB_INCLUDES="no"
]) ])
INCLUDES=$zlib_save_INCLUDES CFLAGS=$zlib_save_CFLAGS
]) ])
fi fi
# Now for the libraries # Now for the libraries
if test "$ZLIB_LIBS" = ""; then if test "$ZLIB_LIBS" = ""; then
zlib_save_LIBS="$LIBS" zlib_save_LIBS="$LIBS"
zlib_save_INCLUDES="$INCLUDES" zlib_save_CFLAGS="$CFLAGS"
LIBS="-lz $LIBS" LIBS="-lz $LIBS"
INCLUDES="$ZLIB_INCLUDES $INCLUDES" CFLAGS="$ZLIB_INCLUDES $CFLAGS"
# Try the standard search path first # Try the standard search path first
AC_TRY_LINK([#include <stdio.h> AC_TRY_LINK([#include <stdio.h>
@ -85,7 +85,7 @@ if test "$ZLIB_LIBS" = ""; then
]) ])
LIBS="$zlib_save_LIBS" LIBS="$zlib_save_LIBS"
INCLUDES="$zlib_save_INCLUDES" CFLAGS="$zlib_save_CFLAGS"
fi fi
AC_SUBST(ZLIB_LIBS) AC_SUBST(ZLIB_LIBS)