1
dnl Check for subversion client libraries
2
dnl CHECK_PATH_SUBVERSION(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
3
AC_DEFUN([CHECK_PATH_SUBVERSION],
8
[AC_HELP_STRING([--with-svn=PATH],[Path subversion headers and libraries])],
12
AC_LIBTOOL_SYS_DYNAMIC_LINKER
14
# Determine subversion include directory.
15
if test -z $svn_path; then
16
test_paths="/usr/include /usr/include/subversion-1
17
/usr/local/include /usr/local/include/subversion-1"
19
test_paths="${svn_path}/include ${svn_path}/include/subversion-1"
22
for x in $test_paths ; do
23
AC_MSG_CHECKING([for Subversion Includes in ${x}])
24
if test -f ${x}/svn_version.h; then
26
AC_MSG_RESULT([found it! Use --with-svn to specify another.])
33
if test -z "$SVN_INCLUDES"; then
34
ifelse([$2], , AC_MSG_ERROR([Subversion include files not found.]), $2)
37
# Determine subversion lib directory
38
if test -z $svn_path; then
39
test_paths="/usr/lib /usr/local/lib"
41
test_paths="${svn_path}/lib"
44
for x in $test_paths ; do
45
svn_shlib="${x}/libsvn_repos-1${shrext_cmds}"
46
AC_MSG_CHECKING([for Subversion library in ${x}])
47
if test -f $svn_shlib; then
51
CFLAGS="$SVN_INCLUDES $CFLAGS"
52
LDFLAGS="-L$x $LDFLAGS"
53
AC_CHECK_LIB(svn_repos-1, svn_repos_open,
55
dnl // TODO: Should we check for other libs here?
63
if test -z "$SVN_LIBS"; then
64
ifelse([$2], , AC_MSG_ERROR([Subversion library not found.]), $2)
67
AC_SUBST(SVN_INCLUDES)