#! /bin/sh

cppsim_root=${CPPSIMHOME-$HOME/CppSim}
if [ -z "$CPPSIMHOME" ]; then export CPPSIMHOME=$cppsim_root; fi
cppsimshared_root=${CPPSIMSHAREDHOME-$cppsim_root/CppSimShared}
if [ -z "$CPPSIMSHAREDHOME" ]; then export CPPSIMSHAREDHOME=$cppsimshared_root; fi

expand_tilde () { eval "$1=$2" ; }
expand_tilde cppsimshared_root $cppsimshared_root

ARCH=`arch`

if [ "$ARCH" = "i686" ] 
   then
   ${cppsimshared_root}/Sue2/bin/glnx86/check_dependencies_or_name_clashes $1 $2 $3 $4 $5
else
if [ "$ARCH" = "x86_64" ] 
   then
   ${cppsimshared_root}/Sue2/bin/glnxa64/check_dependencies_or_name_clashes $1 $2 $3 $4 $5
else
if [ "$ARCH" = "i386" ] 
   then
   ${cppsimshared_root}/Sue2/bin/macosx/check_dependencies_or_name_clashes $1 $2 $3 $4 $5
else
   echo "Error: architecture $ARCH unknown"
fi
fi
fi
