$NetBSD: patch-ad,v 1.2 2003/08/12 19:08:57 seb Exp $ --- configure.in.orig 2003-06-30 12:22:25.000000000 +0000 +++ configure.in @@ -1558,9 +1558,7 @@ dnl *-*-netbsd*) # no_shadows_password_checking=yes ? # ^ (see above comment) - - # At least NetBSD 1.6 has a nonfunctional utmpx. - no_utmpx=yes + AC_DEFINE(SSH_UTMP_UTMPX) ;; *) ;; @@ -1791,6 +1789,8 @@ if test -z "$no_libbsd"; then fi AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil") +AC_CHECK_LIB(util, loginx, AC_DEFINE(HAVE_LIBUTIL_LOGINX) + LIBS="$LIBS -lutil") if test -z "$no_vhangup"; then AC_CHECK_FUNCS(vhangup) @@ -1942,6 +1942,22 @@ if test "$ac_cv_have_proto_logout" = "ye fi AC_MSG_RESULT($ac_cv_have_proto_logout) +AC_MSG_CHECKING([whether there is a prototype for logoutx]) +AC_CACHE_VAL(ac_cv_have_proto_logoutx, + [ AC_TRY_COMPILE(changequote(<<, >>)dnl + << $session_wtmp_includes +/* If someone has a prototype like this for anything, then... well. */ +void * logoutx(void *, int *, char *, int, char, void *[6][8][10][3][4], ...); +>>, + changequote([, ])dnl + [ ; ], + ac_cv_have_proto_logoutx=no, + ac_cv_have_proto_logoutx=yes)]) +if test "$ac_cv_have_proto_logoutx" = "yes"; then + AC_DEFINE(HAVE_PROTO_LOGOUTX) +fi +AC_MSG_RESULT($ac_cv_have_proto_logoutx) + AC_MSG_CHECKING([whether there is a prototype for logwtmp]) AC_CACHE_VAL(ac_cv_have_proto_logwtmp, [ AC_TRY_COMPILE(changequote(<<, >>)dnl @@ -1958,6 +1974,22 @@ if test "$ac_cv_have_proto_logwtmp" = "y fi AC_MSG_RESULT($ac_cv_have_proto_logwtmp) +AC_MSG_CHECKING([whether there is a prototype for logwtmpx]) +AC_CACHE_VAL(ac_cv_have_proto_logwtmpx, + [ AC_TRY_COMPILE(changequote(<<, >>)dnl + << $session_wtmp_includes +/* If someone has a prototype like this for anything, then... well. */ +void * logwtmpx(void *, int *, char *, int, char, void *[6][8][10][3][4], ...); +>>, + changequote([, ])dnl + [ ; ], + ac_cv_have_proto_logwtmpx=no, + ac_cv_have_proto_logwtmpx=yes)]) +if test "$ac_cv_have_proto_logwtmpx" = "yes"; then + AC_DEFINE(HAVE_PROTO_LOGWTMPX) +fi +AC_MSG_RESULT($ac_cv_have_proto_logwtmpx) + AC_CHECK_FUNCS(initgroups) if test "X$ac_cv_func_initgroups" = "Xyes"; then