ERR: Do not link nsl if not necessary

This commit is contained in:
Andy Cedilnik 2003-05-12 17:10:43 -04:00
parent 3651096aad
commit 70d3fe1a34
1 changed files with 6 additions and 1 deletions

View File

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