diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:34:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:34:30 +0000 |
commit | 4fc2f55f761d71aae1f145d5aa94ba929cc39676 (patch) | |
tree | 5c1e1db3b46dd4edbe11f612d93cb94b96891ce3 /m4/pdns_with_nghttp2.m4 | |
parent | Initial commit. (diff) | |
download | dnsdist-upstream.tar.xz dnsdist-upstream.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_nghttp2.m4')
-rw-r--r-- | m4/pdns_with_nghttp2.m4 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/m4/pdns_with_nghttp2.m4 b/m4/pdns_with_nghttp2.m4 new file mode 100644 index 0000000..aa6a5c2 --- /dev/null +++ b/m4/pdns_with_nghttp2.m4 @@ -0,0 +1,32 @@ +AC_DEFUN([PDNS_WITH_NGHTTP2], [ + AC_MSG_CHECKING([whether we will be linking in nghttp2]) + HAVE_NGHTTP2=0 + AC_ARG_WITH([nghttp2], + AS_HELP_STRING([--with-nghttp2],[use nghttp2 @<:@default=auto@:>@]), + [with_nghttp2=$withval], + [with_nghttp2=auto], + ) + AC_MSG_RESULT([$with_nghttp2]) + + AS_IF([test "x$with_nghttp2" != "xno"], [ + AS_IF([test "x$with_nghttp2" = "xyes" -o "x$with_nghttp2" = "xauto"], [ + PKG_CHECK_MODULES([NGHTTP2], [libnghttp2], [ + [HAVE_NGHTTP2=1] + AC_DEFINE([HAVE_NGHTTP2], [1], [Define to 1 if you have nghttp2]) + save_CFLAGS=$CFLAGS + save_LIBS=$LIBS + CFLAGS="$NGHTTP2_CFLAGS $CFLAGS" + LIBS="$NGHTTP2_LIBS $LIBS" + CFLAGS=$save_CFLAGS + LIBS=$save_LIBS + + ], [ : ]) + ]) + ]) + AM_CONDITIONAL([HAVE_NGHTTP2], [test "x$NGHTTP2_LIBS" != "x"]) + AS_IF([test "x$with_nghttp2" = "xyes"], [ + AS_IF([test x"$NGHTTP2_LIBS" = "x"], [ + AC_MSG_ERROR([nghttp2 requested but libraries were not found]) + ]) + ]) +]) |