summaryrefslogtreecommitdiff
path: root/win32/find-mingw32.sh
blob: 51dcdd7e2844070f140f47da51644c191a0d7d09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh

cc="$1"

for prefix in \
    mingw- \
    mingw32- \
    i386-pc-mingw32- \
    i486-pc-mingw32- \
    i586-pc-mingw32- \
    i686-pc-mingw32- \
    i386-pc-mingw32msvc- \
    i486-pc-mingw32msvc- \
    i586-pc-mingw32msvc- \
    i686-pc-mingw32msvc- \
    i386-mingw32- \
    i486-mingw32- \
    i586-mingw32- \
    i686-mingw32- \
    i386-mingw32msvc- \
    i486-mingw32msvc- \
    i586-mingw32msvc- \
    i686-mingw32msvc- \
    i686-w64-mingw32-; do
    if "${prefix}${cc}" -v > /dev/null 2>&1; then
	echo "$prefix"
	exit 0
    fi
done

# No prefix, no idea what to do now...
echo missing-
exit 1