linkat: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sat, 21 May 2011 11:44:22 +0000 (13:44 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:25 +0000 (00:06 +0200)
* m4/linkat.m4 (gl_FUNC_LINKAT): Move AC_LIBOBJ invocations from
here...
* modules/linkat (configure.ac): ... to here.

ChangeLog
m4/linkat.m4
modules/linkat

index 2096211..c4f43cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
+       linkat: Move AC_LIBOBJ invocations to module description.
+       * m4/linkat.m4 (gl_FUNC_LINKAT): Move AC_LIBOBJ invocations from
+       here...
+       * modules/linkat (configure.ac): ... to here.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
        link: Respect rules for use of AC_LIBOBJ.
        * m4/link.m4 (gl_FUNC_LINK): Move AC_LIBOBJ invocations from here...
        * modules/link (configure.ac): ... to here.
index 476f623..0cf8d80 100644 (file)
@@ -1,4 +1,4 @@
-# serial 5
+# serial 6
 # See if we need to provide linkat replacement.
 
 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
@@ -19,8 +19,6 @@ AC_DEFUN([gl_FUNC_LINKAT],
   AC_CHECK_HEADERS_ONCE([sys/param.h])
   if test $ac_cv_func_linkat = no; then
     HAVE_LINKAT=0
-    AC_LIBOBJ([linkat])
-    AC_LIBOBJ([at-func2])
   else
     AC_CACHE_CHECK([whether linkat(,AT_SYMLINK_FOLLOW) works],
       [gl_cv_func_linkat_follow],
@@ -90,7 +88,6 @@ choke me
     if test "$gl_cv_func_linkat_follow" != yes \
        || test $gl_linkat_slash_bug = 1; then
       REPLACE_LINKAT=1
-      AC_LIBOBJ([linkat])
       AC_DEFINE_UNQUOTED([LINKAT_TRAILING_SLASH_BUG], [$gl_linkat_slash_bug],
         [Define to 1 if linkat fails to recognize a trailing slash.])
     fi
index 1f09785..3392e57 100644 (file)
@@ -27,6 +27,12 @@ symlink          [test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1]
 
 configure.ac:
 gl_FUNC_LINKAT
+if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
+  AC_LIBOBJ([linkat])
+fi
+if test $HAVE_LINKAT = 0; then
+  AC_LIBOBJ([at-func2])
+fi
 gl_UNISTD_MODULE_INDICATOR([linkat])
 
 Makefile.am: