autoconf
[Top][All Lists]
Advanced

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

Re: problem with ifelse


From: Eric Blake
Subject: Re: problem with ifelse
Date: Fri, 06 Mar 2009 08:41:18 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Vincent Torri on 3/6/2009 7:30 AM:
> As the value of want_ecore_win32 changes acoording to the host, i think
> I'll have to use AS_IF or if / then /else. Which one is better ?

AS_IF is nicer if you invoke other autoconf macros within the body,
because it handles hoisting prerequisites prior to the if statement.  In
other words:

if ...; then
  MACRO_WITH_PREREQ
fi
=>
if ...
  prereq
  macro_body
fi

which is a bug, if the rest of your script depends on prereq having run
regardless of whether macro_body was run (and that is often the case).  On
the other hand,

AS_IF([...], [MACRO_WITH_PREREQ])
=>
prereq
if ...
  macro_body
fi

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmxRB4ACgkQ84KuGfSFAYBHBgCfVldLcIvrllZanOgwHyEvyNNF
O8oAnRT1GK0WCvJZoGoxk/9/SROmGbU1
=Zlyt
-----END PGP SIGNATURE-----




reply via email to

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