18 |
|
|
19 |
# serial 6 |
# serial 6 |
20 |
|
|
21 |
m4_define([_AC_LIB_GMP], |
m4_define([_M4_AC_LIB_GMP], |
22 |
[AC_ARG_WITH(gmp, |
[AC_ARG_WITH(gmp, |
23 |
[ --without-gmp don't use GNU multiple precision arithmetic library], |
[ --without-gmp don't use GNU multiple precision arithmetic library], |
24 |
[use_gmp=$withval], [use_gmp=yes]) |
[use_gmp=$withval], [use_gmp=yes]) |
40 |
ac_cv_using_lib_gmp=no |
ac_cv_using_lib_gmp=no |
41 |
;; |
;; |
42 |
esac |
esac |
43 |
])# _AC_LIB_GMP |
])# _M4_AC_LIB_GMP |
44 |
|
|
45 |
|
|
46 |
AC_DEFUN([AC_LIB_GMP], |
AC_DEFUN([M4_AC_LIB_GMP], |
47 |
[AC_CHECK_HEADERS([gmp.h]) |
[AC_PREREQ(2.56)dnl We use the new compiler based header checking in 2.56 |
48 |
|
AC_CHECK_HEADERS([gmp.h], [], [], $ac_default_headers) |
49 |
# Some versions of gmp provide mpq_init as a macro, so we need to |
# Some versions of gmp provide mpq_init as a macro, so we need to |
50 |
# include the header file, otherwise the detection will fail. |
# include the header file, otherwise the detection will fail. |
51 |
ac_gmp_save_LIBS="$LIBS" |
ac_gmp_save_LIBS="$LIBS" |
60 |
|
|
61 |
AC_CACHE_CHECK([if using GNU multiple precision arithmetic library], |
AC_CACHE_CHECK([if using GNU multiple precision arithmetic library], |
62 |
[ac_cv_using_lib_gmp], |
[ac_cv_using_lib_gmp], |
63 |
[_AC_LIB_GMP]) |
[_M4_AC_LIB_GMP]) |
64 |
|
|
65 |
# Don't try to link in libgmp if we are not using it after the last call |
# Don't try to link in libgmp if we are not using it after the last call |
66 |
if test "$ac_cv_using_lib_gmp" = yes; then |
if test "$ac_cv_using_lib_gmp" = yes; then |
69 |
fi |
fi |
70 |
|
|
71 |
AC_SUBST([USE_GMP], [$ac_cv_using_lib_gmp]) |
AC_SUBST([USE_GMP], [$ac_cv_using_lib_gmp]) |
72 |
])# AC_LIB_GMP |
])# M4_AC_LIB_GMP |