xc revision d91e5a75df148ed3c5689d84cddea977c6a4d928
1516N/A# Copyright (C) 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
1N/A#
1N/A# Permission to use, copy, modify, and/or distribute this software for any
1N/A# purpose with or without fee is hereby granted, provided that the above
1N/A# copyright notice and this permission notice appear in all copies.
1N/A#
1N/A# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
1N/A# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1N/A# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
1N/A# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1N/A# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
1N/A# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1N/A# PERFORMANCE OF THIS SOFTWARE.
1N/A
1N/A# $Id$
1N/A
1N/A#
1N/A# test cross compiler
1N/A#
1N/A
1N/Achmod=
1628N/Anext=0
1N/Afor t in ${BUILD_CC} gcc cc
1N/Ado
22N/A type $t > /dev/null 2>&1 && cc=$t && break
22N/Adone
0N/Afor i in "$@"
0N/Ado
221N/A [ $next = 1 ] && chmod="$i"
539N/A case "$i" in
539N/A -o) next=1;;
221N/A *) next=0;;
14N/A esac
14N/Adone
221N/Aif ${cc:-false} "$@"
14N/Athen
14N/A [ "$chmod" != "" ] && chmod a-x "$chmod"
22N/A exit 0;
22N/Aelse
22N/A exit 1;
22N/Afi
22N/A