annotate contrib/splicex/configure @ 705:dc8f88270f6a draft

SpliceX update: pyinstall added
author d3v11 <d3v11@d3v11.ano>
date Sat, 29 Oct 2011 10:17:30 -0400
parents 2cbcd5edb31d
children de6fd9fc14e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
1 #!/bin/bash
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
2 if [ -z "$1" ]; then
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
3 echo 'usage: ./configure <python[version]> {optional: <--no-compile>}'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
4 exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
5 fi
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
6
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
7 if [ -n "$2" ] && [[ "$2" != *--no-compile* ]]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
8 echo 'usage: ./configure <python[version]> {optional: <--no-compile>}'
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
9 exit 1
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
10 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
11
701
2cbcd5edb31d SpliceX update
d3v11 <d3v11@d3v11.ano>
parents: 700
diff changeset
12 echo -e 'checking dependencies: '
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
13 echo -ne " checking for python as <$1>..."
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
14 if which `which "$1"` >/dev/null; then
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
15 PYPATH=`which "$1"`
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
16 echo -ne ' OK'
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
17 echo
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
18 else
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
19 echo -ne ' FAILED'
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
20 exit 1
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
21 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
22
701
2cbcd5edb31d SpliceX update
d3v11 <d3v11@d3v11.ano>
parents: 700
diff changeset
23 echo -ne ' checking for man...'
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
24 if which man >/dev/null; then
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
25 echo -ne ' OK'
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
26 echo
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
27 else
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
28 echo -ne ' FAILED'
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
29 exit 1
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
30 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
31
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
32 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
33 echo -ne ' checking for cython...'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
34 if which cython >/dev/null; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
35 echo -ne ' OK'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
36 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
37 else
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
38 echo -ne ' FAILED'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
39 exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
40 fi
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
41 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
42
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
43 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
44 echo -ne ' checking for gcc...'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
45 if which gcc >/dev/null; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
46 echo -ne ' OK'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
47 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
48 else
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
49 echo -ne ' FAILED'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
50 exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
51 fi
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
52 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
53
700
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
54 echo
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
55 echo -ne "configuring splicex: "
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
56 echo
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
57 echo -e " python version == $1"
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
58 echo -e " interpreter path == $PYPATH"
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
59 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
60 echo -e " compiler flags == gcc -I/usr/include/$1"
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
61 fi
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
62 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
63 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
64 sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex || exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
65 sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow || exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
66 fi
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
67 sed -e s^PYTHON^"$PYPATH"^g src/splicex.pyx >build/splicex.pyx || exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
68 sed -e s^PYTHON^"$PYPATH"^g src/deshadow.pyx >build/deshadow.pyx || exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
69 echo -ne " generating Makefile..."
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
70 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
71 sed -e s^PYTHON^"$1"^g src/make.in >Makefile || exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
72 echo -ne ' DONE'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
73 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
74 else
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
75 sed -e s^PYTHON^"$1"^g src/pymake.in >Makefile || exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
76 echo -ne ' DONE'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
77 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
78 fi
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
79 echo
700
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
80 echo -e 'splicex configured'