Author: piumarta
Date: 2009-08-26 13:13:12 -0700 (Wed, 26 Aug 2009)
New Revision: 2097
Modified:
trunk/platforms/unix/ChangeLog
trunk/platforms/unix/plugins/PseudoTTYPlugin/config.cmake
Log:
disambiguate openpty() found in libc or in libutil
Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog 2009-08-26 19:21:15 UTC (rev 2096)
+++ trunk/platforms/unix/ChangeLog 2009-08-26 20:13:12 UTC (rev 2097)
@@ -1,3 +1,8 @@
+2009-08-26 Ian Piumarta <
[hidden email]>
+
+ * plugins/PseudoTTYPlugin/config.cmake: Disambiguate whether openpty found
+ in libc and in libutil.
+
2009-08-26 <
[hidden email]>
* plugins/SqueakFFIPrims/any-libffi.c: Include ffi.h unless
Modified: trunk/platforms/unix/plugins/PseudoTTYPlugin/config.cmake
===================================================================
--- trunk/platforms/unix/plugins/PseudoTTYPlugin/config.cmake 2009-08-26 19:21:15 UTC (rev 2096)
+++ trunk/platforms/unix/plugins/PseudoTTYPlugin/config.cmake 2009-08-26 20:13:12 UTC (rev 2097)
@@ -1,18 +1,19 @@
-CHECK_INCLUDE_FILE (util.h HAVE_UTIL_H)
-CHECK_INCLUDE_FILE (libutil.h HAVE_LIBUTIL_H)
-CHECK_INCLUDE_FILE (pty.h HAVE_PTY_H)
-CHECK_INCLUDE_FILE (stropts.h HAVE_STROPTS_H)
+PLUGIN_FIND_INCLUDE (UTIL util.h)
+PLUGIN_FIND_INCLUDE (LIBUTIL libutil.h)
+PLUGIN_FIND_LIBRARY (UTIL util)
+PLUGIN_FIND_INCLUDE (PTY pty.h)
+PLUGIN_FIND_INCLUDE (STROPTS stropts.h)
-# can't include libutil.h by itself on FreeBSD because of missing defns
-IF (NOT HAVE_LIBUTIL_H AND EXISTS /usr/include/libutil.h)
- SET (HAVE_LIBUTIL_H 1)
-ENDIF ()
+CHECK_FUNCTION_EXISTS (openpty OPENPTY)
-CHECK_FUNCTION_EXISTS (openpty HAVE_OPENPTY)
-IF (NOT HAVE_OPENPTY)
- CHECK_LIBRARY_EXISTS (util openpty "" HAVE_OPENPTY)
- IF (HAVE_OPENPTY)
+MESSAGE ("OPENPTY ${OPENPTY} HAVE_LIBUTIL ${HAVE_LIBUTIL}")
+
+IF (NOT OPENPTY AND HAVE_LIBUTIL)
+ CHECK_LIBRARY_EXISTS (util openpty "" UTIL_OPENPTY)
+ MESSAGE ("UTIL_OPENPTY ${UTIL_OPENPTY}")
+ IF (UTIL_OPENPTY)
PLUGIN_LINK_LIBRARIES (util)
+ SET (HAVE_OPENPTY 1)
ELSE ()
IF (EXISTS /dev/ptmx)
CHECK_FUNCTION_EXISTS (grantpt HAVE_UNIX98_PTYS)
@@ -20,8 +21,8 @@
PLUGIN_DISABLE ()
ENDIF (NOT HAVE_UNIX98_PTYS)
ENDIF (EXISTS /dev/ptmx)
- ENDIF (HAVE_OPENPTY)
-ENDIF (NOT HAVE_OPENPTY)
+ ENDIF (UTIL_OPENPTY)
+ENDIF (NOT OPENPTY AND HAVE_LIBUTIL)
PLUGIN_INCLUDE_DIRECTORIES (${unix}/plugins/AsynchFilePlugin)