fix for nsl library and X11

This commit is contained in:
Bill Hoffman 2002-11-13 11:36:04 -05:00
parent e0671aba94
commit 09b9a38ff3
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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")