mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Add flag to allow using the system install of hwloc.
This commit is contained in:
19
configure.ac
19
configure.ac
@ -111,15 +111,28 @@ AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sur
|
||||
fi
|
||||
|
||||
##### hwloc
|
||||
AC_ARG_ENABLE(system-hwloc, [AC_HELP_STRING([--enable-system-hwloc], [use the copy of hwloc from your system and not the one bundled with the htop sources. (hwloc required)])], ,enable_system_hwloc="no")
|
||||
enable_xml=no
|
||||
AC_ARG_ENABLE(hwloc, [AC_HELP_STRING([--enable-hwloc], [enable hwloc support for CPU affinity])],, enable_hwloc="yes")
|
||||
if test "x$enable_hwloc" = xyes
|
||||
then
|
||||
HWLOC_SETUP_CORE([hwloc-1.2.1], [hwloc_happy=yes], [hwloc_happy=no])
|
||||
if test "x$enable_system_hwloc" = xyes
|
||||
then
|
||||
AC_CHECK_LIB([hwloc], [hwloc_linux_get_tid_cpubind], [], [missing_libraries="$missing_libraries libhwloc"])
|
||||
AC_CHECK_HEADERS([hwloc.h],[:], [missing_headers="$missing_headers $ac_header"])
|
||||
|
||||
else
|
||||
HWLOC_SETUP_CORE([hwloc-1.2.1], [hwloc_bundled=yes], [hwloc_bundled=no])
|
||||
fi
|
||||
fi
|
||||
HWLOC_DO_AM_CONDITIONALS
|
||||
AM_CONDITIONAL([HAVE_HWLOC], [test "x$hwloc_happy" = "xyes"])
|
||||
if test "x$hwloc_happy" = "xyes"; then
|
||||
AM_CONDITIONAL([HAVE_HWLOC], [test "x$hwloc_bundled" = "xyes" -o "x$hwloc_system" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_BUNDLED_HWLOC], [test "x$hwloc_bundled" = "xyes"])
|
||||
if test "x$hwloc_system" = "xyes"; then
|
||||
AC_DEFINE([HAVE_SYSTEM_HWLOC], 1, [Have system hwloc])
|
||||
AC_DEFINE([HAVE_HWLOC], 1, [Have hwloc])
|
||||
elif test "x$hwloc_bundled" = "xyes"; then
|
||||
AC_DEFINE([HAVE_BUNDLED_HWLOC], 1, [Use bundled hwloc])
|
||||
AC_DEFINE([HAVE_HWLOC], 1, [Have hwloc])
|
||||
fi
|
||||
#####
|
||||
|
Reference in New Issue
Block a user