From 6aabfca0b47baa8517a27532d65af12deb300ad1 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 21 Apr 2011 00:56:34 +0200 Subject: [PATCH] BUILD: Add checks for intptr_t / uintptr_t --- config.h.in | 14 ++++++++++++++ configure.ac | 13 ++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/config.h.in b/config.h.in index cb7cad0c2c..61b8be2e1d 100644 --- a/config.h.in +++ b/config.h.in @@ -63,6 +63,9 @@ /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV +/* Define to 1 if the system has the type `intptr_t'. */ +#undef HAVE_INTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -96,6 +99,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -154,3 +160,11 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const + +/* Define to the type of a signed integer type wide enough to hold a pointer, + if such a type exists, and if the system does not define it. */ +#undef intptr_t + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t diff --git a/configure.ac b/configure.ac index fb17b82aef..fababc2ccc 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,14 @@ if test "x$with_werror" = "xyes"; then WERROR="-Werror" fi +AC_C_CONST +AC_HEADER_STDC + +AC_C_BIGENDIAN() + +AC_TYPE_INTPTR_T +AC_TYPE_UINTPTR_T + AC_CHECK_LIB([m], [cos]) AC_CHECK_FUNCS([fabs]) AC_CHECK_FUNCS([fmin]) @@ -68,11 +76,6 @@ if test -n "$nozlib"; then AC_MSG_ERROR([zlib is required and could not be found]) fi -AC_C_CONST -AC_HEADER_STDC - -AC_C_BIGENDIAN() - AM_ICONV if test "x$am_cv_func_iconv" != "xyes"; then