This commit makes it possible to build ModSecurity on systems where
/bin/sh is a POSIX-compliant shell that is not Bash. Debian, Alpine
Linux, and Gentoo Linux with the system shell set to not Bash, are
examples of such systems.
Previously, the helper macros contained two types of Bashisms:
* The '==' comparison operator. Very easy to change, as the proper
POSIX-compliant form is '='. For example:
if test "${var}" == "myvalue" -> if test "${var}" = "myvalue"
* The '-a' (and) operator in the 'test' builtin. The '-a' and '-o'
operators were removed in POSIX 2024 (Issue 8). The correct form
is to use the '&&' and '||' operators respectively. For instance:
if test -d "${var}" -a -r "${var}/file" ->
if test -d "${var}" && test -r "${var}/file"
Bug: https://bugs.gentoo.org/887135
Signed-off-by: Zurab Kvachadze <zurabid2016@gmail.com>
Added AC_MSG_NOTICE macros to pcre2.m4 to enhance debugging output. This change aims to identify the cause of build failures on macOS runners in GitHub Actions, which do not occur locally or on other platforms (Linux, Windows).
The added verbosity will help trace the build process and inspect variable values for inconsistencies in the macOS runner environment.
Identified an issue where the macOS GitHub runner no longer includes the libpcre2 library by default. Updated the workflow configuration to explicitly add libpcre2 as a dependency, ensuring successful builds and compatibility with the updated build system.
This change prevents build failures on macOS environments and aligns the runner's setup with project requirements.
Updated the build system and related source files to use libpcre2 as the
default regex library instead of the deprecated libpcre. This change
ensures future compatibility and aligns with the library's maintenance status.
To build with the old libpcre, the `--with-pcre` configuration parameter
can be specified.