<commit_before># ============================================================
# Check for protoc
#
# Looks for the protoc binary and the protocol buffers
# headers.
#
# If it succeeds, it calls:
#   AC_SUBST(PROTOC_BIN), AC_SUBST(PROTOC_CPPFLAGS) and
#   AC_SUBST(PROTOC_LIBS)
# and sets HAVE_PROTOC
#
# Note: based, in part, on ax_boost_base.m4
#
# LICENSE
#
#   Copyright (c) 2014 MapQuest Inc.
#   Copyright (c) 2008 <NAME> <<EMAIL>>
#   Copyright (c) 2009 <NAME>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

AC_DEFUN([REQUIRE_PROTOC],
[
AC_ARG_WITH([protoc],
  [AS_HELP_STRING([--with-protoc=PATH],
    [full path to the protoc program.])],
  [ac_protoc_bin="$withval"],
  [ac_protoc_bin=""])

if test "x$ac_protoc_bin" = "x" ; then
   AC_PATH_PROG([PROTOC_BIN],[protoc])
else
   PROTOC_BIN="$ac_protoc_bin"
fi

AC_ARG_WITH([protobuf-includes],
  [AS_HELP_STRING([--with-protobuf-includes=PATH],
    [path to base of include files for protobuf (without /google at the end)])],
  [ac_protobuf_includes="$withval"],
  [ac_protobuf_includes="/usr/include"])

AC_ARG_WITH([protobuf-libdir],
  [AS_HELP_STRING([--with-protobuf-libdir=PATH],
    [path to directory containing libraries for protobuf])],
  [ac_protobuf_libdir="$withval"],
  [ac_protobuf_libdir=""])

dnl Check that the binary is present

AC_MSG_CHECKING(for protoc)
if test -x "$PROTOC_BIN" ; then
  AC_MSG_RESULT([yes])
else
  AC_MSG_RESULT([no])
  AC_MSG_ERROR([cannot find protoc in your path, but it is required for building burritile. Please install protobuf-compiler.])
fi
AC_SUBST(PROTOC_BIN)

dnl Check that the headers are present

old_cppflags=${CPPFLAGS}
PROTOC_CPPFLAGS=""
if test -n "${ac_protobuf_includes}" ; then
   PROTOC_CPPFLAGS="-I${ac_protobuf_includes}"
   CPPFLAGS="${CPPFLAGS} ${PROTOC_CPPFLAGS}"
fi

AC_MSG_CHECKING(for protobuf headers)
AC_COMPILE_IFELSE(
  [AC_LANG_PROGRAM([#include <google/protobuf/stubs/common.h>])],
  [AC_MSG_RESULT([yes])],
  [AC_MSG_RESULT([no])
   AC_MSG_ERROR([cannot find protobuf headers, please install libprotobuf-dev.])])

CPPFLAGS=${old_cppflags}
AC_SUBST(PROTOC_CPPFLAGS)

dnl On 64-bit systems check for system libraries in both lib64 and lib.
dnl The former is specified by FHS, but e.g. Debian does not adhere to
dnl this (as it rises problems for generic multi-arch support).
dnl The last entry in the list is chosen by default when no libraries<commit_msg>remove reference to other project<commit_after># ============================================================
# Check for protoc
#
# Looks for the protoc binary and the protocol buffers
# headers.
#
# If it succeeds, it calls:
#   AC_SUBST(PROTOC_BIN), AC_SUBST(PROTOC_CPPFLAGS) and
#   AC_SUBST(PROTOC_LIBS)
# and sets HAVE_PROTOC
#
# Note: based, in part, on ax_boost_base.m4
#
# LICENSE
#
#   Copyright (c) 2014 MapQuest Inc.
#   Copyright (c) 2008 <NAME> <<EMAIL>>
#   Copyright (c) 2009 <NAME>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

AC_DEFUN([REQUIRE_PROTOC],
[
AC_ARG_WITH([protoc],
  [AS_HELP_STRING([--with-protoc=PATH],
    [full path to the protoc program.])],
  [ac_protoc_bin="$withval"],
  [ac_protoc_bin=""])

if test "x$ac_protoc_bin" = "x" ; then
   AC_PATH_PROG([PROTOC_BIN],[protoc])
else
   PROTOC_BIN="$ac_protoc_bin"
fi

AC_ARG_WITH([protobuf-includes],
  [AS_HELP_STRING([--with-protobuf-includes=PATH],
    [path to base of include files for protobuf (without /google at the end)])],
  [ac_protobuf_includes="$withval"],
  [ac_protobuf_includes="/usr/include"])

AC_ARG_WITH([protobuf-libdir],
  [AS_HELP_STRING([--with-protobuf-libdir=PATH],
    [path to directory containing libraries for protobuf])],
  [ac_protobuf_libdir="$withval"],
  [ac_protobuf_libdir=""])

dnl Check that the binary is present

AC_MSG_CHECKING(for protoc)
if test -x "$PROTOC_BIN" ; then
  AC_MSG_RESULT([yes])
else
  AC_MSG_RESULT([no])
  AC_MSG_ERROR([cannot find protoc in your path, but it is required. Please install protobuf-compiler.])
fi
AC_SUBST(PROTOC_BIN)

dnl Check that the headers are present

old_cppflags=${CPPFLAGS}
PROTOC_CPPFLAGS=""
if test -n "${ac_protobuf_includes}" ; then
   PROTOC_CPPFLAGS="-I${ac_protobuf_includes}"
   CPPFLAGS="${CPPFLAGS} ${PROTOC_CPPFLAGS}"
fi

AC_MSG_CHECKING(for protobuf headers)
AC_COMPILE_IFELSE(
  [AC_LANG_PROGRAM([#include <google/protobuf/stubs/common.h>])],
  [AC_MSG_RESULT([yes])],
  [AC_MSG_RESULT([no])
   AC_MSG_ERROR([cannot find protobuf headers, please install libprotobuf-dev.])])

CPPFLAGS=${old_cppflags}
AC_SUBST(PROTOC_CPPFLAGS)

dnl On 64-bit systems check for system libraries in both lib64 and lib.
dnl The former is specified by FHS, but e.g. Debian does not adhere to
dnl this (as it rises problems for generic multi-arch support).
dnl The last entry in the list is chosen by default when no libraries
{'fraction_non_alphanumeric': 0.13751694751113694, 'fraction_numerical': 0.0065853186132093745, 'mean_word_length': 5.375308641975309, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6383099', 'n_tokens_mistral': 1796, 'n_tokens_neox': 1745, 'n_words': 500}