Skip to contentSkip to conversation

coccinelle PR#280: Fix unportable test(1) operator

cocci Thomas Klausner 2 participants 2 messages Jun 4, 2022

lore
Share & tools
lore
#0 lore raw

Hi!

I've filed pull request 280 on github and was asked to present the patch to this mailing list.

It fixes an unportable test(1) operator in the configure.ac script.

Cheers,
Thomas

https://github.com/coccinelle/coccinelle/pull/280

commit 59466d94cbdf4d731106fe79379bdddfb4bcdb2d

Author: Thomas Klausner <[email protected]>
Date:   Sat Jun 4 12:45:37 2022 +0200

Fix unportable test(1) operator.

Only bash supports '==', POSIX requires '='.

configure.ac +2 -2
index 0f314dd0..28f9cdea 100644
@@ -331,10 +331,10 @@ AS_IF([test "x$enable_pcre_syntax" != "xno"],
   ],
   [dnl
     AC_CHECK_COCCI_EXTPKG([pcre])  dnl  will set $enable_pcre to 'yes', 'no', or 'local'
-    AS_IF([test "x$enable_pcre" == "xyes"],
+    AS_IF([test "x$enable_pcre" = "xyes"],
     [dnl
       AC_MSG_CHECKING([if pcre depends on bytes])
-      AS_IF([test "x`$OCAMLFIND query -r -format '%p' pcre 2>/dev/null | grep bytes`" == "xbytes"],
+      AS_IF([test "x`$OCAMLFIND query -r -format '%p' pcre 2>/dev/null | grep bytes`" = "xbytes"],
       [dnl
         AC_MSG_RESULT([yes])
         AC_MSG_CHECKING([if bytes is an actual module])
#1 lore raw
Quoted 6 lines · Thomas Klausner

Hi!

I've filed pull request 280 on github and was asked to present the patch to this mailing list.

It fixes an unportable test(1) operator in the configure.ac script.

Thanks for the fix.

julia