[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AM_CONDITIONAL fails with line break at the end of $2
From: |
Dimitrios Apostolou |
Subject: |
AM_CONDITIONAL fails with line break at the end of $2 |
Date: |
Thu, 17 Jul 2014 18:00:59 +0200 (CEST) |
User-agent: |
Alpine 2.10 (DEB 1266 2009-07-14) |
Hello list,
the following snippet generates invalid shell code (and a cryptic error
message) because of the line break right before the closing parenthesis.
AM_CONDITIONAL([HAVE_LIBXML2],
[test "x$with_libxml2" != xno &&
test "x$ac_cv_lib_xml2_xmlFirstElementChild" = xyes]
)
Generated code (semi-colon at beginning of line creates problems):
if test "x$with_libxml2" != xno &&
test "x$ac_cv_lib_xml2_xmlFirstElementChild" = xyes
; then
HAVE_LIBXML2_TRUE=
HAVE_LIBXML2_FALSE='#'
else
HAVE_LIBXML2_TRUE='#'
HAVE_LIBXML2_FALSE=
fi
The attached patch attempts to fix the issue, do you think it is the right
approach?
Thanks in advance,
Dimitris
cond.m4.diff
Description: Text Data
- AM_CONDITIONAL fails with line break at the end of $2,
Dimitrios Apostolou <=