From 7d63fbdaea7fb293ad2f0d04e87139b383b90705 Mon Sep 17 00:00:00 2001 From: William Metcalf Date: Thu, 6 May 2010 10:19:33 -0500 Subject: [PATCH] small CentOS 4 workarounds --- configure.in | 15 +++++++++++++++ src/threads.h | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 8750ff738b..5c5d91f662 100644 --- a/configure.in +++ b/configure.in @@ -232,6 +232,21 @@ AC_INIT(configure.in) exit 1 fi + # To prevent duping the lib link we reset LIBS after this check. Setting action-if-found to NULL doesn't seem to work + # see: http://blog.flameeyes.eu/2008/04/29/i-consider-ac_check_lib-harmful + PCRE="" + TMPLIBS="${LIBS}" + AC_CHECK_LIB(pcre, pcre_dfa_exec,, PCRE="no") + if test "$PCRE" = "no"; then + echo + echo " ERROR! pcre library was found but version was < 6.0" + echo " please upgrade to a newer version of pcre which you can get from" + echo " www.pcre.org." + echo + exit 1 + fi + LIBS="${TMPLIBS}" + AC_TRY_COMPILE([ #include ], [ int eo = 0; eo |= PCRE_EXTRA_MATCH_LIMIT_RECURSION; ], [ pcre_match_limit_recursion_available=yes ], [:] diff --git a/src/threads.h b/src/threads.h index be9d00e9b5..6968cf472b 100644 --- a/src/threads.h +++ b/src/threads.h @@ -347,7 +347,9 @@ * OS specific macro's for setting the thread name. "top" can display * this name. */ -#ifdef OS_FREEBSD /* FreeBSD */ +#ifndef PR_SET_NAME /*PR_SET_NAME */ +#define SCSetThreadName(n) +#elif OS_FREEBSD /* FreeBSD */ /** \todo Add implementation for FreeBSD */ #define SCSetThreadName(n) #elif OS_WIN32 /* Windows */