AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" != xno])
+AC_FIND_FUNC([isatty], [c], [#include <unistd.h>], [0])
+AC_FIND_FUNC([_isatty], [c], [#include <io.h>], [0])
+
AC_ARG_ENABLE([pthread-tls],
[AC_HELP_STRING([--enable-pthread-tls],
[Enable use of pthread thread local storage])],
die();
}
}
+
+#if (!defined(WIN32) && defined(HAVE_ISATTY)) || defined(HAVE__ISATTY)
+
+#if defined(HAVE__ISATTY) && defined(isatty)
+#undef isatty
+#define isatty _isatty
+#endif
+
+ if (!program && isatty(STDOUT_FILENO) && !isatty(STDIN_FILENO))
+ program = ".";
+#endif
+
if (!program) usage();
if (ninput_files == 0) current_input = stdin;