From: bert hubert Date: Sun, 14 Feb 2016 14:18:26 +0000 (+0100) Subject: make re2 something you have to enable explicitly. I can't get it to link statically. X-Git-Tag: auth-4.0.0-alpha2~56^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a2082f754dbd011d432d55d9964765b1420b00e;p=thirdparty%2Fpdns.git make re2 something you have to enable explicitly. I can't get it to link statically. --- diff --git a/m4/pdns_check_re2.m4 b/m4/pdns_check_re2.m4 index 538b7ffff6..cfa6fb414d 100644 --- a/m4/pdns_check_re2.m4 +++ b/m4/pdns_check_re2.m4 @@ -1,6 +1,13 @@ AC_DEFUN([PDNS_CHECK_RE2], [ - PKG_CHECK_MODULES([RE2], [re2], [HAVE_RE2=1], [HAVE_RE2=0]) - 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.])]) - + AC_MSG_CHECKING([if we should compile in libre2 for dnsdist]) + AC_ARG_ENABLE([re2], [AS_HELP_STRING([--enable-re2],[enable libre2 @<:@default=no@:>@])], + [enable_re2=$enableval], + [enable_re2=no] + ) + AC_MSG_RESULT([$enable_re2]) + AS_IF([test "x$enable_re2" = "xyes"], [ + PKG_CHECK_MODULES([RE2], [re2], [HAVE_RE2=1], [AC_MSG_ERROR([Could not find libre2])]) + ], [HAVE_RE2=0]) + 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.])]) ])