<commit_before>dnl config.m4 for extension igbinary

dnl Comments in this file start with the string 'dnl'.
dnl Remove where necessary. This file will not work
dnl without editing.

dnl If your extension references something external, use with:

dnl PHP_ARG_WITH(igbinary, for igbinary support,
dnl Make sure that the comment is aligned:
dnl [  --with-igbinary             Include igbinary support])

dnl Otherwise use enable:

PHP_ARG_ENABLE(igbinary, whether to enable igbinary support,
  [  --enable-igbinary          Enable igbinary support])

if test "$PHP_IGBINARY" != "no"; then
  AC_CHECK_HEADERS([stdbool.h],, AC_MSG_ERROR([stdbool.h not exists]))
  AC_CHECK_HEADERS([stddef.h],, AC_MSG_ERROR([stddef.h not exists]))
  AC_CHECK_HEADERS([stdint.h],, AC_MSG_ERROR([stdint.h not exists]))

  AC_TRY_COMPILE([
  #include <php_version.h>
  ],[
#if PHP_MAJOR_VERSION > 5
#error PHP > 5
#endif
  ],[
  subdir=src/php5
  PHP_IGBINARY_SRC_FILES="$subdir/igbinary.c $subdir/hash_si.c"
  AC_MSG_RESULT([PHP 5])
  ],[
  subdir=src/php7
  PHP_IGBINARY_SRC_FILES="$subdir/igbinary.c $subdir/hash_si.c $subdir/hash_si_ptr.c"
  AC_MSG_RESULT([PHP 7])
  ])

  AC_MSG_CHECKING([for APC/APCU includes])
  if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then
    apc_inc_path="$phpincludedir"
    AC_MSG_RESULT([APCU in $apc_inc_path])
    AC_DEFINE(HAVE_APCU_SUPPORT,1,[Whether to enable apcu support])
  elif test -f "$phpincludedir/ext/apc/apc_serializer.h"; then
    apc_inc_path="$phpincludedir"
    AC_MSG_RESULT([APC in $apc_inc_path])
    AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support])
  elif test -f "${srcdir}/$subdir/apc_serializer.h"; then
    AC_MSG_RESULT([apc_serializer.h bundled])
    AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support])
    AC_DEFINE(USE_BUNDLED_APC,1,[Whether to use bundled apc includes])
  else
    AC_MSG_RESULT([not found])<commit_msg>Fix config.m4<commit_after>dnl config.m4 for extension igbinary

dnl Comments in this file start with the string 'dnl'.
dnl Remove where necessary. This file will not work
dnl without editing.

dnl If your extension references something external, use with:

dnl PHP_ARG_WITH(igbinary, for igbinary support,
dnl Make sure that the comment is aligned:
dnl [  --with-igbinary             Include igbinary support])

dnl Otherwise use enable:

PHP_ARG_ENABLE(igbinary, whether to enable igbinary support,
  [  --enable-igbinary          Enable igbinary support])

if test "$PHP_IGBINARY" != "no"; then
  AC_CHECK_HEADERS([stdbool.h],, AC_MSG_ERROR([stdbool.h not exists]))
  AC_CHECK_HEADERS([stddef.h],, AC_MSG_ERROR([stddef.h not exists]))
  AC_CHECK_HEADERS([stdint.h],, AC_MSG_ERROR([stdint.h not exists]))

  AC_MSG_CHECKING(PHP version)

  AC_TRY_COMPILE([
  #include <$phpincludedir/main/php_version.h>
  ],[
#if PHP_MAJOR_VERSION > 5
#error PHP > 5
#endif
  ],[
  subdir=src/php5
  PHP_IGBINARY_SRC_FILES="$subdir/igbinary.c $subdir/hash_si.c"
  AC_MSG_RESULT([PHP 5])
  ],[
  subdir=src/php7
  PHP_IGBINARY_SRC_FILES="$subdir/igbinary.c $subdir/hash_si.c $subdir/hash_si_ptr.c"
  AC_MSG_RESULT([PHP 7])
  ])

  AC_MSG_CHECKING([for APC/APCU includes])
  if test -f "$phpincludedir/ext/apcu/apc_serializer.h"; then
    apc_inc_path="$phpincludedir"
    AC_MSG_RESULT([APCU in $apc_inc_path])
    AC_DEFINE(HAVE_APCU_SUPPORT,1,[Whether to enable apcu support])
  elif test -f "$phpincludedir/ext/apc/apc_serializer.h"; then
    apc_inc_path="$phpincludedir"
    AC_MSG_RESULT([APC in $apc_inc_path])
    AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support])
  elif test -f "${srcdir}/$subdir/apc_serializer.h"; then
    AC_MSG_RESULT([apc_serializer.h bundled])
    AC_DEFINE(HAVE_APC_SUPPORT,1,[Whether to enable apc support])
    AC_DEFINE(USE_BUNDLED_APC,1,[Whether to use bundled apc includes])
  else
    AC_MSG_RESULT([not found])
{'fraction_non_alphanumeric': 0.11348256116605934, 'fraction_numerical': 0.005986465382613222, 'mean_word_length': 4.840425531914893, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6999482', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1411, 'n_words': 318}