From 8904b43449d280f39a738c09e3e649b58f519e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Sat, 14 Jun 2014 16:48:55 +0200 Subject: Support --enable-debug=no Reported by Jeroen Roovers (jer@gentoo) who proposed a similar patch. --- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 9e83098..f4603ac 100644 --- a/configure.ac +++ b/configure.ac @@ -31,9 +31,12 @@ dnl by default turn off debugging AC_MSG_CHECKING([whether to enable debugging]) AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],[build with extra debugging messages])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([DEBUG], 1, [Define this to enable debugging messages])], - [AC_MSG_RESULT([no])]) + [], [enable_debug=no]) +AS_CASE([$enable_debug], + [yes], [AC_MSG_RESULT([yes]) + AC_DEFINE([DEBUG], 1, [Define this to enable debugging messages])], + [no], [AC_MSG_RESULT([no])], + [AC_MSG_ERROR([invalid --enable-debug="$enable_debug" parameter])]) AC_ARG_WITH([electric-fence], [AS_HELP_STRING([--with-electric-fence], -- cgit v1.2.3