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
This commit is contained in:
Benjamin Kosnik 2003-06-30 17:40:13 +00:00 committed by Benjamin Kosnik
parent ec097612bc
commit 44f0760eae
11 changed files with 1515 additions and 1412 deletions

View File

@ -1,3 +1,12 @@
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>
* testsuite/lib/libstdc++-v3-dg.exp: Add comments.

View File

@ -1371,32 +1371,60 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl
dnl Check to see if building and using a C++ precompiled header can be done.
dnl
dnl GLIBCPP_CHECK_PCH
dnl GLIBCPP_ENABLE_PCH
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
AC_DEFUN(GLIBCPP_CHECK_PCH, [
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
dnl --disable-pch
dnl turns off attempts to use or build stdc++.h.gch.
dnl
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${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
if test x$enable_pch = xyes; then
ac_test_CXXFLAGS="${CXXFLAGS+set}"
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${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);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes)
if test "$glibcpp_pch_comp" = yes; then
CXXFLAGS="$ac_save_CXXFLAGS"
fi
if test x"$enable_pch" = xyes && test x"$glibcpp_pch_comp" = xno; then
enable_pch=no
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"
else
glibcpp_PCHFLAGS=""

View File

@ -1383,32 +1383,60 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl
dnl Check to see if building and using a C++ precompiled header can be done.
dnl
dnl GLIBCPP_CHECK_PCH
dnl GLIBCPP_ENABLE_PCH
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
AC_DEFUN(GLIBCPP_CHECK_PCH, [
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Werror -Winvalid-pch -Wno-deprecated -x c++-header'
dnl --disable-pch
dnl turns off attempts to use or build stdc++.h.gch.
dnl
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${glibcpp_pch_comp+set} != xset; then
AC_CACHE_VAL(glibcpp_pch_comp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <math.h>
if test x$enable_pch = xyes; then
ac_test_CXXFLAGS="${CXXFLAGS+set}"
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${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);],
[glibcpp_pch_comp=yes], [glibcpp_pch_comp=no])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
AC_LANG_RESTORE
])
fi
AC_MSG_RESULT([$glibcpp_pch_comp])
CXXFLAGS="$ac_save_CXXFLAGS"
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "$glibcpp_pch_comp" = yes)
if test "$glibcpp_pch_comp" = yes; then
CXXFLAGS="$ac_save_CXXFLAGS"
fi
if test x"$enable_pch" = xyes && test x"$glibcpp_pch_comp" = xno; then
enable_pch=no
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"
else
glibcpp_PCHFLAGS=""

2753
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -45,12 +45,15 @@ AM_PROG_LIBTOOL
AC_SUBST(enable_shared)
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_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_CLOCALE
GLIBCPP_ENABLE_CHEADERS([$c_model])
@ -58,8 +61,6 @@ GLIBCPP_ENABLE_C_MBCHAR([yes])
GLIBCPP_ENABLE_C99([yes])
GLIBCPP_ENABLE_LONG_LONG([yes])
GLIBCPP_ENABLE_THREADS
GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
GLIBCPP_ENABLE_CONCEPT_CHECKS
GLIBCPP_ENABLE_CXX_FLAGS
GLIBCPP_ENABLE_DEBUG([no])

View File

@ -261,6 +261,18 @@ options</a></h1>
people will volunteer to do other 'style' options.
</p>
</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>
<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>.

View File

@ -118,7 +118,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@

View File

@ -119,7 +119,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@

View File

@ -116,7 +116,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@

View File

@ -120,7 +120,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@

View File

@ -114,7 +114,7 @@ USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
baseline_file = @baseline_file@
baseline_dir = @baseline_dir@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@