1 # sethostname.m4 serial 1
2 dnl Copyright (C) 2011-2015 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 # - the HOST_NAME_MAX macro in <limits.h>.
10 AC_DEFUN([gl_FUNC_SETHOSTNAME],
12 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
14 gl_PREREQ_HOST_NAME_MAX
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