]> Savannah Git Hosting - gnulib.git/commitdiff
faccessat: Move AC_LIBOBJ invocation to module description.
authorBruno Haible <bruno@clisp.org>
Wed, 9 Nov 2011 01:15:01 +0000 (02:15 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 9 Nov 2011 01:15:01 +0000 (02:15 +0100)
* 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.

ChangeLog
m4/faccessat.m4
modules/faccessat

index 65c96fe684cdad5eea76004bb496cd0a28c15baf..48b51c703ce3b54894993a4eef218851afd9df5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-08  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        faccessat: Simplify autoconf macro.
index 7f679f98b70b9c31615ab4edf3af178a571dadb6..640ae0b3d9aeab9a81a98831f1ff717f63039c7f 100644 (file)
@@ -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 <unistd.h> 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])
+])
index 6fc43545e4ed6f788c00110f11c7db57cd458be2..e73f5caa3962aef01fb6fc410437b8d6bc720c88 100644 (file)
@@ -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])