aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-12-27 20:09:13 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2023-12-27 20:09:13 +0100
commit0c1e695a9f59d9691aee4a4aa84f3b3a4dadfce6 (patch)
treebd51f8e91bb641b6bd05bc8cf446f34d92c274ff
parent47409fa1f2fc3172cfa82d8e672cbac94a884b09 (diff)
downloadgnunet-0c1e695a9f59d9691aee4a4aa84f3b3a4dadfce6.tar.gz
gnunet-0c1e695a9f59d9691aee4a4aa84f3b3a4dadfce6.zip
CONVERSATION: fix meson gstreamer detection and compile
-rw-r--r--meson.build73
-rw-r--r--src/contrib/service/conversation/meson.build4
2 files changed, 44 insertions, 33 deletions
diff --git a/meson.build b/meson.build
index 54250ce8f..ed0ba4159 100644
--- a/meson.build
+++ b/meson.build
@@ -322,19 +322,26 @@ if ogg_dep.found()
322 add_project_arguments('-DHAVE_OGG', language : 'c') 322 add_project_arguments('-DHAVE_OGG', language : 'c')
323endif 323endif
324 324
325gst_dep = dependency('libgst', required : false)
326if not gst_dep.found()
327 gst_dep = cc.find_library('gstreamer', required : false)
328endif
329if gst_dep.found()
330 add_project_arguments('-DHAVE_GST', language : 'c')
331endif
332
333conversation_backend = 'none' 325conversation_backend = 'none'
334if pulse_dep.found() and opus_dep.found() and ogg_dep.found() 326if pulse_dep.found() and opus_dep.found() and ogg_dep.found()
335 conversation_backend = 'pulse' 327 conversation_backend = 'pulse'
336elif gst_dep.found() 328else
337 conversation_backend = 'gst' 329 gst_dep = dependency('gstreamer-1.0', required : false)
330 if not gst_dep.found()
331 gst_dep = cc.find_library('gstreamer-1.0', required : false)
332 endif
333 gst_app_dep = dependency('gstreamer-app-1.0', required : false)
334 if not gst_app_dep.found()
335 gst_app_dep = cc.find_library('gstreamer-app-1.0', required : false)
336 endif
337 gst_audio_dep = dependency('gstreamer-audio-1.0', required : false)
338 if not gst_audio_dep.found()
339 gst_audio_dep = cc.find_library('gstreamer-audio-1.0', required : false)
340 endif
341 if gst_dep.found() and gst_app_dep.found() and gst_audio_dep.found()
342 add_project_arguments('-DHAVE_GST', language : 'c')
343 conversation_backend = 'gst'
344 endif
338endif 345endif
339## END conversation 346## END conversation
340 347
@@ -392,10 +399,10 @@ endif
392# GNUTLS DANE 399# GNUTLS DANE
393if cc.check_header('gnutls/dane.h') 400if cc.check_header('gnutls/dane.h')
394 if cc.has_function('dane_verify_crt_raw', 401 if cc.has_function('dane_verify_crt_raw',
395 prefix: '#include <gnutls/dane.h>', 402 prefix: '#include <gnutls/dane.h>',
396 dependencies: gnutls_dep) 403 dependencies: gnutls_dep)
397 add_project_arguments('-DHAVE_GNUTLS_DANE', language : 'c') 404 add_project_arguments('-DHAVE_GNUTLS_DANE', language : 'c')
398 endif 405endif
399endif 406endif
400curl_ssl_check ='''#include <curl/curl.h> 407curl_ssl_check ='''#include <curl/curl.h>
401 int main(int argc, char **argv) { 408 int main(int argc, char **argv) {
@@ -404,7 +411,7 @@ curl_ssl_check ='''#include <curl/curl.h>
404 ''' 411 '''
405 412
406result = cc.run(curl_ssl_check, name : 'cURL gnutls check', 413result = cc.run(curl_ssl_check, name : 'cURL gnutls check',
407 dependencies: curl_dep) 414 dependencies: curl_dep)
408cdata.set('curl_gnutls', 0) 415cdata.set('curl_gnutls', 0)
409if result.returncode() == 0 416if result.returncode() == 0
410 cdata.set('curl_gnutls', 1) 417 cdata.set('curl_gnutls', 1)
@@ -459,27 +466,27 @@ add_test_setup('default', env: ['GNUNET_PREFIX='+gnunet_prefix], exclude_suites:
459add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default: false) 466add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default: false)
460 467
461summary({'host': host_machine.system(), 468summary({'host': host_machine.system(),
462 'prefix': get_option('prefix'), 469 'prefix': get_option('prefix'),
463 'compiler': cc.get_id(), 470 'compiler': cc.get_id(),
464 'libdir': get_option('libdir'), 471 'libdir': get_option('libdir'),
465 'datadir': get_option('datadir'), 472 'datadir': get_option('datadir'),
466 'default interface': cdata.get('GNUNET_DEFAULT_INTERFACE'), 473 'default interface': cdata.get('GNUNET_DEFAULT_INTERFACE'),
467 'PostgreSQL': pq_dep.found(), 474 'PostgreSQL': pq_dep.found(),
468 'curl w/ gnutls': (cdata.get('curl_gnutls') == 1), 475 'curl w/ gnutls': (cdata.get('curl_gnutls') == 1),
469 'ifconfig': ifconfig_bin.found(), 476 'ifconfig': ifconfig_bin.found(),
470 'iptables': iptables_bin.found() 477 'iptables': iptables_bin.found()
471 }, section: 'Detected system') 478 }, section: 'Detected system')
472 479
473if not gnunet_user 480if not gnunet_user
474 message('Please make sure NOW to create a user and group \'gnunet\' and additionally a group \'gnunetdns\'. Make sure that \'/var/lib/gnunet\' is owned (and writable) by user \'gnunet\'') 481 message('Please make sure NOW to create a user and group \'gnunet\' and additionally a group \'gnunetdns\'. Make sure that \'/var/lib/gnunet\' is owned (and writable) by user \'gnunet\'')
475 message('Each user of GNUnet should be added to the \'gnunet\' group') 482 message('Each user of GNUnet should be added to the \'gnunet\' group')
476 if adduser_bin.found() and not gnunet_user 483 if adduser_bin.found() and not gnunet_user
477 message('''Create the gnunet user and add users to the gnunetdns group, run: 484 message('''Create the gnunet user and add users to the gnunetdns group, run:
478 # addgroup gnunetdns 485 # addgroup gnunetdns
479 # adduser --system --disabled-login --home /var/lib/gnunet gnunet''') 486 # adduser --system --disabled-login --home /var/lib/gnunet gnunet''')
480 message('''To add users to the gnunet group, run: 487 message('''To add users to the gnunet group, run:
481 # adduser USERNAME gnunet 488 # adduser USERNAME gnunet
482 for each of your users, replacing \'USERNAME\' with the respective login name. 489 for each of your users, replacing \'USERNAME\' with the respective login name.
483 Users may have to login again for the changes to take effect.''') 490 Users may have to login again for the changes to take effect.''')
484 endif 491 endif
485endif 492 endif
diff --git a/src/contrib/service/conversation/meson.build b/src/contrib/service/conversation/meson.build
index 052fa1a6e..095ae2fd5 100644
--- a/src/contrib/service/conversation/meson.build
+++ b/src/contrib/service/conversation/meson.build
@@ -108,6 +108,8 @@ executable ('gnunet-helper-audio-record',
108 libgnunetspeaker_dep, 108 libgnunetspeaker_dep,
109 libgnunetmicrophone_dep, 109 libgnunetmicrophone_dep,
110 gst_dep, 110 gst_dep,
111 gst_app_dep,
112 gst_audio_dep,
111 ogg_dep, 113 ogg_dep,
112 pulse_dep, 114 pulse_dep,
113 opus_dep 115 opus_dep
@@ -123,6 +125,8 @@ executable ('gnunet-helper-audio-playback',
123 libgnunetspeaker_dep, 125 libgnunetspeaker_dep,
124 libgnunetmicrophone_dep, 126 libgnunetmicrophone_dep,
125 gst_dep, 127 gst_dep,
128 gst_app_dep,
129 gst_audio_dep,
126 ogg_dep, 130 ogg_dep,
127 pulse_dep, 131 pulse_dep,
128 opus_dep 132 opus_dep