[PATCH util-macros] XORG_STRICT_OPTION: remove redundant expansion of AC_PROG_CC macro

Gaetan Nadon memsize at videotron.ca
Sat May 15 07:16:21 PDT 2010


Calling AC_PROG_CC before AC_PROG_CC_C99 is not required.
C99 is not an add-on to CC although either one will cache results
than can be used by the other.

This is effectively a no-op. Note that if a module configure.ac
file calls AC_PROG_CC after AC_PROG_CC_C99, the compiler will be reset
to ISO_C89 from ISO_C99.
Currently about half the xorg modules use C89 while the other half use C99.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 xorg-macros.m4.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 121ec57..542b756 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -930,7 +930,7 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
 # Defines CWARNFLAGS to enable C compiler warnings.
 #
 AC_DEFUN([XORG_CWARNFLAGS], [
-AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_CC_C99])
 if  test "x$GCC" = xyes ; then
     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
 -Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
@@ -955,7 +955,7 @@ AC_SUBST(CWARNFLAGS)
 #
 # Add configure option to enable strict compilation
 AC_DEFUN([XORG_STRICT_OPTION], [
-AC_REQUIRE([AC_PROG_CC])
+# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
 AC_REQUIRE([AC_PROG_CC_C99])
 AC_REQUIRE([XORG_CWARNFLAGS])
 
-- 
1.6.0.4



More information about the xorg-devel mailing list