# -*- shell-script -*-

lrde=/home/lrde/admin/lrde

echo "Loading config.site for $PACKAGE_TARNAME"
echo "(srcdir: $srcdir)"
echo

# Find what package we are dealing with.
# What is the upper package?
upper=$(sed -rne 's/AC_INIT\(\[?([^][,]*)\]?,.*/\1/p' $srcdir/../configure.ac)

case $PACKAGE_TARNAME:$upper in
  transformers:* | *:transformers)
    package=transformers
    ;;

  tiger:* | *:tiger)
    package=tiger-in-stratego
    ;;

  *)
    package=$PACKAGE_TARNAME
    ;;
esac

figlet "config.site: $package ($PACKAGE_TARNAME)"

case $package in
    tiger-in-stratego)
    # Use the cache.
    cache_file=config.cache

    # with_sdf=$lrde/usr/Sdf
    with_strategoxt=$lrde/usr/stratego
    with_aterm=$with_strategoxt
    with_pgen=$with_strategoxt
    with_sglr=$with_strategoxt
    ;;

    transformers)
    # Use the cache.
    cache_file=config.cache

    set -x
    with_strategoxt=$lrde/usr/stratego
    with_aterm=$with_strategoxt
    with_sdf=$with_strategoxt
    ;;
esac


if test -f $srcdir/config.site; then
  echo "Loading local $srcdir/config.site"
  . $srcdir/config.site
fi

set +vx
