aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-06-25 02:02:56 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-06-25 10:51:24 +0200
commit4bc4a786e8a4107494070d033cec0550bfd08085 (patch)
treef673d33fd0895b587456278a84580f9a1c5a1151 /configure.ac
parent51e041fddb5f00bde2001fca8ff6b8cf3e728a89 (diff)
libseccomp is now optional but still recommended
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 5385593..92b5d11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,7 +68,7 @@ AC_CHECK_HEADERS([linux/capability.h sys/wait.h sys/ioctl.h net/if.h netinet/in.
[ AC_MSG_ERROR([required system specific header not available]) ])
AC_CHECK_HEADERS([libutil.h pthread.h syslog.h sys/prctl.h linux/limits.h \
sys/uio.h poll.h sys/epoll.h sys/sysmacros.h sys/mount.h \
- util.h execinfo])
+ util.h execinfo.h])
dnl Check for GAI header
AC_CHECK_HEADERS([netdb.h])
@@ -212,11 +212,17 @@ AS_IF([test "x${libssh_require_gssapi}" = xyes],
])
dnl libseccomp-dev
-PKG_CHECK_MODULES([libseccomp], [libseccomp >= 2.2.1], [],
- [ AC_MSG_ERROR([pkg-config: libseccomp >= 2.2.1 not found]) ])
+PKG_CHECK_MODULES([libseccomp], [libseccomp >= 2.2.1],
+ [ have_seccomp="yes" ],
+ [ have_seccomp="no" ])
saved_CFLAGS="$CFLAGS $libseccomp_CFLAGS"
saved_LIBS="$LIBS $libseccomp_LIBS"
-AC_CHECK_LIB([seccomp], [seccomp_init], [], [AC_MSG_ERROR([final link against libseccomp failed])])
+AC_CHECK_LIB([seccomp], [seccomp_init],
+ [ have_seccomp="yes"
+ AC_DEFINE([HAVE_SECCOMP], [1], [Define to 1 if you have a working libseccomp])
+ ],
+ [ have_seccomp="no" ])
+AM_CONDITIONAL([HAVE_SECCOMP], [test "x${have_seccomp}" = xyes])
CFLAGS="$saved_CFLAGS"
LIBS="$saved_LIBS"