HDF5 configured in semi-automatic way, a valid installation path must be specified.

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12853 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
spigafi 2016-08-26 20:38:11 +00:00
parent 22848786c6
commit 1294cd1733
4 changed files with 294 additions and 51 deletions

1
install/aclocal.m4 vendored
View File

@ -25,6 +25,7 @@ m4_include([m4/x_ac_qe_f90.m4])
m4_include([m4/x_ac_qe_f90rule.m4])
m4_include([m4/x_ac_qe_fft.m4])
m4_include([m4/x_ac_qe_fftw_pointer.m4])
m4_include([m4/x_ac_qe_hdf5.m4])
m4_include([m4/x_ac_qe_lapack.m4])
m4_include([m4/x_ac_qe_ld.m4])
m4_include([m4/x_ac_qe_mass.m4])

294
install/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for ESPRESSO 5.4.0.
# Generated by GNU Autoconf 2.63 for ESPRESSO 6.0-beta.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@ -594,8 +594,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ESPRESSO'
PACKAGE_TARNAME='espresso'
PACKAGE_VERSION='5.4.0'
PACKAGE_STRING='ESPRESSO 5.4.0'
PACKAGE_VERSION='6.0-beta'
PACKAGE_STRING='ESPRESSO 6.0-beta'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@ -644,6 +644,8 @@ fdflags
dflags
wget
ranlib
hdf5_line
hdf5_libs
elpa_libs_switch
scalapack_line
scalapack_libs
@ -754,6 +756,7 @@ with_internal_blas
with_internal_lapack
with_scalapack
with_elpa
with_hdf5
enable_signals
'
ac_precious_vars='build_alias
@ -1322,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures ESPRESSO 5.4.0 to adapt to many kinds of systems.
\`configure' configures ESPRESSO 6.0-beta to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1386,7 +1389,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ESPRESSO 5.4.0:";;
short | recursive ) echo "Configuration of ESPRESSO 6.0-beta:";;
esac
cat <<\_ACEOF
@ -1415,6 +1418,8 @@ Optional Packages:
openMPI)
--with-elpa (yes|no|<path>) Use ELPA. Self-compile or a <path>
can be specified (default: no)
--with-hdf5 (no|<path>) Use HDF5, a valid <path> must be
specified (default: no)
Some influential environment variables:
EXTLIB_FLAGS
@ -1498,7 +1503,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
ESPRESSO configure 5.4.0
ESPRESSO configure 6.0-beta
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -1512,7 +1517,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ESPRESSO $as_me 5.4.0, which was
It was created by ESPRESSO $as_me 6.0-beta, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@ -2069,7 +2074,9 @@ $as_echo "${arch}" >&6; }
# Add all needed -D options to try_dflags
try_dflags=""
try_iflags="-I../include"
# "-I../include" is required by IOTK ...
try_iflags="-I\$(TOPDIR)/include -I../include/"
# Checking archiver...
@ -3507,7 +3514,7 @@ fi
# Checking MPIF90...
# Checking CC...
# candidate C and f77 compilers good for all cases
@ -5960,6 +5967,60 @@ else
test_fflags="`echo $f90flags | sed 's/\$([^)]*)//g'`"
fi
{ $as_echo "$as_me:$LINENO: checking whether the Fortran compiler can perform preprocessing" >&5
$as_echo_n "checking whether the Fortran compiler can perform preprocessing... " >&6; }
acx_save_FCFLAGS="$FCFLAGS"
FCFLAGS="$F90FLAGS"
ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
cat >conftest.$ac_ext <<_ACEOF
program main
#define SUBSTME integer
SUBSTME :: ii
end
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_fc_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
have_cpp=1; { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
have_cpp=0; { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
FCFLAGS="$acx_save_FCFLAGS"
@ -5980,9 +6041,10 @@ if test "$cpp" = "" ; then cpp=$try_cpp; fi
echo setting CPP... $cpp
echo $ECHO_N "setting CPPFLAGS... $ECHO_C"
# Note: option -C makes trouble with recent gcc versions and pgi
case $cpp in
cpp) try_cppflags="-P -C -traditional" ;;
fpp) try_cppflags="-P -C " ;;
cpp) try_cppflags="-P -traditional" ;;
fpp) try_cppflags="-P " ;;
*) try_cppflags="" ;;
esac
if test "$cppflags" = "" ; then cppflags=$try_cppflags ; fi
@ -6979,8 +7041,8 @@ fi
# check for blas
# supported vendor replacements:
# mkl and acml on Intel/AMD architectures
# essl on aix
# SUNperf on sparc
# essl on aix - OBSOLETE
# SUNperf on sparc - likely OBSOLETE
# atlas is used over blas if available
# internal version is used if none is found
@ -9517,7 +9579,7 @@ else
fi
# check for lapack
# check for lapack - almost all cases implemented here are OBSOLETE
#
# same supported vendor replacements as for blas
# internal version is used if none is found
@ -9533,7 +9595,7 @@ if test "$use_internal_lapack" -eq 0
ia32:* | ia64:*| x86_64:* )
# check for mkl_lapack (if mkl found and acml not found)
# OBSOLESCENT - recent versions of mkl contain lapack
# OBSOLETE - recent versions of mkl contain lapack
if test "$have_mkl" -ne 0 && test "$have_acml" -eq 0
then
unset ac_cv_search_dspev ac_lib # clear cached value
@ -9615,7 +9677,7 @@ fi
;;
sparc:* )
# check for SUNperf library
# check for SUNperf library - likely OBSOLETE
unset ac_cv_search_dspev # clear cached value
FFLAGS="$test_fflags"
LDFLAGS="$test_ldflags"
@ -9693,7 +9755,7 @@ fi
;;
aix:* )
# check for essl
# check for essl - OBSOLETE
unset ac_cv_search_dspev # clear cached value
FFLAGS="$test_fflags"
LDFLAGS="$test_ldflags"
@ -9856,8 +9918,7 @@ fi
;;
necsx:* )
#sx5-nec or sx6-nec or sx8-nec: check in (/SX)/usr/lib
#sx8-nec-idris: check in /SX/opt/mathkeisan/inst/lib0
# OBSOLETE
try_libdirs="/SX/usr/lib /SX/opt/mathkeisan/inst/lib0"
for dir in none $try_libdirs
do
@ -10066,6 +10127,7 @@ else
# IBM essl or atlas: add missing lapack routines - must be loaded after lib
# atlas: add missing lapack routines so as to complete atlas
# note that some compilers do not like to have multiple symbols
# OBSOLETE
lapack_libs="$lapack_libs $topdir/lapack-3.2/lapack.a"
lapack_libs_switch="internal"
else
@ -11495,6 +11557,7 @@ $as_echo "${mass_libs}" >&6; }
have_mpi=0
#parallel=0
# some architectures require to link mpi libraries explicitly
F77=$mpif90 # use parallel compiler
@ -12190,7 +12253,194 @@ $as_echo "${elpa_libs}" >&6; }
# Setting HDF5...
#X_AC_QE_HDF5()
{ $as_echo "$as_me:$LINENO: checking hdf5" >&5
$as_echo_n "checking hdf5... " >&6; }
# Check whether --with-hdf5 was given.
if test "${with_hdf5+set}" = set; then
withval=$with_hdf5; if test "$withval" = "no" ; then
with_hdf5=0
else
with_hdf5_path="$withval"
with_hdf5=1
fi
else
with_hdf5=0
fi
hdf5_libs=""
have_hdf5=0
if test "$use_parallel" -ne 0; then
if test "$with_hdf5" -ne 0 && test "$with_hdf5_path" != "yes"; then
# Test if it is really installed where it has been specified
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
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
try_libdirs="$with_hdf5_path/lib"
for dir in $try_libdirs
do
unset ac_cv_search_H5Fcreate
if test "$dir" = "none"
then
try_loption=
else
echo $ECHO_N "in $dir: " $ECHO_C
try_loption="-L$dir"
fi
FFLAGS="$test_fflags"
LDFLAGS="$test_ldflags $try_loption"
LIBS="-lhdf5"
{ $as_echo "$as_me:$LINENO: checking for library containing H5Fcreate" >&5
$as_echo_n "checking for library containing H5Fcreate... " >&6; }
if test "${ac_cv_search_H5Fcreate+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char H5Fcreate ();
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
return H5Fcreate ();
;
return 0;
}
_ACEOF
for ac_lib in '' hdf5_fortran; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
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:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
ac_cv_search_H5Fcreate=$ac_res
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_H5Fcreate+set}" = set; then
break
fi
done
if test "${ac_cv_search_H5Fcreate+set}" = set; then
:
else
ac_cv_search_H5Fcreate=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_H5Fcreate" >&5
$as_echo "$ac_cv_search_H5Fcreate" >&6; }
ac_res=$ac_cv_search_H5Fcreate
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
have_hdf5=1
fi
if test "$ac_cv_search_H5Fcreate" != "no"
then break ; fi
done
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
ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test "$have_hdf5" -eq 1 ; then
hdf5_libs="-L$with_hdf5_path/lib -lhdf5_fortran -lhdf5"
try_iflags="$try_iflags -I$with_hdf5_path/include"
try_dflags="$try_dflags -D__HDF5"
fi
hdf5_line="HDF5_LIBS=$hdf5_libs"
fi
else
{ $as_echo "$as_me:$LINENO: WARNING: HDF5 support is for parallel execution only" >&5
$as_echo "$as_me: WARNING: HDF5 support is for parallel execution only" >&2;}
fi
# Checking SIGNAL...
@ -12821,7 +13071,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by ESPRESSO $as_me 5.4.0, which was
This file was extended by ESPRESSO $as_me 6.0-beta, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -12880,7 +13130,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
ESPRESSO config.status 5.4.0
ESPRESSO config.status 6.0-beta
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -6,41 +6,31 @@ AC_DEFUN([X_AC_QE_HDF5], [
AC_ARG_WITH(hdf5,
[AS_HELP_STRING([--with-hdf5],
[(yes|no|<path>) Use HDF5. Self-compile or a <path> can be specified (default: no)])],
[if test "$withval" = "yes" ; then
with_hdf5=1
elif test "$withval" = "no" ; then
[(no|<path>) Use HDF5, a valid <path> must be specified (default: no)])],
[if test "$withval" = "no" ; then
with_hdf5=0
else
with_hdf5=2
with_hdf5_path="$withval"
with_hdf5=1
fi],
[with_hdf5=0])
hdf5_libs=""
hdf5_inc=""
have_hdf5=0
hdf5_libs_switch="disabled"
if test "$with_hdf5" -eq 2 ; then
hdf5_libs="-L$with_hdf5_path/lib -lhdf5_fortran -lhdf5"
try_iflags="$try_iflags -I$with_hdf5_path/include"
try_dflags="$try_dflags -D__HDF5"
fi
if test "$use_parallel" -ne 0; then
if test "$with_hdf5" -eq 1 ; then
try_libdirs="/usr/lib64"
try_libdirs="$libdirs $try_libdirs $ld_library_path"
have_hdf5=0
if test "$with_hdf5" -ne 0 && test "$with_hdf5_path" != "yes"; then
# Test if it is really installed where it has been specified
AC_LANG_POP(Fortran 77)
AC_LANG_PUSH(C)
for dir in none $try_libdirs
try_libdirs="$with_hdf5_path/lib"
for dir in $try_libdirs
do
# unset ac_cv_search_H5Fcreate ac_cv_search_hdfh
unset ac_cv_search_H5Fcreate
if test "$dir" = "none"
then
try_loption=
@ -48,16 +38,12 @@ if test "$with_hdf5" -eq 1 ; then
echo $ECHO_N "in $dir: " $ECHO_C
try_loption="-L$dir"
fi
FFLAGS="$test_fflags"
LDFLAGS="$test_ldflags $try_loption"
LIBS="-lhdf5"
# Detect the location Fortran module "USE HDF5" is the complex part
# AC_CHECK_HEADER(...)
AC_SEARCH_LIBS(H5Fcreate, hdf5_fortran,
[hdf5_libs="$try_loption -lhdf5_fortran -lhdf5" have_hdf5=1])
AC_SEARCH_LIBS(H5Fcreate, hdf5_fortran, [have_hdf5=1])
if test "$ac_cv_search_H5Fcreate" != "no"
then break ; fi
@ -67,12 +53,18 @@ if test "$with_hdf5" -eq 1 ; then
AC_LANG_PUSH(Fortran 77)
if test "$have_hdf5" -eq 1 ; then
hdf5_libs="-L$with_hdf5_path/lib -lhdf5_fortran -lhdf5"
try_iflags="$try_iflags -I$with_hdf5_path/include"
try_dflags="$try_dflags -D__HDF5"
try_dflags="$try_dflags -D__HDF5"
fi
hdf5_line="HDF5_LIBS=$hdf5_libs"
fi
hdf5_line="HDF5_LIBS=$hdf5_libs"
else
AC_MSG_WARN([HDF5 support is for parallel execution only])
fi
AC_SUBST(hdf5_libs)
AC_SUBST(hdf5_line)

View File

@ -3,7 +3,7 @@
AC_DEFUN([X_AC_QE_MPI], [
have_mpi=0
parallel=0
#parallel=0
# some architectures require to link mpi libraries explicitly
F77=$mpif90 # use parallel compiler