From f063ee276e4a7f6cfccbefa969e8db8df952348b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Wed, 18 May 2022 14:10:58 +0200 Subject: [PATCH] Use libuv CFLAGS and LIBS when checking for features When autoconf was checking for libuv features, the LIBUV_CFLAGS was not added to CFLAGS and LIBUV_LIBS to LIBS which resulted in false negatives. Use AX_SAVE_FLAGS and AX_RESTORE_FLAGS to temporarily add LIBUV_CFLAGS and LIBUV_LIBS to their respective variables. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 8dc5aca4c4..84108c9820 100644 --- a/configure.ac +++ b/configure.ac @@ -557,6 +557,10 @@ AC_MSG_CHECKING([for libuv]) PKG_CHECK_MODULES([LIBUV], [libuv >= 1.0.0], [], [AC_MSG_ERROR([libuv not found])]) +AX_SAVE_FLAGS([libuv]) +CFLAGS="$CFLAGS $LIBUV_CFLAGS" +LIBS="$LIBS $LIBUV_LIBS" + # libuv recvmmsg support AC_CHECK_DECLS([UV_UDP_MMSG_FREE, UV_UDP_MMSG_CHUNK], [], [], [[#include ]]) AC_MSG_CHECKING([whether struct msghdr uses padding for alignment]) @@ -571,6 +575,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], # libuv recverr support AC_CHECK_DECLS([UV_UDP_LINUX_RECVERR], [], [], [[#include ]]) +AX_RESTORE_FLAGS([libuv]) + # [pairwise: --enable-doh --with-libnghttp2=auto, --enable-doh --with-libnghttp2=yes, --disable-doh] AC_ARG_ENABLE([doh], [AS_HELP_STRING([--disable-doh], [enable DNS over HTTPS, requires libnghttp2 (default=yes)])],