fdopendir: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Fri, 6 May 2011 11:17:26 +0000 (13:17 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:05:56 +0000 (00:05 +0200)
* m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Move AC_LIBOBJ invocations from
here...
* modules/fdopendir (configure.ac): ... to here.
(Depends-on): Improve conditions.

ChangeLog
m4/fdopendir.m4
modules/fdopendir

index efd0b79..ff042a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-05-06  Bruno Haible  <bruno@clisp.org>
 
+       fdopendir: Move AC_LIBOBJ invocations to module description.
+       * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Move AC_LIBOBJ invocations from
+       here...
+       * modules/fdopendir (configure.ac): ... to here.
+       (Depends-on): Improve conditions.
+
+2011-05-06  Bruno Haible  <bruno@clisp.org>
+
        _Exit: Move AC_LIBOBJ invocations to module description.
        * m4/_Exit.m4 (gl_FUNC__EXIT): Move AC_LIBOBJ and gl_PREREQ__EXIT
        invocations from here...
index 05aa772..25dee3f 100644 (file)
@@ -1,4 +1,4 @@
-# serial 6
+# serial 7
 # See if we need to provide fdopendir.
 
 dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
@@ -17,8 +17,6 @@ AC_DEFUN([gl_FUNC_FDOPENDIR],
     ]])
   AC_CHECK_FUNCS_ONCE([fdopendir])
   if test $ac_cv_func_fdopendir = no; then
-    AC_LIBOBJ([openat-proc])
-    AC_LIBOBJ([fdopendir])
     HAVE_FDOPENDIR=0
   else
     AC_CACHE_CHECK([whether fdopendir works],
@@ -41,7 +39,6 @@ extern DIR *fdopendir (int);
          [gl_cv_func_fdopendir_works="guessing no"])])
     if test "$gl_cv_func_fdopendir_works" != yes; then
       REPLACE_FDOPENDIR=1
-      AC_LIBOBJ([fdopendir])
     fi
   fi
 ])
index 0612b74..a1c2519 100644 (file)
@@ -10,13 +10,19 @@ m4/fdopendir.m4
 Depends-on:
 dirent
 extensions
-errno           [test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1]
-fchdir          [test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1]
-openat-die      [test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1]
-save-cwd        [test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1]
+errno           [test $HAVE_FDOPENDIR = 0]
+fchdir          [test $HAVE_FDOPENDIR = 0]
+openat-die      [test $HAVE_FDOPENDIR = 0]
+save-cwd        [test $HAVE_FDOPENDIR = 0]
 
 configure.ac:
 gl_FUNC_FDOPENDIR
+if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
+  AC_LIBOBJ([fdopendir])
+fi
+if test $HAVE_FDOPENDIR = 0; then
+  AC_LIBOBJ([openat-proc])
+fi
 gl_DIRENT_MODULE_INDICATOR([fdopendir])
 gl_MODULE_INDICATOR([fdopendir])