ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/autogen.sh
Revision: 1.8
Committed: Sun Nov 11 04:08:58 2007 UTC (16 years, 11 months ago) by pcg
Content type: application/x-sh
Branch: MAIN
CVS Tags: rel-3_0, rel-2_2, rel-2_21, rel-2_22, rel-2_25, HEAD
Changes since 1.7: +11 -0 lines
Log Message:
*** empty log message ***

File Contents

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