From 54bb4e2cce2ff3f415f2a133c9d49bd7f96e2498 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 25 Feb 2010 14:56:34 -0700 Subject: [PATCH] Document how to safely override CFLAGS default. * doc/autoconf.texi (C Compiler) : Document a way to change the default CFLAGS. (C++ Compiler) : Likewise, for CXXFLAGS. Reported by Monty Taylor; wording suggested by Paolo Bonzini. Signed-off-by: Eric Blake --- ChangeLog | 6 ++++++ doc/autoconf.texi | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d27e870..f0be2df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-02-25 Eric Blake + Document how to safely override CFLAGS default. + * doc/autoconf.texi (C Compiler) : Document a way to + change the default CFLAGS. + (C++ Compiler) : Likewise, for CXXFLAGS. + Reported by Monty Taylor; wording suggested by Paolo Bonzini. + Recommend latest m4 release. * README: Bump recommendation to m4 1.4.14 (minimum remains 1.4.6). diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a669d06..86d434c 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -7128,7 +7128,9 @@ C Compiler @samp{yes}. If output variable @code{CFLAGS} was not already set, set it to @option{-g -O2} for the @acronym{GNU} C compiler (@option{-O2} on systems where @acronym{GCC} does not accept @option{-g}), or @option{-g} for -other compilers. +other compilers. If your package does not like this default, then it is +acceptable to insert the line @samp{: ${CFLAGS=""}} after @code{AC_INIT} +and before @code{AC_PROG_CC} to select an empty default instead. Many Autoconf macros use a compiler, and thus call @samp{AC_REQUIRE([AC_PROG_CC])} to ensure that the compiler has been @@ -7529,7 +7531,10 @@ C++ Compiler @samp{yes}. If output variable @code{CXXFLAGS} was not already set, set it to @option{-g -O2} for the @acronym{GNU} C++ compiler (@option{-O2} on systems where G++ does not accept @option{-g}), or @option{-g} for other -compilers. +compilers. If your package does not like this default, then it is +acceptable to insert the line @samp{: ${CXXFLAGS=""}} after @code{AC_INIT} +and before @code{AC_PROG_CXX} to select an empty default instead. + @end defmac @defmac AC_PROG_CXXCPP -- 1.6.6.1