#!/bin/sh

echo -n 'What directory is the driver source located in? '
read sourcedir
ln -sf $sourcedir Driversrc

if [ -e config.h ]; then 
    rm -f config.h; 
fi
echo '/* Automatically generated by configure */' > config.h

if [ -e Driversrc/random.c ]; then
    echo 'Driver is version 3.2.1@120 or later, using random.c from driver'
    echo '#define ARANDOM' >> config.h
fi

echo -n 'Fix alignment of integers [try this if the erq crashes alot] (y/N)? '
read ans
if [ "$ans" = "y" -o "$ans" = "yes" ]; then
    echo '#define FIX_ALIGNMENT' >> config.h
fi

echo -n 'Debug mode (y/N)?'
read ans
if [ "$ans" = "y" -o "$ans" = "yes" ]; then
    echo '#define DEBUG' >> config.h
fi
