curl: Do not use 'dl' on HP-UX

Re-apply the logic change made by commit v2.8.0~1427 (fix warning on
HPUX, 2008-11-26).
This commit is contained in:
Brad King 2014-11-08 06:18:16 -05:00
parent 5924270273
commit 5a3b55ed7c
1 changed files with 6 additions and 0 deletions

View File

@ -204,7 +204,13 @@ if(WIN32)
endif(WIN32)
# Check for all needed libraries
if(0) # This code not needed for building within CMake.
check_library_exists_concat("dl" dlopen HAVE_LIBDL)
else()
# Use the cmake-defined dl libs as dl is should not be used
# on HPUX, but rather dld this avoids a warning
list(APPEND CURL_LIBS ${CMAKE_DL_LIBS})
endif()
check_library_exists_concat("socket" connect HAVE_LIBSOCKET)
check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL)