+2001-04-30 Tom Yu <tlyu@mit.edu>
+
+ * configure.in: Fix some quoting of shell variables when passing
+ to "test". Reorder some logic in consistency checks to validate
+ cache variables against "yes" to account for possible empty or
+ nonexistent values.
+
+ * pty-int.h: Fix conditional prototype of update_wtmp().
+
+ * update_wtmp.c: Fix conditional compilation of update_wtmp() to
+ cover the case where we have setutxent() but don't have updwtmpx()
+ and WTMPX_FILE, as is the case on some Linux installations.
+
2001-04-27 Tom Yu <tlyu@mit.edu>
* configure.in(K5_CHECK_UT_MEMBER): Fix typo in previous; make
AC_MSG_RESULT(no)
fi])
-if test $ac_cv_header_utmp_h = yes; then
+if test "$ac_cv_header_utmp_h" = yes; then
AC_MSG_RESULT(checking struct utmp members)
for krb5_mem in ut_host ut_syslen ut_addr ut_id ut_pid ut_type ut_exit; do
K5_CHECK_UT_MEMBER(utmp, $krb5_mem)
done
fi
-if test $ac_cv_header_utmpx_h = yes; then
+if test "$ac_cv_header_utmpx_h" = yes; then
AC_MSG_RESULT(checking struct utmpx members)
for krb5_mem in ut_host ut_syslen ut_addr ut_id ut_pid ut_type ut_exit; do
K5_CHECK_UT_MEMBER(utmpx, $krb5_mem)
ifelse([$4], , :, [$4])
fi])
-if test $krb5_cv_struct_utmp_ut_exit = yes; then
+if test "$krb5_cv_struct_utmp_ut_exit" = yes; then
AC_MSG_RESULT(checking for working ut_exit.e_exit in struct utmp)
for krb5_mem in __e_exit ut_e_exit ut_exit e_exit; do
K5_CHECK_UT_EXIT_MEMBER(utmp, $krb5_mem,
fi
fi
-if test $krb5_cv_struct_utmpx_ut_exit = yes; then
+if test "$krb5_cv_struct_utmpx_ut_exit" = yes; then
AC_MSG_RESULT(checking for working ut_exit.e_exit in struct utmp)
for krb5_mem in __e_exit ut_e_exit ut_exit e_exit; do
K5_CHECK_UT_EXIT_MEMBER(utmpx, $krb5_mem,
fi
fi
-if test $ac_cv_func_setutent = yes; then
+if test "$ac_cv_func_setutent" = yes; then
AC_MSG_CHECKING(consistency of sysV-ish utmp API)
- if test $krb5_cv_struct_utmp_ut_id = no \
- || test $krb5_cv_struct_utmp_ut_type = no \
- || test $krb5_cv_struct_utmp_ut_pid = no; then
- AC_MSG_RESULT(not ok)
- AC_MSG_ERROR([have setutent but no ut_id, ut_type, or ut_pid in utmp])
+ if test "$ac_cv_header_utmp_h" = yes; then
+ if test "$krb5_cv_struct_utmp_ut_id" = yes \
+ && test "$krb5_cv_struct_utmp_ut_type" = yes \
+ && test "$krb5_cv_struct_utmp_ut_pid" = yes; then
+ AC_MSG_RESULT(ok)
+ else
+ AC_MSG_RESULT(not ok)
+ AC_MSG_ERROR([have setutent but no ut_id, ut_type, or ut_pid in utmp])
+ fi
else
- AC_MSG_RESULT(ok)
+ AC_MSG_RESULT(not ok)
+ AC_MSG_ERROR([have setutent but no utmp.h])
fi
fi
-if test $ac_cv_header_utmpx_h = yes; then
+if test "$ac_cv_header_utmpx_h" = yes; then
AC_MSG_CHECKING(consistency of utmpx API)
- if test $ac_cv_func_setutxent = no; then
- AC_MSG_RESULT(not ok)
- AC_MSG_ERROR([have utmpx.h but no setutxent])
- else
- if test $krb5_cv_struct_utmpx_ut_id = no \
- || test $krb5_cv_struct_utmpx_ut_type = no \
- || test $krb5_cv_struct_utmpx_ut_pid = no; then
+ if test "$ac_cv_func_setutxent" = yes; then
+ if test "$krb5_cv_struct_utmpx_ut_id" = yes \
+ && test "$krb5_cv_struct_utmpx_ut_type" = yes \
+ && test "$krb5_cv_struct_utmpx_ut_pid" = yes; then
+ AC_MSG_RESULT(ok)
+ else
AC_MSG_RESULT(not ok)
AC_MSG_ERROR([have setutxent but no ut_id, ut_type, or ut_pid in utmpx])
- else
- AC_MSG_RESULT(ok)
fi
+ else
+ AC_MSG_RESULT(not ok)
+ AC_MSG_ERROR([have utmpx.h but no setutxent])
fi
fi