aboutsummaryrefslogtreecommitdiff
path: root/libcpp/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/configure')
-rwxr-xr-xlibcpp/configure46
1 files changed, 42 insertions, 4 deletions
diff --git a/libcpp/configure b/libcpp/configure
index d07aed3199c..f21b361577f 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -1333,7 +1333,11 @@ Optional Features:
--enable-werror-always enable -Werror despite compiler version
--disable-rpath do not hardcode runtime library paths
--enable-maintainer-mode enable rules only needed by maintainers
- --enable-checking enable expensive run-time checks
+ --enable-checking[=LIST]
+ enable expensive run-time checks. With LIST, enable
+ only specific categories of checks. Categories are:
+ yes,no,all,none,release. Flags are: misc,valgrind or
+ other strings
--enable-canonical-system-headers
enable or disable system headers canonicalization
@@ -7083,20 +7087,54 @@ else
fi
+# Enable expensive internal checks
+is_release=
+if test -f $srcdir/../gcc/DEV-PHASE \
+ && test x"`cat $srcdir/../gcc/DEV-PHASE`" != xexperimental; then
+ is_release=yes
+fi
+
# Check whether --enable-checking was given.
if test "${enable_checking+set}" = set; then :
- enableval=$enable_checking;
+ enableval=$enable_checking; ac_checking_flags="${enableval}"
+else
+
+# Determine the default checks.
+if test x$is_release = x ; then
+ ac_checking_flags=yes
else
- enable_checking=no
+ ac_checking_flags=release
+fi
fi
+IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
+for check in release $ac_checking_flags
+do
+ case $check in
+ # these set all the flags to specific states
+ yes|all) ac_checking=1 ; ac_valgrind_checking= ;;
+ no|none|release) ac_checking= ; ac_valgrind_checking= ;;
+ # these enable particular checks
+ misc) ac_checking=1 ;;
+ valgrind) ac_valgrind_checking=1 ;;
+ # accept
+ *) ;;
+ esac
+done
+IFS="$ac_save_IFS"
-if test $enable_checking != no ; then
+if test x$ac_checking != x ; then
$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
fi
+if test x$ac_valgrind_checking != x ; then
+
+$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
+
+fi
+
# Check whether --enable-canonical-system-headers was given.
if test "${enable_canonical_system_headers+set}" = set; then :
enableval=$enable_canonical_system_headers;