1 # sethostname.m4 serial 1
2 dnl Copyright (C) 2011 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
8 # - the sethostname() function,
9 AC_DEFUN([gl_FUNC_SETHOSTNAME],
11 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
13 gl_PREREQ_HOST_NAME_MAX
15 AC_REPLACE_FUNCS([sethostname])
16 AC_CHECK_FUNCS([sethostname])
17 if test $ac_cv_func_sethostname = no; then
21 AC_CHECK_DECLS([sethostname])
22 if test $ac_cv_have_decl_sethostname = no; then
23 HAVE_DECL_SETHOSTNAME=0