Bug 544039

Summary: Autoconf >= 2.64 causes ./configure: line 2837: `yes:'
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: autoconfAssignee: Karsten Hopp <karsten>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: rawhideCC: karsten, kasal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-03 23:54:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 538190    
Attachments:
Description Flags
configure.f11.bz2
none
configure.f13.bz2 none

Description Robert Scheck 2009-12-03 19:00:13 UTC
Description of problem:
Autoconf >= 2.64 creates somehow a busted configure file.

--- snipp ---
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --localstatedir=/var/lib --with-pgsql --with-listen-user=unicornscan
configuring unicornscan version 0.4.7
./configure: line 2837: syntax error near unexpected token `newline'
./configure: line 2837: `yes:'
error: Bad exit status from /var/tmp/rpm-tmp.8sNADt (%build)
--- snapp ---

Version-Release number of selected component (if applicable):
autoconf-2.65-1.fc13

How reproducible:
Everytime, see above.

Actual results:
Autoconf >= 2.64 causes ./configure: line 2837: `yes:'

Expected results:
Working autoconf like e.g. at Fedora 11 ;-)

Additional info:
I'm attaching you a configure file created with Fedora 11 and one created with
Fedora 13 (Rawhide) for comparisons. If you need a reproducer, take the package
from bug #538190 and try to rebuild against Rawhide.

Comment 1 Robert Scheck 2009-12-03 19:02:03 UTC
Created attachment 375876 [details]
configure.f11.bz2

Comment 2 Robert Scheck 2009-12-03 19:04:08 UTC
Created attachment 375877 [details]
configure.f13.bz2

Comment 3 Stepan Kasal 2009-12-03 23:54:29 UTC
The problem is that the sources for the configure script in question are not correct; it is pure coincidence that older versions of Autoconf happened to produce correct shell script from these sources.

The problem is that macro AC_LBL_C_INIT, defined in file unicornscan-0.4.7/aclocal.m4 contains the following pattern:

AC_CACHE_VAL(ac_cv_lbl_something, AC_TRY_COMPILE(args))

This means that the macro AC_TRY_COMPILE is expanded during the argument list scan; this means that any comma or right parenthesis in the expansion totally confuses everything.  The usual practice is to quote every argument of every macro, so that the arguments get collected unexpanded and thus their expansion happens only after the expansion of the outer macro (AC_CACHE_VAL in this case).
In this case, it means that the above pattern should be replaced by

AC_CACHE_VAL([ac_cv_lbl_something], [AC_TRY_COMPILE(args)])

After doing this change in all three occurences of this pattern in AC_LBL_C_INIT,
I got a working configure script.