diff options
-rw-r--r-- | configure.in | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/configure.in b/configure.in index 529720e7..a157596f 100644 --- a/configure.in +++ b/configure.in | |||
@@ -316,10 +316,6 @@ AS_IF([test "x$with_ldap" != "xno"], [ | |||
316 | LIBS="$_SAVEDLIBS" | 316 | LIBS="$_SAVEDLIBS" |
317 | ]) | 317 | ]) |
318 | 318 | ||
319 | dnl Check for headers used by check_users | ||
320 | AC_CHECK_HEADERS(utmpx.h) | ||
321 | AM_CONDITIONAL([HAVE_UTMPX], [test "$ac_cv_header_utmpx_h" = "yes"]) | ||
322 | |||
323 | dnl Check for headers used by check_ide_smart | 319 | dnl Check for headers used by check_ide_smart |
324 | case $host in | 320 | case $host in |
325 | *linux*) | 321 | *linux*) |
@@ -366,6 +362,26 @@ else | |||
366 | AC_SUBST(MYSQLCFLAGS) | 362 | AC_SUBST(MYSQLCFLAGS) |
367 | fi | 363 | fi |
368 | 364 | ||
365 | dnl Check for headers used by check_users | ||
366 | AC_CHECK_HEADERS(utmpx.h) | ||
367 | AM_CONDITIONAL([HAVE_UTMPX], [test "$ac_cv_header_utmpx_h" = "yes"]) | ||
368 | |||
369 | dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface | ||
370 | if test "$ac_cv_header_utmpx_h" = "no" | ||
371 | then | ||
372 | AC_PATH_PROG(PATH_TO_WHO,who) | ||
373 | |||
374 | if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] | ||
375 | then | ||
376 | ac_cv_path_to_who="$PATH_TO_WHO -q" | ||
377 | else | ||
378 | ac_cv_path_to_who="$PATH_TO_WHO" | ||
379 | fi | ||
380 | |||
381 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", | ||
382 | [path and arguments for invoking 'who']) | ||
383 | fi | ||
384 | |||
369 | AC_ARG_WITH([ipv6], | 385 | AC_ARG_WITH([ipv6], |
370 | [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])], | 386 | [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])], |
371 | [], [with_ipv6=check]) | 387 | [], [with_ipv6=check]) |
@@ -1338,19 +1354,6 @@ else | |||
1338 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) | 1354 | AC_MSG_WARN([Get smbclient from Samba.org to monitor SMB shares]) |
1339 | fi | 1355 | fi |
1340 | 1356 | ||
1341 | |||
1342 | AC_PATH_PROG(PATH_TO_WHO,who) | ||
1343 | |||
1344 | if [$PATH_TO_WHO -q 2>/dev/null | egrep -i "^# users=[0-9]+$" >/dev/null] | ||
1345 | then | ||
1346 | ac_cv_path_to_who="$PATH_TO_WHO -q" | ||
1347 | else | ||
1348 | ac_cv_path_to_who="$PATH_TO_WHO" | ||
1349 | fi | ||
1350 | |||
1351 | AC_DEFINE_UNQUOTED(WHO_COMMAND,"$ac_cv_path_to_who", | ||
1352 | [path and arguments for invoking 'who']) | ||
1353 | |||
1354 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) | 1357 | AC_PATH_PROG(PATH_TO_SNMPGET,snmpget) |
1355 | AC_ARG_WITH(snmpget_command, | 1358 | AC_ARG_WITH(snmpget_command, |
1356 | ACX_HELP_STRING([--with-snmpget-command=PATH], | 1359 | ACX_HELP_STRING([--with-snmpget-command=PATH], |