python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / oracle-mysql / 0000-ac_cache_check.patch
blobc3b55ba8d39de87edc6b3263ca5ec08f192349a0
1 Patch borrowed from
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>
9 ---
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
17 @@ -53,9 +53,10 @@
18 esac
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
25 - AC_TRY_RUN(
26 + [AC_TRY_RUN(
28 int main()
30 @@ -95,18 +96,23 @@
34 - AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
35 - [GCC atomic builtins are available])
36 AC_MSG_RESULT(yes)
37 + ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes
40 AC_MSG_RESULT(no)
41 + ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no
43 - )
44 + )])
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])
48 + fi
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
54 - AC_TRY_RUN(
55 + [AC_TRY_RUN(
57 #include <pthread.h>
58 #include <string.h>
59 @@ -126,14 +132,18 @@
63 - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
64 - [pthread_t can be used by GCC atomic builtins])
65 AC_MSG_RESULT(yes)
66 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes
69 AC_MSG_RESULT(no)
70 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no
72 - )
73 + )])
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])
77 + fi
79 AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
80 # either define HAVE_IB_SOLARIS_ATOMICS or not
81 @@ -148,9 +158,10 @@
82 are available])
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
89 - AC_TRY_RUN(
90 + [AC_TRY_RUN(
92 #include <pthread.h>
93 #include <string.h>
94 @@ -181,28 +192,33 @@
98 - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
99 - [pthread_t can be used by solaris atomics])
100 AC_MSG_RESULT(yes)
101 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes
104 AC_MSG_RESULT(no)
105 + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no
108 + )])
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])
112 + fi
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.
128 - AC_TRY_RUN(
129 + [AC_TRY_RUN(
131 int main() {
132 __asm__ __volatile__ ("pause");
133 @@ -210,16 +226,21 @@
137 - AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
138 AC_MSG_RESULT(yes)
139 + ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes
142 AC_MSG_RESULT(no)
143 + ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
146 AC_MSG_RESULT(no)
147 + ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
150 + )])
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])
153 + fi
156 # vim: set ft=config: