diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/apple | 48 | ||||
-rw-r--r--[-rwxr-xr-x] | config/cmake/CTestCustom.cmake | 0 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 2 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | config/cmake/cacheinit.cmake | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | config/cmake/mccacheinit.cmake | 0 | ||||
-rw-r--r-- | config/gnu-flags | 83 | ||||
-rw-r--r-- | config/lt_vers.am | 2 |
8 files changed, 130 insertions, 11 deletions
diff --git a/config/apple b/config/apple index c5c0a19..ac93ea5 100644 --- a/config/apple +++ b/config/apple @@ -20,17 +20,25 @@ # # See BlankForm in this directory for details. -# The default compiler is `gcc' +# The default compiler is `clang'. +# No support for OS older than darwin 10.X. if test "X-" = "X-$CC"; then - CC=gcc - CC_BASENAME=gcc + case "$host_os" in + darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available. + CC=gcc + CC_BASENAME=gcc + ;; + *) + CC=clang + CC_BASENAME=clang + ;; + esac fi # Figure out compiler flags . $srcdir/config/gnu-flags # temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not # use -O option as it causes failures in test/dt_arith. -#echo host_os=$host_os case "$host_os" in darwin1[12].*) # lion & mountain lion #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version @@ -48,6 +56,11 @@ esac . $srcdir/config/intel-flags if test "X-" = "X-$FC"; then case $CC_BASENAME in + clang) + # clang has no fortran compiler. Use gfortran. + FC=gfortran + FC_BASENAME=gfortran + ;; gcc*) FC=gfortran FC_BASENAME=gfortran @@ -59,8 +72,30 @@ if test "X-" = "X-$FC"; then esac fi +if test "X-" = "X-$CXX"; then + case $CC_BASENAME in + clang) + CXX=clang++ + CXX_BASENAME=clang++ + ;; + gcc) + CXX=g++ + CXX_BASENAME=g++ + ;; + icc) + CXX=icpc + CXX_BASENAME=icpc + ;; + esac +fi + # compiler version strings case $CC in + clang) + cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\ + grep 'Apple' | sed 's/(.*//'` + ;; + *gcc*) cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\ grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` @@ -97,6 +132,11 @@ esac # get c++ version info case $CXX in + clang++) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ + grep 'Apple' | sed 's/(.*//'` + ;; + *g++*) cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index ec7b10e..ec7b10e 100755..100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 6db6d78..b2078e2 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -205,6 +205,7 @@ ENDIF (CYGWIN) #----------------------------------------------------------------------------- IF (NOT WINDOWS) CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM) + CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL) CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32) CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32) ENDIF (NOT WINDOWS) @@ -367,6 +368,7 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H) CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H) CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H) +CHECK_INCLUDE_FILE_CONCAT ("dirent.h" H5_HAVE_DIRENT_H) CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H) # IF the c compiler found stdint, check the C++ as well. On some systems this diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index d9f0997..2736daf 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -124,6 +124,9 @@ /* Define if the direct I/O virtual file driver should be compiled */ #cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@ +/* Define to 1 if you have the <dirent.h> header file. */ +#cmakedefine H5_HAVE_DIRENT_H @H5_HAVE_DIRENT_H@ + /* Define to 1 if you have the <dlfcn.h> header file. */ #cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@ @@ -230,6 +233,9 @@ /* 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 `dl' library (-ldl). */ +#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@ + /* Define to 1 if you have the `dmalloc' library (-ldmalloc). */ #cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@ diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index d45ef9e..d45ef9e 100755..100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake index 8ca3879..8ca3879 100755..100644 --- a/config/cmake/mccacheinit.cmake +++ b/config/cmake/mccacheinit.cmake diff --git a/config/gnu-flags b/config/gnu-flags index 40aa1da..a79cc72 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -186,10 +186,10 @@ esac # the information from the previous version and adding modifications to that. case "$cc_vendor-$cc_version" in -# Closer to the gcc 4.8 release, we should check for additional flags to +# Closer to the gcc 4.9 release, we should check for additional flags to # include and break it out into it's own section, like the other versions # below. -QAK - gcc-4.[78]*) + gcc-4.[89]*) # Replace -ansi flag with -std=c99 flag H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`" @@ -252,7 +252,81 @@ case "$cc_vendor-$cc_version" in H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines" # Append more extra warning flags that only gcc 4.7+ know about - H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance" + H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" + + # Append more extra warning flags that only gcc 4.8+ know about + H5_CFLAGS="$H5_CFLAGS -Wsuggest-attribute=format" + + # Try out the new "stack protector" feature in gcc 4.1 + # (Strictly speaking this isn't really a "warning" flag, so it's added to + # the debugging flags) + #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" + ;; + + gcc-4.7*) + # Replace -ansi flag with -std=c99 flag + H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`" + + # Append warning flags + # Don't use the '-Wtraditional' flag, we're way past having K&R C code + # H5_CFLAGS="$H5_CFLAGS -Wtraditional" + # Don't use the '-Wtraditional-conversion' flag, there's too many warnings + # from GCC's assert macro + # H5_CFLAGS="$H5_CFLAGS -Wtraditional-conversion" + + # Append warning flags from gcc-3* case + # (don't use -Wpadded flag for normal builds, many of the warnings its + # issuing can't be fixed and they are making it hard to detect other, + # more important warnings) + #H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute -Wpadded" + H5_CFLAGS="$H5_CFLAGS -Wfloat-equal -Wmissing-format-attribute" + + # Append warning flags from gcc-3.2* case + H5_CFLAGS="$H5_CFLAGS -Wmissing-noreturn -Wpacked -Wdisabled-optimization" + + # Enable more format checking flags, beyond the basic -Wformat included + # in -Wall + H5_CFLAGS="$H5_CFLAGS -Wformat=2" + + # The "unreachable code" warning appears to be reliable now... + # (this warning was removed in gcc 4.5+) + #H5_CFLAGS="$H5_CFLAGS -Wunreachable-code" + + # Append warning flags from gcc-3.3* case + H5_CFLAGS="$H5_CFLAGS -Wendif-labels" + + # Append warning flags from gcc-3.4* case + H5_CFLAGS="$H5_CFLAGS -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch" + + # Replace old -W flag with new -Wextra flag + H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-W\ /-Wextra\ /g'`" + + # Append more extra warning flags that only gcc4.0+ know about + H5_CFLAGS="$H5_CFLAGS -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros" + + # Append more extra warning flags that only gcc 4.1+ know about + H5_CFLAGS="$H5_CFLAGS -Wunsafe-loop-optimizations -Wc++-compat" + + # Append more extra warning flags that only gcc 4.2+ know about + H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" + + # Append more extra warning flags that only gcc 4.3+ know about + # + # Technically, variable-length arrays are part of the C99 standard, but + # we should approach them a bit cautiously... -QAK + H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2048 -Wvla" + + # Append more extra warning flags that only gcc 4.4+ know about + H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" + + # Append more extra warning flags that only gcc 4.5+ know about + H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants" + + # Append more extra warning flags that only gcc 4.6+ know about + H5_CFLAGS="$H5_CFLAGS -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines" + + # Append more extra warning flags that only gcc 4.7+ know about + H5_CFLAGS="$H5_CFLAGS -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn" # Try out the new "stack protector" feature in gcc 4.1 # (Strictly speaking this isn't really a "warning" flag, so it's added to @@ -260,9 +334,6 @@ case "$cc_vendor-$cc_version" in #DEBUG_CFLAGS="$DEBUG_CFLAGS -Wstack-protector -fstack-protector-all" ;; -# Closer to the gcc 4.7 release, we should check for additional flags to -# include and break it out into it's own section, like the other versions -# below. -QAK gcc-4.6*) # Replace -ansi flag with -std=c99 flag H5_CFLAGS="`echo $H5_CFLAGS | sed -e 's/-ansi/-std=c99/g'`" diff --git a/config/lt_vers.am b/config/lt_vers.am index 37b5b68..8df77f3 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 138 +LT_VERS_REVISION = 139 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and |