Commit 44f0760e by Benjamin Kosnik Committed by Benjamin Kosnik

acinclude.m4 (GLIBCPP_ENABLE_PCH): Add bits for --enable-pch.


2003-06-30  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_PCH): Add bits for --enable-pch.
	* aclocal.m4: Regenerate.
	* configure.in (GLIBCPP_CHECK_PCH): Move, change to
	GLIBCPP_ENABLE_PCH, default to yes.
	* configure: Regenerate.
	* docs/html/configopts.html: Add --enable-pch.

From-SVN: r68715
parent ec097612
2003-06-30 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_PCH): Add bits for --enable-pch.
* aclocal.m4: Regenerate.
* configure.in (GLIBCPP_CHECK_PCH): Move, change to
GLIBCPP_ENABLE_PCH, default to yes.
* configure: Regenerate.
* docs/html/configopts.html: Add --enable-pch.
2003-06-30 Phil Edwards <pme@gcc.gnu.org> 2003-06-30 Phil Edwards <pme@gcc.gnu.org>
* testsuite/lib/libstdc++-v3-dg.exp: Add comments. * testsuite/lib/libstdc++-v3-dg.exp: Add comments.
......
...@@ -1371,32 +1371,60 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1371,32 +1371,60 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl dnl
dnl Check to see if building and using a C++ precompiled header can be done. dnl Check to see if building and using a C++ precompiled header can be done.
dnl dnl
dnl GLIBCPP_CHECK_PCH dnl GLIBCPP_ENABLE_PCH
dnl dnl
dnl If it looks like it may work, flip bits on in include/Makefile.am dnl --enable-pch=yes
dnl default, this shows intent to use stdc++.h.gch If it looks like it
dnl may work, after some light-hearted attempts to puzzle out compiler
dnl support, flip bits on in include/Makefile.am
dnl dnl
AC_DEFUN(GLIBCPP_CHECK_PCH, [ dnl --disable-pch
ac_test_CXXFLAGS="${CXXFLAGS+set}" dnl turns off attempts to use or build stdc++.h.gch.
ac_save_CXXFLAGS="$CXXFLAGS" dnl
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header' AC_DEFUN(GLIBCPP_ENABLE_PCH, [dnl
define([GLIBCPP_ENABLE_PCH_DEFAULT], ifelse($1,,, $1))dnl
AC_ARG_ENABLE(pch,
changequote(<<, >>)dnl
<< --enable-pch build pre-compiled libstdc++ includes [default=>>GLIBCPP_ENABLE_PCH_DEFAULT],
changequote([, ])dnl
[case "${enableval}" in
yes) enable_pch=yes ;;
no) enable_pch=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable PCH]) ;;
esac],
enable_pch=GLIBCPP_ENABLE_PCH_DEFAULT)dnl
AC_MSG_CHECKING([for compiler that seems to compile .gch files]) if test x$enable_pch = xyes; then
if test x${glibcpp_pch_comp+set} != xset; then ac_test_CXXFLAGS="${CXXFLAGS+set}"
AC_CACHE_VAL(glibcpp_pch_comp, [ ac_save_CXXFLAGS="$CXXFLAGS"
AC_LANG_SAVE CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h> AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
], ],
[ $1(0);], [ $1(0);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no]) [glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE AC_LANG_RESTORE
]) ])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
fi fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS" if test x"$enable_pch" = xyes && test x"$glibcpp_pch_comp" = xno; then
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes) enable_pch=no
if test "$glibcpp_pch_comp" = yes; then fi
AC_MSG_CHECKING([for enabled PCH])
AC_MSG_RESULT([$enable_pch])
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$enable_pch" = yes)
if test "$enable_pch" = yes; then
glibcpp_PCHFLAGS="-include bits/stdc++.h" glibcpp_PCHFLAGS="-include bits/stdc++.h"
else else
glibcpp_PCHFLAGS="" glibcpp_PCHFLAGS=""
......
...@@ -1383,32 +1383,60 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [ ...@@ -1383,32 +1383,60 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl dnl
dnl Check to see if building and using a C++ precompiled header can be done. dnl Check to see if building and using a C++ precompiled header can be done.
dnl dnl
dnl GLIBCPP_CHECK_PCH dnl GLIBCPP_ENABLE_PCH
dnl dnl
dnl If it looks like it may work, flip bits on in include/Makefile.am dnl --enable-pch=yes
dnl default, this shows intent to use stdc++.h.gch If it looks like it
dnl may work, after some light-hearted attempts to puzzle out compiler
dnl support, flip bits on in include/Makefile.am
dnl dnl
AC_DEFUN(GLIBCPP_CHECK_PCH, [ dnl --disable-pch
ac_test_CXXFLAGS="${CXXFLAGS+set}" dnl turns off attempts to use or build stdc++.h.gch.
ac_save_CXXFLAGS="$CXXFLAGS" dnl
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header' AC_DEFUN(GLIBCPP_ENABLE_PCH, [dnl
define([GLIBCPP_ENABLE_PCH_DEFAULT], ifelse($1,,, $1))dnl
AC_ARG_ENABLE(pch,
changequote(<<, >>)dnl
<< --enable-pch build pre-compiled libstdc++ includes [default=>>GLIBCPP_ENABLE_PCH_DEFAULT],
changequote([, ])dnl
[case "${enableval}" in
yes) enable_pch=yes ;;
no) enable_pch=no ;;
*) AC_MSG_ERROR([Unknown argument to enable/disable PCH]) ;;
esac],
enable_pch=GLIBCPP_ENABLE_PCH_DEFAULT)dnl
AC_MSG_CHECKING([for compiler that seems to compile .gch files]) if test x$enable_pch = xyes; then
if test x${glibcpp_pch_comp+set} != xset; then ac_test_CXXFLAGS="${CXXFLAGS+set}"
AC_CACHE_VAL(glibcpp_pch_comp, [ ac_save_CXXFLAGS="$CXXFLAGS"
AC_LANG_SAVE CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h> AC_MSG_CHECKING([for compiler that seems to compile .gch files])
if test x${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
], ],
[ $1(0);], [ $1(0);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no]) [glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE AC_LANG_RESTORE
]) ])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
fi fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS" if test x"$enable_pch" = xyes && test x"$glibcpp_pch_comp" = xno; then
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes) enable_pch=no
if test "$glibcpp_pch_comp" = yes; then fi
AC_MSG_CHECKING([for enabled PCH])
AC_MSG_RESULT([$enable_pch])
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$enable_pch" = yes)
if test "$enable_pch" = yes; then
glibcpp_PCHFLAGS="-include bits/stdc++.h" glibcpp_PCHFLAGS="-include bits/stdc++.h"
else else
glibcpp_PCHFLAGS="" glibcpp_PCHFLAGS=""
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -45,12 +45,15 @@ AM_PROG_LIBTOOL ...@@ -45,12 +45,15 @@ AM_PROG_LIBTOOL
AC_SUBST(enable_shared) AC_SUBST(enable_shared)
AC_SUBST(enable_static) AC_SUBST(enable_static)
# Check for c++ or library specific bits that don't require linking. # Check for support bits and g++ features that don't require linking.
GLIBCPP_CHECK_GNU_MAKE GLIBCPP_CHECK_GNU_MAKE
#GLIBCPP_CHECK_COMPILER_VERSION #GLIBCPP_CHECK_COMPILER_VERSION
GLIBCPP_CHECK_PCH GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
GLIBCPP_ENABLE_PCH([yes])
# Enable all the variable C++ stuff. C_MBCHAR must come early. # Enable all the variable C++ runtime options.
# NB: C_MBCHAR must come early.
GLIBCPP_ENABLE_CSTDIO GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_CLOCALE GLIBCPP_ENABLE_CLOCALE
GLIBCPP_ENABLE_CHEADERS([$c_model]) GLIBCPP_ENABLE_CHEADERS([$c_model])
...@@ -58,8 +61,6 @@ GLIBCPP_ENABLE_C_MBCHAR([yes]) ...@@ -58,8 +61,6 @@ GLIBCPP_ENABLE_C_MBCHAR([yes])
GLIBCPP_ENABLE_C99([yes]) GLIBCPP_ENABLE_C99([yes])
GLIBCPP_ENABLE_LONG_LONG([yes]) GLIBCPP_ENABLE_LONG_LONG([yes])
GLIBCPP_ENABLE_THREADS GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
GLIBCPP_ENABLE_CONCEPT_CHECKS GLIBCPP_ENABLE_CONCEPT_CHECKS
GLIBCPP_ENABLE_CXX_FLAGS GLIBCPP_ENABLE_CXX_FLAGS
GLIBCPP_ENABLE_DEBUG([no]) GLIBCPP_ENABLE_DEBUG([no])
......
...@@ -261,6 +261,18 @@ options</a></h1> ...@@ -261,6 +261,18 @@ options</a></h1>
people will volunteer to do other 'style' options. people will volunteer to do other 'style' options.
</p> </p>
</dd> </dd>
<dt><code>--enable-pch </code></dt>
<dd><p>In 3.4 and later, tries to turn on the generation of
stdc++.h.gch, a pre-compiled file including all the standard
C++ includes. If enabled (as by default), and the compiler
seems capable of passing the simple sanity checks thrown at
it, try to build stdc++.h.gch as part of the make process.
In addition, this generated file is used later on (by appending <code>
--include bits/stdc++.h </code> to CXXFLAGS) when running the
testsuite.
</p>
</dd>
</dl> </dl>
<p>Return <a href="#top">to the top of the page</a> or <p>Return <a href="#top">to the top of the page</a> or
<a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>. <a href="http://gcc.gnu.org/libstdc++/">to the libstdc++ homepage</a>.
......
...@@ -118,7 +118,7 @@ USE_NLS = @USE_NLS@ ...@@ -118,7 +118,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
baseline_file = @baseline_file@ baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
......
...@@ -119,7 +119,7 @@ USE_NLS = @USE_NLS@ ...@@ -119,7 +119,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
baseline_file = @baseline_file@ baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
......
...@@ -116,7 +116,7 @@ USE_NLS = @USE_NLS@ ...@@ -116,7 +116,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
baseline_file = @baseline_file@ baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
......
...@@ -120,7 +120,7 @@ USE_NLS = @USE_NLS@ ...@@ -120,7 +120,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
baseline_file = @baseline_file@ baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
......
...@@ -114,7 +114,7 @@ USE_NLS = @USE_NLS@ ...@@ -114,7 +114,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@ WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@ WERROR = @WERROR@
baseline_file = @baseline_file@ baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@ check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@ enable_shared = @enable_shared@
enable_static = @enable_static@ enable_static = @enable_static@
......
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