diff options
author | Pádraig Brady <P@draigBrady.com> | 2012-10-08 11:38:41 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2012-10-08 23:40:08 +0100 |
commit | cf9cd8958bbf294c30b82c2d5e9ea64ef14f37b9 (patch) | |
tree | c3cccfcf3679cb335ec7406c3d93ea5835a9a9e0 /m4 | |
parent | 231e40a6ba29b892daca1e4a2e464c315874e155 (diff) | |
download | coreutils-cf9cd8958bbf294c30b82c2d5e9ea64ef14f37b9.tar.xz |
build: support older GMP versions
The new factor code introduced usage of mpz_inits() and
mpz_clears(), which are only available since GMP >= 5,
and will result in a compile error when missing.
* m4/gmp.m4 (cu_GMP): Define HAVE_DECL_MPZ_INITS appropriately.
* src/factor (mpz_inits): New function, defined where missing.
(mpz_clears): Likewise.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/gmp.m4 | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -30,6 +30,8 @@ AC_DEFUN([cu_GMP], LIB_GMP=$ac_cv_search___gmpz_init AC_DEFINE([HAVE_GMP], [1], [Define if you have GNU libgmp (or replacement)]) + # This only available in GMP >= 5 + AC_CHECK_DECLS([mpz_inits], [], [], [[#include <gmp.h>]]) }], [AC_MSG_WARN([libgmp development library was not found or not usable.]) AC_MSG_WARN([AC_PACKAGE_NAME will be built without GMP support.])]) |