bootstrap: Replace which.
[oweals/gnunet.git] / bootstrap
1 #!/bin/sh
2 echo "Removing folder 'libltdl'..."
3 rm -rf libltdl
4
5 echo "checking for libtoolize / libtool... "
6
7 # This is more portable than `which' but comes with
8 # the caveat of not(?) properly working on busybox's ash:
9 existence()
10 {
11     command -v "$1" >/dev/null 2>&1
12 }
13
14 if existence libtool || existence libtoolize || existence glibtoolize; then
15     autoreconf -if
16     . "bin/pogen.sh"
17 else
18     echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
19     exit 1
20 fi