summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <vv221804@astra04>2009-12-08 03:12:23 +0100
committerVladislav Vaintroub <vv221804@astra04>2009-12-08 03:12:23 +0100
commitb5761e6348e065a796d798b17af5779220287982 (patch)
tree5714317e9b75c2ebc46977b9e8148366ba246f6d /configure.cmake
parenta9329d5d3fbfc85510021151f8284a2b3f9a7d17 (diff)
downloadmariadb-git-b5761e6348e065a796d798b17af5779220287982.tar.gz
couple of tweaks for solaris on sparc, link with librt, as it defines sched_yield
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake14
1 files changed, 8 insertions, 6 deletions
diff --git a/configure.cmake b/configure.cmake
index 8c1e5cf9859..305f4dde454 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -92,7 +92,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
# mininal architecture flags, i486 enables GCC atomics
ADD_DEFINITIONS(-march=i486)
ENDIF()
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+ENDIF()
# Large files
@@ -150,9 +150,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "HP-UX" )
ENDIF()
ENDIF()
+# Ensure we have clean build for shared libraries
+# without extra dependencies and without unresolved symbols
+# (on system that support it)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- # Ensure we have clean build for shared libraries
- # without extra dependencies and without unresolved symbols
FOREACH(LANG C CXX)
STRING(REPLACE "-rdynamic" ""
CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
@@ -164,7 +165,6 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined")
ENDIF()
-
#Some OS specific hacks
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
@@ -276,15 +276,17 @@ IF(UNIX)
MY_SEARCH_LIBS(__infinity m LIBM)
ENDIF()
MY_SEARCH_LIBS(gethostbyname_r "nsl_r;nsl" LIBNLS)
- MY_SEARCH_LIBS(bind bind LIBBIND)
+ MY_SEARCH_LIBS(bind "bind;socket" LIBBIND)
MY_SEARCH_LIBS(crypt crypt LIBCRYPT)
MY_SEARCH_LIBS(setsockopt socket LIBSOCKET)
MY_SEARCH_LIBS(dlopen dl LIBDL)
+ MY_SEARCH_LIBS(sched_yield rt LIBRT)
FIND_PACKAGE(Threads)
SET(CMAKE_REQUIRED_LIBRARIES
- ${LIBM} ${LIBNLS} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT})
+ ${LIBM} ${LIBNLS} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT})
+ LIST(REMOVE_DUPLICATES CMAKE_REQUIRED_LIBRARIES)
LINK_LIBRARIES(${CMAKE_THREAD_LIBS_INIT})
OPTION(WITH_LIBWRAP "Compile with tcp wrappers support" OFF)