summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index dd0dc5a..cb0d568 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,7 +264,27 @@ if test "x$with_ares" != "xno"; then
AC_MSG_ERROR(libcares not found)))
fi
AC_SUBST(ARES_LIBS)
-
+
+AC_ARG_WITH(seccomp,
+ [AS_HELP_STRING([--without-seccomp], [Disable seccomp])
+AS_HELP_STRING([--with-seccomp=PREFIX], [Specify location of libseccomp])],
+ [seccomp="$withval"], [seccomp=maybe])
+AS_IF([test "x$seccomp" != "xno"], [
+ AS_IF([test "x$seccomp" != "xyes" && test "x$seccomp" != "xmaybe"], [
+ CPPFLAGS="$CPPFLAGS -I$seccomp/include"
+ LDFLAGS="$LDFLAGS -I$seccomp/lib"
+ ])
+ AC_CHECK_LIB(seccomp, seccomp_init, [
+ SECCOMP_LIBS="-lseccomp"
+ AC_DEFINE(HAVE_SECCOMP, 1,
+ [Define to compile with libseccomp support.])
+ ], [
+ AS_IF([test "x$seccomp" != "xmaybe"],
+ AC_MSG_ERROR([libseccomp not found]))
+ ])
+])
+AC_SUBST(SECCOMP_LIBS)
+
AC_PROG_GCC_TRADITIONAL
AC_FUNC_VPRINTF
AC_FUNC_GETPGRP