--- a/meson.build Mon Oct 07 21:57:38 2019 -0400
+++ b/meson.build Tue Oct 08 15:53:19 2019 -0400
@@ -288,13 +288,17 @@
conf.set_quoted('DISPLAY_VERSION', DISPLAY_VERSION)
-force_deps = not get_option('missing-dependencies')
+####################################################################### +# Check for GObject Introspection +####################################################################### +enable_introspection = dependency('gobject-introspection-1.0', version : '>= 1.30.0', + required : get_option('introspection')).found() +conf.set('ENABLE_INTROSPECTION', enable_introspection) # #######################################################################
# # Check for GTK+ 2.18 and other things used by the GTK UI
# #######################################################################
-enable_gestures = get_option('gestures')
# #######################################################################
# Check Pidgin dependencies
# #######################################################################
@@ -311,7 +315,7 @@
talkatu_proj = subproject('talkatu',
'doc=' + get_option('doc').to_string(),
- 'gobject-introspection=' + get_option('introspection').to_string(),
+ 'gobject-introspection=' + enable_introspection.to_string(), 'nls=' + get_option('nls').to_string(),
@@ -327,25 +331,15 @@
#######################################################################
# Check if we should compile with X support
#######################################################################
-with_x = get_option('x') and not IS_WIN32
+ x11 = dependency('x11', required : get_option('x')) +conf.set('HAVE_X11', x11.found())
- x11 = dependency('x11')
- conf.set('HAVE_X11', true)
-X11 development headers not found.
-Use -Dx=false if you do not need X11 support.
-if not get_option('gtkui') or not with_x
+enable_gestures = get_option('gestures') +if not get_option('gtkui') or not x11.found() @@ -367,59 +361,39 @@
#######################################################################
-enable_gst = get_option('gstreamer')
- gstreamer = dependency('gstreamer-1.0', required : force_deps)
- conf.set('USE_GSTREAMER', true)
+gstreamer = dependency('gstreamer-1.0', required : get_option('gstreamer')) +conf.set('USE_GSTREAMER', gstreamer.found()) #######################################################################
# Check for GStreamer Video
#######################################################################
-enable_gstvideo = enable_gst and get_option('gstreamer-video')
gstreamer_video = dependency('gstreamer-video-1.0',
- if gstreamer_video.found()
- conf.set('USE_GSTVIDEO', true)
- enable_gstvideo = false
+ required : get_option('gstreamer-video')) + conf.set('USE_GSTVIDEO', gstreamer_video.found())
+ gstreamer_video = disabler() #######################################################################
#######################################################################
-if get_option('farstream')
- farstream = dependency('farstream-0.2', version : '>= 0.2.7',
- enable_farstream = farstream.found()
- enable_farstream = false
+farstream = dependency('farstream-0.2', version : '>= 0.2.7', + required : get_option('farstream')) #######################################################################
# Check for Voice and Video support
#######################################################################
- if enable_gst and enable_gstvideo and enable_farstream
+if get_option('vv').enabled() or get_option('vv').auto() + if gstreamer.found() and gstreamer_video.found() and farstream.found()
+ if get_option('vv').enabled() Dependencies for voice/video were not met.
Install the necessary gstreamer and farstream packages first.
-Or use -Dvv=false if you do not need voice/video support.
+Or use -Dvv=disabled if you do not need voice/video support. @@ -445,73 +419,43 @@
#######################################################################
# Check for Meanwhile headers (for Sametime)
#######################################################################
-if get_option('meanwhile')
- meanwhile = dependency('meanwhile', version : ['>= 1.0.0', '< 2.0.0'], required : force_deps)
- gmime = dependency('gmime-3.0', version : '>= 3.0.0', required : force_deps)
- enable_meanwhile = meanwhile.found() and gmime.found()
- enable_meanwhile = false
+meanwhile = dependency('meanwhile', version : ['>= 1.0.0', '< 2.0.0'], required : get_option('meanwhile')) +gmime = dependency('gmime-3.0', version : '>= 3.0.0', required : get_option('meanwhile')) +enable_meanwhile = meanwhile.found() and gmime.found() #######################################################################
# Check for Native Avahi headers (for Bonjour)
#######################################################################
-enable_avahi = get_option('avahi')
-if enable_avahi and IS_WIN32
+ enable_avahi = get_option('avahi').enabled() or get_option('avahi').auto() # Attempt to autodetect Avahi
- avahi_client = dependency('avahi-client', required : false)
- avahi_glib = dependency('avahi-glib', required : false)
- if avahi_client.found() and avahi_glib.found()
- avahi = [avahi_client, avahi_glib]
-avahi development package not found.
-Use -Davahi=false if you do not need avahi (Bonjour) support.
+ avahi_client = dependency('avahi-client', required : get_option('avahi')) + avahi_glib = dependency('avahi-glib', required : get_option('avahi')) + avahi = [avahi_client, avahi_glib] + enable_avahi = avahi_client.found() and avahi_glib.found() #######################################################################
# Check for SILC client includes and libraries
#######################################################################
- silc = dependency('silcclient', version : '>= 1.1', required : false)
- # SILC Toolkit >= 1.0.1 has a new MIME API
- conf.set('HAVE_SILCMIME_H', true)
-SILC development package not found.
-Use -Dsilc=false if you do not need SILC support.
+silc = dependency('silcclient', version : '>= 1.1', required : get_option('silc')) #######################################################################
# Check for Gadu-Gadu protocol library (libgadu)
#######################################################################
-enable_libgadu = get_option('libgadu')
- libgadu = dependency('libgadu', version : '>= 1.12.0', required : false)
- have_libgadu = libgadu.found()
+libgadu = dependency('libgadu', version : '>= 1.12.0', required : get_option('libgadu'))
- if not compiler.has_function('gg_is_gpl_compliant', dependencies : libgadu)
+ if not compiler.has_function('gg_is_gpl_compliant', dependencies : libgadu) + if get_option('libgadu').auto() libgadu is not compatible with the GPL when compiled with OpenSSL support.
@@ -521,15 +465,6 @@
- if not have_libgadu and force_deps
-Libgadu development headers not found.
-Use -Dlibgadu=false if you do not need GG (GaduGadu) support.
@@ -549,9 +484,9 @@
elif prpl == 'bonjour' and not enable_avahi
- elif prpl == 'silc' and not have_silc
+ elif prpl == 'silc' and not silc.found() - elif prpl == 'gg' and not have_libgadu
+ elif prpl == 'gg' and not libgadu.found() elif prpl == 'zephyr' and IS_WIN32
@@ -639,12 +574,12 @@
# Check for Unity and Messaging Menu
# Remove when Ubuntu 16.04 is EOL
#######################################################################
-enable_unity = get_option('unity-integration')
+ dependency('unity', version : '>= 6.8', required : get_option('unity-integration')), + dependency('messaging-menu', version : '>= 12.10', required : get_option('unity-integration')) +enable_unity = UNITY[0].found() and UNITY[1].found()
- dependency('unity', version : '>= 6.8'),
- dependency('messaging-menu', version : '>= 12.10')
conf.set('USES_MM_CHAT_SECTION', 'X-MessagingMenu-UsesChatSection=true')
conf.set('USES_MM_CHAT_SECTION', '')
@@ -654,22 +589,19 @@
# Check for Secret Service headers
#######################################################################
-enable_secret_service = get_option('secret-service') and not IS_WIN32
-if enable_secret_service
- secretservice = dependency('libsecret-1', required : force_deps)
- if secretservice.found()
- enable_secret_service = false
+ secretservice = disabler() + secretservice = dependency('libsecret-1', required : get_option('secret-service')) #######################################################################
# Check for KWallet headers
#######################################################################
-enable_kwallet = get_option('kwallet') and not IS_WIN32
# Ensure C++ compiler works
cxx_compiler = meson.get_compiler('cpp')
@@ -677,9 +609,9 @@
- qt5_dep = dependency('qt5', modules: ['Core'])
+ qt5_dep = dependency('qt5', modules: ['Core'], required : get_option('kwallet')) - kwallet = dependency('KF5Wallet')
+ kwallet = dependency('KF5Wallet', required : get_option('kwallet')) #######################################################################
@@ -695,7 +627,7 @@
gplugin_proj = subproject('gplugin',
'doc=' + get_option('doc').to_string(),
- 'gobject-introspection=' + get_option('introspection').to_string(),
+ 'gobject-introspection=' + enable_introspection.to_string(), 'nls=' + get_option('nls').to_string(),
@@ -704,42 +636,14 @@
gplugin_include_directories = []
-#######################################################################
-# Check for GObject Introspection
-#######################################################################
-enable_introspection = get_option('introspection')
- if dependency('gobject-introspection-1.0', version : '>= 1.30.0',
- required : force_deps).found()
- conf.set('ENABLE_INTROSPECTION', true)
- enable_introspection = false
PLUGINS = get_option('plugins')
#######################################################################
# Check for Nettle (Crypto Library)
#######################################################################
-enable_nettle = get_option('nettle')
- nettle = dependency('nettle', version : '>= 3.0', required : false)
- enable_nettle = nettle.found()
- conf.set('HAVE_NETTLE', enable_nettle)
- if not enable_nettle and force_deps
-Nettle development headers not found
-Use -Dnettle=false if you do not need it.
+nettle = dependency('nettle', version : '>= 3.0', required : get_option('nettle')) +conf.set('HAVE_NETTLE', nettle.found()) #######################################################################
# Check for Cyrus-SASL (for xmpp/irc)
@@ -748,22 +652,15 @@
conf.set('HAVE_' + func.to_upper(),
compiler.has_function(func))
-enable_cyrus_sasl = get_option('cyrus-sasl')
- sasl = dependency('libsasl2', version : '>= 2.0', required : false)
- enable_cyrus_sasl = sasl.found()
- conf.set('HAVE_CYRUS_SASL', enable_cyrus_sasl)
+sasl = dependency('libsasl2', version : '>= 2.0', required : get_option('cyrus-sasl')) +conf.set('HAVE_CYRUS_SASL', sasl.found()) - if not enable_cyrus_sasl and force_deps
-Cyrus SASL library not found
-Use -Dcyrus-sasl=false if you do not need it.
- enable_cyrus_sasl = false
+####################################################################### +# Check for external libzephyr +####################################################################### +ext_zephyr = dependency('zephyr', required : get_option('zephyr')) +EXTERNAL_LIBZEPHYR = ext_zephyr.found() +conf.set('LIBZEPHYR_EXT', EXTERNAL_LIBZEPHYR) #######################################################################
# Check for Kerberos (for Zephyr)
@@ -802,19 +699,6 @@
-#######################################################################
-# Check for external libzephyr
-#######################################################################
-zephyr = get_option('zephyr')
- ext_zephyr = dependency('zephyr', required : force_deps)
- zephyr = ext_zephyr.found()
-EXTERNAL_LIBZEPHYR = zephyr
-conf.set('LIBZEPHYR_EXT', EXTERNAL_LIBZEPHYR)
#AC_MSG_CHECKING(for me pot o' gold)
foreach func : ['timegm']
@@ -873,26 +757,28 @@
message('Build GTK+ UI................. : ' + get_option('gtkui').to_string())
message('Build console UI.............. : ' + enable_consoleui.to_string())
-message('Build for X11................. : ' + with_x.to_string())
+message('Build for X11................. : ' + x11.found().to_string()) message('Enable Gestures............... : ' + enable_gestures.to_string())
message('Protocols to build dynamically : @0@'.format(DYNAMIC_PRPLS))
-message('Build with GStreamer support.. : ' + enable_gst.to_string())
+message('Build with GStreamer support.. : ' + gstreamer.found().to_string()) message('Build with voice and video.... : ' + enable_vv.to_string())
-message('Build with GNU Libidn......... : ' + get_option('idn').to_string())
-message('Build with Nettle support..... : ' + enable_nettle.to_string())
-message('Build with Cyrus SASL support. : ' + enable_cyrus_sasl.to_string())
+message('Build with GNU Libidn......... : ' + idn.found().to_string()) +message('Build with Nettle support..... : ' + nettle.found().to_string()) +message('Build with Cyrus SASL support. : ' + sasl.found().to_string()) +message('Use external libzephyr........ : ' + EXTERNAL_LIBZEPHYR.to_string()) +if not EXTERNAL_LIBZEPHYR message('Use kerberos 4 with zephyr.... : ' + kerberos.to_string())
-message('Use external libzephyr........ : ' + zephyr.to_string())
message('Install pixmaps............... : ' + INSTALL_PIXMAPS.to_string())
message('Install translations.......... : ' + INSTALL_I18N.to_string())
message('Has you....................... : yes')
message('Build Unity integration plugin.: ' + enable_unity.to_string())
-message('Build with KWallet............ : ' + enable_kwallet.to_string())
-message('Build with Secret Service..... : ' + enable_secret_service.to_string())
+message('Build with KWallet............ : ' + kwallet.found().to_string()) +message('Build with Secret Service..... : ' + secretservice.found().to_string()) message('Build plugins................. : ' + PLUGINS.to_string())
message('Enable Introspection...........: ' + enable_introspection.to_string())
--- a/meson_options.txt Mon Oct 07 21:57:38 2019 -0400
+++ b/meson_options.txt Tue Oct 08 15:53:19 2019 -0400
@@ -10,13 +10,10 @@
option('glib-errors-trace', type : 'boolean', value : false,
description : 'print backtraces for glib errors')
-option('introspection', type : 'boolean', value : true,
+option('introspection', type : 'feature', description : 'build introspection data')
-option('missing-dependencies', type : 'boolean', value : false,
- description : 'skip missing dependencies instead of aborting configuration')
-option('nettle', type : 'boolean', value : true,
+option('nettle', type : 'feature', description : 'enable Nettle support')
option('nls', type : 'boolean', value : true,
@@ -28,25 +25,25 @@
##############################################################################
-option('farstream', type : 'boolean', value : true,
+option('farstream', type : 'feature', description : 'compile with farstream support')
-option('gstreamer', type : 'boolean', value : true,
+option('gstreamer', type : 'feature', description : 'compile with GStreamer audio support')
-option('gstreamer-video', type : 'boolean', value : true,
+option('gstreamer-video', type : 'feature', description : 'compile with GStreamer 1.0 Video Overlay support')
-option('kwallet', type : 'boolean', value : true,
+option('kwallet', type : 'feature', description : 'enable KWallet support')
option('plugins', type : 'boolean', value : true,
description : 'compile plugins')
-option('secret-service', type : 'boolean', value : true,
+option('secret-service', type : 'feature', description : 'enable Secret Service support')
-option('vv', type : 'boolean', value : true,
+option('vv', type : 'feature', description : 'compile with voice and video support')
##############################################################################
@@ -55,28 +52,28 @@
option('dynamic-prpls', type : 'string', value: 'all',
description : 'specify which protocols to build dynamically')
-option('avahi', type : 'boolean', value : true,
+option('avahi', type : 'feature', description : 'compile with avahi (required for Bonjour support)')
-option('cyrus-sasl', type : 'boolean', value : false,
+option('cyrus-sasl', type : 'feature', description : 'enable Cyrus SASL support for XMPP/IRC')
-option('idn', type : 'boolean', value : true,
+option('idn', type : 'feature', description : 'compile with IDN support')
option('krb4', type : 'boolean', value : false,
description : 'compile Zephyr plugin with Kerberos 4 support')
-option('libgadu', type : 'boolean', value : true,
+option('libgadu', type : 'feature', description : 'compile with libgadu (required for GaduGadu support)')
-option('meanwhile', type : 'boolean', value : true,
+option('meanwhile', type : 'feature', description : 'compile with meanwhile')
-option('silc', type : 'boolean', value : false,
+option('silc', type : 'feature', description : 'compile with SILC plugin')
-option('zephyr', type : 'boolean', value : false,
+option('zephyr', type : 'feature', description : 'compile Zephyr plugin against external libzephyr')
##############################################################################
@@ -94,10 +91,10 @@
option('gestures', type : 'boolean', value : true,
description : 'compile with the gestures plugin')
-option('gevolution', type : 'boolean', value : false,
+option('gevolution', type : 'feature', description : 'compile with the Evolution plugin')
-option('unity-integration', type : 'boolean', value : false,
+option('unity-integration', type : 'feature', description : 'compile with support for unity integration plugin')
##############################################################################