aboutsummaryrefslogtreecommitdiff
path: root/c++tools/configure.ac
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /c++tools/configure.ac
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'c++tools/configure.ac')
-rw-r--r--c++tools/configure.ac39
1 files changed, 35 insertions, 4 deletions
diff --git a/c++tools/configure.ac b/c++tools/configure.ac
index 5771f2a..f991f63 100644
--- a/c++tools/configure.ac
+++ b/c++tools/configure.ac
@@ -1,5 +1,5 @@
# Configure script for c++tools
-# Copyright (C) 2020 Free Software Foundation, Inc.
+# Copyright (C) 2020-2021 Free Software Foundation, Inc.
# Written by Nathan Sidwell <nathan@acm.org> while at FaceBook
#
# This file is free software; you can redistribute it and/or modify it
@@ -41,6 +41,8 @@ MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf])
AC_CHECK_PROGS([AUTOHEADER], [autoheader], [$MISSING autoheader])
+AC_LANG(C++)
+
dnl Enabled by default
AC_MSG_CHECKING([whether to build C++ tools])
AC_ARG_ENABLE(c++-tools,
@@ -58,15 +60,44 @@ AS_HELP_STRING([--enable-maintainer-mode],
[enable maintainer mode. Add rules to rebuild configurey bits]),,
[enable_maintainer_mode=no])
case "$enable_maintainer_mode" in
- ("yes") maintainer_mode=yes ;;
- ("no") maintainer=no ;;
- (*) AC_MSG_ERROR([unknown maintainer mode $enable_maintainer_mode]) ;;
+ yes) maintainer_mode=yes ;;
+ no) maintainer_mode=no ;;
+ *) AC_MSG_ERROR([unknown maintainer mode $enable_maintainer_mode]) ;;
esac
AC_MSG_CHECKING([maintainer-mode])
AC_MSG_RESULT([$maintainer_mode])
test "$maintainer_mode" = yes && MAINTAINER=yes
AC_SUBST(MAINTAINER)
+# Handle configuration of checking; for the tools in this directory we
+# default to release checking and stricter checks do not change this.
+
+AC_ARG_ENABLE(checking,
+[AS_HELP_STRING([[--enable-checking[=LIST]]],
+ [enable expensive run-time checks. With LIST,
+ enable only specific categories of checks.
+ Categories are: yes,no,all,none,release.])],
+[ac_checking_flags="${enableval}"],[
+# Default to checking.
+ac_checking_flags=yes
+])
+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|release|assert) ac_assert_checking=1 ; ;;
+ no|none) ac_assert_checking= ; ;;
+ *) ;;
+ esac
+done
+IFS="$ac_save_IFS"
+
+if test x$ac_assert_checking != x ; then
+ AC_DEFINE(ENABLE_ASSERT_CHECKING, 1,
+[Define if you want assertions enabled. This is a cheap check.])
+fi
+
# Check whether --enable-default-pie was given.
AC_ARG_ENABLE(default-pie,
[AS_HELP_STRING([--enable-default-pie],