diff options
Diffstat (limited to 'plugins/elf/core.c')
-rw-r--r-- | plugins/elf/core.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/plugins/elf/core.c b/plugins/elf/core.c index d3d226e..41adff7 100644 --- a/plugins/elf/core.c +++ b/plugins/elf/core.c @@ -24,17 +24,27 @@ #include "core.h" +#include <config.h> #include <core/global.h> #include <plugins/plugin-def.h> #include "format.h" -#include "python/module.h" +#ifdef HAVE_PYTHON3_BINDINGS +# include "python/module.h" +#endif + + +#ifdef HAVE_PYTHON3_BINDINGS +# define PG_REQ RL("PyChrysalide") +#else +# define PG_REQ NO_REQ +#endif DEFINE_CHRYSALIDE_PLUGIN("GElfPlugin", "elf", "Add support for the ELF format", "0.1.0", - RL("PyChrysalide"), AL(PGA_PLUGIN_INIT, PGA_CONTENT_RESOLVER)); + PG_REQ, AL(PGA_PLUGIN_INIT, PGA_CONTENT_RESOLVER)); @@ -54,7 +64,11 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin) { bool result; /* Bilan à retourner */ +#ifdef HAVE_PYTHON3_BINDINGS result = add_format_elf_module_to_python_module(); +#else + result = true; +#endif return result; |