2 http://code.google.com/p/minimyth/source/browse/trunk/gar-minimyth/script/db/mysql/files/mysql-5.1.47-ac_cache_check.patch?r=6493.
4 It allows to override through ac_cv_* variables various checks that
5 cannot be performed when cross-compiling.
7 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 storage/innodb_plugin/plug.in | 59 ++++++++++++++++++++++++++++--------------
11 1 file changed, 40 insertions(+), 19 deletions(-)
13 Index: mysql-5.1.53/storage/innodb_plugin/plug.in
14 ===================================================================
15 --- mysql-5.1.53.orig/storage/innodb_plugin/plug.in
16 +++ mysql-5.1.53/storage/innodb_plugin/plug.in
19 AC_SUBST(INNODB_DYNAMIC_CFLAGS)
21 - AC_MSG_CHECKING(whether GCC atomic builtins are available)
22 + AC_CACHE_CHECK([whether GCC atomic builtins are available],
23 + [ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS],
24 # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
34 - AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
35 - [GCC atomic builtins are available])
37 + ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes
41 + ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no
45 + if test "x$ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS"= "xyes" ; then
46 + AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
47 + [GCC atomic builtins are available])
50 - AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
51 + AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
52 + [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC],
53 # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
63 - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
64 - [pthread_t can be used by GCC atomic builtins])
66 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes
70 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no
74 + if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC"= "xyes" ; then
75 + AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
76 + [pthread_t can be used by GCC atomic builtins])
79 AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
80 # either define HAVE_IB_SOLARIS_ATOMICS or not
85 - AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
86 + AC_CACHE_CHECK([whether pthread_t can be used by Solaris libc atomic functions],
87 + [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS],
88 # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
98 - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
99 - [pthread_t can be used by solaris atomics])
101 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes
105 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no
109 + if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS"= "xyes" ; then
110 + AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
111 + [pthread_t can be used by solaris atomics])
114 # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
115 # to use in the source
116 AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
118 # Check for x86 PAUSE instruction
119 - AC_MSG_CHECKING(for x86 PAUSE instruction)
120 + AC_CACHE_CHECK([for x86 PAUSE instruction],
121 + [ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION],
122 # We have to actually try running the test program, because of a bug
123 # in Solaris on x86_64, where it wrongly reports that PAUSE is not
124 # supported when trying to run an application. See
125 # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
126 # We use ib_ prefix to avoid collisoins if this code is added to
127 # mysql's configure.in.
132 __asm__ __volatile__ ("pause");
133 @@ -210,16 +226,21 @@
137 - AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
139 + ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes
143 + ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
147 + ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
151 + if test "x$ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION"= "xyes" ; then
152 + AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
156 # vim: set ft=config: