summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m418
-rw-r--r--configure.ac4
-rw-r--r--m4/size_max.m47
-rw-r--r--tests/Makefile.am2
-rw-r--r--tune/Makefile.am2
5 files changed, 17 insertions, 16 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 154c94b9b..39e60fa6e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -120,7 +120,7 @@ alpha*-*-*)
mpfr_cv_ieee_switches="-fprm d -ieee_with_inexact"
fi
CFLAGS="$CFLAGS $mpfr_cv_ieee_switches"
- AC_TRY_COMPILE(,,, mpfr_cv_ieee_switches="none")
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], , mpfr_cv_ieee_switches="none")
])
if test "$mpfr_cv_ieee_switches" = "none"; then
CFLAGS="$saved_CFLAGS"
@@ -139,7 +139,7 @@ if test "$ac_cv_type_intmax_t" = yes; then
AC_CACHE_CHECK([for working INTMAX_MAX], mpfr_cv_have_intmax_max, [
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$srcdir/src"
- AC_TRY_COMPILE([#include "mpfr-intmax.h"], [intmax_t x = INTMAX_MAX;],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "mpfr-intmax.h"]], [[intmax_t x = INTMAX_MAX;]])],
mpfr_cv_have_intmax_max=yes, mpfr_cv_have_intmax_max=no)
CPPFLAGS="$saved_CPPFLAGS"
])
@@ -169,7 +169,7 @@ dnl Check for fesetround
AC_CACHE_CHECK([for fesetround], mpfr_cv_have_fesetround, [
saved_LIBS="$LIBS"
LIBS="$LIBS $MPFR_LIBM"
-AC_TRY_LINK([#include <fenv.h>], [fesetround(FE_TONEAREST);],
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <fenv.h>]], [[fesetround(FE_TONEAREST);]])],
mpfr_cv_have_fesetround=yes, mpfr_cv_have_fesetround=no)
LIBS="$saved_LIBS"
])
@@ -604,7 +604,7 @@ struct {
};
]
EOF
- mpfr_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AC_FD_CC 2>&1"
+ mpfr_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD 2>&1"
if AC_TRY_EVAL(mpfr_compile); then
cat >conftest.awk <<\EOF
[
@@ -864,8 +864,8 @@ EOF
mpfr_cv_c_long_double_format=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`
case $mpfr_cv_c_long_double_format in
unknown*)
- echo "cannot match anything, conftest.$OBJEXT contains" >&AC_FD_CC
- od -b conftest.$OBJEXT >&AC_FD_CC
+ echo "cannot match anything, conftest.$OBJEXT contains" >&AS_MESSAGE_LOG_FD
+ od -b conftest.$OBJEXT >&AS_MESSAGE_LOG_FD
;;
esac
else
@@ -978,7 +978,7 @@ dnl as a fallback.
AC_DEFUN([GMP_C_ATTRIBUTE_MODE],
[AC_CACHE_CHECK([whether gcc __attribute__ ((mode (XX))) works],
gmp_cv_c_attribute_mode,
-[AC_TRY_COMPILE([typedef int SItype __attribute__ ((mode (SI)));], ,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[typedef int SItype __attribute__ ((mode (SI)));]], [[]])],
gmp_cv_c_attribute_mode=yes, gmp_cv_c_attribute_mode=no)
])
if test $gmp_cv_c_attribute_mode = yes; then
@@ -1011,7 +1011,9 @@ $3
[AC_MSG_RESULT(yes)
$4],
[AC_MSG_RESULT(no)
- $5])
+ $5],
+ [AC_MSG_RESULT(cross-compiling, assuming yes)
+ $4])
])
diff --git a/configure.ac b/configure.ac
index 0cf906af3..c498ce763 100644
--- a/configure.ac
+++ b/configure.ac
@@ -372,7 +372,7 @@ dnl but it's "ar" format and cannot be used by the MS linker. There
dnl doesn't seem to be any GNU tool for generating or converting to .lib.
AC_SUBST(MPFR_LDFLAGS)
AC_SUBST(LIBMPFR_LDFLAGS)
-AC_LIBTOOL_WIN32_DLL
+LT_INIT(win32-dll)
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
AC_MSG_CHECKING(for DLL/static GMP)
@@ -402,8 +402,6 @@ error
fi
;;
esac
-dnl Finally set up LibTool
-AC_PROG_LIBTOOL
dnl
diff --git a/m4/size_max.m4 b/m4/size_max.m4
index e44618eec..aa16e1a12 100644
--- a/m4/size_max.m4
+++ b/m4/size_max.m4
@@ -1,11 +1,12 @@
# size_max.m4 serial 6
-dnl Copyright (C) 2003, 2005-2006, 2010 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2010, 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Change by Vincent Lefevre: added <inttypes.h> for consistency with MPFR
+dnl Update with autoupdate.
AC_DEFUN([gl_SIZE_MAX],
[
@@ -39,10 +40,10 @@ Found it
if test $fits_in_uint = 1; then
dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
- AC_TRY_COMPILE([#include <stddef.h>
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
extern size_t foo;
extern unsigned long foo;
- ], [], fits_in_uint=0)
+ ]], [[]])], fits_in_uint=0)
fi
dnl We cannot use 'expr' to simplify this expression, because 'expr'
dnl works only with 'long' integers in the host environment, while we
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3c618b2a2..40c051aa4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,7 +47,7 @@ EXTRA_DIST = tgeneric.c tgeneric_ui.c mpf_compat.h inp_str.dat tmul.dat \
mpfrtest.dat
LDADD = libfrtests.la $(MPFR_LIBM) $(top_builddir)/src/libmpfr.la
-INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
+AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src
# LOADLIBES (documented in the "GNU make" manual and equivalent to LDLIBS)
# enables to compile a program foo.c in the test directory by simply doing
diff --git a/tune/Makefile.am b/tune/Makefile.am
index 17cdd17ba..b0a8be194 100644
--- a/tune/Makefile.am
+++ b/tune/Makefile.am
@@ -23,7 +23,7 @@ bidimensional_sample_SOURCES = bidimensional_sample.c
bidimensional_sample_LDADD = -lspeed $(top_builddir)/src/libmpfr.la
bidimensional_sample_LDFLAGS = -static
-INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src
tune:
$(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)