summaryrefslogtreecommitdiff
path: root/lib-src
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 /lib-src
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 'lib-src')
-rw-r--r--lib-src/Makefile.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 5870286cd5c..b4143b33554 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -189,10 +189,12 @@ LIB_WSOCK32=@LIB_WSOCK32@
## Extra libraries for etags
LIBS_ETAGS = $(LIB_CLOCK_GETTIME) $(LIB_GETRANDOM)
-LIBSECCOMP=@LIBSECCOMP@
+HAVE_LIBSECCOMP=@HAVE_LIBSECCOMP@
+LIBSECCOMP_LIBS=@LIBSECCOMP_LIBS@
+LIBSECCOMP_CFLAGS=@LIBSECCOMP_CFLAGS@
# Currently, we can only generate seccomp filter files for x86-64.
-ifneq ($(LIBSECCOMP),)
+ifeq ($(HAVE_LIBSECCOMP),yes)
ifeq ($(shell uname -m),x86_64)
SECCOMP_FILTER=1
endif
@@ -419,7 +421,8 @@ emacsclient.res: ../nt/emacsclient.rc $(NTINC)/../icons/emacs.ico
ifeq ($(SECCOMP_FILTER),1)
seccomp-filter$(EXEEXT): $(srcdir)/seccomp-filter.c $(config_h)
- $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $< $(LIBSECCOMP) -o $@
+ $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(LIBSECCOMP_CFLAGS) $< \
+ $(LIBSECCOMP_LIBS) -o $@
seccomp-filter.bpf seccomp-filter.pfc: seccomp-filter$(EXEEXT)
$(AM_V_GEN)./seccomp-filter$(EXEEXT) \