diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-09-26 03:24:22 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-09-26 03:24:22 +0000 |
commit | 1afef1899dde3b0ead9c556bce360afdba42c097 (patch) | |
tree | a6053da4dff400ac96597939556316aff6785984 /configure.ac | |
parent | ec17b7029a5f5f2e42d66380762ab24fa5174fc4 (diff) |
Add flag to allow using the system install of hwloc.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b63ef6b6..b049215b 100644 --- a/configure.ac +++ b/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 ##### |