diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-12-27 20:09:13 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-12-27 20:09:13 +0100 |
commit | 0c1e695a9f59d9691aee4a4aa84f3b3a4dadfce6 (patch) | |
tree | bd51f8e91bb641b6bd05bc8cf446f34d92c274ff | |
parent | 47409fa1f2fc3172cfa82d8e672cbac94a884b09 (diff) | |
download | gnunet-0c1e695a9f59d9691aee4a4aa84f3b3a4dadfce6.tar.gz gnunet-0c1e695a9f59d9691aee4a4aa84f3b3a4dadfce6.zip |
CONVERSATION: fix meson gstreamer detection and compile
-rw-r--r-- | meson.build | 73 | ||||
-rw-r--r-- | src/contrib/service/conversation/meson.build | 4 |
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') |
323 | endif | 323 | endif |
324 | 324 | ||
325 | gst_dep = dependency('libgst', required : false) | ||
326 | if not gst_dep.found() | ||
327 | gst_dep = cc.find_library('gstreamer', required : false) | ||
328 | endif | ||
329 | if gst_dep.found() | ||
330 | add_project_arguments('-DHAVE_GST', language : 'c') | ||
331 | endif | ||
332 | |||
333 | conversation_backend = 'none' | 325 | conversation_backend = 'none' |
334 | if pulse_dep.found() and opus_dep.found() and ogg_dep.found() | 326 | if pulse_dep.found() and opus_dep.found() and ogg_dep.found() |
335 | conversation_backend = 'pulse' | 327 | conversation_backend = 'pulse' |
336 | elif gst_dep.found() | 328 | else |
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 | ||
338 | endif | 345 | endif |
339 | ## END conversation | 346 | ## END conversation |
340 | 347 | ||
@@ -392,10 +399,10 @@ endif | |||
392 | # GNUTLS DANE | 399 | # GNUTLS DANE |
393 | if cc.check_header('gnutls/dane.h') | 400 | if 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 | 405 | endif |
399 | endif | 406 | endif |
400 | curl_ssl_check ='''#include <curl/curl.h> | 407 | curl_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 | ||
406 | result = cc.run(curl_ssl_check, name : 'cURL gnutls check', | 413 | result = cc.run(curl_ssl_check, name : 'cURL gnutls check', |
407 | dependencies: curl_dep) | 414 | dependencies: curl_dep) |
408 | cdata.set('curl_gnutls', 0) | 415 | cdata.set('curl_gnutls', 0) |
409 | if result.returncode() == 0 | 416 | if 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: | |||
459 | add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default: false) | 466 | add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default: false) |
460 | 467 | ||
461 | summary({'host': host_machine.system(), | 468 | summary({'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 | ||
473 | if not gnunet_user | 480 | if 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 |
485 | endif | 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 |