Use std::hash for API types (#6432)
[cvc5.git] / contrib / get-abc
1 #!/usr/bin/env bash
2 #
3 source "$(dirname "$0")/get-script-header.sh"
4
5 ABC_DIR="$DEPS_DIR/abc"
6 commit=3d7034bf619aada30b0ba1e8afcb151d304ab556
7
8 setup_dep "https://github.com/berkeley-abc/abc/archive/$commit.tar.gz" "$ABC_DIR"
9 cd "$ABC_DIR"
10
11 # Strip out libSupport.c, it is in charge of loading extensions and we
12 # don't want different behavior based on ABC_LIB_PATH, or based on what
13 # .so is in the current directory!
14 cp src/base/main/module.make src/base/main/module.make.orig
15 grep -v 'libSupport\.c' src/base/main/module.make.orig > src/base/main/module.make
16 cp src/base/main/mainInit.c src/base/main/mainInit.c.orig
17 sed 's,\( *\)\(.*Libs_Init(\),\1//\2,;s,\( *\)\(.*Libs_End(\),\1//\2,' src/base/main/mainInit.c.orig > src/base/main/mainInit.c
18
19 # Build optimized, without readline, without pthreads.
20 # These aren't necessary for our usage and we don't want the dependencies.
21 make -j$(nproc) libabc.a OPTFLAGS=-O ABC_USE_NO_READLINE=1 ABC_USE_NO_PTHREADS=1
22 mv libabc.a libabc-static.a
23 install_lib libabc-static.a
24 make clean
25
26 make -j$(nproc) libabc.a OPTFLAGS='-O -fPIC' ABC_USE_NO_READLINE=1 ABC_USE_NO_PTHREADS=1
27 install_lib libabc.a
28 install_bin arch_flags
29
30 # Copy headers and preserve subdirectories
31 cd src
32 mkdir -p "$INSTALL_INCLUDE_DIR/abc"
33
34 if [[ "$OSTYPE" == "darwin"* ]]; then
35 rsync -R -r $(find . -name '*.h') "$INSTALL_INCLUDE_DIR/abc"
36 else
37 cp --parents $(find . -name '*.h') "$INSTALL_INCLUDE_DIR/abc"
38 fi
39
40 echo
41 echo ===================== Now configure cvc5 with =====================
42 echo ./configure.sh --abc