~ubuntu-branches/ubuntu/trusty/serf/trusty-updates

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Peter Samuelson
  • Date: 2010-02-14 23:04:17 UTC
  • mfrom: (1.2.3 upstream)
  • mto: (3.3.1 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20100214230417-8zjz7vd5plcoykaz
* New upstream release.
  - patches/libtool: update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
sinclude(build/apr_common.m4)
9
9
sinclude(build/find_apr.m4)
10
 
sinclude(build/find_apu.m4)
11
10
 
12
11
AC_PREFIX_DEFAULT(/usr/local/serf)
13
12
 
36
35
 
37
36
echo $ac_n "${nl}Configuring Apache Portable Runtime library...${nl}"
38
37
 
39
 
APR_FIND_APR("$srcdir/apr", "./apr", 1, [0 1])
 
38
APR_FIND_APR("$srcdir/apr", "./apr", 1, 0 1 2)
40
39
 
41
40
if test "$apr_found" = "no"; then
42
41
  AC_MSG_ERROR([APR not found.  Please read the documentation.])
72
71
AC_SUBST(APR_VERSION)
73
72
AC_SUBST(APR_CONFIG)
74
73
 
75
 
echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
76
 
 
77
 
APR_FIND_APU("$srcdir/apr-util", "./apr-util", 1, [0 1])
78
 
 
79
 
if test "$apu_found" = "no"; then
80
 
  AC_MSG_ERROR([APR-util not found.  Please read the documentation.])
81
 
fi
82
 
 
83
 
# Catch some misconfigurations:
84
 
case ${apr_found}.${apu_found} in
85
 
reconfig.yes)
86
 
  AC_MSG_ERROR([Cannot use an external APR-util with the bundled APR])
87
 
  ;;
88
 
yes.reconfig)
89
 
  AC_MSG_ERROR([Cannot use an external APR with the bundled APR-util])
90
 
  ;;
91
 
esac  
92
 
 
93
 
if test "$apu_found" = "reconfig"; then
94
 
  APR_SUBDIR_CONFIG(apr-util,
95
 
                    [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir],
96
 
                    [--enable-layout=*|\'--enable-layout=*])
97
 
  dnl We must be the last to build and the first to be cleaned
98
 
  SERF_BUILD_SRCLIB_DIRS="$SERF_BUILD_SRCLIB_DIRS apr-util"
99
 
  SERF_CLEAN_SRCLIB_DIRS="apr-util $SERF_CLEAN_SRCLIB_DIRS"
100
 
fi
101
 
 
102
 
APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)
103
 
APU_BINDIR=`$apu_config --bindir`
104
 
APU_INCLUDES=`$apu_config --includes`
105
 
APU_VERSION=`$apu_config --version`
106
 
APU_CONFIG="$APU_BINDIR/apu-`echo ${APU_VERSION} | sed 's,\..*,,'`-config"
 
74
APR_VERSION_MAJOR="`echo \"$APR_VERSION\" | sed 's,\..*,,'`"
 
75
APR_VERSION_NUM="`echo \"$APR_VERSION\" | \
 
76
                sed -e 's/[[^0-9\.]].*$//' \
 
77
                    -e 's/\.\([[0-9]]\)$/.0\1/' \
 
78
                    -e 's/\.\([[0-9]][[0-9]]\)$/.0\1/' \
 
79
                    -e 's/\.\([[0-9]]\)\./0\1/; s/\.//g;'`"
 
80
 
 
81
if test "$APR_VERSION_NUM" -ge "200000"; then
 
82
 
 
83
  APU_BINDIR=""
 
84
  APU_INCLUDES=""
 
85
  APU_VERSION=""
 
86
  APU_CONFIG=""
 
87
 
 
88
else
 
89
  sinclude(build/find_apu.m4)
 
90
 
 
91
  echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
 
92
 
 
93
   ifdef([APR_FIND_APU], [
 
94
     APR_FIND_APU("$srcdir/apr-util", "./apr-util", 1, $APR_VERSION_MAJOR)
 
95
   ], [AC_MSG_ERROR([APR-util required, but find_apu.m4 not present!])])
 
96
 
 
97
  if test "$apu_found" = "no"; then
 
98
    AC_MSG_ERROR([APR-util not found.  Please read the documentation.])
 
99
  fi
 
100
 
 
101
  # Catch some misconfigurations:
 
102
  case ${apr_found}.${apu_found} in
 
103
    reconfig.yes)
 
104
      AC_MSG_ERROR([Cannot use an external APR-util with the bundled APR])
 
105
      ;;
 
106
    yes.reconfig)
 
107
      AC_MSG_ERROR([Cannot use an external APR with the bundled APR-util])
 
108
      ;;
 
109
  esac  
 
110
 
 
111
  if test "$apu_found" = "reconfig"; then
 
112
    APR_SUBDIR_CONFIG(apr-util,
 
113
                      [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir],
 
114
                      [--enable-layout=*|\'--enable-layout=*])
 
115
    dnl We must be the last to build and the first to be cleaned
 
116
    SERF_BUILD_SRCLIB_DIRS="$SERF_BUILD_SRCLIB_DIRS apr-util"
 
117
    SERF_CLEAN_SRCLIB_DIRS="apr-util $SERF_CLEAN_SRCLIB_DIRS"
 
118
  fi
 
119
 
 
120
  APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)
 
121
  APU_BINDIR=`$apu_config --bindir`
 
122
  APU_INCLUDES=`$apu_config --includes`
 
123
  APU_VERSION=`$apu_config --version`
 
124
  APU_CONFIG="$APU_BINDIR/apu-`echo ${APU_VERSION} | sed 's,\..*,,'`-config"
 
125
fi
107
126
 
108
127
AC_SUBST(APU_BINDIR)
109
128
AC_SUBST(APU_INCLUDES)
171
190
dnl CuTest requires libm on Solaris
172
191
AC_SEARCH_LIBS(fabs, m)
173
192
 
174
 
libs="`$apu_config --link-libtool --libs` `$apr_config --link-libtool --libs` $LIBS"
 
193
libs=""
 
194
if test -n "$apu_config"; then
 
195
  APR_ADDTO(libs, [`$apu_config --link-libtool --libs`])
 
196
fi
 
197
APR_ADDTO(libs, [`$apr_config --link-libtool --libs` $LIBS])
 
198
 
175
199
APR_ADDTO(SERF_LIBS, [$libs])
176
200
AC_SUBST(SERF_LIBS)
177
201