diff options
author | Jeremy Jackson <jerj@coplanar.net> | 2009-01-12 16:06:12 -0500 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-06-19 15:01:16 +0100 |
commit | 25f45887abf320401745dd433c4e82bfd6db5d4d (patch) | |
tree | a52835a9976899d1bef9ec7bff9eaa4972a6fa45 /configure.ac | |
parent | c77cffdd69bf08ed54e390a3485cbd5024836a9a (diff) |
[configure] add configure support for PCRE Posix library
Debian tried unsuccessfully to build with libpcreposix. This adds proper
support to autoconf/configure.ac for it.
Based on the patch by C.J. Adams-Collier in bug #483.
bgpd/bgp_{regex,routemap}.h: Pull in PCRE POSIX header if available.
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 3ac8384f..0b8724ee 100755 --- a/configure.ac +++ b/configure.ac @@ -253,6 +253,8 @@ AC_ARG_ENABLE(gcc-rdynamic, [ --enable-gcc-rdynamic enable gcc linking with -rdynamic for better backtraces]) AC_ARG_ENABLE(time-check, [ --disable-time-check disable slow thread warning messages]) +AC_ARG_ENABLE(pcreposix, +[ --enable-pcreposix enable using PCRE Posix libs for regex functions]) if test x"${enable_gcc_ultra_verbose}" = x"yes" ; then CFLAGS="${CFLAGS} -W -Wcast-qual -Wstrict-prototypes" @@ -1259,13 +1261,24 @@ AC_CHECK_FUNC(__inet_pton, AC_DEFINE(HAVE_INET_PTON,,__inet_pton)) AC_CHECK_FUNC(__inet_aton, AC_DEFINE(HAVE_INET_ATON,,__inet_aton)) dnl --------------------------- +dnl check system has PCRE regexp +dnl --------------------------- +if test "x$enable_pcreposix" = "xyes"; then + AC_CHECK_LIB(pcreposix, pcreposix_regexec, ,[enable_pcreposix=no + AC_MSG_WARN([*** falling back to other regex library ***]) ]) +fi + +if test "x$enable_pcreposix" != "xyes"; then +dnl --------------------------- dnl check system has GNU regexp dnl --------------------------- -dnl AC_MSG_CHECKING(whether system has GNU regex) +AC_MSG_CHECKING(whether system has GNU regex) AC_CHECK_LIB(c, regexec, [AC_DEFINE(HAVE_GNU_REGEX,,GNU regexp library) LIB_REGEX=""], [LIB_REGEX="regex.o"]) +fi +AC_SUBST(HAVE_LIBPCREPOSIX) AC_SUBST(LIB_REGEX) dnl ------------------ |