Hi,
The following piece of code:
AS_IF([test x"$var" != xfalse],
[$test=1],
[m4_ifdef([AM_CONDITIONAL],
[AM_CONDITIONAL([TEST], [false])])])
gives the following configure code with autoconf 2.69:
if test x"$var" != xfalse; then :
$test=1
else
fi
which is not a valid syntax.
(Here, I do not have automake, so AM_CONDITIONAL is undefined.)
Running configure returns:
./configure: line 23581: syntax error near unexpected token `fi'
./configure: line 23581: `fi'
Is it the expected behaviour of AS_IF when the else part is empty?
A possible workaround I found out to work is to add a no-op [:] else
part to m4_ifdef:
AS_IF([test x"$var" != xfalse],
[$test=1],
[m4_ifdef([AM_CONDITIONAL],
[AM_CONDITIONAL([TEST], [false])],
[:])])
which gives:
if test x"$var" != xfalse; then :
$test=1
else
:
fi
Is it the right thing to do? What would you otherwise suggest?
Is there something I am missing?
Thanks beforehand,
--
Julien ÉLIE
« S.M.I.G. : Sesterce Minimum d'Intérêt Gaulois. » (Astérix)
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf