From fd083144d482d55eecf3d3890ea772151063a514 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Thu, 19 Sep 2024 06:08:41 +0800 Subject: [PATCH] build: always call PKG_PROG_PKG_CONFIG in configure pkg-config will be used for detecting 'curses' library in a future commit. We have been using pkg-config for detecting multiple libraries ('hwloc' and formerly 'libnl'), thus the PKG_PROG_PKG_CONFIG macro should be called early. Signed-off-by: Kang-Che Sung --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3bbaa7159..f0bf7e9f6 100644 --- a/configure.ac +++ b/configure.ac @@ -379,6 +379,13 @@ fi # Checks for cross-platform features and flags. # ---------------------------------------------------------------------- +dnl PKG_PROG_PKG_CONFIG initializes $PKG_CONFIG and related variables. +dnl If the macro is not called, some pkg-config checks might be skipped +dnl and $PKG_CONFIG might be unset. +m4_ifdef([PKG_PROG_PKG_CONFIG], [ + PKG_PROG_PKG_CONFIG() +]) + # HTOP_CHECK_SCRIPT(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART) m4_define([HTOP_CHECK_SCRIPT], [ @@ -569,7 +576,6 @@ case "$enable_hwloc" in ;; yes) m4_ifdef([PKG_PROG_PKG_CONFIG], [ - PKG_PROG_PKG_CONFIG() PKG_CHECK_MODULES(HWLOC, hwloc, [ AM_CFLAGS="$AM_CFLAGS $HWLOC_CFLAGS" LIBS="$LIBS $HWLOC_LIBS"