annotate contrib/splicex/configure @ 1259:06ea10662775 draft

update contact data for epoch
author epoch <epoch@hack.thebackupbox.net>
date Sat, 09 Oct 2021 09:20:40 +0000
parents 1dcc647991ca
children
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'
712
59babc5385d5 SpliceX fixed, old coding trim down with patch for --time option
d3v11 <d3v11@d3v11.ano>
parents: 706
diff changeset
20 echo
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
21 exit 1
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
22 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
23
701
2cbcd5edb31d SpliceX update
d3v11 <d3v11@d3v11.ano>
parents: 700
diff changeset
24 echo -ne ' checking for man...'
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
25 if which man >/dev/null; then
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
26 echo -ne ' OK'
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
27 echo
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
28 else
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
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
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
31 exit 1
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
32 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
33
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
34 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
35 echo -ne ' checking for cython...'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
36 if which cython >/dev/null; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
37 echo -ne ' OK'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
38 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
39 else
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
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
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
42 exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
43 fi
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
44 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
45
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
46 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
47 echo -ne ' checking for gcc...'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
48 if which gcc >/dev/null; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
49 echo -ne ' OK'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
50 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
51 else
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
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
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
54 exit 1
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
55 fi
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
56 fi
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
57
700
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
58 echo
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
59 echo -ne "configuring splicex: "
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
60 echo
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
61 echo -e " python version == $1"
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
62 echo -e " interpreter path == $PYPATH"
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
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
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
75 fi
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
76 echo
831
1dcc647991ca fixed build dir bug
d3v11 <d3v11@d3v11.ano>
parents: 712
diff changeset
77 mkdir -p build || exit 1
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
78 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
79 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
80 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
81 fi
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
82 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
83 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
84 echo -ne " generating Makefile..."
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
85 if [ -z "$2" ]; then
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
86 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
87 sed -i s^HEADERS^"$PYHEADERS"^g Makefile || exit 1
705
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
88 echo -ne ' DONE'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
89 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
90 else
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
91 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
92 echo -ne ' DONE'
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
93 echo
dc8f88270f6a SpliceX update: pyinstall added
d3v11 <d3v11@d3v11.ano>
parents: 701
diff changeset
94 fi
697
a554ba2c1e81 SpliceX now compiles to true binary
d3v11 <d3v11@d3v11.ano>
parents:
diff changeset
95 echo
700
e930c37c85dc SpliceX updates
d3v11 <d3v11@d3v11.ano>
parents: 697
diff changeset
96 echo -e 'splicex configured'