<commit_before>AC_ARG_ENABLE([sasl],
              [AS_HELP_STRING([--enable-sasl=@<:@auto/yes/no@:>@],
                              [Use libsasl for Kerberos.])],
              [],
              [enable_sasl=auto])

SASL_CFLAGS=
SASL_LIBS=
sasl_mode=no

AS_IF([test "$enable_sasl" != "no"],[
  AC_CHECK_LIB([sasl2],[sasl_client_init],[have_sasl2_lib=yes],[have_sasl2_lib=no])
  AC_CHECK_LIB([sasl],[sasl_client_init],[have_sasl_lib=yes],[have_sasl_lib=no])
  if test "$have_sasl_lib" = "no" -a "$have_sasl2_lib" = "no" -a "$enable_sasl" = "yes" ; then
    AC_MSG_ERROR([You must install the Cyrus SASL libraries and development headers to enable SASL support.])
  fi

  AC_CHECK_HEADER([sasl/sasl.h],[have_sasl_headers=yes],[have_sasl_headers=no])
  if test "$have_sasl_headers" = "no" -a "$enable_sasl" = "yes" ; then
    AC_MSG_ERROR([You must install the Cyrus SASL development headers to enable SASL support.])
  fi

  if test "$have_sasl_headers" -a "$have_sasl2_lib" = "yes" ; then
    sasl_mode=sasl2
    SASL_LIBS=-lsasl2
  fi

  if test "$have_sasl_headers" -a "$have_sasl_lib" = "yes" ; then
    sasl_mode=sasl
    SASL_LIBS=-lsasl
  fi
])

AM_CONDITIONAL([ENABLE_SASL], [test "$sasl_mode" != "no"])
AC_SUBST(SASL_CFLAGS)
AC_SUBST(SASL_LIBS)<commit_msg>build: do a PKG_CHECK_MODULES() before fallback checks.<commit_after>AC_ARG_ENABLE([sasl],
              [AS_HELP_STRING([--enable-sasl=@<:@auto/yes/no@:>@],
                              [Use libsasl for Kerberos.])],
              [],
              [enable_sasl=auto])

SASL_CFLAGS=
SASL_LIBS=
sasl_mode=no

PKG_CHECK_MODULES(SASL, [libsasl2], [sasl_mode=sasl2], [
  AS_IF([test "$enable_sasl" != "no"],[
    AC_CHECK_LIB([sasl2],[sasl_client_init],[have_sasl2_lib=yes],[have_sasl2_lib=no])
    AC_CHECK_LIB([sasl],[sasl_client_init],[have_sasl_lib=yes],[have_sasl_lib=no])
    if test "$have_sasl_lib" = "no" -a "$have_sasl2_lib" = "no" -a "$enable_sasl" = "yes" ; then
      AC_MSG_ERROR([You must install the Cyrus SASL libraries and development headers to enable SASL support.])
    fi

    AC_CHECK_HEADER([sasl/sasl.h],[have_sasl_headers=yes],[have_sasl_headers=no])
    if test "$have_sasl_headers" = "no" -a "$enable_sasl" = "yes" ; then
      AC_MSG_ERROR([You must install the Cyrus SASL development headers to enable SASL support.])
    fi

    if test "$have_sasl_headers" -a "$have_sasl2_lib" = "yes" ; then
      sasl_mode=sasl2
      SASL_LIBS=-lsasl2
    fi

    if test "$have_sasl_headers" -a "$have_sasl_lib" = "yes" ; then
      sasl_mode=sasl
      SASL_LIBS=-lsasl
    fi
  ])
])

AM_CONDITIONAL([ENABLE_SASL], [test "$sasl_mode" != "no"])
AC_SUBST(SASL_CFLAGS)
AC_SUBST(SASL_LIBS)
{'fraction_non_alphanumeric': 0.149063670411985, 'fraction_numerical': 0.00599250936329588, 'mean_word_length': 3.9554730983302413, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6511660', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1158, 'n_words': 186}