https://github.com/esnet/iperf/pull/1398 From 3a03f775ca103f2e824abef903130280c57ca8ac Mon Sep 17 00:00:00 2001 From: Sam James 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 --- 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"