1 |
pcg |
1.1 |
#!/bin/sh |
2 |
|
|
|
3 |
|
|
AUTOCONF_REQUIRED_VERSION=2.57 |
4 |
|
|
AUTOMAKE_REQUIRED_VERSION=1.7 |
5 |
|
|
INTLTOOL_REQUIRED_VERSION=0.17 |
6 |
|
|
|
7 |
|
|
|
8 |
|
|
srcdir=`dirname $0` |
9 |
|
|
test -z "$srcdir" && srcdir=. |
10 |
|
|
ORIGDIR=`pwd` |
11 |
|
|
cd $srcdir |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
check_version () |
15 |
|
|
{ |
16 |
|
|
if expr $1 \>= $2 > /dev/null; then |
17 |
|
|
echo "yes (version $1)" |
18 |
|
|
else |
19 |
|
|
echo "Too old (found version $1)!" |
20 |
|
|
DIE=1 |
21 |
|
|
fi |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
DIE=0 |
25 |
|
|
|
26 |
|
|
echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... " |
27 |
|
|
if (autoconf --version) < /dev/null > /dev/null 2>&1; then |
28 |
|
|
VER=`autoconf --version \ |
29 |
|
|
| grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"` |
30 |
|
|
check_version $VER $AUTOCONF_REQUIRED_VERSION |
31 |
|
|
else |
32 |
|
|
echo |
33 |
|
|
echo " You must have autoconf installed to compile $PROJECT." |
34 |
|
|
echo " Download the appropriate package for your distribution," |
35 |
|
|
echo " or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
36 |
|
|
DIE=1; |
37 |
|
|
fi |
38 |
|
|
|
39 |
|
|
echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... " |
40 |
|
|
if (automake-1.7 --version) < /dev/null > /dev/null 2>&1; then |
41 |
|
|
AUTOMAKE=automake-1.7 |
42 |
|
|
ACLOCAL=aclocal-1.7 |
43 |
|
|
else |
44 |
|
|
echo |
45 |
|
|
echo " You must have automake 1.7 installed to compile $PROJECT." |
46 |
|
|
echo " (or a newer version if it is available)" |
47 |
|
|
DIE=1 |
48 |
|
|
fi |
49 |
|
|
|
50 |
|
|
if test x$AUTOMAKE != x; then |
51 |
|
|
VER=`$AUTOMAKE --version \ |
52 |
|
|
| grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"` |
53 |
|
|
check_version $VER $AUTOMAKE_REQUIRED_VERSION |
54 |
|
|
fi |
55 |
|
|
|
56 |
|
|
: <<EOF |
57 |
|
|
echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... " |
58 |
|
|
if (intltoolize --version) < /dev/null > /dev/null 2>&1; then |
59 |
|
|
VER=`intltoolize --version \ |
60 |
|
|
| grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"` |
61 |
|
|
check_version $VER $INTLTOOL_REQUIRED_VERSION |
62 |
|
|
else |
63 |
|
|
echo |
64 |
|
|
echo " You must have intltool installed to compile $PROJECT." |
65 |
|
|
echo " Get the latest version from" |
66 |
|
|
echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/" |
67 |
|
|
DIE=1 |
68 |
|
|
fi |
69 |
|
|
EOF |
70 |
|
|
|
71 |
|
|
if test "$DIE" -eq 1; then |
72 |
|
|
echo |
73 |
|
|
echo "Please install/upgrade the missing tools and call me again." |
74 |
|
|
echo |
75 |
|
|
exit 1 |
76 |
|
|
fi |
77 |
|
|
|
78 |
|
|
if test -z "$*"; then |
79 |
|
|
echo |
80 |
|
|
echo "I am going to run ./configure with no arguments - if you wish " |
81 |
|
|
echo "to pass any to it, please specify them on the $0 command line." |
82 |
|
|
echo |
83 |
|
|
fi |
84 |
|
|
|
85 |
|
|
$ACLOCAL -I m4 |
86 |
|
|
|
87 |
|
|
# optionally feature autoheader |
88 |
|
|
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader |
89 |
|
|
|
90 |
|
|
$AUTOMAKE --add-missing |
91 |
|
|
autoconf |
92 |
|
|
autoheader |
93 |
|
|
(cd m4 && make -f Makefile.am.in Makefile.am) |
94 |
|
|
|
95 |
|
|
#intltoolize --copy --force --automake |
96 |
|
|
|
97 |
|
|
cd $ORIGDIR |
98 |
|
|
|
99 |
|
|
if $srcdir/configure --enable-maintainer-mode "$@"; then |
100 |
|
|
echo |
101 |
|
|
echo "Now type 'make' to compile $PROJECT." |
102 |
|
|
else |
103 |
|
|
echo |
104 |
|
|
echo "Configure failed or did not finish!" |
105 |
|
|
fi |
106 |
|
|
|