#!/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/pcrcFortran/pcrc.inc ]
then 
  $FCL @FC_OPT@ -I${working_dir}/src/pcrcFortran -I@MPI_INC@ -L@MPI_LIB@ -L${working_dir}/src/pcrcFortran -L${working_dir}/src/kernel $* -lpcrcf -ladlib @LIBKEY@ @CXXLIBKEY@
else
  $FCL @FC_OPT@ -I${prefix}/include -I@MPI_INC@ -L@MPI_LIB@ -L{exec_prefix}/lib $* -lpcrcf -ladlib @LIBKEY@ @CXXLIBKEY@
fi
