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

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

 



On Thu, 1 Dec 2005, Brian Lloyd wrote:

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.

Any -I options should be appended to CPPFLAGS and any -L options should be appended to LDFLAGS. While the approach of temporarily updating a variable is the right one, this example is improperly using CFLAGS.

Bob
======================================
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux