diff --git a/INSTALL.md b/INSTALL.md index a97b610..7fc6696 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -32,7 +32,7 @@ Requirements | GNU Readline | 6.0 | | [Tcl] | 8.6 | | [uriparser] | 0.9 | - | xxHash | 8.8 | + | xxHash | 0.8 | Some of them can be optional, depending on which components of BookmarkFS are to be built, and which features are enabled. @@ -44,13 +44,16 @@ Requirements * Automake * Libtool * Autoconf Archive - - pkg-config - - POSIX-compatible make - - C99-capable C compiler (GCC or Clang is recommended) + - `pkg-config` + - POSIX-compatible `make` + * One with `VPATH` support is recommended + - C99-capable C compiler + * GCC or Clang is recommended Optionally: - - GNU Texinfo, for building the user manual + - GNU Texinfo + * For building the user manual Installation @@ -96,7 +99,7 @@ Installation - `--disable-sandbox` * Build the utility library without sandboxing features * No longer requires: libseccomp - - `--disable-landlock` (Linux-only) + - `--disable-sandbox-landlock` (Linux-only) * Disable the [Landlock] feature in the sandbox implementation - `--enable-xxhash-inline` * Use xxHash as a header-only library diff --git a/configure.ac b/configure.ac index 1d5a09d..ef29e10 100644 --- a/configure.ac +++ b/configure.ac @@ -77,9 +77,13 @@ BOOKMARKFS_FEAT([sandbox], [yes], [sandboxing], [ [Define to 1 if sandboxing is enabled.]) ]) -BOOKMARKFS_FEAT([landlock], [yes], [Linux Landlock features for sandboxing], [ - AC_DEFINE([BOOKMARKFS_SANDBOX_LANDLOCK], [1], - [Define to 1 if Linux Landlock is enabled.]) +AS_VAR_IF([host_os_is_linux], [yes], [ + BOOKMARKFS_FEAT([sandbox-landlock], [yes], + [Linux Landlock features for sandboxing], + [ + AC_DEFINE([BOOKMARKFS_SANDBOX_LANDLOCK], [1], + [Define to 1 if Landlock is enabled for sandboxing.]) + ]) ]) BOOKMARKFS_FEAT([xxhash-inline], [no], diff --git a/m4/bookmarkfs_ac.m4 b/m4/bookmarkfs_ac.m4 index 02045f0..f658d4d 100644 --- a/m4/bookmarkfs_ac.m4 +++ b/m4/bookmarkfs_ac.m4 @@ -64,13 +64,13 @@ AC_DEFUN([BOOKMARKFS_DEP], [ ]) ]) ], [ - AS_VAR_SET([SAVED_PKG_CONFIG_PATH_], ["${PKG_CONFIG_PATH}"]) + AS_VAR_SET([old_pkg_config_path_], ["${PKG_CONFIG_PATH}"]) AS_VAR_IF([with_var_], [yes], , [ - AS_VAR_SET([PKG_CONFIG_PATH], ["${with_$1}:${PKG_CONFIG_PATH}"]) + AS_VAR_SET([PKG_CONFIG_PATH], ["${with_var_}:${PKG_CONFIG_PATH}"]) + export PKG_CONFIG_PATH ]) - export PKG_CONFIG_PATH PKG_CHECK_MODULES(m4_toupper([$1]), [$1 $2], [$4]) - AS_VAR_SET([PKG_CONFIG_PATH], ["${SAVED_PKG_CONFIG_PATH_}"]) + AS_VAR_SET([PKG_CONFIG_PATH], ["${old_pkg_config_path_}"]) ]) m4_popdef([with_var_]) ])