Bug 59077 - autoconf is creating incorrect shell script with AC_TRY_LINK()
autoconf is creating incorrect shell script with AC_TRY_LINK()
Status: CLOSED DUPLICATE of bug 57653
Product: Red Hat Raw Hide
Classification: Retired
Component: autoconf (Show other bugs)
1.0
All Linux
high Severity high
: ---
: ---
Assigned To: Jens Petersen
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-30 12:01 EST by Phil Copeland
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-30 18:05:38 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 Phil Copeland 2002-01-30 12:01:25 EST
Description of Problem:
autoconf is creating incorrect shell script from a configure.in file

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

How Reproducible:
AC_TRY_LINK([#include <utmpx.h>
],, 
AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN)))
,LIBS="$oldlibs")

This structure is used in a number of default gnu packages

Actual Results:
autoconf-2.52-6
...
# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc in
  yes:no
else
  echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
fi


Expected Results:
autoconf-2.13-9
...
oldlibs="$LIBS"
LIBS="$LIBS -lelf"
echo "checking SVR4" 1>&6
echo "configure:1467: checking SVR4" >&5
cat > conftest.$ac_ext <<EOF
#line 1469 "configure"
#include "confdefs.h"
#include <utmpx.h>

int main() {

; return 0; }
EOF
if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && t
est -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_safe=`echo "dwarf.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dwarf.h""... $ac_c" 1>&6
echo "configure:1481: checking for dwarf.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1486 "configure"
#include "confdefs.h"
#include <dwarf.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi


Additional Information:
This is not limited to screen, which is where I first tripped over this, other
src rpms are also suffering as a result
Comment 1 Phil Copeland 2002-01-30 18:05:33 EST
Sigh,
    Ok, so this was in actual fact a problem of parsing

AC_TRY_LINK([#include <utmpx.h>
 ],, 
 AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
 AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN)))
 ,LIBS="$oldlibs")

translated to autoconf-2.52-6 speak is

[AC_CHECK_HEADER(dwarf.h, 
                [AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN)],
                [AC_CHECK_HEADER(elf.h, 
                                 [AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN)])])]
,LIBS="$oldlibs")

ie heavy quoting required.

Phil
=--=
Comment 2 Jens Petersen 2002-01-30 20:32:33 EST
Yep, afraid it's a case of "underquoting"...


*** This bug has been marked as a duplicate of 57653 ***

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