Skip to content

Commit fd08314

Browse files
Explorer09BenBE
authored andcommitted
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 <explorer09@gmail.com>
1 parent 5503cda commit fd08314

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

configure.ac

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ fi
379379
# Checks for cross-platform features and flags.
380380
# ----------------------------------------------------------------------
381381

382+
dnl PKG_PROG_PKG_CONFIG initializes $PKG_CONFIG and related variables.
383+
dnl If the macro is not called, some pkg-config checks might be skipped
384+
dnl and $PKG_CONFIG might be unset.
385+
m4_ifdef([PKG_PROG_PKG_CONFIG], [
386+
PKG_PROG_PKG_CONFIG()
387+
])
388+
382389
# HTOP_CHECK_SCRIPT(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART)
383390
m4_define([HTOP_CHECK_SCRIPT],
384391
[
@@ -569,7 +576,6 @@ case "$enable_hwloc" in
569576
;;
570577
yes)
571578
m4_ifdef([PKG_PROG_PKG_CONFIG], [
572-
PKG_PROG_PKG_CONFIG()
573579
PKG_CHECK_MODULES(HWLOC, hwloc, [
574580
AM_CFLAGS="$AM_CFLAGS $HWLOC_CFLAGS"
575581
LIBS="$LIBS $HWLOC_LIBS"

0 commit comments

Comments
 (0)