Better configuration for QF_NRA
[cvc5.git] / contrib / get-glpk-cut-log
1 #!/bin/bash
2 #
3 set -e
4
5 commit=b420454e732f4b3d229c552ef7cd46fec75fe65c
6
7 cd "$(dirname "$0")/.."
8
9 if ! [ -e src/parser/cvc/Cvc.g ]; then
10 echo "$(basename $0): I expect to be in the contrib/ of a CVC4 source tree," >&2
11 echo "but apparently:" >&2
12 echo >&2
13 echo " $(pwd)" >&2
14 echo >&2
15 echo "is not a CVC4 source tree ?!" >&2
16 exit 1
17 fi
18
19 function webget {
20 if which wget &>/dev/null; then
21 wget -c -O "$2" "$1"
22 elif which curl &>/dev/null; then
23 curl "$1" >"$2"
24 else
25 echo "Can't figure out how to download from web. Please install wget or curl." >&2
26 exit 1
27 fi
28 }
29
30 if [ -e glpk-cut-log ]; then
31 echo 'error: file or directory "glpk-cut-log" exists; please move it out of the way.' >&2
32 exit 1
33 fi
34
35 mkdir glpk-cut-log
36 cd glpk-cut-log
37 webget https://github.com/timothy-king/glpk-cut-log/archive/$commit.zip glpk-cut-log-$commit.zip
38 unzip glpk-cut-log-$commit.zip
39 cd glpk-cut-log-$commit
40
41 libtoolize
42 aclocal
43 autoheader
44 autoconf
45 automake --add-missing
46 ./configure --without-pic --prefix=`pwd`/.. --disable-shared --enable-static --disable-dependency-tracking
47 make && make install
48 mv `pwd`/../lib/libglpk.a `pwd`/../lib/libglpk-static.a
49 make distclean
50 ./configure --with-pic --prefix=`pwd`/.. --disable-shared --enable-static --disable-dependency-tracking
51 make && make install
52
53 cd ..
54
55 echo
56 echo ===================== Now configure CVC4 with =====================
57 echo ./configure --enable-gpl --with-glpk --with-glpk-dir=`pwd`