~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to build/buildcheck.sh

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
#
 
3
# buildcheck.sh: Inspects the build setup to make detection and
 
4
# correction of problems an easier process.
 
5
 
 
6
# Initialize parameters
 
7
VERSION_CHECK="$1"
 
8
 
 
9
if test "$VERSION_CHECK" != "--release"; then
 
10
  echo "buildcheck: checking installation..."
 
11
else
 
12
  echo "buildcheck: checking installation for a source release..."
 
13
fi
 
14
 
 
15
#--------------------------------------------------------------------------
 
16
# autoconf 2.50 or newer
 
17
#
 
18
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' -e 1q`
 
19
if test -z "$ac_version"; then
 
20
  echo "buildcheck: autoconf not found."
 
21
  echo "            You need autoconf version 2.50 or newer installed."
 
22
  exit 1
 
23
fi
 
24
IFS=.; set $ac_version; IFS=' '
 
25
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
 
26
  echo "buildcheck: autoconf version $ac_version found."
 
27
  echo "            You need autoconf version 2.50 or newer installed."
 
28
  echo "            If you have a sufficient autoconf installed, but it"
 
29
  echo "            is not named 'autoconf', then try setting the"
 
30
  echo "            AUTOCONF environment variable.  (See the INSTALL file"
 
31
  echo "            for details.)"
 
32
  exit 1
 
33
fi
 
34
if test "$ac_version" = "2.58"; then
 
35
  echo "buildcheck: autoconf version 2.58 found."
 
36
  echo "            This version of autoconf is broken.  Please install at"
 
37
  echo "            least autoconf 2.59 or downgrade to version 2.57 which"
 
38
  echo "            is known to work."
 
39
  exit 1
 
40
fi
 
41
 
 
42
echo "buildcheck: autoconf version $ac_version (ok)"
 
43
 
 
44
#--------------------------------------------------------------------------
 
45
# autoheader 2.50 or newer
 
46
#
 
47
ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' -e 1q`
 
48
if test -z "$ah_version"; then
 
49
  echo "buildcheck: autoheader not found."
 
50
  echo "            You need autoheader version 2.50 or newer installed."
 
51
  exit 1
 
52
fi
 
53
IFS=.; set $ah_version; IFS=' '
 
54
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
 
55
  echo "buildcheck: autoheader version $ah_version found."
 
56
  echo "            You need autoheader version 2.50 or newer installed."
 
57
  echo "            If you have a sufficient autoheader installed, but it"
 
58
  echo "            is not named 'autoheader', then try setting the"
 
59
  echo "            AUTOHEADER environment variable.  (See the INSTALL file"
 
60
  echo "            for details.)"
 
61
  exit 1
 
62
fi
 
63
 
 
64
echo "buildcheck: autoheader version $ah_version (ok)"
 
65
 
 
66
#--------------------------------------------------------------------------
 
67
# libtool 1.4 or newer
 
68
#
 
69
LIBTOOL_WANTED_MAJOR=1
 
70
LIBTOOL_WANTED_MINOR=4
 
71
LIBTOOL_WANTED_PATCH=
 
72
LIBTOOL_WANTED_VERSION=1.4
 
73
 
 
74
# The minimum version for source releases is 1.4.3,
 
75
# because it's required by (at least) Solaris.
 
76
if test "$VERSION_CHECK" = "--release"; then
 
77
  LIBTOOL_WANTED_PATCH=3
 
78
  LIBTOOL_WANTED_VERSION=1.4.3
 
79
else
 
80
  case `uname -sr` in
 
81
    SunOS\ 5.*)
 
82
      LIBTOOL_WANTED_PATCH=3
 
83
      LIBTOOL_WANTED_VERSION=1.4.3
 
84
      ;;
 
85
  esac
 
86
fi
 
87
 
 
88
libtool=`which glibtool 2>/dev/null`
 
89
if test ! -x "$libtool"; then
 
90
  libtool=`which libtool`
 
91
fi
 
92
if test ! -x "$libtool"; then
 
93
  libtool=`which libtool15`
 
94
fi
 
95
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//' -e 1q`
 
96
if test -z "$lt_pversion"; then
 
97
  echo "buildcheck: libtool not found."
 
98
  echo "            You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
 
99
  exit 1
 
100
fi
 
101
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
 
102
IFS=.; set $lt_version; IFS=' '
 
103
lt_status="good"
 
104
if test "$1" = "$LIBTOOL_WANTED_MAJOR"; then
 
105
   if test "$2" -gt "$LIBTOOL_WANTED_MINOR"; then
 
106
      lt_status="good"
 
107
   elif test "$2" -lt "$LIBTOOL_WANTED_MINOR"; then
 
108
      lt_status="bad"
 
109
   elif test ! -z "$LIBTOOL_WANTED_PATCH"; then
 
110
       if test "$3" -lt "$LIBTOOL_WANTED_PATCH"; then
 
111
           lt_status="bad"
 
112
       fi
 
113
   fi
 
114
fi
 
115
if test $lt_status != "good"; then
 
116
  echo "buildcheck: libtool version $lt_pversion found."
 
117
  echo "            You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
 
118
  exit 1
 
119
fi
 
120
 
 
121
echo "buildcheck: libtool version $lt_pversion (ok)"
 
122
 
 
123
#--------------------------------------------------------------------------
 
124
# check that our local copies of files match up with those in APR(UTIL)
 
125
#
 
126
if test -d ./apr; then
 
127
  if cmp -s ./build/ac-macros/find_apr.m4 ./apr/build/find_apr.m4; then
 
128
    :
 
129
  else
 
130
    echo "buildcheck: local copy of find_apr.m4 does not match APR's copy."
 
131
    echo "            An updated copy of find_apr.m4 may need to be checked in."
 
132
  fi
 
133
  if cmp -s ./build/PrintPath ./apr/build/PrintPath; then
 
134
    :
 
135
  else
 
136
    echo "buildcheck: local copy of PrintPath does not match APR's copy."
 
137
    echo "            An updated copy of PrintPath may need to be checked in."
 
138
  fi
 
139
fi
 
140
 
 
141
if test -d ./apr-util; then
 
142
  if cmp -s ./build/ac-macros/find_apu.m4 ./apr-util/build/find_apu.m4; then
 
143
    :
 
144
  else
 
145
    echo "buildcheck: local copy of find_apu.m4 does not match APRUTIL's copy."
 
146
    echo "            An updated copy of find_apu.m4 may need to be checked in."
 
147
  fi
 
148
fi
 
149
 
 
150
#--------------------------------------------------------------------------
 
151
exit 0