diff options
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | configure.ac | 12 |
2 files changed, 22 insertions, 2 deletions
@@ -1,6 +1,16 @@ # nfcollect -Collect NFLOG log entries and commit them to stable storage in binary (compressed) format +Collect Netfilter NFLOG log entries and commit them to stable storage in binary (compressed) format. + +## Build + +```bash +./bootstrap.sh +./configure +make +``` + +Run `./configure --enable-debug` to enable debug output. ### References 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) |