summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
authorJeremy Jackson <jerj@coplanar.net>2009-01-12 16:06:12 -0500
committerPaul Jakma <paul@quagga.net>2009-06-19 15:01:16 +0100
commit25f45887abf320401745dd433c4e82bfd6db5d4d (patch)
treea52835a9976899d1bef9ec7bff9eaa4972a6fa45 /bgpd
parentc77cffdd69bf08ed54e390a3485cbd5024836a9a (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 'bgpd')
-rw-r--r--bgpd/bgp_regex.h12
-rw-r--r--bgpd/bgp_routemap.c12
2 files changed, 16 insertions, 8 deletions
diff --git a/bgpd/bgp_regex.h b/bgpd/bgp_regex.h
index 176b65a1..9fc83222 100644
--- a/bgpd/bgp_regex.h
+++ b/bgpd/bgp_regex.h
@@ -23,11 +23,15 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include <zebra.h>
-#ifdef HAVE_GNU_REGEX
-#include <regex.h>
+#ifdef HAVE_LIBPCREPOSIX
+# include <pcreposix.h>
#else
-#include "regex-gnu.h"
-#endif /* HAVE_GNU_REGEX */
+# ifdef HAVE_GNU_REGEX
+# include <regex.h>
+# else
+# include "regex-gnu.h"
+# endif /* HAVE_GNU_REGEX */
+#endif /* HAVE_LIBPCREPOSIX */
extern void bgp_regex_free (regex_t *regex);
extern regex_t *bgp_regcomp (const char *str);
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index 4fff0268..aa7dbce1 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -28,11 +28,15 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "plist.h"
#include "memory.h"
#include "log.h"
-#ifdef HAVE_GNU_REGEX
-#include <regex.h>
+#ifdef HAVE_LIBPCREPOSIX
+# include <pcreposix.h>
#else
-#include "regex-gnu.h"
-#endif /* HAVE_GNU_REGEX */
+# ifdef HAVE_GNU_REGEX
+# include <regex.h>
+# else
+# include "regex-gnu.h"
+# endif /* HAVE_GNU_REGEX */
+#endif /* HAVE_LIBPCREPOSIX */
#include "buffer.h"
#include "sockunion.h"