]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Replace nonportable grep -o with awk
authorDan Fandrich <dan@coneharvesters.com>
Fri, 9 Aug 2024 00:08:34 +0000 (17:08 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 9 Aug 2024 15:41:18 +0000 (08:41 -0700)
This stops an error shown at the end of configure on systems with POSIX
grep and fixes the warning it's trying to convey.

Closes #14469

configure.ac

index b059be35df5a175960775bfb02cc15127131eed3..b8b71501afdfb5cf44acbda2d31f0d1b35cdba2c 100644 (file)
@@ -5212,7 +5212,8 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
   Features:         ${SUPPORT_FEATURES}
 ])
 
-non13=`echo "$TLSCHOICE" | $EGREP -io 'bearssl|secure-transport'`;
+# grep -o would simplify this, but is nonportable
+[non13=`echo "$TLSCHOICE" | $AWK '{split("bearssl secure-transport", a); for (i in a) if(match(tolower($0), a[i])) print a[i];}'`]
 if test -n "$non13"; then
  for a in $non13; do
    AC_MSG_WARN([$a is enabled for TLS but it does not support TLS 1.3])