Commit 7ca0b6fb authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

properly handle cases in which the user has set FC but not

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.
TF_LINK_FORTRAN


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 5359
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent c95b65f9
...@@ -20,27 +20,43 @@ ...@@ -20,27 +20,43 @@
# #
# current directory: # current directory:
CURRENTDIR=$(pwd) CURRENTDIR=$(pwd)
#
# save values of LOCLIBDIR and LOCBINDIR if provided by the user
export SERVERLIBDIR="${LOCLIBDIR}:${SERVERLIBDIR}" export SERVERLIBDIR="${LOCLIBDIR}:${SERVERLIBDIR}"
export SERVERINCLUDEDIR="${LOCINCLUDEDIR}:${SERVERINCLUDEDIR}" export SERVERINCLUDEDIR="${LOCINCLUDEDIR}:${SERVERINCLUDEDIR}"
#
# set default values for local installation in subdirectories
export LOCBINDIR=${CURRENTDIR}/bin export LOCBINDIR=${CURRENTDIR}/bin
export LOCLIBDIR=${CURRENTDIR}/lib export LOCLIBDIR=${CURRENTDIR}/lib
export LOCINCLUDEDIR=${CURRENTDIR}/include export LOCINCLUDEDIR=${CURRENTDIR}/include
export TF_WWWBASEDIR=${CURRENTDIR}/doc export TF_WWWBASEDIR=${CURRENTDIR}/doc
export TF_BROWSER=firefox export TF_BROWSER=firefox
#
# For linking C++ code against Fortran libraries, TF_LINK_FORTRAN
# is required, which depends on the Fortran compiler in use.
# First set Fortran compiler, then TF_LINK_FORTRAN
if test ! -x "${FC}" if test ! -x "${FC}"
then then
echo FC has to be set if test -x "$(which gfortran 2>/dev/null)"
if test -x "$(which f77)" then
export FC=$(which gfortran)
elif test -x "$(which g77 2>/dev/null)"
then
export FC=$(which g77)
elif test -x "$(which f77 2>/dev/null)"
then
export FC=$(which f77)
fi
fi
#
if test -x "${FC}" -a ! -n "${TF_LINK_FORTRAN}"
then
if test ${FC} = "$(which g77 2>/dev/null)"
then then
export FC="$(which f77)" export TF_LINK_FORTRAN=-lg2c
elif test -x "$(which gfortran)" elif test ${FC} = "$(which gfortran 2>/dev/null)"
then then
export FC="$(which gfortran)" export TF_LINK_FORTRAN=-lgfortran
if test ! -n "${TF_LINK_FORTRAN}"
then
export TF_LINK_FORTRAN=-lgfortran
fi
fi fi
fi fi
echo FC set to $FC
# ----- END OF install.bashrc ----- # ----- END OF install.bashrc -----
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