Commit 8bd636c5 by Phil Edwards Committed by Phil Edwards

acinclude.m4: Clean up comments on newer checks.

2000-05-19  Phil Edwards  <pme@sourceware.cygnus.com>

	* acinclude.m4:  Clean up comments on newer checks.
	  (GLIBCPP_CHECK_COMPILER_VERSION):  Check for system_header
	  pragma support.  Remove WERRORSUPPRESS variable, add WERROR.
	* aclocal.m4:  Regenerate.
	* configure:  Regenerate.
	* Makefile.in:  Regenerate.
	* libio/Makefile.in:  Regenerate.
	* math/Makefile.in:  Regenerate.
	* src/Makefile.am:  Tell make's WERROR to depend on configure's WERROR.
	* src/Makefile.in:  Regenerate.
	* docs/configopts.html:  Document changes to --enable names.

From-SVN: r34034
parent 9ba11d5a
2000-05-19 Phil Edwards <pme@sourceware.cygnus.com>
* acinclude.m4: Clean up comments on newer checks.
(GLIBCPP_CHECK_COMPILER_VERSION): Check for system_header
pragma support. Remove WERRORSUPPRESS variable, add WERROR.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* libio/Makefile.in: Regenerate.
* math/Makefile.in: Regenerate.
* src/Makefile.am: Tell make's WERROR to depend on configure's WERROR.
* src/Makefile.in: Regenerate.
* docs/configopts.html: Document changes to --enable names.
2000-05-18 Chip Salzenberg <chip@valinux.com>
* bits/ostream.tcc (_S_pad_char): Function template should not be
......
......@@ -98,7 +98,7 @@ THREADOBJS = @THREADOBJS@
THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@
WERRORSUPPRESS = @WERRORSUPPRESS@
WERROR = @WERROR@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
......
......@@ -154,9 +154,12 @@ AC_SUBST(GLIBCPP_CXXFLAGS)
dnl
dnl Check to see if g++ can compile this library.
dnl Check to see if g++ can compile this library, and if so, if any version-
dnl specific precautions need to be taken.
dnl
dnl Define OPTLEVEL='-O2' if new inlining code present.
dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining
dnl code or the new system_header pragma will die.
dnl
dnl GLIBCPP_CHECK_COMPILER_VERSION
AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
......@@ -168,23 +171,45 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory)
AC_MSG_CHECKING([for g++ that supports new system_header pragma])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# the CXXFLAGS thing is suspicious, but based on similar
# bits in GLIBCPP_CONFIGURE
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Wunknown-pragmas -Werror'
AC_TRY_COMPILE([#pragma system_header], [int foo;
], [WERROR='-Werror'], [WERROR=''])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
fi
AC_LANG_RESTORE
if test "$WERROR" = ""; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
AC_MSG_CHECKING([for g++ that supports new inlining mechanism])
AC_EGREP_CPP([ok], [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
ok
#endif
], [OPTLEVEL='-O2'
WERRORSUPPRESS=
], [OPTLEVEL=
WERRORSUPPRESS=-Wno-error
])
], [OPTLEVEL='-O2'], [OPTLEVEL=''])
if test "$OPTLEVEL" = ""; then
AC_MSG_RESULT(no)
# something of a hack here
WERROR=''
else
AC_MSG_RESULT(yes)
fi
AC_SUBST(OPTLEVEL)
AC_SUBST(WERRORSUPPRESS)
AC_SUBST(WERROR)
])
......@@ -237,8 +262,6 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
])
dnl
dnl Check to see what architecture we are compiling for. If it's
dnl supported, use special hand-crafted routines to provide thread
dnl primitives. Also, if architecture-specific flags are required for
......@@ -616,7 +639,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_SUPPORT, [
dnl
dnl Check for certain special build configurations.
dnl Check for special debugging mode; not for production use.
dnl
dnl GLIBCPP_ENABLE_DEBUG
dnl --enable-debug sets '-ggdb -O0'.
......@@ -742,7 +765,7 @@ AC_SUBST(GCC_OBJDIR)
dnl
dnl Check for certain special build configurations.
dnl Check for which I/O library to use: libio, or something specific.
dnl
dnl GLIBCPP_ENABLE_CSTDIO
dnl --enable-cstdio=libio sets config/c_io_libio.h and friends
......@@ -806,7 +829,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl
dnl Check for certain special build configurations.
dnl Check for which threading library to use.
dnl
dnl GLIBCPP_ENABLE_THREADS
dnl --enable-threads=posix sets config/threads-posix.h et. al.
......@@ -898,7 +921,7 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
dnl
dnl Check for certain special build configurations.
dnl Check for template specializations for the 'long long' type extension.
dnl
dnl GLIBCPP_ENABLE_LONG_LONG
dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
......@@ -931,7 +954,7 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
dnl
dnl Check for certain special build configurations.
dnl Check for whether or not to do shadowed C headers.
dnl
dnl GLIBCPP_ENABLE_SHADOW
dnl --enable-cshadow-headers [does stuff].
......@@ -962,7 +985,7 @@ dnl Option parsed, now set things appropriately
case "$enable_cshadow_headers" in
yes)
SHADOW_INCLUDES="-I$srcdir/shadow -I$blddir/cshadow"
$srcdir/inclosure "-I $blddir/../../gcc/include/ -I /usr/include/ -G machine/ansi.h" | $srcdir/mkcshadow
$srcdir/inclosure "-I $blddir/../../gcc/include/ -I /usr/include/ -G machine/ansi.h" | $srcdir/mkcshadow
;;
no)
SHADOW_INCLUDES=''
......
......@@ -166,9 +166,12 @@ AC_SUBST(GLIBCPP_CXXFLAGS)
dnl
dnl Check to see if g++ can compile this library.
dnl Check to see if g++ can compile this library, and if so, if any version-
dnl specific precautions need to be taken.
dnl
dnl Define OPTLEVEL='-O2' if new inlining code present.
dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining
dnl code or the new system_header pragma will die.
dnl
dnl GLIBCPP_CHECK_COMPILER_VERSION
AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
......@@ -180,23 +183,45 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory)
AC_MSG_CHECKING([for g++ that supports new system_header pragma])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# the CXXFLAGS thing is suspicious, but based on similar
# bits in GLIBCPP_CONFIGURE
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Wunknown-pragmas -Werror'
AC_TRY_COMPILE([#pragma system_header], [int foo;
], [WERROR='-Werror'], [WERROR=''])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
fi
AC_LANG_RESTORE
if test "$WERROR" = ""; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
fi
AC_MSG_CHECKING([for g++ that supports new inlining mechanism])
AC_EGREP_CPP([ok], [
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
ok
#endif
], [OPTLEVEL='-O2'
WERRORSUPPRESS=
], [OPTLEVEL=
WERRORSUPPRESS=-Wno-error
])
], [OPTLEVEL='-O2'], [OPTLEVEL=''])
if test "$OPTLEVEL" = ""; then
AC_MSG_RESULT(no)
# something of a hack here
WERROR=''
else
AC_MSG_RESULT(yes)
fi
AC_SUBST(OPTLEVEL)
AC_SUBST(WERRORSUPPRESS)
AC_SUBST(WERROR)
])
......@@ -249,8 +274,6 @@ AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
])
dnl
dnl Check to see what architecture we are compiling for. If it's
dnl supported, use special hand-crafted routines to provide thread
dnl primitives. Also, if architecture-specific flags are required for
......@@ -628,7 +651,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPLEX_SUPPORT, [
dnl
dnl Check for certain special build configurations.
dnl Check for special debugging mode; not for production use.
dnl
dnl GLIBCPP_ENABLE_DEBUG
dnl --enable-debug sets '-ggdb -O0'.
......@@ -754,7 +777,7 @@ AC_SUBST(GCC_OBJDIR)
dnl
dnl Check for certain special build configurations.
dnl Check for which I/O library to use: libio, or something specific.
dnl
dnl GLIBCPP_ENABLE_CSTDIO
dnl --enable-cstdio=libio sets config/c_io_libio.h and friends
......@@ -818,7 +841,7 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
dnl
dnl Check for certain special build configurations.
dnl Check for which threading library to use.
dnl
dnl GLIBCPP_ENABLE_THREADS
dnl --enable-threads=posix sets config/threads-posix.h et. al.
......@@ -910,7 +933,7 @@ AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
dnl
dnl Check for certain special build configurations.
dnl Check for template specializations for the 'long long' type extension.
dnl
dnl GLIBCPP_ENABLE_LONG_LONG
dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
......@@ -943,7 +966,7 @@ AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
dnl
dnl Check for certain special build configurations.
dnl Check for whether or not to do shadowed C headers.
dnl
dnl GLIBCPP_ENABLE_SHADOW
dnl --enable-cshadow-headers [does stuff].
......@@ -974,7 +997,7 @@ dnl Option parsed, now set things appropriately
case "$enable_cshadow_headers" in
yes)
SHADOW_INCLUDES="-I$srcdir/shadow -I$blddir/cshadow"
$srcdir/inclosure "-I $blddir/../../gcc/include/ -I /usr/include/ -G machine/ansi.h" | $srcdir/mkcshadow
$srcdir/inclosure "-I $blddir/../../gcc/include/ -I /usr/include/ -G machine/ansi.h" | $srcdir/mkcshadow
;;
no)
SHADOW_INCLUDES=''
......
......@@ -9,7 +9,7 @@
<TITLE>libstdc++-v3 configure options</TITLE>
<LINK REL="home" HREF="http://sourceware.cygnus.com/libstdc++/">
<LINK REL=StyleSheet HREF="lib3styles.css">
<!-- $Id: configopts.html,v 1.2 2000/05/09 20:25:13 pme Exp $ -->
<!-- $Id: configopts.html,v 1.3 2000/05/16 17:06:39 pme Exp $ -->
</HEAD>
<BODY>
......@@ -68,26 +68,24 @@ options</A></H1>
Pilot, will be able to use libstdc++-v3 without libio.
</P>
<DT><TT>--enable-long_long </TT>
<DT><TT>--enable-long-long </TT>
<DD><P>The &quot;long long&quot; type was introduced in C99. It is
provided as a GNU extension to C++98 in g++. This flag builds
support for &quot;long long&quot; into the library (specialized
templates and the like).
</P>
<P>Careful, that's an underscore between the words, not a hyphen.
</P>
<DT><TT>--enable-namespaces </TT>[default]
<DD><P>By default, g++ currently ignores namespace <TT>std</TT> for
backwards compatibility. It can be turned on with the
<TT> -fhonor-std </TT> flag to the compiler. As of libstdc++-v3
snapshot 2.90.8, that flag is passed to g++ when building the
library. (This will eventually be the default for the compiler
itself.) The --disable variant will put all std:: symbols into
the global namespace.
library. (In g++ 2.96 and later, this flag is on by default if
libstdc++-v3 is used.) The --disable variant will put all std::
symbols into the global namespace.
</P>
<DT><TT>--enable-shadow-headers </TT>
<DT><TT>--enable-cshadow-headers </TT>
<DD><P>This turns on the code to construct shadowed C headers. Very
experimental as of this writing.
</P>
......@@ -159,7 +157,7 @@ options</A></H1>
<HR>
<P CLASS="fineprint"><EM>
$Id: configopts.html,v 1.2 2000/05/09 20:25:13 pme Exp $
$Id: configopts.html,v 1.3 2000/05/16 17:06:39 pme Exp $
</EM></P>
......
......@@ -98,7 +98,7 @@ THREADOBJS = @THREADOBJS@
THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@
WERRORSUPPRESS = @WERRORSUPPRESS@
WERROR = @WERROR@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
......
......@@ -98,7 +98,7 @@ THREADOBJS = @THREADOBJS@
THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@
WERRORSUPPRESS = @WERRORSUPPRESS@
WERROR = @WERROR@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
......
......@@ -37,7 +37,7 @@ toolexeclib_LTLIBRARIES = libstdc++.la
EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
WERROR = -Werror
WERROR = @WERROR@
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fsquangle -fnew-exceptions \
# -fdata-sections -ffunction-sections \
# -fvtable-gc -Wl,--gc-sections
......
......@@ -97,7 +97,6 @@ THREADOBJS = @THREADOBJS@
THREADSPEC = @THREADSPEC@
USE_LONG_DOUBLE = @USE_LONG_DOUBLE@
VERSION = @VERSION@
WERRORSUPPRESS = @WERRORSUPPRESS@
cpu_include_dir = @cpu_include_dir@
ctype_include_dir = @ctype_include_dir@
glibcpp_basedir = @glibcpp_basedir@
......@@ -115,7 +114,7 @@ MAINT_CHARSET = latin1
toolexeclib_LTLIBRARIES = libstdc++.la
EXTRA_LTLIBRARIES = libinst-string.la libinst-wstring.la
WERROR = -Werror
WERROR = @WERROR@
# OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fsquangle -fnew-exceptions \
# -fdata-sections -ffunction-sections \
# -fvtable-gc -Wl,--gc-sections
......
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