changeset 15136:dfb2d3c2caa7

utimensat: Move AC_LIBOBJ invocations to module description. * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Move AC_LIBOBJ invocations from here... * modules/utimensat (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 17:46:30 +0200
parents 69ac4e993bf3
children cd39335cd16a
files ChangeLog m4/utimensat.m4 modules/utimensat
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+	utimensat: Move AC_LIBOBJ invocations to module description.
+	* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Move AC_LIBOBJ invocations from
+	here...
+	* modules/utimensat (configure.ac): ... to here.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
 	usleep: Move AC_LIBOBJ invocations to module description.
--- a/m4/utimensat.m4
+++ b/m4/utimensat.m4
@@ -1,4 +1,4 @@
-# serial 4
+# serial 5
 # See if we need to provide utimensat replacement.
 
 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
@@ -15,7 +15,6 @@
   AC_CHECK_FUNCS_ONCE([utimensat])
   if test $ac_cv_func_utimensat = no; then
     HAVE_UTIMENSAT=0
-    AC_LIBOBJ([utimensat])
   else
     AC_CACHE_CHECK([whether utimensat works],
       [gl_cv_func_utimensat_works],
@@ -67,7 +66,6 @@
          [gl_cv_func_utimensat_works="guessing no"])])
     if test "$gl_cv_func_utimensat_works" != yes; then
       REPLACE_UTIMENSAT=1
-      AC_LIBOBJ([utimensat])
     fi
   fi
 ])
--- a/modules/utimensat
+++ b/modules/utimensat
@@ -13,6 +13,9 @@
 
 configure.ac:
 gl_FUNC_UTIMENSAT
+if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
+  AC_LIBOBJ([utimensat])
+fi
 gl_SYS_STAT_MODULE_INDICATOR([utimensat])
 
 Makefile.am: