From 6531b40e89ecb9a18480e87633f61b16286abe7e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 8 May 2011 11:48:45 +0200 Subject: [PATCH] gethostname: Move AC_LIBOBJ invocations to module description. * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Move AC_LIBOBJ and gl_PREREQ_GETHOSTNAME invocations from here... * modules/gethostname (configure.ac): ... to here. --- ChangeLog | 7 +++++++ m4/gethostname.m4 | 4 +--- modules/gethostname | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a35cfb48d..cd939d714 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-05-08 Bruno Haible + gethostname: Move AC_LIBOBJ invocations to module description. + * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Move AC_LIBOBJ and + gl_PREREQ_GETHOSTNAME invocations from here... + * modules/gethostname (configure.ac): ... to here. + +2011-05-08 Bruno Haible + getgroups: Move AC_LIBOBJ invocations to module description. * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Move AC_LIBOBJ invocations from here... diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 index b813c36fb..8ea6329a2 100644 --- a/m4/gethostname.m4 +++ b/m4/gethostname.m4 @@ -1,4 +1,4 @@ -# gethostname.m4 serial 11 +# gethostname.m4 serial 12 dnl Copyright (C) 2002, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -37,9 +37,7 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME], AC_SUBST([GETHOSTNAME_LIB]) if test "$ac_cv_func_gethostname" = no; then - AC_LIBOBJ([gethostname]) HAVE_GETHOSTNAME=0 - gl_PREREQ_GETHOSTNAME fi dnl Also provide HOST_NAME_MAX when lacks it. diff --git a/modules/gethostname b/modules/gethostname index 359434ab3..42ee838e0 100644 --- a/modules/gethostname +++ b/modules/gethostname @@ -14,6 +14,10 @@ sockets [test $HAVE_GETHOSTNAME = 0] configure.ac: gl_FUNC_GETHOSTNAME +if test $HAVE_GETHOSTNAME = 0; then + AC_LIBOBJ([gethostname]) + gl_PREREQ_GETHOSTNAME +fi gl_UNISTD_MODULE_INDICATOR([gethostname]) Makefile.am: -- 2.11.0