<commit_before>
PHP_ARG_WITH(groonga, whether groonga is available,[  --with-groonga[=DIR] With groonga support])


if test "$PHP_GROONGA" != "no"; then


  if test -r "$PHP_GROONGA/include/groonga/groonga.h"; then
	PHP_GROONGA_DIR="$PHP_GROONGA"
  else
	AC_MSG_CHECKING(for groonga in default path)
	for i in /usr /usr/local; do
	  if test -r "$i/include/groonga/groonga.h"; then
		PHP_GROONGA_DIR=$i
		AC_MSG_RESULT(found in $i)
		break
	  fi
	done
	if test "x" = "x$PHP_GROONGA_DIR"; then
	  AC_MSG_ERROR(not found)
	fi
  fi

  PHP_ADD_INCLUDE($PHP_GROONGA_DIR/include)

  export OLD_CPPFLAGS="$CPPFLAGS"
  export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_GROONGA"
  AC_CHECK_HEADER([groonga/groonga.h], [], AC_MSG_ERROR('groonga/groonga.h' header not found))
  PHP_SUBST(GROONGA_SHARED_LIBADD)


  PHP_CHECK_LIBRARY(groonga, grn_init,
  [
	PHP_ADD_LIBRARY_WITH_PATH(groonga, $PHP_GROONGA_DIR/lib, GROONGA_SHARED_LIBADD)
  ],[
	AC_MSG_ERROR([wrong groonga lib version or lib not found])
  ],[
	-L$PHP_GROONGA_DIR/lib
  ])
  export CPPFLAGS="$OLD_CPPFLAGS"

  export OLD_CPPFLAGS="$CPPFLAGS"
  export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_GROONGA"
<commit_msg>follow groonga.h path change.<commit_after>
PHP_ARG_WITH(groonga, whether groonga is available,[  --with-groonga[=DIR] With groonga support])


if test "$PHP_GROONGA" != "no"; then


  if test -r "$PHP_GROONGA/include/groonga.h"; then
	PHP_GROONGA_DIR="$PHP_GROONGA"
	PHP_ADD_INCLUDE($PHP_GROONGA_DIR/include)
  elif test -r "$PHP_GROONGA/include/groonga/groonga.h"; then
	PHP_GROONGA_DIR="$PHP_GROONGA"
	PHP_ADD_INCLUDE($PHP_GROONGA_DIR/include/groonga)
  else
	AC_MSG_CHECKING(for groonga in default path)
	for i in /usr /usr/local; do
	  if test -r "$i/include/groonga/groonga.h"; then
		PHP_GROONGA_DIR=$i
		AC_MSG_RESULT(found in $i)
		break
	  fi
	done
	if test "x" = "x$PHP_GROONGA_DIR"; then
	  AC_MSG_ERROR(not found)
	fi
	PHP_ADD_INCLUDE($PHP_GROONGA_DIR/include)
  fi

  export OLD_CPPFLAGS="$CPPFLAGS"
  export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_GROONGA"
  AC_CHECK_HEADER([groonga.h], [], AC_MSG_ERROR('groonga.h' header not found))
  PHP_SUBST(GROONGA_SHARED_LIBADD)


  PHP_CHECK_LIBRARY(groonga, grn_init,
  [
	PHP_ADD_LIBRARY_WITH_PATH(groonga, $PHP_GROONGA_DIR/lib, GROONGA_SHARED_LIBADD)
  ],[
	AC_MSG_ERROR([wrong groonga lib version or lib not found])
  ],[
	-L$PHP_GROONGA_DIR/lib
  ])
  export CPPFLAGS="$OLD_CPPFLAGS"

  export OLD_CPPFLAGS="$CPPFLAGS"
  export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_GROONGA"

{'fraction_non_alphanumeric': 0.1176706827309237, 'fraction_numerical': 0.0, 'mean_word_length': 5.258793969849246, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1320246', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1072, 'n_words': 189}