[PATCH 2/7] autofs-5.1.8 - fix bashism in configure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



configure scripts need to work with a POSIX-compliant shell,
so let's not use a bashism here.

```
checking for res_query in -lresolv... yes
checking for libhesiod... no
./configure: 4880: test: 0: unexpected operator
checking how to run the C preprocessor... gcc -E
```

Tested-by: Yixun Lan <dlan@xxxxxxxxxx>
Signed-off-by: Sam James <sam@xxxxxxxxxx>
---
 CHANGELOG    | 1 +
 configure.in | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index e4e3362..93d8c83 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,5 @@
 
+- fix bashism in configure
 - musl: fix missing include in hash.h
 
 19/10/2021 autofs-5.1.8
diff --git a/configure.in b/configure.in
index 750ffb4..723bb30 100644
--- a/configure.in
+++ b/configure.in
@@ -262,7 +262,7 @@ if test -z "$HAVE_HESIOD" -o "$HAVE_HESIOD" != "0"
 then
 	HAVE_HESIOD=0
 	AF_CHECK_LIBHESIOD()
-	if test "$HAVE_HESIOD" == "1"; then
+	if test "$HAVE_HESIOD" = "1"; then
 		AC_DEFINE(WITH_HESIOD,1,
 			[Define if using Hesiod as a source of automount maps])
 	fi
@@ -337,11 +337,11 @@ AC_ARG_WITH(sasl,
 		SASL_FLAGS="-I${withval}/include"
 	fi
 )
-if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" == "1"
+if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" = "1"
 then
 	HAVE_SASL=0
 	AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1 LIBSASL="$LIBSASL -lsasl2", , -lsasl2 $LIBS)
-	if test "$HAVE_SASL" == "1"; then
+	if test "$HAVE_SASL" = "1"; then
 		AC_DEFINE(WITH_SASL,1,
 			[Define if using SASL authentication with the LDAP module])
 	fi
-- 
2.34.1




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux