Commit 22aac874 authored by Sergei Golubchik's avatar Sergei Golubchik

merged

parents ff71b82d 7da1887c
MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5 MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=18 MYSQL_VERSION_PATCH=18
MYSQL_VERSION_EXTRA=-MariaDB MYSQL_VERSION_EXTRA=
...@@ -115,9 +115,9 @@ IF(UNIX) ...@@ -115,9 +115,9 @@ IF(UNIX)
OPTION(WITH_LIBEDIT "" ON) OPTION(WITH_LIBEDIT "" ON)
ENDIF() ENDIF()
OPTION(WITH_PIC "" ON) # Why?
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
IF(NOT IGNORE_AIO_CHECK) IF(NOT IGNORE_AIO_CHECK)
# Ensure aio is available on Linux (required by InnoDB) # Ensure aio is available on Linux (required by InnoDB)
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H) CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
...@@ -133,6 +133,14 @@ IF(UNIX) ...@@ -133,6 +133,14 @@ IF(UNIX)
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake. If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
") ")
ENDIF() ENDIF()
# Remove libaio dependency from mysqld
SET(XTRADB_PREFER_STATIC_LIBAIO 1)
# Unfortunately, linking shared libmysqld with static aio
# does not work, unless we add also dynamic one. This also means
# libmysqld.so will depend on libaio.so
SET(LIBMYSQLD_SO_EXTRA_LIBS aio)
ENDIF() ENDIF()
# Enable fast mutexes on Linux # Enable fast mutexes on Linux
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <custom_conf.h> #include <custom_conf.h>
#else #else
#define PROTOCOL_VERSION @PROTOCOL_VERSION@ #define PROTOCOL_VERSION @PROTOCOL_VERSION@
#define MYSQL_SERVER_VERSION "@VERSION@" #define MYSQL_SERVER_VERSION "@VERSION@-MariaDB"
#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@" #define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
#define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@" #define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@"
#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@" #define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
......
...@@ -158,6 +158,9 @@ IF(NOT DISABLE_SHARED) ...@@ -158,6 +158,9 @@ IF(NOT DISABLE_SHARED)
# libmysqld # libmysqld
SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1) SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1) SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
IF(LIBMYSQLD_SO_EXTRA_LIBS)
TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS})
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
...@@ -129,6 +129,7 @@ my_bool my_gethwaddr(uchar *to) ...@@ -129,6 +129,7 @@ my_bool my_gethwaddr(uchar *to)
#elif defined(_WIN32) #elif defined(_WIN32)
#include <winsock2.h> #include <winsock2.h>
#include <iphlpapi.h> #include <iphlpapi.h>
#pragma comment(lib, "iphlpapi.lib")
#define ETHER_ADDR_LEN 6 #define ETHER_ADDR_LEN 6
...@@ -142,7 +143,7 @@ my_bool my_gethwaddr(uchar *to) ...@@ -142,7 +143,7 @@ my_bool my_gethwaddr(uchar *to)
if (GetAdaptersInfo(info, &info_len) != ERROR_BUFFER_OVERFLOW) if (GetAdaptersInfo(info, &info_len) != ERROR_BUFFER_OVERFLOW)
goto err; goto err;
info= alloca(info_len); info= (IP_ADAPTER_INFO *)alloca(info_len);
if (GetAdaptersInfo(info, &info_len) != NO_ERROR) if (GetAdaptersInfo(info, &info_len) != NO_ERROR)
goto err; goto err;
......
...@@ -23,12 +23,18 @@ INCLUDE(CheckCSourceRuns) ...@@ -23,12 +23,18 @@ INCLUDE(CheckCSourceRuns)
IF(UNIX) IF(UNIX)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
CHECK_INCLUDE_FILES (libaio.h HAVE_LIBAIO_H) CHECK_INCLUDE_FILES (libaio.h HAVE_LIBAIO_H)
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO) IF (XTRADB_PREFER_STATIC_LIBAIO)
ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1") SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
IF(HAVE_LIBAIO_H AND HAVE_LIBAIO) 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) ADD_DEFINITIONS(-DLINUX_NATIVE_AIO=1)
LINK_LIBRARIES(aio)
ENDIF() ENDIF()
LINK_LIBRARIES(${AIO_LIBRARY})
ENDIF()
ADD_DEFINITIONS("-DUNIV_LINUX -D_GNU_SOURCE=1")
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*") ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP*")
ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE") ADD_DEFINITIONS("-DUNIV_HPUX -DUNIV_MUST_NOT_INLINE")
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX") ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "AIX")
......
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