5 'buildtype=debugoptimized',
9 meson_version : '>= 0.46.0')
11 cc = meson.get_compiler('c')
12 host_system = host_machine.system()
14 version = meson.project_version().split('.')
15 atk_major_version = version[0].to_int()
16 atk_minor_version = version[1].to_int()
17 atk_micro_version = version[2].to_int()
20 atk_binary_age = 10000 * atk_major_version + 100 * atk_minor_version + 10 + atk_micro_version
22 atk_api_version = '1.0'
23 atk_api_name = 'atk-@0@'.format(atk_api_version)
24 atk_api_path = '@0@/atk'.format(atk_api_name)
26 atk_prefix = get_option('prefix')
27 atk_libdir = join_paths(atk_prefix, get_option('libdir'))
28 atk_sysconfdir = join_paths(atk_prefix, get_option('sysconfdir'))
29 atk_includedir = join_paths(atk_prefix, get_option('includedir'))
30 atk_datadir = join_paths(atk_prefix, get_option('datadir'))
31 atk_libexecdir = join_paths(atk_prefix, get_option('libexecdir'))
33 atk_conf = configuration_data()
35 atk_conf.set_quoted('VERSION', meson.project_version())
36 atk_conf.set_quoted('GETTEXT_PACKAGE', 'atk10')
38 # Maintain version scheme with libtool
40 current = atk_binary_age - atk_interface_age
41 atk_libversion = '@0@.@1@.@2@'.format(atk_soversion, current, atk_interface_age)
42 darwin_versions = ['@0@'.format(current + 1), '@0@.@1@'.format(current + 1, atk_interface_age)]
44 add_project_arguments([ '-DG_DISABLE_SINGLE_INCLUDES', '-DATK_DISABLE_SINGLE_INCLUDES' ], language: 'c')
46 if cc.get_id() == 'msvc'
47 add_project_arguments(cc.get_supported_arguments(['-FImsvc_recommended_pragmas.h', '-utf-8']), language: 'c')
50 # Compiler and linker flags
57 if get_option('default_library') != 'static'
58 if host_system == 'windows'
59 atk_conf.set('DLL_EXPORT', true)
60 atk_conf.set('_ATK_EXTERN', '__declspec(dllexport) extern')
61 if cc.get_id() != 'msvc'
62 test_cflags += ['-fvisibility=hidden']
65 atk_conf.set('_ATK_EXTERN', '__attribute__((visibility("default"))) extern')
66 test_cflags += ['-fvisibility=hidden']
70 # Check all compiler flags
71 common_cflags += cc.get_supported_arguments(test_cflags)
74 if host_machine.system() == 'linux'
75 test_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
76 common_ldflags += cc.get_supported_link_arguments(test_ldflags)
79 # Maintain compatibility with autotools on macOS
80 if host_machine.system() == 'darwin'
81 common_ldflags += [ '-compatibility_version', darwin_versions[0], '-current_version', darwin_versions[1]]
86 'bind_textdomain_codeset',
89 foreach f: checked_funcs
91 atk_conf.set('HAVE_' + f.underscorify().to_upper(), 1)
96 glib_req_version = '>= 2.38.0'
98 glib_dep = [dependency('glib-2.0', version: glib_req_version,
99 fallback : ['glib', 'libglib_dep']),
100 dependency('gobject-2.0', version: glib_req_version,
101 fallback : ['glib', 'libgobject_dep'])]
103 pkgconfig = import('pkgconfig')
104 gnome = import('gnome')
106 # Internal configuration header
107 configure_file(output: 'config.h', configuration: atk_conf)
109 root_inc = include_directories('.')
110 atk_inc = include_directories('atk')
116 if get_option('docs')