#! /bin/csh -f
# Script to `configure' HODGE-C
# $Id: configure,v 1.1 1993/03/16 10:35:58 joke Exp $
#
set default=sunos
set ostype=$default
set configdir=./config
set srcdir=.
set package=HODGE-C
#
top:
if ($#argv > 0) then
    switch ($1:q)

    case --*:
	set ostype = "$1:q"
	shift
	goto top

    default:
	goto usage
    endsw
endif

rm -f $srcdir/config.h
if ("$ostype" == "--sunos") then
    ln -s $configdir/sunos.cf $srcdir/config.h
    echo "$package configured for SunOS."
    goto done
endif

if ("$ostype" == "--solaris") then
    ln -s $configdir/sunos.cf $srcdir/config.h
    echo "$package configured for SunOS/Solaris."
    goto done
endif

if ("$ostype" == "--unix") then
    echo "try either: configure --bsd, or: configure --sys5"
    goto done
endif

if ("$ostype" == "--sys5") then
    ln -s $configdir/sys5.cf $srcdir/config.h
    echo "$package configured for generic unix system V."
    goto done
endif

if ("$ostype" == "--bsd") then
    ln -s $configdir/bsd.cf $srcdir/config.h
    echo "$package configured for generic BSD unix."
    goto done
endif

usage:
    echo "usage: configure --<os-type>	(eg. configure --sunos)"

done:
