meson: Fix build of padsp
[platform/upstream/pulseaudio.git] / meson.build
1 project('pulseaudio', 'c', 'cpp',
2         version : run_command(find_program('git-version-gen'), join_paths(meson.current_source_dir(), '.tarball-version')).stdout().strip(),
3         meson_version : '>= 0.50.0',
4         default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
5         )
6
7 pa_version_str = meson.project_version()
8 # For tarballs, the first split will do nothing, but for builds in git, we
9 # split out suffixes when there are commits since the last tag
10 # (e.g.: v11.99.1-3-gad14bdb24 -> v11.99.1)
11 version_split = pa_version_str.split('-')[0].split('.')
12 pa_version_major = version_split[0].split('v')[0]
13 pa_version_minor = version_split[1]
14 if version_split.length() > 2
15   pa_version_micro = version_split[2]
16 else
17   pa_version_micro = '0'
18 endif
19 pa_version_major_minor = pa_version_major + '.' + pa_version_minor
20
21 pa_api_version = 12
22 pa_protocol_version = 33
23
24 apiversion = '1.0'
25 soversion = 0
26 # FIXME: this doesn't actually do what we want it to
27 # maintaining compatibility with the previous libtool versioning
28 # current = minor * 100 + micro
29 libversion = '@0@.@1@.0'.format(soversion, pa_version_minor.to_int() * 100 + pa_version_micro.to_int())
30
31 # A simplified, synchronous, ABI-stable interface for client applications.
32 # For the version x:y:z always will hold y=z.
33 libpulse_simple_version = '1.1.1'
34
35 # The ABI-stable GLib adapter for client applications.
36 # For the version x:y:z always will hold y=z.
37 libpulse_mainloop_glib_version = '0.5.0'
38
39 # Paths
40
41 prefix = get_option('prefix')
42 assert(prefix.startswith('/'), 'Prefix is not absolute: "@0@"'.format(prefix))
43
44 bindir = join_paths(prefix, get_option('bindir'))
45 includedir = join_paths(prefix, get_option('includedir'))
46 libdir = join_paths(prefix, get_option('libdir'))
47 libexecdir = join_paths(prefix, get_option('libexecdir'))
48 mandir = join_paths(prefix, get_option('mandir'))
49 datadir = join_paths(prefix, get_option('datadir'))
50 localedir = join_paths(prefix, get_option('localedir'))
51 localstatedir = join_paths(prefix, get_option('localstatedir'))
52 sysconfdir = join_paths(prefix, get_option('sysconfdir'))
53 privlibdir = join_paths(libdir, 'pulseaudio')
54 alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer')
55
56 pkgconfigdir = join_paths(libdir, 'pkgconfig')
57 pulselibexecdir = join_paths(libexecdir, 'pulse')
58 pulsesysconfdir = join_paths(sysconfdir, 'pulse')
59
60 modlibexecdir = get_option('modlibexecdir')
61 if modlibexecdir == ''
62   modlibexecdir = join_paths(libdir, 'pulse-' + pa_version_major_minor, 'modules')
63 endif
64
65 padsplibdir = get_option('padsplibdir')
66 if padsplibdir == ''
67   padsplibdir = privlibdir
68 endif
69
70 pulsedsp_location = get_option('pulsedsp-location')
71 if pulsedsp_location == ''
72   pulsedsp_location = join_paths(prefix, padsplibdir)
73 endif
74
75 systemduserunitdir = get_option('systemduserunitdir')
76 # the default value is set below
77
78 udevrulesdir = get_option('udevrulesdir')
79 if udevrulesdir == ''
80   # absolute path, otherwise meson prepends the prefix
81   udevrulesdir = '/lib/udev/rules.d'
82 endif
83
84 vapidir = join_paths(datadir, 'vala', 'vapi')
85
86 bashcompletiondir = get_option('bashcompletiondir')
87 if bashcompletiondir == ''
88   bash_completion_dep = dependency('bash-completion', required : false)
89   if bash_completion_dep.found()
90     bashcompletiondir = bash_completion_dep.get_pkgconfig_variable('completionsdir')
91   else
92     bashcompletiondir = join_paths(datadir, 'bash-completion', 'completions')
93   endif
94 endif
95
96 zshcompletiondir = get_option('zshcompletiondir')
97 if zshcompletiondir == ''
98   zshcompletiondir = join_paths(datadir, 'zsh', 'site-functions')
99 endif
100
101 # Configuration data
102
103 cc = meson.get_compiler('c')
104
105 cdata = configuration_data()
106 cdata.set_quoted('PACKAGE', 'pulseaudio')
107 cdata.set_quoted('PACKAGE_NAME', 'pulseaudio')
108 cdata.set_quoted('PACKAGE_VERSION', pa_version_str)
109 cdata.set_quoted('CANONICAL_HOST', host_machine.cpu())
110 cdata.set('PA_MAJOR', pa_version_major)
111 cdata.set('PA_MINOR', pa_version_minor)
112 cdata.set('PA_API_VERSION', pa_api_version)
113 cdata.set('PA_PROTOCOL_VERSION', pa_protocol_version)
114 cdata.set_quoted('PA_MACHINE_ID', join_paths(sysconfdir, 'machine-id'))
115 cdata.set_quoted('PA_MACHINE_ID_FALLBACK', join_paths(localstatedir, 'lib', 'dbus', 'machine-id'))
116 cdata.set_quoted('PA_SRCDIR', join_paths(meson.current_source_dir(), 'src'))
117 cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir())
118 cdata.set_quoted('PA_SOEXT', '.so')
119 cdata.set_quoted('PA_DEFAULT_CONFIG_DIR', pulsesysconfdir)
120 cdata.set_quoted('PA_BINARY', join_paths(bindir, 'pulseaudio'))
121 cdata.set_quoted('PA_SYSTEM_RUNTIME_PATH', join_paths(localstatedir, 'run', 'pulse'))
122 cdata.set_quoted('PA_SYSTEM_CONFIG_PATH', join_paths(localstatedir, 'lib', 'pulse'))
123 cdata.set_quoted('PA_SYSTEM_STATE_PATH', join_paths(localstatedir, 'lib', 'pulse'))
124 cdata.set_quoted('PA_DLSEARCHPATH', modlibexecdir)
125 cdata.set_quoted('PA_SYSTEM_USER', get_option('system_user'))
126 cdata.set_quoted('PA_SYSTEM_GROUP', get_option('system_group'))
127 cdata.set_quoted('PA_ACCESS_GROUP', get_option('access_group'))
128 cdata.set_quoted('PA_CFLAGS', 'Not yet supported on meson')
129 cdata.set_quoted('PA_ALSA_PATHS_DIR', join_paths(alsadatadir, 'paths'))
130 cdata.set_quoted('PA_ALSA_PROFILE_SETS_DIR', join_paths(alsadatadir, 'profile-sets'))
131 cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 'applications'))
132 cdata.set_quoted('PULSE_LOCALEDIR', localedir)
133 cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio')
134 cdata.set('ENABLE_NLS', 1)
135
136 # Platform specifics
137 # First some defaults to keep config file generation happy
138 cdata.set('HAVE_COREAUDIO', 0)
139 cdata.set('HAVE_WAVEOUT', 0)
140 # FIXME: This was not tested. Maybe some flags should better be CFLAGS,
141 # rather than ending up in the config.h file?
142 if host_machine.system() == 'darwin'
143   cdata.set('OS_IS_DARWIN', 1)
144   cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS
145 elif host_machine.system() == 'windows'
146   cdata.set('OS_IS_WIN32', 1)
147   cdata.set('WIN32_LEAN_AND_MEAN', 1) # Needed to avoid including unnecessary headers on Windows
148 #elif host_machine.system() == 'solaris'
149 #  # Apparently meson has no solaris support?
150 #  # Needed to get declarations for msg_control and msg_controllen on Solaris
151 #  cdata.set('_XOPEN_SOURCE', 600)
152 #  cdata.set('__EXTENSIONS__', 1)
153 endif
154
155 # Headers
156
157 check_headers = [
158   'arpa/inet.h',
159   'cpuid.h',
160   'execinfo.h',
161   'grp.h',
162   'langinfo.h',
163   'locale.h',
164   'netdb.h',
165   'netinet/in.h',
166   'netinet/in_systm.h',
167   'netinet/ip.h',
168   'netinet/tcp.h',
169   'pcreposix.h',
170   'poll.h',
171   'pwd.h',
172   'regex.h',
173   'sched.h',
174   'sys/capability.h',
175   'sys/eventfd.h',
176   'sys/ioctl.h',
177   'sys/filio.h',
178   'sys/mman.h',
179   'sys/prctl.h',
180   'sys/resource.h',
181   'sys/select.h',
182   'sys/socket.h',
183   'sys/un.h',
184   'sys/wait.h',
185   'valgrind/memcheck.h',
186   'xlocale.h',
187 ]
188
189 foreach h : check_headers
190   if cc.has_header(h)
191     define = 'HAVE_' + h.underscorify().to_upper()
192     cdata.set(define, 1)
193   endif
194 endforeach
195
196 # FIXME: move this to the above set
197 if cc.has_header('pthread.h')
198   cdata.set('HAVE_PTHREAD', 1)
199 endif
200
201 # Functions
202
203 check_functions = [
204   'accept4',
205   'clock_gettime',
206   'fchmod',
207   'fchown',
208   'fork',
209   'fstat',
210   'getaddrinfo',
211   'getgrgid_r',
212   'getpwnam_r',
213   'gettimeofday',
214   'getuid',
215   'lstat',
216   'memfd_create',
217   'mkfifo',
218   'mlock',
219   'nanosleep',
220   'paccept',
221   'pipe',
222   'pipe2',
223   'posix_madvise',
224   'readlink',
225   'setegid',
226   'seteuid',
227   'setregid',
228   'setreuid',
229   'setresgid',
230   'setresuid',
231   'setsid',
232   'sig2str',
233   'sigaction',
234   'strtod_l',
235   'symlink',
236   'sysconf',
237   'uname',
238 ]
239
240 foreach f : check_functions
241   if cc.has_function(f)
242     define = 'HAVE_' + f.underscorify().to_upper()
243     cdata.set(define, 1)
244   endif
245 endforeach
246
247 if cc.has_function('SYS_memfd_create', prefix : '#include <sys/syscall.h>')
248   cdata.set('HAVE_MEMFD', 1)
249 endif
250
251 # Symbols
252
253 if cc.has_header_symbol('signal.h', 'SIGXCPU')
254   cdata.set('HAVE_SIGXCPU', 1)
255 endif
256
257 if not cc.has_header_symbol('netinet/in.h', 'INADDR_NONE')
258   if not cc.has_header_symbol('winsock2.h', 'INADDR_NONE')
259     # Define INADDR_NONE if not found (Solaris)
260     cdata.set('INADDR_NONE', '0xffffffff')
261   endif
262 endif
263
264 # Types
265
266 # FIXME: do we ever care about gid_t not being defined / smaller than an int?
267 cdata.set('GETGROUPS_T', 'gid_t')
268
269 # Include paths
270
271 configinc = include_directories('.')
272 topinc = include_directories('src')
273
274 # CFLAGS
275
276 pa_c_args = ['-DHAVE_CONFIG_H', '-D_GNU_SOURCE']
277 server_c_args = ['-D__INCLUDED_FROM_PULSE_AUDIO']
278 cdata.set('MESON_BUILD', 1)
279
280 # Code coverage
281
282 if get_option('gcov')
283   add_project_arguments('--coverage', language: ['c', 'cpp'])
284   add_project_link_arguments('--coverage', language: ['c', 'cpp'])
285 endif
286
287 # Core Dependencies
288
289 libm_dep = cc.find_library('m', required : true)
290 thread_dep = dependency('threads')
291 cap_dep = cc.find_library('cap', required : false)
292
293 shm_dep = cc.find_library('rt', required : false)
294 if shm_dep.found()
295   cdata.set('HAVE_SHM_OPEN', 1)
296 endif
297
298
299 atomictest = '''void func() {
300   volatile int atomic = 2;
301   __sync_bool_compare_and_swap (&atomic, 2, 3);
302 }
303 '''
304 if cc.compiles(atomictest)
305   newatomictest = '''void func() {
306     int c = 0;
307     __atomic_store_n(&c, 4, __ATOMIC_SEQ_CST);
308   }
309   '''
310
311   if(cc.compiles(newatomictest))
312     cdata.set('HAVE_ATOMIC_BUILTINS_MEMORY_MODEL', true)
313   endif
314
315   cdata.set('HAVE_ATOMIC_BUILTINS', true)
316 else
317   # FIXME: check if we need libatomic_ops
318 endif
319
320 # FIXME: make sure it's >= 2.2
321 ltdl_dep = cc.find_library('ltdl', required : true)
322 # FIXME: can meson support libtool -dlopen/-dlpreopen things?
323 #        and do we still want to support this at all?
324 cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
325
326 if get_option('database') == 'tdb'
327   database_dep = dependency('tdb')
328 elif get_option('database') == 'gdbm'
329   database_dep = cc.find_library('gdbm', required : true)
330 else
331   database_dep = dependency('', required: false)
332 endif
333
334 if get_option('ipv6')
335   cdata.set('HAVE_IPV6', 1)
336 endif
337
338 if get_option('legacy-database-entry-format')
339   cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
340 endif
341
342 if get_option('running-from-build-tree')
343   cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
344 endif
345
346 alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
347 if alsa_dep.found()
348   cdata.set('HAVE_ALSA', 1)
349   cdata.set('HAVE_ALSA_UCM', 1)
350 endif
351
352 asyncns_dep = dependency('libasyncns', version : '>= 0.1', required : get_option('asyncns'))
353 if asyncns_dep.found()
354   cdata.set('HAVE_LIBASYNCNS', 1)
355 endif
356
357 dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus'))
358 if dbus_dep.found()
359   cdata.set('HAVE_DBUS', 1)
360 endif
361
362 gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings'))
363 if gio_dep.found()
364   cdata.set('HAVE_GSETTINGS', 1)
365 endif
366
367 glib_dep = dependency('glib-2.0', version : '>= 2.4.0', required: get_option('glib'))
368 if glib_dep.found()
369   cdata.set('HAVE_GLIB', 1)
370 endif
371
372 gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
373 if gtk_dep.found()
374   cdata.set('HAVE_GTK', 1)
375 endif
376
377 have_orcc = false
378 orcc_args = []
379 orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
380 orcc = find_program('orcc', required : get_option('orc'))
381 if orc_dep.found() and orcc.found()
382   have_orcc = true
383   orcc_args = [orcc]
384   #orcc_args = [orcc, '--include', 'glib.h']
385   cdata.set('HAVE_ORC', 1)
386 else
387   cdata.set('DISABLE_ORC', 1)
388 endif
389
390 samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
391 if samplerate_dep.found()
392   cdata.set('HAVE_LIBSAMPLERATE', 1)
393 endif
394
395 sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
396
397 soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
398 if soxr_dep.found()
399   cdata.set('HAVE_SOXR', 1)
400 endif
401
402 libsystemd_dep = dependency('libsystemd', required : get_option('systemd'))
403 if libsystemd_dep.found()
404   cdata.set('HAVE_SYSTEMD_DAEMON', 1)
405   cdata.set('HAVE_SYSTEMD_LOGIN', 1)
406   cdata.set('HAVE_SYSTEMD_JOURNAL', 1)
407 endif
408 systemd_dep = dependency('systemd', required : get_option('systemd'))
409 if systemd_dep.found() and systemduserunitdir == ''
410   systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
411 endif
412
413 x11_dep = dependency('x11-xcb', required : get_option('x11'))
414 if x11_dep.found()
415   xcb_dep  = dependency('xcb',  required : true, version : '>= 1.6')
416   ice_dep  = dependency('ice',  required : true)
417   sm_dep   = dependency('sm',   required : true)
418   xtst_dep = dependency('xtst', required : true)
419   cdata.set('HAVE_X11', 1)
420 endif
421
422 # Module dependencies
423
424 if cc.has_header('sys/soundcard.h')
425   cdata.set('HAVE_OSS_OUTPUT', 1)
426   cdata.set('HAVE_OSS_WRAPPER', 1)
427   cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
428 endif
429
430 if get_option('hal-compat')
431   cdata.set('HAVE_HAL_COMPAT', 1)
432 endif
433
434 avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
435 if avahi_dep.found()
436   cdata.set('HAVE_AVAHI', 1)
437 endif
438
439 bluez_dep = dependency('bluez', version : '>= 5.0', required : get_option('bluez5'))
440 sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
441 if bluez_dep.found()
442   assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
443   assert(sbc_dep.found(), 'BlueZ requires SBC support')
444   cdata.set('HAVE_SBC', 1)
445   cdata.set('HAVE_BLUEZ', 1)
446   cdata.set('HAVE_BLUEZ_5', 1)
447   if get_option('bluez5-native-headset')
448     cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
449   endif
450   if get_option('bluez5-ofono-headset')
451     cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
452   endif
453 endif
454
455 fftw_dep = dependency('fftw3f', required : get_option('fftw'))
456 if fftw_dep.found()
457   cdata.set('HAVE_FFTW', 1)
458 endif
459
460 jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
461 if jack_dep.found()
462   cdata.set('HAVE_JACK', 1)
463 endif
464
465 lirc_dep = dependency('lirc', required : get_option('lirc'))
466 if lirc_dep.found()
467   cdata.set('HAVE_LIRC', 1)
468 endif
469
470 openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
471 if openssl_dep.found()
472   cdata.set('HAVE_OPENSSL', 1)
473 endif
474
475 speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
476 if speex_dep.found()
477   cdata.set('HAVE_SPEEX', 1)
478 endif
479
480 udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
481 if udev_dep.found()
482   cdata.set('HAVE_UDEV', 1)
483 endif
484
485 webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : get_option('webrtc-aec'))
486 if webrtc_dep.found()
487   cdata.set('HAVE_WEBRTC', 1)
488 endif
489
490 # These are required for the CMake file generation
491 cdata.set('PA_LIBDIR', libdir)
492 cdata.set('PA_INCDIR', includedir)
493 if glib_dep.found()
494   cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
495 endif
496
497 # Test dependencies
498
499 check_dep = dependency('check', version : '>= 0.9.10', required : get_option('tests'))
500
501 # Now generate config.h from everything above
502 configure_file(output : 'config.h', configuration : cdata)
503
504 # pkg-config files
505
506 pc_cdata = configuration_data()
507
508 pc_cdata.set('prefix', prefix)
509 pc_cdata.set('exec_prefix', prefix)
510 pc_cdata.set('libdir', libdir)
511 pc_cdata.set('includedir', includedir)
512 pc_cdata.set('modlibexecdir', modlibexecdir)
513 pc_cdata.set('PACKAGE_VERSION', pa_version_str)
514 pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
515 # FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
516 # and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
517 # get_configtool_variable() work with it, so we have no way to get this flag right,
518 # unless we do all the work ourselves. See current work in glib, also meson #553.
519 pc_cdata.set('PTHREAD_LIBS', '-pthread')
520
521 pc_files = [
522   'libpulse.pc',
523   'libpulse-simple.pc',
524 ]
525
526 if glib_dep.found()
527   pc_files += 'libpulse-mainloop-glib.pc'
528 endif
529
530 foreach file : pc_files
531   configure_file(
532     input : file + '.in',
533     output : file,
534     configuration : pc_cdata,
535     install_dir : pkgconfigdir)
536 endforeach
537
538 # CMake files
539
540 m4 = find_program('m4', required: true)
541
542 cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
543
544 cmake_template_file = configure_file(
545   input : 'PulseAudioConfig.cmake.in',
546   output : 'PulseAudioConfig.cmake.tmp',
547   configuration: cdata,
548 )
549
550 custom_target('PulseAudioConfig.cmake',
551   input : cmake_template_file,
552   output : 'PulseAudioConfig.cmake',
553   capture : true,
554   command : [m4, '@INPUT@'],
555   build_by_default : true,
556   install : true,
557   install_dir : cmakedir,
558 )
559
560 configure_file(
561   input : 'PulseAudioConfigVersion.cmake.in',
562   output : 'PulseAudioConfigVersion.cmake',
563   configuration: cdata,
564   install : true,
565   install_dir : cmakedir,
566 )
567
568 # Subdirs
569
570 subdir('po')
571 if get_option('man')
572   subdir('man')
573 endif
574 subdir('shell-completion/bash')
575 subdir('shell-completion/zsh')
576 subdir('src')
577 subdir('vala')
578
579 ############################################################
580
581 # Final summary
582
583 summary = [
584   '',
585   '---{ @0@ @1@ }---'.format(meson.project_name(), meson.project_version()),
586   '',
587   'prefix:                        @0@'.format(prefix),
588   'bindir:                        @0@'.format(bindir),
589   'libdir:                        @0@'.format(libdir),
590   'libexecdir:                    @0@'.format(libexecdir),
591   'mandir:                        @0@'.format(mandir),
592   'datadir:                       @0@'.format(datadir),
593   'sysconfdir:                    @0@'.format(sysconfdir),
594   'localstatedir:                 @0@'.format(localstatedir),
595   'modlibexecdir:                 @0@'.format(modlibexecdir),
596   'System Runtime Path:           @0@'.format(cdata.get_unquoted('PA_SYSTEM_RUNTIME_PATH')),
597   'System State Path:             @0@'.format(cdata.get_unquoted('PA_SYSTEM_STATE_PATH')),
598   'System Config Path:            @0@'.format(cdata.get_unquoted('PA_SYSTEM_CONFIG_PATH')),
599   'Bash completions directory:    @0@'.format(bashcompletiondir),
600   'Zsh completions directory:     @0@'.format(zshcompletiondir),
601   'Compiler:                      @0@ @1@'.format(cc.get_id(), cc.version()),
602 #  'CFLAGS:                        @0@'.format(${CFLAGS}),
603 #  'CPPFLAGS:                      @0@'.format(${CPPFLAGS}),
604 #  'LIBS:                          @0@'.format(${LIBS}),
605   '',
606   'Enable memfd shared memory:    @0@'.format(cdata.has('HAVE_MEMFD')),
607   'Enable X11:                    @0@'.format(x11_dep.found()),
608 #  'Enable OSS Output:             @0@'.format(${ENABLE_OSS_OUTPUT}),
609 #  'Enable OSS Wrapper:            @0@'.format(${ENABLE_OSS_WRAPPER}),
610 #  'Enable EsounD:                 @0@'.format(${ENABLE_ESOUND}),
611   'Enable Alsa:                   @0@'.format(alsa_dep.found()),
612 #  'Enable CoreAudio:              @0@'.format(${ENABLE_COREAUDIO}),
613 #  'Enable Solaris:                @0@'.format(${ENABLE_SOLARIS}),
614 #  'Enable WaveOut:                @0@'.format(${ENABLE_WAVEOUT}),
615   'Enable GLib 2:                 @0@'.format(glib_dep.found()),
616 #  'Enable GConf:                  @0@'.format(${ENABLE_GCONF}),
617   'Enable GSettings:              @0@'.format(gio_dep.found()),
618   'Enable Gtk+ 3:                 @0@'.format(gtk_dep.found()),
619   'Enable Avahi:                  @0@'.format(avahi_dep.found()),
620   'Enable Jack:                   @0@'.format(jack_dep.found()),
621   'Enable Async DNS:              @0@'.format(asyncns_dep.found()),
622   'Enable LIRC:                   @0@'.format(lirc_dep.found()),
623   'Enable D-Bus:                  @0@'.format(dbus_dep.found()),
624   '  Enable BlueZ 5:              @0@'.format(bluez_dep.found()),
625   '    Enable native headsets:    @0@'.format(get_option('bluez5-native-headset')),
626   '    Enable  ofono headsets:    @0@'.format(get_option('bluez5-ofono-headset')),
627   'Enable udev:                   @0@'.format(udev_dep.found()),
628   '  Enable HAL->udev compat:     @0@'.format(get_option('hal-compat')),
629   'Enable systemd:                @0@'.format(libsystemd_dep.found()),
630 #  'Enable TCP Wrappers:           @0@'.format(${ENABLE_TCPWRAP}),
631   'Enable libsamplerate:          @0@'.format(samplerate_dep.found()),
632   'Enable IPv6:                   @0@'.format(get_option('ipv6')),
633   'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
634   'Enable FFTW:                   @0@'.format(fftw_dep.found()),
635   'Enable ORC:                    @0@'.format(have_orcc),
636   'Enable Adrian echo canceller:  @0@'.format(get_option('adrian-aec')),
637   'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
638   'Enable SoXR (resampler):       @0@'.format(soxr_dep.found()),
639   'Enable WebRTC echo canceller:  @0@'.format(webrtc_dep.found()),
640   'Enable Gcov coverage:          @0@'.format(get_option('gcov')),
641   'Enable man pages:              @0@'.format(get_option('man')),
642   'Enable unit tests:             @0@'.format(get_option('tests')),
643   '',
644   'Database:                      @0@'.format(get_option('database')),
645   'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')),
646   'Running from build tree:       @0@'.format(get_option('running-from-build-tree')),
647   'System User:                   @0@'.format(cdata.get_unquoted('PA_SYSTEM_USER')),
648   'System Group:                  @0@'.format(cdata.get_unquoted('PA_SYSTEM_GROUP')),
649   'Access Group:                  @0@'.format(cdata.get_unquoted('PA_ACCESS_GROUP')),
650 #  'Enable per-user EsounD socket: @0@'.format(${ENABLE_PER_USER_ESOUND_SOCKET}),
651 #  'Force preopen:                 @0@'.format(${FORCE_PREOPEN}),
652 #  'Preopened modules:             @0@'.format(${PREOPEN_MODS}),
653 ]
654
655 message('\n    '.join(summary))
656
657 # Sanity checks
658
659 if not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
660   error('At least one echo canceller implementation must be available!')
661 endif
662
663 if samplerate_dep.found()
664   warning('Support for libsamplerate is DEPRECATED')
665 endif
666
667 if host_machine.system() != 'windows'
668   if not dbus_dep.found()
669     message = [
670       'You do not have D-Bus support enabled. It is strongly recommended',
671       'that you enable D-Bus support if your platform supports it.',
672       'Many parts of PulseAudio use D-Bus, from ConsoleKit interaction',
673       'to the Device Reservation Protocol to speak to JACK, Bluetooth',
674       'support and even a native control protocol for communicating and',
675       'controlling the PulseAudio daemon itself.',
676     ]
677     warning('\n' + '\n'.join(message))
678   endif
679   if not udev_dep.found()
680     message = [
681       'You do not have udev support enabled. It is strongly recommended',
682       'that you enable udev support if your platform supports it as it is',
683       'the primary method used to detect hardware audio devices (on Linux)',
684       'and is thus a critical part of PulseAudio on that platform.',
685     ]
686     warning('\n' + '\n'.join(message))
687   endif
688   if not speex_dep.found()
689     message = [
690       'You do not have speex support enabled. It is strongly recommended',
691       'that you enable speex support if your platform supports it as it is',
692       'the primary method used for audio resampling and is thus a critical',
693       'part of PulseAudio on that platform.',
694     ]
695     warning('\n' + '\n'.join(message))
696   endif
697 endif