@@ -711,6 +711,7 @@ with_libxml
711
711
with_uuid
712
712
with_readline
713
713
with_systemd
714
+ with_libseccomp
714
715
with_selinux
715
716
with_ldap
716
717
with_krb_srvnam
@@ -861,6 +862,7 @@ with_bsd_auth
861
862
with_ldap
862
863
with_bonjour
863
864
with_selinux
865
+ with_libseccomp
864
866
with_systemd
865
867
with_readline
866
868
with_libedit_preferred
@@ -1571,6 +1573,7 @@ Optional Packages:
1571
1573
--with-ldap build with LDAP support
1572
1574
--with-bonjour build with Bonjour support
1573
1575
--with-selinux build with SELinux support
1576
+ --with-libseccomp build with libseccomp support
1574
1577
--with-systemd build with systemd support
1575
1578
--without-readline do not use GNU Readline nor BSD Libedit for editing
1576
1579
--with-libedit-preferred
@@ -8868,6 +8871,39 @@ fi
8868
8871
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8869
8872
$as_echo "$with_selinux" >&6; }
8870
8873
8874
+ #
8875
+ # libseccomp
8876
+ #
8877
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libseccomp support" >&5
8878
+ $as_echo_n "checking whether to build with libseccomp support... " >&6; }
8879
+
8880
+
8881
+
8882
+ # Check whether --with-libseccomp was given.
8883
+ if test "${with_libseccomp+set}" = set; then :
8884
+ withval=$with_libseccomp;
8885
+ case $withval in
8886
+ yes)
8887
+ :
8888
+ ;;
8889
+ no)
8890
+ :
8891
+ ;;
8892
+ *)
8893
+ as_fn_error $? "no argument expected for --with-libseccomp option" "$LINENO" 5
8894
+ ;;
8895
+ esac
8896
+
8897
+ else
8898
+ with_libseccomp=no
8899
+
8900
+ fi
8901
+
8902
+
8903
+
8904
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libseccomp" >&5
8905
+ $as_echo "$with_libseccomp" >&6; }
8906
+
8871
8907
#
8872
8908
# Systemd
8873
8909
#
@@ -14350,6 +14386,56 @@ else
14350
14386
fi
14351
14387
14352
14388
14389
+ fi
14390
+
14391
+ if test "$with_libseccomp" = yes ; then
14392
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp_init in -lseccomp" >&5
14393
+ $as_echo_n "checking for seccomp_init in -lseccomp... " >&6; }
14394
+ if ${ac_cv_lib_seccomp_seccomp_init+:} false; then :
14395
+ $as_echo_n "(cached) " >&6
14396
+ else
14397
+ ac_check_lib_save_LIBS=$LIBS
14398
+ LIBS="-lseccomp $LIBS"
14399
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400
+ /* end confdefs.h. */
14401
+
14402
+ /* Override any GCC internal prototype to avoid an error.
14403
+ Use char because int might match the return type of a GCC
14404
+ builtin and then its argument prototype would still apply. */
14405
+ #ifdef __cplusplus
14406
+ extern "C"
14407
+ #endif
14408
+ char seccomp_init ();
14409
+ int
14410
+ main ()
14411
+ {
14412
+ return seccomp_init ();
14413
+ ;
14414
+ return 0;
14415
+ }
14416
+ _ACEOF
14417
+ if ac_fn_c_try_link "$LINENO"; then :
14418
+ ac_cv_lib_seccomp_seccomp_init=yes
14419
+ else
14420
+ ac_cv_lib_seccomp_seccomp_init=no
14421
+ fi
14422
+ rm -f core conftest.err conftest.$ac_objext \
14423
+ conftest$ac_exeext conftest.$ac_ext
14424
+ LIBS=$ac_check_lib_save_LIBS
14425
+ fi
14426
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_seccomp_seccomp_init" >&5
14427
+ $as_echo "$ac_cv_lib_seccomp_seccomp_init" >&6; }
14428
+ if test "x$ac_cv_lib_seccomp_seccomp_init" = xyes; then :
14429
+ cat >>confdefs.h <<_ACEOF
14430
+ #define HAVE_LIBSECCOMP 1
14431
+ _ACEOF
14432
+
14433
+ LIBS="-lseccomp $LIBS"
14434
+
14435
+ else
14436
+ as_fn_error $? "library 'libseccomp' is required for Seccomp BPF support" "$LINENO" 5
14437
+ fi
14438
+
14353
14439
fi
14354
14440
14355
14441
# for contrib/uuid-ossp
0 commit comments