]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document how to safely override CFLAGS default.
authorEric Blake <eblake@redhat.com>
Thu, 25 Feb 2010 21:56:34 +0000 (14:56 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 26 Feb 2010 17:00:45 +0000 (10:00 -0700)
* doc/autoconf.texi (C Compiler) <AC_PROG_CC>: Document a way to
change the default CFLAGS.
(C++ Compiler) <AC_PROG_CXX>: Likewise, for CXXFLAGS.
Reported by Monty Taylor; wording suggested by Paolo Bonzini.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/autoconf.texi

index 6afb90ecdebe23d010243e274b8cb9f0dbe44288..bb2488672798680d0f6e3420b350d08499d7788a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-02-26  Eric Blake  <eblake@redhat.com>
 
+       Document how to safely override CFLAGS default.
+       * doc/autoconf.texi (C Compiler) <AC_PROG_CC>: Document a way to
+       change the default CFLAGS.
+       (C++ Compiler) <AC_PROG_CXX>: Likewise, for CXXFLAGS.
+       Reported by Monty Taylor; wording suggested by Paolo Bonzini.
+
        Document that Autoconf relies on IFS.
        * doc/autoconf.texi (Special Shell Variables) <IFS>: Add details
        about use of IFS within configure script.
index a669d06a18bb13e80bb31f794c286dcc1489a60d..3dfeda2486d85c51a4c3cbe2f5a1cb07a8f51917 100644 (file)
@@ -7128,7 +7128,9 @@ If using the @acronym{GNU} C compiler, set shell variable @code{GCC} to
 @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 @@ If using the @acronym{GNU} C++ compiler, set shell variable @code{GXX} to
 @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