Commit c32bdb9e authored by Andreas Marek's avatar Andreas Marek

Merge branch 'u/loh/master'

parents 86172a69 fefba0f7
*.o
*.lo
*.deps
*.dirstamp
*.libs
*.fortran_dependencies
modules/
......@@ -126,6 +126,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gnu_make.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/fdep/fortran_dependencies.m4 \
$(top_srcdir)/m4/ax_prog_cxx_mpi.m4 \
$(top_srcdir)/m4/ax_prog_fc_mpi.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
......@@ -674,6 +675,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPICXX = @MPICXX@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
......
......@@ -710,9 +710,10 @@ FC
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
ac_ct_CXX
CXXFLAGS
ac_ct_CXX
CXX
MPICXX
am__fastdepCCAS_FALSE
am__fastdepCCAS_TRUE
CCASDEPMODE
......@@ -848,6 +849,7 @@ LIBS
CPPFLAGS
CCAS
CCASFLAGS
MPICXX
CXX
CXXFLAGS
CCC
......@@ -1541,6 +1543,7 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CCAS assembler compiler command (defaults to CC)
CCASFLAGS assembler compiler flags (defaults to CFLAGS)
MPICXX MPI C++ compiler command
CXX C++ compiler command
CXXFLAGS C++ compiler flags
FC MPI Fortran compiler command
......@@ -1704,6 +1707,52 @@ fi
} # ac_fn_cxx_try_compile
# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
# ac_fn_fc_try_compile LINENO
# ---------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
......@@ -2047,52 +2096,6 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_cpp
# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
rm -f conftest.$ac_objext conftest$ac_exeext
if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
cat conftest.er1 >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
......@@ -4563,7 +4566,197 @@ else
fi
ac_ext=cpp
#AC_PROG_CXX
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_cxx_mpi.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_CXX_MPI([MPI-WANTED-TEST[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
#
# DESCRIPTION
#
# This macro tries to find out how to compile C++ programs that use MPI
# (Message Passing Interface), a standard API for parallel process
# communication (see http://www-unix.mcs.anl.gov/mpi/). The macro has to
# be used instead of the standard macro AC_PROG_CXX and will replace the
# standard variable CXX with the found compiler.
#
# MPI-WANTED-TEST is used to test whether MPI is actually wanted by the
# user. If MPI-WANTED_TEST is omitted or if it succeeds, the macro will
# try to find out how to use MPI, if it fails, the macro will call
# AC_PROG_CC to find a standard C compiler instead.
#
# When MPI is found, ACTION-IF-FOUND will be executed, if MPI is not found
# (or MPI-WANTED-TEST fails) ACTION-IF-NOT-FOUND is executed. If
# ACTION-IF-FOUND is not set, the macro will define HAVE_MPI.
#
# The following example demonstrates usage of the macro:
#
# # If --with-mpi=auto is used, try to find MPI, but use standard C compiler if it is not found.
# # If --with-mpi=yes is used, try to find MPI and fail if it isn't found.
# # If --with-mpi=no is used, use a standard C compiler instead.
# AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],
# [compile with MPI (parallelization) support. If none is found,
# MPI is not used. Default: auto])
# ],,[with_mpi=auto])
#
# AX_PROG_CXX_MPI([test x"$with_mpi" != xno],[use_mpi=yes],[
# use_mpi=no
# if test x"$with_mpi" = xyes; then
# AC_MSG_FAILURE([MPI compiler requested, but couldn't use MPI.])
# else
# AC_MSG_WARN([No MPI compiler found, won't use MPI.])
# fi
# ])
#
# LICENSE
#
# Copyright (c) 2010,2011 Olaf Lenz <olenz@icp.uni-stuttgart.de>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 2
_ax_prog_cxx_mpi_mpi_wanted=yes
if test x"$_ax_prog_cxx_mpi_mpi_wanted" = xyes; then
if test -z "$CXX" && test -n "$MPICXX"; then
CXX="$MPICXX"
else
if test -n "$ac_tool_prefix"; then
for ac_prog in mpic++ mpicxx mpiCC sxmpic++ hcp mpxlC_r mpxlC mpixlcxx_r mpixlcxx mpg++ mpc++ mpCC cmpic++ mpiFCC CCicpc pgCC pathCC sxc++ xlC_r xlC bgxlC_r bgxlC openCC sunCC crayCC g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
$as_echo "$CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CXX" && break
done
fi
if test -z "$CXX"; then
ac_ct_CXX=$CXX
for ac_prog in mpic++ mpicxx mpiCC sxmpic++ hcp mpxlC_r mpxlC mpixlcxx_r mpixlcxx mpg++ mpc++ mpCC cmpic++ mpiFCC CCicpc pgCC pathCC sxc++ xlC_r xlC bgxlC_r bgxlC openCC sunCC crayCC g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
$as_echo "$ac_ct_CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$ac_ct_CXX" && break
done
if test "x$ac_ct_CXX" = x; then
CXX=""
else
case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
CXX=$ac_ct_CXX
fi
fi
fi
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
......@@ -4951,6 +5144,124 @@ fi
# Check for compiler
# Needs to be split off into an extra macro to ensure right expansion
# order.
if test x"$_ax_prog_cxx_mpi_mpi_wanted" = xno; then :
_ax_prog_cxx_mpi_mpi_found=no
else
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# test whether MPI_Init() is available
# We do not use AC_SEARCH_LIBS here, as it caches its outcome and
# thus disallows corresponding calls in the other AX_PROG_*_MPI
# macros.
for lib in NONE mpi mpich; do
save_LIBS=$LIBS
if test x"$lib" = xNONE; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function MPI_Init" >&5
$as_echo_n "checking for function MPI_Init... " >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function MPI_Init in -l$lib" >&5
$as_echo_n "checking for function MPI_Init in -l$lib... " >&6; }
LIBS="-l$lib $LIBS"
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
extern "C" { void MPI_Init(); }
int
main ()
{
MPI_Init();
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
_ax_prog_cxx_mpi_mpi_found=yes
else
_ax_prog_cxx_mpi_mpi_found=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_prog_cxx_mpi_mpi_found" >&5
$as_echo "$_ax_prog_cxx_mpi_mpi_found" >&6; }
if test "x$_ax_prog_cxx_mpi_mpi_found" = "xyes"; then
break;
fi
LIBS=$save_LIBS
done
# Check for header
if test x"$_ax_prog_cxx_mpi_mpi_found" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5
$as_echo_n "checking for mpi.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mpi.h>
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
_ax_prog_cxx_mpi_mpi_found=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$_ax_prog_cxx_mpi_mpi_found" = xyes; then :
have_mpi=yes
:
else
have_mpi=no
if test "x${have_mpi}" = xno; then
as_fn_error $? "no mpi found" "$LINENO" 5
fi
:
fi
have_blas=no
have_blacs=no
have_mkl=no
......@@ -4987,7 +5298,8 @@ install_complex_avx_block2=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSE assembler kernel can be compiled" >&5
$as_echo_n "checking whether SSE assembler kernel can be compiled... " >&6; }
echo " .globl double_hh_trafo_
echo <<EOF > ./test.s
.globl double_hh_trafo_
.globl single_hh_trafo_complex_
.text
......@@ -5544,7 +5856,8 @@ test_2:
return2:
ret
.align 16,0x90" > ./test.s
.align 16,0x90
EOF
$CC -c ./test.s
if test "$?" == 0; then
......@@ -5720,6 +6033,7 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
_ax_prog_fc_mpi_mpi_wanted=yes
if test x"$_ax_prog_fc_mpi_mpi_wanted" = xyes; then
if test -z "$FC" && test -n "$MPIFC"; then
......@@ -6612,7 +6926,50 @@ $as_echo "${have_lapack}" >&6; }
as_fn_error $? "could not link with lapack: specify path" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing blacs_gridinit" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bi_f77_init" >&5
$as_echo_n "checking for library containing bi_f77_init... " >&6; }
if ${ac_cv_search_bi_f77_init+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat > conftest.$ac_ext <<_ACEOF
program main
call bi_f77_init
end
_ACEOF
for ac_lib in '' mpiblacsF77init; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib -lmpiblacs $ac_func_search_save_LIBS"
fi
if ac_fn_fc_try_link "$LINENO"; then :
ac_cv_search_bi_f77_init=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_bi_f77_init+:} false; then :
break
fi
done
if ${ac_cv_search_bi_f77_init+:} false; then :
else
ac_cv_search_bi_f77_init=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bi_f77_init" >&5
$as_echo "$ac_cv_search_bi_f77_init" >&6; }
ac_res=$ac_cv_search_bi_f77_init
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing blacs_gridinit" >&5
$as_echo_n "checking for library containing blacs_gridinit... " >&6; }
if ${ac_cv_search_blacs_gridinit+:} false; then :
$as_echo_n "(cached) " >&6
......@@ -6679,7 +7036,7 @@ cat > conftest.$ac_ext <<_ACEOF
call pdtran
end
_ACEOF
for ac_lib in '' mpiscalapack; do
for ac_lib in '' mpiscalapack scalapack; do
if test -z "$ac_lib"; then
ac_res="none required"
else
......@@ -11184,7 +11541,6 @@ done
func_stripname_cnf ()
{
case ${2} in
......
......@@ -31,7 +31,14 @@ AC_PROG_INSTALL
AM_PROG_CC_C_O
AM_PROG_AR
AM_PROG_AS
AC_PROG_CXX
#AC_PROG_CXX
m4_include([m4/ax_prog_cxx_mpi.m4])
AX_PROG_CXX_MPI([],[have_mpi=yes],[have_mpi=no
if test "x${have_mpi}" = xno; then
AC_MSG_ERROR([no mpi found])
fi])
dnl variables needed for the tests
......@@ -76,7 +83,8 @@ install_complex_avx_block1=no
install_complex_avx_block2=no
AC_MSG_CHECKING(whether SSE assembler kernel can be compiled)
echo " .globl double_hh_trafo_
echo <<EOF > ./test.s
.globl double_hh_trafo_
.globl single_hh_trafo_complex_
.text
......@@ -633,7 +641,8 @@ test_2:
return2:
ret
.align 16,0x90" > ./test.s
.align 16,0x90
EOF
$CC -c ./test.s
if test "$?" == 0; then
......@@ -706,8 +715,9 @@ if test x"${with_avx_optimization}" = xyes; then
CXXFLAGS="$CXXFLAGS -funsafe-loop-optimizations -funsafe-math-optimizations -ftree-vect-loop-version -ftree-vectorize"
fi
AC_LANG(Fortran)
AC_LANG([Fortran])
m4_include([m4/ax_prog_fc_mpi.m4])
dnl check whether an mpi compiler is available;
dnl if not abort since it is mandatory
AX_PROG_FC_MPI([],[have_mpi=yes],[have_mpi=no
......@@ -817,6 +827,7 @@ else
fi
dnl now blacs
AC_SEARCH_LIBS([bi_f77_init],[mpiblacsF77init],[],[],[-lmpiblacs])
AC_SEARCH_LIBS([blacs_gridinit],[mpiblacs],[have_blacs=yes],[have_blacs=no])
AC_MSG_CHECKING([whether we can link a program with a blacs lib])
AC_MSG_RESULT([${have_blacs}])
......@@ -828,7 +839,7 @@ else
fi
dnl now scalapack
AC_SEARCH_LIBS([pdtran],[mpiscalapack],[have_scalapack=yes],[have_scalapack=no])
AC_SEARCH_LIBS([pdtran],[mpiscalapack scalapack],[have_scalapack=yes],[have_scalapack=no])
AC_MSG_CHECKING([whether we can link a program with a scalapack lib])
AC_MSG_RESULT([${have_scalapack}])
......
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_mpi.html
# http://www.gnu.org/software/autoconf-archive/ax_prog_cxx_mpi.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PROG_CC_MPI([MPI-WANTED-TEST[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
# AX_PROG_CXX_MPI([MPI-WANTED-TEST[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
#
# DESCRIPTION
#
# This macro tries to find out how to compile C programs that use MPI
# This macro tries to find out how to compile C++ programs that use MPI
# (Message Passing Interface), a standard API for parallel process
# communication (see http://www-unix.mcs.anl.gov/mpi/).
# The macro has to be used instead of the standard macro AC_PROG_CC
# and will replace the standard variable CC with the found compiler.
#
# MPI-WANTED-TEST is used to test whether MPI is actually wanted by
# the user. If the test fails, the macro will not try to find MPI
# and call AC_PROG_CC to find a standard C compiler instead. If the
# test is omitted, the macro will try to find MPI and fail if it is
# not found.
#
# When MPI is found, ACTION-IF-FOUND will be executed, otherwise
# ACTION-IF-NOT-FOUND is executed. If ACTION-IF-FOUND is not set,
# the macro will define HAVE_MPI.
#
# EXAMPLE
#
# # If --with-mpi=auto is used, try to find MPI, but use standard C
# compiler if it is not found.
# # If --with-mpi=yes is used, try to find MPI and fail if it isn't
# # found.
# # If --with-mpi=no is used, use a standard C compiler instead.
# AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],
# [compile with MPI (parallelization) support. If none is found,
# MPI is not used. Default: auto])
# ],,[with_mpi=auto])
#
# AX_PROG_CC_MPI([test x"$with_mpi" != xno],[use_mpi=yes],[
# use_mpi=no
# if test x"$with_mpi" = xyes; then
# AC_MSG_FAILURE([MPI compiler requested, but couldn't use MPI.])
# else
# AC_MSG_WARN([No MPI compiler found, won't use MPI.])
# fi
# ])
# communication (see http://www-unix.mcs.anl.gov/mpi/). The macro has to
# be used instead of the standard macro AC_PROG_CXX and will replace the
# standard variable CXX with the found compiler.
#
# MPI-WANTED-TEST is used to test whether MPI is actually wanted by the
# user. If MPI-WANTED_TEST is omitted or if it succeeds, the macro will
# try to find out how to use MPI, if it fails, the macro will call
# AC_PROG_CC to find a standard C compiler instead.
#
# When MPI is found, ACTION-IF-FOUND will be executed, if MPI is not found
# (or MPI-WANTED-TEST fails) ACTION-IF-NOT-FOUND is executed. If
# ACTION-IF-FOUND is not set, the macro will define HAVE_MPI.
#
# The following example demonstrates usage of the macro:
#
# # If --with-mpi=auto is used, try to find MPI, but use standard C compiler if it is not found.
# # If --with-mpi=yes is used, try to find MPI and fail if it isn't found.
# # If --with-mpi=no is used, use a standard C compiler instead.
# AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],