1 # Tests for GNU GMP (or any compatible replacement).
3 dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
5 dnl This file is free software; the Free Software Foundation
6 dnl gives unlimited permission to copy and/or distribute it,
7 dnl with or without modifications, as long as this notice is preserved.
9 dnl Written by James Youngman.
11 dnl Check for libgmp. We avoid use of AC_CHECK_LIBS because we don't want to
12 dnl add this to $LIBS for all targets.
19 AS_HELP_STRING([--without-gmp],
20 [do not use the GNU MP library for arbitrary precision
21 calculation (default: use it if available)]),
22 [cu_use_gmp=$withval],
25 if test $cu_use_gmp != no; then
27 AC_SEARCH_LIBS([__gmpz_init], [gmp],
28 [test "$ac_cv_search___gmpz_init" = "none required" ||
30 LIB_GMP=$ac_cv_search___gmpz_init
31 AC_DEFINE([HAVE_GMP], [1],
32 [Define if you have GNU libgmp (or replacement)])
34 [AC_MSG_WARN([libgmp development library was not found or not usable.])
35 AC_MSG_WARN([AC_PACKAGE_NAME will be built without GMP support.])])