Index: trunk/Makefile.conf.in =================================================================== --- trunk/Makefile.conf.in (revision 28131) +++ trunk/Makefile.conf.in (revision 28132) @@ -1,3 +1,9 @@ +# calculate the /local/confdir: either specified conf-time or compatibility fallback +switch /local/confdir + case {^$} put /local/confdir_final_m [@@/local/prefix@/share/pcb-rnd@]; end + default put /local/confdir_final_m /local/confdir; end +end + print [@# generated by ./configure, do not modify # Compatibility with autotools on DESTDIR - Debian really wants this @@ -8,9 +14,9 @@ DOCDIR=$(Install_root)@/local/prefix@/share/doc/pcb-rnd LIBDIR=$(Install_root)@/local/prefix@/lib/pcb-rnd BINDIR=$(Install_root)@/local/prefix@/bin -ETCDIR=$(Install_root)/etc DATADIR=$(Install_root)@/local/prefix@/share/pcb-rnd MAN1DIR=$(Install_root)@/local/prefix@@/local/man1dir@ +CONFDIR=$(Install_root)@/local/confdir_final_m@ RM=@/host/fstools/rm@ CP=@/host/fstools/cp@ LN=@/host/fstools/ln@ Index: trunk/config.h.in =================================================================== --- trunk/config.h.in (revision 28131) +++ trunk/config.h.in (revision 28132) @@ -164,6 +164,12 @@ print {\n/* Not available */\n#define TODO(x)\n} end +# calculate the /local/confdir: either specified conf-time or compatibility fallback +switch /local/confdir + case {^$} put /local/confdir_final {PCBSHAREDIR}; end + default put /local/confdir_final [@"@/local/confdir@"@]; end +end + print [@ /* The host "triplet" - it's really a pair now: machine-os */ @@ -200,6 +206,7 @@ #define PCB_PREFIX "@/local/prefix@" #define PCBSHAREDIR PCB_PREFIX "/share/pcb-rnd" #define PCBLIBDIR PCB_PREFIX "/lib/pcb-rnd" +#define PCBCONFDIR @/local/confdir_final@ #define BINDIR PCB_PREFIX "/bin" Index: trunk/scconfig/hooks.c =================================================================== --- trunk/scconfig/hooks.c (revision 28131) +++ trunk/scconfig/hooks.c (revision 28132) @@ -71,6 +71,7 @@ printf(" --workaround-gtk-ctrl enable GTK control key query workaround\n"); printf(" --man1dir=path change installation path of man1 files (under prefix)\n"); printf(" --libarchdir=relpath relative path under prefix for arch-lib-dir (e.g. lib64)\n"); + printf(" --confdir=path change installed conf path (normally matches sharedir)\n"); printf(" --all=plugin enable all working plugins for dynamic load\n"); printf(" --all=buildin enable all working plugins for static link\n"); printf(" --all=disable disable all plugins (compile core only)\n"); @@ -152,6 +153,10 @@ put("/local/libarchdir", value); return 1; } + if (strcmp(key, "confdir") == 0) { + put("/local/confdir", value); + return 1; + } if (strncmp(key, "workaround-", 11) == 0) { const char *what = key+11; if (strcmp(what, "gtk-ctrl") == 0) append("/local/pcb/workaround_defs", "\n#define PCB_WORKAROUND_GTK_CTRL 1"); @@ -310,6 +315,7 @@ put("/local/prefix", "/usr/local"); put("/local/man1dir", "/share/man/man1"); put("/local/libarchdir", "lib"); + put("/local/confdir", ""); #undef plugin_def #undef plugin_header