changeset 15464:c7958f06a571

open: Move AC_LIBOBJ invocation to module description. * m4/open.m4 (gl_REPLACE_OPEN): Remove macro. (gl_FUNC_OPEN): Instead of gl_REPLACE_OPEN, just set REPLACE_OPEN to 1. * modules/open (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_OPEN.
author Bruno Haible <bruno@clisp.org>
date Mon, 25 Jul 2011 23:38:11 +0200
parents d4d986a874bd
children c0fe9525375a
files ChangeLog m4/open.m4 modules/open
diffstat 3 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-07-25  Bruno Haible  <bruno@clisp.org>
 
+	open: Move AC_LIBOBJ invocation to module description.
+	* m4/open.m4 (gl_REPLACE_OPEN): Remove macro.
+	(gl_FUNC_OPEN): Instead of gl_REPLACE_OPEN, just set REPLACE_OPEN to 1.
+	* modules/open (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_OPEN.
+
 	open: Remove call-in from fchdir.m4.
 	* m4/open.m4 (gl_FUNC_OPEN): Conditionally invoke gl_TEST_FCHDIR.
 	* m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_OPEN.
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -9,7 +9,7 @@
   AC_REQUIRE([AC_CANONICAL_HOST])
   case "$host_os" in
     mingw* | pw*)
-      gl_REPLACE_OPEN
+      REPLACE_OPEN=1
       ;;
     *)
       dnl open("foo/") should not create a file when the file name has a
@@ -57,7 +57,7 @@
         *no)
           AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
             [Define to 1 if open() fails to recognize a trailing slash.])
-          gl_REPLACE_OPEN
+          REPLACE_OPEN=1
           ;;
       esac
       ;;
@@ -68,7 +68,7 @@
     if test $REPLACE_OPEN = 0; then
       gl_TEST_FCHDIR
       if test $HAVE_FCHDIR = 0; then
-        gl_REPLACE_OPEN
+        REPLACE_OPEN=1
       fi
     fi
   ])
@@ -77,20 +77,12 @@
     if test $REPLACE_OPEN = 0; then
       gl_NONBLOCKING_IO
       if test $gl_cv_have_open_O_NONBLOCK != yes; then
-        gl_REPLACE_OPEN
+        REPLACE_OPEN=1
       fi
     fi
   ])
 ])
 
-AC_DEFUN([gl_REPLACE_OPEN],
-[
-  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
-  REPLACE_OPEN=1
-  AC_LIBOBJ([open])
-  gl_PREREQ_OPEN
-])
-
 # Prerequisites of lib/open.c.
 AC_DEFUN([gl_PREREQ_OPEN],
 [
--- a/modules/open
+++ b/modules/open
@@ -12,6 +12,10 @@
 
 configure.ac:
 gl_FUNC_OPEN
+if test $REPLACE_OPEN = 1; then
+  AC_LIBOBJ([open])
+  gl_PREREQ_OPEN
+fi
 gl_FCNTL_MODULE_INDICATOR([open])
 
 Makefile.am: