Hiramatsu Yoshifumi in PR pkg/26962. - Use ut_session only when it is available in struct utmpx. - If updwtmpx is not available, use pututxline instead. - Bulid functions using struct utmp only when the struct utmp is available.
35 lines
1.1 KiB
Text
35 lines
1.1 KiB
Text
$NetBSD: patch-ac,v 1.8 2004/09/15 18:29:20 minskim Exp $
|
|
|
|
--- autoconf/configure.in.orig Thu Mar 6 20:32:27 2003
|
|
+++ autoconf/configure.in
|
|
@@ -393,6 +393,7 @@ AC_CHECK_HEADERS( \
|
|
sys/ioctl.h \
|
|
sys/select.h \
|
|
sys/sockio.h \
|
|
+ sys/stropts.h \
|
|
sys/strredir.h \
|
|
sys/time.h \
|
|
utmp.h \
|
|
@@ -588,6 +589,7 @@ AC_CHECK_FUNCS( \
|
|
on_exit \
|
|
nanosleep \
|
|
updwtmp \
|
|
+ updwtmpx \
|
|
ttyslot \
|
|
)
|
|
dnl# Note: On NetBSD, openpty() exists in libutil. Don't pull it in
|
|
@@ -648,6 +650,14 @@ AC_CACHE_CHECK(for host in utmpx struct,
|
|
rxvt_cv_struct_utmpx_host=yes, rxvt_cv_struct_utmpx_host=no)])
|
|
if test x$rxvt_cv_struct_utmpx_host = xyes; then
|
|
AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host)
|
|
+fi
|
|
+AC_CACHE_CHECK(for session in utmpx struct, rxvt_cv_struct_utmpx_session,
|
|
+[AC_TRY_COMPILE([#include <sys/types.h>
|
|
+#include <utmpx.h>],
|
|
+[struct utmpx utx; utx.ut_session;],
|
|
+rxvt_cv_struct_utmpx_session=yes, rxvt_cv_struct_utmpx_session=no)])
|
|
+if test x$rxvt_cv_struct_utmpx_session = xyes; then
|
|
+ AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session)
|
|
fi
|
|
) dnl# AC_CHECK_HEADER(utmpx.h
|
|
|