ls: be responsive to interrupts when color-listing large directories
[coreutils/ericb.git] / m4 / gmp.m4
blob98ac88386cdc3f47afe6d3e62d0aec793c5e89eb
1 # Tests for GNU GMP (or any compatible replacement).
3 dnl Copyright (C) 2008-2011 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.
13 AC_DEFUN([cu_GMP],
15   LIB_GMP=
16   AC_SUBST([LIB_GMP])
18   AC_ARG_WITH([gmp],
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],
23     [cu_use_gmp=auto])
25   if test $cu_use_gmp != no; then
26     cu_saved_libs=$LIBS
27     AC_SEARCH_LIBS([__gmpz_init], [gmp],
28       [test "$ac_cv_search___gmpz_init" = "none required" ||
29        {
30         LIB_GMP=$ac_cv_search___gmpz_init
31         AC_DEFINE([HAVE_GMP], [1],
32           [Define if you have GNU libgmp (or replacement)])
33        }],
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.])])
36     LIBS=$cu_saved_libs
37   fi