193
193
for m4_file in plugin_m4_files:
194
194
plugin_ac.write('m4_sinclude([%s])\n' % m4_file)
195
plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
199
dnl This plugin is staticly built, which means we cannot live without and it is not
200
dnl possible to disable it. Once it is disableable, we will make it non-static.
201
with_%(name)s_plugin=yes
202
pandora_builtin_list="_drizzled_%(name)s_plugin_,${pandora_builtin_list}"
203
pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/plugin/lib%(name)s_plugin.la"
204
PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
207
if plugin['testsuite']:
209
pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
197
213
AC_ARG_WITH([%(name_with_dashes)s-plugin],[
198
dnl indented werid to make the help output correct
199
AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s and enable it. @<:@default=%(default_yesno)s@:>@])
214
dnl indented wierd to make the help output correct
215
AS_HELP_STRING([--with-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=yes@:>@])
200
216
AS_HELP_STRING([--without-%(name_with_dashes)s-plugin],[Disable building %(title)s])
218
with_%(name)s_plugin="$withval"
219
requested_%(name)s_plugin="yes"
221
with_%(name)s_plugin="yes"
222
requested_%(name)s_plugin="no"
224
AC_ARG_ENABLE([%(name_with_dashes)s-plugin],[
225
dnl indented wierd to make the help output correct
226
AS_HELP_STRING([--enable-%(name_with_dashes)s-plugin],[Build %(title)s. @<:@default=%(default_yesno)s@:>@])
227
AS_HELP_STRING([--disable-%(name_with_dashes)s-plugin],[Disable building %(title)s])
202
[with_%(name)s_plugin="$withval"],
203
[AS_IF([test "x$ac_with_all_plugins" = "xyes"],
204
[with_%(name)s_plugin=yes],
205
[with_%(name)s_plugin=%(default_yesno)s])])
229
[enable_%(name)s_plugin="$withval"],
230
[enable_%(name)s_plugin=%(default_yesno)s])
207
233
if os.path.exists(plugin_ac_file):
208
234
plugin_ac.write('m4_sinclude([%s])\n' % plugin_ac_file)
215
241
plugin_ac.write("""
216
242
AS_IF([test %(build_conditional)s],
217
243
[], dnl build_conditional can only negate
218
[with_%(name)s_plugin=no])
245
AS_IF([test "x${requested_%(name)s_plugin}" = "xyes"],
246
[AC_MSG_ERROR([Plugin %(name)s was explicitly requested, yet failed build dependency checks. Aborting!])])
247
with_%(name)s_plugin=no
221
plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
222
251
if not plugin['unconditional']:
223
252
plugin_ac.write("""
224
253
AM_CONDITIONAL([%(build_conditional_tag)s],
225
254
[test %(build_conditional)s])
256
if not plugin['static']:
228
258
AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
231
if plugin['testsuite']:
261
if plugin['testsuite']:
233
263
pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
237
#pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
239
pandora_builtin_list="_drizzled_%(name)s_plugin_,${pandora_builtin_list}"
240
pandora_plugin_libs="${pandora_plugin_libs} \${top_builddir}/plugin/lib%(name)s_plugin.la"
241
PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} %(plugin_dep_libs)s"
245
pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
267
AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
268
pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
247
plugin_ac.write(" ])\n")
271
plugin_ac.write(" ])\n")
250
274
def expand_plugin_ini(plugin, plugin_dir):