Link against libutil when checking poll
This commit is contained in:
+8
-5
@@ -240,6 +240,11 @@ PKG_CHECK_MODULES([TINFO], [tinfo], ,
|
|||||||
AC_SUBST([TINFO_LIBS], ["$TINFO_LDFLAGS -lncurses"])],
|
AC_SUBST([TINFO_LIBS], ["$TINFO_LDFLAGS -lncurses"])],
|
||||||
[AC_MSG_ERROR([Unable to find libtinfo or libncurses])])])])])
|
[AC_MSG_ERROR([Unable to find libtinfo or libncurses])])])])])
|
||||||
|
|
||||||
|
AC_CHECK_DECL([forkpty],
|
||||||
|
[AC_DEFINE([FORKPTY_IN_LIBUTIL], [1],
|
||||||
|
[Define if libutil.h necessary for forkpty().])],
|
||||||
|
, [[#include <libutil.h>]])
|
||||||
|
|
||||||
AC_ARG_VAR([poll_CFLAGS], [C compiler flags for poll])
|
AC_ARG_VAR([poll_CFLAGS], [C compiler flags for poll])
|
||||||
AC_ARG_VAR([poll_LIBS], [linker flags for poll])
|
AC_ARG_VAR([poll_LIBS], [linker flags for poll])
|
||||||
AS_IF([test -z "$poll_LIBS"], [
|
AS_IF([test -z "$poll_LIBS"], [
|
||||||
@@ -259,6 +264,9 @@ 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"])
|
||||||
|
|
||||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -318,11 +326,6 @@ AC_CHECK_DECL([mach_absolute_time],
|
|||||||
[Define if mach_absolute_time is available.])],
|
[Define if mach_absolute_time is available.])],
|
||||||
, [[#include <mach/mach_time.h>]])
|
, [[#include <mach/mach_time.h>]])
|
||||||
|
|
||||||
AC_CHECK_DECL([forkpty],
|
|
||||||
[AC_DEFINE([FORKPTY_IN_LIBUTIL], [1],
|
|
||||||
[Define if libutil.h necessary for forkpty().])],
|
|
||||||
, [[#include <libutil.h>]])
|
|
||||||
|
|
||||||
AC_CHECK_DECL([htobe64],
|
AC_CHECK_DECL([htobe64],
|
||||||
[AC_DEFINE([HAVE_HTOBE64], [1],
|
[AC_DEFINE([HAVE_HTOBE64], [1],
|
||||||
[Define if htobe64 and friends exist.])],
|
[Define if htobe64 and friends exist.])],
|
||||||
|
|||||||
Reference in New Issue
Block a user