maint: update copyright
[gnulib.git] / m4 / sethostname.m4
1 # sethostname.m4 serial 1
2 dnl Copyright (C) 2011-2014 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.
6
7 # Ensure
8 # - the sethostname() function,
9 # - the HOST_NAME_MAX macro in <limits.h>.
10 AC_DEFUN([gl_FUNC_SETHOSTNAME],
11 [
12   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
13
14   gl_PREREQ_HOST_NAME_MAX
15
16   AC_CHECK_FUNCS([sethostname])
17   if test $ac_cv_func_sethostname = no; then
18     HAVE_SETHOSTNAME=0
19   fi
20
21   AC_CHECK_DECLS([sethostname])
22   if test $ac_cv_have_decl_sethostname = no; then
23     HAVE_DECL_SETHOSTNAME=0
24   fi
25 ])