aph@1321: #!/bin/sh ohair@576: # aph@1321: # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. ohair@576: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@576: # ohair@576: # This code is free software; you can redistribute it and/or modify it ohair@576: # under the terms of the GNU General Public License version 2 only, as aph@1321: # published by the Free Software Foundation. ohair@576: # ohair@576: # This code is distributed in the hope that it will be useful, but WITHOUT ohair@576: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@576: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@576: # version 2 for more details (a copy is included in the LICENSE file that ohair@576: # accompanied this code). ohair@576: # ohair@576: # You should have received a copy of the GNU General Public License version ohair@576: # 2 along with this work; if not, write to the Free Software Foundation, ohair@576: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@576: # ohair@576: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@576: # or visit www.oracle.com if you need additional information or have any ohair@576: # questions. ohair@576: # ohair@576: aph@1321: # This is a wrapper for the config.guess from autoconf. The latter aph@1321: # does not know about all of our platforms. Instead of patching the aph@1321: # autoconf system (which might easily get lost in a future update), we aph@1321: # wrap it and fix the broken property, if needed. ohair@425: aph@1321: DIR=`dirname $0` ohair@425: aph@1321: # First, filter out everything that doesn't begin with "aarch64-" aph@1321: if ! echo $* | grep '^aarch64-' >/dev/null ; then aph@1321: . $DIR/autoconf-config.sub "$@" aph@1321: # autoconf-config.sub exits, so we never reach here, but just in aph@1321: # case we do: aph@1321: exit aph@1321: fi ohair@425: ohair@425: while test $# -gt 0 ; do aph@1321: case $1 in aph@1321: -- ) # Stop option processing aph@1321: shift; break ;; dlong@1324: aarch64-* ) dlong@1324: config=`echo $1 | sed 's/^aarch64-/arm-/'` aph@1321: sub_args="$sub_args $config" aph@1321: shift; ;; aph@1321: - ) # Use stdin as input. aph@1321: sub_args="$sub_args $1" aph@1321: shift; break ;; aph@1321: * ) aph@1321: sub_args="$sub_args $1" aph@1321: shift; ;; aph@1321: esac ohair@425: done ohair@425: aph@1321: result=`. $DIR/autoconf-config.sub $sub_args "$@"` aph@1321: exitcode=$? ohair@425: dlong@1324: result=`echo $result | sed "s/^arm-/aarch64-/"` ohair@425: aph@1321: echo $result aph@1321: exit $exitcode ohair@425: