summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2015-02-10 07:24:05 -0500
committerThomas Markwalder <tmark@isc.org>2015-02-10 07:24:05 -0500
commit45adf35cfc3c78286bbf6775806e3ce9568d444a (patch)
tree01d168df830c94f32664210760c8418f2e42f25e /configure.ac
parentb3b69c1cb447978579b375b25867f710147b96ca (diff)
downloadisc-dhcp-45adf35cfc3c78286bbf6775806e3ce9568d444a.tar.gz
[master] Fixed broken handling of --disable-debug
Merges in rt37780.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 10 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 5c74f206..5f7c25f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,14 +52,16 @@ AC_DEFINE_UNQUOTED([DHCP_BYTE_ORDER], [$byte_order],
# Optional compile-time DEBUGging.
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[create a debug-only version of the software (default is no).]),
- [enable_debug=yes],[enable_debug=no])
-# This is very much off by default.
-if test "$enable_debug" = "yes" ; then
- AC_DEFINE([DEBUG], [1],
- [Define to compile debug-only DHCP software.])
- # Just override CFLAGS to totally to remove optimization.
- CFLAGS="-g"
-fi
+ [case "${enableval}" in
+ yes) enable_debug=yes
+ AC_DEFINE([DEBUG], [1],
+ [Define to compile debug-only DHCP software.])
+ # Just override CFLAGS totally to remove optimization.
+ CFLAGS="-g";;
+ no) enable_debug=no ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+ esac],[enable_debug=no])
+
# XXX: there are actually quite a lot more DEBUG_ features we could enable,
# but I don't want to pollute the --help space.
#