Use macros to PCPProcessList value extraction, tweak configure.ac

Resolves a couple of remaining review notes from @BenBE.
This commit is contained in:
Nathan Scott
2021-06-08 09:46:02 +10:00
parent 144fd0a8d7
commit 94d37989b4
2 changed files with 110 additions and 224 deletions

View File

@ -110,8 +110,8 @@ case "$enable_pcp" in
yes)
AC_CHECK_HEADERS([pcp/pmapi.h], [my_htop_platform=pcp],
[AC_MSG_ERROR([can not find PCP header file])])
AC_SEARCH_LIBS([pmNewContext], [pcp], [], [AC_MSG_ERROR([can not find pcp library])])
AC_DEFINE([HTOP_PCP], [1], [Define if building pcp htop binary.])
AC_SEARCH_LIBS([pmNewContext], [pcp], [], [AC_MSG_ERROR([can not find PCP library])])
AC_DEFINE([HTOP_PCP], [1], [Define if building pcp-htop binary.])
;;
*)
AC_MSG_ERROR([bad value '$enable_pcp' for --enable-pcp option])