view contrib/splicex/configure @ 704:0d4280abf12d draft

Merge commit 'e04f0562d401b1d44c49f8a03e73cd8fdd27c0d4'
author Nick <nick@somerandomnick.ano>
date Fri, 28 Oct 2011 09:12:04 +0000
parents 2cbcd5edb31d
children dc8f88270f6a
line wrap: on
line source

#!/bin/bash
if [ -z "$1" ]; then
 echo 'usage: ./configure <python[version]>'
 exit 1
fi

echo -e 'checking dependencies: '
echo -ne "      checking for python as <$1>..."
if which `which "$1"` >/dev/null; then
 PYPATH=`which "$1"`
 echo -ne ' OK'
 echo
else
 echo -ne ' FAILED'
 exit 1
fi

echo -ne '	checking for man...'
if which man >/dev/null; then
 echo -ne ' OK'
 echo
else
 echo -ne ' FAILED'
 exit 1
fi

echo -ne '	checking for cython...'
if which cython >/dev/null; then
 echo -ne ' OK'
 echo
else
 echo -ne ' FAILED'
 exit 1
fi

echo -ne '	checking for gcc...'
if which gcc >/dev/null; then
 echo -ne ' OK'
 echo
else
 echo -ne ' FAILED'
 exit 1
fi

echo
echo  -ne "configuring splicex: "
echo
echo -e "       python version == $1"
echo -e "       interpreter path == $PYPATH"
echo -e "       compiler flags == gcc -I/usr/include/$1"
sed -e s^PYTHON^"$1"^g src/make.in >Makefile
sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex
sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow
echo
echo -e 'splicex configured'