#! /bin/sh
#
# The idea to this kind of setup info script was stolen from numerous
# other packages, such as neon, libxml and gnome.
#
# $Id: rexxwrapper-config.in,v 1.2 2003/01/05 01:31:19 mark Exp $
#
prefix=@prefix@

usage()
{
   cat <<EOF
Usage: rexxwrapper-config [OPTION]

Available values for OPTION include:

  --help      display this help and exit
  --sourcedir directory where Rexx/Wrapper is installed
              [$prefix/share/rexxwrapper]
  --version   output version information
              [@VER_DOT@]
  --verdate   output the version date
              [@VER_DATE@]
EOF

   exit $1
}

if test $# -eq 0; then
   usage 1
fi

while test $# -gt 0; do
   case "$1" in
   # this deals with options in the style
   # --option=value and extracts the value part
   # [not currently used]
      -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
      *) value= ;;
   esac

   case "$1" in
      --sourcedir)
         echo $prefix/share/rexxwrapper
         ;;

      --version)
         echo @VER_DOT@
         ;;

      --verdate)
         echo @VER_DATE@
         ;;

      --help)
         usage 0
         ;;

      *)
         usage
         exit 1
         ;;
   esac
   shift
done

exit 0
