gethostname: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 8 May 2011 09:48:45 +0000 (11:48 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:05 +0000 (00:06 +0200)
* m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): Move AC_LIBOBJ and
gl_PREREQ_GETHOSTNAME invocations from here...
* modules/gethostname (configure.ac): ... to here.

ChangeLog
m4/gethostname.m4
modules/gethostname

index a35cfb4..cd939d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-08  Bruno Haible  <bruno@clisp.org>
 
+       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  <bruno@clisp.org>
+
        getgroups: Move AC_LIBOBJ invocations to module description.
        * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Move AC_LIBOBJ invocations from
        here...
index b813c36..8ea6329 100644 (file)
@@ -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 <limits.h> lacks it.
index 359434a..42ee838 100644 (file)
@@ -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: