[asterisk-commits] file: branch 1.4 r115276 - in /branches/1.4: acinclude.m4 configure

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 3 20:43:26 CDT 2008


Author: file
Date: Sat May  3 20:43:26 2008
New Revision: 115276

URL: http://svn.digium.com/view/asterisk?view=rev&rev=115276
Log:
Treat warnings as errors when checking if a GCC attribute exists. We have to do this as GCC will just ignore the attribute and pop up a warning, it won't actually fail to compile.

Modified:
    branches/1.4/acinclude.m4
    branches/1.4/configure

Modified: branches/1.4/acinclude.m4
URL: http://svn.digium.com/view/asterisk/branches/1.4/acinclude.m4?view=diff&rev=115276&r1=115275&r2=115276
==============================================================================
--- branches/1.4/acinclude.m4 (original)
+++ branches/1.4/acinclude.m4 Sat May  3 20:43:26 2008
@@ -3,13 +3,17 @@
 AC_DEFUN([AST_GCC_ATTRIBUTE],
 [
 AC_MSG_CHECKING(for compiler 'attribute $1' support)
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
 AC_COMPILE_IFELSE(
 	AC_LANG_PROGRAM([static int __attribute__(($1)) test(void) {}],
 			[]),
 	AC_MSG_RESULT(yes)
 	AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
 	AC_MSG_RESULT(no))
-])
+]
+CFLAGS="$saved_CFLAGS"
+)
 
 # AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
 




More information about the asterisk-commits mailing list