forked from ariadne/pkgconf
Compare commits
5 Commits
5ba74dec93
...
dd779ad9f8
Author | SHA1 | Date |
---|---|---|
Dylan Baker | dd779ad9f8 | |
Dylan Baker | c04097e491 | |
Dylan Baker | 06fe2e23b0 | |
Dylan Baker | 1f993bc095 | |
Dylan Baker | f947af057f |
28
meson.build
28
meson.build
|
@ -19,18 +19,18 @@ add_project_arguments(
|
|||
cdata = configuration_data()
|
||||
|
||||
check_functions = [
|
||||
['HAVE_STRLCAT', 'strlcat', 'string.h'],
|
||||
['HAVE_STRLCPY', 'strlcpy', 'string.h'],
|
||||
['HAVE_STRNDUP', 'strndup', 'string.h'],
|
||||
['HAVE_STRDUP', 'strdup', 'string.h'],
|
||||
['HAVE_STRNCASECMP', 'strncasecmp', 'strings.h'],
|
||||
['HAVE_STRCASECMP', 'strcasecmp', 'strings.h'],
|
||||
['HAVE_REALLOCARRAY', 'reallocarray', 'stdlib.h'],
|
||||
['strlcat', 'string.h'],
|
||||
['strlcpy', 'string.h'],
|
||||
['strndup', 'string.h'],
|
||||
['strdup', 'string.h'],
|
||||
['strncasecmp', 'strings.h'],
|
||||
['strcasecmp', 'strings.h'],
|
||||
['reallocarray', 'stdlib.h'],
|
||||
]
|
||||
|
||||
foreach f : check_functions
|
||||
if cc.has_function(f[1], prefix : '#define _BSD_SOURCE\n#include <' + f[2] + '>') and cc.has_header_symbol(f[2], f[1], prefix : '#define _BSD_SOURCE')
|
||||
cdata.set(f[0], 1)
|
||||
if cc.has_function(f[0], prefix : '#define _BSD_SOURCE\n#include <@0@>'.format(f[1])) and cc.has_header_symbol(f[1], f[0], prefix : '#define _BSD_SOURCE')
|
||||
cdata.set('HAVE_@0@'.format(f[0].to_upper().underscorify()), 1)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
@ -51,8 +51,8 @@ cdata.set_quoted('PERSONALITY_PATH', ':'.join(personality_path))
|
|||
cdata.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||
cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
cdata.set_quoted('PACKAGE_BUGREPORT', 'https://todo.sr.ht/~kaniini/pkgconf')
|
||||
cdata.set('abs_top_srcdir', meson.source_root())
|
||||
cdata.set('abs_top_builddir', meson.build_root())
|
||||
cdata.set('abs_top_srcdir', meson.current_source_dir())
|
||||
cdata.set('abs_top_builddir', meson.current_build_dir())
|
||||
|
||||
|
||||
subdir('libpkgconf')
|
||||
|
@ -119,10 +119,8 @@ pkgconf_exe = executable('pkgconf',
|
|||
if get_option('tests')
|
||||
kyua_exe = find_program('kyua')
|
||||
atf_sh_exe = find_program('atf-sh')
|
||||
test('kyua', kyua_exe, args : ['--config=none', 'test', '--kyuafile=' + join_paths(meson.build_root(), 'Kyuafile'), '--build-root=' + meson.build_root()])
|
||||
|
||||
|
||||
configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata)
|
||||
kyuafile = configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata)
|
||||
test('kyua', kyua_exe, args : ['--config=none', 'test', '--kyuafile', kyuafile, '--build-root', meson.current_build_dir()])
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
|
|
|
@ -18,6 +18,6 @@ tests = [
|
|||
|
||||
# yuck
|
||||
foreach test : tests
|
||||
configure_file(input: test + '.sh', output: test, copy: true)
|
||||
run_command('chmod', '755', join_paths(meson.build_root(), 'tests', test))
|
||||
test_file = configure_file(input: test + '.sh', output: test, copy: true)
|
||||
run_command('chmod', '755', test_file, check : true)
|
||||
endforeach
|
||||
|
|
Loading…
Reference in New Issue