summaryrefslogtreecommitdiff
path: root/contrib/get-abc
blob: 217cbfdf8d108a0644392dd2c4ed1f5fb9c12b03 (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
#!/bin/bash
#
source "$(dirname "$0")/get-script-header.sh"

if [ -e abc ]; then
  echo 'error: file or directory "abc" exists; please move it out of the way.' >&2
  exit 1
fi

commit=53f39c11b58d

mkdir abc
cd abc
webget https://bitbucket.org/alanmi/abc/get/$commit.tar.gz abc-$commit.tar.gz
gunzip -f abc-$commit.tar.gz
tar xfv abc-$commit.tar
cd alanmi-abc-$commit

# Strip out libSupport.c, it is in charge of loading extensions and we
# don't want different behavior based on ABC_LIB_PATH, or based on what
# .so is in the current directory!
cp src/base/main/module.make src/base/main/module.make.orig
grep -v 'libSupport\.c' src/base/main/module.make.orig > src/base/main/module.make
cp src/base/main/mainInit.c src/base/main/mainInit.c.orig
sed 's,\( *\)\(.*Libs_Init(\),\1//\2,;s,\( *\)\(.*Libs_End(\),\1//\2,' src/base/main/mainInit.c.orig > src/base/main/mainInit.c

# Build optimized, without readline, without pthreads.
# These aren't necessary for our usage and we don't want the dependencies.
make -j$(nproc) libabc.a OPTFLAGS=-O ABC_USE_NO_READLINE=1 ABC_USE_NO_PTHREADS=1
mv libabc.a libabc-static.a
make clean
make -j$(nproc) libabc.a OPTFLAGS='-O -fPIC' ABC_USE_NO_READLINE=1 ABC_USE_NO_PTHREADS=1

echo
echo ===================== Now configure CVC4 with =====================
echo ./configure --with-abc --with-abc-dir=`pwd`
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback