From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 4 Feb 2021 12:54:07 +0000 (+0100)
Subject: configure: Add --with-assertions option and only enable assertions when it is used
X-Git-Tag: v_3_0_32~77
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/static/@default-cgi@/static/gitweb.js?a=commitdiff_plain;h=3e8a243bab529b12e538a4b2792097d917e38c8b;p=privoxy.git

configure: Add --with-assertions option and only enable assertions when it is used
---

diff --git a/configure.in b/configure.in
index 8aba8a79..8718a8de 100644
--- a/configure.in
+++ b/configure.in
@@ -157,6 +157,11 @@ AC_ARG_WITH(debug,
         ]
 )
 
+AC_ARG_WITH(assertions, [  --with-assertions       Enable assertions])
+if test "x$with_assertions" != "xyes"; then
+    CFLAGS="$CFLAGS -DNDEBUG"
+fi
+
 dnl =================================================================
 dnl Check for user and group validity
 dnl =================================================================