* 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 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.
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
])