mariadb/storage/innodb_plugin/plug.in

157 lines
4.5 KiB
Text
Raw Normal View History

#
# Copyright (c) 2006, 2009, Innobase Oy. 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 the Free Software
# Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
#
MYSQL_STORAGE_ENGINE(innodb_plugin,, [InnoDB Storage Engine],
[Transactional Tables using InnoDB], [max,max-no-ndb])
MYSQL_PLUGIN_DIRECTORY(innodb_plugin, [storage/innodb_plugin])
MYSQL_PLUGIN_DYNAMIC(innodb_plugin, [ha_innodb_plugin.la])
MYSQL_PLUGIN_ACTIONS(innodb_plugin, [
AC_CHECK_HEADERS(sched.h)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(void*, 4)
AC_CHECK_FUNCS(sched_yield fdatasync localtime_r)
AC_C_BIGENDIAN
case "$target_os" in
lin*)
CFLAGS="$CFLAGS -DUNIV_LINUX";;
hpux10*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";;
hp*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";;
aix*)
CFLAGS="$CFLAGS -DUNIV_AIX";;
irix*|osf*|sysv5uw7*|openbsd*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
*solaris*|*SunOS*)
# Begin Solaris atomic function checks
AC_CHECK_FUNCS(atomic_cas_ulong atomic_cas_32 \
atomic_cas_64 atomic_add_long,
AC_DEFINE(
[HAVE_SOLARIS_ATOMICS],
[1],
[Define to 1 if Solaris supports \
atomic functions.]))
### End Solaris atomic function checks
CFLAGS="$CFLAGS -DUNIV_SOLARIS";;
esac
INNODB_DYNAMIC_CFLAGS="-DMYSQL_DYNAMIC_PLUGIN"
case "$target_cpu---$target_os" in
x86_64---*)
# The AMD64 ABI forbids absolute addresses in shared libraries
;;
*---solaris*|*---SunOS*)
# Shared objects must be linked from PIC code on Solaris.
;;
*86---)
# Use absolute addresses on IA-32
INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic"
;;
esac
AC_SUBST(INNODB_DYNAMIC_CFLAGS)
AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
AC_TRY_RUN(
[
#include <pthread.h>
#include <string.h>
int main(int argc, char** argv) {
pthread_t x1;
pthread_t x2;
pthread_t x3;
memset(&x1, 0x0, sizeof(x1));
memset(&x2, 0x0, sizeof(x2));
memset(&x3, 0x0, sizeof(x3));
__sync_bool_compare_and_swap(&x1, x2, x3);
return(0);
}
],
[
AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1],
[pthread_t can be used by GCC atomic builtins])
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
]
)
# Try using solaris atomics on SunOS if GCC atomics are not available
AC_CHECK_DECLS(
[HAVE_ATOMIC_PTHREAD_T],
[
AC_MSG_NOTICE(no need to check pthread_t size)
],
[
AC_CHECK_DECLS(
[HAVE_SOLARIS_ATOMICS],
[
Applying InnoDB Plugin 1.0.5 snapshot, part 3 From revision r5686 to r5702 r5696 is already applied Detailed revision comments: r5686 | vasil | 2009-08-20 04:15:05 -0500 (Thu, 20 Aug 2009) | 4 lines branches/zip: White-space fixup. r5687 | vasil | 2009-08-20 04:20:22 -0500 (Thu, 20 Aug 2009) | 8 lines branches/zip: ChangeLog: Follow the convention from the rest of the ChangeLog: for bugfixes from bugs.mysql.com only the bug number and title goes in the ChangeLog. Detailed explanation on what is the problem and how it was fixed is present in the bugs database. r5694 | marko | 2009-08-26 06:25:26 -0500 (Wed, 26 Aug 2009) | 2 lines branches/zip: buf_page_t: Clarify that bpage->list may contain garbage. This comment was provoked by Inaam. r5695 | marko | 2009-08-26 08:14:59 -0500 (Wed, 26 Aug 2009) | 1 line branches/zip: UNIV_DEBUG_LOCK_VALIDATE: Move the definition to univ.i. r5697 | vasil | 2009-08-26 08:44:40 -0500 (Wed, 26 Aug 2009) | 4 lines branches/zip: Fix typo. r5698 | inaam | 2009-08-26 09:34:35 -0500 (Wed, 26 Aug 2009) | 13 lines branches/zip bug#42885 rb://148 The call to put IO threads to sleep was most probably meant for Windows only as the comment in buf0rea.c suggests. However it was enabled on all platforms. This patch restricts the sleep call to windows. This approach of not putting threads to sleep makes even more sense because now we have multiple threads working in the background and it probably is not a good idea to put all of them to sleep because a user thread wants to post a batch for readahead. Approved by: Marko r5701 | marko | 2009-08-27 02:01:42 -0500 (Thu, 27 Aug 2009) | 1 line branches/zip: Document r5698 in the ChangeLog. r5702 | marko | 2009-08-27 02:03:15 -0500 (Thu, 27 Aug 2009) | 1 line branches/zip: Document also the files affected by r5698 in the ChangeLog.
2009-10-08 16:08:57 +05:30
AC_MSG_CHECKING(checking if pthread_t type is integral)
AC_TRY_RUN(
[
#include <pthread.h>
int main()
{
pthread_t x = 0;
return(0);
}
],
[
AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1],
[pthread_t can be used by solaris atomics])
AC_MSG_RESULT(yes)
# size of pthread_t is needed for typed solaris atomics
AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
],
[
AC_MSG_RESULT(no)
])
])
])
2009-07-30 17:42:56 +05:00
# Check for x86 PAUSE instruction
AC_MSG_CHECKING(for x86 PAUSE instruction)
# We have to actually try running the test program, because of a bug
# in Solaris on x86_64, where it wrongly reports that PAUSE is not
# supported when trying to run an application. See
# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
# We use ib_ prefix to avoid collisoins if this code is added to
# mysql's configure.in.
AC_TRY_RUN(
[
int main() {
__asm__ __volatile__ ("pause");
return(0);
}
],
[
AC_DEFINE([IB_HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
],
[
AC_MSG_RESULT(no)
]
)
])
# vim: set ft=config: