$NetBSD$

out(): Use POSIX printf instead of echo for portability.
check(): Nonzero exit status is required for abort.
Fix newline for BSD.
"$COMPILER -v" does not work. Use "$COMPILER --version".

--- configure.orig	2024-09-10 17:15:06.000000000 +0000
+++ configure
@@ -56,11 +56,16 @@ USE_TLS="YES"
 
 out()
 {
-	if [ "$OS" = "SunOS" ]; then
-		echo $1 '\c'
-	else
-		echo -n $1
-	fi
+	# This does not work for other SysV based OS.
+	#if [ "$OS" = "SunOS" ]; then
+	#	echo $1 '\c'
+	#else
+	#	echo -n $1
+	#fi
+
+	# Use POSIX printf
+	# https://pubs.opengroup.org/onlinepubs/9799919799/utilities/printf.html
+	printf "%s" "$1"
 }
 
 check()
@@ -77,7 +82,7 @@ check()
 	else
 		echo "$2 (returned $RET_VAL, what is not eq to $CHK_VAL)"
 		echo $3
-		exit
+		exit 1
 	fi
 }
 
@@ -205,7 +210,7 @@ fi
 echo "done"
 
 if [ "$OS" = "FreeBSD" -o "$OS" = "OpenBSD" -o "$OS" = "NetBSD" ]; then
-    out "*BSD detected, setting compiler to 'cc'.\n"
+    echo "*BSD detected, setting compiler to 'cc'."
     COMPILER=cc
 fi
 
@@ -242,7 +247,7 @@ echo "done, using '$CMD_INSTALL_USEROPT 
 
 ############# OS INDEPENDENT PART #############
 
-out "checking for (g)cc..."; $COMPILER -v >/dev/null 2>&1; check "yes" "no" "You need (g)cc (or set PATH)."
+out "checking for (g)cc..."; $COMPILER --version >/dev/null 2>&1; check "yes" "no" "You need (g)cc (or set PATH)."
 
 ###############
 out "checking for libc..."
