summaryrefslogtreecommitdiff
path: root/xorg-macros.m4.in
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2008-11-14 22:59:28 +0100
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-29 05:13:32 -0200
commit4cce4c8169a252bce129411dbf70c3212974e7ca (patch)
tree657bbb76622cbc2df9fef9e04c92ccc97d1ee6ae /xorg-macros.m4.in
parent2663b7a6b31e5e3d03b42a50b27f64737a35e9aa (diff)
define XORG_CWARNFLAGS macro
Diffstat (limited to 'xorg-macros.m4.in')
-rw-r--r--xorg-macros.m4.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 5a1192b..2ea2e6f 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -425,3 +425,24 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
+# XORG_CWARNFLAGS
+# ---------------
+# Minimum version: 1.2.0
+#
+# Defines CWARNFLAGS to enable C compiler warnings.
+#
+AC_DEFUN([XORG_CWARNFLAGS], [
+AC_REQUIRE([AC_PROG_CC])
+if test "x$GCC" = xyes ; then
+ CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
+-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
+-Wold-style-definition -Wbad-function-cast -Wdeclaration-after-statement"
+else
+ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+ if test "x$SUNCC" = "xyes"; then
+ CWARNFLAGS="-v"
+ fi
+fi
+AC_SUBST(CWARNFLAGS)
+]) # XORG_CWARNFLAGS
+