diff options
author | Thomas White <taw@physics.org> | 2019-05-14 23:13:35 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-05-16 15:15:49 +0200 |
commit | 12196f21e352b952cda3e837cf2467b75dd1e6e6 (patch) | |
tree | 37b3920460bf3aab6cea1c471d7c21c17014cbba | |
parent | d5c8d52bc2d1e76fd7a5c3f425fab271193c6d54 (diff) |
More tests and options
-rw-r--r-- | meson.build | 46 | ||||
-rw-r--r-- | meson_options.txt | 2 |
2 files changed, 47 insertions, 1 deletions
diff --git a/meson.build b/meson.build index c25ca294..4dc04200 100644 --- a/meson.build +++ b/meson.build @@ -40,7 +40,6 @@ conf_data = configuration_data() add_project_arguments('-DHAVE_CONFIG_H', language : 'c') add_project_arguments('-DUSE_THREADS', language : 'c') -conf_data.set('ICONV_CONST', '') add_project_arguments('-DSYSCONFDIR="'+join_paths(get_option('prefix'), get_option('sysconfdir'))+'"', language : 'c') @@ -73,6 +72,17 @@ add_project_arguments('-DLOCALEDIR="'+join_paths(get_option('prefix'), add_project_arguments('-DTARGET_ALIAS="'+host_machine.cpu_family()+'-'+host_machine.system()+'"', language : 'c') +if get_option('update_check') + add_project_arguments('-DUSE_UPDATE_CHECK', language : 'c') + if get_option('update_check_plugin') + add_project_arguments('-DUSE_UPDATE_CHECK_PLUGIN', language : 'c') + endif +else + if get_option('update_check_plugin') + warning('You must set update_check=true to use update_check_plugin=true') + endif +endif + if openssl.found() add_project_arguments('-DUSE_SSL', language : 'c') endif @@ -99,6 +109,13 @@ endif compface = declare_dependency(compile_args : [], link_args : compface_link_args) +if gpgme.found() + if compiler.has_function('gpgme_io_writen', prefix : '#include <gpgme.h>') + conf_data.set('HAVE_GPGME_IO_WRITEN', 1) + endif + conf_data.set('USE_GPGME', 1) +endif + if compiler.has_header('sys/wait.h') conf_data.set('HAVE_SYS_WAIT_H', 1) endif @@ -162,6 +179,11 @@ if compiler.has_function('mlock', prefix : '#include <sys/mman.h>') conf_data.set('HAVE_MLOCK', 1) endif +if compiler.has_function('iconv', prefix : '#include <iconv.h>') + conf_data.set('HAVE_ICONV', 1) +endif +conf_data.set('ICONV_CONST', '') + if compiler.has_function('truncate', prefix : '''#include <unistd.h> #include <sys/types.h> ''') @@ -177,6 +199,28 @@ if compiler.compiles(code, name : 'struct dirent has d_type member') conf_data.set('HAVE_DIRENT_D_TYPE', 1) endif +if host_machine.system() == 'windows' + code = '''#define INET6 + #include <sys/types.h> + #include <winsock2.h> + #include <ws2tcpip.h> + void func() { + int x = IPPROTO_IPV6; struct in6_addr a; + } + ''' +else + code = '''#define INET6 + #include <sys/types.h> + #include <netinet/in.h> + void func() { + int x = IPPROTO_IPV6; struct in6_addr a; + } + ''' +endif +if compiler.compiles(code, name : 'IPv6 is available') + conf_data.set('INET6', 1) +endif + # FIXME: JPilot configure_file(output : 'config.h', diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 00000000..aee07aa0 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('update_check', type : 'boolean', value : false) +option('update_check_plugin', type : 'boolean', value : false) |