<commit_before>AC_DEFUN([AX_PATH_LIB_READLINE],
    [
    AC_MSG_CHECKING([lib readline])
    AC_ARG_WITH([readline],
        AC_HELP_STRING(
            [--with-readline@<:@=prefix@:>@],
            [compile xmlreadline part (via libreadline check)]
        ),
        [],
        [with_readline="yes"]
    )dnl

    AS_CASE(["$with_readline"],
        [no],
        AC_MSG_ERROR([readline required to build]),
        [yes],
        [dnl
        AC_SEARCH_LIBS([readline], [readline],
            [AS_VAR_SET([READLINE_LIBS], ["-lreadline"])],
            [AC_MSG_ERROR([libreadline library not found])],
            [$CURSES_LIB]
        )dnl
        ],
        [dnl
        AS_VAR_SET([READLINE_LIBS], ["$with_readline/lib/libreadline.a"])
        AC_CHECK_FILE("$READLINE_LIBS", [],
            AC_MSG_ERROR([readline library not found])
        )dnl
        AS_VAR_SET([READLINE_CFLAGS], ["-I$with_readline/include"])
        AS_VAR_SET([READLINE_SAVED_LDFLAGS], ["$LDFLAGS"])
        LNAV_ADDTO(CPPFLAGS, ["-I$with_readline/include"])
        dnl We want the provided path to be the first in the search order.
        LDFLAGS="-L$with_readline/lib $LDFLAGS"
        ]dnl
    )

    AC_CHECK_HEADERS([readline.h readline/readline.h],
        [dnl
        AS_VAR_SET([HAVE_READLINE_HEADERS], [1])
        break
        ]dnl
    )


    AS_VAR_SET_IF([HAVE_READLINE_HEADERS], [],
        [AC_MSG_ERROR([readline headers not found])]
    )

    dnl Ensure that the readline library has the required symbols.
    dnl i.e. We haven't picked up editline.
    AC_SEARCH_LIBS([history_set_history_state], [readline],
        [
        AS_VAR_SET_IF([READLINE_SAVED_LDFLAGS],
            AS_VAR_SET([LDFLAGS], ["$READLINE_SAVED_LDFLAGS"])
        )
        ],
        AC_MSG_ERROR([libreadline does not have the required symbols. editline possibly masquerading as readline.])
        [$CURSES]
    )

    AC_SUBST([READLINE_LIBS])
    AC_SUBST([READLINE_CFLAGS])
    ]dnl
)dnl<commit_msg>Remove the check for libreadline.a<commit_after>AC_DEFUN([AX_PATH_LIB_READLINE],
    [
    AC_MSG_CHECKING([lib readline])
    AC_ARG_WITH([readline],
        AC_HELP_STRING(
            [--with-readline@<:@=prefix@:>@],
            [compile xmlreadline part (via libreadline check)]
        ),
        [],
        [with_readline="yes"]
    )dnl

    AS_CASE(["$with_readline"],
        [no],
        AC_MSG_ERROR([readline required to build]),
        [yes],
        [],
        [dnl
        AS_VAR_SET([READLINE_CFLAGS], ["-I$with_readline/include"])
        LNAV_ADDTO(CPPFLAGS, ["-I$with_readline/include"])
        dnl We want the provided path to be the first in the search order.
        LDFLAGS="-L$with_readline/lib $LDFLAGS"
        ]dnl
    )

    AC_SEARCH_LIBS([readline], [readline],
        [AS_VAR_SET([READLINE_LIBS], ["-lreadline"])],
        [AC_MSG_ERROR([libreadline library not found])],
        [$CURSES_LIB]
    )dnl

    AC_CHECK_HEADERS([readline.h readline/readline.h],
        [dnl
        AS_VAR_SET([HAVE_READLINE_HEADERS], [1])
        break
        ]dnl
    )


    AS_VAR_SET_IF([HAVE_READLINE_HEADERS], [],
        [AC_MSG_ERROR([readline headers not found])]
    )

    dnl Ensure that the readline library has the required symbols.
    dnl i.e. We haven't picked up editline.
    AC_SEARCH_LIBS([history_set_history_state], [readline],
        [],
        AC_MSG_ERROR([libreadline does not have the required symbols. editline possibly masquerading as readline.])
        [$CURSES]
    )

    AC_SUBST([READLINE_LIBS])
    AC_SUBST([READLINE_CFLAGS])
    ]dnl
)dnl
{'fraction_non_alphanumeric': 0.12496513249651325, 'fraction_numerical': 0.0005578800557880056, 'mean_word_length': 2.561072492552135, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5361871', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1241, 'n_words': 219}