10
0
mirror of https://gitlab.com/scemama/eplf synced 2024-12-22 20:35:30 +01:00

Configure script

This commit is contained in:
Anthony Scemama 2010-06-22 21:31:56 +02:00
parent ba98fcf957
commit f463cb672e
2 changed files with 384 additions and 54 deletions

436
configure vendored
View File

@ -275,7 +275,7 @@ PACKAGE_BUGREPORT=
ac_unique_file="EPLF" ac_unique_file="EPLF"
ac_unique_file="src/main.irp.f" ac_unique_file="src/main.irp.f"
ac_default_prefix=./ ac_default_prefix=./
ac_subst_vars='VERSION SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS ROOT LN_S RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT IRPF90 FC FCFLAGS ac_ct_FC FCFLAGS_F90 LIB LIBOBJS LTLIBOBJS' ac_subst_vars='VERSION SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS EPLF_PATH EXE LN_S RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT WGET PYTHON IRPF90 MPIRUN MPIFC EPLF_HAS_MPI FC FCFLAGS ac_ct_FC FCFLAGS_F90 LIB LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
@ -1305,7 +1305,11 @@ _ACEOF
fi fi
ROOT=`pwd`
EPLF_PATH=`pwd`
EXE=$EPLF_PATH/bin/eplf
@ -2335,6 +2339,356 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Check for wget
for ac_prog in wget
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_WGET+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$WGET"; then
ac_cv_prog_WGET="$WGET" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_WGET="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
WGET=$ac_cv_prog_WGET
if test -n "$WGET"; then
echo "$as_me:$LINENO: result: $WGET" >&5
echo "${ECHO_T}$WGET" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$WGET" && break
done
######################################################
# Define download function
######################################################
# Check for python
for ac_prog in python
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_PYTHON+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$PYTHON"; then
ac_cv_prog_PYTHON="$PYTHON" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PYTHON="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
PYTHON=$ac_cv_prog_PYTHON
if test -n "$PYTHON"; then
echo "$as_me:$LINENO: result: $PYTHON" >&5
echo "${ECHO_T}$PYTHON" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$PYTHON" && break
done
if [ -z $PYTHON ] ; then
{ { echo "$as_me:$LINENO: error: Python should be installed:
http://www.python.org" >&5
echo "$as_me: error: Python should be installed:
http://www.python.org" >&2;}
{ (exit 1); exit 1; }; }
fi
######################################################
# IRPF90 compiler
for ac_prog in irpf90
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_IRPF90+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$IRPF90"; then
ac_cv_prog_IRPF90="$IRPF90" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_IRPF90="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
IRPF90=$ac_cv_prog_IRPF90
if test -n "$IRPF90"; then
echo "$as_me:$LINENO: result: $IRPF90" >&5
echo "${ECHO_T}$IRPF90" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$IRPF90" && break
done
if [ -z $IRPF90 ] ; then
{
# AC_DOWNLOAD ( VARIABLE, name, url )
WHERE=
if [ ! -z $WGET ] ; then
echo ""
echo "**************************"
echo IRPF90 is not installed
echo "**************************"
echo "Do you want to download it?"
select x in yes no
do
if [ ! -z $x ] ; then
break
fi
done
if [ $x == yes ] ; then
if [ ! -d "Downloads" ] ; then
mkdir $EPLF_PATH/Downloads
fi
cd $EPLF_PATH/Downloads
mkdir $EPLF_PATH/Downloads/tmp
cd $EPLF_PATH/Downloads/tmp
wget -nc "http://sourceforge.net/projects/irpf90/files/latest" && WHERE=`ls -tr | tail -1`
mv * $EPLF_PATH/Downloads
cd $EPLF_PATH/Downloads
rm -rf tmp
cd $EPLF_PATH
fi
if [ ! -z $WHERE ] ; then
echo IRPF90 was downloaded to Downloads/$WHERE.
IRPF90=1
else
{ { echo "$as_me:$LINENO: error: IRPF90 should be installed. You can download it at
http://sourceforge.net/projects/irpf90/files/latest" >&5
echo "$as_me: error: IRPF90 should be installed. You can download it at
http://sourceforge.net/projects/irpf90/files/latest" >&2;}
{ (exit 1); exit 1; }; }
fi
else
{ { echo "$as_me:$LINENO: error: Please download IRPF90 at
http://sourceforge.net/projects/irpf90/files/latest" >&5
echo "$as_me: error: Please download IRPF90 at
http://sourceforge.net/projects/irpf90/files/latest" >&2;}
{ (exit 1); exit 1; }; }
fi
}
{ { echo "$as_me:$LINENO: error: Install IRPF90 and run this configure script again." >&5
echo "$as_me: error: Install IRPF90 and run this configure script again." >&2;}
{ (exit 1); exit 1; }; }
fi
######################################################
# EZFIO
EZFIO=`ls EZFIO*.tar.gz | tail -1`
if [ -z $EZFIO ] ; then
{
# AC_DOWNLOAD ( VARIABLE, name, url )
WHERE=
if [ ! -z $WGET ] ; then
echo ""
echo "**************************"
echo EZFIO is not installed
echo "**************************"
echo "Do you want to download it?"
select x in yes no
do
if [ ! -z $x ] ; then
break
fi
done
if [ $x == yes ] ; then
if [ ! -d "Downloads" ] ; then
mkdir $EPLF_PATH/Downloads
fi
cd $EPLF_PATH/Downloads
mkdir $EPLF_PATH/Downloads/tmp
cd $EPLF_PATH/Downloads/tmp
wget -nc "http://sourceforge.net/projects/ezfio/files/latest" && WHERE=`ls -tr | tail -1`
mv * $EPLF_PATH/Downloads
cd $EPLF_PATH/Downloads
rm -rf tmp
cd $EPLF_PATH
fi
if [ ! -z $WHERE ] ; then
echo EZFIO was downloaded to Downloads/$WHERE.
EZFIO=1
else
{ { echo "$as_me:$LINENO: error: EZFIO should be installed. You can download it at
http://sourceforge.net/projects/ezfio/files/latest" >&5
echo "$as_me: error: EZFIO should be installed. You can download it at
http://sourceforge.net/projects/ezfio/files/latest" >&2;}
{ (exit 1); exit 1; }; }
fi
else
{ { echo "$as_me:$LINENO: error: Please download EZFIO at
http://sourceforge.net/projects/ezfio/files/latest" >&5
echo "$as_me: error: Please download EZFIO at
http://sourceforge.net/projects/ezfio/files/latest" >&2;}
{ (exit 1); exit 1; }; }
fi
}
if [ -z $EZFIO ] ; then
{ { echo "$as_me:$LINENO: error: Download EZFIO.tar.gz into $PWD and run this configure script again." >&5
echo "$as_me: error: Download EZFIO.tar.gz into $PWD and run this configure script again." >&2;}
{ (exit 1); exit 1; }; }
fi
mv Downloads/EZFIO*.tar.gz .
fi
######################################################
# Check for MPI
EPLF_HAS_MPI=0
if [ -z "$STATIC" ] ; then
for ac_prog in mpirun mpiexec
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MPIRUN+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$MPIRUN"; then
ac_cv_prog_MPIRUN="$MPIRUN" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MPIRUN="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
MPIRUN=$ac_cv_prog_MPIRUN
if test -n "$MPIRUN"; then
echo "$as_me:$LINENO: result: $MPIRUN" >&5
echo "${ECHO_T}$MPIRUN" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$MPIRUN" && break
done
if [ ! -z $MPIRUN ] ; then
MPIRUN=`which $MPIRUN`
fi
for ac_prog in mpif90
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MPIFC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$MPIFC"; then
ac_cv_prog_MPIFC="$MPIFC" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MPIFC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
MPIFC=$ac_cv_prog_MPIFC
if test -n "$MPIFC"; then
echo "$as_me:$LINENO: result: $MPIFC" >&5
echo "${ECHO_T}$MPIFC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$MPIFC" && break
done
if [ -z $MPIFC ] ; then
echo "**************************"
echo "Warning: MPI not found. You can get OpenMPI at:"
echo "http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.1.tar.gz"
echo "**************************"
else
EPLF_HAS_MPI=1
fi
fi
# Test if Static zlib is present # Test if Static zlib is present
# ------------------------------ # ------------------------------
@ -2412,52 +2766,6 @@ fi
STATIC_LIB="../EZFIO/lib/libezfio_irp.a" STATIC_LIB="../EZFIO/lib/libezfio_irp.a"
SHARED_LIB="-L../EZFIO/lib -lezfio" SHARED_LIB="-L../EZFIO/lib -lezfio"
# Test IRPF90
# ------------
# Extract the first word of "irpf90", so it can be a program name with args.
set dummy irpf90; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_IRPF90+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$IRPF90"; then
ac_cv_prog_IRPF90="$IRPF90" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_IRPF90="yes"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_IRPF90" && ac_cv_prog_IRPF90="no"
fi
fi
IRPF90=$ac_cv_prog_IRPF90
if test -n "$IRPF90"; then
echo "$as_me:$LINENO: result: $IRPF90" >&5
echo "${ECHO_T}$IRPF90" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if [ $IRPF90 = no ] ; then
{ { echo "$as_me:$LINENO: error: Please install IRPF90:\nhttp://irpf90.sourceforge.net" >&5
echo "$as_me: error: Please install IRPF90:\nhttp://irpf90.sourceforge.net" >&2;}
{ (exit 1); exit 1; }; }
fi
IRPF90=`which irpf90`
# Test Fortran # Test Fortran
# ------------ # ------------
@ -2558,7 +2866,7 @@ fi
# Provide some information about the compiler. # Provide some information about the compiler.
echo "$as_me:2561:" \ echo "$as_me:2869:" \
"checking for Fortran compiler version" >&5 "checking for Fortran compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2` ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -2898,7 +3206,7 @@ case $FC in
fi fi
;; ;;
gfortran*) gfortran*)
FCFLAGS="O3 -ffast-math" FCFLAGS="-O3 -ffast-math"
if test $STATIC == 0 ; then if test $STATIC == 0 ; then
FCFLAGS="$FCFLAGS -static-libgcc -static" FCFLAGS="$FCFLAGS -static-libgcc -static"
fi fi
@ -2917,7 +3225,7 @@ else
===================================================== =====================================================
Using shared library. Add Using shared library. Add
$ROOT/EZFIO/lib/ $EPLF_PATH/EZFIO/lib/
to the LD_LIBRARY_PATH environment variable. to the LD_LIBRARY_PATH environment variable.
===================================================== =====================================================
@ -2926,7 +3234,7 @@ echo "$as_me: WARNING:
===================================================== =====================================================
Using shared library. Add Using shared library. Add
$ROOT/EZFIO/lib/ $EPLF_PATH/EZFIO/lib/
to the LD_LIBRARY_PATH environment variable. to the LD_LIBRARY_PATH environment variable.
===================================================== =====================================================
@ -2934,6 +3242,22 @@ echo "$as_me: WARNING:
fi fi
cd $EPLF_PATH
echo "export EPLF_PATH=$EPLF_PATH" > $HOME/.eplfrc
echo "export LD_LIBRARY_PATH=\$EPLF_PATH/EZFIO/lib/:\$LD_LIBRARY_PATH" >> $HOME/.qmcchemrc
echo "export PATH=\$PATH:\$EPLF_PATH/bin/" >> $HOME/.eplfrc
echo "export PATH=\$PATH:\$EPLF_PATH/scripts/" >> $HOME/.eplfrc
echo "export EPLF_HAS_MPI=$EPLF_HAS_MPI" >> $HOME/.eplfrc
echo "export EPLF_MPIRUN=$MPIRUN" >> $HOME/.eplfrc
echo "************************************"
echo "To finish the installation:"
echo "1) Add the following line to your $HOME/.basrhc file:"
echo ". $HOME/.eplfrc"
echo "2) Execute"
echo ". $HOME/.eplfrc"
echo "make"
echo "************************************"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure # tests run on this system so they can be shared between configure
@ -3569,7 +3893,8 @@ s,@ECHO_C@,$ECHO_C,;t t
s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_N@,$ECHO_N,;t t
s,@ECHO_T@,$ECHO_T,;t t s,@ECHO_T@,$ECHO_T,;t t
s,@LIBS@,$LIBS,;t t s,@LIBS@,$LIBS,;t t
s,@ROOT@,$ROOT,;t t s,@EPLF_PATH@,$EPLF_PATH,;t t
s,@EXE@,$EXE,;t t
s,@LN_S@,$LN_S,;t t s,@LN_S@,$LN_S,;t t
s,@RANLIB@,$RANLIB,;t t s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
@ -3580,7 +3905,12 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t s,@OBJEXT@,$OBJEXT,;t t
s,@WGET@,$WGET,;t t
s,@PYTHON@,$PYTHON,;t t
s,@IRPF90@,$IRPF90,;t t s,@IRPF90@,$IRPF90,;t t
s,@MPIRUN@,$MPIRUN,;t t
s,@MPIFC@,$MPIFC,;t t
s,@EPLF_HAS_MPI@,$EPLF_HAS_MPI,;t t
s,@FC@,$FC,;t t s,@FC@,$FC,;t t
s,@FCFLAGS@,$FCFLAGS,;t t s,@FCFLAGS@,$FCFLAGS,;t t
s,@ac_ct_FC@,$ac_ct_FC,;t t s,@ac_ct_FC@,$ac_ct_FC,;t t

View File

@ -114,7 +114,7 @@ fi
###################################################### ######################################################
# EZFIO # EZFIO
EZFIO=`ls EZFIO*.tar.gz` EZFIO=`ls EZFIO*.tar.gz | tail -1`
if [[ -z $EZFIO ]] ; then if [[ -z $EZFIO ]] ; then
AC_DOWNLOAD([EZFIO],[EZFIO],[http://sourceforge.net/projects/ezfio/files/latest]) AC_DOWNLOAD([EZFIO],[EZFIO],[http://sourceforge.net/projects/ezfio/files/latest])
if [[ -z $EZFIO ]] ; then if [[ -z $EZFIO ]] ; then