summaryrefslogtreecommitdiff
path: root/contrib/mac-build
blob: e45cd0fad27e4ecd6be7bc18c45b75294dcea76f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# mac-build script
# Morgan Deters <mdeters@cs.nyu.edu>
# Tue, 25 Sep 2012 15:44:27 -0400
#

macports_prereq="autoconf automake boost gmp gtime libtool 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
  exit 1
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 =============================================================================
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback