Index: hooks.c =================================================================== --- hooks.c (revision 34822) +++ hooks.c (revision 34823) @@ -88,6 +88,7 @@ /* Runs after initialization */ int hook_postinit() { + char *tmp; db_mkdir("/local"); db_mkdir("/local/pcb"); @@ -98,12 +99,17 @@ put("/local/pcb/want_static", sfalse); put("/local/pcb/dot_pcb_rnd", ".pcb-rnd"); put("/local/pcb/librnd_prefix", TO_STR(LIBRND_PREFIX)); + put("/local/pcb/librnd_template", tmp = str_concat("", TO_STR(LIBRND_PREFIX), "/", get("/local/libarchdir"), "/librnd/scconfig/template", NULL)); + free(tmp); + + /* if librnd is installed at some custom path, we'll need to have a -I on CFLAGS */ if ((strncasecmp(TO_STR(LIBRND_PREFIX), "/usr/include", 12) != 0) && (strncasecmp(TO_STR(LIBRND_PREFIX), "/usr/local/include", 18) != 0)) { put("/local/pcb/librnd_extra_inc", "-I" TO_STR(LIBRND_PREFIX) "/include"); put("/local/pcb/librnd_extra_ldf", "-L" TO_STR(LIBRND_PREFIX) "/lib"); } + return 0; }