config.guess revision 476:2ba6f4da4bf3
175406Sache#!/bin/sh 275406Sache# 375406Sache# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 475406Sache# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 575406Sache# 675406Sache# This code is free software; you can redistribute it and/or modify it 775406Sache# under the terms of the GNU General Public License version 2 only, as 875406Sache# published by the Free Software Foundation. 9136644Sache# 1075406Sache# This code is distributed in the hope that it will be useful, but WITHOUT 11136644Sache# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1275406Sache# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1375406Sache# version 2 for more details (a copy is included in the LICENSE file that 1475406Sache# accompanied this code). 1575406Sache# 1675406Sache# You should have received a copy of the GNU General Public License version 1775406Sache# 2 along with this work; if not, write to the Free Software Foundation, 1875406Sache# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1975406Sache# 2075406Sache# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2175406Sache# or visit www.oracle.com if you need additional information or have any 2275406Sache# questions. 2375406Sache# 2475406Sache 2575406Sache# This is a wrapper for the config.guess from autoconf. The latter does not 2675406Sache# properly detect 64 bit systems on all platforms. Instead of patching the 2775406Sache# autoconf system (which might easily get lost in a future update), we wrap it 2875406Sache# and fix the broken property, if needed. 2975406Sache 3075406SacheDIR=`dirname $0` 3175406SacheOUT=`. $DIR/autoconf-config.guess` 3275406Sache 3375406Sache# Test and fix solaris on x86_64 3475406Sacheecho $OUT | grep i386-pc-solaris > /dev/null 2> /dev/null 3575406Sacheif test $? = 0; then 3675406Sache # isainfo -n returns either i386 or amd64 3775406Sache REAL_CPU=`isainfo -n` 3875406Sache OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` 3975406Sachefi 4075406Sache 4175406Sache# Test and fix solaris on sparcv9 4275406Sacheecho $OUT | grep sparc-sun-solaris > /dev/null 2> /dev/null 43119610Sacheif test $? = 0; then 44119610Sache # isainfo -n returns either sparc or sparcv9 4575406Sache REAL_CPU=`isainfo -n` 4675406Sache OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` 4775406Sachefi 4875406Sache 4975406Sache# Test and fix cygwin on x86_64 5075406Sacheecho $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null 5175406Sacheif test $? = 0; then 5275406Sache case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in 5375406Sache intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64) 5475406Sache REAL_CPU=x86_64 5575406Sache OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` 5675406Sache ;; 5775406Sache esac 5875406Sachefi 5975406Sache 6075406Sacheecho $OUT 6175406Sache