From 4b9edaddfc947bc08838a1ef6cb59000450257b4 Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gmx.de>
Date: Tue, 14 Mar 2023 11:36:22 +0100
Subject: [PATCH] build: Avoid bashisms

otherwise configure fails to find pcre2 when /bin/sh does not point to bash:

  configure: using pcre v8.45
  ./configure: 16601: test: xno: unexpected operator
  ./configure: 16601: test: xno: unexpected operator
  checking for libpcre2 config script... no
  configure: *** pcre2 library not found.
  configure: error: pcre2 library is required

Signed-off-by: Lars Wendler <polynomial-c@gmx.de>
---
 build/find_pcre2.m4 | 2 +-
 configure.ac        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build/find_pcre2.m4 b/build/find_pcre2.m4
index 11e9890f..18c2e258 100644
--- a/build/find_pcre2.m4
+++ b/build/find_pcre2.m4
@@ -25,7 +25,7 @@ AS_CASE(["${with_pcre2}"],
   [yes], [test_paths="/usr/local/libpcre2 /usr/local/pcre2 /usr/local /opt/libpcre2 /opt/pcre2 /opt /usr"],
   [test_paths="${with_pcre2}"])
 
-if test "x${with_pcre2}" == "x" || test "x${with_pcre2}" == "xno"; then
+if test "x${with_pcre2}" = "x" || test "x${with_pcre2}" = "xno"; then
     AC_MSG_NOTICE([pcre2 not specified; omitting check])
 else
 
diff --git a/configure.ac b/configure.ac
index 1d428967..81a1a6b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -696,7 +696,7 @@ AC_ARG_ENABLE(large-stream-input,
               AS_HELP_STRING([--enable-large-stream-input],
                              [Enable optimization for large stream input]),
 [
-  if test "$enableval" == "yes"; then
+  if test "$enableval" = "yes"; then
     large_stream_input="-DMSC_LARGE_STREAM_INPUT"
     MODSEC_EXTRA_CFLAGS="$MODSEC_EXTRA_CFLAGS $large_stream_input"
   else
-- 
2.40.0