3 # Copyright (C) 2005, 2006 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
11 dnl Provide getlogin_r when the system lacks it.
14 AC_DEFUN([gl_GETLOGIN_R_SUBSTITUTE],
17 AC_LIBOBJ([getlogin_r])
20 AC_DEFUN([gl_GETLOGIN_R],
22 AC_REPLACE_FUNCS([getlogin_r])
23 if test $ac_cv_func_getlogin_r = no; then
24 gl_GETLOGIN_R_SUBSTITUTE
28 AC_DEFUN([gl_PREREQ_GETLOGIN_R],
30 AC_CHECK_HEADERS_ONCE([unistd.h])
31 AC_CHECK_DECLS_ONCE([getlogin])
32 AC_CHECK_DECLS_ONCE([getlogin_r])