Debian Codegraph @

bootstrap

raw
1 #!/bin/sh
2 #
3 # Script to help bootstrap the build system when checked out from git
4 #
5
6 bsd_environment() {
7 # Based on https://github.com/rvm/rvm/blob/59fe3b39f0fb5ae01ed5b9aa187201080815ac16/scripts/functions/build_config_system#L123
8 if [ -z "${AUTOCONF_VERSION}" ]
9 then
10 export AUTOCONF_VERSION
11 AUTOCONF_VERSION="$(
12 ls -1 /usr/local/bin/autoreconf-* |
13 awk -F- '{print $NF}' |
14 sort |
15 tail -n 1
16 )"
17 echo "Using autoconf version: $AUTOCONF_VERSION"
18 fi
19
20 if [ -z "${AUTOMAKE_VERSION}" ]
21 then
22 export AUTOMAKE_VERSION
23 # FreeBSD might have automake-wrapper
24 AUTOMAKE_VERSION="$(
25 ls -1 /usr/local/bin/automake-1* |
26 awk -F- '{print $NF}' |
27 sort |
28 tail -n 1
29 )"
30 echo "Using automake version: $AUTOMAKE_VERSION"
31 fi
32 }
33
34 # Use the uname string to figure out if this is a BSD
35 case "$(uname)" in
36 *BSD*) bsd_environment ;;
37 esac
38
39 test -n "$srcdir" || srcdir="$(dirname "$0")"
40 test -n "$srcdir" || srcdir=.
41
42 autoreconf --force --install --verbose "$srcdir"