BZ #180: Do not use CFLAGS/CXXFLAGS/etc. in configure/automake

Status fields:

creation_ts:2013-02-21 10:38
component:build system
Users should be able to use CFLAGS and friends for handing additional flags to the build
system. This is the GNU standard behavior. Citing the autoconf manual[1]:

"However, remember that some Makefile variables are reserved by the GNU Coding Standards
for the use of the “user”—the person building the package. For instance, CFLAGS is one
such variable.

Sometimes package developers are tempted to set user variables such as CFLAGS because it
appears to make their job easier. However, the package itself should never set a user
variable, particularly not to include switches that are required for proper compilation
of the package."

automake offers some alternatives[2].


Comment #1 by on 2013-05-20 16:28:37

Looks like that this was never an issue. The current version is not 100% clean but it

Comment #2 by on 2013-09-08 20:17:57

There are still issues related to the abuse of user variables:
  1) some flags are redundant, which makes the output unreadable and
  2) can not overrule flags.

Comment #3 by on 2013-09-18 16:10:14

fixed in 09ec74d145f797249b6f6160b35b25e3120dc1c6