summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-11-27 17:50:50 +0100
committerSergei Golubchik <sergii@pisem.net>2011-11-27 17:50:50 +0100
commitac8dd6beb917f9b8d14409b565f259043d816e2b (patch)
tree2dcd19f605758aa9c34ca77b4eb1bb46bcc4e50f /storage
parentdfc1901e806bdda129b8943585f2ccfc8c207322 (diff)
parent6be24a771a27a077d58d21a4a1f8db3fbd14cac4 (diff)
downloadmariadb-git-ac8dd6beb917f9b8d14409b565f259043d816e2b.tar.gz
merged
Diffstat (limited to 'storage')
-rw-r--r--storage/xtradb/CMakeLists.txt16
1 files changed, 11 insertions, 5 deletions
diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt
index b55f31e08d1..044a259c65d 100644
--- a/storage/xtradb/CMakeLists.txt
+++ b/storage/xtradb/CMakeLists.txt
@@ -23,12 +23,18 @@ INCLUDE(CheckCSourceRuns)
IF(UNIX)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
CHECK_INCLUDE_FILES (libaio.h HAVE_LIBAIO_H)
- CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
- ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
- IF(HAVE_LIBAIO_H AND HAVE_LIBAIO)
- ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
- LINK_LIBRARIES(aio)
+ IF (XTRADB_PREFER_STATIC_LIBAIO)
+ SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ ENDIF()
+ FIND_LIBRARY(AIO_LIBRARY aio)
+ IF(AIO_LIBRARY)
+ CHECK_LIBRARY_EXISTS(${AIO_LIBRARY} io_queue_init "" HAVE_LIBAIO)
+ IF(HAVE_LIBAIO AND HAVE_LIBAIO_H)
+ ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
+ ENDIF()
+ LINK_LIBRARIES(${AIO_LIBRARY})
ENDIF()
+ ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE")
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")