-
Notifications
You must be signed in to change notification settings - Fork 4
/
autogen.sh
executable file
·92 lines (73 loc) · 1.57 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
#!/bin/sh
# Script to generate ./configure using the autotools
# Taken from libewf
# Version: 20141007
EXIT_SUCCESS=0;
EXIT_FAILURE=1;
BINDIR="/usr/bin";
if ! test -x "${BINDIR}/pkg-config";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
then
BINDIR="/usr/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
then
# Default location of MacPorts installed binaries.
BINDIR="/opt/local/bin";
fi
if ! test -x "${BINDIR}/pkg-config";
then
# Default location of MSYS-MinGW installed binaries.
BINDIR="/mingw/bin";
fi
PKGCONFIG="${BINDIR}/pkg-config";
if ! test -x "${PKGCONFIG}";
then
echo "Unable to find: pkg-config";
exit ${EXIT_FAILURE};
fi
ACLOCAL="${BINDIR}/aclocal";
AUTOCONF="${BINDIR}/autoconf";
AUTOHEADER="${BINDIR}/autoheader";
AUTOMAKE="${BINDIR}/automake";
AUTORECONF="${BINDIR}/autoreconf";
LIBTOOLIZE="${BINDIR}/libtoolize";
if test -x "${AUTORECONF}";
then
${AUTORECONF} --force --install
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 "${LIBTOOLIZE}";
then
echo "Unable to find: libtoolize";
exit ${EXIT_FAILURE};
fi
${ACLOCAL} --force -I m4
${LIBTOOLIZE} --force
${AUTOHEADER} --force
${AUTOCONF} --force
${AUTOMAKE} --force --add-missing
fi
exit ${EXIT_SUCCESS};