Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 1328) +++ trunk/scconfig/hooks.c (revision 1329) @@ -30,9 +30,6 @@ {"disable-gd-jpg", "libs/gui/gd/gdImageJpeg", arg_lib_nodes, "$no jpeg support in the png exporter"}, {"disable-gpmi", "libs/script/gpmi", arg_lib_nodes, "$do not compile the gpmi (scripting) plugin"}, - {"buildin-gpmi", "/local/pcb/gpmi/buildin", arg_true, "$static link the gpmi plugin into the executable"}, - {"plugin-gpmi", "/local/pcb/gpmi/buildin", arg_false, "$the gpmi plugin is a dynamic loadable"}, - #undef plugin_def #undef plugin_header #define plugin_def(name, desc, default_) plugin3_args(name, desc) @@ -93,8 +90,6 @@ db_mkdir("/local/pcb"); /* DEFAULTS */ - db_mkdir("/local/pcb/gpmi"); - put("/local/pcb/gpmi/buildin", strue); put("/local/prefix", "/usr/local"); #undef plugin_def @@ -222,9 +217,7 @@ require("libs/gui/gd/gdImageJpeg/presents", 0, 0); require("libs/fs/stat/macros/*", 0, 0); - require("libs/script/gpmi/presents", 0, 0); - if (get("cc/rdynamic") == NULL) put("cc/rdynamic", ""); @@ -239,7 +232,7 @@ put("/local/global_cflags", tmp); } - /* some internal dependencies */ + /* plugin dependencies */ if (!plug_is_buildin("export_ps")) { if (plug_is_enabled("export_lpr")) { report_repeat("WARNING: disabling the lpr exporter because the ps exporter is not enabled as a buildin...\n"); @@ -247,6 +240,15 @@ } } + + if (plug_is_enabled("gpmi")) { + require("libs/script/gpmi/presents", 0, 0); + if (!istrue(get("libs/script/gpmi/presents"))) { + report_repeat("WARNING: disabling the gpmi scripting because libgpmi is not found or not configured...\n"); + hook_custom_arg("disable-gpmi", NULL); + } + } + if (!istrue(get("libs/gui/gd/presents"))) { if (plug_is_enabled("export_nelma")) { report_repeat("WARNING: disabling the nelma exporter because libgd is not found or not configured...\n"); @@ -348,7 +350,7 @@ printf("Generating config.auto.h (%d)\n", generr |= tmpasm("..", "config.auto.h.in", "config.auto.h")); - if (node_istrue("libs/script/gpmi/presents")) + if (plug_is_enabled("gpmi")) gpmi_config(); if (!exists("../config.manual.h")) { @@ -363,18 +365,6 @@ printf("=====================\n\n"); list_presents("GUI hids: batch", gui_list); -/* special case because the "presents" node */ - printf("%-32s", "Scripting via GPMI: "); - if (node_istrue("libs/script/gpmi/presents")) { - printf("yes "); - if (node_istrue("/local/pcb/gpmi/buildin")) - printf("(buildin)\n"); - else - printf("(plugin)\n"); - } - else - printf("no\n"); - #undef plugin_def #undef plugin_header #define plugin_def(name, desc, default_) plugin3_stat(name, desc) Index: trunk/scconfig/plugins.h =================================================================== --- trunk/scconfig/plugins.h (revision 1328) +++ trunk/scconfig/plugins.h (revision 1329) @@ -1,4 +1,5 @@ plugin_header("\nFeature plugins:\n") +plugin_def("gpmi", "GPMI scripting", sbuildin) plugin_def("autoroute", "the original autorouter", sbuildin) plugin_def("toporouter", "topological autorouter", sdisable) plugin_def("autoplace", "auto place components", sbuildin) Index: trunk/src_plugins/gpmi/Plug.tmpasm =================================================================== --- trunk/src_plugins/gpmi/Plug.tmpasm (revision 1328) +++ trunk/src_plugins/gpmi/Plug.tmpasm (revision 1329) @@ -22,8 +22,8 @@ } -if /target/libs/script/gpmi/presents then - if /local/pcb/gpmi/buildin then +switch /local/pcb/gpmi/controls + case {buildin} append /local/pcb/RULES [@ mod_pcb_gpmi: all @@ -47,7 +47,8 @@ @] - else + end + case {plugin} append /local/pcb/all [@ $(PLUGIDIR)/gpmi_plugin.so @] append /local/pcb/RULES [@ @@ -65,6 +66,7 @@ cd $(PCB_GPMI)/gpmi_plugin && make all_plugin @] - - end + end + case {disable} + end end