AC_DEFUN(SVN_UTF8PROC,
[
AC_ARG_WITH([utf8proc],
[AS_HELP_STRING([--with-utf8proc=PREFIX|internal],
[look for utf8proc in PREFIX or use the internal code])],
[
if test "$withval" = internal; then
utf8proc_prefix=internal
elif test "$withval" = yes; then
utf8proc_prefix=std
else
utf8proc_prefix="$withval"
fi
],
[utf8proc_prefix=std])
if test "$utf8proc_prefix" = "no"; then
AC_MSG_ERROR([Subversion requires UTF8PROC])
fi
if test "$utf8proc_prefix" = "internal"; then
AC_MSG_NOTICE([using internal utf8proc])
AC_DEFINE([SVN_INTERNAL_UTF8PROC], [1],
[Define to use internal UTF8PROC code])
else
if test "$utf8proc_prefix" = "std"; then
SVN_UTF8PROC_STD
else
SVN_UTF8PROC_PREFIX
fi
if test "$utf8proc_found" != "yes"; then
AC_MSG_ERROR([Subversion requires UTF8PROC])
fi
fi
AC_SUBST(SVN_UTF8PROC_INCLUDES)
AC_SUBST(SVN_UTF8PROC_LIBS)
])
AC_DEFUN(SVN_UTF8PROC_STD,
[
AC_MSG_NOTICE([utf8proc configuration without pkg-config])
AC_CHECK_LIB(utf8proc, utf8proc_version, [
utf8proc_found=yes
SVN_UTF8PROC_LIBS="-lutf8proc"
])
])
AC_DEFUN(SVN_UTF8PROC_PREFIX,
[
AC_MSG_NOTICE([utf8proc configuration via prefix])
save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I$utf8proc_prefix/include"
save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$utf8proc_prefix/lib"
AC_CHECK_LIB(utf8proc, utf8proc_version, [
utf8proc_found=yes
SVN_UTF8PROC_INCLUDES="-I$utf8proc_prefix/include"
SVN_UTF8PROC_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS(-L$utf8proc_prefix/lib)` -lutf8proc"
])
LDFLAGS="$save_ldflags"
CPPFLAGS="$save_cppflags"
])