summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2021-04-11 16:50:29 +0200
committerPhilipp Stephani <phst@google.com>2021-04-11 16:50:29 +0200
commit725fc96b706c57ef8ceca5e7d82b175d9a72e845 (patch)
treec225822c92335d5982cc1e1d672bc2eb01f70777 /configure.ac
parentd06c54db1b3504caed8673216a72b117d0692351 (diff)
downloademacs-725fc96b706c57ef8ceca5e7d82b175d9a72e845.tar.gz
Use pkg-config to check for libseccomp.
We need at list version 2.4.0 of libseccomp for seccomp-filter.c to build cleanly. * configure.ac: Use pkg-config to check for libseccomp. * lib-src/Makefile.in (HAVE_LIBSECCOMP, LIBSECCOMP_LIBS) (LIBSECCOMP_CFLAGS): New variables. (SECCOMP_FILTER, seccomp-filter$(EXEEXT)): Use them.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index cb4a9ab2876..681c25b052c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4189,10 +4189,10 @@ AC_CHECK_HEADERS(
#include <linux/seccomp.h>
]])])
-LIBSECCOMP=
-AC_CHECK_HEADER([seccomp.h],
- [AC_CHECK_LIB([seccomp], [seccomp_init], [LIBSECCOMP=-lseccomp])])
-AC_SUBST([LIBSECCOMP])
+EMACS_CHECK_MODULES([LIBSECCOMP], [libseccomp >= 2.4.0])
+AC_SUBST([HAVE_LIBSECCOMP])
+AC_SUBST([LIBSECCOMP_LIBS])
+AC_SUBST([LIBSECCOMP_CFLAGS])
OLD_LIBS=$LIBS
LIBS="$LIB_PTHREAD $LIB_MATH $LIBS"