From: Michael Vogt Date: Fri, 17 Jul 2015 18:59:52 +0000 (+0200) Subject: Add XKB_CONFIG_ROOT environment X-Git-Tag: xkbcommon-0.6.0~32^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ea129fbfbd2674094e40e869220364802aec248;p=platform%2Fupstream%2Flibxkbcommon.git Add XKB_CONFIG_ROOT environment The XKB_CONFIG_ROOT environment allows overrding the build time DFLT_XKB_CONFIG_ROOT path. --- diff --git a/src/context.c b/src/context.c index e9c52eb..50993e1 100644 --- a/src/context.c +++ b/src/context.c @@ -75,12 +75,16 @@ err: XKB_EXPORT int xkb_context_include_path_append_default(struct xkb_context *ctx) { - const char *home; + const char *home, *root; char *user_path; int err; int ret = 0; - ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT); + root = secure_getenv("XKB_CONFIG_ROOT"); + if (root != NULL) + ret |= xkb_context_include_path_append(ctx, root); + else + ret |= xkb_context_include_path_append(ctx, DFLT_XKB_CONFIG_ROOT); home = secure_getenv("HOME"); if (!home)