On OS/2, popen() does not work with closed stdios. And configure hangs
on with the test.

* m4/popen.m4 (gl_FUNC_POPEN): Set gl_cv_func_popen_works to no on OS/2.
---
 m4/popen.m4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/m4/popen.m4 b/m4/popen.m4
index a68c1e606f..b30172195e 100644
--- a/m4/popen.m4
+++ b/m4/popen.m4
@@ -1,5 +1,5 @@
 # popen.m4
-# serial 7
+# serial 8
 dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,8 @@ AC_DEFUN([gl_FUNC_POPEN],
   if test $ac_cv_func_popen = no; then
     HAVE_POPEN=0
   else
+    dnl On OS/2 kLIBC, the following test hangs on. So set to no here.
+    case "$host_os" in os2*) gl_cv_func_popen_works=no;; esac
     AC_CACHE_CHECK([whether popen works with closed stdin],
       [gl_cv_func_popen_works],
       [
-- 
2.42.0


Reply via email to