Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 56354 - Endless addition of CFLAGS to ./configure cmd
Endless addition of CFLAGS to ./configure cmd
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: autoconf253 (Show other bugs)
1.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jens Petersen
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-15 20:09 EST by Enrico Scholz
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-09 02:25:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2001-11-15 20:09:05 EST
Description of Problem:

When using AM_MAINTAINER_MODE and setting CFLAGS env-variable at
./configure time, this value will be added endlessly to autogenerated
reinvokations of ./configure.


Version-Release number of selected component (if applicable):

automake-1.5-1
autoconf-2.52-3


How Reproducible:

everytime


Steps to Reproduce:
1. cat <<EOF >configure.ac
AC_INIT(foo, 0.0.1, x)
AM_INIT_AUTOMAKE(foo, 0.0.1)
AM_MAINTAINER_MODE

AC_PROG_CC

AC_CONFIG_FILES(Makefile)
AC_OUTPUT
EOF

2. echo 'AUTOMAKE_OPTIONS = foreign' >Makefile.am
   (not really necessarily, but makes life easier)
3. automake=automake autoreconf -i  # workaround for bug #55870
4. CFLAGS='-g3' ./configure --enable-maintainer-mode
5. for i in 0 1 2 3; do touch configure.ac; make; done


Actual Results:

Each iteration at 5. adds a new 'CFLAGS=-g3' to the ./configure call;
finally it shows

| ...
| /bin/sh ./config.status --recheck
| running /bin/sh ./configure  --enable-maintainer-mode CFLAGS=-g3 CFLAGS=-g3 CFLAGS=-g3 CFLAGS=-g3  --no-create --no-recursion
| checking for a BSD compatible install... /usr/bin/install -c
| ...


Expected Results:

Only a single 'CFLAGS=-g3' on the cmd-line.
Comment 1 Enrico Scholz 2001-11-15 20:12:13 EST
Hmm, wrong bug# at 3; should be bug #56184.
Comment 2 Jens Petersen 2002-01-09 02:15:30 EST
Actually I can reproduce this with:

% cat <<EOF >configure.ac  
AC_INIT(foo, 0.0.1, x)
AM_INIT_AUTOMAKE(foo, 0.0.1)
AC_PROG_CC
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
EOF
% touch Makefile.am
% autoreconf -i
% CFLAGS='-g3' ./configure
% touch configure.ac; make
% touch configure.ac; make

So I don't think it has anything to do with maintainer mode.
Comment 3 Jens Petersen 2002-01-09 02:19:44 EST
or instead of "touch configure.ac; make" just "./config.status --recheck". 
Looks like it may be an autoconf bug.
Comment 4 Jens Petersen 2002-03-27 01:18:02 EST
fixed by autoconf-2.53, AFAICT.

Note You need to log in before you can comment on or make changes to this bug.