# HG changeset patch # User diego # Date 1329664891 0 # Node ID ef4ff507a3411b0b598488310bf34f4cbaba4617 # Parent 958431e2cde0cfb0cf492895c7f2544f86484120 configure: Derive system name from 3rd and 2nd component passed to --target. This fixes common system name triplets used with MinGW. based on a patch from Diogo Franco, diogomfranco gmail com diff -r 958431e2cde0 -r ef4ff507a341 configure --- a/configure Sun Feb 19 15:21:28 2012 +0000 +++ b/configure Sun Feb 19 15:21:31 2012 +0000 @@ -1514,22 +1514,24 @@ *) host_arch=UNKNOWN ;; esac else # if test -z "$_target" - system_name=$(echo $_target | cut -d '-' -f 2) - case "$(echo $system_name | tr A-Z a-z)" in - linux) system_name=Linux ;; - freebsd) system_name=FreeBSD ;; - gnu/kfreebsd) system_name=FreeBSD ;; - netbsd) system_name=NetBSD ;; - bsd/os) system_name=BSD/OS ;; - openbsd) system_name=OpenBSD ;; - dragonfly) system_name=DragonFly ;; - sunos) system_name=SunOS ;; - qnx) system_name=QNX ;; - morphos) system_name=MorphOS ;; - amigaos) system_name=AmigaOS ;; - mingw32*) system_name=MINGW32 ;; - wine) system_name=Wine ;; - esac + for component in 3 2; do + system_name=$(echo $_target | cut -d '-' -f $component) + case "$(echo $system_name | tr A-Z a-z)" in + linux) system_name=Linux ;; + freebsd) system_name=FreeBSD ;; + gnu/kfreebsd) system_name=FreeBSD ;; + netbsd) system_name=NetBSD ;; + bsd/os) system_name=BSD/OS ;; + openbsd) system_name=OpenBSD ;; + dragonfly) system_name=DragonFly ;; + sunos) system_name=SunOS ;; + qnx) system_name=QNX ;; + morphos) system_name=MorphOS ;; + amigaos) system_name=AmigaOS ;; + mingw32*) system_name=MINGW32 ;; + wine) system_name=Wine ;; + esac + done # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed host_arch=$(echo $_target | cut -d '-' -f 1) if test $(echo $host_arch) != "x86_64" ; then