1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_NDBCLUSTER
dnl Sets HAVE_NDBCLUSTER_DB if --with-ndbcluster is used
dnl ---------------------------------------------------------------------------
AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
AC_ARG_WITH([ndb-sci],
AC_HELP_STRING([--with-ndb-sci=DIR],
[Provide MySQL with a custom location of
sci library. Given DIR, sci library is
assumed to be in $DIR/lib and header files
in $DIR/include.]),
[mysql_sci_dir=${withval}],
[mysql_sci_dir=""])
case "$mysql_sci_dir" in
"no" )
have_ndb_sci=no
AC_MSG_RESULT([-- not including sci transporter])
;;
* )
if test -f "$mysql_sci_dir/lib/libsisci.a" -a \
-f "$mysql_sci_dir/include/sisci_api.h"; then
NDB_SCI_INCLUDES="-I$mysql_sci_dir/include"
NDB_SCI_LIBS="-L$mysql_sci_dir/lib -lsisci"
AC_MSG_RESULT([-- including sci transporter])
AC_DEFINE([NDB_SCI_TRANSPORTER], [1],
[Including Ndb Cluster DB sci transporter])
AC_SUBST(NDB_SCI_INCLUDES)
AC_SUBST(NDB_SCI_LIBS)
have_ndb_sci="yes"
AC_MSG_RESULT([found sci transporter in $mysql_sci_dir/{include, lib}])
else
AC_MSG_RESULT([could not find sci transporter in $mysql_sci_dir/{include, lib}])
fi
;;
esac
AC_ARG_WITH([ndb-test],
[
--with-ndb-test Include the NDB Cluster ndbapi test programs],
[ndb_test="$withval"],
[ndb_test=no])
AC_ARG_WITH([ndb-docs],
[
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
[ndb_docs="$withval"],
[ndb_docs=no])
AC_ARG_WITH([ndb-port],
[
--with-ndb-port Port for NDB Cluster management server],
[ndb_port="$withval"],
[ndb_port="default"])
AC_ARG_WITH([ndb-port-base],
[
--with-ndb-port-base Base port for NDB Cluster transporters],
[ndb_port_base="$withval"],
[ndb_port_base="default"])
AC_ARG_WITH([ndb-debug],
[
--without-ndb-debug Disable special ndb debug features],
[ndb_debug="$withval"],
[ndb_debug="default"])
AC_ARG_WITH([ndb-ccflags],
AC_HELP_STRING([--with-ndb-ccflags=CFLAGS],
[Extra CFLAGS for ndb compile]),
[ndb_ccflags=${withval}],
[ndb_ccflags=""])
case "$ndb_ccflags" in
"yes")
AC_MSG_RESULT([The --ndb-ccflags option requires a parameter (passed to CC for ndb compilation)])
;;
*)
ndb_cxxflags_fix="$ndb_cxxflags_fix $ndb_ccflags"
;;
esac
AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([])
have_ndb_test=no
case "$ndb_test" in
yes )
AC_MSG_RESULT([-- including ndbapi test programs])
have_ndb_test="yes"
;;
* )
AC_MSG_RESULT([-- not including ndbapi test programs])
;;
esac
have_ndb_docs=no
case "$ndb_docs" in
yes )
AC_MSG_RESULT([-- including ndbapi and mgmapi documentation])
have_ndb_docs="yes"
;;
* )
AC_MSG_RESULT([-- not including ndbapi and mgmapi documentation])
;;
esac
case "$ndb_debug" in
yes )
AC_MSG_RESULT([-- including ndb extra debug options])
have_ndb_debug="yes"
;;
full )
AC_MSG_RESULT([-- including ndb extra extra debug options])
have_ndb_debug="full"
;;
no )
AC_MSG_RESULT([-- not including ndb extra debug options])
have_ndb_debug="no"
;;
* )
have_ndb_debug="default"
;;
esac
AC_MSG_RESULT([done.])
])
AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
AC_ARG_WITH([ndbcluster],
[
--with-ndbcluster Include the NDB Cluster table handler],
[ndbcluster="$withval"],
[ndbcluster=no])
AC_MSG_CHECKING([for NDB Cluster])
have_ndbcluster=no
ndbcluster_includes=
ndbcluster_libs=
ndb_mgmclient_libs=
case "$ndbcluster" in
yes )
AC_MSG_RESULT([Using NDB Cluster and Partitioning])
AC_DEFINE([HAVE_NDBCLUSTER_DB], [1], [Using Ndb Cluster DB])
AC_DEFINE([HAVE_PARTITION_DB], [1], [Builds Partition DB])
have_ndbcluster="yes"
ndbcluster_includes="-I\$(top_builddir)/storage/ndb/include -I\$(top_builddir)/storage/ndb/include/ndbapi"
ndbcluster_libs="\$(top_builddir)/storage/ndb/src/.libs/libndbclient.a"
ndbcluster_system_libs=""
ndb_mgmclient_libs="\$(top_builddir)/storage/ndb/src/mgmclient/libndbmgmclient.la"
MYSQL_CHECK_NDB_OPTIONS
;;
* )
AC_MSG_RESULT([Not using NDB Cluster])
;;
esac
AM_CONDITIONAL([HAVE_NDBCLUSTER_DB], [ test "$have_ndbcluster" = "yes" ])
AC_SUBST(ndbcluster_includes)
AC_SUBST(ndbcluster_libs)
AC_SUBST(ndbcluster_system_libs)
AC_SUBST(ndb_mgmclient_libs)
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_NDBCLUSTER SECTION
dnl ---------------------------------------------------------------------------
|