summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2015-09-24 14:57:53 +0200
committerAlexander Larsson <alexl@redhat.com>2015-09-24 14:57:53 +0200
commit1917e1fd387e1cf85f3056e8c7c75fa9451384e8 (patch)
tree138694360da496d107d731eb5d1b8d93b9431ac8 /configure.ac
parentee0cf9a247de23ff549d1db99ad5fd96030a1fe1 (diff)
downloadxdg-app-1917e1fd387e1cf85f3056e8c7c75fa9451384e8.tar.gz
Make seccomp optional
Several architectures does not have seccomp yet.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index c47ee34..ca31b78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,9 +59,6 @@ AC_SUBST(BASE_LIBS)
PKG_CHECK_MODULES(SOUP, [libsoup-2.4])
AC_SUBST(SOUP_CFLAGS)
AC_SUBST(SOUP_LIBS)
-PKG_CHECK_MODULES(LIBSECCOMP, [libseccomp])
-AC_SUBST(LIBSECCOMP_CFLAGS)
-AC_SUBST(LIBSECCOMP_LIBS)
PKG_CHECK_MODULES(OSTREE, [libgsystem >= 2015.1 ostree-1 >= 2015.3])
AC_SUBST(OSTREE_CFLAGS)
AC_SUBST(OSTREE_LIBS)
@@ -69,6 +66,21 @@ PKG_CHECK_MODULES(FUSE, [fuse])
AC_SUBST(FUSE_CFLAGS)
AC_SUBST(FUSE_LIBS)
+AC_ARG_ENABLE([seccomp],
+ AC_HELP_STRING([--disable-seccomp],
+ [Disable seccomp]),
+ [],
+ [enable_seccomp=yes])
+
+if test "x$enable_seccomp" = "xyes"; then
+ PKG_CHECK_MODULES(LIBSECCOMP, [libseccomp])
+ AC_SUBST(LIBSECCOMP_CFLAGS)
+ AC_SUBST(LIBSECCOMP_LIBS)
+ AC_DEFINE([ENABLE_SECCOMP], [1],
+ [Define if using seccomp])
+fi
+
+
AC_ARG_ENABLE([userns],
AC_HELP_STRING([--disable-userns],
[Disable User namespaces (requires setuid/setcaps)]),