-
Notifications
You must be signed in to change notification settings - Fork 6
/
autogen.sh
executable file
·120 lines (101 loc) · 2.76 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
#!/bin/sh
AUTOCONF_REQUIRED_VERSION=2.57
AUTOMAKE_REQUIRED_VERSION=1.7
INTLTOOL_REQUIRED_VERSION=0.17
if ! [ -e libev/ev++.h ]; then
cat <<EOF
**
** libev/ directory is missing
**
** you need a checkout of libev (http://software.schmorp.de/pkg/libev)
** in the top-level build directory.
**
EOF
exit 1
fi
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
check_version ()
{
if expr $1 \>= $2 > /dev/null; then
echo "yes (version $1)"
else
echo "Too old (found version $1)!"
# DIE=1
fi
}
DIE=0
echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
if (autoconf --version) < /dev/null > /dev/null 2>&1; then
VER=`autoconf --version \
| grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $AUTOCONF_REQUIRED_VERSION
else
echo
echo " You must have autoconf installed to compile $PROJECT."
echo " Download the appropriate package for your distribution,"
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1;
fi
echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
if (automake-1.7 --version) < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-1.7
ACLOCAL=aclocal-1.7
else
echo
echo " You must have automake 1.7 installed to compile $PROJECT."
# DIE=1
fi
if test x$AUTOMAKE != x; then
VER=`$AUTOMAKE --version \
| grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
check_version $VER $AUTOMAKE_REQUIRED_VERSION
fi
: <<EOF
echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... "
if (intltoolize --version) < /dev/null > /dev/null 2>&1; then
VER=`intltoolize --version \
| grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
check_version $VER $INTLTOOL_REQUIRED_VERSION
else
echo
echo " You must have intltool installed to compile $PROJECT."
echo " Get the latest version from"
echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/"
DIE=1
fi
EOF
if test "$DIE" -eq 1; then
echo
echo "Please install/upgrade the missing tools and call me again."
echo
exit 1
fi
if test -z "$*"; then
echo
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
echo
fi
$ACLOCAL -I m4
# optionally feature autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
(cd m4 && make -f Makefile.am.in Makefile.am)
touch doc/gvpe.texi
$AUTOMAKE -f --add-missing
rm doc/gvpe.texi
autoconf
autoheader
#intltoolize --copy --force --automake
cd $ORIGDIR
if [ -e reconf ]; then
./reconf "$@"
elif $srcdir/configure --enable-maintainer-mode "$@"; then
echo
echo "Now type 'make' to compile $PROJECT."
else
echo
echo "Configure failed or did not finish!"
fi