$NetBSD: patch-configure,v 1.4 2017/11/03 07:49:58 dbj Exp $

Recognize more clang versions.
Recognize solaris, dragonfly, bitrig, and darwin.

--- configure.orig	2016-11-21 19:22:17.000000000 +0000
+++ configure
@@ -386,13 +386,13 @@ cc_check_define __GNUC__ && have_gcc=yes
 
 if test "$have_clang" = yes; then
 	cxx_name=`( $cc -v ) 2>&1 | tail -n 1 | cut -d ' ' -f 1`
-	cxx_version=$( $CXX -dM -E -x c /dev/null | grep __clang_version__ | sed 's/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/g' 2>&1)
+	cxx_version=$( $CXX -dM -E -x c /dev/null | grep __clang_version__ | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/g' 2>&1 )
 	if test "$?" -gt 0; then
 		cxx_version="not found"
 	fi
 
 	case $cxx_version in
-		[3].[4-9]|[3].[4-9].[0-9]|[3].[4-9].[0-9][-.]*|[4].[0-9].[0-9])
+		[3].[4-9]|[3].[4-9].[0-9]|[3].[4-9].[0-9][-.]*|[4-9].[0-9]*)
 			_cxx_major=`echo $cxx_version | cut -d '.' -f 1`
 			_cxx_minor=`echo $cxx_version | cut -d '.' -f 2`
 			cxx_version="$cxx_version, ok"
@@ -515,7 +515,7 @@ else
 	echo_n "Checking hosttype... "
 	echo $_host_os
 	case $_host_os in
-		linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos*)
+		linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos* | solaris* | dragonfly* | bitrig* | darwin*)
 			DEFINES="$DEFINES -DUNIX"
 			_host_os=unix
 			;;
