-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·61 lines (50 loc) · 1.66 KB
/
autogen.sh
File metadata and controls
executable file
·61 lines (50 loc) · 1.66 KB
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
#!/usr/bin/env sh
rm -f configure config.h config.h.in
AUTOCONF=$(command -v autoconf)
AUTOMAKE=$(command -v automake)
LIBTOOL=$(command -v libtool)
LIBTOOLIZE=$(command -v libtoolize)
AUTORECONF=$(command -v autoreconf)
PKG_CONFIG=$(command -v pkg-config)
MAKE=$(command -v make)
if test -z "${AUTOCONF}"; then
echo "ERROR: autoconf is missing" >&2
echo "Please install autotools package (e.g., apt-get install autoconf)" >&2
exit 1
fi
if test -z "${AUTOMAKE}"; then
echo "ERROR: automake is missing" >&2
echo "Please install automake package (e.g., apt-get install automake)" >&2
exit 1
fi
if test -z "${LIBTOOL}" && test -z "${LIBTOOLIZE}"; then
echo "ERROR: libtool and libtoolize are both missing" >&2
echo "Please install libtool package (e.g., apt-get install libtool)" >&2
exit 1
fi
if test -z "${AUTORECONF}"; then
echo "ERROR: autoreconf is missing" >&2
echo "Please install autoconf package (e.g., apt-get install autoconf)" >&2
exit 1
fi
if test -z "${PKG_CONFIG}"; then
echo "ERROR: pkg-config is missing" >&2
echo "Please install pkg-config package (e.g., apt-get install pkg-config)" >&2
exit 1
fi
if test -z "${MAKE}"; then
echo "ERROR: make is missing" >&2
echo "Please install make package (e.g., apt-get install make)" >&2
exit 1
fi
echo "Running autoreconf to generate build system..."
autoreconf -ivf || {
echo "ERROR: autoreconf failed" >&2
echo "Please check that all autotools are properly installed" >&2
exit 1
}
echo "Build system generated successfully!"
echo "You can now run: ./configure && make"
#####
# Don't call `configure` here!!!! It breaks out-of-tree builds
#####