Mercurial > gnulib
annotate m4/sethostname.m4 @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
16144
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
1 # sethostname.m4 serial 1 |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 dnl Copyright (C) 2011-2019 Free Software Foundation, Inc. |
16144
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
3 dnl This file is free software; the Free Software Foundation |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
4 dnl gives unlimited permission to copy and/or distribute it, |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
5 dnl with or without modifications, as long as this notice is preserved. |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
6 |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
7 # Ensure |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
8 # - the sethostname() function, |
16145 | 9 # - the HOST_NAME_MAX macro in <limits.h>. |
16144
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
10 AC_DEFUN([gl_FUNC_SETHOSTNAME], |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
11 [ |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
12 AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
13 |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
14 gl_PREREQ_HOST_NAME_MAX |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
15 |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
16 AC_CHECK_FUNCS([sethostname]) |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
17 if test $ac_cv_func_sethostname = no; then |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
18 HAVE_SETHOSTNAME=0 |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
19 fi |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
20 |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
21 AC_CHECK_DECLS([sethostname]) |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
22 if test $ac_cv_have_decl_sethostname = no; then |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
23 HAVE_DECL_SETHOSTNAME=0 |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
24 fi |
5c82a0f82eef
Add a new sethostname module
Ben Walton <bwalton@artsci.utoronto.ca>
parents:
diff
changeset
|
25 ]) |