From 0c5307f3450099969cd5c7914432a46cfdd11cbf Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 11 Aug 2012 23:12:04 +0300 Subject: Added forkpty() and cfmakeraw() fallback implementations if they don't exist. Signed-off-by: Timo Sirainen --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3728eee..ca51c62 100644 --- a/configure.ac +++ b/configure.ac @@ -198,7 +198,7 @@ AC_TYPE_UINTPTR_T # Checks for library functions. AC_FUNC_FORK AC_FUNC_MBRTOWC -AC_CHECK_FUNCS([gettimeofday setrlimit inet_ntoa iswprint memchr memset nl_langinfo posix_memalign setenv setlocale sigaction socket strchr strdup strncasecmp strtok strerror strtol wcwidth]) +AC_CHECK_FUNCS([gettimeofday setrlimit inet_ntoa iswprint memchr memset nl_langinfo posix_memalign setenv setlocale sigaction socket strchr strdup strncasecmp strtok strerror strtol wcwidth cfmakeraw]) AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if clock_gettime is available.])]) @@ -224,6 +224,12 @@ AC_CHECK_DECL([forkpty], , [[#include #include ]]) +AC_CHECK_LIB([util], [forkpty], [ + AC_DEFINE([HAVE_FORKPTY],, [Define if you have forkpty().]) + LIBUTIL="-lutil" + AC_SUBST([LIBUTIL]) +]) + AC_MSG_CHECKING([whether pipe2(..., O_CLOEXEC) is supported]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE #include -- cgit v1.2.3