Mercurial > hg > anonet-resdb
annotate contrib/splicex/configure @ 819:f1f0ab9d41b7 draft
i changed the she-bang on configure from sh to bash because it
keeps giving people trouble:
/CA/pikaj00> ./configure: 132: Bad substitution
/CA/pikaj00> root@pikaj00-M-7323U:/services/ircd/resdb#
/relayhell/d3v11> use
/relayhell/d3v11> bash configure
/relayhell/d3v11> did you run that command on slackware?
/relayhell/d3v11> ./configure?
/CA/pikaj00> sorry
/CA/pikaj00> one sec
/CA/pikaj00> yes
/relayhell/d3v11> LOL
/relayhell/d3v11> then the problem is not ubuntu or debian
/CA/shuttle> =)
/relayhell/d3v11> if slackware has the same problem
/CA/pikaj00> bash
/CA/shuttle> what do you think pik
/CA/pikaj00> worked
author | d3v11 <d3v11@d3v11.ano> |
---|---|
date | Sat, 10 Dec 2011 22:23:18 +0000 |
parents | 59babc5385d5 |
children | 1dcc647991ca |
rev | line source |
---|---|
697 | 1 #!/bin/bash |
2 if [ -z "$1" ]; then | |
705 | 3 echo 'usage: ./configure <python[version]> {optional: <--no-compile>}' |
4 exit 1 | |
5 fi | |
6 | |
7 if [ -n "$2" ] && [[ "$2" != *--no-compile* ]]; then | |
8 echo 'usage: ./configure <python[version]> {optional: <--no-compile>}' | |
697 | 9 exit 1 |
10 fi | |
11 | |
701 | 12 echo -e 'checking dependencies: ' |
705 | 13 echo -ne " checking for python as <$1>..." |
697 | 14 if which `which "$1"` >/dev/null; then |
15 PYPATH=`which "$1"` | |
16 echo -ne ' OK' | |
17 echo | |
18 else | |
19 echo -ne ' FAILED' | |
712
59babc5385d5
SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents:
706
diff
changeset
|
20 echo |
697 | 21 exit 1 |
22 fi | |
23 | |
701 | 24 echo -ne ' checking for man...' |
697 | 25 if which man >/dev/null; then |
26 echo -ne ' OK' | |
27 echo | |
28 else | |
29 echo -ne ' FAILED' | |
712
59babc5385d5
SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents:
706
diff
changeset
|
30 echo |
697 | 31 exit 1 |
32 fi | |
33 | |
705 | 34 if [ -z "$2" ]; then |
35 echo -ne ' checking for cython...' | |
36 if which cython >/dev/null; then | |
37 echo -ne ' OK' | |
38 echo | |
39 else | |
40 echo -ne ' FAILED' | |
712
59babc5385d5
SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents:
706
diff
changeset
|
41 echo |
705 | 42 exit 1 |
43 fi | |
697 | 44 fi |
45 | |
705 | 46 if [ -z "$2" ]; then |
47 echo -ne ' checking for gcc...' | |
48 if which gcc >/dev/null; then | |
49 echo -ne ' OK' | |
50 echo | |
51 else | |
52 echo -ne ' FAILED' | |
712
59babc5385d5
SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents:
706
diff
changeset
|
53 echo |
705 | 54 exit 1 |
55 fi | |
697 | 56 fi |
57 | |
700 | 58 echo |
59 echo -ne "configuring splicex: " | |
60 echo | |
705 | 61 echo -e " python version == $1" |
62 echo -e " interpreter path == $PYPATH" | |
63 if [ -z "$2" ]; then | |
706
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
64 if [ -e /usr/include/"$1"/Python.h ] && [ -e /usr/include/"$1"/structmember.h ]; then |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
65 PYHEADERS="/usr/include/$1" |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
66 echo -e " compiler flags == gcc -I /usr/include/$1" |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
67 elif [ -e /usr/local/include/"$1"/Python.h ] && [ -e /usr/local/include/"$1"/structmember.h ]; then |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
68 PYHEADERS="/usr/local/include/$1" |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
69 echo -e " compiler flags == gcc -I /usr/local/include/$1" |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
70 else |
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
71 echo -e " Python.h and structmember.h could not be found... FAILED" |
712
59babc5385d5
SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents:
706
diff
changeset
|
72 echo |
59babc5385d5
SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents:
706
diff
changeset
|
73 exit 1 |
706
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
74 fi |
705 | 75 fi |
76 echo | |
77 if [ -z "$2" ]; then | |
78 sed -e s^PYTHON^"$PYPATH"^g src/splicex.py >build/splicex || exit 1 | |
79 sed -e s^PYTHON^"$PYPATH"^g src/splicex-deshadow.py >build/splicex-deshadow || exit 1 | |
80 fi | |
81 sed -e s^PYTHON^"$PYPATH"^g src/splicex.pyx >build/splicex.pyx || exit 1 | |
82 sed -e s^PYTHON^"$PYPATH"^g src/deshadow.pyx >build/deshadow.pyx || exit 1 | |
83 echo -ne " generating Makefile..." | |
84 if [ -z "$2" ]; then | |
85 sed -e s^PYTHON^"$1"^g src/make.in >Makefile || exit 1 | |
706
de6fd9fc14e5
SpliceX patched compiler for /path/to/Python.h and /path/to/structmember.h
d3v11 <d3v11@d3v11.ano>
parents:
705
diff
changeset
|
86 sed -i s^HEADERS^"$PYHEADERS"^g Makefile || exit 1 |
705 | 87 echo -ne ' DONE' |
88 echo | |
89 else | |
90 sed -e s^PYTHON^"$1"^g src/pymake.in >Makefile || exit 1 | |
91 echo -ne ' DONE' | |
92 echo | |
93 fi | |
697 | 94 echo |
700 | 95 echo -e 'splicex configured' |