forked from cvc5/cvc5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add contrib/get-gmp script. (cvc5#2292)
- Loading branch information
Showing
2 changed files
with
45 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
# | ||
# This script should only be used if your distribution does not ship with the | ||
# GMP configuration you need. For example, contrib/get-win-dependencies | ||
# cross-compiles GMP for Windows. You can also use the script if your | ||
# distribution does not ship with static GMP libraries (e.g., Arch Linux) and | ||
# you want to build CVC4 statically. | ||
# In most of the cases the GMP version installed on your system is the one you | ||
# want and should use. | ||
# | ||
|
||
source "$(dirname "$0")/get-script-header.sh" | ||
|
||
[ -z "${BUILD_TYPE}" ] && BUILD_TYPE="--disable-shared --enable-static" | ||
[ -n "$HOST" ] && HOST="--host=$HOST" | ||
[ -z "$GMPVERSION" ] && GMPVERSION=6.1.2 | ||
|
||
echo ============================================================================= | ||
echo | ||
echo "Setting up GMP $GMPVERSION..." | ||
echo | ||
( set -ex | ||
mkdir gmp-$GMPVERSION | ||
cd gmp-$GMPVERSION | ||
gmpprefix=`pwd` && | ||
mkdir src && | ||
cd src && | ||
webget https://gmplib.org/download/gmp/gmp-$GMPVERSION.tar.bz2 gmp-$GMPVERSION.tar.bz2 && | ||
tar xfj gmp-$GMPVERSION.tar.bz2 && | ||
cd gmp-$GMPVERSION && | ||
./configure ${HOST} --prefix="$gmpprefix" --enable-cxx ${BUILD_TYPE} && | ||
make CFLAGS="${MAKE_CFLAGS}" CXXFLAGS="${MAKE_CXXFLAGS}" LDFLAGS="${MAKE_LDFLAGS}" && | ||
make install | ||
) || exit 1 | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters