#!/bin/sh
# configure script for IO package, Max Neunhoeffer
# usage: ./configure gappath
# this script creates a `Makefile' from `Makefile.in'
if [ x"$1" = "x" ]; then 
    GAPPATH=../.. 
    echo "Using ../.. as default GAP path"
else 
    GAPPATH=$1 
fi
PKGIOPATH=`pwd`
. $GAPPATH/sysinfo.gap
GAPARCH=$GAParch
export GAPPATH
export PKGIOPATH
export GAPARCH
if test ! -d bin; then mkdir bin; fi
if test ! -d bin/$GAParch; then 
    mkdir bin/$GAParch;
fi
cp cnf/configure bin/$GAParch
cp cnf/ioconfig.hin bin/$GAParch
cd bin/$GAPARCH
./configure --config-cache
#rm -f Makefile
#echo GAPPATH=$GAPPATH >Makefile
#echo PKGIOPATH=$PKGIOPATH >>Makefile
#sed -e "s/@GAPARCH@/$GAParch/g" <Makefile.in >>Makefile

