From: Bruno Haible Date: Wed, 9 Nov 2011 01:15:01 +0000 (+0100) Subject: faccessat: Move AC_LIBOBJ invocation to module description. X-Git-Tag: v0.1~1464 X-Git-Url: https://erislabs.net/gitweb/?p=gnulib.git;a=commitdiff_plain;h=471fc34ae463a72dcebf813153cbb73499c1e0a2 faccessat: Move AC_LIBOBJ invocation to module description. * m4/faccessat.m4 (gl_PREREQ_FACCESSAT): New macro. (gl_FUNC_FACESSAT): Don't test for access() here. Move AC_LIBOBJ invocation from here... * modules/faccessat (configure.ac): ... to here. Invoke gl_PREREQ_FACCESSAT. --- diff --git a/ChangeLog b/ChangeLog index 65c96fe68..48b51c703 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2011-11-08 Bruno Haible + faccessat: Move AC_LIBOBJ invocation to module description. + * m4/faccessat.m4 (gl_PREREQ_FACCESSAT): New macro. + (gl_FUNC_FACESSAT): Don't test for access() here. Move AC_LIBOBJ + invocation from here... + * modules/faccessat (configure.ac): ... to here. Invoke + gl_PREREQ_FACCESSAT. + +2011-11-08 Bruno Haible + faccessat: Simplify autoconf macro. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Don't require gl_FUNC_OPENAT, gl_FUNC_EUIDACCESS. diff --git a/m4/faccessat.m4 b/m4/faccessat.m4 index 7f679f98b..640ae0b3d 100644 --- a/m4/faccessat.m4 +++ b/m4/faccessat.m4 @@ -1,4 +1,4 @@ -# serial 4 +# serial 5 # See if we need to provide faccessat replacement. dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. @@ -11,11 +11,18 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FACCESSAT], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + + dnl Persuade glibc to declare faccessat(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([access]) + AC_CHECK_FUNCS_ONCE([faccessat]) if test $ac_cv_func_faccessat = no; then HAVE_FACCESSAT=0 - AC_LIBOBJ([faccessat]) fi ]) + +# Prerequisites of lib/faccessat.m4. +AC_DEFUN([gl_PREREQ_FACCESSAT], +[ + AC_CHECK_FUNCS_ONCE([access]) +]) diff --git a/modules/faccessat b/modules/faccessat index 6fc43545e..e73f5caa3 100644 --- a/modules/faccessat +++ b/modules/faccessat @@ -21,6 +21,10 @@ euidaccess [test $HAVE_FACCESSAT = 0] configure.ac: gl_FUNC_FACCESSAT +if test $HAVE_FACCESSAT = 0; then + AC_LIBOBJ([faccessat]) + gl_PREREQ_FACCESSAT +fi gl_MODULE_INDICATOR([faccessat]) gl_UNISTD_MODULE_INDICATOR([faccessat])