summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-13 01:18:54 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-13 01:18:54 +0000
commitb9f271018cf10be6bcb99b9d2a9c3da236131151 (patch)
tree7d4f755bc542715a6df454881a68952829eac488 /configure.in
parent73e28ccf0a5af92d0bbde32cc88f399f9eb354fa (diff)
downloadmpfr-b9f271018cf10be6bcb99b9d2a9c3da236131151.tar.gz
Misc changes. Use of AC_CACHE_CHECK.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1866 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in45
1 files changed, 37 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index b9349a87d..ebb4213eb 100644
--- a/configure.in
+++ b/configure.in
@@ -30,14 +30,10 @@ case $OS_TYPE in
;;
SunOS*)
MISCFLAGS="trunc.c"
- LM9X="-lm9x"
AC_CHECK_LIB(m, main)
;;
Linux*)
AC_CHECK_LIB(m, main)
- if [[ "$MACHTYPE" = "alpha" ]]; then
- CFLAGS="$CFLAGS -mfp-rounding-mode=d -mieee-with-inexact"
- fi
;;
IRIX64)
AC_CHECK_LIB(m, main)
@@ -49,10 +45,6 @@ case $OS_TYPE in
;;
OSF*)
AC_CHECK_LIB(m, main)
- CFLAGS="$CFLAGS -mfp-rounding-mode=d -mieee-with-inexact"
- if test -n "$GCC"; then
- CFLAGS="$CFLAGS -ffloat-store"
- fi
AC_DEFINE(__STDC__)
;;
*)
@@ -60,6 +52,43 @@ case $OS_TYPE in
;;
esac
+dnl Tests concerning the include directories.
+AC_MSG_CHECKING(for gmp files)
+if test -d "$with_gmp_include"; then
+ CPPFLAGS="$CPPFLAGS -I$with_gmp_include"
+else
+ with_gmp_include=
+fi
+AC_TRY_COMPILE([
+#include "gmp.h"
+#include "gmp-impl.h"
+#include "longlong.h"
+], , AC_MSG_RESULT(yes),
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([gmp.h or gmp-impl.h or config.h or gmp-mparam.h or
+longlong.h may be missing ${with_gmp_include:+in $with_gmp_include}])]
+)
+
+dnl Check for valid BITS_PER_MP_LIMB and BYTES_PER_MP_LIMB
+AC_MSG_CHECKING(for valid BITS_PER_MP_LIMB and BYTES_PER_MP_LIMB)
+AC_TRY_RUN([
+#include <limits.h>
+#include "gmp.h"
+#include "gmp-impl.h"
+int main()
+{
+ return BITS_PER_MP_LIMB == BYTES_PER_MP_LIMB * CHAR_BIT
+ && sizeof(mp_limb_t) == BYTES_PER_MP_LIMB ? 0 : 1;
+}
+], AC_MSG_RESULT(yes),
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR([BITS_PER_MP_LIMB and/or BYTES_PER_MP_LIMB are incorrect.
+You probably need to change some of the GMP or MPFR compile options:
+MPFR doesn't currently do as many architecture checks as GMP, so the
+default target architecture may be different, hence the error.])],
+ AC_MSG_RESULT([can't test])
+)
+
MPFR_CONFIGS
AC_MY_LIBS($with_gmp_lib, gmp)