buildutil/glibtests.m4: fix bashism
authorSam James <sam@gentoo.org>
Tue, 23 Aug 2022 22:37:06 +0000 (23:37 +0100)
committerSam James <sam@gentoo.org>
Tue, 23 Aug 2022 22:38:20 +0000 (23:38 +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 whether to build static libraries... no
./configure: 14795: test: unexpected operator
```

Signed-off-by: Sam James <sam@gentoo.org>
buildutil/glibtests.m4

index 108c847828162f285d5f236bb0fbbd62166e7e6b..34dfcf67d7beaa7463ec3389df55ad3a51bb067b 100644 (file)
@@ -25,7 +25,7 @@ AC_DEFUN([GLIB_TESTS],
                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
                  esac])
   AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
-  if test "$ENABLE_INSTALLED_TESTS" == "1"; then
+  if test "$ENABLE_INSTALLED_TESTS" = "1"; then
     AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
     AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
   fi