From 5e03bd8e8cf4ea41aef6cf5d7f115afa7565c861 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 21 Apr 2014 21:51:19 +0200 Subject: Make check_users work on Windows. --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f405cce7..244df427 100644 --- a/configure.ac +++ b/configure.ac @@ -364,8 +364,16 @@ dnl Check for headers used by check_users AC_CHECK_HEADERS(utmpx.h) AM_CONDITIONAL([HAVE_UTMPX], [test "$ac_cv_header_utmpx_h" = "yes"]) +AC_CHECK_HEADERS(wtsapi32.h, [], [], [#include ]) +AM_CONDITIONAL([HAVE_WTS32API], [test "$ac_cv_header_wtsapi32_h" = "yes"]) + +if test "$ac_cv_header_wtsapi32_h" = "yes"; then + WTSAPI32LIBS="-lwtsapi32" + AC_SUBST(WTSAPI32LIBS) +fi + dnl Fallback to who(1) if the system doesn't provide an utmpx(5) interface -if test "$ac_cv_header_utmpx_h" = "no" +if test "$ac_cv_header_utmpx_h" = "no" -a "$ac_cv_header_wtsapi32_h" = "no" then AC_PATH_PROG(PATH_TO_WHO,who) -- cgit v1.2.3