summaryrefslogtreecommitdiff
path: root/libraries/integer-gmp/configure.ac
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-03-29 19:02:08 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2015-03-31 10:59:36 +0200
commit995e8c1c8692b60c907c7d2ccea179d52ca8e69e (patch)
tree1314ec36672d72b33a99b33e017316c0b8585625 /libraries/integer-gmp/configure.ac
parent1f69f37f34c6f15fd900c2c1cce3ce896168dde9 (diff)
downloadhaskell-995e8c1c8692b60c907c7d2ccea179d52ca8e69e.tar.gz
Drop old integer-gmp-0.5 from GHC source tree
This completes what c774b28f76ee4c220f7c1c9fd81585e0e3af0e8a (#9281) started. `integer-gmp-1.0` was added as an additional `libraries/integer-gmp2` folder while retaining the ability to configure GHC w/ the old `integer-gmp-0.5` to have a way back, and or the ability to easily switch between old/new `integer-gmp` for benchmark/debugging purposes. This commit removes the old `libraries/integer-gmp` folder and moves `libraries/integer-gmp2` into its place, while removing any mentions of "gmp2" as well as the to support two different `integer-gmp` packages in GHC's source-tree. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D769
Diffstat (limited to 'libraries/integer-gmp/configure.ac')
-rw-r--r--libraries/integer-gmp/configure.ac36
1 files changed, 33 insertions, 3 deletions
diff --git a/libraries/integer-gmp/configure.ac b/libraries/integer-gmp/configure.ac
index d5eb3b23d3..0bd91887b8 100644
--- a/libraries/integer-gmp/configure.ac
+++ b/libraries/integer-gmp/configure.ac
@@ -1,7 +1,8 @@
-AC_INIT([Haskell integer (GMP)], [0.1], [libraries@haskell.org], [integer])
+AC_INIT([Haskell integer (GMP)], [1.0], [libraries@haskell.org], [integer])
+AC_PREREQ(2.52)
# Safety check: Ensure that we are in the correct source directory.
-AC_CONFIG_SRCDIR([cbits/gmp-wrappers.cmm])
+AC_CONFIG_SRCDIR([cbits/wrappers.c])
AC_CANONICAL_TARGET
@@ -60,11 +61,36 @@ then
LOOK_FOR_GMP_FRAMEWORK
fi
fi
+
+AC_MSG_CHECKING([whether to use in-tree GMP])
if test "$HaveFrameworkGMP" = "YES" || test "$HaveLibGmp" = "YES"
then
+ AC_MSG_RESULT([no])
+ UseIntreeGmp=0
AC_CHECK_HEADER([gmp.h], , [AC_MSG_ERROR([Cannot find gmp.h])])
+
+ AC_MSG_CHECKING([GMP version])
+ AC_COMPUTE_INT(GhcGmpVerMj, __GNU_MP_VERSION, [#include <gmp.h>],
+ AC_MSG_ERROR([Unable to get value of __GNU_MP_VERSION]))
+ AC_COMPUTE_INT(GhcGmpVerMi, __GNU_MP_VERSION_MINOR, [#include <gmp.h>],
+ AC_MSG_ERROR([Unable to get value of __GNU_MP_VERSION_MINOR]))
+ AC_COMPUTE_INT(GhcGmpVerPl, __GNU_MP_VERSION_PATCHLEVEL, [#include <gmp.h>],
+ AC_MSG_ERROR([Unable to get value of __GNU_MP_VERSION_PATCHLEVEL]))
+ AC_MSG_RESULT([$GhcGmpVerMj.$GhcGmpVerMi.$GhcGmpVerPl])
+
+else
+ AC_MSG_RESULT([yes])
+ UseIntreeGmp=1
+ HaveSecurePowm=1
+
+ AC_MSG_CHECKING([GMP version])
+ GhcGmpVerMj=5
+ GhcGmpVerMi=0
+ GhcGmpVerPl=4
+ AC_MSG_RESULT([$GhcGmpVerMj.$GhcGmpVerMi.$GhcGmpVerPl])
fi
+
dnl--------------------------------------------------------------------
dnl * Make sure we got some form of gmp
dnl--------------------------------------------------------------------
@@ -76,11 +102,15 @@ AC_SUBST(GMP_FRAMEWORK)
AC_SUBST(HaveLibGmp)
AC_SUBST(HaveFrameworkGMP)
AC_SUBST(HaveSecurePowm)
+AC_SUBST(UseIntreeGmp)
+AC_SUBST(GhcGmpVerMj)
+AC_SUBST(GhcGmpVerMi)
+AC_SUBST(GhcGmpVerPl)
AC_CONFIG_FILES([integer-gmp.buildinfo gmp/config.mk include/HsIntegerGmp.h])
dnl--------------------------------------------------------------------
-dnl * Generate the header cbits/GmpDerivedConstants.h
+dnl * Generate output files
dnl--------------------------------------------------------------------
AC_OUTPUT