]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
configure.ac: fix bashisms
authorSam James <sam@gentoo.org>
Sun, 19 Feb 2023 18:33:20 +0000 (18:33 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 30 Apr 2023 08:23:42 +0000 (09:23 +0100)
configure scripts need to be runnable with a POSIX-compliant /bin/sh.

On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '=='.

This retains compatibility with bash.

Fixes configure warnings/errors like:
```
checking for libtraceevent... yes
./configure: 13430: test: x: unexpected operator
./configure: 13439: test: x: unexpected operator
```

Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
configure.ac

index 6a7c2102bd26082d6a7167bfdbbd0bdad95ba731..f5880904fcbcf11e1f27a03db2ba923b7d740325 100644 (file)
@@ -170,11 +170,11 @@ AM_COND_IF([WITH_AMP_NS_DECODE], [USE_AMP_NS_DECODE="yes"], [USE_AMP_NS_DECODE="
 AC_ARG_ENABLE([cpu_fault_isolation],
     AS_HELP_STRING([--enable-cpu-fault-isolation], [enable cpu online fault isolation]))
 
-AS_IF([test "x$enable_cpu_fault_isolation" = "xyes" || test "x$enable_all" == "xyes"], [
+AS_IF([test "x$enable_cpu_fault_isolation" = "xyes" || test "x$enable_all" = "xyes"], [
   AC_DEFINE(HAVE_CPU_FAULT_ISOLATION,1,"have cpu online fault isolation")
   AC_SUBST([WITH_CPU_FAULT_ISOLATION])
 ])
-AM_CONDITIONAL([WITH_CPU_FAULT_ISOLATION], [test x$enable_cpu_fault_isolation = xyes || test x$enable_all == xyes])
+AM_CONDITIONAL([WITH_CPU_FAULT_ISOLATION], [test x$enable_cpu_fault_isolation = xyes || test x$enable_all = xyes])
 AM_COND_IF([WITH_CPU_FAULT_ISOLATION], [USE_CPU_FAULT_ISOLATION="yes"], [USE_CPU_FAULT_ISOLATION="no"])
 
 test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc