xc revision d91e5a75df148ed3c5689d84cddea977c6a4d928
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley# Copyright (C) 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
1da14e066c23245c255dedb311d5a9cf0e5bb667Automatic Updater#
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington# Permission to use, copy, modify, and/or distribute this software for any
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# purpose with or without fee is hereby granted, provided that the above
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# copyright notice and this permission notice appear in all copies.
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley#
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# PERFORMANCE OF THIS SOFTWARE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# $Id$
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley#
0ef59d22882fc5d28f4683fdbe88aefd8eaad6f3Francis Dupont# test cross compiler
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence#
4cafb28abcaa2a485c7aac1696213435538b92edBob Halley
4cafb28abcaa2a485c7aac1696213435538b92edBob Halleychmod=
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halleynext=0
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark Andrewsfor t in ${BUILD_CC} gcc cc
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austeindo
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley type $t > /dev/null 2>&1 && cc=$t && break
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halleydone
50dfb7ee4ada4c9aa30bd18c1b5d9b04be765669Michael Grafffor i in "$@"
50dfb7ee4ada4c9aa30bd18c1b5d9b04be765669Michael Graffdo
c4958494a98a59ce25e9fecad76a9ab0e36cc59fDanny Mayer [ $next = 1 ] && chmod="$i"
50dfb7ee4ada4c9aa30bd18c1b5d9b04be765669Michael Graff case "$i" in
96ea71632887c58a9d00f47eb318bf76b35903c3Mark Andrews -o) next=1;;
138d22b316c7cd10eaa9df2ee0e3ec712a077153Bob Halley *) next=0;;
7aacbd685b2107670e4179689abec9cb82d972abBob Halley esac
7aacbd685b2107670e4179689abec9cb82d972abBob Halleydone
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrewsif ${cc:-false} "$@"
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrewsthen
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews [ "$chmod" != "" ] && chmod a-x "$chmod"
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews exit 0;
ac70da9a2710aa9f343d2f720eb1bdd4191a79caBob Halleyelse
ac70da9a2710aa9f343d2f720eb1bdd4191a79caBob Halley exit 1;
ac70da9a2710aa9f343d2f720eb1bdd4191a79caBob Halleyfi
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein