diff options
-rw-r--r-- | README | 2 | ||||
m--------- | contrib/gana | 0 | ||||
-rw-r--r-- | meson.build | 81 |
3 files changed, 51 insertions, 32 deletions
@@ -110,7 +110,7 @@ Direct dependencies of GNUnet: | |||
110 | X.509 certificate | 110 | X.509 certificate |
111 | for gnunet-gns-proxy-setup-ca) | 111 | for gnunet-gns-proxy-setup-ca) |
112 | - libltdl >= 2.2 (part of GNU libtool) | 112 | - libltdl >= 2.2 (part of GNU libtool) |
113 | - sqlite >= 3.8 (default database, required) | 113 | - sqlite >= 3.35.0 (default database, required) |
114 | - which (contrib/apparmor(?), gnunet-bugreport, | 114 | - which (contrib/apparmor(?), gnunet-bugreport, |
115 | and possibly more) | 115 | and possibly more) |
116 | - zlib | 116 | - zlib |
diff --git a/contrib/gana b/contrib/gana | |||
Subproject 557051695c575b45fb1bfdbacbc69d67c690842 | Subproject f5577937ddfe880a49c8bcfce6e531959d62fdd | ||
diff --git a/meson.build b/meson.build index 78c76398d..abffe9b84 100644 --- a/meson.build +++ b/meson.build | |||
@@ -135,13 +135,32 @@ unistr_dep = dependency('libunistring', required : false) | |||
135 | if not unistr_dep.found() | 135 | if not unistr_dep.found() |
136 | unistr_dep = cc.find_library('unistring', required : true) | 136 | unistr_dep = cc.find_library('unistring', required : true) |
137 | endif | 137 | endif |
138 | sqlite_dep = dependency ('sqlite3', required : false) | 138 | sqlite_dep = dependency ('sqlite3', version: '>=3.35.0', required : false) |
139 | # FIXME for fallbacks, we need to manually check version | ||
139 | if not sqlite_dep.found() | 140 | if not sqlite_dep.found() |
140 | sqlite_dep = cc.find_library('sqlite3', required : true) | 141 | sqlite_dep = cc.find_library('sqlite3', required : true) |
142 | sqlite_version_check ='''#include <sqlite3.h> | ||
143 | int main(int argc, char **argv) { | ||
144 | return (SQLITE_VERSION_NUMBER >= 3035000) ? 0 : 1; | ||
145 | } | ||
146 | ''' | ||
147 | if cc.run(sqlite_version_check, name : 'sqlite version check', | ||
148 | dependencies: sqlite_dep).returncode() != 0 | ||
149 | error('Sqlite version >= 3.35.0 requried') | ||
150 | endif | ||
141 | endif | 151 | endif |
142 | curl_dep = dependency('libcurl', version: '>=7.85.0', required : false) | 152 | curl_dep = dependency('libcurl', version: '>=7.85.0', required : false) |
143 | if not curl_dep.found() | 153 | if not curl_dep.found() |
144 | curl_dep = cc.find_library('curl', required : true) | 154 | curl_dep = cc.find_library('curl', required : true) |
155 | curl_version_check ='''#include <curl/curl.h> | ||
156 | int main(int argc, char **argv) { | ||
157 | return (LIBCURL_VERSION_NUM >= 0x075500) ? 0 : 1; | ||
158 | } | ||
159 | ''' | ||
160 | if cc.run(curl_version_check, name : 'cURL version check', | ||
161 | dependencies: curl_dep).returncode() != 0 | ||
162 | error('cURL version >=7.85.0 required') | ||
163 | endif | ||
145 | endif | 164 | endif |
146 | zlib_dep = dependency('zlib', required : false) | 165 | zlib_dep = dependency('zlib', required : false) |
147 | if not zlib_dep.found() | 166 | if not zlib_dep.found() |
@@ -304,15 +323,15 @@ endif | |||
304 | ## END conversation | 323 | ## END conversation |
305 | 324 | ||
306 | gnunetdeps = [mhd_dep, | 325 | gnunetdeps = [mhd_dep, |
307 | sodium_dep, | 326 | sodium_dep, |
308 | gcrypt_dep, | 327 | gcrypt_dep, |
309 | curl_dep, | 328 | curl_dep, |
310 | json_dep, | 329 | json_dep, |
311 | zlib_dep, | 330 | zlib_dep, |
312 | sqlite_dep, | 331 | sqlite_dep, |
313 | unistr_dep, #dependency('libunistring'), | 332 | unistr_dep, #dependency('libunistring'), |
314 | ltdl_dep, #dependency('ltdl'), | 333 | ltdl_dep, #dependency('ltdl'), |
315 | idn_dep] | 334 | idn_dep] |
316 | 335 | ||
317 | add_project_arguments('-DNEED_LIBGCRYPT_VERSION="1.6.0"', language : 'c') | 336 | add_project_arguments('-DNEED_LIBGCRYPT_VERSION="1.6.0"', language : 'c') |
318 | 337 | ||
@@ -368,19 +387,19 @@ endif | |||
368 | # GNUTLS DANE | 387 | # GNUTLS DANE |
369 | if cc.check_header('gnutls/dane.h') | 388 | if cc.check_header('gnutls/dane.h') |
370 | if cc.has_function('dane_verify_crt_raw', | 389 | if cc.has_function('dane_verify_crt_raw', |
371 | prefix: '#include <gnutls/dane.h>', | 390 | prefix: '#include <gnutls/dane.h>', |
372 | dependencies: gnutls_dep) | 391 | dependencies: gnutls_dep) |
373 | add_project_arguments('-DHAVE_GNUTLS_DANE', language : 'c') | 392 | add_project_arguments('-DHAVE_GNUTLS_DANE', language : 'c') |
374 | endif | 393 | endif |
375 | endif | 394 | endif |
376 | curl_ssl_check ='''#include <curl/curl.h> | 395 | curl_ssl_check ='''#include <curl/curl.h> |
377 | int main(int argc, char **argv) { | 396 | int main(int argc, char **argv) { |
378 | return (CURLSSLSET_OK != curl_global_sslset(CURLSSLBACKEND_GNUTLS, NULL, NULL)); | 397 | return (CURLSSLSET_OK != curl_global_sslset(CURLSSLBACKEND_GNUTLS, NULL, NULL)); |
379 | } | 398 | } |
380 | ''' | 399 | ''' |
381 | 400 | ||
382 | result = cc.run(curl_ssl_check, name : 'cURL gnutls check', | 401 | result = cc.run(curl_ssl_check, name : 'cURL gnutls check', |
383 | dependencies: curl_dep) | 402 | dependencies: curl_dep) |
384 | cdata.set('curl_gnutls', 0) | 403 | cdata.set('curl_gnutls', 0) |
385 | if result.returncode() == 0 | 404 | if result.returncode() == 0 |
386 | cdata.set('curl_gnutls', 1) | 405 | cdata.set('curl_gnutls', 1) |
@@ -434,27 +453,27 @@ add_test_setup('default', env: ['GNUNET_PREFIX='+gnunet_prefix], exclude_suites: | |||
434 | add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default: false) | 453 | add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default: false) |
435 | 454 | ||
436 | summary({'host': host_machine.system(), | 455 | summary({'host': host_machine.system(), |
437 | 'prefix': get_option('prefix'), | 456 | 'prefix': get_option('prefix'), |
438 | 'compiler': cc.get_id(), | 457 | 'compiler': cc.get_id(), |
439 | 'libdir': get_option('libdir'), | 458 | 'libdir': get_option('libdir'), |
440 | 'datadir': get_option('datadir'), | 459 | 'datadir': get_option('datadir'), |
441 | 'default interface': cdata.get('GNUNET_DEFAULT_INTERFACE'), | 460 | 'default interface': cdata.get('GNUNET_DEFAULT_INTERFACE'), |
442 | 'PostgreSQL': pq_dep.found(), | 461 | 'PostgreSQL': pq_dep.found(), |
443 | 'curl w/ gnutls': (cdata.get('curl_gnutls') == 1), | 462 | 'curl w/ gnutls': (cdata.get('curl_gnutls') == 1), |
444 | 'ifconfig': ifconfig_bin.found(), | 463 | 'ifconfig': ifconfig_bin.found(), |
445 | 'iptables': iptables_bin.found() | 464 | 'iptables': iptables_bin.found() |
446 | }, section: 'Detected system') | 465 | }, section: 'Detected system') |
447 | 466 | ||
448 | if not gnunet_user | 467 | if not gnunet_user |
449 | 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\'') | 468 | 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\'') |
450 | message('Each user of GNUnet should be added to the \'gnunet\' group') | 469 | message('Each user of GNUnet should be added to the \'gnunet\' group') |
451 | if adduser_bin.found() and not gnunet_user | 470 | if adduser_bin.found() and not gnunet_user |
452 | message('''Create the gnunet user and add users to the gnunetdns group, run: | 471 | message('''Create the gnunet user and add users to the gnunetdns group, run: |
453 | # addgroup gnunetdns | 472 | # addgroup gnunetdns |
454 | # adduser --system --disabled-login --home /var/lib/gnunet gnunet''') | 473 | # adduser --system --disabled-login --home /var/lib/gnunet gnunet''') |
455 | message('''To add users to the gnunet group, run: | 474 | message('''To add users to the gnunet group, run: |
456 | # adduser USERNAME gnunet | 475 | # adduser USERNAME gnunet |
457 | for each of your users, replacing \'USERNAME\' with the respective login name. | 476 | for each of your users, replacing \'USERNAME\' with the respective login name. |
458 | Users may have to login again for the changes to take effect.''') | 477 | Users may have to login again for the changes to take effect.''') |
459 | endif | 478 | endif |
460 | endif | 479 | endif |