As noted in another thread, I had some trouble with -Werror in Fedora
15 (gcc 4.6). The following patch (shameless cut&paste from gdb)
allows to do:

./configure --disable-werror

and not get in trouble in such cases

diff --git a/configure.in b/configure.in
index 0dbd7a4..23e16e3 100644
--- a/configure.in
+++ b/configure.in
@@ -20,6 +20,22 @@ AC_ARG_ENABLE(experimental,
        [EXPERIMENTAL=yes]
 )

+AC_ARG_ENABLE(werror,
+  AS_HELP_STRING([--enable-werror], [treat compile warnings as errors]),
+  [case "${enableval}" in
+     yes | y) ERROR_ON_WARNING="yes" ;;
+     no | n)  ERROR_ON_WARNING="no" ;;
+     *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
+  esac],
+  [ERROR_ON_WARNING=yes]
+)
+
+WERROR_CFLAGS=""
+if test "${ERROR_ON_WARNING}" = yes ; then
+    WERROR_CFLAGS="-Werror"
+fi
+AC_SUBST(WERROR_CFLAGS)
+
 AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
 [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
 AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
diff --git a/librawstudio/Makefile.am b/librawstudio/Makefile.am
index cbc29bb..841a8d1 100644
--- a/librawstudio/Makefile.am
+++ b/librawstudio/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS = -Wall -Werror -fno-strict-aliasing
+AM_CFLAGS = -Wall -fno-strict-aliasing @WERROR_CFLAGS@

 AM_CPPFLAGS = \
        -I$(top_srcdir) \


-- 
Gianluca Sforna

http://morefedora.blogspot.com
http://identi.ca/giallu - http://twitter.com/giallu

_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to