#!/bin/sh
#
#	$Id: Config,v 1.19 2000/05/30 01:23:06 forys Exp $
#
#	Configure - edit skill Makefile filling in OSTYPE, COPTS, and LIBS.
#	Contributed by: Ric Anderson <ric@rtd.com>
#
OSTYPE=
COPTS=
LIBS=

SYS=`sh GuessOS 2>/dev/null`
case $SYS in
    bsd42)
	OSTYPE=bsd-43 COPTS=-DNO_UID_T
	;;

    bsd43)
	OSTYPE=bsd-43
	;;

    bsd44)
	OSTYPE=bsd-44 LIBS=-lkvm
	;;

    sos3)
	OSTYPE=sunos-3
	;;

    sos4)
	OSTYPE=sunos-40 LIBS=-lkvm
	;;

    sos4_1)
	OSTYPE=sunos-41 LIBS=-lkvm
	;;

    dynix3)
	OSTYPE=dynix-3
	;;

    osx*)
	OSTYPE=osx-4
	;;

    svr*)
	OSTYPE=sys-5r4
	;;

    hpux6)
	OSTYPE=hpux-70 COPTS=-DNO_UID_T
	;;

    hpux7)
	OSTYPE=hpux-70
	;;

    hpux8|hpux9)
	OSTYPE=hpux-91
	;;

    hpux*)
	OSTYPE=hpux-10
	;;

    linux*)
	OSTYPE=linux-1 COPTS=-O3 LIBS="-s -N"
	;;

    mach2)
	OSTYPE=mach-26 LIBS=-lsys
	;;

    mach3)
	OSTYPE=mach-3
	;;

    next1)
	OSTYPE=mach-26
	;;

    next*)
	OSTYPE=next-2
	;;

    umips*)
	OSTYPE=umips-21 LIBS=-lmld
	;;

    ultrix2)
	OSTYPE=ultrix-22
	;;

    ultrix4)
	OSTYPE=ultrix-4
	;;

    aos43)
	OSTYPE=aos-43
	;;

    aix3)
	OSTYPE=aix-3
	;;

    irix3)
	OSTYPE=irix-3 LIBS=-lmld
	;;

    irix4)
	OSTYPE=irix-4 LIBS=-lmld
	;;

    irix*)
	OSTYPE=irix-5
	;;

    umax42)
	OSTYPE=umax-42 COPTS=-DNO_UID_T
	;;

    *)
	echo Config: unknown system type: $SYS
	exit 1
	;;
esac
echo Configuring as ${SYS}: OSTYPE=${OSTYPE} COPTS=${COPTS} LIBS=${LIBS}
chmod u+w Makefile
ed - Makefile <<EOS
/^OSTYPE=/c
OSTYPE=	${OSTYPE}
.
/^COPTS=/c
COPTS=	${COPTS}
.
/^LIBS=/c
LIBS=	${LIBS}
.
w
q
EOS
