summaryrefslogtreecommitdiffstats
path: root/config/linux-gnulibc1
diff options
context:
space:
mode:
Diffstat (limited to 'config/linux-gnulibc1')
-rw-r--r--config/linux-gnulibc136
1 files changed, 31 insertions, 5 deletions
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index ce07853..a02b08a 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -7,7 +7,7 @@
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
@@ -42,6 +42,9 @@ fi
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
+# Figure out Clang C compiler flags
+. $srcdir/config/clang-flags
+
# Use default Fortran 90 compiler according to what C compiler is used.
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
@@ -49,7 +52,7 @@ if test "X-" = "X-$FC"; then
FC=gfortran
FC_BASENAME=gfortran
;;
- pgcc*)
+ pgcc*)
FC=pgf90
FC_BASENAME=pgf90
;;
@@ -61,6 +64,11 @@ if test "X-" = "X-$FC"; then
FC=mpif90
FC_BASENAME=mpif90
;;
+ clang*)
+ # clang has no fortran compiler. Use gfortran.
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
esac
else
case $FC in
@@ -98,12 +106,14 @@ else
echo "compiler '$FC' is $fc_version_info"
$RM $tmpfile
;;
-
*)
;;
esac
fi
+# Figure out GNU FC compiler flags
+. $srcdir/config/gnu-fflags
+
# Figure out PGI FC compiler flags
. $srcdir/config/pgi-fflags
@@ -119,10 +129,10 @@ case $FC_BASENAME in
#
f95)
# Set required flag for compiling C stubs
- H5_CFLAGS="$H5_CFLAGS"
+ H5_CFLAGS="$H5_CFLAGS"
F9XSUFFIXFLAG=""
-# We force compiler to use upper case for external names
+# We force compiler to use upper case for external names
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS"
FSEARCH_DIRS=""
@@ -173,6 +183,12 @@ if test -z "$CXX"; then
CXX_BASENAME=g++
fi
+# Figure out GNU CXX compiler flags
+. $srcdir/config/gnu-cxxflags
+
+# Figure out Clang CXX compiler flags
+. $srcdir/config/clang-cxxflags
+
# compiler version strings
# check if the compiler_version_info is already set
@@ -202,6 +218,11 @@ case $CC in
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;
+ *clang*)
+ cc_version_info="`$CC $CFLAGS $H5_CFLAGS --version 2>&1 |\
+ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
+ ;;
+
*)
echo "No match to get cc_version_info for $CC"
;;
@@ -296,6 +317,11 @@ case $CXX in
cxx_version_info=`echo $cxx_version_info`
;;
+ *clang++*)
+ cxx_version_info="`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
+ grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
+ ;;
+
*)
echo "No match to get cxx_version_info for $CXX"
;;