source: box/trunk/infrastructure/mingw/configure.sh @ 3017

Revision 3017, 1.0 KB checked in by chris, 8 months ago (diff)

Search for libraries in the path where Cygwin installs MinGW zlib as well

  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3DEP_PATH=/usr/i686-pc-mingw32
4
5if [ ! -r "$DEP_PATH/lib/libssl.a" ]; then
6        echo "Error: install OpenSSL as instructed by" \
7                "docs/backup/win32_build_on_cygwin_using_mingw.txt" >&2
8        exit 2
9fi
10
11if [ ! -r "$DEP_PATH/lib/libpcreposix.a" \
12        -o ! -r "$DEP_PATH/lib/libpcre.a" \
13        -o ! -r "$DEP_PATH/include/pcreposix.h" ]; then
14        echo "Error: install PCRE as instructed by" \
15                "docs/backup/win32_build_on_cygwin_using_mingw.txt" >&2
16        exit 2
17fi
18
19LIBZ_PATH="${DEP_PATH}/sys-root/mingw/lib"
20
21if [ ! -r "$LIBZ_PATH/libz.dll.a" ]; then
22        echo "Error: upgrade your Cygwin mingw-zlib-devel package" >&2
23        exit 2
24fi
25
26if [ ! -x "configure" ]; then
27        if ! ./bootstrap; then
28                echo "Error: bootstrap failed, aborting." >&2
29                exit 1
30        fi
31fi
32
33if ! ./configure "$@" --target=i686-pc-mingw32 \
34        CFLAGS="-mno-cygwin -mthreads" \
35        CPPFLAGS="-mno-cygwin" \
36        CXXFLAGS="-mno-cygwin -mthreads" \
37        LDFLAGS="-mno-cygwin -mthreads -L${DEP_PATH}/lib -L${LIBZ_PATH}" \
38        LIBS="-lcrypto -lws2_32 -lgdi32"
39then
40        echo "Error: configure failed, aborting." >&2
41        exit 1
42fi
43
44exit 0
Note: See TracBrowser for help on using the repository browser.