| @@ -1,25 +1,32 @@ | | | @@ -1,25 +1,32 @@ |
1 | $NetBSD: patch-configure,v 1.3 2017/09/14 06:04:07 dholland Exp $ | | 1 | $NetBSD: patch-configure,v 1.3.4.1 2017/11/12 11:50:21 bsiegert Exp $ |
2 | | | 2 | |
3 | Recognize more clang versions. | | 3 | Recognize more clang versions. |
4 | Recognize solaris, dragonfly, bitrig, and darwin. | | 4 | Recognize solaris, dragonfly, bitrig, and darwin. |
5 | | | 5 | |
6 | --- configure.orig 2016-11-21 19:22:17.000000000 +0000 | | 6 | --- configure.orig 2016-11-21 19:22:17.000000000 +0000 |
7 | +++ configure | | 7 | +++ configure |
8 | @@ -392,7 +392,7 @@ if test "$have_clang" = yes; then | | 8 | @@ -386,13 +386,13 @@ cc_check_define __GNUC__ && have_gcc=yes |
| | | 9 | |
| | | 10 | if test "$have_clang" = yes; then |
| | | 11 | cxx_name=`( $cc -v ) 2>&1 | tail -n 1 | cut -d ' ' -f 1` |
| | | 12 | - 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) |
| | | 13 | + cxx_version=$( $CXX -dM -E -x c /dev/null | grep __clang_version__ | sed 's/^[^0-9]*\([0-9.]*\).*$/\1/g' 2>&1 ) |
| | | 14 | if test "$?" -gt 0; then |
| | | 15 | cxx_version="not found" |
9 | fi | | 16 | fi |
10 | | | 17 | |
11 | case $cxx_version in | | 18 | case $cxx_version in |
12 | - [3].[4-9]|[3].[4-9].[0-9]|[3].[4-9].[0-9][-.]*|[4].[0-9].[0-9]) | | 19 | - [3].[4-9]|[3].[4-9].[0-9]|[3].[4-9].[0-9][-.]*|[4].[0-9].[0-9]) |
13 | + [3].[4-9]|[3].[4-9].[0-9]|[3-6].[4-9].[0-9][-.]*|[456].[0-9].[0-9]) | | 20 | + [3].[4-9]|[3].[4-9].[0-9]|[3].[4-9].[0-9][-.]*|[4-9].[0-9]*) |
14 | _cxx_major=`echo $cxx_version | cut -d '.' -f 1` | | 21 | _cxx_major=`echo $cxx_version | cut -d '.' -f 1` |
15 | _cxx_minor=`echo $cxx_version | cut -d '.' -f 2` | | 22 | _cxx_minor=`echo $cxx_version | cut -d '.' -f 2` |
16 | cxx_version="$cxx_version, ok" | | 23 | cxx_version="$cxx_version, ok" |
17 | @@ -515,7 +515,7 @@ else | | 24 | @@ -515,7 +515,7 @@ else |
18 | echo_n "Checking hosttype... " | | 25 | echo_n "Checking hosttype... " |
19 | echo $_host_os | | 26 | echo $_host_os |
20 | case $_host_os in | | 27 | case $_host_os in |
21 | - linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos*) | | 28 | - linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos*) |
22 | + linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos* | solaris* | dragonfly* | bitrig* | darwin*) | | 29 | + linux* | openbsd* | freebsd* | kfreebsd* | netbsd* | bsd* | gnu0.* | sunos* | hpux* | beos* | solaris* | dragonfly* | bitrig* | darwin*) |
23 | DEFINES="$DEFINES -DUNIX" | | 30 | DEFINES="$DEFINES -DUNIX" |
24 | _host_os=unix | | 31 | _host_os=unix |
25 | ;; | | 32 | ;; |