From 2d3721d943b605c90cacb1a6f4f1376b6f584190 Mon Sep 17 00:00:00 2001 From: jasonmoxham Date: Thu, 23 Sep 2010 03:12:54 +0000 Subject: [PATCH] hack config.guess to distinguish between mingw32 and mingw64 --- config.guess | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/config.guess b/config.guess index 8d4a3f10..acef94ff 100755 --- a/config.guess +++ b/config.guess @@ -109,6 +109,33 @@ if test x"$CC_FOR_BUILD" = x; then fi fi +#here we have to distinguish between mingw32 32bit and 64bit , as the msys people refuse to +#as we changing the middle part of the triple we do this first +# find the size of a limb + +case "$guess_full" in + +*-pc-mingw32) + + cat <${dummy}.c +main(){ +#ifdef _WIN64 +printf("-w64-mingw32\n"); +#endif +return 0;} +EOF + if ($CC_FOR_BUILD ${dummy}.c -o $dummy) >/dev/null 2>&1; then + x=`$SHELL -c ./$dummy 2>/dev/null` + if test $? = 0 && test -n "$x"; then + guess_rest=$x + fi + fi + rm -f ${dummy}.c $dummy + ;; +esac + + + case "$guess_full" in @@ -771,6 +798,7 @@ if test -n "$exact_cpu"; then else echo "$guess_full" fi + exit 0