diff options
-rw-r--r-- | Modules/CMakeBackwardCompatibilityC.cmake | 1 | ||||
-rw-r--r-- | Modules/FindX11.cmake | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake index b9a3a85..7f8ebdb 100644 --- a/Modules/CMakeBackwardCompatibilityC.cmake +++ b/Modules/CMakeBackwardCompatibilityC.cmake @@ -14,7 +14,6 @@ CHECK_FUNCTION_EXISTS(connect CMAKE_HAVE_CONNECT) CHECK_FUNCTION_EXISTS(remove CMAKE_HAVE_REMOVE) INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) -CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME) CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_HAVE_GETHOSTBYNAME) INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index c979629..d72a4f6 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -89,6 +89,10 @@ IF (UNIX) ENDIF(CMAKE_X11_INCLUDE_PATH) IF(CMAKE_HAS_X) INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) + CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_HAVE_GETHOSTBYNAME) + IF (CMAKE_HAVE_GETHOSTBYNAME) + SET (CMAKE_X_EXTRA_LIBS "${CMAKE_X_EXTRA_LIBS};-nsl") + ENDIF (CMAKE_HAVE_GETHOSTBYNAME) CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_HAVE_SOCKET_LIBRARY) IF (CMAKE_HAVE_SOCKET_LIBRARY) SET (CMAKE_X_EXTRA_LIBS "${CMAKE_X_EXTRA_LIBS};-lsocket") |