1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
SVN_SUBDIR=""
AC_ARG_ENABLE(subversion, AC_HELP_STRING([--disable-subversion], [disable vcs support for subversion]), [with_subversion=${enableval}], [with_subversion=check])
if test "x$with_subversion" != xno; then
APR_CONFIGS="/usr/bin/apr-config /usr/bin/apr-1-config /usr/local/bin/apr-config /usr/local/apr/bin/apr-config"
SVN_SUBDIR="svn"
AC_ARG_WITH(apr-config,
[[ --with-apr-config=FILE Use the given path to apr-config when determining
APR configuration; defaults to "apr-config"]],
[
if test "$withval" != "yes" -a "$withval" != ""; then
APR_CONFIGS=$withval
fi
])
AC_MSG_CHECKING([for APR])
APR_CONFIG=""
for VALUE in $APR_CONFIGS ; do
if test -x "$VALUE"; then
if $VALUE --cflags > /dev/null; then
APR_CONFIG="$VALUE"
break
fi
fi
done
if test -n "$APR_CONFIG" ; then
AC_MSG_RESULT([$APR_CONFIG])
APR_CPPFLAGS="`$APR_CONFIG --cppflags`"
APR_INCLUDE="`$APR_CONFIG --includes`"
APR_LIBS="`$APR_CONFIG --link-ld --libs`"
else
AC_MSG_RESULT([not found])
SVN_SUBDIR=
fi
dnl
dnl APR util
dnl
APU_CONFIGS="/usr/bin/apu-config /usr/bin/apu-1-config /usr/local/bin/apu-config /usr/local/apu/bin/apu-config"
AC_ARG_WITH(apu-config,
[[ --with-apu-config=FILE Use the given path to apu-config when determining
APR util configuration; defaults to "apu-config"]],
[
if test "$withval" != "yes" -a "$withval" != ""; then
APU_CONFIGS=$withval
fi
])
AC_MSG_CHECKING([for APR util])
APU_CONFIG=""
for VALUE in $APU_CONFIGS ; do
if test -x $VALUE
then
if $VALUE --includes > /dev/null; then
APU_CONFIG=$VALUE
break
fi
fi
done
if test -n "$APU_CONFIG"; then
AC_MSG_RESULT([found])
APR_INCLUDE="$APR_INCLUDE `$APU_CONFIG --includes`"
APR_LIBS="$APR_LIBS `$APU_CONFIG --link-ld --libs`"
else
AC_MSG_RESULT([not found])
SVN_SUBDIR=
fi
dnl Search for subversion libraries
dnl svn-config was removed at current subversion release.
SVN_INCLUDES="/usr/local/include /usr/include /usr/include/subversion-1 /usr/local/include/subversion-1"
AC_ARG_WITH(svn-include,
[[ --with-svn-include=DIR Use the given path to the subversion headers.]],
[
if test "$withval" != "yes" -a "$withval" != ""; then
SVN_INCLUDES=$withval
fi
])
AC_MSG_CHECKING([for Subversion headers])
SVN_INCLUDE=""
for VALUE in $SVN_INCLUDES ; do
if test -f $VALUE/svn_types.h ; then
SVN_INCLUDE="-I$VALUE"
break
fi
done
if test $SVN_INCLUDE ; then
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
SVN_SUBDIR=
fi
SVN_MULTIARCH_LIBS="`find /usr/lib/ -maxdepth 1 -type d | xargs echo`"
SVN_LIBS="/usr/local/lib /usr/lib /usr/lib64 $SVN_MULTIARCH_LIBS"
AC_ARG_WITH(svn-lib,
[[ --with-svn-lib=DIR Use the given path to the subversion libraries.]],
[
if test "$withval" != "yes" -a "$withval" != ""; then
SVN_LIBS=$withval
fi
])
AC_MSG_CHECKING([for Subversion libraries])
SVN_LIB=""
for VALUE in $SVN_LIBS ; do
if ls $VALUE/libsvn_client-1.* 1>/dev/null 2>&1; then
SVN_LIB="-L$VALUE"
break
fi
done
if test $SVN_LIB ; then
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
SVN_SUBDIR=
fi
SVN_LIB="$SVN_LIB $APR_LIBS -lsvn_client-1 -lsvn_subr-1 -lsvn_ra-1"
SVN_INCLUDE="$SVN_INCLUDE $APR_INCLUDE"
SVN_CPPFLAGS="$APR_CPPFLAGS $SVN_CPPFLAGS"
if test "x$with_subversion" != xcheck && test -z "$SVN_SUBDIR"; then
AC_MSG_ERROR([--enable-subversion was given, but test for subversion failed. Please install subversion headers and libraries and its dependencies (APR and APU utils)])
fi
fi
AM_CONDITIONAL(include_subversion, test -n "$SVN_SUBDIR")
AC_SUBST(SVN_INCLUDE)
AC_SUBST(SVN_LIB)
AC_SUBST(SVN_CPPFLAGS)
AM_CONDITIONAL(include_kioslave_svn, test -n "$SVN_SUBDIR")
|