#!/bin/sh
# configure script for the orb package, Max Neunhoeffer
# usage: ./configure GAPPATH
# this script creates a "Makefile" from "Makefile.in"
if [ x"$1" = "x" ]; then 
    GAPPATH=../..
    echo "Using ../.. as default GAPPATH" 
else 
    GAPPATH=$1
fi
if [ ! -e $GAPPATH/sysinfo.gap ]; then
    echo
    echo "Usage: ./configure GAPPATH"
    echo "       where GAPPATH is a path to your GAP installation"
    echo
    echo Either your GAPPATH is incorrect or the GAP it is pointing to
    echo is not properly compiled. Do '\"./configure ; make\"' there first.
    echo
    echo Aborting... No Makefile is generated.
    echo
    exit 1
fi
rm -f Makefile
. $GAPPATH/sysinfo.gap
GAParchprot="$GAParch"
echo GAPPATH=$GAPPATH >Makefile
sed -e "s/@GAPARCH@/$GAParchprot/g" <Makefile.in >>Makefile
