summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-11-13 16:36:04 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-11-13 16:36:04 (GMT)
commit09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9 (patch)
treee9da366b95f58ac629f1e0d805578b744a381fbc /Modules
parente0671aba949e9f0b97e96cd0605b1e02f7bdebf9 (diff)
downloadCMake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.zip
CMake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.tar.gz
CMake-09b9a38ff32ad38dac3ed9001dfbb1720cf5e4b9.tar.bz2
fix for nsl library and X11
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake1
-rw-r--r--Modules/FindX11.cmake4
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")