1#!/bin/sh 2 3cc="$1" 4 5for prefix in \ 6 mingw- \ 7 mingw32- \ 8 i386-pc-mingw32- \ 9 i486-pc-mingw32- \ 10 i586-pc-mingw32- \ 11 i686-pc-mingw32- \ 12 i386-pc-mingw32msvc- \ 13 i486-pc-mingw32msvc- \ 14 i586-pc-mingw32msvc- \ 15 i686-pc-mingw32msvc- \ 16 i386-mingw32- \ 17 i486-mingw32- \ 18 i586-mingw32- \ 19 i686-mingw32- \ 20 i386-mingw32msvc- \ 21 i486-mingw32msvc- \ 22 i586-mingw32msvc- \ 23 i686-mingw32msvc- \ 24 i686-w64-mingw32-; do 25 if "${prefix}${cc}" -v > /dev/null 2>&1; then 26 echo "$prefix" 27 exit 0 28 fi 29done 30 31# No prefix, no idea what to do now... 32echo missing- 33exit 1 34