From: Bruno Haible Date: Mon, 25 Jul 2011 21:38:11 +0000 (+0200) Subject: open: Move AC_LIBOBJ invocation to module description. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=668c68616b7d1158d7a2b357b34741713f10e405;p=pspp 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. --- diff --git a/ChangeLog b/ChangeLog index 0196accff6..b454363e65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-07-25 Bruno Haible + 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. diff --git a/m4/open.m4 b/m4/open.m4 index 454eb42a2a..d8191842fc 100644 --- a/m4/open.m4 +++ b/m4/open.m4 @@ -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], [ diff --git a/modules/open b/modules/open index ea0f5ae57c..bf471380be 100644 --- a/modules/open +++ b/modules/open @@ -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: