diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 25c0c9c..de75e53 100644 --- a/configure.in +++ b/configure.in | |||
@@ -317,16 +317,34 @@ AS_IF([test "x$with_ldap" != "xno"], [ | |||
317 | ]) | 317 | ]) |
318 | 318 | ||
319 | dnl Check for headers used by check_ide_smart | 319 | dnl Check for headers used by check_ide_smart |
320 | AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) | 320 | case $host in |
321 | if test "$FOUNDINCLUDE" = "yes" ; then | 321 | *linux*) |
322 | AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) | 322 | AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) |
323 | fi | 323 | if test "$FOUNDINCLUDE" = "yes" ; then |
324 | AC_CHECK_HEADER(linux/types.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) | ||
325 | fi | ||
326 | if test "$FOUNDINCLUDE" = "no" ; then | ||
327 | AC_MSG_WARN([Skipping check_ide_smart plugin.]) | ||
328 | AC_MSG_WARN([check_ide_smart requires linux/hdreg.h and linux/types.h.]) | ||
329 | fi | ||
330 | ;; | ||
331 | *netbsd*) | ||
332 | AC_CHECK_HEADER(dev/ata/atareg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) | ||
333 | if test "$FOUNDINCLUDE" = "yes" ; then | ||
334 | AC_CHECK_HEADER(dev/ic/wdcreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) | ||
335 | fi | ||
336 | if test "$FOUNDINCLUDE" = "no" ; then | ||
337 | AC_MSG_WARN([Skipping check_ide_smart plugin.]) | ||
338 | AC_MSG_WARN([check_ide_smart requires dev/ata/atareg.h and dev/ic/wdcreg.h]) | ||
339 | fi | ||
340 | ;; | ||
341 | *) | ||
342 | AC_MSG_WARN([Skipping check_ide_smart plugin.]) | ||
343 | AC_MSG_WARN([check_ide_smart works only on Linux and NetBSD]) | ||
344 | esac | ||
324 | 345 | ||
325 | if test "$FOUNDINCLUDE" = "yes" ; then | 346 | if test "$FOUNDINCLUDE" = "yes" ; then |
326 | EXTRAS="$EXTRAS check_ide_smart" | 347 | EXTRAS="$EXTRAS check_ide_smart" |
327 | else | ||
328 | AC_MSG_WARN([Skipping check_ide_smart plugin.]) | ||
329 | AC_MSG_WARN([check_ide_smart is linux specific. It requires linux/hdreg.h and linux/types.h.]) | ||
330 | fi | 348 | fi |
331 | 349 | ||
332 | dnl Check for mysql libraries | 350 | dnl Check for mysql libraries |
@@ -1268,10 +1286,18 @@ if test -n "$ac_cv_nslookup_command"; then | |||
1268 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", [path and args for nslookup]) | 1286 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", [path and args for nslookup]) |
1269 | fi | 1287 | fi |
1270 | 1288 | ||
1271 | AC_MSG_CHECKING([for number of cpus]) | 1289 | AC_MSG_CHECKING([for number of online cpus]) |
1290 | AC_TRY_COMPILE([#include <unistd.h>], | ||
1291 | [sysconf(_SC_NPROCESSORS_ONLN) > 0;], | ||
1292 | AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_ONLN,1,[Define if sysconf returns number of online cpus]) | ||
1293 | AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_ONLN)]), | ||
1294 | AC_MSG_RESULT([cannot calculate]) | ||
1295 | ) | ||
1296 | |||
1297 | AC_MSG_CHECKING([for number of available cpus]) | ||
1272 | AC_TRY_COMPILE([#include <unistd.h>], | 1298 | AC_TRY_COMPILE([#include <unistd.h>], |
1273 | [sysconf(_SC_NPROCESSORS_CONF) > 0;], | 1299 | [sysconf(_SC_NPROCESSORS_CONF) > 0;], |
1274 | AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of cpus]) | 1300 | AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of available cpus]) |
1275 | AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]), | 1301 | AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]), |
1276 | AC_MSG_RESULT([cannot calculate]) | 1302 | AC_MSG_RESULT([cannot calculate]) |
1277 | ) | 1303 | ) |
@@ -1378,13 +1404,22 @@ then | |||
1378 | fi | 1404 | fi |
1379 | 1405 | ||
1380 | AC_PATH_PROG(PATH_TO_FPING,fping) | 1406 | AC_PATH_PROG(PATH_TO_FPING,fping) |
1407 | AC_PATH_PROG(PATH_TO_FPING6,fping6) | ||
1408 | |||
1381 | AC_ARG_WITH(fping_command, | 1409 | AC_ARG_WITH(fping_command, |
1382 | ACX_HELP_STRING([--with-fping-command=PATH], | 1410 | ACX_HELP_STRING([--with-fping-command=PATH], |
1383 | [Path to fping command]), PATH_TO_FPING=$withval) | 1411 | [Path to fping command]), PATH_TO_FPING=$withval) |
1412 | AC_ARG_WITH(fping6_command, | ||
1413 | ACX_HELP_STRING([--with-fping6-command=PATH], | ||
1414 | [Path to fping6 command]), PATH_TO_FPING6=$withval) | ||
1415 | |||
1384 | if test -n "$PATH_TO_FPING" | 1416 | if test -n "$PATH_TO_FPING" |
1385 | then | 1417 | then |
1386 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) | 1418 | AC_DEFINE_UNQUOTED(PATH_TO_FPING,"$PATH_TO_FPING",[path to fping]) |
1387 | EXTRAS="$EXTRAS check_fping" | 1419 | EXTRAS="$EXTRAS check_fping" |
1420 | if test x"$with_ipv6" != xno && test -n "$PATH_TO_FPING6"; then | ||
1421 | AC_DEFINE_UNQUOTED(PATH_TO_FPING6,"$PATH_TO_FPING6",[path to fping6]) | ||
1422 | fi | ||
1388 | else | 1423 | else |
1389 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) | 1424 | AC_MSG_WARN([Get fping from http://www.fping.com in order to make check_fping plugin]) |
1390 | fi | 1425 | fi |