[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
configure wrongly caches results
From: |
Patrice Dumas |
Subject: |
configure wrongly caches results |
Date: |
Mon, 26 Sep 2005 00:51:53 +0200 |
User-agent: |
Mutt/1.4.2.1i |
Hi,
I have different libraries that implements te same interface (the netcdf
interface) and each one comes with a netcdf.h file in a specific directory.
I would like to check headers against each of these libraries in turn. So I
set CPPFLAGS to each of the include directories in turn. However
configure doesn't retry the test when CPPFLAGS changes and instead uses the
cached value from previous test.
Here is a simplified example of the tests:
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/usr/include/hdf2"
AC_CHECK_HEADERS([netcdf.h],[echo "found with hdf"])
CPPFLAGS="$CPPFLAGS_save"
CPPFLAGS_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I/usr/include/libnc-dap/"
AC_CHECK_HEADERS([netcdf.h],[echo "found with libnc-dap"])
CPPFLAGS="$CPPFLAGS_save"
If the first test fails, the second also fails, even if netcdf.h is in
/usr/include/libnc-dap/. The output is in that case
checking for netcdf.h... no
checking for netcdf.h... (cached) no
If I comment out the first test, the second test succeed.
So it seems that there is a kind of caching that cannot be disabled and
that is preventing such tests to work. I have read a bit of documentation
but haven't found how to disable that caching. Indeed what I read in
(autoconf) Cache Files is:
" By default, `configure' uses no cache file (technically, it uses
`--cache-file=/dev/null'), to avoid problems caused by accidental use
of stale cache files."
Any thought on that question?
With autoconf 2.59.
--
Pat
- configure wrongly caches results,
Patrice Dumas <=