From 039c716f630d5d40f2e9f967e28a57e4cbf60408 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 2 Jul 2018 20:22:41 +0100 Subject: [PATCH] revise FIND_*() macros they should set CFLAGS, not INCLUDE --- m4/gif.m4 | 12 ++++++------ m4/jpeg.m4 | 12 ++++++------ m4/png.m4 | 12 ++++++------ m4/tiff.m4 | 12 ++++++------ m4/webp.m4 | 12 ++++++------ m4/zlib.m4 | 12 ++++++------ 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/m4/gif.m4 b/m4/gif.m4 index e31740b9..f3ea326b 100644 --- a/m4/gif.m4 +++ b/m4/gif.m4 @@ -40,9 +40,9 @@ if test "$GIFLIB_INCLUDES" = ""; then ], [ # gif_lib.h is not in the standard search path, try # $prefix - giflib_save_INCLUDES="$INCLUDES" + giflib_save_CFLAGS="$CFLAGS" - INCLUDES="-I${prefix}/include $INCLUDES" + CFLAGS="-I${prefix}/include $CFLAGS" AC_TRY_COMPILE([#include ],[int a;],[ GIFLIB_INCLUDES="-I${prefix}/include" @@ -50,17 +50,17 @@ if test "$GIFLIB_INCLUDES" = ""; then GIFLIB_INCLUDES="no" ]) - INCLUDES=$giflib_save_INCLUDES + CFLAGS=$giflib_save_CFLAGS ]) fi # Now for the libraries if test "$GIFLIB_LIBS" = ""; then giflib_save_LIBS="$LIBS" - giflib_save_INCLUDES="$INCLUDES" + giflib_save_CFLAGS="$CFLAGS" LIBS="-lgif $LIBS" - INCLUDES="$GIFLIB_INCLUDES $INCLUDES" + CFLAGS="$GIFLIB_INCLUDES $CFLAGS" # Try the standard search path first AC_TRY_LINK([#include ],[DGifSlurp(0)], [ @@ -78,7 +78,7 @@ if test "$GIFLIB_LIBS" = ""; then ]) LIBS="$giflib_save_LIBS" - INCLUDES="$giflib_save_INCLUDES" + CFLAGS="$giflib_save_CFLAGS" fi AC_SUBST(GIFLIB_LIBS) diff --git a/m4/jpeg.m4 b/m4/jpeg.m4 index e77e7229..243a5f06 100644 --- a/m4/jpeg.m4 +++ b/m4/jpeg.m4 @@ -41,9 +41,9 @@ if test "$JPEG_INCLUDES" = ""; then ], [ # jpeglib.h is not in the standard search path, try # $prefix - jpeg_save_INCLUDES="$INCLUDES" + jpeg_save_CFLAGS="$CFLAGS" - INCLUDES="-I${prefix}/include $INCLUDES" + CFLAGS="-I${prefix}/include $CFLAGS" AC_TRY_COMPILE([#include #include ],[int a;],[ @@ -52,17 +52,17 @@ if test "$JPEG_INCLUDES" = ""; then JPEG_INCLUDES="no" ]) - INCLUDES=$jpeg_save_INCLUDES + CFLAGS=$jpeg_save_CFLAGS ]) fi # Now for the libraries if test "$JPEG_LIBS" = ""; then jpeg_save_LIBS="$LIBS" - jpeg_save_INCLUDES="$INCLUDES" + jpeg_save_CFLAGS="$CFLAGS" LIBS="-ljpeg $LIBS" - INCLUDES="$JPEG_INCLUDES $INCLUDES" + CFLAGS="$JPEG_INCLUDES $CFLAGS" # Try the standard search path first AC_TRY_LINK([#include @@ -84,7 +84,7 @@ if test "$JPEG_LIBS" = ""; then ]) LIBS="$jpeg_save_LIBS" - INCLUDES="$jpeg_save_INCLUDES" + CFLAGS="$jpeg_save_CFLAGS" fi AC_SUBST(JPEG_LIBS) diff --git a/m4/png.m4 b/m4/png.m4 index 33e72692..98c7cf7d 100644 --- a/m4/png.m4 +++ b/m4/png.m4 @@ -40,9 +40,9 @@ if test "$PNG_INCLUDES" = ""; then ], [ # png.h is not in the standard search path, try # $prefix - png_save_INCLUDES="$INCLUDES" + png_save_CFLAGS="$CFLAGS" - INCLUDES="-I${prefix}/include $INCLUDES" + CFLAGS="-I${prefix}/include $CFLAGS" AC_TRY_COMPILE([#include ],[int a;],[ PNG_INCLUDES="-I${prefix}/include" @@ -50,17 +50,17 @@ if test "$PNG_INCLUDES" = ""; then PNG_INCLUDES="no" ]) - INCLUDES=$png_save_INCLUDES + CFLAGS=$png_save_CFLAGS ]) fi # Now for the libraries if test "$PNG_LIBS" = ""; then png_save_LIBS="$LIBS" - png_save_INCLUDES="$INCLUDES" + png_save_CFLAGS="$CFLAGS" LIBS="-lpng $LIBS" - INCLUDES="$PNG_INCLUDES $INCLUDES" + CFLAGS="$PNG_INCLUDES $CFLAGS" # Try the standard search path first AC_TRY_LINK([#include ],[png_access_version_number()], [ @@ -78,7 +78,7 @@ if test "$PNG_LIBS" = ""; then ]) LIBS="$png_save_LIBS" - INCLUDES="$png_save_INCLUDES" + CFLAGS="$png_save_CFLAGS" fi AC_SUBST(PNG_LIBS) diff --git a/m4/tiff.m4 b/m4/tiff.m4 index 450b0453..155eb43c 100644 --- a/m4/tiff.m4 +++ b/m4/tiff.m4 @@ -40,9 +40,9 @@ if test "$TIFF_INCLUDES" = ""; then ], [ # tiff.h is not in the standard search path, try # $prefix - tiff_save_INCLUDES="$INCLUDES" + tiff_save_CFLAGS="$CFLAGS" - INCLUDES="-I${prefix}/include $INCLUDES" + CFLAGS="-I${prefix}/include $CFLAGS" AC_TRY_COMPILE([#include ],[int a;],[ TIFF_INCLUDES="-I${prefix}/include" @@ -50,17 +50,17 @@ if test "$TIFF_INCLUDES" = ""; then TIFF_INCLUDES="no" ]) - INCLUDES=$tiff_save_INCLUDES + CFLAGS=$tiff_save_CFLAGS ]) fi # Now for the libraries if test "$TIFF_LIBS" = ""; then tiff_save_LIBS="$LIBS" - tiff_save_INCLUDES="$INCLUDES" + tiff_save_CFLAGS="$CFLAGS" LIBS="-ltiff -lm $LIBS" - INCLUDES="$TIFF_INCLUDES $INCLUDES" + CFLAGS="$TIFF_INCLUDES $CFLAGS" # Try the standard search path first AC_TRY_LINK([#include ],[TIFFGetVersion()], [ @@ -78,7 +78,7 @@ if test "$TIFF_LIBS" = ""; then ]) LIBS="$tiff_save_LIBS" - INCLUDES="$tiff_save_INCLUDES" + CFLAGS="$tiff_save_CFLAGS" fi AC_SUBST(TIFF_LIBS) diff --git a/m4/webp.m4 b/m4/webp.m4 index fa53b9ce..c79e2b71 100644 --- a/m4/webp.m4 +++ b/m4/webp.m4 @@ -41,9 +41,9 @@ if test "$LIBWEBP_INCLUDES" = ""; then ], [ # webp/decode.h is not in the standard search path, try # $prefix - libwebp_save_INCLUDES="$INCLUDES" + libwebp_save_CFLAGS="$CFLAGS" - INCLUDES="-I${prefix}/include $INCLUDES" + CFLAGS="-I${prefix}/include $CFLAGS" AC_TRY_COMPILE([#include ],[int a;],[ LIBWEBP_INCLUDES="-I${prefix}/include" @@ -51,17 +51,17 @@ if test "$LIBWEBP_INCLUDES" = ""; then LIBWEBP_INCLUDES="no" ]) - INCLUDES=$libwebp_save_INCLUDES + CFLAGS=$libwebp_save_CFLAGS ]) fi # Now for the libraries if test "$LIBWEBP_LIBS" = ""; then libwebp_save_LIBS="$LIBS" - libwebp_save_INCLUDES="$INCLUDES" + libwebp_save_CFLAGS="$CFLAGS" LIBS="-lwebp $LIBS" - INCLUDES="$LIBWEBP_INCLUDES $INCLUDES" + CFLAGS="$LIBWEBP_INCLUDES $CFLAGS" # Try the standard search path first AC_TRY_LINK([#include ],[WebPInitDecoderConfig(0)], [ @@ -79,7 +79,7 @@ if test "$LIBWEBP_LIBS" = ""; then ]) LIBS="$libwebp_save_LIBS" - INCLUDES="$libwebp_save_INCLUDES" + CFLAGS="$libwebp_save_CFLAGS" fi AC_SUBST(LIBWEBP_LIBS) diff --git a/m4/zlib.m4 b/m4/zlib.m4 index eaeb1c39..0ec428ce 100644 --- a/m4/zlib.m4 +++ b/m4/zlib.m4 @@ -42,9 +42,9 @@ if test "$ZLIB_INCLUDES" = ""; then ], [ # zlib.h is not in the standard search path, try # $prefix - zlib_save_INCLUDES="$INCLUDES" + zlib_save_CFLAGS="$CFLAGS" - INCLUDES="-I${prefix}/include $INCLUDES" + CFLAGS="-I${prefix}/include $CFLAGS" AC_TRY_COMPILE([#include #include ],[int a;],[ @@ -53,17 +53,17 @@ if test "$ZLIB_INCLUDES" = ""; then ZLIB_INCLUDES="no" ]) - INCLUDES=$zlib_save_INCLUDES + CFLAGS=$zlib_save_CFLAGS ]) fi # Now for the libraries if test "$ZLIB_LIBS" = ""; then zlib_save_LIBS="$LIBS" - zlib_save_INCLUDES="$INCLUDES" + zlib_save_CFLAGS="$CFLAGS" LIBS="-lz $LIBS" - INCLUDES="$ZLIB_INCLUDES $INCLUDES" + CFLAGS="$ZLIB_INCLUDES $CFLAGS" # Try the standard search path first AC_TRY_LINK([#include @@ -85,7 +85,7 @@ if test "$ZLIB_LIBS" = ""; then ]) LIBS="$zlib_save_LIBS" - INCLUDES="$zlib_save_INCLUDES" + CFLAGS="$zlib_save_CFLAGS" fi AC_SUBST(ZLIB_LIBS)