[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure wrongly caches results
From: |
Stepan Kasal |
Subject: |
Re: configure wrongly caches results |
Date: |
Tue, 27 Sep 2005 10:23:05 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi Pat,
On Mon, Sep 26, 2005 at 12:51:53AM +0200, Patrice Dumas wrote:
> So it seems that there is a kind of caching that cannot be disabled and
> that is preventing such tests to work.
Indeed, you can switch off the cache _file_, so that it is not read at
the beginning and written at the end, but you cannot switch off the
"internal" caching of autoconf.
> checking for netcdf.h... no
> checking for netcdf.h... (cached) no
... while you would expect:
checking for netcdf.h... no
checking for netcdf.h... yes
which really looks weird, so you added an echo to get:
checking for netcdf.h... no
checking for netcdf.h... found with libnc-dap
yes
Anyway, the internal cache is a limitation of current autoconf.
I think there is a very natural workaround/fix:
AC_CHECK_HEADERS([hdf2/netcdf.h])
AC_CHECK_HEADERS([libnc-dap/netcdf.h])
or, if there is possibility that netcdf.h includes other files from
the same directory:
CPPFLAGS_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I/usr/include/hdf2"
AC_CHECK_HEADERS([hdf2/netcdf.h])
CPPFLAGS="$CPPFLAGS_save"
CPPFLAGS_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I/usr/include/libnc-dap/"
AC_CHECK_HEADERS([libnc-dap/netcdf.h])
CPPFLAGS=$CPPFLAGS_save
BTW: The quotes in some of your assignments were redundant, so I removed
theme. (Documented in the chapter on portable shell programming in the
Autoconf manual.)
Then you have defines HAVE_HDF2_NETCDF_H and HAVE_LIBNC_DAP_NETCDF_H.
Do you like it this way?
Stepan Kasal