-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathautogen.sh
executable file
·86 lines (78 loc) · 2.29 KB
/
autogen.sh
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
78
79
80
81
82
83
84
85
86
#!/bin/sh
libtoolize --version > /dev/null 2> /dev/null || {
echo "error: libtoolize not found"
exit 1
}
aclocal --version > /dev/null 2> /dev/null || {
echo "error: aclocal not found"
exit 1
}
automake --version > /dev/null 2> /dev/null || {
echo "error: automake not found"
exit 1
}
autoconf --version > /dev/null 2> /dev/null || {
echo "error: autoconf not found"
exit 1
}
autoheader --version > /dev/null 2> /dev/null || {
echo "error: autoheader not found"
exit 1
}
ah_version=x`autoheader --version 2> /dev/null | grep '2\.13'`
if test "$ah_version" != "x"; then
AUTOHEADER_FLAGS="-l patches $AUTOHEADER_FLAGS"
fi
echo "Running: libtoolize --force --copy"
libtoolize --force --copy || {
echo "error: libtoolize failed"
exit 1
}
echo "Running: aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS || {
echo "error: aclocal failed"
exit 1
}
echo "Checking for PKG_CHECK_MODULES..."
pkgcheckdef=`grep PKG_CHECK_MODULES aclocal.m4 | grep AC_DEFUN`
if test "x$pkgcheckdef" = "x"; then
echo "Running aclocal -I ac-helpers/pkg-config $ACLOCAL_FLAGS"
(aclocal -I ac-helpers/pkg-config $ACLOCAL_FLAGS 2>> autogen.err) || {
echo "aclocal failed! Unable to continue."
exit 1
}
pkgcheckdef=`grep PKG_CHECK_MODULES aclocal.m4 | grep AC_DEFUN`
if test "x$pkgcheckdef" = "x"; then
echo ""
echo "error: PKG_CHECK_MODULES isn't defined"
echo ""
echo " Either pkg.m4 wasn't in aclocal's search path or pkgconfig"
echo " (or pkgconfig-devel?) isn't installed."
echo ""
echo " If pkg-config is installed in <prefix> then re-run autogen.sh:"
echo ""
echo " ACLOCAL_FLAGS=\"-I <prefix>/share/aclocal\" ./autogen.sh"
echo ""
exit
fi
fi
echo "Running: autoheader $AUTOHEADER_FLAGS"
autoheader $AUTOHEADER_FLAGS || {
echo "error: autoheader failed"
exit 1
}
echo "Running: automake --copy --add-missing --force-missing --foreign"
automake --copy --add-missing --force-missing --foreign || {
echo "Running: automake --copy --add-missing --foreign"
automake --copy --add-missing --foreign || {
echo "error: automake failed"
exit 1
}
}
echo "Running: autoconf"
autoconf || {
echo "error: autoconf failed"
exit 1
}
intltoolize --force
echo "autogen.sh: configuration generated successfully"