changeset 14937:a6c05261a4fc

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.
author Bruno Haible <bruno@clisp.org>
date Fri, 06 May 2011 13:17:26 +0200
parents 0f6fba78c418
children e45dcf244493
files ChangeLog m4/fdopendir.m4 modules/fdopendir
diffstat 3 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -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_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 @@
          [gl_cv_func_fdopendir_works="guessing no"])])
     if test "$gl_cv_func_fdopendir_works" != yes; then
       REPLACE_FDOPENDIR=1
-      AC_LIBOBJ([fdopendir])
     fi
   fi
 ])
--- a/modules/fdopendir
+++ b/modules/fdopendir
@@ -10,13 +10,19 @@
 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])