forked from libyal/libvmdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·174 lines (143 loc) · 2.91 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#!/bin/sh
# Script to generate ./configure using the autotools
#
# Version: 20200425
EXIT_SUCCESS=0;
EXIT_FAILURE=1;
BINDIR="/usr/bin";
if ! test -x "${BINDIR}/aclocal";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
# Default location of MacPorts installed binaries.
BINDIR="/opt/local/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
# Default location of MSYS-MinGW installed binaries.
BINDIR="/mingw/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
# Default location of 32-bit MSYS2-MinGW installed binaries.
BINDIR="/mingw32/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
# Default location of 64-bit MSYS2-MinGW installed binaries.
BINDIR="/mingw64/bin";
fi
if ! test -x "${BINDIR}/aclocal";
then
echo "Unable to find autotools";
exit ${EXIT_FAILURE};
fi
ACLOCAL="${BINDIR}/aclocal";
AUTOCONF="${BINDIR}/autoconf";
AUTOHEADER="${BINDIR}/autoheader";
AUTOMAKE="${BINDIR}/automake";
AUTOPOINT="${BINDIR}/autopoint";
AUTORECONF="${BINDIR}/autoreconf";
LIBTOOLIZE="${BINDIR}/libtoolize";
PKGCONFIG="${BINDIR}/pkg-config";
if test "${OSTYPE}" = "msys";
then
# Work-around for autopoint failing to detect gettext version
# using func_trace (which is not available) on MSYS by writing
# the gettext version to intl/VERSION.
if ! test -d intl;
then
mkdir intl;
fi
GETTEXT_VERSION=`gettext --version | head -n1 | sed 's/^.* //'`;
echo "gettext-${GETTEXT_VERSION}" > intl/VERSION;
elif ! test -x "${PKGCONFIG}";
then
if test "${BINDIR}" != "/usr/bin";
then
# On OpenBSD most of the autotools are located in
# /usr/local/bin while pkg-config is located in /usr/bin
PKGCONFIG="/usr/bin/pkg-config";
fi
if ! test -x "${PKGCONFIG}";
then
echo "Unable to find: pkg-config";
exit ${EXIT_FAILURE};
fi
fi
if test -x "${AUTORECONF}";
then
${AUTORECONF} --force --install
if test $? -ne 0;
then
exit $?;
fi
else
if ! test -x "${ACLOCAL}";
then
echo "Unable to find: aclocal";
exit ${EXIT_FAILURE};
fi
if ! test -x "${AUTOCONF}";
then
echo "Unable to find: autoconf";
exit ${EXIT_FAILURE};
fi
if ! test -x "${AUTOHEADER}";
then
echo "Unable to find: autoheader";
exit ${EXIT_FAILURE};
fi
if ! test -x "${AUTOMAKE}";
then
echo "Unable to find: automake";
exit ${EXIT_FAILURE};
fi
if ! test -x "${AUTOPOINT}";
then
echo "Unable to find: autopoint";
exit ${EXIT_FAILURE};
fi
if ! test -x "${LIBTOOLIZE}";
then
echo "Unable to find: libtoolize";
exit ${EXIT_FAILURE};
fi
${AUTOPOINT} --force;
if test $? -ne 0;
then
exit $?;
fi
${ACLOCAL} --force -I m4;
if test $? -ne 0;
then
exit $?;
fi
${LIBTOOLIZE} --force;
if test $? -ne 0;
then
exit $?;
fi
${AUTOHEADER} --force;
if test $? -ne 0;
then
exit $?;
fi
${AUTOCONF} --force;
if test $? -ne 0;
then
exit $?;
fi
${AUTOMAKE} --force --add-missing;
if test $? -ne 0;
then
exit $?;
fi
fi
exit ${EXIT_SUCCESS};