2 dnl $Heimdal: krb-func-getlogin.m4 13338 2004-02-12 14:21:14Z lha $
5 dnl test for POSIX (broken) getlogin
9 AC_DEFUN([AC_FUNC_GETLOGIN], [
10 AC_CHECK_FUNCS(getlogin setlogin)
11 if test "$ac_cv_func_getlogin" = yes; then
12 AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
13 if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
14 ac_cv_func_getlogin_posix=no
16 ac_cv_func_getlogin_posix=yes
19 if test "$ac_cv_func_getlogin_posix" = yes; then
20 AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])