#!/bin/sh

PREFIX=${PREFIX:-.}
echo using PREFIX=$PREFIX

NEEDFLOWERVER=1.0.25
flowertar=flower-$NEEDFLOWERVER
here=`pwd`
cd ..
if [ -x flower ]
then
    echo Found flowerdir
else

    if [ ! -d $flowertar ]
    then
	echo "can't find $flowertar"
	exit 1;
    fi
    rm flower
    ln -s $flowertar flower

fi
echo Compiling Library
(cd flower;make)

cd $here

echo '#define LIBDIR "'$PREFIX'/"'> hdr/config.hh
touch Site.make
make -f Initial.make
