Try various compiler names until one succeeds.

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@1181 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2013-05-17 14:02:45 +00:00
parent f2bcdc87b8
commit 1569cd8b8d
1 changed files with 11 additions and 2 deletions

View File

@ -24,7 +24,16 @@
MINGW32_PREFIX=${MINGW32_PREFIX:-/usr/local/mingw32}
LIBUSB_PREFIX=${LIBUSB_PREFIX:-/WINDOWS/ProgramFiles/LibUSB-Win32}
CC=mingw32-gcc
for CC in mingw32-gcc i686-w64-mingw32-gcc
do
touch foo.c
if ${cc} -c foo.c 2> /dev/null
then
rm -f foo.*
break
fi
done
tgt=$(expr "$CC" : "\(.*\)-gcc")
BUILDDIR=build-mingw32
mkdir -p ${BUILDDIR} || { echo "Cannot create build dir $BUILDDIR"; exit 1; }
@ -40,6 +49,6 @@ env \
LDFLAGS="${LDFLAGS}" \
../../configure \
--host=$(../../config.guess) \
--target=i386-unknowns-mingw32
--target=${tgt}
make all