[Top][All Lists]

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

Re: problem with ifelse

From: Vincent Torri
Subject: Re: problem with ifelse
Date: Fri, 6 Mar 2009 07:15:37 +0100 (CET)

On Thu, 5 Mar 2009, Eric Blake wrote:

Most of the m4sugar macros I referred to are quite old.  The nice thing
about git development is that it is easy to find when something was
introduced.  For example, m4_toupper was only mentioned in two commit

I have looked in the ChangeLog files and indeed, they were all added before autoconf 2.50, which is good.

For me, ifelse([$2], [no], [part1], [part2]) executes part1 if $2 is the
same than the string "no", and executes part2 otherwise. But whatever
the value of $2 is (in my cases, $2 is "yes" or "no", it is always part2
that is executed.

Have you tried using the tracing utilities?

I didn't know that there were tracing utilities. I looked a bit in autoconf manual, and it seems that i have to call autoconf with the -t option, like:


Is it the good option ?

Could you post a snippet
where you are actually invoking ECORE_CHECK_MODULE, to make sure there
aren't any obvious typos in how you called it?

Here is an example of use:

ECORE_CHECK_MODULE([Win32], [${want_ecore_win32}], [yes],
  [ecore_win32_libs="-lole32 -lgdi32"])

and what to do with m4_pushdef if i want to transform - to _. For example, I 
use this:

pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl

[m4_]translit expands its result, so the safest approach is to
double-quote the first argument in preparation for the later expansion.  I
would write this as:

m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl

ok, thank you very much

Vincent Torri

reply via email to

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