[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
is this a good way to use AC_CHECK_HEADERS
From: |
Ed Hartnett |
Subject: |
is this a good way to use AC_CHECK_HEADERS |
Date: |
Fri, 03 Jun 2005 13:46:49 -0600 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Howdy all!
I have the following in configure.ac, to kill the configure if the
hdf5 header file isn't found.
Problem is, I also have a --with-hdf5=<DIRECTORY> configure argument
to allow the user to specify the location of the hdf5 library.
# If the user wants netcdf-4, we need hdf5.
if test "x$enable_netcdf_4" = xyes; then
CPPFLAGS="${CPPFLAGS} -I${with_hdf5}/include"
AC_CHECK_HEADERS([hdf5.h], [], [nc_hdf5_h_missing=yes])
if test "x$nc_hdf5_h_missing" = xyes; then
AC_MSG_ERROR([Can't find the hdf5 header and/or library. Specify
the HDF5 prefix with the --with-hdf5 option to config\
ure.])
fi
fi
I have to append -I${with_hdf5}/include to the CPPFLAGS. Is this the
usual way to do such a thing?
Or is there a better way?
THanks!
Ed
--
Ed Hartnett -- address@hidden
- is this a good way to use AC_CHECK_HEADERS,
Ed Hartnett <=