Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. diff --git a/meson.build b/meson.build
  2. index 6e1ca7628b..fc7e769a48 100644
  3. --- a/meson.build
  4. +++ b/meson.build
  5. @@ -884,9 +884,9 @@ check_types = [
  6. ['clGetDeviceIDsFromD3D11KHR_fn', ['CL/cl_d3d11.h'],
  7. {'preconditions': ['d3d11va', 'opencl']}],
  8. ['struct addrinfo', ['netdb.h']],
  9. - ['struct group_source_req', ['netinet/in.h']],
  10. - ['struct ip_mreq_source', ['netinet/in.h']],
  11. - ['struct ipv6_mreq', ['netinet/in.h']],
  12. + ['struct group_source_req', ['netinet/in.h'], {'c_args': ['-D_BSD_SOURCE']}],
  13. + ['struct ip_mreq_source', ['netinet/in.h'], {'c_args': ['-D_BSD_SOURCE']}],
  14. + ['struct ipv6_mreq', ['netinet/in.h'], {'c_args': ['-D_DARWIN_C_SOURCE']}],
  15. ['struct pollfd', ['poll.h']],
  16. ['struct sctp_event_subscribe', ['netinet/sctp.h']],
  17. ['struct sockaddr_in6', ['netinet/in.h']],
  18. @@ -1348,7 +1348,7 @@ conf.set('os2threads', 0)
  19. conf.set10('bigendian', host_machine.endian() == 'big')
  20. conf.set10('fast_unaligned', ['x86', 'x86_64', 'aarch', 'ppc'].contains(host_machine.cpu_family()))
  21.  
  22. -if host_machine.system() == 'linux'
  23. +if host_machine.system() == 'linux' or host_machine.system() == 'darwin'
  24. conf.set10('pthreads', thread_dep.found())
  25. conf.set('section_data_rel_ro', 1)
  26. elif host_machine.system() == 'windows'
  27. @@ -1570,6 +1570,13 @@ if host_machine.system() == 'windows'
  28. else
  29. asm_format = 'win32'
  30. endif
  31. +elif host_machine.system() == 'darwin'
  32. + if conf.get('x86_64') == 1
  33. + asm_format = 'macho64'
  34. + else
  35. + asm_format = 'macho32'
  36. + endif
  37. + add_project_arguments(cc.get_supported_arguments(['-mdynamic-no-pic']), language: 'c')
  38. else
  39. if conf.get('x86_64') == 1
  40. asm_format = 'elf64'
  41. @@ -1578,9 +1585,15 @@ else
  42. endif
  43. endif
  44.  
  45. +extern_prefix = cc.symbols_have_underscore_prefix() ? '_' : ''
  46. +
  47. asm_args = ['-DPIC', '-g']
  48. asm_inc = join_paths(meson.current_source_dir(), 'libavutil/x86/')
  49.  
  50. +if extern_prefix != ''
  51. + asm_args += ['-DPREFIX']
  52. +endif
  53. +
  54. extern_things = [
  55. ['AVOutputFormat', 'muxer', 'libavformat/allformats.c', 'muxer_list'],
  56. ['AVInputFormat', 'demuxer', 'libavformat/allformats.c', 'demuxer_list'],
  57. @@ -2022,7 +2035,7 @@ final_conf.set_quoted('SLIBSUF', host_machine.system() == 'windows' ? '.dll' : '
  58. final_conf.set('HAVE_MMX2', conf.get('mmxext'))
  59. final_conf.set('SWS_MAX_FILTER_SIZE', 256)
  60. final_conf.set('EXTERN_ASM', true)
  61. -final_conf.set_quoted('EXTERN_PREFIX', '')
  62. +final_conf.set_quoted('EXTERN_PREFIX', extern_prefix)
  63.  
  64. foreach restrict_kw : ['restrict', '__restrict__', '__restrict', '']
  65. 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