4 # Morgan Deters <mdeters@cs.nyu.edu>
5 # Tue, 15 Jan 2013 11:11:24 -0500
8 if [ -z "$HOST" ]; then
11 echo "WARNING: Using default HOST value: $HOST"
12 echo "WARNING: You should probably run this script like this:"
14 echo "WARNING: HOST=i586-mingw32msvc win32-build"
16 echo "WARNING: (replacing the i586-mingw32msvc with your build host)"
17 echo "WARNING: to ensure the script builds correctly."
24 echo "usage: `basename $0`" >&2
26 echo "This script attempts to build CVC4 for Win32 using mingw." >&2
30 function reporterror
{
32 echo =============================================================================
34 echo "There was an error setting up the prerequisites. Look above for details."
40 if which wget
&>/dev
/null
; then
42 elif which curl
&>/dev
/null
; then
45 echo "Can't figure out how to download from web. Please install wget or curl." >&2
50 for dir
in antlr-3.4 gmp-
$GMPVERSION boost-include
; do
51 if [ -e "$dir" ]; then
52 echo "error: $dir directory exists; please move it out of the way." >&2
57 echo =============================================================================
59 echo "Setting up ANTLR 3.4..."
61 MACHINE_TYPE
=x86 ANTLR_CONFIGURE_ARGS
=--host=$HOST contrib
/get-antlr-3.4 |
grep -v 'Now configure CVC4 with' |
grep -v '\./configure --with-antlr-dir='
62 [ ${PIPESTATUS[0]} -eq 0 ] || reporterror
64 echo =============================================================================
66 echo "Setting up GMP $GMPVERSION..."
74 webget
ftp://ftp.gmplib.org
/pub
/gmp-
$GMPVERSION/gmp-
$GMPVERSION.
tar.bz2 gmp-
$GMPVERSION.
tar.bz2
&&
75 tar xfj gmp-
$GMPVERSION.
tar.bz2
&&
77 .
/configure
--host=$HOST --prefix="$gmpprefix" --enable-cxx &&
82 echo =============================================================================
84 echo "Setting up BOOST includes..."
86 ( mkdir boost-include
&&
87 ln -sv /usr
/include
/boost boost-include
/boost
) ||
exit 1
89 echo =============================================================================
92 echo " ./configure --host=$HOST LDFLAGS=\"-L`pwd`/gmp-$GMPVERSION/lib -L`pwd`/antlr-3.4/lib\" CPPFLAGS=\"-I`pwd`/gmp-$GMPVERSION/include -I`pwd`/antlr-3.4/include -I`pwd`/boost-include\" ANTLR_HOME=\"`pwd`/antlr-3.4\""
95 echo =============================================================================