summaryrefslogtreecommitdiffstats
path: root/m4/pdns_with_re2.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:34:30 +0000
commit4fc2f55f761d71aae1f145d5aa94ba929cc39676 (patch)
tree5c1e1db3b46dd4edbe11f612d93cb94b96891ce3 /m4/pdns_with_re2.m4
parentInitial commit. (diff)
downloaddnsdist-4fc2f55f761d71aae1f145d5aa94ba929cc39676.tar.xz
dnsdist-4fc2f55f761d71aae1f145d5aa94ba929cc39676.zip
Adding upstream version 1.7.3.upstream/1.7.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/pdns_with_re2.m4')
-rw-r--r--m4/pdns_with_re2.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/m4/pdns_with_re2.m4 b/m4/pdns_with_re2.m4
new file mode 100644
index 0000000..daaa501
--- /dev/null
+++ b/m4/pdns_with_re2.m4
@@ -0,0 +1,22 @@
+AC_DEFUN([PDNS_WITH_RE2], [
+ HAVE_RE2=0
+ AC_MSG_CHECKING([if we should compile in libre2 for dnsdist])
+ AC_ARG_WITH([re2], [AS_HELP_STRING([--with-re2],[with libre2 @<:@default=no@:>@])],
+ [with_re2=$withval],
+ [with_re2=no]
+ )
+ AC_MSG_RESULT([$with_re2])
+ AS_IF([test "x$with_re2" = "xyes"], [
+ PKG_CHECK_MODULES([RE2], [re2], [
+ HAVE_RE2=1 ], [
+ AC_CHECK_HEADER([re2/re2.h], [
+ AC_CHECK_LIB([re2], [main], [
+ HAVE_RE2=1
+ RE2_LIBS="-lre2" ], [ : ])
+ ])
+ ])
+ AS_IF([test "$HAVE_RE2" -ne 1], [AC_MSG_ERROR([Could not find libre2])])
+ ])
+ AM_CONDITIONAL([HAVE_RE2], [test "$HAVE_RE2" -eq 1])
+ AS_IF([test "$HAVE_RE2" -eq 1], [AC_DEFINE([HAVE_RE2], [1], [Define if using RE2.])])
+])