summaryrefslogtreecommitdiff
path: root/sci-misc/lttoolbox/files/lttoolbox-3.7.1-bashism.patch
blob: 9727c018b142bf798950a6d85db230cafcb40427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
https://github.com/apertium/lttoolbox/pull/171

From 80408b137ceca94d9dab188277ffa3933b148f3d Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 18 Dec 2022 03:33:03 +0000
Subject: [PATCH] configure.ac: fix bashism
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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.

Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,7 @@ for version in 23 2b 20 2a 17; do
   version_flag="-std=c++${version}"
   AX_CHECK_COMPILE_FLAG([${version_flag}], [break], [version_flag=none])
 done
-AS_IF([test "$version_flag" == none], [
+AS_IF([test "$version_flag" = none], [
   AC_MSG_ERROR([Could not enable at least C++17 - upgrade your compiler])
 ])
 CXXFLAGS="$CXXFLAGS ${version_flag}"