From 2dc748b7f65f2b473c516fd924f1352ac45f6ba5 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Fri, 20 Apr 2012 11:11:00 -0400 Subject: [PATCH] Make sure we always use -lutil, and make test work for FreeBSD too. --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e9d08d8..8f61543 100644 --- a/configure.ac +++ b/configure.ac @@ -264,8 +264,7 @@ AC_CACHE_CHECK([whether poll can handle ptys], AS_IF([test "x$poll_LIBS" != "x"], [LIBS="$LIBS $poll_LIBS"]) - AS_IF([test "x$FORKPTY_IN_LIBUTIL" != "x"], - [LIBS="$LIBS -lutil"]) + LIBS="$LIBS -lutil" AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include @@ -276,6 +275,9 @@ AC_CACHE_CHECK([whether poll can handle ptys], #elif HAVE_UTIL_H #include #endif +#if FORKPTY_IN_LIBUTIL +#include +#endif #include int master, slave;