meson.build: always set the default variants/options
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 7 Jul 2020 23:12:23 +0000 (09:12 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 8 Jul 2020 05:21:19 +0000 (15:21 +1000)
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>
meson.build
src/context-priv.c

index 52aeafd..9645abb 100644 (file)
@@ -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)
index 3c15440..8eaa579 100644 (file)
@@ -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)
 {