ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/autogen.sh
Revision: 1.7
Committed: Sat Nov 10 05:14:21 2007 UTC (16 years, 6 months ago) by pcg
Content type: application/x-sh
Branch: MAIN
Changes since 1.6: +3 -2 lines
Log Message:
first shot at converting from iom to libev

File Contents

# Content
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 # DIE=1
47 fi
48
49 if test x$AUTOMAKE != x; then
50 VER=`$AUTOMAKE --version \
51 | grep automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/"`
52 check_version $VER $AUTOMAKE_REQUIRED_VERSION
53 fi
54
55 : <<EOF
56 echo -n "checking for intltool >= $INTLTOOL_REQUIRED_VERSION ... "
57 if (intltoolize --version) < /dev/null > /dev/null 2>&1; then
58 VER=`intltoolize --version \
59 | grep intltoolize | sed "s/.* \([0-9.]*\)/\1/"`
60 check_version $VER $INTLTOOL_REQUIRED_VERSION
61 else
62 echo
63 echo " You must have intltool installed to compile $PROJECT."
64 echo " Get the latest version from"
65 echo " ftp://ftp.gnome.org/pub/GNOME/sources/intltool/"
66 DIE=1
67 fi
68 EOF
69
70 if test "$DIE" -eq 1; then
71 echo
72 echo "Please install/upgrade the missing tools and call me again."
73 echo
74 exit 1
75 fi
76
77 if test -z "$*"; then
78 echo
79 echo "I am going to run ./configure with no arguments - if you wish "
80 echo "to pass any to it, please specify them on the $0 command line."
81 echo
82 fi
83
84 $ACLOCAL -I m4
85
86 # optionally feature autoheader
87 (autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
88
89 (cd m4 && make -f Makefile.am.in Makefile.am)
90 touch doc/gvpe.texi
91 $AUTOMAKE -f --add-missing
92 rm doc/gvpe.texi
93 autoconf
94 autoheader
95
96 #intltoolize --copy --force --automake
97
98 cd $ORIGDIR
99
100 if [ -e reconf ]; then
101 ./reconf "$@"
102 elif $srcdir/configure --enable-maintainer-mode "$@"; then
103 echo
104 echo "Now type 'make' to compile $PROJECT."
105 else
106 echo
107 echo "Configure failed or did not finish!"
108 fi
109