File: bootstrap.sh

package info (click to toggle)
snoopy 2.4.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,032 kB
  • sloc: ansic: 4,414; sh: 2,571; makefile: 822
file content (77 lines) | stat: -rwxr-xr-x 1,125 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash



### Shell setup
#
# Treat all errors as fatal and trace the progress
#
set -e
set -u



### Check if autoconf is present on the system
#
if ! command -v autoreconf > /dev/null; then
    echo "ERROR: Program 'autoreconf' not found. Consider running './dev-tools/install-dev-software.sh' to correct this."
    exit 1
fi



### Check autotools version
#
RES=`autoreconf --version | head -n1 | cut -d' ' -f4 | sed -e 's/\.//'`
if [ "$RES" -lt "268" ]; then
    echo "ERROR: Your autotools version is too old. At least version 2.68 is required."
    exit 1
fi



### Clear cache
#
if [ -d autom4te.cache ]; then
    rm -rf autom4te.cache
fi



### Bug in aclocal: manually create m4 directory if it does not exist
#
if [ ! -d build/m4 ]; then
    mkdir -p build/m4
fi



### Signal process start
#
echo "###"
echo "### Starting AutoTools run:"
echo "###"
echo



### Run autotools
#
autoreconf -i -v



### Remove stale/backup files
#
rm -f config.h.in~



### Signal success and exit
#
echo
echo "###"
echo "### AutoTools run was completed successfully."
echo "### You should run ./configure now."
echo "###"
echo