bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to adjust default CFLAGS="-g -O2"?


From: autoconf . z . nuntius
Subject: Re: how to adjust default CFLAGS="-g -O2"?
Date: Thu, 7 Aug 2008 01:54:55 -0400 (EDT)
User-agent: Alpine 1.00 (LNX 882 2007-12-20)

On Wed, 6 Aug 2008, Eric Blake - address@hidden wrote:
According to Bruno Haible on 8/6/2008 4:41 PM:
| But autoconf still hardwires this logic in _AC_PROG_CC_G:
|
| ---------------------------------------------
| elif test $ac_cv_prog_cc_g = yes; then
|   if test "$GCC" = yes; then
|     CFLAGS="-g -O2"
|
| Could this be made customizable somehow? Either through a variable that the
| developer could set in his configure.ac before the invocation of AC_PROG_CC,
| or through a macro which he could redefine in his configure.ac?

Hmm.  This is an interesting request, and seems doable.

I'll put in a modified request. A few projects break these options out into things like
--enable-debug
--enable-warnings
--disable-optimization or --with-optimization=N
etc.

They then try to interpret the compiler found by autoconf to make decisions like "GCC uses -g and -Wall"... These are common end-user flags; it would be nice if autoconf provided a standard framework to detect and use them.

Thanks,
Daniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]