summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/win32/find-mingw32.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/win32/find-mingw32.sh')
-rwxr-xr-xcontrib/syslinux-4.02/win32/find-mingw32.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/win32/find-mingw32.sh b/contrib/syslinux-4.02/win32/find-mingw32.sh
new file mode 100755
index 0000000..f79949c
--- /dev/null
+++ b/contrib/syslinux-4.02/win32/find-mingw32.sh
@@ -0,0 +1,32 @@
+#!/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-; 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