summaryrefslogtreecommitdiff
path: root/contrib/get-gmp-dev
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2020-04-28 10:43:48 -0700
committerGitHub <noreply@github.com>2020-04-28 10:43:48 -0700
commit5ec4b57ba3f79db76c5544b3ee37b917f7f0b58e (patch)
tree9d7dbdf20ed1a6be0212681b49a87055b946e1eb /contrib/get-gmp-dev
parent967332f464f3e26d43f05bb9c68a0be788337ef6 (diff)
contrib/get-gmp: Rename and update install instructions with a warning. (#4407)
Diffstat (limited to 'contrib/get-gmp-dev')
-rwxr-xr-xcontrib/get-gmp-dev46
1 files changed, 46 insertions, 0 deletions
diff --git a/contrib/get-gmp-dev b/contrib/get-gmp-dev
new file mode 100755
index 000000000..f8a301a89
--- /dev/null
+++ b/contrib/get-gmp-dev
@@ -0,0 +1,46 @@
+#!/usr/bin/env 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
+
+GMP_DIR="$DEPS_DIR/gmp-$GMPVERSION"
+
+check_dep_dir "$GMP_DIR"
+
+echo =============================================================================
+echo
+echo "This script should only be used if your distribution does not ship with the"
+echo "GMP configuration you need. For example, contrib/get-win-dependencies cross-"
+echo "compiles GMP for Windows. You can also use the script if your distribution"
+echo "does not ship with static GMP libraries (e.g., Arch Linux) and you want to"
+echo "build CVC4 statically."
+echo
+echo "In most of the cases the GMP version installed on your system is the one you"
+echo "want and should use."
+echo
+echo =============================================================================
+echo
+echo "Setting up GMP $GMPVERSION..."
+echo
+setup_dep "https://gmplib.org/download/gmp/gmp-$GMPVERSION.tar.bz2" "$GMP_DIR"
+cd "$GMP_DIR"
+./configure ${HOST} --prefix="$INSTALL_DIR" --enable-cxx ${BUILD_TYPE}
+make \
+ CFLAGS="${MAKE_CFLAGS}" \
+ CXXFLAGS="${MAKE_CXXFLAGS}" \
+ LDFLAGS="${MAKE_LDFLAGS}" \
+ -j$(nproc)
+make install
+echo
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback