697
|
1 #!/bin/bash |
|
2 if [ -z "$1" ]; then |
|
3 echo 'usage: ./configure <python[version]>' |
|
4 exit 1 |
|
5 fi |
|
6 |
701
|
7 echo -e 'checking dependencies: ' |
|
8 echo -ne " checking for python as <$1>..." |
697
|
9 if which `which "$1"` >/dev/null; then |
|
10 PYPATH=`which "$1"` |
|
11 echo -ne ' OK' |
|
12 echo |
|
13 else |
|
14 echo -ne ' FAILED' |
|
15 exit 1 |
|
16 fi |
|
17 |
701
|
18 echo -ne ' checking for man...' |
697
|
19 if which man >/dev/null; then |
|
20 echo -ne ' OK' |
|
21 echo |
|
22 else |
|
23 echo -ne ' FAILED' |
|
24 exit 1 |
|
25 fi |
|
26 |
701
|
27 echo -ne ' checking for cython...' |
697
|
28 if which cython >/dev/null; then |
|
29 echo -ne ' OK' |
|
30 echo |
|
31 else |
|
32 echo -ne ' FAILED' |
|
33 exit 1 |
|
34 fi |
|
35 |
701
|
36 echo -ne ' checking for gcc...' |
697
|
37 if which gcc >/dev/null; then |
|
38 echo -ne ' OK' |
|
39 echo |
|
40 else |
|
41 echo -ne ' FAILED' |
|
42 exit 1 |
|
43 fi |
|
44 |
700
|
45 echo |
|
46 echo -ne "configuring splicex: " |
|
47 echo |
|
48 echo -e " python version == $1" |
|
49 echo -e " interpreter path == $PYPATH" |
|
50 echo -e " compiler flags == gcc -I/usr/include/$1" |
697
|
51 sed -e s^PYTHON^"$1"^g src/make.in >Makefile |
|
52 sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex |
|
53 sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow |
|
54 echo |
700
|
55 echo -e 'splicex configured' |