diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/H5pubconf.h.in | 47 | ||||
-rw-r--r-- | config/cmake_ext_mod/ConfigureChecks.cmake | 35 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFTests.c | 8 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFUseCXX.cmake | 11 | ||||
-rw-r--r-- | config/commence.am | 2 | ||||
-rw-r--r-- | config/gnu-cxxflags | 7 | ||||
-rw-r--r-- | config/intel-cxxflags | 4 | ||||
-rw-r--r-- | config/intel-flags | 3 |
8 files changed, 89 insertions, 28 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index f677131..e163d3a 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -35,10 +35,6 @@ /* Define if dev_t is a scalar */ #cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@ -/* Define if your system is IBM ppc64le and cannot convert some long double - values correctly. */ -#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@ - /* Define to dummy `main' function (if any) required to link to the Fortran libraries. */ #cmakedefine H5_FC_DUMMY_MAIN @H5_FC_DUMMY_MAIN@ @@ -115,7 +111,7 @@ #cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@ /* Define to 1 if you have the <curl/curl.h> header file. */ -#cmakedefine H5_HAVE_CURL_CURL_H @H5_HAVE_CURL_H@ +#cmakedefine H5_HAVE_CURL_H @H5_HAVE_CURL_H@ /* Define if Darwin or Mac OS X */ #cmakedefine H5_HAVE_DARWIN @H5_HAVE_DARWIN@ @@ -202,9 +198,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@ @@ -356,12 +358,21 @@ /* Define to 1 if you have the `stat64' function. */ #cmakedefine H5_HAVE_STAT64 @H5_HAVE_STAT64@ -/* Define if struct stat has the st_blocks field */ +/* 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@ @@ -457,6 +468,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@ @@ -494,6 +508,9 @@ with special algorithm. */ #cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@ +/* Define if your system is power6 and cannot convert some long double values. */ +#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@ + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@ @@ -699,6 +716,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@ @@ -709,21 +729,18 @@ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #cmakedefine H5_TIME_WITH_SYS_TIME @H5_TIME_WITH_SYS_TIME@ -/* Define using v1.10 public API symbols by default */ -#cmakedefine H5_USE_110_API_DEFAULT @H5_USE_110_API_DEFAULT@ - -/* Define using v1.12 public API symbols by default */ -#cmakedefine H5_USE_112_API_DEFAULT @H5_USE_112_API_DEFAULT@ - -/* Define using v1.14 public API symbols by default */ -#cmakedefine H5_USE_114_API_DEFAULT @H5_USE_114_API_DEFAULT@ - /* Define using v1.6 public API symbols by default */ #cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@ /* Define using v1.8 public API symbols by default */ #cmakedefine H5_USE_18_API_DEFAULT @H5_USE_18_API_DEFAULT@ +/* Define using v1.10 public API symbols by default */ +#cmakedefine H5_USE_110_API_DEFAULT @H5_USE_110_API_DEFAULT@ + +/* Define using v1.12 public API symbols by default */ +#cmakedefine H5_USE_112_API_DEFAULT @H5_USE_112_API_DEFAULT@ + /* Define if the library will use file locking */ #cmakedefine H5_USE_FILE_LOCKING @H5_USE_FILE_LOCKING@ diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 9e704fb..004aded 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 () @@ -119,8 +120,23 @@ 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) +# 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) @@ -130,9 +146,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 @@ -219,6 +238,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 #----------------------------------------------------------------------------- @@ -392,9 +416,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) #----------------------------------------------------------------------------- @@ -532,6 +560,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 0c3b7b7..2d7e1b4 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -88,6 +88,14 @@ int main(void) } #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 diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake index 423f74a..580c409 100644 --- a/config/cmake_ext_mod/HDFUseCXX.cmake +++ b/config/cmake_ext_mod/HDFUseCXX.cmake @@ -32,6 +32,17 @@ endif () include (CheckIncludeFileCXX) include (TestForSTDNamespace) +# IF the c compiler found stdint, check the C++ as well. On some systems this +# file will be found by C but not C++, only do this test IF the C++ compiler +# has been initialized (e.g. the project also includes some c++) +if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) + CHECK_INCLUDE_FILE_CXX ("stdint.h" ${HDF_PREFIX}_HAVE_STDINT_H_CXX) + if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX) + set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H") + set (USE_INCLUDES ${USE_INCLUDES} "stdint.h") + endif () +endif () + # For other CXX specific tests, use this MACRO. macro (HDF_CXX_FUNCTION_TEST OTHER_TEST) if (NOT DEFINED ${OTHER_TEST}) diff --git a/config/commence.am b/config/commence.am index 3fddc6a..96c2fc2 100644 --- a/config/commence.am +++ b/config/commence.am @@ -45,7 +45,7 @@ LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la docdir = $(exec_prefix)/doc # Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below -# has been removed. According to the official description of DESTDIR by GNU at +# has been removed. According to the official description of DESTDIR by Gnu at # http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is # prepended to the normal and complete install path that it precedes for the # purpose of installing in a temporary directory which is useful for building diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags index 9dbc2b9..b2ba08d 100644 --- a/config/gnu-cxxflags +++ b/config/gnu-cxxflags @@ -268,13 +268,10 @@ if test "X-g++" = "X-$cxx_vendor"; then fi # gcc >= 9.3 - if test $cc_vers_major -ge 10 -o $cc_vers_major -eq 9 -a $cc_vers_minor -ge 3; then - # do not use C warnings, $(load_gnu_arguments 9.3), no cxx warnings - # H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-9.3)" - fi + # no cxx warnings, do NOT use C warnings # gcc >= 10 - if test $cc_vers_major -ge 10; then + if test $cxx_vers_major -ge 10; then # Use the C warnings as CXX warnings are the same DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)" fi diff --git a/config/intel-cxxflags b/config/intel-cxxflags index 3de51b5..484100f 100644 --- a/config/intel-cxxflags +++ b/config/intel-cxxflags @@ -122,19 +122,19 @@ if test "X-icpc" = "X-$cxx_vendor"; then # Warnings # ############ -# First load the C warnings then add CXX warnings (if needed) - ########### # General # ########### # Add various general warning flags in intel-warnings. + # Use the C warnings as CXX warnings are the same H5_CXXFLAGS="$H5_CXXFLAGS $(load_intel_arguments general)" ###################### # Developer warnings # ###################### + # Use the C warnings as CXX warnings are the same #NO_DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments no-developer-general) #DEVELOPER_WARNING_CXXFLAGS=$(load_intel_arguments developer-general) diff --git a/config/intel-flags b/config/intel-flags index 1c26632..f46da0a 100644 --- a/config/intel-flags +++ b/config/intel-flags @@ -88,7 +88,7 @@ if test "X-icc" = "X-$cc_vendor"; then ############## # Production # ############## - + PROD_CFLAGS= ######### @@ -179,4 +179,3 @@ if test "X-$cc_flags_set" = "X-"; then cc_vendor= cc_version= fi - |