aboutsummaryrefslogtreecommitdiff
path: root/config/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'config/CMakeLists.txt')
-rw-r--r--config/CMakeLists.txt13
1 files changed, 13 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)