[Top][All Lists]

[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: Gecko/20080213 Thunderbird/ Mnenhy/

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.

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
Version: GnuPG v1.4.8 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

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