[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_PROG_CC does not work correctly inside conditionals (autoconf 2.61)
From: |
Andreas Kabel |
Subject: |
AC_PROG_CC does not work correctly inside conditionals (autoconf 2.61) |
Date: |
Fri, 09 Mar 2007 14:46:38 -0800 |
User-agent: |
Netscape/7.0 (compatible;MSIE 6.0; Windows 98) |
This problem showed up when trying to have the list of
compilers depend on some configuration variables.
It can be reproduced with the following minimal
configure.ac file:
################
AC_INIT(plibb, 0.1, address@hidden)
if false; then # FALSE
AC_PROG_CC
else # ELSE
AC_PROG_CC
fi # ENDIF
AC_OUTPUT
###############
Now, comparing the shell code generated for the two
branches of the conditional, e.g. by
autoconf
sed '/FALSE/,/ELSE/!d' >branch1
sed '/ELSE/,/ENDIF/!d' >branch2
diff branch1 branch2
shows that the first branch contains 252 more
lines of shell code; in particular, it contains
the code for checking the file extension of
output files. The second branch does not, resulting
in failed tests, e.g. checking for gcc being a GNU
compiler, which should succeed.
Regards,
Andreas
- AC_PROG_CC does not work correctly inside conditionals (autoconf 2.61),
Andreas Kabel <=