Index: scconfig/hooks.c =================================================================== --- scconfig/hooks.c (revision 478) +++ scconfig/hooks.c (revision 479) @@ -16,10 +16,15 @@ int hook_custom_arg(const char *key, const char *value) { static const arg_auto_set_t disable_libs[] = { /* list of --disable-LIBs and the subtree they affect */ - {"disable-gtk", "libs/gui/gtk2", arg_lib_nodes}, - {"disable-lesstif", "libs/gui/lesstif2", arg_lib_nodes}, - {"disable-xrender", "libs/gui/xrender", arg_lib_nodes}, - {"disable-xinerama", "libs/gui/xinerama", arg_lib_nodes}, + {"disable-gtk", "libs/gui/gtk2", arg_lib_nodes}, + {"disable-lesstif", "libs/gui/lesstif2", arg_lib_nodes}, + {"disable-xrender", "libs/gui/xrender", arg_lib_nodes}, + {"disable-xinerama", "libs/gui/xinerama", arg_lib_nodes}, + {"disable-gd", "libs/gui/gd", arg_lib_nodes}, + {"disable-gd-gif", "libs/gui/gd/gdImageGif", arg_lib_nodes}, + {"disable-gd-png", "libs/gui/gd/gdImagePng", arg_lib_nodes}, + {"disable-gd-jpg", "libs/gui/gd/gdImageJpeg", arg_lib_nodes}, + {NULL, NULL, NULL} }; @@ -72,9 +77,16 @@ } /* for the exporters */ - /* TODO: make this optional */ - require("libs/gui/gd", 0, 1); + require("libs/gui/gd/presents", 0, 0); + if (!istrue(get("libs/gui/gd/presents"))) { + report("Since there's no libgd, disabling raster output formats...\n"); + hook_custom_arg("disable-gd-gif", NULL); + hook_custom_arg("disable-gd-png", NULL); + hook_custom_arg("disable-gd-jpg", NULL); + } + + /* for core, the toporouter and gsch2pcb: */ require("libs/sul/glib", 0, 1); @@ -97,9 +109,9 @@ require("libs/math/expf", 0, 0); require("libs/math/logf", 0, 0); require("libs/script/m4/bin/*", 0, 0); - require("libs/gui/gd/gdImagePng/*", 0, 0); - require("libs/gui/gd/gdImageGif/*", 0, 0); - require("libs/gui/gd/gdImageJpeg/*", 0, 0); + require("libs/gui/gd/gdImagePng/presents", 0, 0); + require("libs/gui/gd/gdImageGif/presents", 0, 0); + require("libs/gui/gd/gdImageJpeg/presents", 0, 0); require("libs/fs/stat/macros/*", 0, 0); return 0; Index: src/Makefile.in.mod/gcode =================================================================== --- src/Makefile.in.mod/gcode (revision 478) +++ src/Makefile.in.mod/gcode (revision 479) @@ -1,3 +1,5 @@ +if /target/libs/gui/gd/presents then + append /local/pcb/HIDS {gcode} append /local/pcb/CFLAGS {-I./hid/gcode} append /local/pcb/OBJS [@ @@ -9,4 +11,4 @@ append /local/pcb/ACTION_REG_SRC {hid/gcode/gcode.c hid/gcode/hid.conf} - +end Index: src/Makefile.in.mod/nelma =================================================================== --- src/Makefile.in.mod/nelma (revision 478) +++ src/Makefile.in.mod/nelma (revision 479) @@ -1,4 +1,7 @@ +if /target/libs/gui/gd/presents then append /local/pcb/HIDS {nelma} append /local/pcb/CFLAGS {-I./hid/nelma} append /local/pcb/OBJS {hid/nelma/nelma.o} append /local/pcb/ACTION_REG_SRC {hid/nelma/nelma.c hid/nelma/hid.conf} +end + Index: src/Makefile.in.mod/png =================================================================== --- src/Makefile.in.mod/png (revision 478) +++ src/Makefile.in.mod/png (revision 479) @@ -1,3 +1,4 @@ +if /target/libs/gui/gd/presents then append /local/pcb/HIDS {png} append /local/pcb/CFLAGS {-I./hid/png} append /local/pcb/LIBS libs/gui/gd/cflags @@ -4,3 +5,4 @@ append /local/pcb/OBJS {hid/png/png.o} append /local/pcb/LIBS libs/gui/gd/ldflags append /local/pcb/ACTION_REG_SRC {hid/png/png.c hid/png/hid.conf} +end