summaryrefslogtreecommitdiffstats
path: root/Source/CTest/Curl
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-05-12 21:10:43 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-05-12 21:10:43 (GMT)
commit70d3fe1a34eca9532e3ea9d6eb5171af09c06ad7 (patch)
tree75a97e008be5b963d6fcd750a41784b272a06d15 /Source/CTest/Curl
parent3651096aadd2993432f7388cd8c5aaf740f785a6 (diff)
downloadCMake-70d3fe1a34eca9532e3ea9d6eb5171af09c06ad7.zip
CMake-70d3fe1a34eca9532e3ea9d6eb5171af09c06ad7.tar.gz
CMake-70d3fe1a34eca9532e3ea9d6eb5171af09c06ad7.tar.bz2
ERR: Do not link nsl if not necessary
Diffstat (limited to 'Source/CTest/Curl')
-rw-r--r--Source/CTest/Curl/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/CTest/Curl/CMakeLists.txt b/Source/CTest/Curl/CMakeLists.txt
index b510e84..8c116d0 100644
--- a/Source/CTest/Curl/CMakeLists.txt
+++ b/Source/CTest/Curl/CMakeLists.txt
@@ -95,10 +95,15 @@ MACRO(CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
ENDMACRO(CHECK_LIBRARY_EXISTS_CONCAT)
# Check for all needed libraries
-CHECK_LIBRARY_EXISTS_CONCAT("nsl" gethostname HAVE_LIBNSL)
CHECK_LIBRARY_EXISTS_CONCAT("dl" dlopen HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT("ucb" gethostname HAVE_LIBUCB)
CHECK_LIBRARY_EXISTS_CONCAT("socket" connect HAVE_LIBSOCKET)
+CHECK_LIBRARY_EXISTS("c" gethostname "" NOT_NEED_LIBNSL)
+
+IF(NOT NOT_NEED_LIBNSL)
+ CHECK_LIBRARY_EXISTS_CONCAT("nsl" gethostname HAVE_LIBNSL)
+ENDIF(NOT NOT_NEED_LIBNSL)
+
CHECK_LIBRARY_EXISTS_CONCAT("ws2_32" getch HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT("winmm" getch HAVE_LIBWINMM)
CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)