+ # on Cygwin we MUST use the MinGW "cross-compiler", therefore check these first
+ # furthermore, we prefer 64 bit over 32 bit versions if both are available
+
+ # we need this condition so we don't find a mingw32 compiler on linux
+ if [[ $OS == windows ]] ; then
+ test_programs_installed x86_64-w64-mingw32-gcc x86_64-w64-mingw32-g++
+ if [[ $? -ne 0 ]] ; then
+ [ -z "$CC" ] && CC=x86_64-w64-mingw32-gcc
+ [ -z "$CXX" ] && CXX=x86_64-w64-mingw32-g++
+ return
+ fi
+
+ test_programs_installed i686-w64-mingw32-gcc i686-w64-mingw32-g++
+ if [[ $? -ne 0 ]] ; then
+ [ -z "$CC" ] && CC=i686-w64-mingw32-gcc
+ [ -z "$CXX" ] && CXX=i686-w64-mingw32-g++
+ return
+ fi
+ fi
+