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>
* testsuite/lib/libstdc++-v3-dg.exp: Add comments.
......
......@@ -1371,11 +1371,30 @@ 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, [
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
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'
......@@ -1395,8 +1414,17 @@ AC_DEFUN(GLIBCPP_CHECK_PCH, [
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
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=""
......
......@@ -1383,11 +1383,30 @@ 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, [
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
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'
......@@ -1407,8 +1426,17 @@ AC_DEFUN(GLIBCPP_CHECK_PCH, [
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
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=""
......
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
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])
......
......@@ -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>.
......
......@@ -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@
......
......@@ -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@
......
......@@ -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@
......
......@@ -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@
......
......@@ -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@
......
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