Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/meson.build b/meson.build
- index 6e1ca7628b..fc7e769a48 100644
- --- a/meson.build
- +++ b/meson.build
- @@ -884,9 +884,9 @@ check_types = [
- ['clGetDeviceIDsFromD3D11KHR_fn', ['CL/cl_d3d11.h'],
- {'preconditions': ['d3d11va', 'opencl']}],
- ['struct addrinfo', ['netdb.h']],
- - ['struct group_source_req', ['netinet/in.h']],
- - ['struct ip_mreq_source', ['netinet/in.h']],
- - ['struct ipv6_mreq', ['netinet/in.h']],
- + ['struct group_source_req', ['netinet/in.h'], {'c_args': ['-D_BSD_SOURCE']}],
- + ['struct ip_mreq_source', ['netinet/in.h'], {'c_args': ['-D_BSD_SOURCE']}],
- + ['struct ipv6_mreq', ['netinet/in.h'], {'c_args': ['-D_DARWIN_C_SOURCE']}],
- ['struct pollfd', ['poll.h']],
- ['struct sctp_event_subscribe', ['netinet/sctp.h']],
- ['struct sockaddr_in6', ['netinet/in.h']],
- @@ -1348,7 +1348,7 @@ conf.set('os2threads', 0)
- conf.set10('bigendian', host_machine.endian() == 'big')
- conf.set10('fast_unaligned', ['x86', 'x86_64', 'aarch', 'ppc'].contains(host_machine.cpu_family()))
- -if host_machine.system() == 'linux'
- +if host_machine.system() == 'linux' or host_machine.system() == 'darwin'
- conf.set10('pthreads', thread_dep.found())
- conf.set('section_data_rel_ro', 1)
- elif host_machine.system() == 'windows'
- @@ -1570,6 +1570,13 @@ if host_machine.system() == 'windows'
- else
- asm_format = 'win32'
- endif
- +elif host_machine.system() == 'darwin'
- + if conf.get('x86_64') == 1
- + asm_format = 'macho64'
- + else
- + asm_format = 'macho32'
- + endif
- + add_project_arguments(cc.get_supported_arguments(['-mdynamic-no-pic']), language: 'c')
- else
- if conf.get('x86_64') == 1
- asm_format = 'elf64'
- @@ -1578,9 +1585,15 @@ else
- endif
- endif
- +extern_prefix = cc.symbols_have_underscore_prefix() ? '_' : ''
- +
- asm_args = ['-DPIC', '-g']
- asm_inc = join_paths(meson.current_source_dir(), 'libavutil/x86/')
- +if extern_prefix != ''
- + asm_args += ['-DPREFIX']
- +endif
- +
- extern_things = [
- ['AVOutputFormat', 'muxer', 'libavformat/allformats.c', 'muxer_list'],
- ['AVInputFormat', 'demuxer', 'libavformat/allformats.c', 'demuxer_list'],
- @@ -2022,7 +2035,7 @@ final_conf.set_quoted('SLIBSUF', host_machine.system() == 'windows' ? '.dll' : '
- final_conf.set('HAVE_MMX2', conf.get('mmxext'))
- final_conf.set('SWS_MAX_FILTER_SIZE', 256)
- final_conf.set('EXTERN_ASM', true)
- -final_conf.set_quoted('EXTERN_PREFIX', '')
- +final_conf.set_quoted('EXTERN_PREFIX', extern_prefix)
- foreach restrict_kw : ['restrict', '__restrict__', '__restrict', '']
- if not final_conf.has('av_restrict') and cc.compiles('void foo(char * @0@ p);'.format(restrict_kw))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement