blob: 8a9c467ae17c69637b78742b7a408449c973b7dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
dnl--------------------------------------------------------------------
dnl * Check whether this machine has gmp/gmp3 installed
dnl--------------------------------------------------------------------
AC_DEFUN([LOOK_FOR_GMP_LIB],[
if test "$HaveFrameworkGMP" = "NO"
then
AC_CHECK_LIB([gmp], [__gmpz_fdiv_qr],
[HaveLibGmp=YES; GMP_LIBS=gmp])
if test "$HaveLibGmp" = "NO"
then
AC_CHECK_LIB([gmp3], [__gmpz_fdiv_qr],
[HaveLibGmp=YES; GMP_LIBS=gmp3])
fi
fi
])
dnl--------------------------------------------------------------------
dnl * Mac OS X only: check for GMP.framework
dnl--------------------------------------------------------------------
AC_DEFUN([LOOK_FOR_GMP_FRAMEWORK],[
if test "$HaveLibGmp" = "NO"
then
case $target_os in
darwin*)
AC_MSG_CHECKING([for GMP.framework])
save_libs="$LIBS"
LIBS="-framework GMP"
AC_TRY_LINK_FUNC(__gmpz_fdiv_qr,
[HaveFrameworkGMP=YES; GMP_FRAMEWORK=GMP])
LIBS="$save_libs"
AC_MSG_RESULT([$HaveFrameworkGMP])
;;
esac
fi
])
|