gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: BUILD: Also generate config. Detect curl


From: gnunet
Subject: [gnunet] branch master updated: BUILD: Also generate config. Detect curl with gnutls
Date: Wed, 20 Sep 2023 16:21:19 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new d27ab7cfb BUILD: Also generate config. Detect curl with gnutls
d27ab7cfb is described below

commit d27ab7cfbd37cd6fd26492b4463c24f392f0899e
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Sep 20 16:21:15 2023 +0200

    BUILD: Also generate config. Detect curl with gnutls
---
 meson.build             | 50 +++++++++++++++++++++++++++++++++++++++++++++----
 meson.options           |  1 +
 src/include/meson.build |  5 +++++
 src/meson.build         |  1 +
 4 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 501cb7c0f..72d586801 100644
--- a/meson.build
+++ b/meson.build
@@ -1,13 +1,27 @@
 ## EXPERIMENTAL --- WORK IN PROGRESS --- USE AT YOUR OWN PERIL --- ##
-project('gnunet', 'c', license: 'AGPLv3', version: '0.21.0')
+project('gnunet', 'c', license: 'AGPLv3')
+
 compiler = meson.get_compiler('c')
 incdir = include_directories('src/include')
 cdata = configuration_data()
 
+# Version
+r = run_command('sh', 'contrib/get_version.sh', check: true)
+cdata.set('gnunet_version', r.stdout().strip())
+r = run_command('sh', 'contrib/get_version.sh', '--major', check: true)
+cdata.set('gnunet_major_version', r.stdout().strip())
+r = run_command('sh', 'contrib/get_version.sh', '--minor', check: true)
+cdata.set('gnunet_minor_version', r.stdout().strip())
+r = run_command('sh', 'contrib/get_version.sh', '--micro', check: true)
+cdata.set('gnunet_micro_version', r.stdout().strip())
 
 
 # TODO: Set to true to build a single libgnunet
 gnunet_monolith = get_option('monolith')
+cdata.set('enable_experimental', get_option('experimental'))
+
+# FIXME
+cdata.set('extractor', 0)
 
 message('Building on ' + host_machine.system())
 
@@ -21,8 +35,9 @@ cdata.set_quoted('GNUNET_DEFAULT_INTERFACE', 'en0')
 cdata.set_quoted('VCS_VERSION', 'mesonbuild')
 add_project_arguments('-DHAVE_CONFIG_H', language : 'c')
 
+# Linker settings
 # Compiler settings
-  add_project_arguments('-fno-strict-aliasing', language : 'c')
+add_project_arguments('-fno-strict-aliasing', language : 'c')
 if compiler.has_argument('-Wno-address-of-packed-member')
   add_project_arguments('-Wno-address-of-packed-member', language : 'c')
 endif
@@ -31,6 +46,10 @@ if 
compiler.has_argument('-Wno-tautological-constant-out-of-range-compare')
 endif
 
 
+if host_machine.system() == 'linux'
+  add_project_link_arguments(['-Wl,--unresolved-symbols=report-all'], language 
: 'c')
+  cdata.set_quoted('GNUNET_DEFAULT_INTERFACE', 'eth0')
+endif
 if host_machine.system() == 'darwin'
   cdata.set_quoted('GNUNET_DEFAULT_INTERFACE', 'en0')
   add_project_arguments('-D_APPLE_C_SOURCE', language : 'c')
@@ -71,10 +90,33 @@ if compiler.has_header('idn2.h')
 endif
 
 
+# GNUTLS DANE
+if compiler.has_header('gnutls/dane.h')
+  add_project_arguments('-DHAVE_GNUTLS_DANE', language : 'c')
+endif
+curl_ssl_check ='''#include <curl/curl.h>
+  int main(int argc, char **argv) {
+    return (CURLSSLSET_OK != curl_global_sslset(CURLSSLBACKEND_GNUTLS, NULL, 
NULL));
+  }
+'''
+result = compiler.run(curl_ssl_check, name : 'cURL gnutls check',
+                      dependencies: curl_dep)
+cdata.set('curl_gnutls', 0)
+if result.returncode() == 0
+  cdata.set('curl_gnutls', 1)
+endif
+
+
 if compiler.has_function('strnlen', prefix : '#include <string.h>')
-  # function exists, do whatever is required.
-  add_project_arguments('-DHAVE_STRNLEN', language : 'c')
+  cdata.set('HAVE_STRNLEN', 1)
+endif
+if compiler.has_function('memset_s')
+  cdata.set('HAVE_MEMSET_S', 1)
 endif
+if compiler.has_function('explicit_bzero')
+  cdata.set('HAVE_EXPLICIT_BZERO', 1)
+endif
+
 
 configure_file(#input: 'gnunet_private_config.h.in',
                output : 'gnunet_private_config.h',
diff --git a/meson.options b/meson.options
index 82e0f5ca6..0fc435ec5 100644
--- a/meson.options
+++ b/meson.options
@@ -1,3 +1,4 @@
 # Build options
 option('monolith', type : 'boolean', value : false, description: 'Build a 
single, monolithic libgnunet shlib')
+option('experimental', type : 'boolean', value : false, description: 'Build 
experimental components')
 
diff --git a/src/include/meson.build b/src/include/meson.build
new file mode 100644
index 000000000..9b7bb017f
--- /dev/null
+++ b/src/include/meson.build
@@ -0,0 +1,5 @@
+configure_file(
+  input : 'gnunet_config.h.in',
+  output : 'gnunet_config.h',
+  configuration : cdata
+)
diff --git a/src/meson.build b/src/meson.build
index 0e7d1aa8a..0e009806b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -2,6 +2,7 @@ if gnunet_monolith == true
   gnunet_src = []
 endif
 
+subdir('include')
 subdir('util')
 subdir('nt')
 subdir('hello')

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]