Hello!
I am getting some strange errors when using AC_CHECK_HEADER. I want to
check for a specific header file and I do the following in my
configure.ac:
AC_LANG_PUSH([C++])
AC_CHECK_HEADER([SDL_ttf.h], [],
AC_MSG_ERROR([SDL_ttf.h header file required]))
AC_LANG_POP
The file SDL_ttf.h resides in /usr/local/include/SDL. When I look in
config.log I see the following:
configure:9280: checking SDL_ttf.h usability
configure:9293: g++ -c -ggdb -O0 -Wall -I/usr/include/SDL -D_REENTRANT
conftest.cc >&5
This works fine. After the ebove test ./configure does this:
configure:9316: checking SDL_ttf.h presence
configure:9327: g++ -E conftest.cc
configure:9343:21: SDL_ttf.h: No such file or directory
Which fails since it doesn't seem to use my CXXFLAGS variable at all. I
also get this message from ./configure:
configure: WARNING: SDL_ttf.h: accepted by the compiler, rejected by the
preprocessor!
configure: WARNING: SDL_ttf.h: proceeding with the preprocessor's result
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: ## Report this to [EMAIL PROTECTED] ##
configure: WARNING: ## ------------------------------------ ##
Is this a bug? What is the difference between checking for usability and
checking for presence? Shouldn't autoconf use my CXXFLAGS when checking
for a header files presence?
Regards,
Mattias