summaryrefslogtreecommitdiffstats
path: root/config/linux-gnulibc1
blob: 6165cb5d33cd8dc018038eb84204813c64e506b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#							-*- shell-script -*-
#
# This file is part of the HDF5 build script.  It is processed shortly
# after configure starts and defines, among other things, flags for
# the various compile modes.
#
# See BlankForm in this directory for details.

# The default compiler is `gcc'.
if test -z "$CC"; then
   CC=gcc
   CC_BASENAME=gcc
fi

# Figure out GNU C compiler flags
. $srcdir/config/gnu-flags

# Figure out PGI C compiler flags
. $srcdir/config/pgi-flags

# Figure out Intel C compiler flags
. $srcdir/config/intel-flags

# We know that for mpich 1.2.5 and previous version, complicated derived datatype is
# supported, we need to set the macro to hdf5_mpi_complex_derived_datatype_works to no.                  
# Notice that this fix will only work if the compiler name is mpicc and mpi package is                   
# mpich 1.x.x.  
echo "Debug: CC_BASENAME=" $CC_BASENAME

if [ -z "$hdf5_mpi_complex_derived_datatype_works" -a \( $CC_BASENAME = mpicc -o $CC_BASENAME = mpiicc \) ]; then
   ccversion=`$CC -v 2>&1 | sed -e 's/.*for //p'`
   ccversion1=`echo $ccversion | cut -f1 -d.`
   ccversion2=`echo $ccversion | cut -f2 -d.`
   ccversiontemp=`echo $ccversion | cut -f3 -d.`
   ccversion3=`echo $ccversiontemp | cut -c1`
   ccversionval=`expr $ccversion1 \* 100 + $ccversion2 \* 10 + $ccversion3`
   if [ $ccversionval -lt 126 ]; then
      hdf5_mpi_complex_derived_datatype_works='no'
  fi
fi