Commit ce59ee80 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix some problems found by kent.

-lm is sometimes not linked, which causes errors about undefined rint()
- FreeBSD embedded library does not link with the flags returned by mysql_config
 (added -lcrypt to LIBS, whereby causing overlinking in case of normal non-embedded client)
parent 0ebe6007
......@@ -284,6 +284,9 @@ IF(UNIX)
IF(NOT LIBM)
MY_SEARCH_LIBS(__infinity m LIBM)
ENDIF()
IF(NOT LIBM)
MY_SEARCH_LIBS(rint m LIBM)
ENDIF()
MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNSL)
MY_SEARCH_LIBS(bind "bind;socket" LIBBIND)
MY_SEARCH_LIBS(crypt crypt LIBCRYPT)
......
......@@ -216,6 +216,10 @@ ENDIF()
SET(LIBS "${CLIENT_LIBS}")
IF(LIBCRYPT)
SET(LIBS "${LIBS} -l${LIBCRYPT}")
ENDIF()
IF(MSVC)
STRING(REPLACE "-l" "" CLIENT_LIBS "${CLIENT_LIBS}")
STRING(REPLACE "-l" "" LIBS "${LIBS}" )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment