summaryrefslogtreecommitdiff
blob: 1f3a321f42c9007c6379849c75c370be6a1dd042 (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
32
33
34
35
36
37
38
39
40
41
42
43
https://github.com/esnet/iperf/pull/1398

From 3a03f775ca103f2e824abef903130280c57ca8ac Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Sun, 2 Oct 2022 02:58:59 +0100
Subject: [PATCH] config/iperf_config_static_bin.m4: fix bashism

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:
```
./configure: 2670: test: x: unexpected operator
```

Signed-off-by: Sam James <sam@gentoo.org>
--- a/config/iperf_config_static_bin.m4
+++ b/config/iperf_config_static_bin.m4
@@ -7,6 +7,6 @@ AC_ARG_ENABLE([static-bin],
     [:])
 AM_CONDITIONAL([ENABLE_STATIC_BIN], [test x$enable_static_bin = xno])
 
-AS_IF([test "x$enable_static_bin" == xyes],
+AS_IF([test "x$enable_static_bin" = xyes],
  [LDFLAGS="$LDFLAGS --static"]
  [])
--- a/configure
+++ b/configure
@@ -2667,7 +2667,7 @@ else
 fi
 
 
-if test "x$enable_static_bin" == xyes
+if test "x$enable_static_bin" = xyes
 then :
   LDFLAGS="$LDFLAGS --static"