Make sure we always use -lutil, and make test work for FreeBSD too.

This commit is contained in:
Keith Winstein
2012-04-20 11:11:00 -04:00
parent 46ec3b4145
commit 2dc748b7f6
+4 -2
View File
@@ -264,8 +264,7 @@ AC_CACHE_CHECK([whether poll can handle ptys],
AS_IF([test "x$poll_LIBS" != "x"], AS_IF([test "x$poll_LIBS" != "x"],
[LIBS="$LIBS $poll_LIBS"]) [LIBS="$LIBS $poll_LIBS"])
AS_IF([test "x$FORKPTY_IN_LIBUTIL" != "x"], LIBS="$LIBS -lutil"
[LIBS="$LIBS -lutil"])
AC_RUN_IFELSE([AC_LANG_PROGRAM([[ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <unistd.h> #include <unistd.h>
@@ -276,6 +275,9 @@ AC_CACHE_CHECK([whether poll can handle ptys],
#elif HAVE_UTIL_H #elif HAVE_UTIL_H
#include <util.h> #include <util.h>
#endif #endif
#if FORKPTY_IN_LIBUTIL
#include <libutil.h>
#endif
#include <sys/poll.h> #include <sys/poll.h>
int master, slave; int master, slave;