summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-07-25 23:47:31 +0200
committerBruno Haible <bruno@clisp.org>2011-07-25 23:59:48 +0200
commit1ed055e3d9cc6e80839fa0b56cca2a5b97462524 (patch)
tree3a17d81d07eef7c7879363b4e9ae33d6aeb6f6b9
parentb6a7ab350dba501b3d8f6527865cdb43cc0e2520 (diff)
downloadgnulib-1ed055e3d9cc6e80839fa0b56cca2a5b97462524.tar.gz
close: Move AC_LIBOBJ invocation to module description.
* m4/close.m4 (gl_REPLACE_CLOSE): Remove macro. (gl_FUNC_CLOSE): Instead of gl_REPLACE_CLOSE, just set REPLACE_CLOSE to 1. * modules/close (configure.ac): Invoke AC_LIBOBJ.
-rw-r--r--ChangeLog6
-rw-r--r--m4/close.m416
-rw-r--r--modules/close3
3 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 048a284f72..5626264b56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2011-07-25 Bruno Haible <bruno@clisp.org>
+ close: Move AC_LIBOBJ invocation to module description.
+ * m4/close.m4 (gl_REPLACE_CLOSE): Remove macro.
+ (gl_FUNC_CLOSE): Instead of gl_REPLACE_CLOSE, just set REPLACE_CLOSE to
+ 1.
+ * modules/close (configure.ac): Invoke AC_LIBOBJ.
+
close: Remove call-in from fchdir.m4.
* m4/close.m4 (gl_FUNC_CLOSE): Conditionally invoke gl_TEST_FCHDIR.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke gl_REPLACE_CLOSE.
diff --git a/m4/close.m4 b/m4/close.m4
index 8f33dfe9e6..f2e1ac6f8a 100644
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -6,13 +6,14 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSE],
[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
gl_PREREQ_SYS_H_WINSOCK2
if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
dnl Even if the 'socket' module is not used here, another part of the
dnl application may use it and pass file descriptors that refer to
dnl sockets to the close() function. So enable the support for sockets.
- gl_REPLACE_CLOSE
+ REPLACE_CLOSE=1
fi
])
dnl Replace close() for supporting the gnulib-defined fchdir() function,
@@ -21,16 +22,11 @@ AC_DEFUN([gl_FUNC_CLOSE],
if test $REPLACE_CLOSE = 0; then
gl_TEST_FCHDIR
if test $HAVE_FCHDIR = 0; then
- gl_REPLACE_CLOSE
+ REPLACE_CLOSE=1
fi
fi
])
-])
-
-AC_DEFUN([gl_REPLACE_CLOSE],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- REPLACE_CLOSE=1
- AC_LIBOBJ([close])
- m4_ifdef([gl_REPLACE_FCLOSE], [gl_REPLACE_FCLOSE])
+ if test $REPLACE_CLOSE = 1; then
+ m4_ifdef([gl_REPLACE_FCLOSE], [gl_REPLACE_FCLOSE], [:])
+ fi
])
diff --git a/modules/close b/modules/close
index 9f1028b990..adec0401e3 100644
--- a/modules/close
+++ b/modules/close
@@ -11,6 +11,9 @@ fd-hook [test $REPLACE_CLOSE = 1]
configure.ac:
gl_FUNC_CLOSE
+if test $REPLACE_CLOSE = 1; then
+ AC_LIBOBJ([close])
+fi
gl_UNISTD_MODULE_INDICATOR([close])
Makefile.am: