X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=9e5a6817023b0676027abffcc5a3d968bb419a90;hp=59650a256d64d479cfa3f677c5bc0cc4ed852502;hb=c305c32580a1d7689a401e8cf673ec7936c12bbe;hpb=32dcef3ab1eb91ee469c3246ef859578dccd8a45 diff --git a/configure.ac b/configure.ac index 59650a256..9e5a68170 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,21 @@ if test "x$enable_blkid" != "xno"; then fi AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"]) +# ------------------------------------------------------------------------------ +have_seccomp=no +AC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support])) +if test "x$enable_seccomp" != "xno"; then + PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0], + [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available]) + have_seccomp=yes + M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"], + [have_seccomp=no]) + if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then + AC_MSG_ERROR([*** seccomp support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"]) + # ------------------------------------------------------------------------------ have_ima=yes AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]), @@ -360,7 +375,10 @@ have_selinux=no AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support])) if test "x$enable_selinux" != "xno"; then PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9], - [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no) + [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) + have_selinux=yes + M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"], + [have_selinux=no]) if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then AC_MSG_ERROR([*** SELinux support requested but libraries not found]) fi @@ -413,6 +431,7 @@ if test "x${have_tcpwrap}" != xno ; then fi have_tcpwrap=no else + M4_DEFINES="$M4_DEFINES -DHAVE_LIBWRAP" have_tcpwrap=yes fi else @@ -449,6 +468,7 @@ if test "x${have_pam}" != xno ; then if test "x$have_pam" = xyes ; then PAM_LIBS="-lpam -lpam_misc" AC_DEFINE(HAVE_PAM, 1, [PAM available]) + M4_DEFINES="$M4_DEFINES -DHAVE_PAM" else have_pam=no fi @@ -551,6 +571,7 @@ if test "x${have_xattr}" = xno; then fi else if test "x${have_smack}" = xauto; then + M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" have_smack=yes fi fi @@ -1090,6 +1111,7 @@ AC_MSG_RESULT([ AUDIT: ${have_audit} IMA: ${have_ima} SELinux: ${have_selinux} + SECCOMP: ${have_seccomp} SMACK: ${have_smack} XZ: ${have_xz} ACL: ${have_acl}