summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in53
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
319dnl Check for headers used by check_ide_smart 319dnl Check for headers used by check_ide_smart
320AC_CHECK_HEADER(linux/hdreg.h, FOUNDINCLUDE=yes, FOUNDINCLUDE=no) 320case $host in
321if 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)
323fi 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])
344esac
324 345
325if test "$FOUNDINCLUDE" = "yes" ; then 346if test "$FOUNDINCLUDE" = "yes" ; then
326 EXTRAS="$EXTRAS check_ide_smart" 347 EXTRAS="$EXTRAS check_ide_smart"
327else
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.])
330fi 348fi
331 349
332dnl Check for mysql libraries 350dnl 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])
1269fi 1287fi
1270 1288
1271AC_MSG_CHECKING([for number of cpus]) 1289AC_MSG_CHECKING([for number of online cpus])
1290AC_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
1297AC_MSG_CHECKING([for number of available cpus])
1272AC_TRY_COMPILE([#include <unistd.h>], 1298AC_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
1378fi 1404fi
1379 1405
1380AC_PATH_PROG(PATH_TO_FPING,fping) 1406AC_PATH_PROG(PATH_TO_FPING,fping)
1407AC_PATH_PROG(PATH_TO_FPING6,fping6)
1408
1381AC_ARG_WITH(fping_command, 1409AC_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)
1412AC_ARG_WITH(fping6_command,
1413 ACX_HELP_STRING([--with-fping6-command=PATH],
1414 [Path to fping6 command]), PATH_TO_FPING6=$withval)
1415
1384if test -n "$PATH_TO_FPING" 1416if test -n "$PATH_TO_FPING"
1385then 1417then
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
1388else 1423else
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])
1390fi 1425fi