comparison configure @ 34654:ef4ff507a341

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
author diego
date Sun, 19 Feb 2012 15:21:31 +0000
parents a073753233fe
children ae0f39283934
comparison
equal deleted inserted replaced
34653:958431e2cde0 34654:ef4ff507a341
1512 vax) host_arch=vax ;; 1512 vax) host_arch=vax ;;
1513 xtensa*) host_arch=xtensa ;; 1513 xtensa*) host_arch=xtensa ;;
1514 *) host_arch=UNKNOWN ;; 1514 *) host_arch=UNKNOWN ;;
1515 esac 1515 esac
1516 else # if test -z "$_target" 1516 else # if test -z "$_target"
1517 system_name=$(echo $_target | cut -d '-' -f 2) 1517 for component in 3 2; do
1518 case "$(echo $system_name | tr A-Z a-z)" in 1518 system_name=$(echo $_target | cut -d '-' -f $component)
1519 linux) system_name=Linux ;; 1519 case "$(echo $system_name | tr A-Z a-z)" in
1520 freebsd) system_name=FreeBSD ;; 1520 linux) system_name=Linux ;;
1521 gnu/kfreebsd) system_name=FreeBSD ;; 1521 freebsd) system_name=FreeBSD ;;
1522 netbsd) system_name=NetBSD ;; 1522 gnu/kfreebsd) system_name=FreeBSD ;;
1523 bsd/os) system_name=BSD/OS ;; 1523 netbsd) system_name=NetBSD ;;
1524 openbsd) system_name=OpenBSD ;; 1524 bsd/os) system_name=BSD/OS ;;
1525 dragonfly) system_name=DragonFly ;; 1525 openbsd) system_name=OpenBSD ;;
1526 sunos) system_name=SunOS ;; 1526 dragonfly) system_name=DragonFly ;;
1527 qnx) system_name=QNX ;; 1527 sunos) system_name=SunOS ;;
1528 morphos) system_name=MorphOS ;; 1528 qnx) system_name=QNX ;;
1529 amigaos) system_name=AmigaOS ;; 1529 morphos) system_name=MorphOS ;;
1530 mingw32*) system_name=MINGW32 ;; 1530 amigaos) system_name=AmigaOS ;;
1531 wine) system_name=Wine ;; 1531 mingw32*) system_name=MINGW32 ;;
1532 esac 1532 wine) system_name=Wine ;;
1533 esac
1534 done
1533 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed 1535 # We need to convert underscores so that values like k6-2 and pentium-mmx can be passed
1534 host_arch=$(echo $_target | cut -d '-' -f 1) 1536 host_arch=$(echo $_target | cut -d '-' -f 1)
1535 if test $(echo $host_arch) != "x86_64" ; then 1537 if test $(echo $host_arch) != "x86_64" ; then
1536 host_arch=$(echo $host_arch | tr '_' '-') 1538 host_arch=$(echo $host_arch | tr '_' '-')
1537 fi 1539 fi