meson.build: always set the default variants/options Make this more balanced with the rules/layouts so we can rely on that #define to exist. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/meson.build b/meson.build
index 52aeafd..9645abb 100644
--- a/meson.build
+++ b/meson.build
@@ -77,9 +77,13 @@ configh_data.set_quoted('DEFAULT_XKB_MODEL', get_option('default-model'))
configh_data.set_quoted('DEFAULT_XKB_LAYOUT', get_option('default-layout'))
if get_option('default-variant') != ''
configh_data.set_quoted('DEFAULT_XKB_VARIANT', get_option('default-variant'))
+else
+ configh_data.set('DEFAULT_XKB_VARIANT', 'NULL')
endif
if get_option('default-options') != ''
configh_data.set_quoted('DEFAULT_XKB_OPTIONS', get_option('default-options'))
+else
+ configh_data.set('DEFAULT_XKB_OPTIONS', 'NULL')
endif
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
configh_data.set('HAVE___BUILTIN_EXPECT', 1)
diff --git a/src/context-priv.c b/src/context-priv.c
index 3c15440..8eaa579 100644
--- a/src/context-priv.c
+++ b/src/context-priv.c
@@ -99,14 +99,6 @@ xkb_context_get_buffer(struct xkb_context *ctx, size_t size)
return rtrn;
}
-#ifndef DEFAULT_XKB_VARIANT
-#define DEFAULT_XKB_VARIANT NULL
-#endif
-
-#ifndef DEFAULT_XKB_OPTIONS
-#define DEFAULT_XKB_OPTIONS NULL
-#endif
-
static const char *
xkb_context_get_default_rules(struct xkb_context *ctx)
{