From 8c3f96b082b101904a56c77bc69d01b4bf9465fd Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 14 Nov 2008 22:59:28 +0100 Subject: [PATCH] define XORG_CWARNFLAGS macro --- xorg-macros.m4.in | 21 +++++++++++++++++++++ 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 + -- 1.6.0.3