Hello, On Fri, May 04, 2007 at 10:30:22AM +0200, Daniel Barna wrote: > I am wondering how one can check the presence of a header file (gts.h), > which needs extra compiler flags (`gts-config --cflags`) the trick is to save the previous value of CFLAGS and restore it after the test. But whech checking for headers, CPPFLAGS seem to be the one we are interested in. With a recent version of pkg-config, one would do: SAVE_CPPFLAGS=$CPPFLAGS SAVE_CFLAGS=$CFLAGS CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags-only-I`" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags-only-other`" AC_CHECK_HEADERS([gts.h]) CPPFLAGS=$SAVE_CPPFLAGS CFLAGS=$SAVE_CFLAGS But I'm afraid that gts-config does not support all these options, so you might try: SAVE_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS `gts-config --cflags-only-I || gts-config --cflags`" AC_CHECK_HEADERS([gts.h]) CPPFLAGS=$SAVE_CPPFLAGS HTH, Stepan _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf