pandora_plugins.m4 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. dnl Copyright (C) 2009 Sun Microsystems, Inc.
  2. dnl This file is free software; Sun Microsystems, Inc.
  3. dnl gives unlimited permission to copy and/or distribute it,
  4. dnl with or without modifications, as long as this notice is preserved.
  5. dnl--------------------------------------------------------------------
  6. dnl PANDORA_PLUGINS
  7. dnl Declare our plugin modules
  8. dnl--------------------------------------------------------------------
  9. AC_DEFUN([PANDORA_PLUGINS],[
  10. dnl We do this to prime the files from a fresh checkout. Normally we want
  11. dnl these commands to be executed by make. Perhaps we should split them into
  12. dnl a few shell script snippets in config and make Make call them... we're
  13. dnl going to get there...
  14. dnl ANYWAY - syscmd gets called during aclocal - so before automake. It will
  15. dnl get called probably during autoconf too, so it's important to protect
  16. dnl with test -f ... if the files exist, we don't have the chicken/egg
  17. dnl problem and therefore don't need to do anything here
  18. m4_syscmd([PYTHON=${PYTHON:-python} && $PYTHON config/pandora-plugin > /dev/null])
  19. m4_syscmd([test -f config/plugin.stamp || touch config/plugin.stamp aclocal.m4])
  20. m4_sinclude(config/pandora-plugin.ac)
  21. dnl Add code here to read set plugin lists and set drizzled_default_plugin_list
  22. pandora_builtin_list=`echo $pandora_builtin_list | sed 's/, *$//'`
  23. pandora_builtin_symbols_list=`echo $pandora_builtin_symbols_list | sed 's/, *$//'`
  24. pandora_builtin_load_list=`echo $pandora_builtin_load_list | sed 's/, *$//'`
  25. pandora_builtin_load_symbols_list=`echo $pandora_builtin_load_symbols_list | sed 's/, *$//'`
  26. AS_IF([test "x$pandora_builtin_symbols_list" = "x"], pandora_builtin_symbols_list="NULL")
  27. AS_IF([test "x$pandora_builtin_load_symbols_list" = "x"], pandora_builtin_load_symbols_list="NULL")
  28. AC_SUBST([PANDORA_BUILTIN_LIST],[$pandora_builtin_list])
  29. AC_SUBST([PANDORA_BUILTIN_SYMBOLS_LIST],[$pandora_builtin_symbols_list])
  30. AC_SUBST([PANDORA_BUILTIN_LOAD_LIST],[$pandora_builtin_load_list])
  31. AC_SUBST([PANDORA_BUILTIN_LOAD_SYMBOLS_LIST],[$pandora_builtin_load_symbols_list])
  32. AC_SUBST([PANDORA_PLUGIN_LIST],[$pandora_default_plugin_list])
  33. m4_ifval(m4_normalize([$1]),[
  34. AC_CONFIG_FILES($*)
  35. ],[
  36. AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_LIST],["$pandora_builtin_list"],
  37. [List of plugins to be built in])
  38. AC_DEFINE_UNQUOTED([PANDORA_BUILTIN_SYMBOLS_LIST],["$pandora_builtin_symbols_list"],
  39. [List of builtin plugin symbols to be built in])
  40. AC_DEFINE_UNQUOTED([PANDORA_PLUGIN_LIST],["$pandora_default_plugin_list"],
  41. [List of plugins that should be loaded on startup if no
  42. value is given for --plugin-load])
  43. ])
  44. AC_SUBST(pandora_plugin_test_list)
  45. AC_SUBST(pandora_plugin_libs)
  46. pandora_plugin_defs=`echo $pandora_plugin_defs | sed 's/, *$//'`
  47. AC_SUBST(pandora_plugin_defs)
  48. AC_SUBST(PANDORA_PLUGIN_DEP_LIBS)
  49. AC_SUBST(pkgplugindir,"\$(pkglibdir)")
  50. ])
  51. AC_DEFUN([PANDORA_ADD_PLUGIN_DEP_LIB],[
  52. PANDORA_PLUGIN_DEP_LIBS="${PANDORA_PLUGIN_DEP_LIBS} $*"
  53. ])