autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about whether to set CFLAGS in configure.ac


From: Ed Hartnett
Subject: Re: question about whether to set CFLAGS in configure.ac
Date: Thu, 01 Dec 2005 08:34:51 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Brian Lloyd <address@hidden> writes:

> Try this.
>
> saved_CFLAGS=$CFLAGS
> CFLAGS="$CFLAGS -I$(HDF5DIR)/include -L$(HDF5DIR)/lib"
>>    AC_CHECK_LIB([hdf5], [H5Fflush], [], [nc_hdf5_lib_missing=yes])
> CFLAGS=$saved_CFLAGS
>
> This gives the needed CFLAGS for the CHECK_LIB function, but leaves the
> CFLAGS variable set as it was before this call.
>
>
> Brian

I thought of this too, but I was wondering if there was a slicker way
to proceed!

However, this seems to be the best proposed answer so far, and the
only one that I can think of that allows me to let the user specify
one library location and have it appear in the CFLAGS, FFLAGS and
CPPFLAGS as -L and -I options.

Thanks!

Ed

-- 
Ed Hartnett  -- address@hidden





reply via email to

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