aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/CMakeLists.txt13
-rw-r--r--config/config.h.in1
2 files changed, 14 insertions, 0 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index 30f08c5297..8f93e1eb27 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -50,6 +50,19 @@ check_function_exists(strcasecmp HAVE_STRCASECMP)
check_function_exists(strncasecmp HAVE_STRNCASECMP)
check_function_exists(strptime HAVE_STRPTIME)
+if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ check_c_source_compiles("
+#include <termios.h>
+int
+main(void)
+{
+ return forkpty(0, NULL, NULL, NULL);
+}
+" HAVE_FORKPTY)
+else()
+ set(HAVE_FORKPTY 1)
+endif()
+
# Symbols
check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC)
if(HAVE_LANGINFO_H)
diff --git a/config/config.h.in b/config/config.h.in
index b0635fb52b..b44b7238d2 100644
--- a/config/config.h.in
+++ b/config/config.h.in
@@ -50,6 +50,7 @@
# undef HAVE_SYS_UIO_H
# endif
#endif
+#cmakedefine HAVE_FORKPTY
#cmakedefine FEAT_TUI