From b896be0d4e4357b1e6ac63244b0dee76c19717d9 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Sat, 25 Jul 2009 16:07:06 +0300 Subject: [PATCH 2/4] Add intel compiler support to XORG_CWARNFLAGS. Also move compiler check code to XORG_CWARFLAGS from XORG_STRICT_OPTION. --- xorg-macros.m4.in | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index befa429..d10aea6 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -449,8 +449,12 @@ if test "x$GCC" = xyes ; then esac else AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) if test "x$SUNCC" = "xyes"; then - CWARNFLAGS="-v" + CWARNFLAGS="-v" + fi + if test "x$INTELCC" "xyes"; then + CWARNFLAGS="-Wall" fi fi AC_SUBST(CWARNFLAGS) @@ -462,7 +466,6 @@ AC_SUBST(CWARNFLAGS) # # Add configure option to enable strict compilation AC_DEFUN([XORG_STRICT_OPTION], [ -AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CC_C99]) AC_REQUIRE([XORG_CWARNFLAGS]) @@ -471,8 +474,6 @@ AC_ARG_ENABLE(strict-compilation, [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) if test "x$STRICT_COMPILE" = "xyes"; then - AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) - AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) if test "x$GCC" = xyes ; then STRICT_CFLAGS="-pedantic -Werror" elif test "x$SUNCC" = "xyes"; then -- 1.6.3.3