changeset 15096:a81da81ea7f2

sleep: Move AC_LIBOBJ invocations to module description. * m4/sleep.m4 (gl_FUNC_SLEEP): Move AC_LIBOBJ invocations from here... * modules/sleep (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 00:27:30 +0200
parents ace2724e4304
children 93a1703f75df
files ChangeLog m4/sleep.m4 modules/sleep
diffstat 3 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
+	sleep: Move AC_LIBOBJ invocations to module description.
+	* m4/sleep.m4 (gl_FUNC_SLEEP): Move AC_LIBOBJ invocations from here...
+	* modules/sleep (configure.ac): ... to here.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
 	signbit: Move AC_LIBOBJ invocations to module description.
 	* m4/signbit.m4 (gl_SIGNBIT): Move AC_LIBOBJ invocations from here...
 	* modules/signbit (configure.ac): ... to here.
--- a/m4/sleep.m4
+++ b/m4/sleep.m4
@@ -1,4 +1,4 @@
-# sleep.m4 serial 4
+# sleep.m4 serial 5
 dnl Copyright (C) 2007-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,
@@ -16,7 +16,6 @@
   AC_CHECK_FUNCS_ONCE([sleep])
   if test $ac_cv_have_decl_sleep != yes; then
     HAVE_SLEEP=0
-    AC_LIBOBJ([sleep])
   else
     dnl Cygwin 1.5.x has a bug where sleep can't exceed 49.7 days.
     AC_CACHE_CHECK([for working sleep], [gl_cv_func_sleep_works],
@@ -48,7 +47,6 @@
       [gl_cv_func_sleep_works="guessing no"])])
     if test "$gl_cv_func_sleep_works" != yes; then
       REPLACE_SLEEP=1
-      AC_LIBOBJ([sleep])
     fi
   fi
 ])
--- a/modules/sleep
+++ b/modules/sleep
@@ -12,6 +12,9 @@
 
 configure.ac:
 gl_FUNC_SLEEP
+if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
+  AC_LIBOBJ([sleep])
+fi
 gl_UNISTD_MODULE_INDICATOR([sleep])
 
 Makefile.am: