- if test $ac_cv_have_decl_forkpty = no; then
- AC_MSG_WARN([[Cannot find forkpty, build will likely fail]])
- fi
-
- dnl Prefer glibc's const-safe prototype, if available.
- AC_CACHE_CHECK([for const-safe forkpty signature],
- [gl_cv_func_forkpty_const],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
+ if test $ac_cv_have_decl_forkpty = yes; then
+ dnl The system has forkpty.
+ dnl Prefer glibc's const-safe prototype, if available.
+ AC_CACHE_CHECK([for const-safe forkpty signature],
+ [gl_cv_func_forkpty_const],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+/* <sys/types.h> is a prerequisite of <libutil.h> on FreeBSD 8.0. */
+#include <sys/types.h>