configure: Add --with-assertions option and only enable assertions when it is used
authorFabian Keil <fk@fabiankeil.de>
Thu, 4 Feb 2021 12:54:07 +0000 (13:54 +0100)
committerFabian Keil <fk@fabiankeil.de>
Sun, 21 Feb 2021 15:09:20 +0000 (16:09 +0100)
configure.in

index 8aba8a7..8718a8d 100644 (file)
@@ -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 =================================================================