#!/bin/sh

OS=`uname -s`;

if [ -z "$1" ]
then

echo "LIBCGI - configuration script";
echo "-----------------------------";
echo "usage:   $0 <installation directory> [debug]";
echo "example: $0 /usr/local debug";
echo "";

else

echo "prefix  = $1";
echo "PREFIX=$1" > config.h

echo "system  = $OS";

if [ "$2" = "debug" ]
then
echo "debug   = enabled";
echo "DEBUG=\$(DEBUG_YES)" >> config.h
else
echo "debug   = disabled";
echo "DEBUG=\$(DEBUG_NO)" >> config.h
fi

echo "";
echo "Please run 'make'";
echo "";
fi
