2 # This file is in the public domain.
3 echo "Removing folder 'libltdl'..."
6 echo "checking for libtoolize / libtool... "
8 # This is more portable than `which' but comes with
9 # the caveat of not(?) properly working on busybox's ash:
12 command -v "$1" >/dev/null 2>&1
15 if existence libtool || existence libtoolize || existence glibtoolize; then
19 echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
23 # autotools is being incredible stupid with multiple python versions
24 # what we do here is check for a functional python 2.7 which reports
25 # back to be a real python 2.7, then later on sed the location in
26 # the only python 2.7 file we keep around
27 # the rest of the build system can then be happy detecting 3.7 or
29 # this checks a range of names which is as annoying as what autotools
31 # Since everything we could try is do too much work, we will assume
32 # that python2 OR python2.7 are the names for python 2.7.
33 # If your system diverges, please sed it accordingly!
34 echo "save python 2.7 location into src/util/python27_location"
35 #if existence python2 || existence python2.7; then
39 "$1" -c "print(__import__('sys').version)" | grep -Z "2.7" | cut -c1-3
42 if existence python; then
43 if [ ! -z "${python_version} python" ]; then
44 loc1=$(command -v python)
45 echo "$loc1" >./src/util/python27_location
47 elif existence python2; then
48 if [ ! -z "${python_version} python2" ]; then
49 loc2=$(command -v python2)
50 echo "$loc2" >./src/util/python27_location
52 elif existence python2.7; then
53 if [ ! -z "${python_version} python2.7" ]; then
54 loc3=$(command -v python2.7)
55 echo "$loc3" >./src/util/python27_location
58 echo "*** No python 2.7 binary found, please install it" >&2
59 echo "*** for the optional gnunet-qr to work." >&2
60 echo "*** Make sure to install a matching python future module." >&2