[AC_LANG_PROGRAM([[#include <unistd.h>]],
[[write (9, "foobar\n", 7); return 0;]])],
[AM_RUN_LOG([./conftest$EXEEXT 9>&1]) \
- && AM_RUN_LOG([(./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
+dnl Leading ":;" required to avoid having two nested subshells starting
+dnl with '((' in the generated configure: that is unportable and could
+dnl confuse some shells (e.g., NetBSD 5.1 /bin/ksh) into thinking we are
+dnl trying to perform an arithmetic operation.
+ && AM_RUN_LOG([:; (./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
&& am__ok=yes])
test $am__ok = yes || AS_EXIT([63])
AM_CONDITIONAL([real_EXEEXT], [test -n "$EXEEXT"])