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>
master
Peter Hutterer 2020-07-08 09:12:23 +10:00
parent afb26e7df9
commit e55587f4cf
2 changed files with 4 additions and 8 deletions

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

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