[v1,1/2] configure: remove non-standard test usage

Message ID 1501009206-21235-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Two fixes to make configure work with strict POSIX shells
Related show

Commit Message

Github ODP bot July 25, 2017, 7 p.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


According to POSIX it is correct to check for string equality using one
equal sign, not two signs. POSIX-strict shells will return incorrect
result on such constructions.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 87 (lumag:fix-m4)
 ** https://github.com/Linaro/odp/pull/87
 ** Patch: https://github.com/Linaro/odp/pull/87.patch
 ** Base sha: f4f7679d16917d9a7c1b2220e351fd27733ee96b
 ** Merge commit sha: 39b4f10ed8c764ff67ddc651f9b82f5c3e015119
 **/
 configure.ac                          | 6 +++---
 platform/linux-generic/m4/odp_pcap.m4 | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/configure.ac b/configure.ac
index e4903c7a..51dd9352 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,7 +115,7 @@  AC_SUBST([ARCH_DIR])
 ##########################################################################
 # Warn on the defaults if arch is undefined
 ##########################################################################
-if test "${ARCH_DIR}" == "undefined";
+if test "${ARCH_DIR}" = "undefined";
 then
     echo "ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}"
     exit 1
@@ -135,7 +135,7 @@  AS_CASE([$host],
 )
 AC_SUBST([ARCH_ABI])
 
-if test "${ARCH_ABI}" == "undefined";
+if test "${ARCH_ABI}" = "undefined";
 then
     echo "ARCH_ABI is undefined, please add your ARCH_ABI based on host=${host}"
     exit 1
@@ -164,7 +164,7 @@  AC_SUBST([platform_with_platform], ["platform/${with_platform}"])
 # Run platform specific checks and settings
 ##########################################################################
 IMPLEMENTATION_NAME=""
-if test "${with_platform}" == "linux-generic";
+if test "${with_platform}" = "linux-generic";
 then
     m4_include([./platform/linux-generic/m4/configure.m4])
     m4_include([./test/linux-generic/m4/configure.m4])
diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/platform/linux-generic/m4/odp_pcap.m4
index ffdff17c..d7295f21 100644
--- a/platform/linux-generic/m4/odp_pcap.m4
+++ b/platform/linux-generic/m4/odp_pcap.m4
@@ -8,7 +8,7 @@  AC_CHECK_HEADER(pcap/pcap.h,
     [])],
 [])
 
-if test $have_pcap == yes; then
+if test "$have_pcap" = "yes"; then
     ODP_CFLAGS="$AM_CFLAGS -DHAVE_PCAP"
     PCAP_LIBS="-lpcap"
 fi