Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 24291) +++ trunk/scconfig/Rev.h (revision 24292) @@ -1 +1 @@ -static const int myrev = 24288; +static const int myrev = 24292; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 24291) +++ trunk/scconfig/Rev.tab (revision 24292) @@ -1,4 +1,4 @@ -24288 configure preparing for hidlib, splitting source files, scconfig hidlib deps +24292 configure preparing for hidlib, splitting source files, scconfig hidlib deps 23917 configure compound DAD widgets, for DAD based spinboxes 23902 configure cleanup: remove dead code from gtk 23857 configure new, centralized log dialog Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 24291) +++ trunk/scconfig/hooks.c (revision 24292) @@ -19,6 +19,17 @@ int want_coord_bits; +/* if any of these are enabled, we need the dialog plugin; dialog can not be + a pup dep because it must be omitted from the hidlib */ +const char *dialog_deps[] = { + "/local/pcb/dialogs/controls", /* so we don't relax user's explicit request */ + "/local/pcb/hid_remote/controls", + "/local/pcb/lib_gtk_common/controls", + "/local/pcb/hid_lesstif/controls", + NULL +}; + + const arg_auto_set_t disable_libs[] = { /* list of --disable-LIBs and the subtree they affect */ {"disable-xrender", "libs/gui/xrender", arg_lib_nodes, "$do not use xrender for lesstif"}, {"disable-xinerama", "libs/gui/xinerama", arg_lib_nodes, "$do not use xinerama for lesstif"}, @@ -375,6 +386,27 @@ return atoi(s); } + /* figure if we need the dialogs plugin */ +static void calc_dialog_deps(void) +{ + int buildin = 0, plugin = 0; + const char **p; + for(p = dialog_deps; *p != NULL; p++) { + const char *st = get(*p); + printf("********** %s -> %s\n", *p, st); + if (strcmp(st, "buildin") == 0) { + buildin = 1; + break; + } + if (strcmp(st, "plugin") == 0) + plugin = 1; + } + if (buildin) + hook_custom_arg("buildin-dialogs", NULL); + else if (plugin) + hook_custom_arg("plugin-dialogs", NULL); +} + /* Runs when things should be detected for the target system */ int hook_detect_target() { @@ -624,7 +656,6 @@ hook_custom_arg("disable-xrender", NULL); } - if (want_gtk) want_glib = 1; @@ -659,6 +690,8 @@ put("libs/sul/glib/ldflags", ""); } + calc_dialog_deps(); + if (want_gd) { require("libs/gui/gd/presents", 0, 0); if (!istrue(get("libs/gui/gd/presents"))) { Index: trunk/scconfig/plugins.h =================================================================== --- trunk/scconfig/plugins.h (revision 24291) +++ trunk/scconfig/plugins.h (revision 24292) @@ -148,7 +148,6 @@ plugin_dep("hid_gtk2_gl", "lib_hid_gl", 0) plugin_dep("hid_gtk3_cairo", "lib_gtk_common", 0) plugin_dep("hid_gtk3_cairo", "lib_gtk_hid", 0) -plugin_dep("hid_lesstif", "dialogs", 0) plugin_dep("hid_lesstif", "lib_hid_common", 0) plugin_dep("import_dsn", "lib_compat_help", 0) plugin_dep("import_ipcd356", "lib_compat_help", 0) @@ -163,8 +162,6 @@ plugin_dep("io_pcb", "lib_compat_help", 0) plugin_dep("io_tedax", "lib_compat_help", 0) plugin_dep("io_tedax", "lib_netmap", 0) -plugin_dep("lib_gtk_common", "dialogs", 0) -plugin_dep("lib_gtk_hid", "dialogs", 0) plugin_dep("lib_gtk_hid", "lib_hid_common", 0) plugin_dep("lib_vfs", "propedit", 0) plugin_dep("millpath", "lib_polyhelp", 0) Index: trunk/src_plugins/hid_lesstif/hid_lesstif.pup =================================================================== --- trunk/src_plugins/hid_lesstif/hid_lesstif.pup (revision 24291) +++ trunk/src_plugins/hid_lesstif/hid_lesstif.pup (revision 24292) @@ -5,5 +5,4 @@ $package hid-lesstif default buildin dep lib_hid_common -dep dialogs autoload 1 Index: trunk/src_plugins/lib_gtk_common/lib_gtk_common.pup =================================================================== --- trunk/src_plugins/lib_gtk_common/lib_gtk_common.pup (revision 24291) +++ trunk/src_plugins/lib_gtk_common/lib_gtk_common.pup (revision 24292) @@ -3,6 +3,5 @@ $long hid_gtk* common code (regardless of gtk version or drawing mechanism: for both gtk2 and gtk3 and for both sw rendering and gl) $state works $package lib-gtk -dep dialogs default disable-all Index: trunk/src_plugins/lib_gtk_hid/lib_gtk_hid.pup =================================================================== --- trunk/src_plugins/lib_gtk_hid/lib_gtk_hid.pup (revision 24291) +++ trunk/src_plugins/lib_gtk_hid/lib_gtk_hid.pup (revision 24292) @@ -5,4 +5,3 @@ $package lib-gtk default disable-all dep lib_hid_common -dep dialogs