bug-autoconf
[Top][All Lists]
Advanced

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

AC_HEADERS and C++ problem


From: Stéphane Pion
Subject: AC_HEADERS and C++ problem
Date: Mon, 28 Apr 2003 18:54:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.3) Gecko/20030327 Debian/1.3-4

Hi,
i use AC_CHECK_HEADERS in "if" statements. So, consider the following piece of code:
AC_PREREQ(2.57)
AC_INIT([],[0],[])
AC_CONFIG_SRCDIR(configure.ac)
AC_LANG([C++])
AC_PROG_CXX
if false ; then
        AC_CHECK_HEADERS([param.h],,)
fi
AC_CHECK_HEADERS([stdio.h],,)

scripts> autoreconf -i && ./configure
...
...
checking whether g++ accepts -g... yes
checking stdio.h usability... yes
checking stdio.h presence... no
configure: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: stdio.h: proceeding with the preprocessor's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to address@hidden ##
configure: WARNING:     ## ------------------------------------ ##
checking for stdio.h... no
...

If i remove the param.h  check or AC_LANG, everythings goes well.
Event if script doesn't pass in the if statement, the CXXCPP variable seems to be set with empty value.
Explicitly call AC_PROG_CXXCPP after AC_PROG_CXX also remove the problem

Stephane






reply via email to

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