Add bits for --enable-maintainer-mode...

2000-09-07  Phil Edwards  <pme@sources.redhat.com>

	Add bits for --enable-maintainer-mode:
	- turns on enable_debug
          (doing "--enable-maint --disable-debug" will DTRT)
	- turns on -Werror, now off by default
	* acinclude.m4: Add bits.
	* aclocal.m4: Regenerate.
	* configure.in: Add defaults for GLIBCPP_ENABLE_DEBUG.
	* configure: Regenerate.

From-SVN: r36252
This commit is contained in:
Benjamin Kosnik 2000-09-07 22:40:17 +00:00
parent bed7f38970
commit 7f586614b6
5 changed files with 941 additions and 971 deletions

View File

@ -1,3 +1,18 @@
2000-09-07 Phil Edwards <pme@sources.redhat.com>
Add bits for --enable-maintainer-mode:
- turns on enable_debug
(doing "--enable-maint --disable-debug" will DTRT)
- turns on -Werror, now off by default
* acinclude.m4: Add bits.
* aclocal.m4: Regenerate.
* configure.in: Add defaults for GLIBCPP_ENABLE_DEBUG.
* configure: Regenerate.
2000-09-07 Benjamin Kosnik <bkoz@cygnus.com>
* bits/std_cwctype.h: Remove yesterday's hacks.
2000-09-07 Brad Garcia <bgarcia@laurelnetworks.com>
* bits/stl_tree.h: Make operators !=, == type safe for map, set.

View File

@ -180,8 +180,9 @@ dnl here.
dnl
dnl Define WFMT_FLAGS='-fdiagnostics-show-location=once' if possible
dnl
dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining
dnl code or the new system_header pragma will die.
dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
dnl new inlining code or the new system_header pragma will die on -Werror.
dnl Leave it out by default and use maint-mode to use it.
dnl
dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
dnl compiler supports it.
@ -194,23 +195,13 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
AC_LANG_CPLUSPLUS
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
WERROR='-Werror'
# Check for pragma system_header.
AC_MSG_CHECKING([for g++ that supports pragma system_header])
CXXFLAGS='-Wunknown-pragmas -Werror'
AC_TRY_COMPILE([#pragma GCC system_header], [int foo;
], [ac_newpragma=yes], [ac_newpragma=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
# Check for maintainer-mode bits.
if test x"$USE_MAINTAINER_MODE" = xno; then
WERROR=''
else
# this is the suspicious part
CXXFLAGS=''
WERROR='-Werror'
fi
if test "$ac_newpragma" = "no"; then
WERROR="$WERROR -Wno-unknown-pragmas"
fi
AC_MSG_RESULT($ac_newpragma)
# Check for more sophisticated diagnostic control.
AC_MSG_CHECKING([for g++ that supports -fdiagnostics-show-location=once])
@ -1063,7 +1054,7 @@ dnl GLIBCPP_ENABLE_DEBUG
dnl --enable-debug sets '-ggdb -O0'.
dnl --disable-debug sets '-g' and whatever optimization options the
dnl compiler can handle.
dnl + Perhaps --enable-maintainer-mode should automatically turn this on?
dnl + --enable-maintainer-mode automatically defaults this to on.
dnl + Perhaps -D/-U of NDEBUG, DEBUG, DEBUG_ASSERT, ...?
dnl + Usage: GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
@ -1597,4 +1588,4 @@ ifelse(,,,[AC_SUBST(LIBTOOL)
AC_DEFUN([AM_PROG_LIBTOOL])
AC_DEFUN([AC_LIBTOOL_DLOPEN])
AC_DEFUN([AC_PROG_LD])
])
])

View File

@ -192,8 +192,9 @@ dnl here.
dnl
dnl Define WFMT_FLAGS='-fdiagnostics-show-location=once' if possible
dnl
dnl Define WERROR='-Werror' if possible; g++'s that lack the new inlining
dnl code or the new system_header pragma will die.
dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
dnl new inlining code or the new system_header pragma will die on -Werror.
dnl Leave it out by default and use maint-mode to use it.
dnl
dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
dnl compiler supports it.
@ -206,23 +207,13 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
AC_LANG_CPLUSPLUS
ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
WERROR='-Werror'
# Check for pragma system_header.
AC_MSG_CHECKING([for g++ that supports pragma system_header])
CXXFLAGS='-Wunknown-pragmas -Werror'
AC_TRY_COMPILE([#pragma GCC system_header], [int foo;
], [ac_newpragma=yes], [ac_newpragma=no])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
# Check for maintainer-mode bits.
if test x"$USE_MAINTAINER_MODE" = xno; then
WERROR=''
else
# this is the suspicious part
CXXFLAGS=''
WERROR='-Werror'
fi
if test "$ac_newpragma" = "no"; then
WERROR="$WERROR -Wno-unknown-pragmas"
fi
AC_MSG_RESULT($ac_newpragma)
# Check for more sophisticated diagnostic control.
AC_MSG_CHECKING([for g++ that supports -fdiagnostics-show-location=once])
@ -1075,7 +1066,7 @@ dnl GLIBCPP_ENABLE_DEBUG
dnl --enable-debug sets '-ggdb -O0'.
dnl --disable-debug sets '-g' and whatever optimization options the
dnl compiler can handle.
dnl + Perhaps --enable-maintainer-mode should automatically turn this on?
dnl + --enable-maintainer-mode automatically defaults this to on.
dnl + Perhaps -D/-U of NDEBUG, DEBUG, DEBUG_ASSERT, ...?
dnl + Usage: GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
dnl Where DEFAULT is either `yes' or `no'. If ommitted, it
@ -1610,6 +1601,7 @@ AC_DEFUN([AM_PROG_LIBTOOL])
AC_DEFUN([AC_LIBTOOL_DLOPEN])
AC_DEFUN([AC_PROG_LD])
])
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.

1842
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ GLIBCPP_CHECK_CPU
AC_CACHE_SAVE
# Enable all the crazy c++ stuff.
GLIBCPP_ENABLE_DEBUG
GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
GLIBCPP_ENABLE_CSTDIO
GLIBCPP_ENABLE_LONG_LONG(yes)
GLIBCPP_ENABLE_SHADOW(no)