diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-09-26 18:51:48 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-09-26 18:51:48 +0000 |
commit | c1e936b9cec3d731778b95504770e48c28fd1a65 (patch) | |
tree | d0302810f915f51b4c82e4e5d36267b35ba7af38 /contrib/mac-build | |
parent | f6fcb28606d8eca239c3a71e7f42a2bbbf0a8995 (diff) |
Fix a handful of things for Mac, and Java bindings.
Also add a "mac-build" script that sets up prerequisites for Mac.
Diffstat (limited to 'contrib/mac-build')
-rw-r--r-- | contrib/mac-build | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/contrib/mac-build b/contrib/mac-build new file mode 100644 index 000000000..834191a0c --- /dev/null +++ b/contrib/mac-build @@ -0,0 +1,55 @@ +#!/bin/bash +# +# mac-build script +# Morgan Deters <mdeters@cs.nyu.edu> +# Tue, 25 Sep 2012 15:44:27 -0400 +# + +macports_prereq="boost gmp gtime readline" + +export PATH="/opt/local/bin:$PATH" + +if [ $# -ne 0 ]; then + echo "usage: `basename $0`" >&2 + echo >&2 + echo "This script attempts to set up the build requirements for CVC4 for Mac OS X." >&2 + echo "MacPorts must be installed (but this script installs prerequisite port" >&2 + echo "packages for CVC4). If this script is successful, it prints a configure" >&2 + echo "line that you can use to configure CVC4." >&2 +fi + +function reporterror { + echo + echo ============================================================================= + echo + echo "There was an error setting up the prerequisites. Look above for details." + echo + exit 1 +} + +echo ============================================================================= +echo +echo "running: sudo port install $macports_prereq" +if which port &>/dev/null; then + echo "You may be asked for your password to install these packages." + echo + sudo port install $macports_prereq || reporterror +else + echo + echo "ERROR: You must have MacPorts installed for Mac builds of CVC4." + echo "ERROR: See http://www.macports.org/" + reporterror +fi +echo +echo ============================================================================= +echo +contrib/get-antlr-3.4 | grep -v 'Now configure CVC4 with' | grep -v '\./configure --with-antlr-dir=' +[ ${PIPESTATUS[0]} -eq 0 ] || reporterror +echo +echo ============================================================================= +echo +echo 'Now just run:' +echo ' ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include --with-antlr-dir=`pwd`/antlr-3.4 ANTLR=`pwd`/antlr-3.4/bin/antlr3' +echo ' make' +echo +echo ============================================================================= |