summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-14 02:04:07 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-09-14 03:49:21 -0500
commit445c647a52f21fe402afc5c60505e151e035f019 (patch)
treef7b740079048676faea1b3e3f936c0439165335d /configure.in
parentb42094b2b06f4837a6df65e6b87caf8139fc0d0d (diff)
add a configure option to make assert() abort in release code
Change-Id: I93720ee3338426174b31a6ea6dba3af7ffb7e207
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 5cb6463408f6..64cba655a74f 100644
--- a/configure.in
+++ b/configure.in
@@ -756,6 +756,11 @@ AC_ARG_ENABLE(werror,
of warnings as errors is disabled explicitly.)]),
,)
+AC_ARG_ENABLE(assert-always-abort,
+ AS_HELP_STRING([--enable-assert-always-abort],
+ [make assert() abort even in release code.]),
+,)
+
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[Include debugging information like with --enable-symbols, disable
@@ -4011,6 +4016,18 @@ else
fi
AC_SUBST(EXTERNAL_WARNINGS_NOT_ERRORS)
+dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to have assert to abort in release code])
+if test -n "$enable_assert_always_abort" -a "$enable_assert_always_abort" = "yes"; then
+ ASSERT_ALWAYS_ABORT="TRUE"
+ AC_MSG_RESULT([yes])
+else
+ ASSERT_ALWAYS_ABORT="FALSE"
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(ASSERT_ALWAYS_ABORT)
+
dnl Set the ENABLE_DEBUG variable.
dnl ===================================================================
AC_MSG_CHECKING([whether to do a debug build])