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)
This commit is contained in:
Vladislav Vaintroub 2010-01-18 21:19:24 +01:00
commit ce59ee8098
2 changed files with 7 additions and 0 deletions

View file

@ -284,6 +284,9 @@ IF(UNIX)
IF(NOT LIBM) IF(NOT LIBM)
MY_SEARCH_LIBS(__infinity m LIBM) MY_SEARCH_LIBS(__infinity m LIBM)
ENDIF() ENDIF()
IF(NOT LIBM)
MY_SEARCH_LIBS(rint m LIBM)
ENDIF()
MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNSL) MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNSL)
MY_SEARCH_LIBS(bind "bind;socket" LIBBIND) MY_SEARCH_LIBS(bind "bind;socket" LIBBIND)
MY_SEARCH_LIBS(crypt crypt LIBCRYPT) MY_SEARCH_LIBS(crypt crypt LIBCRYPT)

View file

@ -216,6 +216,10 @@ ENDIF()
SET(LIBS "${CLIENT_LIBS}") SET(LIBS "${CLIENT_LIBS}")
IF(LIBCRYPT)
SET(LIBS "${LIBS} -l${LIBCRYPT}")
ENDIF()
IF(MSVC) IF(MSVC)
STRING(REPLACE "-l" "" CLIENT_LIBS "${CLIENT_LIBS}") STRING(REPLACE "-l" "" CLIENT_LIBS "${CLIENT_LIBS}")
STRING(REPLACE "-l" "" LIBS "${LIBS}" ) STRING(REPLACE "-l" "" LIBS "${LIBS}" )