Commit ed4d8af6 authored by gsell's avatar gsell

- patch from Mark revied and applied

- all "echo" calls removed by AC_MSG_XXX
- strict indention
parent e3f2584c
# Every configure script must call AC_INIT before doing anything else. # Every configure script must call AC_INIT before doing anything else.
# AC_INIT (package, version, [bug-report], [tarname]) # AC_INIT (package, version, [bug-report], [tarname])
AC_INIT([H5Part], [1.4.0], [h5part@lists.psi.ch], H5Part) AC_INIT([H5Part], [1.4.1], [h5part@lists.psi.ch], H5Part)
# Ensure that a recent enough version of Autoconf is being used. # Ensure that a recent enough version of Autoconf is being used.
...@@ -54,6 +54,13 @@ AC_ARG_WITH( ...@@ -54,6 +54,13 @@ AC_ARG_WITH(
[path to HDF5 installation [default=""]])], [path to HDF5 installation [default=""]])],
[HDF5PATH=$withval], [HDF5PATH=""]) [HDF5PATH=$withval], [HDF5PATH=""])
AC_ARG_WITH(
[mpiposix],
[AC_HELP_STRING([--with-mpiposix],
[enable MPI-POSIX VFD in HDF5 [default=no]])],
[USE_MPIPOSIX=$enableval])
############################################################################### ###############################################################################
################# A SIMPLE WORK AROUND TO USE ENV. VARS ####################### ################# A SIMPLE WORK AROUND TO USE ENV. VARS #######################
############################################################################### ###############################################################################
...@@ -85,35 +92,26 @@ SAVE_LDFLAGS=$LDFLAGS ...@@ -85,35 +92,26 @@ SAVE_LDFLAGS=$LDFLAGS
# @enddesc # @enddesc
#@@*/ #@@*/
PATH_Search() PATH_Search() {
{
eval $1="" eval $1=""
if test $# -lt 4 ; then if test $# -lt 4 ; then
h5part_basedir="" h5part_basedir=""
else else
h5part_basedir="$4/" h5part_basedir="$4/"
fi fi
for h5part_place in $2 for h5part_place in $2; do
do AC_MSG_CHECKING([looking in $h5part_place ... ])
echo -n "looking in $h5part_place ... $ac_c" #1>&6
if test -r "$h5part_basedir$h5part_place/$3" ; then if test -r "$h5part_basedir$h5part_place/$3" ; then
echo "$ac_t"" found" #1>&6 AC_MSG_RESULT([found])
eval $1="$h5part_place" eval $1="$h5part_place"
break break
fi fi
if test -d "$h5part_basedir$h5part_place/$3" ; then AC_MSG_RESULT([no])
echo "$ac_t"" found" #1>&6
eval $1="$h5part_place"
break
fi
echo "$ac_t"" no" #1>&6
done done
return return
} }
############################################################################### ###############################################################################
############# MISC SETTINGS INCLUDING C & C++ COMPILER SETTING ################ ############# MISC SETTINGS INCLUDING C & C++ COMPILER SETTING ################
############################################################################### ###############################################################################
...@@ -133,26 +131,6 @@ if test $uname = "AIX"; then ...@@ -133,26 +131,6 @@ if test $uname = "AIX"; then
fi fi
# DAVINCI SPECIFIC!!!
if test `uname -n` = "davinci"; then
echo "DAVINCI SPECIFIC TESTING FOR STDC++ LIBRARY!"
PATH_Search STDCXX_CHECK '/usr/lib64 /usr/lib' libstdc++.a
# if STDCXX_CHECK is set...
if test "$STDCXX_CHECK" = "/usr/lib64"; then
echo "STDCXX setting ..."
echo "STDCXX_CHECK = $STDCXX_CHECK ..."
STDCXX="-L/usr/lib64 -lstdc++"
echo "STDCXX = $STDCXX ..."
elif test "$STDCXX_CHECK" = "/usr/lib"; then
echo "STDCXX setting ..."
echo "STDCXX_CHECK = $STDCXX_CHECK ..."
STDCXX="-L/usr/lib -lstdc++"
echo "STDCXX = $STDCXX ..."
fi
fi
# Determine a C compiler to use. # Determine a C compiler to use.
# If CC is not already set in the environment, check for gcc and cc, then # If CC is not already set in the environment, check for gcc and cc, then
# for other C compilers. # for other C compilers.
...@@ -165,9 +143,9 @@ AC_PATH_PROGS([BAS_CC], [cc_r], [], [$PATH]) ...@@ -165,9 +143,9 @@ AC_PATH_PROGS([BAS_CC], [cc_r], [], [$PATH])
# if BAS_CC not empty # if BAS_CC not empty
if test -n "$BAS_CC"; then if test -n "$BAS_CC"; then
echo "CC setting for Bassi ..." AC_MSG_CHECKING([CC setting for Bassi])
CC=$BAS_CC CC=$BAS_CC
echo "CC = $CC ..." AC_MSG_RESULT([CC = $CC])
fi fi
...@@ -181,6 +159,16 @@ fi ...@@ -181,6 +159,16 @@ fi
AC_PROG_CXX(pathCC icc cc_r g++ gcc cc) AC_PROG_CXX(pathCC icc cc_r g++ gcc cc)
# DAVINCI SPECIFIC!!!
AC_MSG_CHECKING([for icc linker -lstdc++ flag])
if test ${CXX} = "icc"; then
AC_MSG_RESULT([yes])
STDCXX="-lstdc++"
else
AC_MSG_RESULT([no])
fi
# Set output variable INSTALL to the path of a BSD-compatible install program, # Set output variable INSTALL to the path of a BSD-compatible install program,
# if one is found in the current PATH. # if one is found in the current PATH.
# Otherwise, set INSTALL to `dir/install-sh -c` # Otherwise, set INSTALL to `dir/install-sh -c`
...@@ -245,14 +233,23 @@ if test "X$USE_FORTRAN" = "Xyes"; then ...@@ -245,14 +233,23 @@ if test "X$USE_FORTRAN" = "Xyes"; then
fi fi
if test ! $uname = "AIX"; then if test ! $uname = "AIX"; then
FFLAGS="${FFLAGS} -fPIC -fno-second-underscore" FFLAGS="${FFLAGS} -fPIC"
fi
if test $FC = "g90"; then
FFLAGS="${FFLAGS} -fno-second-underscore"
fi
if test $FC = "g95"; then
FFLAGS="${FFLAGS} -fno-second-underscore"
fi fi
AC_MSG_CHECKING([symbol convention in object files]) AC_MSG_CHECKING([symbol convention in object files])
`cd src && rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore` `cd src && rm -f TestUnderscore.o TestUnderscoreC.o TestUnderscore`
`cd src && ${FC} ${FFLAGS} -c TestUnderscore.f` `cd src && ${FC} ${FFLAGS} -c TestUnderscore.f`
`cd src && ${CC} ${CFLAGS} -c TestUnderscoreC.c` `cd src && ${CC} ${CFLAGS} -c TestUnderscoreC.c`
`cd src && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o -lc` # `cd src && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o -lc`
`cd src && ${FC} ${FFLAGS} -o TestUnderscore TestUnderscore.o TestUnderscoreC.o`
if test -f src/TestUnderscore ; then if test -f src/TestUnderscore ; then
UNDERSCORE_H=Underscore.h UNDERSCORE_H=Underscore.h
...@@ -280,7 +277,11 @@ if test "X$USE_PARALLEL" = "Xyes"; then ...@@ -280,7 +277,11 @@ if test "X$USE_PARALLEL" = "Xyes"; then
MPI_Comm comm; MPI_Comm comm;
int n; int n;
MPI_Comm_size( comm, &n ); ], MPI_Comm_size( comm, &n ); ],
[echo 'yes'; r='yes'], [echo "no"; r='no'] ) [AC_MSG_RESULT([yes]); r='yes'], [AC_MSG_RESULT([no]); r='no'] )
if test "X$USE_MPIPOSIX" = "Xyes"; then
CFLAGS="${CFLAGS} -DH5PART_MPIPOSIX"
fi
if test "X$r" = "Xno"; then if test "X$r" = "Xno"; then
AC_PATH_PROGS([MPICC], [mpicc mpcc_r], [], [$PATH]) AC_PATH_PROGS([MPICC], [mpicc mpcc_r], [], [$PATH])
...@@ -366,7 +367,7 @@ if test "X$USE_PARALLEL" = "Xyes"; then ...@@ -366,7 +367,7 @@ if test "X$USE_PARALLEL" = "Xyes"; then
if test ! -n "$MPIFC"; then if test ! -n "$MPIFC"; then
AC_MSG_CHECKING([ No MPIFC detected. Setting MPIFC to FC.]) AC_MSG_CHECKING([ No MPIFC detected. Setting MPIFC to FC.])
MPIFC=$FC MPIFC=$FC
echo "MPIFC = $MPIFC ..." AC_MSG_RESULT([MPIFC = $MPIFC])
fi fi
if test -n "$MPIFC"; then if test -n "$MPIFC"; then
...@@ -455,7 +456,7 @@ if test -n "$HDF5ROOT"; then ...@@ -455,7 +456,7 @@ if test -n "$HDF5ROOT"; then
fi fi
AC_MSG_CHECKING([for static zlib root ]) AC_MSG_CHECKING([for static zlib root ])
echo AC_MSG_RESULT([ ])
PATH_Search ZLIBROOT '/apps/zlib' lib/libz.a PATH_Search ZLIBROOT '/apps/zlib' lib/libz.a
if test -n "$ZLIBROOT"; then if test -n "$ZLIBROOT"; then
LDFLAGS="$LDFLAGS -L$ZLIBROOT/lib" LDFLAGS="$LDFLAGS -L$ZLIBROOT/lib"
...@@ -474,65 +475,65 @@ H5P_LIB_LOC=`pwd`/src ...@@ -474,65 +475,65 @@ H5P_LIB_LOC=`pwd`/src
#if there was an external input for the variable... #if there was an external input for the variable...
if test -n "$SAVE_CC"; then if test -n "$SAVE_CC"; then
CC=$SAVE_CC CC=$SAVE_CC
fi fi
if test -n "$SAVE_CXX"; then if test -n "$SAVE_CXX"; then
CXX=$SAVE_CXX CXX=$SAVE_CXX
fi fi
if test -n "$SAVE_FC"; then if test -n "$SAVE_FC"; then
FC=$SAVE_FC FC=$SAVE_FC
fi fi
if test -n "$SAVE_MPICC"; then if test -n "$SAVE_MPICC"; then
MPICC=$SAVE_MPICC MPICC=$SAVE_MPICC
fi fi
if test -n "$SAVE_MPICXX"; then if test -n "$SAVE_MPICXX"; then
MPICXX=$SAVE_MPICXX MPICXX=$SAVE_MPICXX
fi fi
if test -n "$SAVE_MPIFC"; then if test -n "$SAVE_MPIFC"; then
MPIFC=$SAVE_MPIFC MPIFC=$SAVE_MPIFC
fi fi
if test -n "$SAVE_MPILIB"; then if test -n "$SAVE_MPILIB"; then
MPILIB=$SAVE_MPILIB MPILIB=$SAVE_MPILIB
fi fi
if test -n "$SAVE_MPIINC"; then if test -n "$SAVE_MPIINC"; then
MPIINC=$SAVE_MPIINC MPIINC=$SAVE_MPIINC
fi fi
if test -n "$SAVE_CFLAGS"; then if test -n "$SAVE_CFLAGS"; then
CFLAGS="$SAVE_CFLAGS ${CFLAGS}" CFLAGS="$SAVE_CFLAGS ${CFLAGS}"
fi fi
if test -n "$SAVE_FFLAGS"; then if test -n "$SAVE_FFLAGS"; then
FFLAGS=$SAVE_FFLAGS FFLAGS=$SAVE_FFLAGS
fi fi
if test -n "$SAVE_MPIROOT"; then if test -n "$SAVE_MPIROOT"; then
MPIROOT=$SAVE_MPIROOT MPIROOT=$SAVE_MPIROOT
fi fi
if test -n "$SAVE_HDF5ROOT"; then if test -n "$SAVE_HDF5ROOT"; then
HDF5ROOT=$SAVE_HDF5ROOT HDF5ROOT=$SAVE_HDF5ROOT
fi fi
if test -n "$SAVE_LDFLAGS"; then if test -n "$SAVE_LDFLAGS"; then
LDFLAGS=$SAVE_LDFLAGS LDFLAGS=$SAVE_LDFLAGS
fi fi
if test -n "$MPICXX"; then if test -n "$MPICXX"; then
TOOLS_CXX=$MPICXX TOOLS_CXX=$MPICXX
TOOLS_H5PART_LIB="-lpH5Part" TOOLS_H5PART_LIB="-lpH5Part"
TOOLS_HDFLIB="-L$HDF5ROOT/lib -lhdf5" TOOLS_HDFLIB="-L$HDF5ROOT/lib -lhdf5"
else else
TOOLS_CXX=$CXX TOOLS_CXX=$CXX
TOOLS_H5PART_LIB="-lH5Part" TOOLS_H5PART_LIB="-lH5Part"
TOOLS_HDFLIB="-L$HDF5ROOT/lib -lhdf5" TOOLS_HDFLIB="-L$HDF5ROOT/lib -lhdf5"
fi fi
############################################################################### ###############################################################################
...@@ -581,27 +582,26 @@ AC_OUTPUT ...@@ -581,27 +582,26 @@ AC_OUTPUT
############################################################################### ###############################################################################
########################## PRINTING SUMMARY ################################### ########################## PRINTING SUMMARY ###################################
############################################################################### ###############################################################################
echo AC_MSG_RESULT([ ])
echo AC_MSG_RESULT([Summary:])
echo "Summary for `(hostname || uname -n) 2>/dev/null | sed 1q`:" AC_MSG_RESULT([ ])
echo AC_MSG_RESULT([Host OS: $host_os])
echo "Host OS: $host_os" AC_MSG_RESULT([Host CPU: $host_cpu])
echo "Host CPU: $host_cpu" AC_MSG_RESULT([Host vendor: $host_vendor])
echo "Host vendor: $host_vendor" AC_MSG_RESULT([Build libraries: $MTARGET])
echo "Build libraries: $MTARGET" AC_MSG_RESULT([Build test programs: $TTARGET])
echo "Build test programs: $TTARGET" AC_MSG_RESULT([Build tools: $BUILD_TOOLS])
echo "Build tools: $BUILD_TOOLS" AC_MSG_RESULT([CC = $CC])
echo "CC = $CC" AC_MSG_RESULT([CXX = $CXX])
echo "CXX = $CXX" AC_MSG_RESULT([FC = $FC])
echo "FC = $FC" AC_MSG_RESULT([MPICC = $MPICC])
echo "MPICC = $MPICC" AC_MSG_RESULT([MPICXX = $MPICXX])
echo "MPICXX = $MPICXX" AC_MSG_RESULT([MPIFC = $MPIFC])
echo "MPIFC = $MPIFC" AC_MSG_RESULT([CFLAGS = $CFLAGS])
echo "CFLAGS = $CFLAGS" AC_MSG_RESULT([FFLAGS = $FFLAGS])
echo "FFLAGS = $FFLAGS" AC_MSG_RESULT([MPILIB = $MPILIB])
echo "MPILIB = $MPILIB" AC_MSG_RESULT([MPIINC = $MPIINC])
echo "MPIINC = $MPIINC" AC_MSG_RESULT([MPIROOT = $MPIROOT])
echo "MPIROOT = $MPIROOT" AC_MSG_RESULT([HDF5ROOT = $HDF5ROOT])
echo "HDF5ROOT = $HDF5ROOT" AC_MSG_RESULT([LDFLAGS = $LDFLAGS])
echo "LDFLAGS = $LDFLAGS" AC_MSG_RESULT([ ])
echo \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment