]> git.gsnw.org Git - fping.git/commitdiff
configure.ac: improve portability
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Tue, 6 Jan 2026 23:47:32 +0000 (00:47 +0100)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sun, 11 Jan 2026 07:20:26 +0000 (08:20 +0100)
Testing string equality using "test" is done with the "="
operator.  Bash also accepts "==", but this is not portable.
The issue was noticed on NetBSD, which uses a patch to the
generated "configure" script[1].

[1] https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/fping/patches/patch-configure?rev=1.3;content-type=text%2Fplain

CHANGELOG.md
configure.ac

index d83086d3e361f7ee36e2fa517e8293524502e8cf..2abab21494a7eb85fba5450156ba927cbecf20dc 100644 (file)
@@ -8,6 +8,7 @@ Next
 - ci: Removed travis-ci (#446, thanks @gsnw-sebast)
 - Performance optimization: reduce number of select calls and use
   recvmsg with MSG_DONTWAIT instead (#449)
+- Improved compatibility with NetBSD (#452, thanks @auerswal)
 
 fping 5.5 (2025-12-31)
 ======================
index 115f9060408b0ffb01df6f8e62897764e6f06001..27454a907bb71932048b3a5d9604bbc5a57aa990 100644 (file)
@@ -39,7 +39,7 @@ AS_IF([test "x$enable_ipv6" != "xno"], [
       #include <sys/types.h>
   ]])
 ])
-AS_IF([test "x$have_ipv6" == "xyes"], [
+AS_IF([test "x$have_ipv6" = "xyes"], [
     dnl Test if IPv6 is supported
        AC_CHECK_HEADERS([netinet/ip6.h], [have_ipv6="yes"], [have_ipv6="no"], [[
       #include <netinet/in.h>