~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to build/ac-macros/aprutil.m4

  • 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
dnl  SVN_LIB_APRUTIL(wanted_regex, alt_wanted_regex)
 
2
dnl
 
3
dnl  'wanted_regex' and 'alt_wanted_regex are regular expressions 
 
4
dnl  that the aprutil version string must match.
 
5
dnl
 
6
dnl  Check configure options and assign variables related to
 
7
dnl  the Apache Portable Runtime Utilities (APRUTIL) library.
 
8
dnl
 
9
dnl  If there is an apr-util source directory, there *must* be a
 
10
dnl  corresponding apr source directory.  APRUTIL's build system
 
11
dnl  is too tied in with apr.  (You can't use an installed APR and
 
12
dnl  a source APR-util.)
 
13
dnl
 
14
 
 
15
 
 
16
AC_DEFUN(SVN_LIB_APRUTIL,
 
17
[
 
18
  APRUTIL_WANTED_REGEX="$1"
 
19
  APRUTIL_WANTED_REGEX_TOO="$2"
 
20
 
 
21
  AC_MSG_NOTICE([Apache Portable Runtime Utility (APRUTIL) library configuration])
 
22
 
 
23
  APR_FIND_APU("$srcdir/apr-util", "./apr-util", 1, [0 1])
 
24
 
 
25
  if test $apu_found = "no"; then
 
26
    AC_MSG_WARN([APRUTIL not found])
 
27
    SVN_DOWNLOAD_APRUTIL
 
28
  fi
 
29
 
 
30
  if test $apu_found = "reconfig"; then
 
31
    SVN_SUBDIR_CONFIG(apr-util, --with-apr=../apr)
 
32
    SVN_SUBDIRS="$SVN_SUBDIRS apr-util"
 
33
  fi
 
34
 
 
35
  dnl check APRUTIL version number against regex  
 
36
 
 
37
  AC_MSG_CHECKING([APR-UTIL version])    
 
38
  apu_version="`$apu_config --version`"
 
39
  if test $? -ne 0; then
 
40
    # This is a hack as suggested by Ben Collins-Sussman.  It can be
 
41
    # removed after apache 2.0.44 has been released.  (The apu-config
 
42
    # shipped in 2.0.43 contains a correct version number, but
 
43
    # stupidly doesn't understand the --version switch.)
 
44
    apu_version=`grep "APRUTIL_DOTTED_VERSION=" $(which $apu_config) | tr -d "APRUTIL_DOTTED_VERSION="| tr -d '"'`
 
45
    #AC_MSG_ERROR([
 
46
    #    apu-config --version failed.
 
47
    #    Your apu-config doesn't support the --version switch, please upgrade
 
48
    #    to APR-UTIL more recent than 2002-Nov-05.])
 
49
  fi
 
50
  AC_MSG_RESULT([$apu_version])
 
51
 
 
52
  if test `expr $apu_version : $APRUTIL_WANTED_REGEX` -eq 0 \
 
53
       -a `expr $apu_version : $APRUTIL_WANTED_REGEX_TOO` -eq 0; then
 
54
    echo "wanted regex is $APRUTIL_WANTED_REGEX or $APRUTIL_WANTED_REGEX_TOO"
 
55
    AC_MSG_ERROR([invalid apr-util version found])
 
56
  fi
 
57
 
 
58
  dnl Get libraries and thread flags from APRUTIL ---------------------
 
59
 
 
60
  LDFLAGS="$LDFLAGS `$apu_config --ldflags`"
 
61
  if test $? -ne 0; then
 
62
    AC_MSG_ERROR([apu-config --ldflags failed])
 
63
  fi
 
64
 
 
65
  SVN_APRUTIL_INCLUDES="`$apu_config --includes`"
 
66
  if test $? -ne 0; then
 
67
    AC_MSG_ERROR([apu-config --includes failed])
 
68
  fi
 
69
 
 
70
  dnl When APR stores the dependent libs in the .la file, we don't need
 
71
  dnl --libs.
 
72
  SVN_APRUTIL_LIBS="`$apu_config --link-libtool --libs`"
 
73
  if test $? -ne 0; then
 
74
    AC_MSG_ERROR([apu-config --link-libtool --libs failed])
 
75
  fi
 
76
 
 
77
  SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld --libs`"
 
78
  if test $? -ne 0; then
 
79
    AC_MSG_ERROR([apu-config --link-ld --libs failed])
 
80
  fi
 
81
 
 
82
  AC_SUBST(SVN_APRUTIL_INCLUDES)
 
83
  AC_SUBST(SVN_APRUTIL_LIBS)
 
84
  AC_SUBST(SVN_APRUTIL_EXPORT_LIBS)
 
85
  AC_SUBST(SVN_APRUTIL_PREFIX)
 
86
])
 
87
 
 
88
dnl SVN_DOWNLOAD_APRUTIL()
 
89
dnl no apr-util found, print out a message telling the user what to do
 
90
AC_DEFUN(SVN_DOWNLOAD_APRUTIL,
 
91
[
 
92
  echo "The Apache Portable Runtime Utility (APRUTIL) library cannot be found."
 
93
  echo "Either install APRUTIL on this system and supply the appropriate"
 
94
  echo "--with-apr-util option"
 
95
  echo ""
 
96
  echo "or"
 
97
  echo ""
 
98
  echo "get it with SVN and put it in a subdirectory of this source:"
 
99
  echo ""
 
100
  echo "   svn co \\"
 
101
  echo "    http://svn.apache.org/repos/asf/apr/apr-util/branches/APU_0_9_BRANCH \\"
 
102
  echo "    apr-util"
 
103
  echo ""
 
104
  echo "Run that right here in the top level of the Subversion tree,"
 
105
  echo "then run autogen.sh again."
 
106
  echo ""
 
107
  AC_MSG_ERROR([no suitable APRUTIL found])
 
108
])