#!/bin/sh
#  Copyright 1997, Richard M. Troth, all rights reserved.   <plaintext>
#
#	  Name: configure (shell script)
#		set-up 'sendfile' source directory for [re]making
#	Author: Rick Troth, Houston, Texas, USA
#	  Date: 1997-Feb-02
#
 
CFLAGS=""
LDFLAGS=""
LIBS=""
 
UNAME=`uname`
echo "CONFIGURE: setting up 'sendfile' for $UNAME ..."
 
if [ "$UNAME" = "VM/ESA" ]; then
	CFLAGS="-DOECS -D_OE_SOCKETS"
	LIBS="-l//posxsock -l//vmmtlib"
	fi
if [ "$UNAME" = "SunOS" ]; then
	LIBS="-lsocket -lnsl"; fi
 
echo "# this file generated by $0:" > makefile
echo "# `date`" >> makefile
#cat makefile.in | grep -v "^#" \
#	| sed "s.\$(LDFLAGS).$LDFLAGS.g" \
#	| sed "s.\$(LIBS).$LIBS.g" \
#	| sed "s.\$(CFLAGS).$CFLAGS.g" >> makefile
grep -v "^#" < makefile.in > makefile.t1
sed "s.\$(LDFLAGS).$LDFLAGS.g" < makefile.t1 > makefile.t2
rm makefile.t1
sed "s.\$(LIBS).$LIBS.g" < makefile.t2 > makefile.t3
rm makefile.t2
sed "s.\$(CFLAGS).$CFLAGS.g" makefile.t3 >> makefile
rm makefile.t3
 
make clean 1>/dev/null 2>/dev/null
 
echo "CONFIGURE: done."
 
exit
 
 
