Hi Ben, > I noticed that (sometimes?) the lseek check prints a "broken > pipe" message in the middle of "configure" output, e.g. > checking whether lseek detects pipes... ../configure: line 30326: > echo: write error: Broken pipe > as reported here under step 19: > http://benpfaff.org/~blp/pspp-master/20100220040512/
Below is a proposed fix (untested). > I think that we should redirect stderr to /dev/null for that > test. I would not do this. "2> /dev/null" is a recipe for creating buggy software: When an error creeps in, for whatever reason, you won't notice it. Bruno 2010-02-20 Bruno Haible <br...@clisp.org> Silence a "broken pipe" message from bash. * m4/lseek.m4 (gl_FUNC_LSEEK): Ignore SIGPIPE in a subcommand. Reported by Ben Pfaff <b...@cs.stanford.edu>. --- m4/lseek.m4.orig Sat Feb 20 21:18:21 2010 +++ m4/lseek.m4 Sat Feb 20 21:17:50 2010 @@ -1,4 +1,4 @@ -# lseek.m4 serial 4 +# lseek.m4 serial 5 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -21,7 +21,12 @@ }], [if test -s conftest$ac_exeext \ && ./conftest$ac_exeext < conftest.$ac_ext \ - && { echo hi | ./conftest$ac_exeext; test $? = 1; }; then + && { : "Avoid error message from bash."; \ + : "See func_reset_sigpipe in gnulib-tool."; \ + if test -n "$BASH_VERSION"; then trap - SIGPIPE; fi; \ + echo hi | ./conftest$ac_exeext; \ + test $? = 1; \ + }; then gl_cv_func_lseek_pipe=yes else gl_cv_func_lseek_pipe=no