open: Move AC_LIBOBJ invocation to module description.
authorBruno Haible <bruno@clisp.org>
Mon, 25 Jul 2011 21:38:11 +0000 (23:38 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 25 Jul 2011 21:38:11 +0000 (23:38 +0200)
* 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.

ChangeLog
m4/open.m4
modules/open

index 0196accff65c80b25c6b7ba46aa62d3bdde1385e..b454363e657dbf3efb6c770204db42cb5d959753 100644 (file)
--- 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.
index 454eb42a2a55d2fa967b9d26f8f883d15c5f8ac0..d8191842fc562354722d5c2b9ce1968300663fca 100644 (file)
@@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_OPEN],
   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 @@ changequote([,])dnl
         *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 @@ changequote([,])dnl
     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 @@ changequote([,])dnl
     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],
 [
index ea0f5ae57cfe4c6e57599e200a68491097eb5548..bf471380be09e37f479042cd475bca92e4f7cf11 100644 (file)
@@ -12,6 +12,10 @@ stat            [test $REPLACE_OPEN = 1]
 
 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: