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 209621160b1cb2621efd36c543bbe139a81994ef..c4f43cb97b014bba1109254785f2baedc9f97255 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
index 476f62349c5aa9fa4a81dc23f29289ea0eadd92a..0cf8d800d4d2071c0e715164fbc5a5a67bd8573c 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 1f097857179cca6506d2a52b00fe1b1d8ad6aeaa..3392e57d61242a5fbf0afa48203bc0fe06048031 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: