Merged in CMaiku/pidgin (pull request #351)

Thu, 24 May 2018 14:42:02 +0000

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 24 May 2018 14:42:02 +0000
changeset 39059
dafd11a1098a
parent 39057
55afb1512cfe (current diff)
parent 39058
c189b8dbd56e (diff)
child 39061
2bbce9fbb527

Merged in CMaiku/pidgin (pull request #351)

meson: Update Cyrus SASL dependency to use pkg-config

Approved-by: Eion Robb <eionrobb@gmail.com>
Approved-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Approved-by: Gary Kramlich <grim@reaperworld.com>

--- a/meson.build	Wed May 23 13:27:30 2018 -0500
+++ b/meson.build	Thu May 24 14:42:02 2018 +0000
@@ -1000,11 +1000,15 @@
 endforeach
 enable_cyrus_sasl = get_option('cyrus-sasl')
 if enable_cyrus_sasl
-	if compiler.has_function('sasl_client_init', args : '-lsasl2')
-		conf.set('HAVE_CYRUS_SASL', true)
-		sasl = declare_dependency(link_args : '-lsasl2')
-	else
-		error('Cyrus SASL library not found')
+	sasl = dependency('libsasl2', version : '>= 2.0', required : false)
+	enable_cyrus_sasl = sasl.found()
+	conf.set('HAVE_CYRUS_SASL', enable_cyrus_sasl)
+
+	if not enable_cyrus_sasl and force_deps
+		error('''
+Cyrus SASL library not found
+Use -Dcyrus-sasl=false if you do not need it.
+''')
 	endif
 else
 	enable_cyrus_sasl = false

mercurial