Bug 56354 - Endless addition of CFLAGS to ./configure cmd
Summary: Endless addition of CFLAGS to ./configure cmd
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: autoconf253 (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
medium
low
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-16 01:09 UTC by Enrico Scholz
Modified: 2007-04-18 16:38 UTC (History)
0 users

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


Attachments (Terms of Use)

Description Enrico Scholz 2001-11-16 01:09:05 UTC
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-16 01:12:13 UTC
Hmm, wrong bug# at 3; should be bug #56184.

Comment 2 Jens Petersen 2002-01-09 07:15:30 UTC
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 07:19:44 UTC
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 06:18:02 UTC
fixed by autoconf-2.53, AFAICT.


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