xref: /netbsd-src/crypto/external/bsd/heimdal/dist/cf/krb-func-getlogin.m4 (revision b40995a48bd40728880cac5a8845521b57dccf8c)
1dnl
2dnl Id
3dnl
4dnl test for POSIX (broken) getlogin
5dnl
6
7
8AC_DEFUN([AC_FUNC_GETLOGIN], [
9AC_CHECK_FUNCS(getlogin setlogin)
10if test "$ac_cv_func_getlogin" = yes; then
11AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [
12if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
13	ac_cv_func_getlogin_posix=no
14else
15	ac_cv_func_getlogin_posix=yes
16fi
17])
18if test "$ac_cv_func_getlogin_posix" = yes; then
19	AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).])
20fi
21fi
22])
23