summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-08-24 13:31:15 (GMT)
committerGitHub <noreply@github.com>2021-08-24 13:31:15 (GMT)
commitf415d6f839f35d595b77483e0788e76c652b7520 (patch)
tree8930c72e3a76d3a32b6cedcaf00413dc7e80873b /config
parentdbcf2cc12ca422e8cc5a0a9fc7ec13221b514e58 (diff)
downloadhdf5-f415d6f839f35d595b77483e0788e76c652b7520.zip
hdf5-f415d6f839f35d595b77483e0788e76c652b7520.tar.gz
hdf5-f415d6f839f35d595b77483e0788e76c652b7520.tar.bz2
Normalizes 1.0 build files w/ 1.12 and develop (#957)
Diffstat (limited to 'config')
-rw-r--r--config/cmake/H5pubconf.h.in57
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake68
-rw-r--r--config/cmake_ext_mod/HDFTests.c33
3 files changed, 143 insertions, 15 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index a8c9596..2b98327 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -202,9 +202,15 @@
optimization operation */
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine H5_HAVE_INTTYPES_H @H5_HAVE_INTTYPES_H@
+
/* Define to 1 if you have the `ioctl' function. */
#cmakedefine H5_HAVE_IOCTL @H5_HAVE_IOCTL@
+/* Define to 1 if you have the <io.h> header file. */
+#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@
+
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#cmakedefine H5_HAVE_LIBCRYPTO @H5_HAVE_LIBCRYPTO@
@@ -241,6 +247,21 @@
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@
+/* Define to 1 if you have the `llround' function. */
+#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@
+
+/* Define to 1 if you have the `llroundf' function. */
+#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@
+
+/* Define to 1 if you have the `longjmp' function. */
+#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@
+
+/* Define to 1 if you have the `lround' function. */
+#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@
+
+/* Define to 1 if you have the `lroundf' function. */
+#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@
+
/* Define to 1 if you have the `lseek64' function. */
#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@
@@ -305,12 +326,27 @@
compiled */
#cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@
+/* Define to 1 if you have the `round' function. */
+#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
+
+/* Define to 1 if you have the `roundf' function. */
+#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
+
+/* Define to 1 if you have the `setjmp' function. */
+#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#cmakedefine H5_HAVE_SETJMP_H @H5_HAVE_SETJMP_H@
+
/* Define to 1 if you have the `setsysinfo' function. */
#cmakedefine H5_HAVE_SETSYSINFO @H5_HAVE_SETSYSINFO@
/* Define to 1 if you have the `siglongjmp' function. */
#cmakedefine H5_HAVE_SIGLONGJMP @H5_HAVE_SIGLONGJMP@
+/* Define to 1 if you have the `signal' function. */
+#cmakedefine H5_HAVE_SIGNAL @H5_HAVE_SIGNAL@
+
/* Define to 1 if you have the `sigprocmask' function. */
#cmakedefine H5_HAVE_SIGPROCMASK @H5_HAVE_SIGPROCMASK@
@@ -329,6 +365,18 @@
/* Define if struct stat has the st_blocks field */
#cmakedefine H5_HAVE_STAT_ST_BLOCKS @H5_HAVE_STAT_ST_BLOCKS@
+/* Define to 1 if you have the <stdbool.h> header file. */
+#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#cmakedefine H5_HAVE_STDDEF_H @H5_HAVE_STDDEF_H@
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine H5_HAVE_STDINT_H @H5_HAVE_STDINT_H@
+
+/* Define to 1 if you have the <stdint.h> header file for Cplusplus. */
+#cmakedefine H5_HAVE_STDINT_H_CXX @H5_HAVE_STDINT_H_CXX@
+
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine H5_HAVE_STDLIB_H @H5_HAVE_STDLIB_H@
@@ -356,6 +404,9 @@
/* Define to 1 if you have the `symlink' function. */
#cmakedefine H5_HAVE_SYMLINK @H5_HAVE_SYMLINK@
+/* Define to 1 if you have the `system' function. */
+#cmakedefine H5_HAVE_SYSTEM @H5_HAVE_SYSTEM@
+
/* Define to 1 if you have the <sys/file.h> header file. */
#cmakedefine H5_HAVE_SYS_FILE_H @H5_HAVE_SYS_FILE_H@
@@ -421,6 +472,9 @@
/* Define if your system has window style path name. */
#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@
+/* Define to 1 if you have the <winsock2.h> header file. */
+#cmakedefine H5_HAVE_WINSOCK2_H @H5_HAVE_WINSOCK2_H@
+
/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine H5_HAVE_ZLIB_H @H5_HAVE_ZLIB_H@
@@ -663,6 +717,9 @@
/* The size of `__int64', as computed by sizeof. */
#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
+/* Define to 1 if you have the ANSI C header files. */
+#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@
+
/* Define if strict file format checks are enabled */
#cmakedefine H5_STRICT_FORMAT_CHECKS @H5_STRICT_FORMAT_CHECKS@
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 8244a8d..45b62ea 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -53,6 +53,7 @@ if (MINGW)
set (${HDF_PREFIX}_HAVE_MINGW 1)
set (WINDOWS 1) # MinGW tries to imitate Windows
set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
+ set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
set (__USE_MINGW_ANSI_STDIO 1)
endif ()
@@ -71,6 +72,8 @@ if (WINDOWS)
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (${HDF_PREFIX}_HAVE_LIBM 1)
set (${HDF_PREFIX}_HAVE_STRDUP 1)
+ set (${HDF_PREFIX}_HAVE_SYSTEM 1)
+ set (${HDF_PREFIX}_HAVE_LONGJMP 1)
if (NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
set (${HDF_PREFIX}_HAVE_FUNCTION 1)
@@ -115,8 +118,26 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" ${HDF_PREFIX}_HAVE_SETJMP_H)
+CHECK_INCLUDE_FILE_CONCAT ("stddef.h" ${HDF_PREFIX}_HAVE_STDDEF_H)
+CHECK_INCLUDE_FILE_CONCAT ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H)
CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
CHECK_INCLUDE_FILE_CONCAT ("pwd.h" ${HDF_PREFIX}_HAVE_PWD_H)
+
+# Windows
+CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
+if (NOT CYGWIN)
+ CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
+endif ()
+
+if (CMAKE_SYSTEM_NAME MATCHES "OSF")
+ CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
+ CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
+else ()
+ set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
+ set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
+endif ()
+
CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
@@ -126,9 +147,12 @@ CHECK_INCLUDE_FILE_CONCAT ("strings.h" ${HDF_PREFIX}_HAVE_STRINGS_H)
CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" ${HDF_PREFIX}_HAVE_STDLIB_H)
CHECK_INCLUDE_FILE_CONCAT ("memory.h" ${HDF_PREFIX}_HAVE_MEMORY_H)
CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" ${HDF_PREFIX}_HAVE_INTTYPES_H)
CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H)
CHECK_INCLUDE_FILE_CONCAT ("netdb.h" ${HDF_PREFIX}_HAVE_NETDB_H)
CHECK_INCLUDE_FILE_CONCAT ("arpa/inet.h" ${HDF_PREFIX}_HAVE_ARPA_INET_H)
+# _Bool type support
+CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
## Check for non-standard extenstion quadmath.h
@@ -215,6 +239,11 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
endmacro ()
#-----------------------------------------------------------------------------
+# Check for these functions before the time headers are checked
+#-----------------------------------------------------------------------------
+HDF_FUNCTION_TEST (STDC_HEADERS)
+
+#-----------------------------------------------------------------------------
# Check for large file support
#-----------------------------------------------------------------------------
@@ -366,15 +395,13 @@ HDF_CHECK_TYPE_SIZE (uint_least64_t ${HDF_PREFIX}_SIZEOF_UINT_LEAST64_T)
HDF_CHECK_TYPE_SIZE (int_fast64_t ${HDF_PREFIX}_SIZEOF_INT_FAST64_T)
HDF_CHECK_TYPE_SIZE (uint_fast64_t ${HDF_PREFIX}_SIZEOF_UINT_FAST64_T)
-if (NOT APPLE)
- HDF_CHECK_TYPE_SIZE (size_t ${HDF_PREFIX}_SIZEOF_SIZE_T)
- HDF_CHECK_TYPE_SIZE (ssize_t ${HDF_PREFIX}_SIZEOF_SSIZE_T)
- if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
- set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
- endif ()
- if (MINGW OR NOT WINDOWS)
- HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
- endif ()
+HDF_CHECK_TYPE_SIZE (size_t ${HDF_PREFIX}_SIZEOF_SIZE_T)
+HDF_CHECK_TYPE_SIZE (ssize_t ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+ set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
+endif ()
+if (MINGW OR NOT WINDOWS)
+ HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
endif ()
HDF_CHECK_TYPE_SIZE (off_t ${HDF_PREFIX}_SIZEOF_OFF_T)
@@ -388,9 +415,13 @@ HDF_CHECK_TYPE_SIZE (time_t ${HDF_PREFIX}_SIZEOF_TIME_T)
# Extra C99 types
#-----------------------------------------------------------------------------
-# Size of bool
-set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
-HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
+# _Bool type support
+if (HAVE_STDBOOL_H)
+ set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
+ HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL)
+else ()
+ HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
+endif ()
if (MINGW OR NOT WINDOWS)
#-----------------------------------------------------------------------------
@@ -482,6 +513,9 @@ CHECK_FUNCTION_EXISTS (round ${HDF_PREFIX}_HAVE_ROUND)
CHECK_FUNCTION_EXISTS (roundf ${HDF_PREFIX}_HAVE_ROUNDF)
CHECK_FUNCTION_EXISTS (setsysinfo ${HDF_PREFIX}_HAVE_SETSYSINFO)
+CHECK_FUNCTION_EXISTS (signal ${HDF_PREFIX}_HAVE_SIGNAL)
+CHECK_FUNCTION_EXISTS (longjmp ${HDF_PREFIX}_HAVE_LONGJMP)
+CHECK_FUNCTION_EXISTS (setjmp ${HDF_PREFIX}_HAVE_SETJMP)
CHECK_FUNCTION_EXISTS (siglongjmp ${HDF_PREFIX}_HAVE_SIGLONGJMP)
CHECK_FUNCTION_EXISTS (sigsetjmp ${HDF_PREFIX}_HAVE_SIGSETJMP)
CHECK_FUNCTION_EXISTS (sigprocmask ${HDF_PREFIX}_HAVE_SIGPROCMASK)
@@ -492,6 +526,7 @@ CHECK_FUNCTION_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP)
CHECK_FUNCTION_EXISTS (strtoll ${HDF_PREFIX}_HAVE_STRTOLL)
CHECK_FUNCTION_EXISTS (strtoull ${HDF_PREFIX}_HAVE_STRTOULL)
CHECK_FUNCTION_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK)
+CHECK_FUNCTION_EXISTS (system ${HDF_PREFIX}_HAVE_SYSTEM)
CHECK_FUNCTION_EXISTS (tmpfile ${HDF_PREFIX}_HAVE_TMPFILE)
CHECK_FUNCTION_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF)
@@ -509,9 +544,11 @@ endif ()
# sigsetjmp is special; may actually be a macro
#-----------------------------------------------------------------------------
if (NOT ${HDF_PREFIX}_HAVE_SIGSETJMP)
- CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" ${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
- if (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
- set (${HDF_PREFIX}_HAVE_SIGSETJMP 1)
+ if (${HDF_PREFIX}_HAVE_SETJMP_H)
+ CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" ${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
+ if (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
+ set (${HDF_PREFIX}_HAVE_SIGSETJMP 1)
+ endif ()
endif ()
endif ()
@@ -522,6 +559,7 @@ if (MINGW OR NOT WINDOWS)
foreach (other_test
HAVE_ATTRIBUTE
HAVE_C99_FUNC
+# STDC_HEADERS
HAVE_FUNCTION
HAVE_C99_DESIGNATED_INITIALIZER
SYSTEM_SCOPE_THREADS
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index b8a6af1..2d7e1b4 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -64,6 +64,39 @@ main ()
#endif
+#ifdef VSNPRINTF_WORKS
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+int test_vsnprintf(const char *fmt,...)
+{
+ va_list ap;
+ char *s = malloc(16);
+ int ret;
+
+ va_start(ap, fmt);
+ ret=vsnprintf(s,16,"%s",ap);
+ va_end(ap);
+
+ return(ret!=42 ? 1 : 0);
+}
+
+int main(void)
+{
+ return(test_vsnprintf("%s","A string that is longer than 16 characters"));
+}
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+int main() { return 0; }
+#endif /* STDC_HEADERS */
+
+
#ifdef HAVE_ATTRIBUTE
#if 0