summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBooker C. Bense <bbense@gmail.com>2013-08-19 18:14:05 (GMT)
committerBooker C. Bense <bbense@gmail.com>2013-08-19 18:14:05 (GMT)
commitf12edfd07384be4060d5c724ac38ee212adc9028 (patch)
tree099c7d0c1faac4670fe5b59d0f5b9e2f499f3f93 /configure.in
parent64b4d1fb665005c9442361094e02cfd25aa15f43 (diff)
downloadmonitoring-plugins-f12edfd07384be4060d5c724ac38ee212adc9028.tar.gz
Bug fix for ncpus if hyperthreading turned off in linuxrefs/pull/62/head
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 43fe4ad..2be2a1c 100644
--- a/configure.in
+++ b/configure.in
@@ -1270,12 +1270,20 @@ fi
1270 1270
1271AC_MSG_CHECKING([for number of cpus]) 1271AC_MSG_CHECKING([for number of cpus])
1272AC_TRY_COMPILE([#include <unistd.h>], 1272AC_TRY_COMPILE([#include <unistd.h>],
1273 [sysconf(_SC_NPROCESSORS_CONF) > 0;], 1273 [sysconf(_SC_NPROCESSORS_ONLN) > 0;],
1274 AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of cpus]) 1274 AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,[Define if sysconf returns number of cpus])
1275 AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]), 1275 AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_ONLN)]),
1276 AC_MSG_RESULT([cannot calculate]) 1276 AC_MSG_RESULT([cannot calculate])
1277 ) 1277 )
1278 1278
1279AC_TRY_COMPILE([#include <unistd.h>],
1280 [sysconf(_SC_NPROCESSORS_CONF) > 0;],
1281 AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of cpus])
1282 AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]),
1283 AC_MSG_RESULT([cannot calculate])
1284 )
1285
1286
1279AC_PATH_PROG(PATH_TO_UPTIME,uptime) 1287AC_PATH_PROG(PATH_TO_UPTIME,uptime)
1280AC_ARG_WITH(uptime_command, 1288AC_ARG_WITH(uptime_command,
1281 ACX_HELP_STRING([--with-uptime-command=PATH], 1289 ACX_HELP_STRING([--with-uptime-command=PATH],