summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <habets@google.com>2022-05-25 17:54:35 +0100
committerThomas Habets <habets@google.com>2022-05-25 17:54:41 +0100
commit9da03da63b7e793caa98488c67993ad4cd08188f (patch)
tree5438fb4d7e2f4db8db91979aea2063c01436e0f2
parent7f96e9e8f588c8d3e8015ebef256f3e16f044f40 (diff)
downloadarping-9da03da63b7e793caa98488c67993ad4cd08188f.tar.gz
configure: Make --disable-seccomp actually work
More complete fix than #51. Thanks thesamesam!
-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])
])