KO Myung-Hun wrote:
> * lib/os2-spawn.c (spawnpvech): New function.
> * lib/os2-spawn.h (spawnpvech): New declaration.
> * lib/spawn-pipe.c (create_pipe) [kLIBC]: Reimplement with spawnpvech().
> * m4/spawn-pipe.m4 (gl_SPAWN_PIPE) [HAVE_LIBCX_SPAWN2_H]: Check if
> libcx/spawn2.h is available.

Thanks, applied. With a small followup simplification of the .m4 macro:


2024-09-19  Bruno Haible  <br...@clisp.org>

        spawn-pipe: Simplify.
        * m4/spawn-pipe.m4 (gl_SPAWN_PIPE): Don't define HAVE_LIBCX_SPAWN2_H as
        an AC_SUBSTed variable. Don't test for it on platforms other than OS/2.

diff --git a/m4/spawn-pipe.m4 b/m4/spawn-pipe.m4
index 87c7a1e7c3..4263ec1966 100644
--- a/m4/spawn-pipe.m4
+++ b/m4/spawn-pipe.m4
@@ -7,14 +7,13 @@
 
 AC_DEFUN([gl_SPAWN_PIPE],
 [
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
   dnl Prerequisites of lib/spawn-pipe.c.
   AC_REQUIRE([AC_TYPE_MODE_T])
 
-  AC_CHECK_HEADERS_ONCE([libcx/spawn2.h])
-  if test $ac_cv_header_libcx_spawn2_h = yes; then
-    HAVE_LIBCX_SPAWN2_H=1
-  else
-    HAVE_LIBCX_SPAWN2_H=0
-  fi
-  AC_SUBST(HAVE_LIBCX_SPAWN2_H)
+  dnl Prerequisites of lib/os2-spawn.c.
+  case "$host_os" in
+    os2*) AC_CHECK_HEADERS_ONCE([libcx/spawn2.h]) ;;
+  esac
 ])




Reply via email to