~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
dnl ===========================================================================
2
dnl Support for mysql server plugins
3
dnl ===========================================================================
4
dnl
5
dnl WorkLog#3201
6
dnl
7
dnl Framework for pluggable static and dynamic plugins for mysql
8
dnl
9
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
10
dnl Macro: DRIZZLE_PLUGIN
1 by brian
clean slate
11
dnl
12
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
13
dnl   DRIZZLE_PLUGIN([name],[Plugin name],
1 by brian
clean slate
14
dnl                [Plugin description],
15
dnl                [group,group...])
16
dnl   
17
dnl DESCRIPTION
18
dnl   First declaration for a plugin (mandatory).
19
dnl   Adds plugin as member to configuration groups (if specified)
20
dnl
21
dnl ---------------------------------------------------------------------------
22
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
23
AC_DEFUN([DRIZZLE_PLUGIN],[
24
 _DRIZZLE_PLUGIN(
1 by brian
clean slate
25
  [$1],
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
26
  [__DRIZZLE_PLUGIN_]AS_TR_CPP([$1])[__],
1 by brian
clean slate
27
  m4_default([$2], [$1 plugin]),
28
  m4_default([$3], [plugin for $1]),
29
  m4_default([$4], []),
30
 )
31
])
32
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
33
AC_DEFUN([_DRIZZLE_PLUGIN],[
1 by brian
clean slate
34
 m4_ifdef([$2], [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
35
  AC_FATAL([Duplicate DRIZZLE_PLUGIN declaration for $3])
1 by brian
clean slate
36
 ],[
37
  m4_define([$2], [$1])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
38
  _DRIZZLE_PLUGAPPEND([__mysql_plugin_list__],[$1])
39
  m4_define([DRIZZLE_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
40
  m4_define([DRIZZLE_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
41
  _DRIZZLE_PLUGAPPEND_META([$1], $5)
1 by brian
clean slate
42
  ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
43
     DRIZZLE_PLUGIN_DIRECTORY([$1],
1 by brian
clean slate
44
         m4_bregexp(__mysql_include__,[^\(.*\)/plug\.in$],[\1]))
45
  ])
46
 ])
47
])
48
49
50
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
51
dnl Macro: DRIZZLE_STORAGE_ENGINE
1 by brian
clean slate
52
dnl
53
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
54
dnl   DRIZZLE_STORAGE_ENGINE([name],[legacy-option],[Storage engine name],
1 by brian
clean slate
55
dnl                        [Storage engine description],[group,group...])
56
dnl
57
dnl DESCRIPTION
58
dnl   Short cut for storage engine declarations
59
dnl
60
dnl ---------------------------------------------------------------------------
61
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
62
AC_DEFUN([DRIZZLE_STORAGE_ENGINE],[
63
 DRIZZLE_PLUGIN([$1], [$3], [$4], [[$5]])
64
 DRIZZLE_PLUGIN_DEFINE([$1], [WITH_]AS_TR_CPP([$1])[_STORAGE_ENGINE])
1 by brian
clean slate
65
 ifelse([$2],[no],[],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
66
  _DRIZZLE_LEGACY_STORAGE_ENGINE(
1 by brian
clean slate
67
      m4_bpatsubst([$1], -, _),
68
      m4_bpatsubst(m4_default([$2], [$1-storage-engine]), -, _))
69
 ])
70
])
71
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
72
AC_DEFUN([_DRIZZLE_LEGACY_STORAGE_ENGINE],[
1 by brian
clean slate
73
if test "[${with_]$2[+set}]" = set; then
74
  [with_plugin_]$1="[$with_]$2"
75
fi
76
])
77
78
79
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
80
dnl Macro: DRIZZLE_PLUGIN_DEFINE
1 by brian
clean slate
81
dnl
82
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
83
dnl   DRIZZLE_PLUGIN_DEFINE([name],[DRIZZLE_CPP_DEFINE])
1 by brian
clean slate
84
dnl
85
dnl DESCRIPTION
86
dnl   When a plugin is to be statically linked, define the C macro
87
dnl
88
dnl ---------------------------------------------------------------------------
89
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
90
AC_DEFUN([DRIZZLE_PLUGIN_DEFINE],[
91
 DRIZZLE_REQUIRE_PLUGIN([$1])
92
 m4_define([DRIZZLE_PLUGIN_DEFINE_]AS_TR_CPP([$1]), [$2])
1 by brian
clean slate
93
])
94
95
96
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
97
dnl Macro: DRIZZLE_PLUGIN_DIRECTORY
1 by brian
clean slate
98
dnl
99
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
100
dnl   DRIZZLE_PLUGIN_DIRECTORY([name],[plugin/dir])
1 by brian
clean slate
101
dnl
102
dnl DESCRIPTION
103
dnl   Adds a directory to the build process
104
dnl   if it contains 'configure' it will be picked up automatically
105
dnl
106
dnl ---------------------------------------------------------------------------
107
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
108
AC_DEFUN([DRIZZLE_PLUGIN_DIRECTORY],[
109
 DRIZZLE_REQUIRE_PLUGIN([$1])
110
 m4_define([DRIZZLE_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]), [$2])
1 by brian
clean slate
111
])
112
113
114
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
115
dnl Macro: DRIZZLE_PLUGIN_STATIC
1 by brian
clean slate
116
dnl
117
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
118
dnl   DRIZZLE_PLUGIN_STATIC([name],[libmyplugin.a])
1 by brian
clean slate
119
dnl
120
dnl DESCRIPTION
121
dnl   Declare the name for the static library 
122
dnl
123
dnl ---------------------------------------------------------------------------
124
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
125
AC_DEFUN([DRIZZLE_PLUGIN_STATIC],[
126
 DRIZZLE_REQUIRE_PLUGIN([$1])
127
 m4_define([DRIZZLE_PLUGIN_STATIC_]AS_TR_CPP([$1]), [$2])
1 by brian
clean slate
128
])
129
130
131
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
132
dnl Macro: DRIZZLE_PLUGIN_DYNAMIC
1 by brian
clean slate
133
dnl
134
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
135
dnl  DRIZZLE_PLUGIN_DYNAMIC([name],[myplugin.la])
1 by brian
clean slate
136
dnl
137
dnl DESCRIPTION
138
dnl   Declare the name for the shared library
139
dnl
140
dnl ---------------------------------------------------------------------------
141
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
142
AC_DEFUN([DRIZZLE_PLUGIN_DYNAMIC],[
143
 DRIZZLE_REQUIRE_PLUGIN([$1])
144
 m4_define([DRIZZLE_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]), [$2])
1 by brian
clean slate
145
])
146
147
148
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
149
dnl Macro: DRIZZLE_PLUGIN_MANDATORY
1 by brian
clean slate
150
dnl
151
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
152
dnl   DRIZZLE_PLUGIN_MANDATORY([name])
1 by brian
clean slate
153
dnl
154
dnl DESCRIPTION
155
dnl   Marks the specified plugin as a mandatory plugin
156
dnl
157
dnl ---------------------------------------------------------------------------
158
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
159
AC_DEFUN([DRIZZLE_PLUGIN_MANDATORY],[
160
 DRIZZLE_REQUIRE_PLUGIN([$1])
161
 _DRIZZLE_PLUGIN_MANDATORY([$1],
162
  [DRIZZLE_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
163
  [DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1])
1 by brian
clean slate
164
 )
165
])
166
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
167
AC_DEFUN([_DRIZZLE_PLUGIN_MANDATORY],[
1 by brian
clean slate
168
 m4_define([$2], [yes])
169
 m4_ifdef([$3], [
170
  AC_FATAL([mandatory plugin $1 has been disabled])
171
  m4_undefine([$2])
172
 ])
173
])
174
175
176
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
177
dnl Macro: DRIZZLE_PLUGIN_DISABLED
1 by brian
clean slate
178
dnl
179
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
180
dnl   DRIZZLE_PLUGIN_DISABLED([name])
1 by brian
clean slate
181
dnl
182
dnl DESCRIPTION
183
dnl   Marks the specified plugin as a disabled plugin
184
dnl
185
dnl ---------------------------------------------------------------------------
186
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
187
AC_DEFUN([DRIZZLE_PLUGIN_DISABLED],[
188
 DRIZZLE_REQUIRE_PLUGIN([$1])
189
 _DRIZZLE_PLUGIN_DISABLED([$1], 
190
  [DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
191
  [DRIZZLE_PLUGIN_MANDATORY_]AS_TR_CPP([$1])
1 by brian
clean slate
192
 )
193
])
194
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
195
AC_DEFUN([_DRIZZLE_PLUGIN_DISABLED],[
1 by brian
clean slate
196
 m4_define([$2], [yes])
197
 m4_ifdef([$3], [
198
  AC_FATAL([attempt to disable mandatory plugin $1])
199
  m4_undefine([$2])
200
 ])
201
])
202
203
204
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
205
dnl Macro: DRIZZLE_PLUGIN_DEPENDS
1 by brian
clean slate
206
dnl
207
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
208
dnl   DRIZZLE_PLUGIN_DEPENDS([name],[prereq,prereq...])
1 by brian
clean slate
209
dnl
210
dnl DESCRIPTION
211
dnl   Enables other plugins neccessary for the named plugin
212
dnl   Dependency checking is not recursive so if any 
213
dnl   required plugin requires further plugins, list them
214
dnl   here too!
215
dnl
216
dnl ---------------------------------------------------------------------------
217
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
218
AC_DEFUN([DRIZZLE_PLUGIN_DEPENDS],[
219
 DRIZZLE_REQUIRE_PLUGIN([$1])
1 by brian
clean slate
220
 ifelse($#, 2, [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
221
  _DRIZZLE_PLUGIN_DEPEND([$1], $2)
1 by brian
clean slate
222
 ], [
223
  AC_FATAL([bad number of arguments])
224
 ])
225
])
226
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
227
AC_DEFUN([_DRIZZLE_PLUGIN_DEPEND],[
1 by brian
clean slate
228
 ifelse($#, 1, [], [$#:$2], [2:], [], [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
229
  DRIZZLE_REQUIRE_PLUGIN([$2])
230
  _DRIZZLE_PLUGAPPEND([__mysql_plugdepends_$1__],[$2])
231
  _DRIZZLE_PLUGIN_DEPEND([$1], m4_shift(m4_shift($@)))
1 by brian
clean slate
232
 ])
233
])
234
235
236
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
237
dnl Macro: DRIZZLE_PLUGIN_ACTIONS
1 by brian
clean slate
238
dnl
239
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
240
dnl   DRIZZLE_PLUGIN_ACTIONS([name],[PLUGIN_CONFIGURE_STUFF])
1 by brian
clean slate
241
dnl
242
dnl DESCRIPTION
243
dnl   Declares additional autoconf actions required to configure the plugin
244
dnl
245
dnl ---------------------------------------------------------------------------
246
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
247
AC_DEFUN([DRIZZLE_PLUGIN_ACTIONS],[
248
 DRIZZLE_REQUIRE_PLUGIN([$1])
1 by brian
clean slate
249
 m4_ifdef([$2],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
250
   m4_define([DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),m4_defn([$2]))
1 by brian
clean slate
251
 ],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
252
   m4_define([DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [$2])
1 by brian
clean slate
253
 ])
254
])
255
256
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
257
dnl Macro: DRIZZLE_PLUGIN_DEPENDS_ON_DRIZZLE_INTERNALS
1 by brian
clean slate
258
dnl
259
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
260
dnl   DRIZZLE_PLUGIN_DEPENDS_ON_DRIZZLE_INTERNALS([name],[file name])
1 by brian
clean slate
261
dnl
262
dnl DESCRIPTION
263
dnl   Some modules in plugins keep dependance on structures
264
dnl   declared in sql/ (THD class usually)
265
dnl   That has to be fixed in the future, but until then
266
dnl   we have to recompile these modules when we want to
267
dnl   to compile server parts with the different #defines
268
dnl   Normally it happens when we compile the embedded server
269
dnl   Thus one should mark such files in his handler using this macro
270
dnl    (currently only one such a file per plugin is supported)
271
dnl
272
dnl ---------------------------------------------------------------------------
273
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
274
AC_DEFUN([DRIZZLE_PLUGIN_DEPENDS_ON_DRIZZLE_INTERNALS],[
275
 DRIZZLE_REQUIRE_PLUGIN([$1])
276
 m4_define([DRIZZLE_PLUGIN_DEPENDS_ON_DRIZZLE_INTERNALS_]AS_TR_CPP([$1]), [$2])
1 by brian
clean slate
277
])
278
279
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
280
dnl Macro: DRIZZLE_CONFIGURE_PLUGINS
1 by brian
clean slate
281
dnl
282
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
283
dnl   DRIZZLE_PLUGIN_DEPENDS([name,name...])
1 by brian
clean slate
284
dnl
285
dnl DESCRIPTION
286
dnl   Used last, emits all required shell code to configure the plugins
287
dnl   Argument is a list of default plugins or meta-plugin
288
dnl
289
dnl ---------------------------------------------------------------------------
290
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
291
AC_DEFUN([DRIZZLE_CONFIGURE_PLUGINS],[
1 by brian
clean slate
292
 m4_ifdef([__mysql_plugin_configured__],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
293
   AC_FATAL([cannot use [DRIZZLE_CONFIGURE_PLUGINS] multiple times])
1 by brian
clean slate
294
 ],[
295
   m4_define([__mysql_plugin_configured__],[done])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
296
   _DRIZZLE_INCLUDE_LIST(
1 by brian
clean slate
297
   m4_bpatsubst(m4_esyscmd([ls plugin/*/plug.in storage/*/plug.in 2>/dev/null]),
298
[[ 
299
]],[,]))
300
   m4_ifdef([__mysql_plugin_list__],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
301
    _DRIZZLE_CHECK_PLUGIN_ARGS([$1])
302
    _DRIZZLE_CONFIGURE_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
303
    _DRIZZLE_EMIT_PLUGIN_ACTIONS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
1 by brian
clean slate
304
    AC_SUBST([mysql_se_dirs])
305
    AC_SUBST([mysql_pg_dirs])
306
    AC_SUBST([mysql_se_unittest_dirs])
307
    AC_SUBST([mysql_pg_unittest_dirs])
308
    AC_SUBST([condition_dependent_plugin_modules])
309
    AC_SUBST([condition_dependent_plugin_objects])
310
    AC_SUBST([condition_dependent_plugin_links])
311
    AC_SUBST([condition_dependent_plugin_includes])
312
   ])
313
 ])
