changeset 15083:0c86c6d851e0

renameat: Move AC_LIBOBJ invocations to module description. * m4/renameat.m4 (gl_FUNC_RENAMEAT): Move AC_LIBOBJ invocations from here... * modules/renameat (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sat, 21 May 2011 20:53:14 +0200
parents e2b57a7be469
children 23a0cffe28de
files ChangeLog m4/renameat.m4 modules/renameat
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
+	renameat: Move AC_LIBOBJ invocations to module description.
+	* m4/renameat.m4 (gl_FUNC_RENAMEAT): Move AC_LIBOBJ invocations from
+	here...
+	* modules/renameat (configure.ac): ... to here.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
 	rename: Respect rules for use of AC_LIBOBJ.
 	* m4/rename.m4 (gl_FUNC_RENAME): Move AC_LIBOBJ invocations from
 	here...
--- a/m4/renameat.m4
+++ b/m4/renameat.m4
@@ -1,4 +1,4 @@
-# serial 2
+# serial 3
 # See if we need to provide renameat replacement.
 
 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
@@ -17,12 +17,8 @@
   AC_CHECK_FUNCS_ONCE([renameat])
   if test $ac_cv_func_renameat = no; then
     HAVE_RENAMEAT=0
-    AC_LIBOBJ([renameat])
-    AC_LIBOBJ([at-func2])
   elif test $REPLACE_RENAME = 1; then
     dnl Solaris 9 and 10 have the same bugs in renameat as in rename.
     REPLACE_RENAMEAT=1
-    AC_LIBOBJ([renameat])
-    AC_LIBOBJ([at-func2])
   fi
 ])
--- a/modules/renameat
+++ b/modules/renameat
@@ -20,6 +20,10 @@
 
 configure.ac:
 gl_FUNC_RENAMEAT
+if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
+  AC_LIBOBJ([renameat])
+  AC_LIBOBJ([at-func2])
+fi
 gl_STDIO_MODULE_INDICATOR([renameat])
 
 Makefile.am: