From: Bruno Haible Date: Thu, 19 Sep 2024 14:32:43 +0000 (+0200) Subject: spawn-pipe: Simplify. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=14205b0fdd1567daabb5944351224ca43253b186;p=gnulib.git 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/ChangeLog b/ChangeLog index 3a0866beef..98669fdfb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-09-19 Bruno Haible + + 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 spawn-pipe: Support a directory argument of create_pipe() on OS/2 kLIBC. 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 @@ 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 ])