build-sys: meson: require GIO dependency for RTP-GStreamer
[platform/upstream/pulseaudio.git] / meson.build
index 5a1df59..61660b9 100644 (file)
@@ -4,6 +4,8 @@ project('pulseaudio', 'c', 'cpp',
         default_options : [ 'c_std=gnu11', 'cpp_std=c++11' ]
         )
 
+meson.add_dist_script('scripts/save-tarball-version.sh', meson.project_version())
+
 pa_version_str = meson.project_version()
 # For tarballs, the first split will do nothing, but for builds in git, we
 # split out suffixes when there are commits since the last tag
@@ -23,7 +25,7 @@ pa_protocol_version = 35
 
 # The stable ABI for client applications, for the version info x:y:z
 # always will hold x=z
-libpulse_version_info = [23, 0, 23]
+libpulse_version_info = [24, 0, 24]
 
 # A simplified, synchronous, ABI-stable interface for client
 # applications, for the version info x:y:z always will hold x=z
@@ -162,10 +164,15 @@ cdata.set('top_srcdir', meson.source_root())
 # First some defaults to keep config file generation happy
 cdata.set('HAVE_COREAUDIO', 0)
 cdata.set('HAVE_WAVEOUT', 0)
+cdata.set('OS_IS_FREEBSD', 0)
 
 platform_socket_dep = []
 platform_dep = []
 
+if host_machine.endian() == 'big'
+  cdata.set('WORDS_BIGENDIAN', 1)
+endif
+
 # FIXME: This was not tested. Maybe some flags should better be CFLAGS,
 # rather than ending up in the config.h file?
 if host_machine.system() == 'darwin'
@@ -558,8 +565,11 @@ if host_machine.cpu_family() == 'arm'
 endif
 # NEON checks are automatically done by the unstable-simd module
 
-# FIXME: make sure it's >= 2.2
-ltdl_dep = cc.find_library('ltdl', required : true)
+if get_option('daemon')
+  # FIXME: make sure it's >= 2.2
+  ltdl_dep = cc.find_library('ltdl', required : true)
+endif
+
 # FIXME: can meson support libtool -dlopen/-dlpreopen things?
 #        and do we still want to support this at all?
 cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
@@ -604,8 +614,9 @@ if dbus_dep.found()
   cdata.set('HAVE_DBUS', 1)
 endif
 
-gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : get_option('gsettings'))
-if gio_dep.found()
+gio_dep = dependency('gio-2.0', version : '>= 2.26.0')
+if get_option('gsettings').enabled()
+  assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)')
   cdata.set('HAVE_GSETTINGS', 1)
 endif
 
@@ -694,6 +705,7 @@ if avahi_dep.found()
 endif
 
 sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
+
 if get_option('bluez5')
   assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
   assert(sbc_dep.found(), 'BlueZ requires SBC support')
@@ -749,6 +761,7 @@ gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
 
 have_gstreamer = false
 if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found()
+  assert(gio_dep.found(), 'GStreamer-based RTP needs glib I/O library (GIO)')
   have_gstreamer = true
 endif
 
@@ -774,7 +787,9 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
 
 # Subdirs
 
-subdir('doxygen')
+if get_option('doxygen')
+  subdir('doxygen')
+endif
 subdir('po')
 if get_option('man')
   subdir('man')
@@ -879,6 +894,8 @@ summary = [
 #  'CPPFLAGS:                      @0@'.format(${CPPFLAGS}),
 #  'LIBS:                          @0@'.format(${LIBS}),
   '',
+  'Enable pulseaudio daemon:      @0@'.format(get_option('daemon')),
+  '',
   'Enable memfd shared memory:    @0@'.format(cdata.has('HAVE_MEMFD')),
   'Enable X11:                    @0@'.format(x11_dep.found()),
   '  Safe X11 I/O errors:         @0@'.format(cdata.has('HAVE_XSETIOERROREXITHANDLER')),