[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to avoid caching in [certain cases]?
From: |
Ronald Landheer-Cieslak |
Subject: |
Re: How to avoid caching in [certain cases]? |
Date: |
Tue, 25 Feb 2003 13:15:08 +0100 (CET) |
On 25 Feb 2003, Alexey Morozov wrote:
> 1. Check for the header, say mylib.h
> 2. if the header is found, it's Ok, otherwise try to [temporarily] add
> $MYLIB_HOME/include to the headers path and try to locate mylib.h again.
> 3. Do some other checks for the mylib
>
> I used the straight but probably wrong way:
>
> saved_CPPFLAGS=$CPPFLAGS
> AC_CHECK_HEADER([mylib.h],
> [HAVE_MYLIB_H=yes],
> [
> CPPFLAGS="$CPPFLAGS -I$MYLIB_HOME/include"
> AC_CHECK_HEADER([mylib.h],.....
> ....
If $MYLIB_HOME is an absolute path, why not check for
$MYLIB_HOME/include/mylib.h ? Unless ofcourse $MYLIB_HOME is the path to a
(temporary) source dir..
Otherwise (what I would do in case $MYLIB_HOME is not a proper dir for
configure to depend on), try using AC_PREPROC_IFELSE on a source including
only mylib.h. This is (AFAIK) pretty much what AC_CHECK_HEADER does, but
it lets you decide what variables to use (cached or not) :)
rlc