summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-07-13 12:13:04 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-07-13 12:13:04 +0000
commit3fe7c2612c5f6a3c5cb7b20f4b020ab52da6c598 (patch)
tree3e8bee7d77bd7883b289e82fced9764709768c37 /configure.ac
parentc10f39f9a49de2630a535cb56327b259563cb864 (diff)
downloadmpc-3fe7c2612c5f6a3c5cb7b20f4b020ab52da6c598.tar.gz
configure.ac, mpc.m4: to test for complex.h, always compile a test programme
closes bug #12829 git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1013 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 2 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 4aa8431..c382ed6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,32 +121,15 @@ esac
# Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS([complex.h locale.h inttypes.h stdint.h limits.h unistd.h sys/time.h])
+AC_CHECK_HEADERS([locale.h inttypes.h stdint.h limits.h unistd.h sys/time.h])
AC_HEADER_TIME
+MPC_COMPLEX_H
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for libraries.
-AC_CHECK_HEADERS(
- [complex.h],
- [
- AC_MSG_CHECKING(whether creal and cimag can be used without libm)
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <complex.h>]],
- [[complex double x = 1.0 + 2.0 * I; return (creal (x) + cimag (x));]]
- )],
- [AC_MSG_RESULT([yes])],
- [
- AC_MSG_RESULT([no])
- AC_CHECK_LIB([m], [creal])
- ]
- )
- ]
- )
-
AC_CHECK_LIB([gmp], [__gmpz_init],
[LIBS="-lgmp $LIBS"],
[AC_MSG_ERROR([libgmp not found or uses a different ABI.])])