[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nested AS_IF calls
From: |
Adam Mercer |
Subject: |
Re: Nested AS_IF calls |
Date: |
Thu, 7 Jun 2012 16:17:42 +0100 |
On Thu, Jun 7, 2012 at 4:04 PM, Eric Blake <address@hidden> wrote:
>> AS_IF([test "$GCC" = yes],[
> ^
> Unmatched [.
Thanks, I'd spotted that but it still doesn't seem to fix the problem
for me. I now have:
# check for clang
AS_IF([test "x$GCC" = xyes],
[AS_IF([test "`$CC -v 2>&1 | grep -c 'clang_version'`" !=
"0"],[CLANG_CC=1])],
[CLANG_CC=])
> What you are doing should work, once you fix the typo; this is what I
> see in a resulting configure file after pasting in a corrected version
> of your attempt:
>
> if test "$GCC" = yes; then :
> if test "`$CC -v 2>&1 | grep -c 'clang_version'`" != "0"; then :
> CLANG_CC=1
> fi
> else
> CLANG_CC=
> fi
I'm getting:
# check for clang
if test "x$GCC" = xyes; then :
if test "`$CC -v 2>&1 | grep -c 'clang_version'`" != "0"; then :
CLANG_CC=1
fi
else
CLANG_CC=
fi
so it's missing a closing fi.
Cheers
Adam