summaryrefslogtreecommitdiff
path: root/infrastructure/mingw
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-26 23:16:03 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-26 23:16:03 +0000
commit3431957386a00b0f13875c7e0cf639bf7ba307d8 (patch)
tree58f92ae9d29000d31c92761e614999d64fa8b8ec /infrastructure/mingw
parentb25638a24539936966650d63c6bb6b1c015c703e (diff)
Fix compilation on Windows MinGW x86_64.
Look for libraries in the right directory, and pass the right --host option to the configure script.
Diffstat (limited to 'infrastructure/mingw')
-rwxr-xr-xinfrastructure/mingw/configure.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/infrastructure/mingw/configure.sh b/infrastructure/mingw/configure.sh
index 46a61637..dd45a572 100755
--- a/infrastructure/mingw/configure.sh
+++ b/infrastructure/mingw/configure.sh
@@ -1,6 +1,16 @@
#!/bin/sh
-DEP_PATH=/usr/i686-pc-mingw32
+
+case "`uname -m`" in
+x86_64)
+ DEP_PATH=/usr/x86_64-w64-mingw32
+ target=x86_64-w64-mingw32 ;;
+i686)
+ DEP_PATH=/usr/i686-pc-mingw32
+ target=i686-pc-mingw32 ;;
+*)
+ echo "Error: unknown machine type `uname -m`" >&2; exit 1 ;;
+esac
if [ ! -r "$DEP_PATH/lib/libssl.a" ]; then
echo "Error: install OpenSSL as instructed by" \
@@ -30,11 +40,10 @@ if [ ! -x "configure" ]; then
fi
fi
-if ! ./configure "$@" --target=i686-pc-mingw32 \
- CFLAGS="-mno-cygwin -mthreads" \
- CPPFLAGS="-mno-cygwin" \
- CXXFLAGS="-mno-cygwin -mthreads" \
- LDFLAGS="-Wl,-Bstatic -mno-cygwin -mthreads -L${DEP_PATH}/lib -L${LIBZ_PATH}"
+if ! ./configure "$@" --host=$target \
+ CFLAGS="-mthreads" \
+ CXXFLAGS="-mthreads" \
+ LDFLAGS="-Wl,-Bstatic -mthreads -L${DEP_PATH}/lib -L${LIBZ_PATH}"
then
echo "Error: configure failed, aborting." >&2
exit 1