Made pcre not use config.h; removed obsolete checks

This commit is contained in:
Yevgen Muntyan 2007-07-02 00:06:00 -05:00
parent 0836dda814
commit f4864abc7b
3 changed files with 12 additions and 61 deletions

View File

@ -10,9 +10,6 @@ AC_DEFUN_ONCE([MOO_AC_FUNCS],[
# for xdgmime
AC_CHECK_HEADERS(fnmatch.h netinet/in.h)
# for pcre
AC_CHECK_FUNCS(memmove bcopy strerror)
#for GMappedFile
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_FUNCS(mmap)
@ -33,8 +30,6 @@ AC_DEFUN_ONCE([MOO_AC_FUNCS],[
AC_CHECK_HEADERS([libutil.h util.h])
AC_CHECK_FUNCS([poll pipe _pipe kill signal posix_openpt])
AC_CHECK_FUNCS([cfmakeraw getpgid getpt grantpt unlockpt ptsname ptsname_r recvmsg])
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_HEADER_TIOCGWINSZ
################################################################################

View File

@ -100,59 +100,4 @@ if test x$MOO_BUILD_PCRE = xyes; then
AC_DEFINE(MOO_BUILD_PCRE, , [MOO_BUILD_PCRE - build pcre library])
fi
## ===================================================================
## build pcre
##
if test x$MOO_BUILD_PCRE = xyes; then
AC_C_CONST
AC_TYPE_SIZE_T
AC_CHECK_FUNCS(memmove strerror)
AC_DEFINE(NEWLINE, -1, [The value of NEWLINE determines the newline character used in pcre])
AC_DEFINE(LINK_SIZE, 2, [The value of LINK_SIZE determines the number of bytes used to store dnl
links as offsets within the compiled regex. The default is 2, which allows for dnl
compiled patterns up to 64K long. This covers the vast majority of cases. dnl
However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows for dnl
longer patterns in extreme cases.])
AC_DEFINE(POSIX_MALLOC_THRESHOLD, 10, [POSIX_MALLOC_THRESHOLD])
AC_DEFINE(MATCH_LIMIT, 10000000, [The value of MATCH_LIMIT determines the default number of times the match() dnl
function can be called during a single execution of pcre_exec(). (There is a dnl
runtime method of setting a different limit.) The limit exists in order to dnl
catch runaway regular expressions that take for ever to determine that they do dnl
not match. The default is set very large so that it does not accidentally catch dnl
legitimate cases.])
AC_DEFINE(MATCH_LIMIT_RECURSION, MATCH_LIMIT, [The above limit applies to all calls of match(), whether or not they
increase the recursion depth. In some environments it is desirable to limit the
depth of recursive calls of match() more strictly, in order to restrict the
maximum amount of stack (or heap, if NO_RECURSE is defined) that is used. The
value of MATCH_LIMIT_RECURSION applies only to recursive calls of match(). To
have any useful effect, it must be less than the value of MATCH_LIMIT. There is
a runtime method for setting a different limit. On systems that support it,
"configure" can be used to override this default default.])
AC_DEFINE(MAX_NAME_SIZE, 32, [These three limits are parameterized just in case anybody ever wants to
change them. Care must be taken if they are increased, because they guard
against integer overflow caused by enormously large patterns.])
AC_DEFINE(MAX_NAME_COUNT, 10000, [MAX_NAME_COUNT])
AC_DEFINE(MAX_DUPLENGTH, 30000, [MAX_DUPLENGTH])
AC_DEFINE(SUPPORT_UTF8, , [SUPPORT_UTF8])
AC_DEFINE(SUPPORT_UCP, , [SUPPORT_UCP])
dnl pcre does "#if !EBCDIC", not "#ifndef EBCDIC"
AC_DEFINE(EBCDIC, 0, [If you are compiling for a system that uses EBCDIC instead of ASCII dnl
character codes, define this macro as 1.])
# AC_ARG_ENABLE(stack-for-recursion,
# [ --disable-stack-for-recursion disable use of stack recursion when matching],
# if test "$enableval" = "no"; then
# NO_RECURSE=-DNO_RECURSE
# fi
# )
fi
]) # end of MOO_AC_PCRE

View File

@ -69,7 +69,18 @@ be absolutely sure we get our version. */
/* Get the definitions provided by running "configure" */
#include "config.h"
#define HAVE_MEMMOVE 1
#define NEWLINE -1
#define LINK_SIZE 2
#define POSIX_MALLOC_THRESHOLD 10
#define MATCH_LIMIT 10000000
#define MATCH_LIMIT_RECURSION MATCH_LIMIT
#define MAX_NAME_SIZE 32
#define MAX_NAME_COUNT 10000
#define MAX_DUPLENGTH 30000
#define SUPPORT_UTF8 1
#define SUPPORT_UCP 1
#define EBCDIC 0
/* Standard C headers plus the external interface definition. The only time
setjmp and stdarg are used is when NO_RECURSE is set. */