diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-07 01:18:17 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-07 01:18:17 +0400 |
commit | e836dfa2286d16b40378824f6bc31435ce62fe9a (patch) | |
tree | b3d6e1f4ff8d165a0be798f1af01a7a5617c6abd | |
parent | 6508e283f03fd661fc23817ffa3f926ae4a9d593 (diff) | |
download | htop-e836dfa2286d16b40378824f6bc31435ce62fe9a.tar.gz |
Require libkstat on solaris
-rw-r--r-- | configure.ac | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index ea9214d..3f04e4c 100644 --- a/configure.ac +++ b/configure.ac @@ -104,25 +104,25 @@ if test ! -z "$missing_headers"; then AC_MSG_ERROR([missing headers: $missing_headers]) fi -case "${host}" in - *linux* ) - have_linux=1; -if test "x$cross_compiling" = xno; then -AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) -AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) -fi -;; - *solaris*) - have_solaris=1; - ;; - *) -AC_MSG_ERROR(${host} is not supported.) - ;; -esac + +AS_CASE([$host], + [*linux*], [have_linux=1], + [*solaris*], [have_solaris=1], + [AC_MSG_ERROR([$host is not supported])] +) AM_CONDITIONAL([HAVE_LINUX], [ test "x$have_linux" = x1 ]) AM_CONDITIONAL([HAVE_SOLARIS], [ test "x$have_solaris" = x1 ]) +AS_IF([test x$have_solaris = x1], [ + have_kstat=1 + AC_CHECK_HEADERS([kstat.h], [], [have_kstat=0]) + AC_CHECK_LIB([kstat], [kstat_open], [], [have_kstat=0]) + AS_IF([test x$have_kstat = x0], [ + AC_MSG_ERROR([kstat is required on solaris platform]) + ]) +]) + AC_ARG_ENABLE(native_affinity, [AC_HELP_STRING([--enable-native-affinity], [enable native sched_setaffinity and sched_getaffinity for affinity support, disables hwloc])], ,enable_native_affinity="yes") if test "x$enable_native_affinity" = xyes -a "x$cross_compiling" = xno; then AC_MSG_CHECKING([for usable sched_setaffinity]) |