1
dnl CHECK_APR([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8
[AC_HELP_STRING([--with-apr=PATH],[Path to apr-config or apr-1-config])],
13
if test -x "$apr_prefix" -a ! -d "$apr_prefix"; then
14
APR_CONFIG=$apr_prefix
15
AC_MSG_NOTICE([Using APR Config: $apr_prefix])
17
test_paths="$apr_prefix:$apr_prefix/bin:$apr_prefix/sbin"
18
test_paths="${test_paths}:/usr/bin:/usr/sbin"
19
AC_PATH_PROGS(APR_CONFIG, [apr-1-config apr-config], no, [$test_paths])
21
if test "$APR_CONFIG" = "no"; then
22
AC_MSG_ERROR([*** apr-config could not be found!])
23
AC_MSG_ERROR([*** Use the --with-apr option with the full path to apr-config/apr-1-config])
25
APR_INCLUDES=`$APR_CONFIG --includes 2>/dev/null`
26
APR_INCLUDEDIR=`$APR_CONFIG --includedir 2>/dev/null`
27
APR_LDFLAGS=`$APR_CONFIG --link-ld 2>/dev/null`
28
APR_LIBS=`$APR_CONFIG --libs 2>/dev/null`
29
APR_LIBTOOL=`$APR_CONFIG --link-libtool 2>/dev/null`
30
APR_CPPFLAGS=`$APR_CONFIG --cppflags 2>/dev/null`
31
APR_CFLAGS=`$APR_CONFIG --cflags 2>/dev/null`
32
APR_VERSION=`$APR_CONFIG --version 2>/dev/null`
34
AC_SUBST(APR_INCLUDES)
35
AC_SUBST(APR_INCLUDEDIR)
39
AC_SUBST(APR_CPPFLAGS)
45
dnl CHECK_APU([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
52
[AC_HELP_STRING([--with-apr-util=PATH],[Path to apu-config or apu-1-config])],
53
apu_prefix="$withval",
57
if test -x "$apu_prefix" -a ! -d "$apu_prefix"; then
58
APU_CONFIG=$apu_prefix
59
AC_MSG_NOTICE([Using APU Config: $apu_prefix])
61
test_paths="$apu_prefix:$apu_prefix/bin:$apu_prefix/sbin"
62
test_paths="${test_paths}:/usr/bin:/usr/sbin"
63
AC_PATH_PROGS(APU_CONFIG, [apu-1-config apu-config], no, [$test_paths])
65
if test "$APU_CONFIG" = "no"; then
66
AC_MSG_ERROR([*** apu-config could not be found!])
67
AC_MSG_ERROR([*** Use the --with-apr-util option with the full path to apu-config/apu-1-config])
69
APU_INCLUDES=`$APU_CONFIG --includes 2>/dev/null`
70
APU_INCLUDEDIR=`$APU_CONFIG --includedir 2>/dev/null`
71
APU_LDFLAGS=`$APU_CONFIG --link-ld 2>/dev/null`
72
APU_LIBS=`$APU_CONFIG --libs 2>/dev/null`
73
APU_LIBTOOL=`$APU_CONFIG --link-libtool 2>/dev/null`
74
APU_VERSION=`$APU_CONFIG --version 2>/dev/null`
76
AC_SUBST(APU_INCLUDES)
77
AC_SUBST(APU_INCLUDEDIR)
85
dnl CHECK_APR_HEADER(HEADER-FILE [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
86
dnl Test if the given APR header file exists
88
AC_DEFUN([CHECK_APR_HEADERS],
90
CFLAGS="$ac_save_CFLAGS $APR_CPPFLAGS $APR_CFLAGS $APR_INCLUDES"
91
AC_CHECK_HEADERS([$1],[$2],[$3],
94
CFLAGS="$ac_save_CFLAGS"
97
dnl CHECK_APR_HEADER(HEADER-FILE [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
98
dnl Test if the given APR-UTIL header file exists
100
AC_DEFUN([CHECK_APU_HEADERS],
102
CFLAGS="$ac_save_CFLAGS $APR_CPPFLAGS $APR_CFLAGS $APR_INCLUDES $APU_INCLUDES"
103
AC_CHECK_HEADERS([$1],[$2],[$3],
105
#include "apr_pools.h"
108
CFLAGS="$ac_save_CFLAGS"
111
dnl CHECK_APR_FUNCS(FUNC [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
112
dnl Test if the given APR header file exists
114
AC_DEFUN([CHECK_APR_FUNC],
116
LDFLAGS="$ac_save_LDFLAGS $APR_LDFLAGS"
117
AC_CHECK_FUNCS([$1],[$2],[$3])
118
LDFLAGS="$ac_save_LDFLAGS"
121
dnl CHECK_APR_FUNCS(FUNC [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
122
dnl Test if the given APR-UTIL header file exists
124
AC_DEFUN([CHECK_APU_FUNCS],
126
LDFLAGS="$ac_save_LDFLAGS $APR_LDFLAGS $APU_LDFLAGS"
127
AC_CHECK_FUNCS([$1],[$2],[$3])
128
LDFLAGS="$ac_save_LDFLAGS"