summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-08-01 17:31:34 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-08-01 17:31:34 +0000
commit5a04370b9b4ee537b8888653d68c9f9d7b7cf705 (patch)
tree7a81b4da29afd19771ddf92e7b73b77ec2fc3473 /configure.ac
parent1f192f7e9ae94a7c31878f8c789433d8f0fad7ad (diff)
downloadmpc-5a04370b9b4ee537b8888653d68c9f9d7b7cf705.tar.gz
configure.ac: check for warning flags early on
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1021 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 7 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 7ae89e5..b325145 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,6 +111,9 @@ if test -z "$user_redefine_cc" ; then
MPC_GMP_CC_CFLAGS
fi
+# Check if compiler accepts warning flags and add them to CFLAGS
+MPC_C_CHECK_WARNINGCFLAGS
+
# Checks for header files.
AC_HEADER_STDC
@@ -123,6 +126,10 @@ AC_C_CONST
AC_TYPE_SIZE_T
# Checks for libraries.
+AC_CHECK_FUNCS([gettimeofday localeconv setlocale])
+AC_CHECK_FUNCS([dup dup2 fileno],,
+ [AC_DEFINE([NO_STREAM_REDIRECTION],1,[Do not check mpc_out_str on stdout])])
+
AC_CHECK_LIB([gmp], [__gmpz_init],
[LIBS="-lgmp $LIBS"],
[AC_MSG_ERROR([libgmp not found or uses a different ABI (including static vs shared).])])
@@ -198,8 +205,6 @@ case $host in
esac
-# Checks if compiler accepts warning flags.
-MPC_C_CHECK_WARNINGCFLAGS
# Checks for gcc version, result in GCC_VERSION inside config.log, for instance
AX_GCC_VERSION
@@ -207,13 +212,5 @@ AC_DEFINE_UNQUOTED([MPC_GCC], ["$GCC"], [Gcc yes or no])
AC_DEFINE_UNQUOTED([MPC_CC], ["$CC"], [C compiler])
AC_DEFINE_UNQUOTED([MPC_GCC_VERSION], ["$GCC_VERSION"], [Version of gcc])
-# Checks for library functions with warning flags.
-old_cflags=$CFLAGS
-CFLAGS="$CFLAGS $WARNINGCFLAGS"
-AC_CHECK_FUNCS([gettimeofday localeconv setlocale])
-AC_CHECK_FUNCS([dup dup2 fileno],,
- [AC_DEFINE([NO_STREAM_REDIRECTION],1,[Do not check mpc_out_str on stdout])])
-CFLAGS=$old_cflags
-
AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile doc/Makefile])
AC_OUTPUT