Commit 5f5d4889 authored by Daniel Fischer's avatar Daniel Fischer

merge

parents 487b6e1c ce34f3d8
......@@ -80,9 +80,6 @@ IF(FEATURE_SET)
ENDFOREACH()
ENDIF()
SET(WITHOUT_AUDIT_NULL ON CACHE BOOL "")
SET(WITHOUT_DAEMON_EXAMPLE ON CACHE BOOL "")
OPTION(ENABLE_LOCAL_INFILE "" ON)
SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_ZLIB bundled CACHE STRING "")
......@@ -144,8 +141,8 @@ IF(UNIX)
# OSX flags
IF(APPLE)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -Os -fno-common")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -Os -felide-constructors -fno-common")
ENDIF()
# Solaris flags
......
......@@ -40,18 +40,25 @@
#
# - INSTALL_BINDIR (directory with client executables and scripts)
# - INSTALL_SBINDIR (directory with mysqld)
# - INSTALL_SCRIPTDIR (several scripts, rarely used)
#
# - INSTALL_LIBDIR (directory with client end embedded libraries)
# - INSTALL_PLUGINDIR (directory for plugins)
#
# - INSTALL_INCLUDEDIR (directory for MySQL headers)
#
# - INSTALL_DOCDIR (documentation)
# - INSTALL_DOCREADMEDIR (readme and similar)
# - INSTALL_MANDIR (man pages)
# - INSTALL_SCRIPTDIR (several scripts, rarely used)
# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
# - INSTALL_INFODIR (info pages)
#
# - INSTALL_SHAREDIR (location of aclocal/mysql.m4)
# - INSTALL_SQLBENCHDIR (sql-bench)
# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
# - INSTALL_MYSQLTESTDIR (mysql-test)
# - INSTALL_DOCREADMEDIR (readme and similar)
# - INSTALL_SUPPORTFILESDIR (used only in standalone installer)
# - INSTALL_SQLBENCHDIR (sql-bench)
# - INSTALL_SUPPORTFILESDIR (various extra support files)
#
# - INSTALL_MYSQLDATADIR (data directory)
IF(NOT INSTALL_LAYOUT)
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
......@@ -60,15 +67,6 @@ ENDIF()
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
#IF(NOT INSTALL_LAYOUT MATCHES "STANDALONE")
# IF(NOT INSTALL_LAYOUT MATCHES "UNIX")
# # XXX not keen on this, how many more will we need? prefer to just bail...
# IF(NOT INSTALL_LAYOUT MATCHES "SVR4")
# SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
# ENDIF()
# ENDIF()
#ENDIF()
IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "RPM")
SET(default_prefix "/usr")
......@@ -90,85 +88,112 @@ IF(UNIX)
MARK_AS_ADVANCED(SYSCONFDIR)
ENDIF()
#
# STANDALONE layout
#
SET(INSTALL_BINDIR_STANDALONE "bin")
SET(INSTALL_SBINDIR_STANDALONE "bin")
SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
#
SET(INSTALL_LIBDIR_STANDALONE "lib")
SET(INSTALL_INCLUDEDIR_STANDALONE "include")
SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
#
SET(INSTALL_INCLUDEDIR_STANDALONE "include")
#
SET(INSTALL_DOCDIR_STANDALONE "docs")
SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
SET(INSTALL_MANDIR_STANDALONE "man")
SET(INSTALL_INFODIR_STANDALONE "docs")
SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
#
SET(INSTALL_SHAREDIR_STANDALONE "share")
SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
SET(INSTALL_SQLBENCHROOTDIR_STANDALONE ".")
SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
SET(INSTALL_SQLBENCHDIR_STANDALONE ".")
SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
#
SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
#
# RPM layout
#
SET(INSTALL_BINDIR_RPM "bin")
SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
SET(INSTALL_SBINDIR_RPM "sbin")
SET(INSTALL_SCRIPTDIR_RPM "bin")
#
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
SET(INSTALL_LIBDIR_RPM "lib64")
SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
ELSE()
SET(INSTALL_LIBDIR_RPM "lib")
SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
ENDIF()
SET(INSTALL_SBINDIR_RPM "sbin")
#
SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
#
#SET(INSTALL_DOCDIR_RPM unset - installed directly by RPM)
#SET(INSTALL_DOCREADMEDIR_RPM unset - installed directly by RPM)
SET(INSTALL_INFODIR_RPM "share/info")
SET(INSTALL_MANDIR_RPM "share/man")
#
SET(INSTALL_SHAREDIR_RPM "share")
SET(INSTALL_MYSQLSHAREDIR_RPM "share/mysql")
SET(INSTALL_MYSQLTESTDIR_RPM "share/mysql-test")
SET(INSTALL_SQLBENCHDIR_RPM "")
SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
#
#SET(INSTALL_DOCDIR_RPM "XXXunset")
#SET(INSTALL_DOCREADMEDIR_RPM "${INSTALL_DOCDIR_RPM}")
SET(INSTALL_INFODIR_RPM "${INSTALL_SHAREDIR_RPM}/info")
SET(INSTALL_MANDIR_RPM "${INSTALL_SHAREDIR_RPM}/man")
SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql")
SET(INSTALL_MYSQLSHAREDIR_RPM "${INSTALL_SHAREDIR_RPM}/mysql")
SET(INSTALL_MYSQLTESTDIR_RPM "${INSTALL_SHAREDIR_RPM}/mysql-test")
SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin")
SET(INSTALL_SCRIPTDIR_RPM "${INSTALL_BINDIR_RPM}")
SET(INSTALL_SQLBENCHROOTDIR_RPM "")
SET(INSTALL_SUPPORTFILESDIR_RPM "${INSTALL_SHAREDIR_RPM}/mysql")
#
# DEB layout
#
SET(INSTALL_BINDIR_DEB "bin")
SET(INSTALL_SBINDIR_DEB "bin")
SET(INSTALL_SCRIPTDIR_DEB "scripts")
#
SET(INSTALL_LIBDIR_DEB "lib")
SET(INSTALL_INCLUDEDIR_DEB "include")
SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
#
SET(INSTALL_INCLUDEDIR_DEB "include")
#
SET(INSTALL_DOCDIR_DEB "docs")
SET(INSTALL_DOCREADMEDIR_DEB ".")
SET(INSTALL_MANDIR_DEB "man")
SET(INSTALL_INFODIR_DEB "docs")
SET(INSTALL_MYSQLSHAREDIR_DEB "share")
#
SET(INSTALL_SHAREDIR_DEB "share")
SET(INSTALL_SCRIPTDIR_DEB "scripts")
SET(INSTALL_MYSQLSHAREDIR_DEB "share")
SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
SET(INSTALL_SQLBENCHROOTDIR_DEB ".")
SET(INSTALL_DOCREADMEDIR_DEB ".")
SET(INSTALL_SQLBENCHDIR_DEB ".")
SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
#
SET(INSTALL_MYSQLDATADIR_DEB "data")
#
# SVR4 layout
#
SET(INSTALL_BINDIR_SVR4 "bin")
SET(INSTALL_SBINDIR_SVR4 "bin")
SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
#
SET(INSTALL_LIBDIR_SVR4 "lib")
SET(INSTALL_INCLUDEDIR_SVR4 "include")
SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
#
SET(INSTALL_INCLUDEDIR_SVR4 "include")
#
SET(INSTALL_DOCDIR_SVR4 "docs")
SET(INSTALL_DOCREADMEDIR_SVR4 ".")
SET(INSTALL_MANDIR_SVR4 "man")
SET(INSTALL_INFODIR_SVR4 "docs")
SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
#
SET(INSTALL_SHAREDIR_SVR4 "share")
SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
SET(INSTALL_SQLBENCHROOTDIR_SVR4 ".")
SET(INSTALL_DOCREADMEDIR_SVR4 ".")
SET(INSTALL_SQLBENCHDIR_SVR4 ".")
SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
#
SET(INSTALL_MYSQLDATADIR_SVR4 "/var/lib/mysql")
# Clear cached variables if install layout was changed
IF(OLD_INSTALL_LAYOUT)
IF(NOT OLD_INSTALL_LAYOUT STREQUAL INSTALL_LAYOUT)
......@@ -181,7 +206,7 @@ SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
# will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
# layout is chosen)
FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
INFO MYSQLTEST SQLBENCHROOT DOCREADME SUPPORTFILES MYSQLDATA)
INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA)
SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
CACHE STRING "${var} installation directory" ${FORCE})
MARK_AS_ADVANCED(INSTALL_${var}DIR)
......
# Copyright (C) 2010 Sun Microsystems, Inc
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -15,6 +15,9 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This file includes FreeBSD specific options and quirks, related to system checks
#Legacy option, maybe not needed anymore , taken as is from autotools build
ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
# Should not be needed any more, but kept for easy resurrection if needed
# #Legacy option, maybe not needed anymore , taken as is from autotools build
# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)
......@@ -38,6 +38,7 @@
#cmakedefine HAVE_FPU_CONTROL_H 1
#cmakedefine HAVE_GRP_H 1
#cmakedefine HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
#cmakedefine HAVE_IA64INTRIN_H 1
#cmakedefine HAVE_IEEEFP_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_LIMITS_H 1
......@@ -80,6 +81,8 @@
#cmakedefine HAVE_SYS_STREAM_H 1
#cmakedefine HAVE_SYS_TERMCAP_H 1
#cmakedefine HAVE_SYS_TIMEB_H 1
#cmakedefine HAVE_SYS_TIMES_H 1
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_UN_H 1
#cmakedefine HAVE_SYS_VADVISE_H 1
......@@ -87,6 +90,7 @@
#cmakedefine HAVE_TERMIOS_H 1
#cmakedefine HAVE_TERMIO_H 1
#cmakedefine HAVE_TERMCAP_H 1
#cmakedefine HAVE_TIME_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_UTIME_H 1
#cmakedefine HAVE_VARARGS_H 1
......@@ -260,6 +264,8 @@
#cmakedefine HAVE_TEMPNAM 1
#cmakedefine HAVE_THR_SETCONCURRENCY 1
#cmakedefine HAVE_THR_YIELD 1
#cmakedefine HAVE_TIME 1
#cmakedefine HAVE_TIMES 1
#cmakedefine HAVE_VALLOC 1
#define HAVE_VIO_READ_BUFF 1
#cmakedefine HAVE_VASPRINTF 1
......@@ -292,11 +298,6 @@
/* Types we may use */
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
#if SIZEOF_CHAR
# define HAVE_CHAR 1
#endif
#ifdef __APPLE__
/*
Special handling required for OSX to support universal binaries that
......@@ -307,127 +308,71 @@
#else
#define SIZEOF_LONG 4
#endif
#define SIZEOF_VOIDP SIZEOF_LONG
#define SIZEOF_CHARP SIZEOF_LONG
#define SIZEOF_SIZE_T SIZEOF_LONG
#else
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
#cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@
#endif
#if SIZEOF_LONG
# define HAVE_LONG 1
#endif
#if SIZEOF_CHARP
#define HAVE_CHARP 1
#define SIZEOF_VOIDP SIZEOF_CHARP
/* No indentation, to fetch the lines from verification scripts */
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
#cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@
#endif
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
#cmakedefine HAVE_CHAR 1
#cmakedefine HAVE_LONG 1
#cmakedefine HAVE_CHARP 1
#cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
#if SIZEOF_SHORT
# define HAVE_SHORT 1
#endif
#cmakedefine HAVE_SHORT 1
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#if SIZEOF_INT
# define HAVE_INT 1
#endif
#cmakedefine HAVE_INT 1
#cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
#if SIZEOF_LONG_LONG
# define HAVE_LONG_LONG 1
#endif
#cmakedefine HAVE_LONG_LONG 1
#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
#if SIZEOF_OFF_T
#define HAVE_OFF_T 1
#endif
#cmakedefine HAVE_OFF_T 1
#cmakedefine SIZEOF_SIGSET_T @SIZEOF_SIGSET_T@
#if SIZEOF_SIGSET_T
#define HAVE_SIGSET_T 1
#endif
#if SIZEOF_SIZE_T
#define HAVE_SIZE_T 1
#endif
#cmakedefine HAVE_SIGSET_T 1
#cmakedefine HAVE_SIZE_T 1
#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@
#if SIZEOF_UCHAR
#define HAVE_UCHAR 1
#endif
#cmakedefine HAVE_UCHAR 1
#cmakedefine SIZEOF_UINT @SIZEOF_UINT@
#if SIZEOF_UINT
#define HAVE_UINT 1
#endif
#cmakedefine HAVE_UINT 1
#cmakedefine SIZEOF_ULONG @SIZEOF_ULONG@
#if SIZEOF_ULONG
#define HAVE_ULONG 1
#endif
#cmakedefine HAVE_ULONG 1
#cmakedefine SIZEOF_INT8 @SIZEOF_INT8@
#if SIZEOF_INT8
#define HAVE_INT8 1
#endif
#cmakedefine HAVE_INT8 1
#cmakedefine SIZEOF_UINT8 @SIZEOF_UINT8@
#if SIZEOF_UINT8
#define HAVE_UINT8 1
#endif
#cmakedefine HAVE_UINT8 1
#cmakedefine SIZEOF_INT16 @SIZEOF_INT16@
#if SIZEOF_INT16
# define HAVE_INT16 1
#endif
#cmakedefine HAVE_INT16 1
#cmakedefine SIZEOF_UINT16 @SIZEOF_UINT16@
#if SIZEOF_UINT16
#define HAVE_UINT16 1
#endif
#cmakedefine HAVE_UINT16 1
#cmakedefine SIZEOF_INT32 @SIZEOF_INT32@
#if SIZEOF_INT32
#define HAVE_INT32 1
#endif
#cmakedefine HAVE_INT32 1
#cmakedefine SIZEOF_UINT32 @SIZEOF_UINT32@
#if SIZEOF_UINT32
#define HAVE_UINT32 1
#endif
#cmakedefine HAVE_UINT32 1
#cmakedefine SIZEOF_U_INT32_T @SIZEOF_U_INT32_T@
#if SIZEOF_U_INT32_T
#define HAVE_U_INT32_T 1
#endif
#cmakedefine HAVE_U_INT32_T 1
#cmakedefine SIZEOF_INT64 @SIZEOF_INT64@
#if SIZEOF_INT64
#define HAVE_INT64 1
#endif
#cmakedefine HAVE_INT64 1
#cmakedefine SIZEOF_UINT64 @SIZEOF_UINT64@
#if SIZEOF_UINT64
#define HAVE_UINT64 1
#endif
#cmakedefine HAVE_UINT64 1
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#cmakedefine HAVE_BOOL 1
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#if SIZEOF_BOOL
#define HAVE_BOOL 1
#endif
#cmakedefine HAVE_MBSTATE_T
#define MAX_INDEXES 64
#cmakedefine QSORT_TYPE_IS_VOID 1
#define RETQSORTTYPE void
#cmakedefine RETQSORTTYPE @RETQSORTTYPE@
#cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1
#define RETSIGTYPE void
#if SIGNAL_RETURN_TYPE_IS_VOID
#define VOID_SIGHANDLER 1
#endif
#cmakedefine RETSIGTYPE @RETSIGTYPE@
#cmakedefine VOID_SIGHANDLER 1
#define STRUCT_RLIMIT struct rlimit
#ifdef __APPLE__
......@@ -544,7 +489,7 @@
#cmakedefine strtoull @strtoull@
#cmakedefine vsnprintf @vsnprintf@
#if (_MSC_VER > 1310)
#define HAVE_SETENV
# define HAVE_SETENV
#define setenv(a,b,c) _putenv_s(a,b)
#endif
......@@ -572,7 +517,7 @@
#cmakedefine FN_NO_CASE_SENSE 1
#cmakedefine HAVE_CHARSET_armscii8 1
#cmakedefine HAVE_CHARSET_ascii
#cmakedefine HAVE_CHARSET_ascii 1
#cmakedefine HAVE_CHARSET_big5 1
#cmakedefine HAVE_CHARSET_cp1250 1
#cmakedefine HAVE_CHARSET_cp1251 1
......@@ -634,7 +579,7 @@
#cmakedefine WITH_PERFSCHEMA_STORAGE_ENGINE 1
#cmakedefine WITH_NDBCLUSTER_STORAGE_ENGINE 1
#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
#define HAVE_NDB_BINLOG 1
# define HAVE_NDB_BINLOG 1
#endif
#cmakedefine DEFAULT_MYSQL_HOME "@DEFAULT_MYSQL_HOME@"
......
......@@ -81,6 +81,13 @@ ENDIF(WITHOUT_DYNAMIC_PLUGINS)
# Large files, common flag
SET(_LARGEFILE_SOURCE 1)
# If finds the size of a type, set SIZEOF_<type> and HAVE_<type>
FUNCTION(MY_CHECK_TYPE_SIZE type defbase)
CHECK_TYPE_SIZE("${type}" SIZEOF_${defbase})
IF(SIZEOF_${defbase})
SET(HAVE_${defbase} 1 PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
# Searches function in libraries
# if function is found, sets output parameter result to the name of the library
......@@ -99,6 +106,7 @@ FUNCTION(MY_SEARCH_LIBS func libs result)
CHECK_LIBRARY_EXISTS(${lib} ${func} "" HAVE_${func}_IN_${lib})
IF(HAVE_${func}_IN_${lib})
SET(${result} ${lib} PARENT_SCOPE)
SET(HAVE_${result} 1 PARENT_SCOPE)
RETURN()
ENDIF()
ENDFOREACH()
......@@ -160,6 +168,7 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
CHECK_INCLUDE_FILES (cxxabi.h HAVE_CXXABI_H)
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
......@@ -186,7 +195,6 @@ CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H)
CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H)
CHECK_INCLUDE_FILES (sys/dir.h HAVE_SYS_DIR_H)
CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H)
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H)
CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H)
......@@ -226,6 +234,13 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H)
CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H)
CHECK_INCLUDE_FILES("stdlib.h;sys/un.h" HAVE_SYS_UN_H)
IF(HAVE_SYS_STREAM_H)
# Needs sys/stream.h on Solaris
CHECK_INCLUDE_FILES (sys/stream.h sys/ptem.h HAVE_SYS_PTEM_H)
ELSE()
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
ENDIF()
# Figure out threading library
#
FIND_PACKAGE (Threads)
......@@ -449,14 +464,11 @@ set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS)
SET(CMAKE_EXTRA_INCLUDE_FILES signal.h)
CHECK_TYPE_SIZE(sigset_t SIZEOF_SIGSET_T)
IF(SIZEOF_SIGSET_T)
SET(HAVE_SIGSET_T 1)
ENDIF()
MY_CHECK_TYPE_SIZE(sigset_t SIGSET_T)
IF(NOT SIZEOF_SIGSET_T)
SET(sigset_t int)
ENDIF()
CHECK_TYPE_SIZE(mode_t SIZEOF_MODE_T)
MY_CHECK_TYPE_SIZE(mode_t MODE_T)
IF(NOT SIZEOF_MODE_T)
SET(mode_t int)
ENDIF()
......@@ -469,43 +481,41 @@ ENDIF(HAVE_STDINT_H)
IF(NOT APPLE)
# Prevent some checks on OSX, they return ambigious results
# on universal 32/64 bit binariess
CHECK_TYPE_SIZE("char *" SIZEOF_CHARP)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T)
MY_CHECK_TYPE_SIZE("void *" VOIDP)
MY_CHECK_TYPE_SIZE("char *" CHARP)
MY_CHECK_TYPE_SIZE(long LONG)
MY_CHECK_TYPE_SIZE(size_t SIZE_T)
ENDIF()
CHECK_TYPE_SIZE(char SIZEOF_CHAR)
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
CHECK_TYPE_SIZE(int SIZEOF_INT)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
MY_CHECK_TYPE_SIZE(char CHAR)
MY_CHECK_TYPE_SIZE(short SHORT)
MY_CHECK_TYPE_SIZE(int INT)
MY_CHECK_TYPE_SIZE("long long" LONG_LONG)
SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h sys/types.h)
CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T)
CHECK_TYPE_SIZE(uchar SIZEOF_UCHAR)
CHECK_TYPE_SIZE(uint SIZEOF_UINT)
CHECK_TYPE_SIZE(ulong SIZEOF_ULONG)
CHECK_TYPE_SIZE(int8 SIZEOF_INT8)
CHECK_TYPE_SIZE(uint8 SIZEOF_UINT8)
CHECK_TYPE_SIZE(int16 SIZEOF_INT16)
CHECK_TYPE_SIZE(uint16 SIZEOF_UINT16)
CHECK_TYPE_SIZE(int32 SIZEOF_INT32)
CHECK_TYPE_SIZE(uint32 SIZEOF_UINT32)
CHECK_TYPE_SIZE(u_int32_t SIZEOF_U_INT32_T)
CHECK_TYPE_SIZE(int64 SIZEOF_INT64)
CHECK_TYPE_SIZE(uint64 SIZEOF_UINT64)
MY_CHECK_TYPE_SIZE(off_t OFF_T)
MY_CHECK_TYPE_SIZE(uchar UCHAR)
MY_CHECK_TYPE_SIZE(uint UINT)
MY_CHECK_TYPE_SIZE(ulong ULONG)
MY_CHECK_TYPE_SIZE(int8 INT8)
MY_CHECK_TYPE_SIZE(uint8 UINT8)
MY_CHECK_TYPE_SIZE(int16 INT16)
MY_CHECK_TYPE_SIZE(uint16 UINT16)
MY_CHECK_TYPE_SIZE(int32 INT32)
MY_CHECK_TYPE_SIZE(uint32 UINT32)
MY_CHECK_TYPE_SIZE(u_int32_t U_INT32_T)
MY_CHECK_TYPE_SIZE(int64 INT64)
MY_CHECK_TYPE_SIZE(uint64 UINT64)
SET (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
CHECK_TYPE_SIZE(bool SIZEOF_BOOL)
MY_CHECK_TYPE_SIZE(bool BOOL)
SET(CMAKE_EXTRA_INCLUDE_FILES)
IF(HAVE_SYS_SOCKET_H)
SET(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
ENDIF(HAVE_SYS_SOCKET_H)
CHECK_TYPE_SIZE(socklen_t SIZEOF_SOCKLEN_T)
MY_CHECK_TYPE_SIZE(socklen_t SOCKLEN_T)
SET(CMAKE_EXTRA_INCLUDE_FILES)
IF(HAVE_IEEEFP_H)
SET(CMAKE_EXTRA_INCLUDE_FILES ieeefp.h)
CHECK_TYPE_SIZE(fp_except SIZEOF_FP_EXCEPT)
IF(SIZEOF_FP_EXCEPT)
SET(HAVE_FP_EXCEPT TRUE)
ENDIF()
MY_CHECK_TYPE_SIZE(fp_except FP_EXCEPT)
ENDIF()
......@@ -669,6 +679,7 @@ int main(int ac, char **av) {}
" SIGNAL_RETURN_TYPE_IS_VOID)
IF(SIGNAL_RETURN_TYPE_IS_VOID)
SET(RETSIGTYPE void)
SET(VOID_SIGHANDLER 1)
ELSE(SIGNAL_RETURN_TYPE_IS_VOID)
SET(RETSIGTYPE int)
ENDIF(SIGNAL_RETURN_TYPE_IS_VOID)
......@@ -768,7 +779,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
# Assume regular sprintf
SET(SPRINTFS_RETURNS_INT 1)
IF(CMAKE_COMPILER_IS_GNUXX)
IF(CMAKE_COMPILER_IS_GNUXX AND HAVE_CXXABI_H)
CHECK_CXX_SOURCE_COMPILES("
#include <cxxabi.h>
int main(int argc, char **argv)
......@@ -778,9 +789,6 @@ CHECK_CXX_SOURCE_COMPILES("
return 0;
}"
HAVE_ABI_CXA_DEMANGLE)
IF(HAVE_ABI_CXA_DEMANGLE)
SET(HAVE_CXXABI_H 1)
ENDIF()
ENDIF()
CHECK_C_SOURCE_COMPILES("
......@@ -973,14 +981,8 @@ ELSEIF(WIN32)
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} winsock2.h ws2ipdef.h)
ENDIF()
CHECK_TYPE_SIZE("struct sockaddr_in6" SIZEOF_SOCKADDR_IN6)
CHECK_TYPE_SIZE("struct in6_addr" SIZEOF_IN6_ADDR)
IF(SIZEOF_SOCKADDR_IN6)
SET(HAVE_STRUCT_SOCKADDR_IN6 1)
ENDIF()
IF(SIZEOF_IN6_ADDR)
SET(HAVE_STRUCT_IN6_ADDR 1)
ENDIF()
MY_CHECK_TYPE_SIZE("struct sockaddr_in6" SOCKADDR_IN6)
MY_CHECK_TYPE_SIZE("struct in6_addr" IN6_ADDR)
IF(HAVE_STRUCT_SOCKADDR_IN6 OR HAVE_STRUCT_IN6_ADDR)
SET(HAVE_IPV6 TRUE CACHE INTERNAL "")
......
dnl -*- ksh -*-
dnl Process this file with autoconf to produce a configure script.
# Copyright (C) 2008-2009 Sun Microsystems, Inc
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -1235,14 +1235,22 @@ case $SYSTEM_TYPE in
fi
;;
*freebsd*|*dragonfly*)
AC_MSG_WARN([Adding fix for interrupted reads])
dnl These dependencies have not really been checked for some time
OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
if test "$OSVERSION" -gt "480100" && \
if test "$OSVERSION" -gt "600000"
then
# Post user-level threads, MYSQLD_NET_RETRY_COUNT is not needed any more
AC_MSG_WARN([Adding fix for broken realpath])
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_REALPATH"
elif test "$OSVERSION" -gt "480100" && \
test "$OSVERSION" -lt "500000" || \
test "$OSVERSION" -gt "500109"
then
AC_MSG_WARN([Adding fix for interrupted reads])
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
else
AC_MSG_WARN([Adding fix for interrupted reads and broken realpath])
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
fi
......
......@@ -18,6 +18,11 @@
#ifndef _global_h
#define _global_h
/* Client library users on Windows need this macro defined here. */
#if !defined(__WIN__) && defined(_WIN32)
#define __WIN__
#endif
/*
InnoDB depends on some MySQL internals which other plugins should not
need. This is because of InnoDB's foreign key support, "safe" binlog
......@@ -1089,10 +1094,14 @@ typedef long long my_ptrdiff_t;
#define HUGE_PTR
#endif
#endif
#if defined(__IBMC__) || defined(__IBMCPP__)
/* This was _System _Export but caused a lot of warnings on _AIX43 */
#define STDCALL
#elif !defined( STDCALL)
#ifdef STDCALL
#undef STDCALL
#endif
#ifdef _WIN32
#define STDCALL __stdcall
#else
#define STDCALL
#endif
......
......@@ -13,4 +13,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MYSQL_ADD_PLUGIN(audit_null audit_null.c)
MYSQL_ADD_PLUGIN(audit_null audit_null.c
MODULE_ONLY MODULE_OUTPUT_NAME "adt_null")
......@@ -13,4 +13,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MYSQL_ADD_PLUGIN(daemon_example daemon_example.cc MODULE_ONLY)
MYSQL_ADD_PLUGIN(daemon_example daemon_example.cc
MODULE_ONLY MODULE_OUTPUT_NAME "libdaemon_example")
......@@ -13,5 +13,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MYSQL_ADD_PLUGIN(ftexample plugin_example.c MODULE_ONLY MODULE_OUTPUT_NAME mypluglib)
MYSQL_ADD_PLUGIN(ftexample plugin_example.c
MODULE_ONLY MODULE_OUTPUT_NAME "mypluglib")
......@@ -249,6 +249,7 @@ cp include/mysql.h \
include/decimal.h \
include/errmsg.h \
include/my_global.h \
include/my_config.h \
include/my_net.h \
include/my_getopt.h \
include/sslopt-longopts.h \
......
......@@ -21,14 +21,14 @@ ${CMAKE_SOURCE_DIR}/sql-bench/Data/Wisconsin/*
${CMAKE_SOURCE_DIR}/sql-bench/limits/*
)
IF(NOT INSTALL_SQLBENCHROOTDIR)
IF(NOT INSTALL_SQLBENCHDIR)
RETURN()
ENDIF()
IF(INSTALL_SQLBENCHROOTDIR STREQUAL ".")
IF(INSTALL_SQLBENCHDIR STREQUAL ".")
SET(prefix)
ELSE()
SET(prefix ${INSTALL_SQLBENCHROOTDIR}/)
SET(prefix ${INSTALL_SQLBENCHDIR}/)
ENDIF()
GET_FILENAME_COMPONENT(basedir ${CMAKE_SOURCE_DIR} ABSOLUTE)
......
......@@ -121,21 +121,39 @@
%define distro_specific 0
%endif
%if %{distro_specific}
%if %(test -f /etc/enterprise-release && echo 1 || echo 0)
%define oelver %(rpm -qf --qf '%%{version}\\n' /etc/enterprise-release | sed -e 's/^\\([0-9]*\\).*/\\1/g')
%if "%oelver" == "4"
%define distro_description Oracle Enterprise Linux 4
%define distro_releasetag oel4
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils
%else
%if "%oelver" == "5"
%define distro_description Oracle Enterprise Linux 5
%define distro_releasetag oel5
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils
%else
%{error:Oracle Enterprise Linux %{oelver} is unsupported}
%endif
%endif
%else
%if %(test -f /etc/redhat-release && echo 1 || echo 0)
%define elver %(rpm -qf --qf '%%{version}\\n' /etc/redhat-release | sed -e 's/^\\([0-9]*\\).*/\\1/g')
%if "%elver" == "4"
%define distro_description Enterprise Linux 4
%define distro_releasetag el4
%define rhelver %(rpm -qf --qf '%%{version}\\n' /etc/redhat-release | sed -e 's/^\\([0-9]*\\).*/\\1/g')
%if "%rhelver" == "4"
%define distro_description Red Hat Enterprise Linux 4
%define distro_releasetag rhel4
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils
%else
%if "%elver" == "5"
%define distro_description Enterprise Linux 5
%define distro_releasetag el5
%if "%rhelver" == "5"
%define distro_description Red Hat Enterprise Linux 5
%define distro_releasetag rhel5
%define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
%define distro_requires chkconfig coreutils grep procps shadow-utils
%else
%{error:Enterprise Linux %{elver} is unsupported}
%{error:Red Hat Enterprise Linux %{rhelver} is unsupported}
%endif
%endif
%else
......@@ -160,6 +178,7 @@
%{error:Unsupported distribution}
%endif
%endif
%endif
%else
%define generic_kernel %(uname -r | cut -d. -f1-2)
%define distro_description Generic Linux (kernel %{generic_kernel})
......@@ -363,6 +382,14 @@ touch optional-files-devel
# not require C++ features such as exceptions, and may need to be removed at
# a later date.
#
# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break
# the compile in cmd-line-utils/readline - needs investigation, but for now
# we simply unset it and use those specified directly in cmake.
%if "%{_arch}" == "ia64"
RPM_OPT_FLAGS=
%endif
export PATH=${MYSQL_BUILD_PATH:-$PATH}
export CC=${MYSQL_BUILD_CC:-${CC:-gcc}}
export CXX=${MYSQL_BUILD_CXX:-${CXX:-gcc}}
......@@ -396,6 +423,7 @@ mkdir debug
-DFEATURE_SET="%{feature_set}" \
-DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
-DMYSQL_SERVER_SUFFIX="%{server_suffix}"
echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG
make VERBOSE=1
)
# Build full release
......@@ -410,6 +438,7 @@ mkdir release
-DFEATURE_SET="%{feature_set}" \
-DCOMPILATION_COMMENT="%{compilation_comment_release}" \
-DMYSQL_SERVER_SUFFIX="%{server_suffix}"
echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
make VERBOSE=1
)
......@@ -442,6 +471,7 @@ MBD=$RPM_BUILD_DIR/%{src_dir}
install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
install -d $RBR%{mysqldatadir}/mysql
install -d $RBR%{_datadir}/mysql-test
install -d $RBR%{_datadir}/mysql/SELinux/RHEL4
install -d $RBR%{_includedir}
install -d $RBR%{_libdir}
install -d $RBR%{_mandir}
......@@ -470,6 +500,10 @@ ln -s %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql
# Just to make sure it's in the file list and marked as a config file
touch $RBR%{_sysconfdir}/my.cnf
# Install SELinux files in datadir
install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \
$RBR%{_datadir}/mysql/SELinux/RHEL4
%if %{WITH_TCMALLOC}
# Even though this is a shared library, put it under /usr/lib*/mysql, so it
# doesn't conflict with possible shared lib by the same name in /usr/lib*. See
......@@ -727,12 +761,16 @@ fi
%attr(755, root, root) %{_sbindir}/mysqld
%attr(755, root, root) %{_sbindir}/mysqld-debug
%attr(755, root, root) %{_sbindir}/rcmysql
%attr(755, root, root) %{_libdir}/mysql/plugin/adt_null.so
%attr(755, root, root) %{_libdir}/mysql/plugin/libdaemon_example.so
%attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so*
%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so*
%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so
%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/libdaemon_example.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_master.so*
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_slave.so*
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_master.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_slave.so
%if %{WITH_TCMALLOC}
%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target}
......
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