]> Savannah Git Hosting - gnulib.git/commitdiff
spawn-pipe: Simplify.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Sep 2024 14:32:43 +0000 (16:32 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 1 Oct 2024 21:00:24 +0000 (23:00 +0200)
* 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.

ChangeLog
m4/spawn-pipe.m4

index 0c4b6472d128c24a44324e4e6b8b8b1998af6ad4..ac8e65ecb9a7dce83ab560ed945c934862e96724 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-19  Bruno Haible  <bruno@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.
+
 2024-09-19  KO Myung-Hun  <komh78@gmail.com>
 
        spawn-pipe: Support a directory argument of create_pipe() on OS/2 kLIBC.
index 180b9443174dc6c476e301b75881b7732b36badc..596e288124c0afd7412200c37a8ef602b7849889 100644 (file)
@@ -6,14 +6,13 @@ dnl with or without modifications, as long as this notice is preserved.
 
 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
 ])