autoconf
[Top][All Lists]
Advanced

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

Re: combining tests


From: Eric Blake
Subject: Re: combining tests
Date: Fri, 14 Mar 2008 06:04:09 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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

According to Sam Steingold on 3/13/2008 1:57 PM:
| checking whether libffcall is installed... checking how to link with
| libavcall... -lavcall

...

| checking for callback.h... no
| no
| ...

Usually, this implies that you have done a cached check inside of another
cached check.  Not only does this lead to poor output on a fresh configure
run, it leads to bugs on a './configure -C' run, because the nested checks
aren't even performed.
http://www.gnu.org/software/autoconf/manual/autoconf.html#Caching-Results

Remember the rule of thumb: when using a cache variable, the
commands-to-set-it must have no side effects except for setting the
variable cache-id.

| AC_CACHE_CHECK([whether libffcall is installed],[cl_cv_have_ffcall],
| [cl_cv_have_ffcall=no
| if test $cl_use_ffcall != no; then
| AC_LIB_FROMPACKAGE(avcall,libffcall)

AC_LIB_FROMPACKAGE must be a cached call (however, it is not an autoconf
macro, so please consider renaming it to something that is namespace
clean), but you are executing it inside of AC_CACHE_CHECK.  Instead, you
should execute the cache check in isolation, then based on the setting of
$cl_cv_have_ffcall, execute AC_LIB_FROMPACKAGE as needed.

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

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

iEYEARECAAYFAkfaabkACgkQ84KuGfSFAYAWsQCdEf0nwg5yeqbSaIgXW9RFcCD2
kRQAnjaFcYZO5Ot7h2fdt2rEW22KgNA1
=zS9p
-----END PGP SIGNATURE-----




reply via email to

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