]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use libuv CFLAGS and LIBS when checking for features
authorOndřej Surý <ondrej@isc.org>
Wed, 18 May 2022 12:10:58 +0000 (14:10 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 18 May 2022 19:22:03 +0000 (21:22 +0200)
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.

(cherry picked from commit f063ee276e4a7f6cfccbefa969e8db8df952348b)

configure.ac

index ce959370f1f40ac1aff80d574bc1e842f158bbe5..dc61c1faaf7fdca064d9afb597bb97d3642af7ce 100644 (file)
@@ -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 <uv.h>]])
 AC_MSG_CHECKING([whether struct msghdr uses padding for alignment])
@@ -568,6 +572,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/socket.h>],
                  [AC_MSG_RESULT([no])
                   AC_CHECK_DECLS([UV_UDP_RECVMMSG], [], [], [[#include <uv.h>]])])
 
+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)])],