<commit_before>PHP_ARG_WITH(phpwkhtmltox, [for libwkhtmltox support],
[  --with-phpwkhtmltox     Include libwkhtmltox support])

if test "$PHP_PHPWKHTMLTOX" != "no"; then
    for i in /usr /usr/local /opt; do
        if test -f $i/include/wkhtmltox/pdf.h; then
            WKHTMLTOX_LIB_DIR=$i/lib
            WKHTMLTOX_INC_DIR=$i/include
            AC_MSG_RESULT([found in $i]) 
        fi
    done
    
    if test -z "$WKHTMLTOX_LIB_DIR" -o -z "$WKHTMLTOX_INC_DIR"; then
        AC_MSG_RESULT([not found])
        AC_MSG_ERROR([Please install libwkhtmltox])<commit_msg>Make it possible to pass a custom base directory for libwkhtmltox.<commit_after>PHP_ARG_WITH(phpwkhtmltox, [for libwkhtmltox support],
[  --with-phpwkhtmltox=[DIR]     Include libwkhtmltox support])

if test "$PHP_PHPWKHTMLTOX" != "no"; then
    for i in $PHP_PHPWKHTMLTOX /usr /usr/local /opt; do
        if test -f $i/include/wkhtmltox/pdf.h; then
            WKHTMLTOX_LIB_DIR=$i/lib
            WKHTMLTOX_INC_DIR=$i/include
            AC_MSG_RESULT([found in $i]) 
        fi
    done
    
    if test -z "$WKHTMLTOX_LIB_DIR" -o -z "$WKHTMLTOX_INC_DIR"; then
        AC_MSG_RESULT([not found])
        AC_MSG_ERROR([Please install libwkhtmltox])
{'fraction_non_alphanumeric': 0.107113654946852, 'fraction_numerical': 0.0, 'mean_word_length': 2.789473684210526, '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': '4835283', 'n_tokens_mistral': 478, 'n_tokens_neox': 432, 'n_words': 100}