Commit e55587f4cfe50e12ca6feafe1fbbb9250bfaa90c

Peter Hutterer 2020-07-08T09:12:23

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>

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)
 {