diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index c3c2c5b..b5a8c78 100644 --- a/configure.ac +++ b/configure.ac @@ -1252,6 +1252,8 @@ AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h]) AC_CHECK_HEADERS([sys/socket.h sys/types.h sys/file.h]) AC_CHECK_HEADERS([stddef.h setjmp.h features.h]) AC_CHECK_HEADERS([dirent.h]) +AC_CHECK_HEADERS([stdint.h], [C9x=yes]) +AC_CHECK_HEADERS([stdbool.h]) AC_CHECK_HEADERS([netdb.h netinet/in.h arpa/inet.h]) ## Darwin @@ -1267,15 +1269,15 @@ esac ## Windows case "`uname`" in CYGWIN*) - AC_CHECK_HEADERS([sys/timeb.h]) + AC_CHECK_HEADERS([io.h sys/timeb.h]) UNAME_CYGWIN="yes" ;; MINGW*) - AC_CHECK_HEADERS([winsock2.h sys/timeb.h]) + AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) AC_HAVE_LIBRARY([ws2_32]) ;; *) - AC_CHECK_HEADERS([winsock2.h sys/timeb.h]) + AC_CHECK_HEADERS([io.h winsock2.h sys/timeb.h]) ;; esac @@ -1366,6 +1368,17 @@ CFLAGS="$H5_CFLAGS $AM_CFLAGS $CFLAGS" ## Checkpoint the cache AC_CACHE_SAVE +## Posix.1g types (C9x) +cat >>confdefs.h <<\EOF +#include <sys/types.h> +EOF + +if test "X$C9x" = "Xyes"; then + cat >>confdefs.h <<\EOF +#include <stdint.h> +EOF +fi + AC_CHECK_SIZEOF( [int8_t]) AC_CHECK_SIZEOF( [uint8_t]) AC_CHECK_SIZEOF( [int_least8_t]) @@ -1394,12 +1407,34 @@ AC_CHECK_SIZEOF([uint_least64_t]) AC_CHECK_SIZEOF( [int_fast64_t]) AC_CHECK_SIZEOF( [uint_fast64_t]) -AC_CHECK_SIZEOF([bool], [], [#include <stdbool.h>]) -AC_CHECK_SIZEOF([off_t]) -AC_CHECK_SIZEOF([ptrdiff_t]) AC_CHECK_SIZEOF([size_t]) AC_CHECK_SIZEOF([ssize_t]) -AC_CHECK_SIZEOF([time_t], [], [#include <time.h>]) +AC_CHECK_SIZEOF([ptrdiff_t]) + +cat >>confdefs.h <<\EOF +#include <sys/types.h> /*for off_t definition*/ +EOF +AC_CHECK_SIZEOF([off_t]) + +if test "X$C9x" = "Xyes"; then + cat >>confdefs.h <<\EOF +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> /* for bool definition */ +#else +#define bool _Bool +#endif +EOF +AC_CHECK_SIZEOF([bool]) +fi + +AC_CHECK_SIZEOF(time_t, [], [ +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_TIME_H +#include <time.h> +#endif +]) ## Checkpoint the cache AC_CACHE_SAVE @@ -1909,8 +1944,10 @@ if test "X$THREADSAFE" = "Xyes"; then AC_CACHE_VAL([hdf5_cv_system_scope_threads], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([ + #if STDC_HEADERS #include <stdlib.h> #include <pthread.h> + #endif ],[ pthread_attr_t attribute; int ret; |