]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
configure.ac: fix bashism
authorSam James <sam@gentoo.org>
Wed, 14 Sep 2022 14:15:43 +0000 (08:15 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 14 Sep 2022 14:15:48 +0000 (08:15 -0600)
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 whether to build static libraries... no
./configure: 14089: test: xno: unexpected operator
checking for x86_64-pc-linux-gnu-g++... x86_64-pc-linux-gnu-g++
```

Signed-off-by: Sam James <sam@gentoo.org>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 4fc7dc1036676901d555fe296cca661a783e405b)

configure.ac

index 8031707af4da3c8073053f6e58f58d57b8c93bde..1d6470f867ecff55f56ef544c8ac9032fddb2d5a 100644 (file)
@@ -140,7 +140,7 @@ AC_ARG_ENABLE([opaque-hierarchy],
 AC_ARG_ENABLE([tests],
        [AS_HELP_STRING([--enable-tests],[compile libcgroup tests [default=yes]])],
        [
-               if test "x$enableval" == xno; then
+               if test "x$enableval" = xno; then
                        with_tests=false
                else
                        with_tests=true