~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to srclib/apr-util/buildconf

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Copyright 1999-2005 The Apache Software Foundation or its licensors, as
 
4
# applicable.
 
5
#
 
6
# Licensed under the Apache License, Version 2.0 (the "License");
 
7
# you may not use this file except in compliance with the License.
 
8
# You may obtain a copy of the License at
 
9
#
 
10
#     http://www.apache.org/licenses/LICENSE-2.0
 
11
#
 
12
# Unless required by applicable law or agreed to in writing, software
 
13
# distributed under the License is distributed on an "AS IS" BASIS,
 
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
15
# See the License for the specific language governing permissions and
 
16
# limitations under the License.
 
17
#
 
18
#
 
19
 
 
20
# Default place to look for apr source.  Can be overridden with 
 
21
#   --with-apr=[directory]
 
22
apr_src_dir=../apr
 
23
 
 
24
while test $# -gt 0 
 
25
do
 
26
  # Normalize
 
27
  case "$1" in
 
28
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 
29
  *) optarg= ;;
 
30
  esac
 
31
 
 
32
  case "$1" in
 
33
  --with-apr=*)
 
34
  apr_src_dir=$optarg
 
35
  ;;
 
36
  esac
 
37
 
 
38
  shift
 
39
done
 
40
 
 
41
if [ -f "$apr_src_dir/build/apr_common.m4" ]; then
 
42
  apr_src_dir=`cd $apr_src_dir; pwd`
 
43
  echo ""
 
44
  echo "Looking for apr source in $apr_src_dir"
 
45
else
 
46
  echo ""
 
47
  echo "Problem finding apr source in $apr_src_dir."
 
48
  echo "Use:"
 
49
  echo "  --with-apr=[directory]" 
 
50
  exit 1
 
51
fi
 
52
 
 
53
set -e
 
54
 
 
55
# Remove some files, then copy them from apr source tree
 
56
rm -f build/apr_common.m4 build/find_apr.m4 build/install.sh \
 
57
      build/config.guess build/config.sub build/get-version.sh
 
58
cp -p $apr_src_dir/build/apr_common.m4 $apr_src_dir/build/find_apr.m4 \
 
59
      $apr_src_dir/build/install.sh $apr_src_dir/build/config.guess \
 
60
      $apr_src_dir/build/config.sub $apr_src_dir/build/get-version.sh \
 
61
      build/
 
62
 
 
63
# Remove aclocal.m4 as it'll break some builds...
 
64
rm -rf aclocal.m4 autom4te*.cache
 
65
 
 
66
#
 
67
# Generate the autoconf header (include/apu_config.h) and ./configure
 
68
#
 
69
echo "Creating include/private/apu_config.h ..."
 
70
${AUTOHEADER:-autoheader}
 
71
 
 
72
echo "Creating configure ..."
 
73
### do some work to toss config.cache?
 
74
if ${AUTOCONF:-autoconf}; then
 
75
  :
 
76
else
 
77
  echo "autoconf failed"
 
78
  exit 1
 
79
fi
 
80
 
 
81
#
 
82
# Generate build-outputs.mk for the build systme
 
83
#
 
84
echo "Generating 'make' outputs ..."
 
85
$apr_src_dir/build/gen-build.py make
 
86
 
 
87
#
 
88
# If Expat has been bundled, then go and configure the thing
 
89
#
 
90
if [ -f xml/expat/buildconf.sh ]; then
 
91
  echo "Invoking xml/expat/buildconf.sh ..."
 
92
  (cd xml/expat; ./buildconf.sh)
 
93
fi
 
94
 
 
95
# Remove autoconf cache again
 
96
rm -rf autom4te*.cache
 
97
 
 
98
# Create RPM Spec file
 
99
if [ -f `which cut` ]; then
 
100
  echo rebuilding rpm spec file
 
101
  REVISION=`build/get-version.sh all include/apu_version.h APU`
 
102
  VERSION=`echo $REVISION | cut -d- -s -f1`
 
103
  RELEASE=`echo $REVISION | cut -d- -s -f2`
 
104
  if [ "x$VERSION" = "x" ]; then
 
105
      VERSION=$REVISION
 
106
      RELEASE=1
 
107
  fi
 
108
  sed -e "s/APU_VERSION/$VERSION/" -e "s/APU_RELEASE/$RELEASE/" \
 
109
    ./build/rpm/apr-util.spec.in > apr-util.spec
 
110
fi
 
111