Include <ucred.h> if we have getpeerucred()
[heimdal.git] / cf / krb-func-getlogin.m4
blob6218e6b1fef2d6fe16128f62d54b7cb075cbb868
1 dnl
2 dnl $Id$
3 dnl
4 dnl test for POSIX (broken) getlogin
5 dnl
8 AC_DEFUN([AC_FUNC_GETLOGIN], [
9 AC_CHECK_FUNCS(getlogin setlogin)
10 if test "$ac_cv_func_getlogin" = yes; then
11 AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
12 if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
13         ac_cv_func_getlogin_posix=no
14 else
15         ac_cv_func_getlogin_posix=yes
18 if test "$ac_cv_func_getlogin_posix" = yes; then
19         AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])