gl_ADD_PROG([optional_bin_progs], [df])
fi
+# Build stdbuf only if supported
ac_save_CFLAGS=$CFLAGS
ac_save_LDFLAGS=$LDFLAGS
# Detect warnings about ignored "constructor" attributes.
CFLAGS="-fPIC $CFLAGS"
LDFLAGS="-shared $LDFLAGS"
stdbuf_supported=no
+# Note we only LINK here rather than RUN to support cross compilation
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
static int stdbuf = 0;
- /* Restrict to ELF systems with compilers
- that support the constructor attribute. */
void __attribute__ ((constructor))
stdbuf_init (void)
{
- #if __ELF__
- stdbuf = 1;
- #endif
+ stdbuf = 1;
}]],[[
return !(stdbuf == 1);]])
],
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ md5sum
+xargs -P2 </dev/null >/dev/null 2>&1 \
+ || skip_ 'xargs -P is required'
+
(mkdir tmp && cd tmp && seq 500 | xargs touch)
# This will output at least 16KiB per process
# and start 3 processes, with 2 running concurrently,
# which triggers often on Fedora 11 at least.
-(find tmp tmp tmp -type f | xargs -n500 -P2 md5sum) |
+(find tmp tmp tmp -type f | xargs -n500 -P2 md5sum 2>err) |
sed -n '/[0-9a-f]\{32\} /!p' |
grep . > /dev/null && fail=1
+compare /dev/null err || fail=1
Exit $fail
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ wc
-if xargs -P2 </dev/null >/dev/null 2>&1
- skip_ 'xargs -P is required'
-fi
+xargs -P2 </dev/null >/dev/null 2>&1 \
+ || skip_ 'xargs -P is required'
(mkdir tmp && cd tmp && seq 2000 | xargs touch)