<commit_before>dnl
dnl  SVN_LIB_SERF
dnl
dnl  Check configure options and assign variables related to
dnl  the serf library.
dnl

AC_DEFUN(SVN_LIB_SERF,
[
  serf_found=no

  AC_ARG_WITH(serf,AC_HELP_STRING([--with-serf=PREFIX],
                                  [Serf WebDAV client library]),
  [
    if test "$withval" = "yes" ; then
      AC_MSG_ERROR([--with-serf requires an argument.])
    else
      if test "$svn_lib_neon" = "yes"; then
        AC_MSG_ERROR([neon and serf can't be used at the same time.])
      fi
      AC_MSG_NOTICE([serf library configuration])
      serf_prefix=$withval
      save_cppflags="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES"
      CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$serf_prefix/include/serf-0"
      AC_CHECK_HEADERS(serf.h,[
        save_ldflags="$LDFLAGS"
        LDFLAGS="-L$serf_prefix/lib"
        AC_CHECK_LIB(serf-0, serf_context_create,[serf_found="yes"])
        LDFLAGS="$save_ldflags"])
      CPPFLAGS="$save_cppflags"
    fi
  ])

  svn_lib_serf=$serf_found

  if test $serf_found = "reconfig"; then
    SVN_EXTERNAL_PROJECT([serf], [--with-apr=../apr --with-apr-util=../apr-util])
  fi

  if test $serf_found = "yes"; then
    SVN_SERF_PREFIX="$serf_prefix"
    SVN_SERF_INCLUDES="-I$serf_prefix/include/serf-0"
    SVN_SERF_LIBS="$serf_prefix/lib/libserf-0.la"
    SVN_SERF_EXPORT_LIBS="-L$serf_prefix/lib -lserf-0"
  fi

  AC_SUBST(SVN_SERF_PREFIX)
  AC_SUBST(SVN_SERF_INCLUDES)
  AC_SUBST(SVN_SERF_LIBS)
  AC_SUBST(SVN_SERF_EXPORT_LIBS)
])
<commit_msg>Use bundled serf if user has not specified where to look for serf and neon is not available or configured for '--without-neon'.<commit_after>dnl
dnl  SVN_LIB_SERF
dnl
dnl  Check configure options and assign variables related to
dnl  the serf library.
dnl

AC_DEFUN(SVN_LIB_SERF,
[
  serf_found=no

  AC_ARG_WITH(serf,AC_HELP_STRING([--with-serf=PREFIX],
                                  [Serf WebDAV client library]),
  [
    if test "$withval" = "yes" ; then
      AC_MSG_ERROR([--with-serf requires an argument.])
    else
      if test "$svn_lib_neon" = "yes"; then
        AC_MSG_ERROR([neon and serf can't be used at the same time.])
      fi
      AC_MSG_NOTICE([serf library configuration])
      serf_prefix=$withval
      save_cppflags="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES"
      CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$serf_prefix/include/serf-0"
      AC_CHECK_HEADERS(serf.h,[
        save_ldflags="$LDFLAGS"
        LDFLAGS="-L$serf_prefix/lib"
        AC_CHECK_LIB(serf-0, serf_context_create,[serf_found="yes"])
        LDFLAGS="$save_ldflags"])
      CPPFLAGS="$save_cppflags"
    fi
  ], [
       if test -d "$srcdir/serf" -a "$svn_lib_neon" = "no"; then
         serf_found=reconfig
       fi
     ])


  if test $serf_found = "reconfig"; then
    SVN_EXTERNAL_PROJECT([serf], [--with-apr=$apr_config --with-apr-util=$apu_config])
    serf_prefix=$prefix
    SVN_SERF_PREFIX="$serf_prefix"
    SVN_SERF_INCLUDES="-I$srcdir/serf"
    SVN_SERF_LIBS="$abs_builddir/serf/libserf-0.la"
    SVN_SERF_EXPORT_LIBS="-L$serf_prefix/lib -lserf-0"
  fi

  if test $serf_found = "yes"; then
    SVN_SERF_PREFIX="$serf_prefix"
    SVN_SERF_INCLUDES="-I$serf_prefix/include/serf-0"
    SVN_SERF_LIBS="$serf_prefix/lib/libserf-0.la"
    SVN_SERF_EXPORT_LIBS="-L$serf_prefix/lib -lserf-0"
  elif test $serf_found = "reconfig"; then
    serf_found=yes
  fi

  svn_lib_serf=$serf_found

  AC_SUBST(SVN_SERF_PREFIX)
  AC_SUBST(SVN_SERF_INCLUDES)
  AC_SUBST(SVN_SERF_LIBS)
  AC_SUBST(SVN_SERF_EXPORT_LIBS)
])

{'fraction_non_alphanumeric': 0.11653192082520211, 'fraction_numerical': 0.003345413994981879, 'mean_word_length': 3.5018820577164367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2606926', 'n_tokens_mistral': 1511, 'n_tokens_neox': 1491, 'n_words': 233}