~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to config/pandora-plugin

  • Committer: Brian Aker
  • Date: 2010-01-14 21:28:45 UTC
  • mfrom: (1259.7.6 pandora-build)
  • Revision ID: brian@gaz-20100114212845-189op3q67k2b80rh
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
""" % plugin)
193
193
  for m4_file in plugin_m4_files:
194
194
    plugin_ac.write('m4_sinclude([%s])\n' % m4_file)
195
 
 
196
 
  plugin_ac.write("""
 
195
  plugin['plugin_dep_libs']=" ".join(["\${top_builddir}/%s" % f for f in plugin['libs'].split()])
 
196
 
 
197
  if plugin['static']:
 
198
    plugin_ac.write("""
 
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"
 
205
 
 
206
""" % plugin)
 
207
    if plugin['testsuite']:
 
208
      plugin_ac.write("""
 
209
pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
 
210
""" % plugin)
 
211
  else:
 
212
    plugin_ac.write("""
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])
 
217
  ],[
 
218
    with_%(name)s_plugin="$withval"
 
219
    requested_%(name)s_plugin="yes"
 
220
  ],[
 
221
    with_%(name)s_plugin="yes"
 
222
    requested_%(name)s_plugin="no"
 
223
  ])
 
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])
201
228
  ],
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])
 
231
 
206
232
""" % plugin)
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])
 
244
      [
 
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
 
248
      ])
219
249
 
220
250
""" % plugin)
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])
226
255
    """ % plugin)
227
 
  plugin_ac.write("""
 
256
  if not plugin['static']:
 
257
    plugin_ac.write("""
228
258
AS_IF([test "x$with_%(name)s_plugin" = "xyes"],
229
259
      [
230
260
""" % plugin)
231
 
  if plugin['testsuite']:
232
 
    plugin_ac.write("""
 
261
    if plugin['testsuite']:
 
262
      plugin_ac.write("""
233
263
        pandora_plugin_test_list="%(name)s,${pandora_plugin_test_list}"
234
 
    """ % plugin)
 
264
      """ % plugin)
235
265
 
236
 
  if plugin['static']:
237
 
    #pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
238
 
    plugin_ac.write("""
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"
242
 
""" % plugin)
243
 
  else:
244
 
    plugin_ac.write("""
245
 
        pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
 
266
    plugin_ac.write("""
 
267
        AS_IF([test "x$enable_%(name)s_plugin" = "xyes"],[
 
268
          pandora_default_plugin_list="%(name)s,${pandora_default_plugin_list}"
 
269
        ])
246
270
    """ % plugin)
247
 
  plugin_ac.write("      ])\n")
 
271
    plugin_ac.write("      ])\n")
248
272
 
249
273
 
250
274
def expand_plugin_ini(plugin, plugin_dir):