314
])
315
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
316
AC_DEFUN([_DRIZZLE_CONFIGURE_PLUGINS],[
1 by brian
clean slate
317
 ifelse($#, 0, [], $#, 1, [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
318
  _DRIZZLE_EMIT_CHECK_PLUGIN([$1])
1 by brian
clean slate
319
 ],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
320
  _DRIZZLE_EMIT_CHECK_PLUGIN([$1])
321
  _DRIZZLE_CONFIGURE_PLUGINS(m4_shift($@))
1 by brian
clean slate
322
 ])
323
])
324
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
325
AC_DEFUN([_DRIZZLE_EMIT_CHECK_PLUGIN],[
326
 __DRIZZLE_EMIT_CHECK_PLUGIN(
1 by brian
clean slate
327
  [$1],
328
  m4_bpatsubst([$1], -, _),
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
329
  [DRIZZLE_PLUGIN_NAME_]AS_TR_CPP([$1]),
330
  [DRIZZLE_PLUGIN_DESC_]AS_TR_CPP([$1]),
331
  [DRIZZLE_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
332
  [DRIZZLE_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
333
  [DRIZZLE_PLUGIN_STATIC_]AS_TR_CPP([$1]),
334
  [DRIZZLE_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
335
  [DRIZZLE_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
336
  [DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
337
  [DRIZZLE_PLUGIN_DEPENDS_ON_DRIZZLE_INTERNALS_]AS_TR_CPP([$1]),
338
  [DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
1 by brian
clean slate
339
 )
340
])
341
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
342
AC_DEFUN([__DRIZZLE_EMIT_CHECK_PLUGIN],[
1 by brian
clean slate
343
 m4_ifdef([$5],[
344
  AH_TEMPLATE($5, [Include ]$4[ into mysqld])
345
 ])
346
 AC_MSG_CHECKING([whether to use ]$3)
347
 mysql_use_plugin_dir=""
348
 m4_ifdef([$10],[
349
  if test "X[$mysql_plugin_]$2" = Xyes -a \
350
          "X[$with_plugin_]$2" != Xno -o \
351
          "X[$with_plugin_]$2" = Xyes; then
352
    AC_MSG_RESULT([error])
353
    AC_MSG_ERROR([disabled])
354
  fi
355
  AC_MSG_RESULT([no])
356
 ],[
357
  m4_ifdef([$9],[
358
   if test "X[$with_plugin_]$2" = Xno; then
359
     AC_MSG_RESULT([error])
360
     AC_MSG_ERROR([cannot disable mandatory plugin])
361
   fi
362
   [mysql_plugin_]$2=yes
363
  ],[
364
   case "$with_mysqld_ldflags " in
365
     *"-all-static "*)
366
       # No need to build shared plugins when mysqld is linked with
367
       # -all-static as it won't be able to load them.
368
       if test "X[$mysql_plugin_]$2" != Xyes -a \
369
               "X[$with_plugin_]$2" != Xyes; then
370
	     [with_plugin_]$2=no
371
	   fi
372
     ;;
373
   esac
374
  ])
375
  if test "X[$with_plugin_]$2" = Xno; then
376
    AC_MSG_RESULT([no])
377
  else
378
    m4_ifdef([$8],m4_ifdef([$7],[],[[with_plugin_]$2='']))
379
    if test "X[$mysql_plugin_]$2" != Xyes -a \
380
            "X[$with_plugin_]$2" != Xyes; then
381
      m4_ifdef([$8],[
382
       m4_ifdef([$6],[
383
         if test -d "$srcdir/$6" ; then
384
           mysql_use_plugin_dir="$6"
385
       ])
386
       AC_SUBST([plugin_]$2[_shared_target], "$8")
387
       AC_SUBST([plugin_]$2[_static_target], [""])
388
       [with_plugin_]$2=yes
389
       AC_MSG_RESULT([plugin])
390
       m4_ifdef([$6],[
391
         else
392
           [mysql_plugin_]$2=no
393
           AC_MSG_RESULT([no])
394
         fi
395
       ])
396
      ],[
397
       [with_plugin_]$2=no
398
       AC_MSG_RESULT([no])
399
      ])
400
    else
401
      m4_ifdef([$7],[
402
       ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
403
dnl change above "-2" to "0" to enable this section
404
dnl Although this is "pretty", it breaks libmysqld build
405
        m4_ifdef([$6],[
406
         mysql_use_plugin_dir="$6"
407
         mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
408
        ])
409
        mysql_plugin_libs="$mysql_plugin_libs dnl
410
[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
411
       ], m4_bregexp($7, [^\\\$]), 0, [
412
        m4_ifdef([$6],[
413
         mysql_use_plugin_dir="$6"
414
        ])
415
        mysql_plugin_libs="$mysql_plugin_libs $7"
416
       ], [
417
        m4_ifdef([$6],[
418
         mysql_use_plugin_dir="$6"
419
         mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/$6/$7"
420
        ],[
421
         mysql_plugin_libs="$mysql_plugin_libs $7"
422
        ])
423
       ])
424
       m4_ifdef([$5],[
425
        AC_DEFINE($5)
426
       ])
427
       AC_SUBST([plugin_]$2[_static_target], "$7")
428
       AC_SUBST([plugin_]$2[_shared_target], [""])
429
      ],[
430
       m4_ifdef([$6],[
431
        AC_MSG_RESULT([error])
432
        AC_MSG_ERROR([Plugin $1 does not support static linking])
433
       ],[
434
        m4_ifdef([$5],[
435
         AC_DEFINE($5)
436
         AC_SUBST([plugin_]$2[_static_target], ["yes"])
437
         AC_SUBST([plugin_]$2[_shared_target], [""])
438
        ])
439
       ])
440
      ])
441
      mysql_plugin_defs="$mysql_plugin_defs, [builtin_]$2[_plugin]"
442
      [with_plugin_]$2=yes
443
      AC_MSG_RESULT([yes])
444
      m4_ifdef([$11],[
445
       condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp($11, [[^/]+$], [\&])"
446
       condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp($11, [[^/]+\.], [\&o])"
447
       condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11"
448
       condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp($11, [^.+[/$]], [\&])"
449
      ])
450
    fi
451
    m4_ifdef([$6],[
452
      if test -n "$mysql_use_plugin_dir" ; then
453
        mysql_plugin_dirs="$mysql_plugin_dirs $6"
454
        m4_syscmd(test -f "$6/configure")
455
        ifelse(m4_sysval, 0,
456
          [AC_CONFIG_SUBDIRS($6)],
457
          [AC_CONFIG_FILES($6/Makefile)]
458
        )
459
        ifelse(m4_substr($6, 0, 8), [storage/],
460
          [
461
            [mysql_se_dirs="$mysql_se_dirs ]m4_substr($6, 8)"
462
             mysql_se_unittest_dirs="$mysql_se_unittest_dirs ../$6"
463
          ],
464
          m4_substr($6, 0, 7), [plugin/],
465
          [
466
            [mysql_pg_dirs="$mysql_pg_dirs ]m4_substr($6, 7)"
467
             mysql_pg_unittest_dirs="$mysql_pg_unittest_dirs ../$6"
468
          ],
469
          [AC_FATAL([don't know how to handle plugin dir ]$6)])
470
      fi
471
    ])
472
  fi
473
 ])
474
])
475
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
476
AC_DEFUN([_DRIZZLE_EMIT_PLUGIN_ACTIONS],[
1 by brian
clean slate
477
 ifelse($#, 0, [], $#, 1, [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
478
  _DRIZZLE_EMIT_PLUGIN_ACTION([$1])
1 by brian
clean slate
479
 ],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
480
  _DRIZZLE_EMIT_PLUGIN_ACTION([$1])
481
  _DRIZZLE_EMIT_PLUGIN_ACTIONS(m4_shift($@))
1 by brian
clean slate
482
 ])
483
])
484
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
485
AC_DEFUN([_DRIZZLE_EMIT_PLUGIN_ACTION],[
486
 __DRIZZLE_EMIT_PLUGIN_ACTION(
1 by brian
clean slate
487
  [$1],
488
  m4_bpatsubst([$1], -, _),
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
489
  [DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
490
  [DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
1 by brian
clean slate
491
 )
492
])
493
494
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
495
AC_DEFUN([__DRIZZLE_EMIT_PLUGIN_ACTION],[
1 by brian
clean slate
496
 m4_ifdef([$3], [], [
497
  if test "X[$with_plugin_]$2" = Xyes; then
498
    if test "X[$plugin_]$2[_static_target]" = X -a \
499
            "X[$plugin_]$2[_shared_target]" = X; then
500
      AC_MSG_ERROR([that's strange, $1 failed sanity check])
501
    fi
502
    $4
503
  fi
504
 ])
505
])
506
507
508
509
dnl ===========================================================================
510
dnl  Private helper macros
511
dnl ===========================================================================
512
513
514
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
515
dnl   DRIZZLE_REQUIRE_PLUGIN([name])
1 by brian
clean slate
516
dnl
517
dnl DESCRIPTION
518
dnl   Checks that the specified plugin does exist
519
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
520
AC_DEFUN([DRIZZLE_REQUIRE_PLUGIN],[
521
 _DRIZZLE_REQUIRE_PLUGIN([$1], [__DRIZZLE_PLUGIN_]AS_TR_CPP([$1])[__])
1 by brian
clean slate
522
])
523
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
524
define([_DRIZZLE_REQUIRE_PLUGIN],[
1 by brian
clean slate
525
 ifdef([$2],[
526
  ifelse($2, [$1], [], [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
527
   AC_FATAL([Misspelt DRIZZLE_PLUGIN declaration for $1])
1 by brian
clean slate
528
  ])
529
 ],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
530
  AC_FATAL([Missing DRIZZLE_PLUGIN declaration for $1])
1 by brian
clean slate
531
 ])
532
])
533
534
535
dnl ---------------------------------------------------------------------------
536
537
538
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
539
dnl   _DRIZZLE_EMIT_METAPLUGINS([name,name...])
1 by brian
clean slate
540
dnl
541
dnl DESCRIPTION
542
dnl   Emits shell code for metaplugins
543
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
544
AC_DEFUN([_DRIZZLE_EMIT_METAPLUGINS], [ifelse($#, 0, [], $#, 1,
545
[_DRIZZLE_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
1 by brian
clean slate
546
],
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
547
[_DRIZZLE_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
548
_DRIZZLE_EMIT_METAPLUGINS(m4_shift($@))])
1 by brian
clean slate
549
])
550
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
551
AC_DEFUN([_DRIZZLE_EMIT_METAPLUGIN], [
1 by brian
clean slate
552
  [$1] )
553
m4_ifdef([$2], [
554
    mysql_plugins='m4_bpatsubst($2, :, [ ])'
555
],[
556
    mysql_plugins=''
557
])
558
    ;;
559
])
560
561
562
dnl ---------------------------------------------------------------------------
563
564
565
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
566
dnl   _DRIZZLE_PLUGAPPEND([name],[to-append])
1 by brian
clean slate
567
dnl
568
dnl DESCRIPTION
569
dnl   Helper macro for appending to colon-delimited lists
570
dnl   Optinal 3rd argument is for actions only required when defining
571
dnl   macro named for the first time.
572
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
573
AC_DEFUN([_DRIZZLE_PLUGAPPEND],[
1 by brian
clean slate
574
 m4_ifdef([$1],[
575
  m4_define([__plugin_append_tmp__], m4_defn([$1]))
576
  m4_undefine([$1])
577
  m4_define([$1], __plugin_append_tmp__[:$2])
578
  m4_undefine([__plugin_append_tmp__])
579
 ],[
580
  m4_define([$1], [$2])
581
  $3
582
 ])
583
])
584
585
586
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
587
dnl   _DRIZZLE_PLUGAPPEND_META([name],[meta,meta...])
1 by brian
clean slate
588
dnl
589
dnl DESCRIPTION
590
dnl   Helper macro for adding plugins to meta plugins
591
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
592
AC_DEFUN([_DRIZZLE_PLUGAPPEND_META],[
1 by brian
clean slate
593
 ifelse($#, 1, [], [$#:$2], [2:], [], [$2], [all], [
594
  AC_FATAL([protected plugin group: all])
595
 ], [$2], [none], [
596
  AC_FATAL([protected plugin group: none])
597
 ],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
598
  _DRIZZLE_PLUGAPPEND([__mysql_$1_configs__],[$2])
599
  _DRIZZLE_PLUGAPPEND([__mysql_]m4_bpatsubst($2, -, _)[_plugins__],[$1], [
600
   _DRIZZLE_PLUGAPPEND([__mysql_metaplugin_list__],[$2])
1 by brian
clean slate
601
  ])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
602
  _DRIZZLE_PLUGAPPEND_META([$1], m4_shift(m4_shift($@)))
1 by brian
clean slate
603
 ])
604
])
605
606
607
dnl ---------------------------------------------------------------------------
608
609
610
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
611
dnl   DRIZZLE_LIST_PLUGINS
1 by brian
clean slate
612
dnl
613
dnl DESCRIPTION
614
dnl   Emits formatted list of declared plugins
615
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
616
AC_DEFUN([DRIZZLE_LIST_PLUGINS],[dnl
1 by brian
clean slate
617
 m4_ifdef([__mysql_plugin_list__],[dnl
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
618
  _DRIZZLE_LIST_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))dnl
1 by brian
clean slate
619
 ])dnl
620
])
621
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
622
AC_DEFUN([_DRIZZLE_LIST_PLUGINS],[dnl
1 by brian
clean slate
623
 ifelse($#, 0, [], $#, 1, [dnl
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
624
  DRIZZLE_SHOW_PLUGIN([$1])dnl
1 by brian
clean slate
625
 ],[dnl
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
626
  DRIZZLE_SHOW_PLUGIN([$1])dnl
627
  _DRIZZLE_LIST_PLUGINS(m4_shift($@))dnl
1 by brian
clean slate
628
 ])dnl
629
])
630
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
631
AC_DEFUN([DRIZZLE_SHOW_PLUGIN],[
632
 _DRIZZLE_SHOW_PLUGIN(
1 by brian
clean slate
633
  [$1],
634
  [$1-plugin],
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
635
  [DRIZZLE_PLUGIN_NAME_]AS_TR_CPP([$1]),
636
  [DRIZZLE_PLUGIN_DESC_]AS_TR_CPP([$1]),
637
  [DRIZZLE_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
638
  [DRIZZLE_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
639
  [DRIZZLE_PLUGIN_STATIC_]AS_TR_CPP([$1]),
640
  [DRIZZLE_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
641
  [DRIZZLE_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
642
  [DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
643
  [DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),
1 by brian
clean slate
644
  __mysql_[$1]_configs__,
645
 )
646
])
647
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
648
AC_DEFUN([_DRIZZLE_SHOW_PLUGIN],[dnl
1 by brian
clean slate
649
  === $3 ===
650
  Plugin Name:      [$1]
651
  Description:      $4
652
  Supports build:   _PLUGIN_BUILD_TYPE([$7],[$8])[]dnl
653
m4_ifdef([$12],[
654
  Configurations:   m4_bpatsubst($12, :, [, ])])[]dnl
655
m4_ifdef([$10],[
656
  Status:           disabled])[]dnl
657
m4_ifdef([$9],[
658
  Status:           mandatory])[]dnl
659
])
660
661
AC_DEFUN([_PLUGIN_BUILD_TYPE],
662
[m4_ifdef([$1],[static ]m4_ifdef([$2],[and dnl
663
]))[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
664
665
666
dnl ---------------------------------------------------------------------------
667
668
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
669
AC_DEFUN([_DRIZZLE_EMIT_PLUGINS],[
1 by brian
clean slate
670
 ifelse($#, 0, [], [$#:$1], [1:], [], [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
671
  m4_ifdef([DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [], [
672
   m4_define([DRIZZLE_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),[ ])
1 by brian
clean slate
673
  ])
674
    [$1] )
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
675
  m4_ifdef([DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
1 by brian
clean slate
676
      AC_MSG_ERROR([plugin $1 is disabled])
677
  ],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
678
    _DRIZZLE_EMIT_PLUGIN_ENABLE([$1], m4_bpatsubst([$1], -, _),
679
      [DRIZZLE_PLUGIN_NAME_]AS_TR_CPP([$1]),
680
      [DRIZZLE_PLUGIN_STATIC_]AS_TR_CPP([$1]),
681
      [DRIZZLE_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]))
1 by brian
clean slate
682
  ])
683
      ;;
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
684
  _DRIZZLE_EMIT_PLUGINS(m4_shift($@))
1 by brian
clean slate
685
 ])
686
])
687
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
688
AC_DEFUN([_DRIZZLE_EMIT_PLUGIN_ENABLE],[
1 by brian
clean slate
689
    m4_ifdef([$5],m4_ifdef([$4],[
690
      [mysql_plugin_]$2=yes
691
    ],[
692
      AC_MSG_WARN([$3 can only be built as a plugin])
693
    ]),[
694
      [mysql_plugin_]$2=yes
695
    ])      
696
])
697
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
698
AC_DEFUN([_DRIZZLE_EMIT_PLUGIN_DEPENDS], [
1 by brian
clean slate
699
 ifelse($#, 0, [], [$#:$1], [1:], [], [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
700
  _DRIZZLE_EMIT_CHECK_DEPENDS(m4_bpatsubst([$1], -, _), 
1 by brian
clean slate
701
                            [__mysql_plugdepends_$1__])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
702
  _DRIZZLE_EMIT_PLUGIN_DEPENDS(m4_shift($@))
1 by brian
clean slate
703
 ])
704
])
705
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
706
AC_DEFUN([_DRIZZLE_EMIT_CHECK_DEPENDS], [
1 by brian
clean slate
707
 m4_ifdef([$2], [
708
   if test "X[$mysql_plugin_]$1" = Xyes -a \
709
           "X[$with_plugin_]$1" != Xno -o \
710
           "X[$with_plugin_]$1" = Xyes; then
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
711
     _DRIZZLE_EMIT_PLUGIN_DEPENDENCIES(m4_bpatsubst($2, :, [,]))
1 by brian
clean slate
712
   fi
713
 ])
714
])
715
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
716
AC_DEFUN([_DRIZZLE_EMIT_PLUGIN_DEPENDENCIES], [
1 by brian
clean slate
717
 ifelse([$1], [], [], [
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
718
  m4_ifdef([DRIZZLE_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
1 by brian
clean slate
719
       AC_MSG_ERROR([depends upon disabled plugin $1])
720
  ],[
721
       [mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
722
       if test "X[$with_plugin_]m4_bpatsubst([$1], -, _)" = Xno; then
723
         AC_MSG_ERROR([depends upon disabled plugin $1])
724
       fi
725
  ])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
726
  _DRIZZLE_EMIT_PLUGIN_DEPENDENCIES(m4_shift($@))
1 by brian
clean slate
727
 ])
728
])
729
730
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
731
dnl   _DRIZZLE_CHECK_PLUGIN_ARGS([plugin],[plugin]...)
1 by brian
clean slate
732
dnl
733
dnl DESCRIPTION
734
dnl   Emits shell script for checking configure arguments
735
dnl   Arguments to this macro is default value for selected plugins
736
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
737
AC_DEFUN([_DRIZZLE_CHECK_PLUGIN_ARGS],[
738
 __DRIZZLE_CHECK_PLUGIN_ARGS(m4_default([$1], [none]))
1 by brian
clean slate
739
])
740
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
741
AC_DEFUN([__DRIZZLE_CHECK_PLUGIN_ARGS],[
1 by brian
clean slate
742
 AC_ARG_WITH([plugins],
743
AS_HELP_STRING([--with-plugins=PLUGIN[[[[[,PLUGIN..]]]]]],
744
               [Plugins to include in mysqld. (default is: $1) Must be a
745
                configuration name or a comma separated list of plugins.])
746
AS_HELP_STRING([],
747
               [Available configurations are:] dnl
748
m4_bpatsubst([none:]m4_ifdef([__mysql_metaplugin_list__],
749
             __mysql_metaplugin_list__:)[all], :, [ ])[.])
750
AS_HELP_STRING([],
751
               [Available plugins are:] dnl
752
m4_bpatsubst(__mysql_plugin_list__, :, [ ])[.])
753
AS_HELP_STRING([--without-plugin-PLUGIN],
754
               [Disable the named plugin from being built. Otherwise, for
755
                plugins which are not selected for inclusion in mysqld will be
756
                built dynamically (if supported)])
757
AS_HELP_STRING([--with-plugin-PLUGIN],
758
               [Forces the named plugin to be linked into mysqld statically.]),
759
 [mysql_plugins="`echo $withval | tr ',.:;*[]' '       '`"],
760
 [mysql_plugins=['$1']])
761
762
m4_divert_once([HELP_VAR_END],[
763
Description of plugins:
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
764
DRIZZLE_LIST_PLUGINS])
1 by brian
clean slate
765
766
  case "$mysql_plugins" in
767
  all )
768
    mysql_plugins='m4_bpatsubst(__mysql_plugin_list__, :, [ ])'
769
    ;;
770
  none )
771
    mysql_plugins=''
772
    ;;
773
m4_ifdef([__mysql_metaplugin_list__],[
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
774
_DRIZZLE_EMIT_METAPLUGINS(m4_bpatsubst(__mysql_metaplugin_list__, :, [,]))
1 by brian
clean slate
775
])
776
  esac
777
778
  for plugin in $mysql_plugins; do
779
    case "$plugin" in
780
    all | none )
781
      AC_MSG_ERROR([bad plugin name: $plugin])
782
      ;;
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
783
_DRIZZLE_EMIT_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
1 by brian
clean slate
784
    * )
785
      AC_MSG_ERROR([unknown plugin: $plugin])
786
      ;;
787
    esac
788
  done
789
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
790
  _DRIZZLE_EMIT_PLUGIN_DEPENDS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
1 by brian
clean slate
791
])
792
793
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
794
dnl Macro: _DRIZZLE_INCLUDE_LIST
1 by brian
clean slate
795
dnl
796
dnl SYNOPSIS
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
797
dnl   _DRIZZLE_INCLUDE_LIST([filename,filename...])
1 by brian
clean slate
798
dnl
799
dnl DESCRIPTION
800
dnl   includes all files from the list
801
dnl
802
dnl ---------------------------------------------------------------------------
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
803
AC_DEFUN([_DRIZZLE_INCLUDE_LIST],[
1 by brian
clean slate
804
 ifelse([$1], [], [], [
805
  m4_define([__mysql_include__],[$1])
806
  dnl We have to use builtin(), because sinclude would generate an error
807
  dnl "file $1 does not exists" in aclocal-1.8 - which is a bug, clearly
808
  dnl violating m4 specs, and which is fixed in aclocal-1.9
809
  builtin([include],$1)
810
  m4_undefine([__mysql_include__])
319.1.1 by Grant Limberg
renamed all instances of MYSQL_ to DRIZZLE_
811
  _DRIZZLE_INCLUDE_LIST(m4_shift($@))
1 by brian
clean slate
812
 ])
813
])
814
815
dnl ===========================================================================