Commit 118545ec by Alexandre Oliva Committed by Alexandre Oliva

acinclude.m4 (GLIBCXX_ENABLE_PCH): Rework test such that it tests not only…

acinclude.m4 (GLIBCXX_ENABLE_PCH): Rework test such that it tests not only generation of pch files, but also their use.

* acinclude.m4 (GLIBCXX_ENABLE_PCH): Rework test such that it
tests not only generation of pch files, but also their use.
* aclocal.m4, configure: Rebuilt.

From-SVN: r69727
parent bd16cb25
2003-07-23 Alexandre Oliva <aoliva@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_PCH): Rework test such that it
tests not only generation of pch files, but also their use.
* aclocal.m4, configure: Rebuilt.
2003-07-23 Steve Ellcey <sje@cup.hp.com> 2003-07-23 Steve Ellcey <sje@cup.hp.com>
* config/cpu/hppa/atomicity.h: Change * config/cpu/hppa/atomicity.h: Change
......
...@@ -1394,7 +1394,7 @@ AC_ARG_ENABLE(libstdcxx_pch, ...@@ -1394,7 +1394,7 @@ AC_ARG_ENABLE(libstdcxx_pch,
changequote(<<, >>)dnl changequote(<<, >>)dnl
<< --enable-libstdcxx-pch build pre-compiled libstdc++ includes [default=>>GLIBCXX_ENABLE_PCH_DEFAULT], << --enable-libstdcxx-pch build pre-compiled libstdc++ includes [default=>>GLIBCXX_ENABLE_PCH_DEFAULT],
changequote([, ])dnl changequote([, ])dnl
[case "${enableval}" in [case ${enableval} in
yes) enable_libstdcxx_pch=yes ;; yes) enable_libstdcxx_pch=yes ;;
no) enable_libstdcxx_pch=no ;; no) enable_libstdcxx_pch=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable PCH]) ;; *) AC_MSG_ERROR([Unknown argument to enable/disable PCH]) ;;
...@@ -1402,27 +1402,30 @@ changequote([, ])dnl ...@@ -1402,27 +1402,30 @@ changequote([, ])dnl
enable_libstdcxx_pch=GLIBCXX_ENABLE_PCH_DEFAULT)dnl enable_libstdcxx_pch=GLIBCXX_ENABLE_PCH_DEFAULT)dnl
if test x$enable_libstdcxx_pch = xyes; then if test x$enable_libstdcxx_pch = xyes; then
ac_test_CXXFLAGS="${CXXFLAGS+set}" AC_CACHE_CHECK([for pch support], [libstdcxx_cv_pch_comp],[
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${pch_comp+set} != xset; then
AC_CACHE_VAL(pch_comp, [
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>], , ac_save_CXXFLAGS=$CXXFLAGS
[pch_comp=yes], [pch_comp=no]) CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
echo '#include <math.h>' > conftest.h
if ${CXX-g++} $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
-o conftest.h.gch 1>&5 2>&1 &&
echo '#error "pch failed"' > conftest.h &&
echo '#include "conftest.h"' > conftest.C &&
${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.C 1>&5 2>&1 ; then
libstdcxx_cv_pch_comp=yes
else
libstdcxx_cv_pch_comp=no
fi
rm -f conftest*
CXXFLAGS=$ac_save_CXXFLAGS
AC_LANG_RESTORE AC_LANG_RESTORE
]) ])
fi
AC_MSG_RESULT([$pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
fi fi
if test x"$enable_libstdcxx_pch" = xyes && test x"$pch_comp" = xno; then if test x"$enable_libstdcxx_pch" = xyes &&
enable_pch=no test x"$libstdcxx_cv_pch_comp" = xno; then
enable_libstdcxx_pch=no
fi fi
AC_MSG_CHECKING([for enabled PCH]) AC_MSG_CHECKING([for enabled PCH])
......
...@@ -1406,7 +1406,7 @@ AC_ARG_ENABLE(libstdcxx_pch, ...@@ -1406,7 +1406,7 @@ AC_ARG_ENABLE(libstdcxx_pch,
changequote(<<, >>)dnl changequote(<<, >>)dnl
<< --enable-libstdcxx-pch build pre-compiled libstdc++ includes [default=>>GLIBCXX_ENABLE_PCH_DEFAULT], << --enable-libstdcxx-pch build pre-compiled libstdc++ includes [default=>>GLIBCXX_ENABLE_PCH_DEFAULT],
changequote([, ])dnl changequote([, ])dnl
[case "${enableval}" in [case ${enableval} in
yes) enable_libstdcxx_pch=yes ;; yes) enable_libstdcxx_pch=yes ;;
no) enable_libstdcxx_pch=no ;; no) enable_libstdcxx_pch=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable PCH]) ;; *) AC_MSG_ERROR([Unknown argument to enable/disable PCH]) ;;
...@@ -1414,27 +1414,30 @@ changequote([, ])dnl ...@@ -1414,27 +1414,30 @@ changequote([, ])dnl
enable_libstdcxx_pch=GLIBCXX_ENABLE_PCH_DEFAULT)dnl enable_libstdcxx_pch=GLIBCXX_ENABLE_PCH_DEFAULT)dnl
if test x$enable_libstdcxx_pch = xyes; then if test x$enable_libstdcxx_pch = xyes; then
ac_test_CXXFLAGS="${CXXFLAGS+set}" AC_CACHE_CHECK([for pch support], [libstdcxx_cv_pch_comp],[
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${pch_comp+set} != xset; then
AC_CACHE_VAL(pch_comp, [
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>], , ac_save_CXXFLAGS=$CXXFLAGS
[pch_comp=yes], [pch_comp=no]) CXXFLAGS="$CXXFLAGS -Werror -Winvalid-pch -Wno-deprecated"
echo '#include <math.h>' > conftest.h
if ${CXX-g++} $CXXFLAGS $CPPFLAGS -x c++-header conftest.h \
-o conftest.h.gch 1>&5 2>&1 &&
echo '#error "pch failed"' > conftest.h &&
echo '#include "conftest.h"' > conftest.C &&
${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.C 1>&5 2>&1 ; then
libstdcxx_cv_pch_comp=yes
else
libstdcxx_cv_pch_comp=no
fi
rm -f conftest*
CXXFLAGS=$ac_save_CXXFLAGS
AC_LANG_RESTORE AC_LANG_RESTORE
]) ])
fi
AC_MSG_RESULT([$pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
fi fi
if test x"$enable_libstdcxx_pch" = xyes && test x"$pch_comp" = xno; then if test x"$enable_libstdcxx_pch" = xyes &&
enable_pch=no test x"$libstdcxx_cv_pch_comp" = xno; then
enable_libstdcxx_pch=no
fi fi
AC_MSG_CHECKING([for enabled PCH]) AC_MSG_CHECKING([for enabled PCH])
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment