Skip to content

Commit

Permalink
build: always call PKG_PROG_PKG_CONFIG in configure
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Explorer09 authored and BenBE committed Sep 20, 2024
1 parent 5503cda commit fd08314
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
[
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit fd08314

Please sign in to comment.