autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested AS_IF calls


From: Peter Breitenlohner
Subject: Re: Nested AS_IF calls
Date: Thu, 7 Jun 2012 16:09:21 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Thu, 7 Jun 2012, Adam Mercer wrote:

And I'm trying to use AS_IF instead, I've been reading to
documentation[1], and have come up with the following:

AS_IF([test "$GCC" = yes],[
 [AS_IF([test "`$CC -v 2>&1 | grep -c 'clang_version'`" != "0"],[CLANG_CC=1])],
 [CLANG_CC=])

but it doesn't seem to be working, ...

Hi Adam,

according to the Autoconf manual (8.1 M4 Quotation) that should be

AS_IF([test "$GCC" = yes],
  [AS_IF([test "`$CC -v 2>&1 | grep -c 'clang_version'`" != "0"],[CLANG_CC=1])],
  [CLANG_CC=])

i.e., exactly one level of quotes for each macro argument.  In addition it
might be safer to replace
  test "$GCC" = yes
by
  test "X$GCC" = Xyes
and similar.

Regards
Peter Breitenlohner <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]