From 5fce2c6e544a24d46ca6d77ea39897cdfc3a28d5 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 6 May 2011 13:17:26 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ m4/fdopendir.m4 | 5 +---- modules/fdopendir | 14 ++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index efd0b791f8..ff042a31fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-05-06 Bruno Haible + + 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 _Exit: Move AC_LIBOBJ invocations to module description. diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4 index 05aa77213f..25dee3fc40 100644 --- 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_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 ]) diff --git a/modules/fdopendir b/modules/fdopendir index 0612b74d68..a1c25193db 100644 --- a/modules/fdopendir +++ b/modules/fdopendir @@ -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]) -- 2.30.2