<commit_before># Check for LIDIA
# <NAME>, 2001-12-10
# Modified by <NAME>, 2003-12-03
# Inspired by gnome-bonobo-check.m4 by <NAME>, 99-04-12
# Stolen from <NAME>       99-2-5
# stolen from <NAME> again
# stolen back from <NAME>
# stolen from <NAME>
# Shamelessly stolen from <NAME>

dnl LB_CHECK_LIDIA ([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl
dnl Test for LIDIA Library and define LIDIA_CFLAGS and LIDIA_LIBS

AC_DEFUN([LB_CHECK_LIDIA],
[

AC_ARG_WITH(lidia,
	    [  --with-lidia=<path>|yes|no 
					   Use Lidia library. 
					   If argument is no, you do not have the library installed on your machine (set as default).
					   If argument is yes or <empty> that means the library is reachable with the standard
					   search path (/usr or /usr/local).
	 				   Otherwise you give the <path> to the directory which contain the library. 
	     ],
	     [if test "$withval" = yes ; then
			LIDIA_HOME_PATH="${DEFAULT_CHECKING_PATH}"
	      elif test "$withval" != no ; then
			LIDIA_HOME_PATH="$withval"
	     fi],
	     [])

min_lidia_version=ifelse([$1], ,2.1,$1)


dnl Check for existence

BACKUP_CXXFLAGS=${CXXFLAGS}
BACKUP_LIBS=${LIBS}

if test -n "$LIDIA_HOME_PATH" ; then
AC_MSG_CHECKING(for LIDIA >= $min_lidia_version)
fi

for LIDIA_HOME in ${LIDIA_HOME_PATH} 
 do	
if test -r "$LIDIA_HOME/include/LiDIA/LiDIA.h"; then
	if test "x$LIDIA_HOME" != "x/usr" -a "x$LIDIA_HOME" != "x/usr/local"; then
		LIDIA_CFLAGS="-I${LIDIA_HOME}/include"
		LIDIA_LIBS="-L${LIDIA_HOME}/lib -llidia"
	else
		LIDIA_CFLAGS=
		LIDIA_LIBS="-llidia"		
	fi	
	CXXFLAGS="${BACKUP_CXXFLAGS} ${LIDIA_CFLAGS} ${GMP_CFLAGS}" 
	LIBS="${BACKUP_LIBS} ${LIDIA_LIBS} ${GMP_LIBS}"

	AC_TRY_LINK(
	[#include <LiDIA/bigint.h>],
	[LiDIA::bigint a;],
	[
	AC_TRY_RUN(
	[#include <LiDIA/LiDIA.h>
	int main () {  if (LIDIA_MAJOR_VERSION < 2) return -1; else return 0; }
	],[
	lidia_found="yes"
	break
	],[	
	lidia_problem="$problem $LIDIA_HOME"	
	unset LIDIA_CFLAGS
	unset LIDIA_LIBS
	],[
	lidia_found="yes"<commit_msg>2004-07-02 <NAME> 	* change -llidia ro right -lLiDIA<commit_after># Check for LIDIA
# <NAME>, 2001-12-10
# Modified by <NAME>, 2003-12-03
# Inspired by gnome-bonobo-check.m4 by <NAME>, 99-04-12
# Stolen from <NAME>       99-2-5
# stolen from <NAME> again
# stolen back from <NAME>
# stolen from <NAME>
# Shamelessly stolen from <NAME>

dnl LB_CHECK_LIDIA ([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl
dnl Test for LIDIA Library and define LIDIA_CFLAGS and LIDIA_LIBS

AC_DEFUN([LB_CHECK_LIDIA],
[

AC_ARG_WITH(lidia,
	    [  --with-lidia=<path>|yes|no 
					   Use Lidia library. 
					   If argument is no, you do not have the library installed on your machine (set as default).
					   If argument is yes or <empty> that means the library is reachable with the standard
					   search path (/usr or /usr/local).
	 				   Otherwise you give the <path> to the directory which contain the library. 
	     ],
	     [if test "$withval" = yes ; then
			LIDIA_HOME_PATH="${DEFAULT_CHECKING_PATH}"
	      elif test "$withval" != no ; then
			LIDIA_HOME_PATH="$withval"
	     fi],
	     [])

min_lidia_version=ifelse([$1], ,2.1,$1)


dnl Check for existence

BACKUP_CXXFLAGS=${CXXFLAGS}
BACKUP_LIBS=${LIBS}

if test -n "$LIDIA_HOME_PATH" ; then
AC_MSG_CHECKING(for LIDIA >= $min_lidia_version)
fi

for LIDIA_HOME in ${LIDIA_HOME_PATH} 
 do	
if test -r "$LIDIA_HOME/include/LiDIA/LiDIA.h"; then
	if test "x$LIDIA_HOME" != "x/usr" -a "x$LIDIA_HOME" != "x/usr/local"; then
		LIDIA_CFLAGS="-I${LIDIA_HOME}/include"
		LIDIA_LIBS="-L${LIDIA_HOME}/lib -lLiDIA"
	else
		LIDIA_CFLAGS=
		LIDIA_LIBS="-lLiDIA"		
	fi	
	CXXFLAGS="${BACKUP_CXXFLAGS} ${LIDIA_CFLAGS} ${GMP_CFLAGS}" 
	LIBS="${BACKUP_LIBS} ${LIDIA_LIBS} ${GMP_LIBS}"

	AC_TRY_LINK(
	[#include <LiDIA/bigint.h>],
	[LiDIA::bigint a;],
	[
	AC_TRY_RUN(
	[#include <LiDIA/LiDIA.h>
	int main () {  if (LIDIA_MAJOR_VERSION < 2) return -1; else return 0; }
	],[
	lidia_found="yes"
	break
	],[	
	lidia_problem="$problem $LIDIA_HOME"	
	unset LIDIA_CFLAGS
	unset LIDIA_LIBS
	],[
	lidia_found="yes"
{'fraction_non_alphanumeric': 0.13856756091557962, 'fraction_numerical': 0.01870539010583313, 'mean_word_length': 3.8323424494649228, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, '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': '7193317', 'n_tokens_mistral': 1852, 'n_tokens_neox': 1657, 'n_words': 393}