72
71
AC_SUBST(APR_VERSION)
73
72
AC_SUBST(APR_CONFIG)
75
echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
77
APR_FIND_APU("$srcdir/apr-util", "./apr-util", 1, [0 1])
79
if test "$apu_found" = "no"; then
80
AC_MSG_ERROR([APR-util not found. Please read the documentation.])
83
# Catch some misconfigurations:
84
case ${apr_found}.${apu_found} in
86
AC_MSG_ERROR([Cannot use an external APR-util with the bundled APR])
89
AC_MSG_ERROR([Cannot use an external APR with the bundled APR-util])
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"
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;'`"
81
if test "$APR_VERSION_NUM" -ge "200000"; then
89
sinclude(build/find_apu.m4)
91
echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
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!])])
97
if test "$apu_found" = "no"; then
98
AC_MSG_ERROR([APR-util not found. Please read the documentation.])
101
# Catch some misconfigurations:
102
case ${apr_found}.${apu_found} in
104
AC_MSG_ERROR([Cannot use an external APR-util with the bundled APR])
107
AC_MSG_ERROR([Cannot use an external APR with the bundled APR-util])
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"
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"
108
127
AC_SUBST(APU_BINDIR)
109
128
AC_SUBST(APU_INCLUDES)