summaryrefslogtreecommitdiff
path: root/contrib/splicex/configure
diff options
context:
space:
mode:
authord3v11 <d3v11@d3v11.ano>2011-10-29 10:17:30 -0400
committerd3v11 <d3v11@d3v11.ano>2011-10-29 10:17:30 -0400
commit81aab712cfe805dc00010cb2ff5761787d0a4050 (patch)
tree61b67ad7fd6bd307c63653082c7ab34e9b27f09d /contrib/splicex/configure
parente04f0562d401b1d44c49f8a03e73cd8fdd27c0d4 (diff)
downloadresdb-81aab712cfe805dc00010cb2ff5761787d0a4050.tar.gz
resdb-81aab712cfe805dc00010cb2ff5761787d0a4050.zip
SpliceX update: pyinstall added
Diffstat (limited to 'contrib/splicex/configure')
-rwxr-xr-xcontrib/splicex/configure69
1 files changed, 47 insertions, 22 deletions
diff --git a/contrib/splicex/configure b/contrib/splicex/configure
index 2795772..535520e 100755
--- a/contrib/splicex/configure
+++ b/contrib/splicex/configure
@@ -1,11 +1,16 @@
#!/bin/bash
if [ -z "$1" ]; then
- echo 'usage: ./configure <python[version]>'
+ echo 'usage: ./configure <python[version]> {optional: <--no-compile>}'
+ exit 1
+fi
+
+if [ -n "$2" ] && [[ "$2" != *--no-compile* ]]; then
+ echo 'usage: ./configure <python[version]> {optional: <--no-compile>}'
exit 1
fi
echo -e 'checking dependencies: '
-echo -ne " checking for python as <$1>..."
+echo -ne " checking for python as <$1>..."
if which `which "$1"` >/dev/null; then
PYPATH=`which "$1"`
echo -ne ' OK'
@@ -24,32 +29,52 @@ else
exit 1
fi
-echo -ne ' checking for cython...'
-if which cython >/dev/null; then
- echo -ne ' OK'
- echo
-else
- echo -ne ' FAILED'
- exit 1
+if [ -z "$2" ]; then
+ echo -ne ' checking for cython...'
+ if which cython >/dev/null; then
+ echo -ne ' OK'
+ echo
+ else
+ echo -ne ' FAILED'
+ exit 1
+ fi
fi
-echo -ne ' checking for gcc...'
-if which gcc >/dev/null; then
- echo -ne ' OK'
- echo
-else
- echo -ne ' FAILED'
- exit 1
+if [ -z "$2" ]; then
+ echo -ne ' checking for gcc...'
+ if which gcc >/dev/null; then
+ echo -ne ' OK'
+ echo
+ else
+ echo -ne ' FAILED'
+ exit 1
+ fi
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 -e " python version == $1"
+echo -e " interpreter path == $PYPATH"
+if [ -z "$2" ]; then
+ echo -e " compiler flags == gcc -I/usr/include/$1"
+fi
+echo
+if [ -z "$2" ]; then
+ sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex || exit 1
+ sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow || exit 1
+fi
+sed -e s^PYTHON^"$PYPATH"^g src/splicex.pyx >build/splicex.pyx || exit 1
+sed -e s^PYTHON^"$PYPATH"^g src/deshadow.pyx >build/deshadow.pyx || exit 1
+echo -ne " generating Makefile..."
+if [ -z "$2" ]; then
+ sed -e s^PYTHON^"$1"^g src/make.in >Makefile || exit 1
+ echo -ne ' DONE'
+ echo
+else
+ sed -e s^PYTHON^"$1"^g src/pymake.in >Makefile || exit 1
+ echo -ne ' DONE'
+ echo
+fi
echo
echo -e 'splicex configured'