[gthumb] Fixed error at configure time when using the -Werror flag
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Fixed error at configure time when using the -Werror flag
- Date: Sun, 26 Sep 2010 16:04:59 +0000 (UTC)
commit c1cb4134bd3fe7757203bc840ea882ca5cb952fb
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Sep 26 18:01:04 2010 +0200
Fixed error at configure time when using the -Werror flag
Reset CFLAGS when checking for libraries.
configure.ac | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 12b8beb..334ab19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,8 +147,12 @@ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
dnl ===========================================================================
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS=""
AC_CHECK_LIB(m, floor,, AC_MSG_ERROR([math library not found]))
M_LIBS="-lm"
+CFLAGS="$SAVE_CFLAGS"
+unset SAVE_CFLAGS
AC_SUBST(M_LIBS)
dnl ===========================================================================
@@ -293,6 +297,8 @@ AC_ARG_ENABLE([jpeg],
[AS_HELP_STRING([--disable-jpeg],[do not compile code that uses the libjpeg library])],,
[enable_jpeg=yes])
if test "x$enable_jpeg" = "xyes"; then
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS=""
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
[enable_jpeg=yes],
[enable_jpeg=no])
@@ -300,6 +306,8 @@ if test "x$enable_jpeg" = "xyes"; then
AC_DEFINE(HAVE_LIBJPEG, 1, [Define to 1 if libjpeg support is included])
JPEG_LIBS='-ljpeg -lm -lz'
fi
+ CFLAGS="$SAVE_CFLAGS"
+ usnet SAVE_CFLAGS
fi
AC_SUBST(JPEG_LIBS)
AM_CONDITIONAL(ENABLE_JPEG_TOOLS, test "x$enable_jpeg" = xyes)
@@ -329,6 +337,8 @@ AC_ARG_ENABLE([tiff],
[AS_HELP_STRING([--disable-tiff],[do not compile code that uses the libtiff library])],,
[enable_tiff=yes])
if test x$enable_tiff = xyes ; then
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS=""
AC_CHECK_LIB(tiff, TIFFWriteScanline,
[AC_CHECK_HEADER(tiffio.h,
[enable_tiff=yes],
@@ -338,6 +348,8 @@ if test x$enable_tiff = xyes ; then
AC_DEFINE(HAVE_LIBTIFF, 1, [Define to 1 if libtiff support is included])
TIFF_LIBS='-ltiff -lm -lz'
fi
+ CFLAGS="$SAVE_CFLAGS"
+ unset SAVE_CFLAGS
fi
AC_SUBST(TIFF_LIBS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]