~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to bootstrap.sh

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-02-15 18:46:13 UTC
  • mfrom: (21.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110215184613-1u3dh5sz4i055flk
Tags: 3.1.10-1ubuntu1
* Merge from debian unstable. (LP: #719283)  Remaining changes:
  - debian/patches/18-fix-ftbfs-binutils-gold.dpatch: Add library linker into
    LIBS instead to LDFLAGS to fixing FTBFS binutils-gold.
* Drop Ubuntu configuration for ufw which landed in Debian and sync it: 
  - debian/squid3.ufw.profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
# Used to setup the configure.in, autoheader and Makefile.in's if configure
 
2
# Used to setup the configure.ac, autoheader and Makefile.in's if configure
3
3
# has not been generated. This script is only needed for developers when
4
4
# configure has not been run, or if a Makefile.am in a non-configured directory
5
5
# has been updated
7
7
# Autotool versions preferred. To override either edit the script
8
8
# to match the versions you want to use, or set the variables on
9
9
# the command line like "env acver=.. amver=... ./bootstrap.sh"
10
 
acversions="${acver:-2.63 2.62 2.61}"
11
 
amversions="${amver:-1.11 1.10 1.9}"
12
 
ltversions="${ltver:-2.2 1.5 1.4}"
 
10
acversions="${acver:-.}" # 2.68 2.67 2.66 2.65 2.64 2.63 2.62 2.61}"
 
11
amversions="${amver:-.}" # 1.11 1.10 1.9}"
 
12
ltversions="${ltver:-.}" # 2.2}"
13
13
 
14
14
check_version()
15
15
{
19
19
show_version()
20
20
{
21
21
  tool=$1
22
 
  found="NOT_FOUND"
23
 
  shift
24
 
  versions="$*"
25
 
  for version in $versions; do
26
 
    for variant in "" "-${version}" "`echo $version | sed -e 's/\.//g'`"; do
27
 
      if check_version $tool ${tool}${variant} $version; then
28
 
        found="${version}"
29
 
        break
30
 
      fi
31
 
    done
32
 
    if [ "x$found" != "xNOT_FOUND" ]; then
33
 
      break
34
 
    fi
35
 
  done
36
 
  if [ "x$found" = "xNOT_FOUND" ]; then
37
 
    found="??"
38
 
  fi
39
 
  echo $found
 
22
  variant=$2
 
23
  ${tool}${variant} --version 2>/dev/null | head -1 | sed -e 's/.*) //'
40
24
}
41
25
 
42
26
find_variant()
92
76
 
93
77
    # TODO: when we have libtool2, tell libtoolize where to put its files
94
78
    # instead of manualy moving files from ltdl to lib/libLtdl
95
 
    if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.in
 
79
    if egrep -q '^[[:space:]]*AC_LIBLTDL_' configure.ac
96
80
    then
97
81
        ltdl="--ltdl"
98
82
    else
113
97
        chmod u+w $makefile
114
98
        mv $makefile.new $makefile
115
99
        chmod u-w $makefile
116
 
 
117
 
        # Libtool 2.2.6b we bundle is slightly broken with non-portable dependencies
118
 
        sed 's/<libltdl\/lt_system.h>/\"libltdl\/lt_system.h\"/g' $src/ltdl.h |
119
 
            sed 's/<libltdl\/lt_error.h>/\"libltdl\/lt_error.h\"/g' |
120
 
            sed 's/<libltdl\/lt_dlloader.h>/\"libltdl\/lt_dlloader.h\"/g' > $src/ltdl.h.new;
121
 
        chmod u+w $src/ltdl.h
122
 
        mv $src/ltdl.h.new $src/ltdl.h
123
 
        chmod u-w $src/ltdl.h
124
100
    fi
125
101
}
126
102
 
130
106
ltver=`find_variant libtool ${ltversions}`
131
107
 
132
108
# Produce debug output about what version actually found.
133
 
amversion=`show_version automake ${amversions}`
134
 
acversion=`show_version autoconf ${acversions}`
135
 
ltversion=`show_version libtool ${ltversions}`
 
109
amversion=`show_version automake "${amver}"`
 
110
acversion=`show_version autoconf "${acver}"`
 
111
ltversion=`show_version libtool "${ltver}"`
136
112
 
137
113
# Find the libtool path to get the right aclocal includes
138
114
ltpath=`find_path libtool$ltver`