head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	2005.04.30.13.38.08;	author tron;	state dead;
branches;
next	1.2;

1.2
date	2001.03.24.09.13.51;	author tron;	state Exp;
branches;
next	1.1;

1.1
date	2001.03.23.15.02.54;	author tron;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Zoularis is obsolete for a very long time.
@
text
@#!/bin/sh
#
#	$NetBSD: configure,v 1.2 2001/03/24 09:13:51 tron Exp $
#
#	Simple configuration script for Zoularis

if [ "X$PREFIX" = X ]
then
 PREFIX=/usr/local
 export PREFIX
fi

if [ "X$SRCDIR" = X ]
then
 SRCDIR=/usr/src
 export SRCDIR
fi

PROGNAME="`basename $0`"
export PROGNAME

while [ $# -gt 0 ]
do
 case "$1" in
 --prefix=* )
  PREFIX=`echo "$1" | sed -e 's/.*=//'`
 ;;
 --prefix )
  shift
  if [ $# -eq 0 ]
  then
   echo "${PROGNAME}: missing parameter for \"--prefix\"." >&2
   exit 1
  fi
  PREFIX=$1
  ;;
 --srcdir=* )
  SRCDIR=`echo "$1" | sed -e 's/.*=//'`
 ;;
 --srcdir )
  shift
  if [ $# -eq 0 ]
  then
   echo "${PROGNAME}: missing parameter for \"--srcdir\"." >&2
   exit 1
  fi
  SRCDIR=$1
  ;;
 --help )
  echo "Usage: ${PROGNAME} [--prefix=...] [--srcdir=...]" >&2
  exit 0
  ;;
 * )
  echo "${PROGNAME}: invalid argument \"$1\", try \"${PROGNAME} --help\"."
  exit 1
 esac
 shift
done

echo "Zoularis will be installed to \"${PREFIX}/bsd\"."

if [ ! -f $SRCDIR/usr.bin/make/Makefile ]
then
 echo "${PROGNAME}: cannot find NetBSD sources in directory \"$SRCDIR\"." 2>&1
 exit 1
fi
echo "NetBSD sources are located in directory \"$SRCDIR\"."

case `uname -s` in
Linux )
 AWK=awk
 INSTALL=/usr/bin/install
 MACHINE=`uname -m | sed -e 's/^i.86$/i386/'`
 MACHINE_ARCH=${MACHINE}
 NEEDTAR=
 ;;
SunOS )
 AWK=nawk
 INSTALL=/usr/ucb/install
 MACHINE=`uname -p`
 MACHINE_ARCH=${MACHINE}
 NEEDTAR=tar
 ;;
* )
 echo "${PROGNAME}: `uname -s` is not supported by Zoularis." 2>&1
 exit 1
 ;;
esac

rm -f Makefile.inc
sed -e "s#@@DESTDIR@@#${PREFIX}#g" \
    -e "s#@@BSDSRCDIR@@#${SRCDIR}#g" \
    -e "s#@@AWK@@#${AWK}#g" \
    -e "s#@@INSTALL@@#${INSTALL}#g" \
    -e "s#@@MACHINE@@#${MACHINE}#g" \
    -e "s#@@MACHINE_ARCH@@#${MACHINE_ARCH}#g" \
    -e "s#@@NEEDTAR@@#${NEEDTAR}#g" Makefile.inc.in >Makefile.inc

echo ""
echo "A \"Makefile.inc\" for your system was generated."

exit 0
@


1.2
log
@Make check for NetBSD sources less simpler so that it will recognize if
somebody has only the kernel sources.
@
text
@d3 1
a3 1
#	$NetBSD: configure,v 1.1 2001/03/23 15:02:54 tron Exp $
@


1.1
log
@Replace "Makefile.in" which need to be edited by hand with a "configure"
script.
@
text
@d3 1
a3 1
#	$NetBSD$
d62 1
a62 1
if [ ! -f $SRCDIR/Makefile ]
@

