#!/bin/sh

working_dir=@CWD@

prefix=@prefix@
exec_prefix=@exec_prefix@


FCL="@FCL@"

if [ $# = 1 -a $1 = -f ]
then
  echo "$FCL"
  exit 0
fi

if [ -f ${working_dir}/src/shpfFortran/shpf.C ]
then 
  $FCL @FC_OPT@ -I${working_dir}/src/shpfFortran -I@MPI_INC@ -L@MPI_LIB@ -L${working_dir}/src/shpfFortran -L${working_dir}/src/kernel $* -ladaptf -ladlib @LIBKEY@ @CXXLIBKEY@
else
  $FCL @FC_OPT@ -I${prefix}/include -I@MPI_INC@ -L@MPI_LIB@ -L{exec_prefix}/lib $* -ladaptf -ladlib @LIBKEY@ @CXXLIBKEY@
fi
