diff options
author | Yunchih Chen <yunchih.cat@gmail.com> | 2018-03-18 20:15:23 +0800 |
---|---|---|
committer | Yunchih Chen <yunchih.cat@gmail.com> | 2018-03-18 20:15:23 +0800 |
commit | 2db7b99431ab899686f52a8f20f7c74333cf1fa4 (patch) | |
tree | f6a4d69f4846c1fd1d5cfe23c7c1166e7122c913 /configure.ac | |
parent | 7f43f3ee5075b784ce458427c44ae1c78e0019f2 (diff) | |
download | nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.tar nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.tar.gz nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.tar.bz2 nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.tar.lz nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.tar.xz nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.tar.zst nfcollect-2db7b99431ab899686f52a8f20f7c74333cf1fa4.zip |
autotools: Add debug target
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 79e8c11..66497f4 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,17 @@ AC_CONFIG_SRCDIR([bin/nfcollect.c]) AC_PROG_CC([clang]) -AC_DEFINE([DEBUG], [1], [Enable debug]) +# AC_DEFINE([DEBUG], [1], [Enable debug]) +AC_ARG_ENABLE(debug, +AC_HELP_STRING([--enable-debug],[Enable debug mode (default is NO)]), +[case "${enableval}" in + yes) debug=true ;; + no) debug=false ;; + *) AC_MSG_ERROR(bad_value ${enableval} for --enable-debug) ;; +esac],[debug=false]) +if test x"$debug" = x"true"; then + AC_DEFINE(DEBUG, 1, [debug]) +fi AC_CHECK_HEADERS(libnetfilter_log/libnetfilter_log.h) AC_SEARCH_LIBS(nflog_open, netfilter_log) |