#! /bin/sh
echo "/* config.h, automatically generated by Configure. */" > config.h
echo "#define C_USER \""`whoami`\" >> config.h
#echo `whoami`\" >> config.h
echo "#define C_HOST \""`uname -mnrs`\" >> config.h
echo "#define C_TIME \""`date`\" >> config.h
echo -n "Enter the address of the port that you want to use [0x3bc] "
read PORT
echo -n "#define PORT " >> config.h
if [ -z "$PORT" ];
then
	PORT=0x3bc
fi
echo $PORT >> config.h
PORTSTR=$PORT
echo "#define PORTSTR \"$PORTSTR\"" >> config.h
echo -n "Enter the update-delay in seconds [60] "
read DELAY
echo -n "#define DELAY " >> config.h
if [ -z "$DELAY" ];
then
        DELAY=60
fi
echo $DELAY >> config.h
echo Configured for port $PORT with an update-delay of $DELAY seconds.
echo Now do a 'make' or 'make vboxcountd' for just getting the executable,
echo or run 'make install' to get vboxcountd installed.
