<commit_before># This macro tries to find curses, and defines HAVE_CURSES_H or HAVE_NCURSES_H
# if any of those headers are found. It also defines CURSES_LIB.
AC_DEFUN([MP_WITH_CURSES],
  [AC_ARG_WITH(ncurses, [  --with-ncurses          Force the use of ncurses over curses],,)
  AC_ARG_WITH(xcurses, [  --with-xcurses          Force the use of XCurses over curses],,)
    mp_save_LIBS="$LIBS"
   CURSES_LIB=""
   if test "$with_ncurses" != yes -a "$with_xcurses" != yes
   then
     AC_CACHE_CHECK([for working curses], mp_cv_curses,
       [LIBS="$LIBS -lcurses"
        AC_TRY_LINK(
          [#include <curses.h>],
          [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
          mp_cv_curses=yes, mp_cv_curses=no)])
     if test "$mp_cv_curses" = yes
     then
       AC_DEFINE(HAVE_CURSES_H, , [Use the header file curses.h])
       CURSES_LIB="-lcurses"
     fi
   fi
   if test ! "$CURSES_LIB" -a "$with_xcurses" != yes
   then
     AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses,
       [LIBS="$mp_save_LIBS -lncurses"
        AC_TRY_LINK(
          [#include <ncurses.h>],
          [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
          mp_cv_ncurses=yes, mp_cv_ncurses=no)])
     if test "$mp_cv_ncurses" = yes
     then
       AC_DEFINE(HAVE_NCURSES_H, , [Use the header file ncurses.h])
       CURSES_LIB="-lncurses"
     fi
   fi
   if test ! "$CURSES_LIB" -a "$with_ncurses" != yes
   then
     xcurses_deplibs="-L$x_libraries -lXaw -lXmu -lXt -lX11 -lSM -lICE -lXext"
     AC_CACHE_CHECK([for working XCurses], mp_cv_xcurses,<commit_msg>Prefer ncurses over other curses<commit_after># This macro tries to find curses, and defines HAVE_CURSES_H or HAVE_NCURSES_H
# if any of those headers are found. It also defines CURSES_LIB.
AC_DEFUN([MP_WITH_CURSES],
  [AC_ARG_WITH(xcurses, [  --with-xcurses          Force the use of XCurses over ncurses],,)
AC_ARG_WITH(curses, [  --with-curses           Force the use of curses over ncurses],,)
    mp_save_LIBS="$LIBS"
   CURSES_LIB=""
   if test "$with_curses" != yes -a "$with_xcurses" != yes
   then
     AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses,
       [LIBS="$LIBS -lncurses"
        AC_TRY_LINK(
          [#include <ncurses.h>],
          [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
          mp_cv_ncurses=yes, mp_cv_ncurses=no)])
     if test "$mp_cv_ncurses" = yes
     then
       AC_DEFINE(HAVE_NCURSES_H, , [Use the header file ncurses.h])
       CURSES_LIB="-lncurses"
     fi
   fi
   if test ! "$CURSES_LIB" -a "$with_xcurses" != yes
   then
     AC_CACHE_CHECK([for working curses], mp_cv_curses,
       [LIBS="$mp_save_LIBS -lcurses"
        AC_TRY_LINK(
          [#include <curses.h>],
          [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
          mp_cv_curses=yes, mp_cv_curses=no)])
     if test "$mp_cv_curses" = yes
     then
       AC_DEFINE(HAVE_CURSES_H, , [Use the header file curses.h])
       CURSES_LIB="-lcurses"
     fi
   fi
   if test ! "$CURSES_LIB" -a "$with_curses" != yes
   then
     xcurses_deplibs="-L$x_libraries -lXaw -lXmu -lXt -lX11 -lSM -lICE -lXext"
     AC_CACHE_CHECK([for working XCurses], mp_cv_xcurses,
{'fraction_non_alphanumeric': 0.11976047904191617, 'fraction_numerical': 0.0012606366214938543, 'mean_word_length': 2.9088669950738915, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6145777', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1272, 'n_words': 283}