aboutsummaryrefslogtreecommitdiffstats
path: root/win32/find-mingw.sh
blob: 59c5d31ae647300f60957080b4363fcb1b0399d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

cc="$1"

for prefix in \
    mingw- \
    i386-mingw32- \
    i486-mingw32- \
    i586-mingw32- \
    i686-mingw32- \
    i386-mingw32msvc- \
    i486-mingw32msvc- \
    i586-mingw32msvc- \
    i686-mingw32msvc-; 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