~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to autogen.sh

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
# Automakeversion
4
 
AM_1=1
5
 
AM_2=7
6
 
AM_3=2
7
 
 
8
 
# Autoconfversion
9
 
AC_1=2
10
 
AC_2=57
11
 
 
12
 
# Libtoolversion
13
 
LT_1=1
14
 
LT_2=4
15
 
 
16
 
# Libtoolname
17
 
LIBTOOL=libtool
18
 
LIBTOOLIZE=libtoolize
19
 
if [ "`uname`" = "Darwin" ]; then
20
 
        LIBTOOL=glibtool
21
 
        LIBTOOLIZE=glibtoolize
22
 
fi
23
 
 
24
 
# Check automake version
25
 
AM_VERSION=`automake --version | sed -n -e 's#^.* \([0-9]*\)\.\([0-9]*\)[^0-9]*\([0-9]*\).*$#\1 \2 \3#p'`
26
 
AM_V1=`echo $AM_VERSION | awk '{print $1}'`
27
 
AM_V2=`echo $AM_VERSION | awk '{print $2}'`
28
 
AM_V3=`echo $AM_VERSION | awk '{if ($NF > 2) print $3; else print "0";}'`
29
 
 
30
 
if [ $AM_1 -gt $AM_V1 ]; then
31
 
        AM_ERROR=1 
32
 
else
33
 
        if [ $AM_1 -eq $AM_V1 ]; then
34
 
                if [ $AM_2 -gt $AM_V2 ]; then
35
 
                        AM_ERROR=1 
36
 
                else
37
 
                        if [ $AM_2 -eq $AM_V2 ]; then
38
 
                                if [ $AM_3 -gt $AM_V3 ]; then
39
 
                                        AM_ERROR=1 
40
 
                                fi
41
 
                        fi
42
 
                fi
43
 
        fi
44
 
fi
45
 
 
46
 
if [ "$AM_ERROR" = "1" ]; then
47
 
        echo -e  '\E[31;m'
48
 
        echo -n "Your automake version `automake --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\.*[0-9]*\).*#\1#p'`"
49
 
        echo " is older than the suggested one, $AM_1.$AM_2.$AM_3"
50
 
        echo "Go on at your own risk. :-)"
51
 
        echo
52
 
        tput sgr0
53
 
fi
54
 
 
55
 
# Check autoconf version
56
 
AC_VERSION=`autoconf --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\).*$#\1 \2#p'`
57
 
AC_V1=`echo $AC_VERSION | awk '{print $1}'`
58
 
AC_V2=`echo $AC_VERSION | awk '{print $2}'`
59
 
 
60
 
if [ $AC_1 -gt $AC_V1 ]; then
61
 
        AC_ERROR=1 
62
 
else
63
 
        if [ $AC_1 -eq $AC_V1 ]; then
64
 
                if [ $AC_2 -gt $AC_V2 ]; then
65
 
                        AC_ERROR=1 
66
 
                fi
67
 
        fi
68
 
fi
69
 
 
70
 
if [ "$AC_ERROR" = "1" ]; then
71
 
        echo -e  '\E[31;m'
72
 
        echo -n "Your autoconf version `autoconf --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\).*#\1#p'`"
73
 
        echo " is older than the suggested one, $AC_1.$AC_2"
74
 
        echo "Go on at your own risk. :-)"
75
 
        echo
76
 
        tput sgr0
77
 
fi
78
 
 
79
 
# Check libtool version
80
 
LT_VERSION=`$LIBTOOL --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\).*$#\1 \2#p'`
81
 
LT_V1=`echo $LT_VERSION | awk '{print $1}'`
82
 
LT_V2=`echo $LT_VERSION | awk '{print $2}'`
83
 
 
84
 
if [ $LT_1 -gt $LT_V1 ]; then
85
 
        LT_ERROR=1 
86
 
else
87
 
        if [ $LT_1 -eq $LT_V1 ]; then
88
 
                if [ $LT_2 -gt $LT_V2 ]; then
89
 
                        LT_ERROR=1 
90
 
                fi
91
 
        fi
92
 
fi
93
 
 
94
 
if [ "$LT_ERROR" = "1" ]; then
95
 
        echo -e  '\E[31;m'
96
 
        echo -n "Your libtool version `$LIBTOOL --version | sed -n -e 's#[^0-9]* \([0-9]*\.[0-9]*\).*#\1#p'`"
97
 
        echo " is older than the suggested one, $LT_1.$LT_2"
98
 
        echo "Go on at your own risk. :-)"
99
 
        echo
100
 
        tput sgr0
101
 
fi
102
 
 
103
 
echo Configuring build environment for QGIS
104
 
aclocal \
105
 
  && $LIBTOOLIZE --force --copy \
106
 
  && autoheader --force -W all \
107
 
  && automake --add-missing --foreign --copy \
108
 
  && autoconf --force \
109
 
  && echo Now running configure to configure QGIS \
110
 
  && ./configure $@