summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 7e15d06..8e82a57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,10 +35,14 @@ AC_CHECK_LIB([pcap], [pcap_open_live], ,[AC_MSG_ERROR([libpcap not found])])
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_ARG_ENABLE([seccomp], [Enable seccomp priv drops by default (-z to turn on, -Z for off)], [
- if test "$ac_cv_lib_seccomp_seccomp_init" = "no"; then
- AC_MSG_ERROR([--enable-seccomp given but seccomp libraries not present])
+ if test x"$enableval" = x"yes"; then
+ if test "$ac_cv_lib_seccomp_seccomp_init" = "no"; then
+ AC_MSG_ERROR([--enable-seccomp given but seccomp libraries not present])
+ fi
+ AC_DEFINE([DEFAULT_SECCOMP], [1], [Enable seccomp by default])
+ else
+ AC_DEFINE([DEFAULT_SECCOMP], [0], [Enable seccomp by default])
fi
- AC_DEFINE([DEFAULT_SECCOMP], [1], [Enable seccomp by default])
], [
AC_DEFINE([DEFAULT_SECCOMP], [0], [Disable seccomp by default])
])