Blame SOURCES/0001-add-meson-buildsystem-definitions.patch

6ab9f0
From 0fa42d185e8770a49df5c0820159a25cb402a0b8 Mon Sep 17 00:00:00 2001
6ab9f0
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
6ab9f0
Date: Sun, 18 Dec 2016 10:24:31 +0100
6ab9f0
Subject: [PATCH 1/2] add meson buildsystem definitions
6ab9f0
6ab9f0
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
6ab9f0
---
6ab9f0
 include/meson.build                 |   3 +
6ab9f0
 include/xmlrpc-c/config.h.in        |  41 +++++++
6ab9f0
 include/xmlrpc-c/lnsfr.sh           |   9 ++
6ab9f0
 include/xmlrpc-c/meson.build        |  87 ++++++++++++++
6ab9f0
 lib/abyss++/meson.build             |  43 +++++++
6ab9f0
 lib/abyss/meson.build               |   1 +
6ab9f0
 lib/abyss/src/meson.build           |  66 +++++++++++
6ab9f0
 lib/curl_transport/meson.build      |  16 +++
6ab9f0
 lib/expat/gennmtab/meson.build      |   4 +
6ab9f0
 lib/expat/meson.build               |  15 +++
6ab9f0
 lib/expat/xmlparse/meson.build      |  21 ++++
6ab9f0
 lib/expat/xmltok/meson.build        |  32 ++++++
6ab9f0
 lib/libutil++/meson.build           |  28 +++++
6ab9f0
 lib/libutil/meson.build             |  41 +++++++
6ab9f0
 lib/meson.build                     |  27 +++++
6ab9f0
 lib/openssl/meson.build             |  27 +++++
6ab9f0
 lib/util/meson.build                |  20 ++++
6ab9f0
 meson.build                         | 209 +++++++++++++++++++++++++++++++++
6ab9f0
 meson_options.txt                   |  13 +++
6ab9f0
 src/cpp/meson.build                 | 223 ++++++++++++++++++++++++++++++++++++
6ab9f0
 src/meson.build                     | 190 ++++++++++++++++++++++++++++++
6ab9f0
 tools/lib/meson.build               |   5 +
6ab9f0
 tools/meson.build                   |  17 +++
6ab9f0
 tools/xml-rpc-api2cpp/meson.build   |  21 ++++
6ab9f0
 tools/xml-rpc-api2txt/meson.build   |   2 +
6ab9f0
 tools/xml/meson.build               |  15 +++
6ab9f0
 tools/xmlrpc/meson.build            |  20 ++++
6ab9f0
 tools/xmlrpc_cpp_proxy/meson.build  |  19 +++
6ab9f0
 tools/xmlrpc_dumpserver/meson.build |  23 ++++
6ab9f0
 tools/xmlrpc_pstream/meson.build    |  21 ++++
6ab9f0
 tools/xmlrpc_transport/meson.build  |  18 +++
6ab9f0
 transport_config.h.in               |   4 +
6ab9f0
 xmlrpc-c-config                     | 114 ++++++++++++++++++
6ab9f0
 33 files changed, 1395 insertions(+)
6ab9f0
 create mode 100644 include/meson.build
6ab9f0
 create mode 100644 include/xmlrpc-c/config.h.in
6ab9f0
 create mode 100755 include/xmlrpc-c/lnsfr.sh
6ab9f0
 create mode 100644 include/xmlrpc-c/meson.build
6ab9f0
 create mode 100644 lib/abyss++/meson.build
6ab9f0
 create mode 100644 lib/abyss/meson.build
6ab9f0
 create mode 100644 lib/abyss/src/meson.build
6ab9f0
 create mode 100644 lib/curl_transport/meson.build
6ab9f0
 create mode 100644 lib/expat/gennmtab/meson.build
6ab9f0
 create mode 100644 lib/expat/meson.build
6ab9f0
 create mode 100644 lib/expat/xmlparse/meson.build
6ab9f0
 create mode 100644 lib/expat/xmltok/meson.build
6ab9f0
 create mode 100644 lib/libutil++/meson.build
6ab9f0
 create mode 100644 lib/libutil/meson.build
6ab9f0
 create mode 100644 lib/meson.build
6ab9f0
 create mode 100644 lib/openssl/meson.build
6ab9f0
 create mode 100644 lib/util/meson.build
6ab9f0
 create mode 100644 meson.build
6ab9f0
 create mode 100644 meson_options.txt
6ab9f0
 create mode 100644 src/cpp/meson.build
6ab9f0
 create mode 100644 src/meson.build
6ab9f0
 create mode 100644 tools/lib/meson.build
6ab9f0
 create mode 100644 tools/meson.build
6ab9f0
 create mode 100644 tools/xml-rpc-api2cpp/meson.build
6ab9f0
 create mode 100644 tools/xml-rpc-api2txt/meson.build
6ab9f0
 create mode 100644 tools/xml/meson.build
6ab9f0
 create mode 100644 tools/xmlrpc/meson.build
6ab9f0
 create mode 100644 tools/xmlrpc_cpp_proxy/meson.build
6ab9f0
 create mode 100644 tools/xmlrpc_dumpserver/meson.build
6ab9f0
 create mode 100644 tools/xmlrpc_pstream/meson.build
6ab9f0
 create mode 100644 tools/xmlrpc_transport/meson.build
6ab9f0
 create mode 100644 transport_config.h.in
6ab9f0
 create mode 100755 xmlrpc-c-config
6ab9f0
6ab9f0
diff --git a/include/meson.build b/include/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..ec0964c0
6ab9f0
--- /dev/null
6ab9f0
+++ b/include/meson.build
6ab9f0
@@ -0,0 +1,3 @@
6ab9f0
+hdr_incdir = include_directories('.')
6ab9f0
+
6ab9f0
+subdir('xmlrpc-c')
6ab9f0
diff --git a/include/xmlrpc-c/config.h.in b/include/xmlrpc-c/config.h.in
6ab9f0
new file mode 100644
6ab9f0
index 00000000..e8a633e7
6ab9f0
--- /dev/null
6ab9f0
+++ b/include/xmlrpc-c/config.h.in
6ab9f0
@@ -0,0 +1,41 @@
6ab9f0
+#ifndef XMLRPC_C_CONFIG_H_INCULDED
6ab9f0
+#define XMLRPC_C_CONFIG_H_INCLUDED
6ab9f0
+
6ab9f0
+/* This file, part of XML-RPC For C/C++, is meant to 
6ab9f0
+   define characteristics of this particular installation 
6ab9f0
+   that the other <xmlrpc-c/...> header files need in 
6ab9f0
+   order to compile correctly when #included in Xmlrpc-c
6ab9f0
+   user code.
6ab9f0
+
6ab9f0
+   Those header files #include this one.
6ab9f0
+*/
6ab9f0
+#define XMLRPC_HAVE_WCHAR @HAVE_WCHAR_H_DEFINE@
6ab9f0
+#ifdef _WIN32
6ab9f0
+  /* SOCKET is a type defined by <winsock.h>.  Anyone who
6ab9f0
+     uses XMLRPC_SOCKET on a WIN32 system must #include
6ab9f0
+     <winsock.h>
6ab9f0
+  */
6ab9f0
+  #define XMLRPC_SOCKET SOCKET
6ab9f0
+  #define XMLRPC_HAVE_TIMEVAL 0
6ab9f0
+  #define XMLRPC_HAVE_TIMESPEC 0
6ab9f0
+  #define XMLRPC_HAVE_PTHREAD 0
6ab9f0
+  #define XMLRPC_HAVE_WINTHREAD 1
6ab9f0
+#else
6ab9f0
+  #define XMLRPC_SOCKET int
6ab9f0
+  #define XMLRPC_HAVE_TIMEVAL 1
6ab9f0
+  #define XMLRPC_HAVE_TIMESPEC 1
6ab9f0
+  #define XMLRPC_HAVE_PTHREAD 1
6ab9f0
+  #define XMLRPC_HAVE_WINTHREAD 0
6ab9f0
+#endif
6ab9f0
+
6ab9f0
+#if defined(_MSC_VER)
6ab9f0
+  /* Newer MSVC has long long, but MSVC 6 does not */
6ab9f0
+  #define XMLRPC_INT64 __int64
6ab9f0
+  #define XMLRPC_PRId64 "I64"
6ab9f0
+  #define XMLRPC_INT32 __int32
6ab9f0
+#else
6ab9f0
+  #define XMLRPC_INT64 long long
6ab9f0
+  #define XMLRPC_PRId64 "lld"
6ab9f0
+  #define XMLRPC_INT32 int
6ab9f0
+#endif
6ab9f0
+#endif
6ab9f0
diff --git a/include/xmlrpc-c/lnsfr.sh b/include/xmlrpc-c/lnsfr.sh
6ab9f0
new file mode 100755
6ab9f0
index 00000000..83f231b7
6ab9f0
--- /dev/null
6ab9f0
+++ b/include/xmlrpc-c/lnsfr.sh
6ab9f0
@@ -0,0 +1,9 @@
6ab9f0
+#!/bin/sh -efu
6ab9f0
+
6ab9f0
+if [ "$#" != 2 ]; then
6ab9f0
+  exit 1
6ab9f0
+fi
6ab9f0
+
6ab9f0
+tgt="$1"; shift
6ab9f0
+src="$1"; shift
6ab9f0
+ln -sfr "${DESTDIR}${tgt}" "${DESTDIR}${src}"
6ab9f0
diff --git a/include/xmlrpc-c/meson.build b/include/xmlrpc-c/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..761acfd4
6ab9f0
--- /dev/null
6ab9f0
+++ b/include/xmlrpc-c/meson.build
6ab9f0
@@ -0,0 +1,87 @@
6ab9f0
+config_h = configure_file(input : 'config.h.in',
6ab9f0
+                          output : 'config.h',
6ab9f0
+                          configuration : conf)
6ab9f0
+
6ab9f0
+compat_links = [
6ab9f0
+  [ 'oldxmlrpc.h',         'xmlrpc.h'                   ],
6ab9f0
+  [ 'server.h',            'xmlrpc_server.h'            ],
6ab9f0
+  [ 'server_abyss.h',      'xmlrpc_abyss.h'             ],
6ab9f0
+  [ 'server_w32httpsys.h', 'xmlrpc_server_w32httpsys.h' ],
6ab9f0
+]
6ab9f0
+
6ab9f0
+hdrs = [
6ab9f0
+  join_paths(meson.current_build_dir(), 'config.h'), # config_h,
6ab9f0
+  'inttypes.h',
6ab9f0
+  'c_util.h',
6ab9f0
+  'util.h',
6ab9f0
+  'base.h',
6ab9f0
+  'json.h',
6ab9f0
+  'abyss.h',
6ab9f0
+  'abyss_unixsock.h',
6ab9f0
+  'abyss_winsock.h',
6ab9f0
+  'server.h',
6ab9f0
+  'server_abyss.h',
6ab9f0
+  'server_w32httpsys.h',
6ab9f0
+  'oldxmlrpc.h',
6ab9f0
+]
6ab9f0
+if get_option('cplusplus')
6ab9f0
+  hdrs += [
6ab9f0
+    'oldcppwrapper.hpp',
6ab9f0
+    'girerr.hpp',
6ab9f0
+    'girmem.hpp',
6ab9f0
+    'base.hpp',
6ab9f0
+    'base64.hpp',
6ab9f0
+    'timeout.hpp',
6ab9f0
+    'xml.hpp',
6ab9f0
+    'registry.hpp',
6ab9f0
+    'server_abyss.hpp',
6ab9f0
+    'packetsocket.hpp',
6ab9f0
+    'server_pstream.hpp',
6ab9f0
+    'AbyssEnvironment.hpp',
6ab9f0
+    'AbyssServer.hpp',
6ab9f0
+    'abyss_reqhandler_xmlrpc.hpp',
6ab9f0
+    'AbyssChanSwitch.hpp',
6ab9f0
+    'AbyssChanSwitchUnix.hpp',
6ab9f0
+  ]
6ab9f0
+  compat_links += [
6ab9f0
+    ['oldcppwrapper.hpp', 'XmlRpcCpp.h'],
6ab9f0
+  ]
6ab9f0
+endif
6ab9f0
+if build_client
6ab9f0
+  hdrs += [
6ab9f0
+    'client.h',
6ab9f0
+    'transport.h',
6ab9f0
+    'client_global.h',
6ab9f0
+  ]
6ab9f0
+  compat_links += [
6ab9f0
+    ['client.h', 'xmlrpc_client.h'],
6ab9f0
+  ]
6ab9f0
+  if get_option('cplusplus')
6ab9f0
+    hdrs += [
6ab9f0
+      'client.hpp',
6ab9f0
+      'client_transport.hpp',
6ab9f0
+      'client_simple.hpp',
6ab9f0
+    ]
6ab9f0
+  endif
6ab9f0
+endif
6ab9f0
+if get_option('cgi-server')
6ab9f0
+  hdrs += [
6ab9f0
+    'server_cgi.h',
6ab9f0
+  ]
6ab9f0
+  compat_links += [
6ab9f0
+    ['server_cgi.h', 'xmlrpc_cgi.h'],
6ab9f0
+  ]
6ab9f0
+endif
6ab9f0
+if get_option('abyss-openssl')
6ab9f0
+  hdrs += [
6ab9f0
+    'openssl_thread.h',
6ab9f0
+  ]
6ab9f0
+endif
6ab9f0
+
6ab9f0
+install_headers(hdrs, subdir : meson.project_name())
6ab9f0
+# Install old names of header files for backward compatibility
6ab9f0
+foreach compat_link : compat_links
6ab9f0
+  tgt = join_paths(get_option('prefix'), get_option('includedir'), meson.project_name(), compat_link[0])
6ab9f0
+  src = join_paths(get_option('prefix'), get_option('includedir'), compat_link[1])
6ab9f0
+  meson.add_install_script('lnsfr.sh', tgt, src)
6ab9f0
+endforeach
6ab9f0
diff --git a/lib/abyss++/meson.build b/lib/abyss++/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..19f04cc3
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/abyss++/meson.build
6ab9f0
@@ -0,0 +1,43 @@
6ab9f0
+if host_machine.system() == 'windows'
6ab9f0
+  abysspp_chan_switch = 'AbyssChanSwitchWin.cpp'
6ab9f0
+else
6ab9f0
+  abysspp_chan_switch = ['AbyssChanSwitchUnix.cpp']
6ab9f0
+  if get_option('abyss-openssl')
6ab9f0
+    abysspp_chan_switch += ['AbyssChanSwitchOpenSsl.cpp']
6ab9f0
+  endif
6ab9f0
+endif
6ab9f0
+
6ab9f0
+libxmlrpc_abysspp = library(
6ab9f0
+  'xmlrpc_abyss++',
6ab9f0
+  sources : [
6ab9f0
+    'AbyssServer.cpp',
6ab9f0
+    'AbyssChanSwitch.cpp',
6ab9f0
+    'AbyssEnvironment.cpp',
6ab9f0
+    abysspp_chan_switch,
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc_abyss,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+    libxmlrpc_utilpp,
6ab9f0
+  ],
6ab9f0
+  dependencies : [
6ab9f0
+    socket,
6ab9f0
+  ],
6ab9f0
+  soversion : 8,
6ab9f0
+  version : '8.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_abyss++',
6ab9f0
+  description : 'Xmlrpc-c Abyss HTTP C++ library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : ['xmlrpc_abyss', 'xmlrpc_util', 'xmlrpc_util++'],
6ab9f0
+  libraries : libxmlrpc_abysspp,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/abyss/meson.build b/lib/abyss/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..9537275d
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/abyss/meson.build
6ab9f0
@@ -0,0 +1 @@
6ab9f0
+subdir('src')
6ab9f0
diff --git a/lib/abyss/src/meson.build b/lib/abyss/src/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..daa91fce
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/abyss/src/meson.build
6ab9f0
@@ -0,0 +1,66 @@
6ab9f0
+abyss_deps = [socket]
6ab9f0
+if host_machine.system() == 'windows'
6ab9f0
+  abyss_socket = 'socket_win.c'
6ab9f0
+  abyss_thread = 'thread_windows.c'
6ab9f0
+  abyss_deps += [threads]
6ab9f0
+else
6ab9f0
+  abyss_socket = ['socket_unix.c']
6ab9f0
+  if get_option('abyss-openssl')
6ab9f0
+    abyss_socket += ['socket_openssl.c']
6ab9f0
+    abyss_deps += [openssl]
6ab9f0
+  endif
6ab9f0
+  abyss_socket += ['sockutil.c']
6ab9f0
+
6ab9f0
+  if get_option('abyss-threads')
6ab9f0
+    abyss_thread = 'thread_pthread.c'
6ab9f0
+    abyss_deps += [threads]
6ab9f0
+  else
6ab9f0
+    abyss_thread = 'thread_fork.c'
6ab9f0
+  endif
6ab9f0
+endif
6ab9f0
+
6ab9f0
+libxmlrpc_abyss = library(
6ab9f0
+  'xmlrpc_abyss',
6ab9f0
+  sources : [
6ab9f0
+    'channel.c',
6ab9f0
+    'chanswitch.c',
6ab9f0
+    'conf.c',
6ab9f0
+    'conn.c',
6ab9f0
+    'data.c',
6ab9f0
+    'date.c',
6ab9f0
+    'file.c',
6ab9f0
+    'handler.c',
6ab9f0
+    'http.c',
6ab9f0
+    'init.c',
6ab9f0
+    'response.c',
6ab9f0
+    'server.c',
6ab9f0
+    'session.c',
6ab9f0
+    'sessionReadRequest.c',
6ab9f0
+    'socket.c',
6ab9f0
+    abyss_socket,
6ab9f0
+    'token.c',
6ab9f0
+    abyss_thread,
6ab9f0
+    'trace.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc_util,
6ab9f0
+  ],
6ab9f0
+  dependencies : abyss_deps,
6ab9f0
+  soversion : 3,
6ab9f0
+  version : '3.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_abyss',
6ab9f0
+  description : 'Xmlrpc-c Abyss HTTP C library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  libraries : libxmlrpc_abyss,
6ab9f0
+  requires_private : 'xmlrpc_util',
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/curl_transport/meson.build b/lib/curl_transport/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..f5ff3040
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/curl_transport/meson.build
6ab9f0
@@ -0,0 +1,16 @@
6ab9f0
+libcurl = dependency('libcurl')
6ab9f0
+if libcurl.version().version_compare('<7.16.0')
6ab9f0
+  xmlrpc_curl_cargs = ['-DNEED_CURL_TYPES_H']
6ab9f0
+else
6ab9f0
+  xmlrpc_curl_cargs = []
6ab9f0
+endif
6ab9f0
+xmlrpc_curl_transport = declare_dependency(
6ab9f0
+  include_directories : include_directories('.'),
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_curl_transport.c',
6ab9f0
+    'curltransaction.c',
6ab9f0
+    'curlmulti.c',
6ab9f0
+  ],
6ab9f0
+  compile_args : xmlrpc_curl_cargs,
6ab9f0
+  dependencies : libcurl,
6ab9f0
+)
6ab9f0
diff --git a/lib/expat/gennmtab/meson.build b/lib/expat/gennmtab/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..94764c22
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/expat/gennmtab/meson.build
6ab9f0
@@ -0,0 +1,4 @@
6ab9f0
+gennmtab = executable(
6ab9f0
+  'gennmtab', 'gennmtab.c',
6ab9f0
+  include_directories : top_incdir,
6ab9f0
+)
6ab9f0
diff --git a/lib/expat/meson.build b/lib/expat/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..df9ca84c
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/expat/meson.build
6ab9f0
@@ -0,0 +1,15 @@
6ab9f0
+subdir('gennmtab')
6ab9f0
+subdir('xmltok')
6ab9f0
+subdir('xmlparse')
6ab9f0
+
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_expat',
6ab9f0
+  description : 'Xmlrpc-c XML parsing library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private: 'xmlrpc_util',
6ab9f0
+  libraries : [
6ab9f0
+    libxmlrpc_xmlparse,
6ab9f0
+    libxmlrpc_xmltok,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/expat/xmlparse/meson.build b/lib/expat/xmlparse/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..39c0bf26
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/expat/xmlparse/meson.build
6ab9f0
@@ -0,0 +1,21 @@
6ab9f0
+xmlparse_incdir = include_directories('.')
6ab9f0
+
6ab9f0
+libxmlrpc_xmlparse = library(
6ab9f0
+  'xmlrpc_xmlparse',
6ab9f0
+  sources : [
6ab9f0
+    'xmlparse.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+    xmltok_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc_util,
6ab9f0
+    libxmlrpc_xmltok,
6ab9f0
+  ],
6ab9f0
+  soversion : '3',
6ab9f0
+  version : '3.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/expat/xmltok/meson.build b/lib/expat/xmltok/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..6629719c
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/expat/xmltok/meson.build
6ab9f0
@@ -0,0 +1,32 @@
6ab9f0
+nametab = custom_target(
6ab9f0
+  'nametab.h',
6ab9f0
+  output : 'nametab.h',
6ab9f0
+  command : gennmtab,
6ab9f0
+  capture : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+if host_machine.endian() == 'big'
6ab9f0
+  xmltok_endian_flag = '-DXML_BYTE_ORDER=21'
6ab9f0
+else
6ab9f0
+  xmltok_endian_flag = '-DXML_BYTE_ORDER=12'
6ab9f0
+endif
6ab9f0
+
6ab9f0
+libxmlrpc_xmltok = library(
6ab9f0
+  'xmlrpc_xmltok',
6ab9f0
+  sources : [
6ab9f0
+    'xmltok.c',
6ab9f0
+    'xmlrole.c',
6ab9f0
+    nametab,
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  c_args : [xmltok_endian_flag],
6ab9f0
+  soversion : '3',
6ab9f0
+  version : '3.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+xmltok_incdir = include_directories('.')
6ab9f0
diff --git a/lib/libutil++/meson.build b/lib/libutil++/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..9764c08d
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/libutil++/meson.build
6ab9f0
@@ -0,0 +1,28 @@
6ab9f0
+libxmlrpc_utilpp = library(
6ab9f0
+  'xmlrpc_util++',
6ab9f0
+  sources : [
6ab9f0
+    'Lock.cpp',
6ab9f0
+    'base64.cpp',
6ab9f0
+    'env_wrap.cpp',
6ab9f0
+    'girerr.cpp',
6ab9f0
+    'girmem.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : libxmlrpc_util,
6ab9f0
+  soversion : '8',
6ab9f0
+  version : '8.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_util++',
6ab9f0
+  description : 'Xmlrpc-c C++ utility functions library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : 'xmlrpc_util',
6ab9f0
+  libraries : libxmlrpc_utilpp,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/libutil/meson.build b/lib/libutil/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..bb1cc67d
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/libutil/meson.build
6ab9f0
@@ -0,0 +1,41 @@
6ab9f0
+# FIXME: it's default already to 1 in xmlrpc_config.h
6ab9f0
+util_lock_pthread = ['lock_pthread.c']
6ab9f0
+# TODO: handle mscvrt.dll properly
6ab9f0
+util_lock_windows = [] # lock_windows.c
6ab9f0
+
6ab9f0
+libxmlrpc_util = library(
6ab9f0
+  'xmlrpc_util',
6ab9f0
+  sources : [
6ab9f0
+    'asprintf.c',
6ab9f0
+    'base64.c',
6ab9f0
+    'error.c',
6ab9f0
+    'lock_platform.c',
6ab9f0
+    util_lock_pthread,
6ab9f0
+    util_lock_windows,
6ab9f0
+    'lock_none.c',
6ab9f0
+    'make_printable.c',
6ab9f0
+    'memblock.c',
6ab9f0
+    'mempool.c',
6ab9f0
+    'select.c',
6ab9f0
+    'sleep.c',
6ab9f0
+    'string_number.c',
6ab9f0
+    'time.c',
6ab9f0
+    'utf8.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  soversion : 4,
6ab9f0
+  version : '4.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_util',
6ab9f0
+  description : 'Xmlrpc-c utility functions library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  libraries : libxmlrpc_util,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/meson.build b/lib/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..e78c1f83
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/meson.build
6ab9f0
@@ -0,0 +1,27 @@
6ab9f0
+subdir('util')
6ab9f0
+subdir('libutil')
6ab9f0
+if get_option('cplusplus')
6ab9f0
+  subdir('libutil++')
6ab9f0
+endif
6ab9f0
+if get_option('abyss-server')
6ab9f0
+  subdir('abyss')
6ab9f0
+  if get_option('cplusplus')
6ab9f0
+    subdir('abyss++')
6ab9f0
+  endif
6ab9f0
+endif
6ab9f0
+if get_option('wininet-client')
6ab9f0
+  subdir('wininet_transport')
6ab9f0
+endif
6ab9f0
+if get_option('curl-client')
6ab9f0
+  subdir('curl_transport')
6ab9f0
+endif
6ab9f0
+if get_option('libwww-client')
6ab9f0
+  subdir('libwww_transport')
6ab9f0
+endif
6ab9f0
+if not get_option('libxml2-backend')
6ab9f0
+  subdir('expat')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if openssl.found()
6ab9f0
+  subdir('openssl')
6ab9f0
+endif
6ab9f0
diff --git a/lib/openssl/meson.build b/lib/openssl/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..f65a4dc1
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/openssl/meson.build
6ab9f0
@@ -0,0 +1,27 @@
6ab9f0
+libxmlrpc_openssl = library(
6ab9f0
+  'xmlrpc_openssl',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_openssl_thread.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc_util,
6ab9f0
+  ],
6ab9f0
+  dependencies : openssl,
6ab9f0
+  soversion : '1',
6ab9f0
+  version : '1.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_openssl',
6ab9f0
+  description : 'Openssl convenience function from Xmlrpc-c package',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : 'xmlrpc_util',
6ab9f0
+  libraries : libxmlrpc_openssl,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/lib/util/meson.build b/lib/util/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..4cae4926
6ab9f0
--- /dev/null
6ab9f0
+++ b/lib/util/meson.build
6ab9f0
@@ -0,0 +1,20 @@
6ab9f0
+util_incdir = include_directories('include')
6ab9f0
+util_casprintf_dep = declare_dependency(
6ab9f0
+  include_directories : util_incdir,
6ab9f0
+  sources : 'casprintf.c',
6ab9f0
+)
6ab9f0
+util_dep = declare_dependency(
6ab9f0
+  dependencies : util_casprintf_dep,
6ab9f0
+  sources : [
6ab9f0
+    'cmdline_parser.c',
6ab9f0
+    'getoptx.c',
6ab9f0
+    'string_parser.c',
6ab9f0
+    'stripcaseeq.c',
6ab9f0
+  ],
6ab9f0
+)
6ab9f0
+if get_option('cplusplus')
6ab9f0
+  util_cpp_dep = declare_dependency(
6ab9f0
+    dependencies : util_dep,
6ab9f0
+    sources : 'cmdline_parser_cpp.cpp',
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
diff --git a/meson.build b/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..52a0f0eb
6ab9f0
--- /dev/null
6ab9f0
+++ b/meson.build
6ab9f0
@@ -0,0 +1,209 @@
6ab9f0
+project('xmlrpc-c', 'c',
6ab9f0
+        version : '1.51.0',
6ab9f0
+        default_options : [
6ab9f0
+          'b_asneeded=true',
6ab9f0
+          'b_lundef=true',
6ab9f0
+          'warning_level=1',
6ab9f0
+        ],
6ab9f0
+        meson_version : '>=0.36.0')
6ab9f0
+
6ab9f0
+version_array = meson.project_version().split('.')
6ab9f0
+version_major = version_array[0].to_int()
6ab9f0
+version_minor = version_array[1].to_int()
6ab9f0
+version_point = version_array[2].to_int()
6ab9f0
+
6ab9f0
+# version.h
6ab9f0
+version_conf = configuration_data()
6ab9f0
+version_conf.set_quoted('XMLRPC_C_VERSION', meson.project_version())
6ab9f0
+version_conf.set('XMLRPC_VERSION_MAJOR', version_major)
6ab9f0
+version_conf.set('XMLRPC_VERSION_MINOR', version_minor)
6ab9f0
+version_conf.set('XMLRPC_VERSION_POINT', version_point)
6ab9f0
+configure_file(output : 'version.h', configuration : version_conf)
6ab9f0
+
6ab9f0
+if get_option('wininet-client') or get_option('libwww-client')
6ab9f0
+  error('only curl-client is implemented yet')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if get_option('cplusplus')
6ab9f0
+  add_languages('cpp')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+cc = meson.get_compiler('c')
6ab9f0
+cxx = meson.get_compiler('cpp')
6ab9f0
+
6ab9f0
+optflags = [
6ab9f0
+  '-Wno-uninitialized',
6ab9f0
+  '-Wundef',
6ab9f0
+  '-Wno-unknown-pragmas',
6ab9f0
+]
6ab9f0
+cflags = [
6ab9f0
+  '-Wmissing-declarations',
6ab9f0
+  '-Wstrict-prototypes',
6ab9f0
+  '-Wmissing-prototypes',
6ab9f0
+  '-Wimplicit',
6ab9f0
+] + optflags
6ab9f0
+cxxflags = [
6ab9f0
+  '-Wsynth',
6ab9f0
+] + optflags
6ab9f0
+foreach cflag : cflags
6ab9f0
+  if cc.has_argument(cflag)
6ab9f0
+    add_project_arguments(cflag, language : 'c')
6ab9f0
+  endif
6ab9f0
+endforeach
6ab9f0
+foreach cxxflag : cxxflags
6ab9f0
+  if cxx.has_argument(cxxflag)
6ab9f0
+    add_project_arguments(cxxflag, language : 'cpp')
6ab9f0
+  endif
6ab9f0
+endforeach
6ab9f0
+
6ab9f0
+pkgg = import('pkgconfig')
6ab9f0
+
6ab9f0
+if not cc.has_function('vsnprintf')
6ab9f0
+  error('your C library does not provide vsnprintf')
6ab9f0
+endif
6ab9f0
+if not cc.has_header('stdarg.h')
6ab9f0
+  error('stdarg.h is required to build this library')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+conf = configuration_data()
6ab9f0
+
6ab9f0
+check_headers = [
6ab9f0
+  'wchar.h',
6ab9f0
+  'sys/filio.h',  # Needed by Abyss on Solaris
6ab9f0
+  'sys/ioctl.h',  # Needed by Abyss on Solaris
6ab9f0
+  'sys/select.h',
6ab9f0
+]
6ab9f0
+check_functions = [
6ab9f0
+  'wcsncmp',      # Unicode function needed by test suites
6ab9f0
+  'setgroups',    # CygWin doesn't provide setgroups
6ab9f0
+  'asprintf',
6ab9f0
+  'setenv',
6ab9f0
+  'strtoll',
6ab9f0
+  'strtoull',
6ab9f0
+  'strtoq',
6ab9f0
+  'strtouq',
6ab9f0
+  '__strtoll',
6ab9f0
+  '__strtoull',
6ab9f0
+  '_strtoui64',
6ab9f0
+  'pselect',      # uclib doesn't have pselect
6ab9f0
+  'gettimeofday', # Windows doesn't have gettimeofday
6ab9f0
+  'localtime_r',  # Windows doesn't have localtime_r
6ab9f0
+  'gmtime_r',     # Windows doesn't have gmtime_r
6ab9f0
+  'strcasecmp',   # Windows doesn't have strcasecmp
6ab9f0
+  'stricmp',
6ab9f0
+  '_stricmp',
6ab9f0
+]
6ab9f0
+
6ab9f0
+foreach hdr : check_headers
6ab9f0
+  if cc.has_header(hdr)
6ab9f0
+    conf.set('HAVE_@0@_DEFINE'.format(hdr.to_upper().underscorify()), 1)
6ab9f0
+  else
6ab9f0
+    conf.set('HAVE_@0@_DEFINE'.format(hdr.to_upper().underscorify()), 0)
6ab9f0
+  endif
6ab9f0
+endforeach
6ab9f0
+foreach func : check_functions
6ab9f0
+  if cc.has_function(func)
6ab9f0
+    conf.set('HAVE_@0@_DEFINE'.format(func.to_upper()), 1)
6ab9f0
+  else
6ab9f0
+    conf.set('HAVE_@0@_DEFINE'.format(func.to_upper()), 0)
6ab9f0
+  endif
6ab9f0
+endforeach
6ab9f0
+
6ab9f0
+if not cc.compiles('''
6ab9f0
+#include <stdarg.h>
6ab9f0
+
6ab9f0
+int
6ab9f0
+main ()
6ab9f0
+{
6ab9f0
+  va_list list1, list2;
6ab9f0
+  list1 = list2;
6ab9f0
+  return 0;
6ab9f0
+}
6ab9f0
+               ''')
6ab9f0
+  conf.set('VA_LIST_IS_ARRAY_DEFINE', 1)
6ab9f0
+else
6ab9f0
+  conf.set('VA_LIST_IS_ARRAY_DEFINE', 0)
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if cc.compiles('int x __attribute__((__unused__));')
6ab9f0
+  conf.set('ATTR_UNUSED', '__attribute__((__unused__))')
6ab9f0
+else
6ab9f0
+  conf.set('ATTR_UNUSED', '')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if host_machine.system() == 'windows'
6ab9f0
+  conf.set('DIRECTORY_SEPARATOR', '\\')
6ab9f0
+else
6ab9f0
+  conf.set('DIRECTORY_SEPARATOR', '/')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+openssl = dependency('openssl', required : get_option('abyss-openssl'))
6ab9f0
+if get_option('abyss-openssl')
6ab9f0
+  conf.set('HAVE_ABYSS_OPENSSL_DEFINE', 1)
6ab9f0
+else
6ab9f0
+  conf.set('HAVE_ABYSS_OPENSSL_DEFINE', 0)
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if get_option('libwww-ssl')
6ab9f0
+  conf.set('HAVE_LIBWWW_SSL_DEFINE', 1)
6ab9f0
+else
6ab9f0
+  conf.set('HAVE_LIBWWW_SSL_DEFINE', 0)
6ab9f0
+endif
6ab9f0
+
6ab9f0
+configure_file(input : 'xmlrpc_config.h.in', output : 'xmlrpc_config.h', configuration : conf)
6ab9f0
+
6ab9f0
+ncurses = cc.find_library('ncurses', required : false)
6ab9f0
+readline = cc.find_library('readline', required : false)
6ab9f0
+
6ab9f0
+build_xmlrpc_pstream = false
6ab9f0
+
6ab9f0
+if not get_option('wininet-client') and not get_option('curl-client') and not get_option('libwww-client')
6ab9f0
+  build_client = false
6ab9f0
+  build_tools = false
6ab9f0
+  message('We are not building any client XML transport, therefore WE WILL NOT BUILD THE CLIENT LIBRARY')
6ab9f0
+else
6ab9f0
+  build_client = true
6ab9f0
+  if ncurses.found() and readline.found()
6ab9f0
+    build_xmlrpc_pstream = true
6ab9f0
+  endif
6ab9f0
+  build_tools = true
6ab9f0
+  # transport_config.h
6ab9f0
+  transport_conf = configuration_data()
6ab9f0
+  if get_option('wininet-client')
6ab9f0
+    transport_conf.set('MUST_BUILD_WININET_CLIENT', 1)
6ab9f0
+    transport_conf.set_quoted('XMLRPC_DEFAULT_TRANSPORT', 'wininet')
6ab9f0
+  else
6ab9f0
+    transport_conf.set('MUST_BUILD_WININET_CLIENT', 0)
6ab9f0
+  endif
6ab9f0
+  if get_option('curl-client')
6ab9f0
+    transport_conf.set('MUST_BUILD_CURL_CLIENT', 1)
6ab9f0
+    transport_conf.set_quoted('XMLRPC_DEFAULT_TRANSPORT', 'curl')
6ab9f0
+  else
6ab9f0
+    transport_conf.set('MUST_BUILD_CURL_CLIENT', 0)
6ab9f0
+  endif
6ab9f0
+  if get_option('libwww-client')
6ab9f0
+    transport_conf.set('MUST_BUILD_LIBWWW_CLIENT', 1)
6ab9f0
+    transport_conf.set_quoted('XMLRPC_DEFAULT_TRANSPORT', 'libwww')
6ab9f0
+  else
6ab9f0
+    transport_conf.set('MUST_BUILD_LIBWWW_CLIENT', 0)
6ab9f0
+  endif
6ab9f0
+  configure_file(input : 'transport_config.h.in', output : 'transport_config.h', configuration : transport_conf)
6ab9f0
+endif
6ab9f0
+
6ab9f0
+threads = dependency('threads')
6ab9f0
+socket = cc.find_library('socket', required : false)
6ab9f0
+
6ab9f0
+if get_option('libxml2-backend')
6ab9f0
+  libxml2 = dependency('libxml-2.0')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+top_incdir = include_directories('.')
6ab9f0
+
6ab9f0
+subdir('include')
6ab9f0
+subdir('lib')
6ab9f0
+subdir('src')
6ab9f0
+if build_tools
6ab9f0
+  subdir('tools')
6ab9f0
+endif
6ab9f0
+
6ab9f0
+install_data('xmlrpc-c-config', install_dir : get_option('bindir'))
6ab9f0
diff --git a/meson_options.txt b/meson_options.txt
6ab9f0
new file mode 100644
6ab9f0
index 00000000..4e2c1607
6ab9f0
--- /dev/null
6ab9f0
+++ b/meson_options.txt
6ab9f0
@@ -0,0 +1,13 @@
6ab9f0
+option('wininet-client',  type : 'boolean', value : false, description : 'Build the Wininet client XML transport')
6ab9f0
+option('curl-client',     type : 'boolean', value : true,  description : 'Build the Curl client XML transport')
6ab9f0
+option('libwww-client',   type : 'boolean', value : false, description : 'Build the Libwww client XML transport')
6ab9f0
+
6ab9f0
+option('abyss-server',    type : 'boolean', value : true,  description : 'Build the Abyss server module')
6ab9f0
+option('abyss-threads',   type:  'boolean', value : true,  description : 'Use fork in Abyss instead of pthreads')
6ab9f0
+option('abyss-openssl',   type:  'boolean', value : true,  description : 'Build Abyss Openssl channel function')
6ab9f0
+option('cgi-server',      type : 'boolean', value : true,  description : 'Build the CGI server module')
6ab9f0
+
6ab9f0
+option('cplusplus',       type : 'boolean', value : true,  description : 'Build the C++ wrapper classes or tools')
6ab9f0
+
6ab9f0
+option('libwww-ssl',      type : 'boolean', value : false, description : 'Use SSL with libwww')
6ab9f0
+option('libxml2-backend', type : 'boolean', value : false, description : 'Use libxml2 instead of built-in expat')
6ab9f0
diff --git a/src/cpp/meson.build b/src/cpp/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..f0fd74f6
6ab9f0
--- /dev/null
6ab9f0
+++ b/src/cpp/meson.build
6ab9f0
@@ -0,0 +1,223 @@
6ab9f0
+libxmlrpc_cpp = library(
6ab9f0
+  'xmlrpc_cpp',
6ab9f0
+  sources : [
6ab9f0
+    'XmlRpcCpp.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+    libxmlrpc_server,
6ab9f0
+  ],
6ab9f0
+  soversion : 8,
6ab9f0
+  version : '8.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+libxmlrpcpp = library(
6ab9f0
+  'xmlrpc++',
6ab9f0
+  sources : [
6ab9f0
+    'fault.cpp',
6ab9f0
+    'global.cpp',
6ab9f0
+    'outcome.cpp',
6ab9f0
+    'param_list.cpp',
6ab9f0
+    'value.cpp',
6ab9f0
+    'xml.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+    libxmlrpc_utilpp,
6ab9f0
+  ],
6ab9f0
+  soversion : 8,
6ab9f0
+  version : '8.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc++',
6ab9f0
+  description : 'Xmlrpc-c basic XML-RPC C++ library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : ['xmlrpc', 'xmlrpc_util', 'xmlrpc_util++'],
6ab9f0
+  libraries : libxmlrpcpp,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+libxmlrpc_serverpp = library(
6ab9f0
+  'xmlrpc_server++',
6ab9f0
+  sources : [
6ab9f0
+    'registry.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpcpp,
6ab9f0
+    libxmlrpc_server,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+    libxmlrpc_utilpp,
6ab9f0
+  ],
6ab9f0
+  soversion : 8,
6ab9f0
+  version : '8.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_server++',
6ab9f0
+  description : 'Xmlrpc-c XML-RPC server C++ library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : ['xmlrpc', 'xmlrpc++', 'xmlrpc_server', 'xmlrpc_util', 'xmlrpc_util++'],
6ab9f0
+  libraries : libxmlrpc_serverpp,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+if get_option('abyss-server')
6ab9f0
+  libxmlrpc_server_abysspp = library(
6ab9f0
+    'xmlrpc_server_abyss++',
6ab9f0
+    sources : [
6ab9f0
+      'server_abyss.cpp',
6ab9f0
+      'abyss_reqhandler_xmlrpc.cpp',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+      util_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpc_abyss,
6ab9f0
+      libxmlrpc_abysspp,
6ab9f0
+      libxmlrpc_serverpp,
6ab9f0
+      libxmlrpc_server_abyss,
6ab9f0
+      libxmlrpc_util,
6ab9f0
+      libxmlrpc_utilpp,
6ab9f0
+    ],
6ab9f0
+    soversion : 8,
6ab9f0
+    version : '8.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+  pkgg.generate(
6ab9f0
+    name : 'xmlrpc_server_abyss++',
6ab9f0
+    description : 'Xmlrpc-c Abyss XML-RPC server C++ library',
6ab9f0
+    version : meson.project_version(),
6ab9f0
+    requires_private : ['xmlrpc_abyss', 'xmlrpc_abyss++', 'xmlrpc_server++', 'xmlrpc_server_abyss', 'xmlrpc_util', 'xmlrpc_util++'],
6ab9f0
+    libraries : libxmlrpc_server_abysspp,
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if get_option('cgi-server')
6ab9f0
+  libxmlrpc_server_cgipp = library(
6ab9f0
+    'xmlrpc_server_cgi++',
6ab9f0
+    sources : [
6ab9f0
+      'server_cgi.cpp',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpc,
6ab9f0
+      libxmlrpcpp,
6ab9f0
+      libxmlrpc_serverpp,
6ab9f0
+      libxmlrpc_utilpp,
6ab9f0
+    ],
6ab9f0
+    soversion : 8,
6ab9f0
+    version : '8.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
+
6ab9f0
+libxmlrpc_packetsocket = library(
6ab9f0
+  'xmlrpc_packetsocket',
6ab9f0
+  sources : [
6ab9f0
+    'packetsocket.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpcpp,
6ab9f0
+    libxmlrpc_utilpp,
6ab9f0
+  ],
6ab9f0
+  soversion : 8,
6ab9f0
+  version : '8.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+if build_xmlrpc_pstream
6ab9f0
+  libxmlrpc_server_pstreampp = library(
6ab9f0
+    'xmlrpc_server_pstream++',
6ab9f0
+    sources : [
6ab9f0
+      'server_pstream_conn.cpp',
6ab9f0
+      'server_pstream.cpp',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpcpp,
6ab9f0
+      libxmlrpc_serverpp,
6ab9f0
+      libxmlrpc_packetsocket,
6ab9f0
+      libxmlrpc_utilpp,
6ab9f0
+    ],
6ab9f0
+    soversion : 8,
6ab9f0
+    version : '8.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+  pkgg.generate(
6ab9f0
+    name : 'xmlrpc_server_pstream',
6ab9f0
+    description : 'Xmlrpc-c packet-stream XML-RPC server library',
6ab9f0
+    version : meson.project_version(),
6ab9f0
+    requires_private : ['xmlrpc++', 'xmlrpc_server++', 'xmlrpc_util++'],
6ab9f0
+    libraries : [libxmlrpc_server_pstreampp, libxmlrpc_packetsocket],
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if build_client
6ab9f0
+  libxmlrpc_clientpp = library(
6ab9f0
+    'xmlrpc_client++',
6ab9f0
+    sources : [
6ab9f0
+      'client.cpp',
6ab9f0
+      'client_simple.cpp',
6ab9f0
+      'curl.cpp',
6ab9f0
+      'libwww.cpp',
6ab9f0
+      'wininet.cpp',
6ab9f0
+      'pstream.cpp',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+      util_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpc,
6ab9f0
+      libxmlrpcpp,
6ab9f0
+      libxmlrpc_client,
6ab9f0
+      libxmlrpc_packetsocket,
6ab9f0
+      libxmlrpc_util,
6ab9f0
+      libxmlrpc_utilpp,
6ab9f0
+    ],
6ab9f0
+    soversion : 8,
6ab9f0
+    version : '8.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+  pkgg.generate(
6ab9f0
+    name : 'xmlrpc_client++',
6ab9f0
+    description : 'Xmlrpc-c XML-RPC client C++ library',
6ab9f0
+    version : meson.project_version(),
6ab9f0
+    requires_private : ['xmlrpc', 'xmlrpc++', 'xmlrpc_client', 'xmlrpc_util', 'xmlrpc_util++'],
6ab9f0
+    libraries : libxmlrpc_clientpp,
6ab9f0
+    libraries_private : libxmlrpc_packetsocket,
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
diff --git a/src/meson.build b/src/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..8dd22486
6ab9f0
--- /dev/null
6ab9f0
+++ b/src/meson.build
6ab9f0
@@ -0,0 +1,190 @@
6ab9f0
+xmlrpc_deps = []
6ab9f0
+xmlrpc_incs = []
6ab9f0
+xmlrpc_libs = [libxmlrpc_util]
6ab9f0
+xmlrpc_pkgconfig_req = ['xmlrpc_util']
6ab9f0
+# TODO: handle clients
6ab9f0
+
6ab9f0
+if get_option('libxml2-backend')
6ab9f0
+  xmlrpc_xml_parser = 'xmlrpc_libxml2.c'
6ab9f0
+  xmlrpc_deps += [libxml2]
6ab9f0
+  xmlrpc_pkgconfig_req += ['libxml-2.0']
6ab9f0
+else
6ab9f0
+  xmlrpc_xml_parser = 'xmlrpc_expat.c'
6ab9f0
+  xmlrpc_incs += [xmlparse_incdir]
6ab9f0
+  xmlrpc_libs += [libxmlrpc_xmlparse]
6ab9f0
+  xmlrpc_pkgconfig_req += ['xmlrpc_expat']
6ab9f0
+endif
6ab9f0
+
6ab9f0
+libxmlrpc = library(
6ab9f0
+  'xmlrpc',
6ab9f0
+  sources : [
6ab9f0
+    'base_global.c',
6ab9f0
+    'double.c',
6ab9f0
+    'json.c',
6ab9f0
+    'parse_datetime.c',
6ab9f0
+    'parse_value.c',
6ab9f0
+    'resource.c',
6ab9f0
+    'trace.c',
6ab9f0
+    'version.c',
6ab9f0
+    'xmlrpc_data.c',
6ab9f0
+    'xmlrpc_datetime.c',
6ab9f0
+    'xmlrpc_string.c',
6ab9f0
+    'xmlrpc_array.c',
6ab9f0
+    'xmlrpc_struct.c',
6ab9f0
+    'xmlrpc_build.c',
6ab9f0
+    'xmlrpc_decompose.c',
6ab9f0
+    xmlrpc_xml_parser,
6ab9f0
+    'xmlrpc_parse.c',
6ab9f0
+    'xmlrpc_serialize.c',
6ab9f0
+    'xmlrpc_authcookie.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ] + xmlrpc_incs,
6ab9f0
+  link_with : xmlrpc_libs,
6ab9f0
+  dependencies : xmlrpc_deps,
6ab9f0
+  soversion : 3,
6ab9f0
+  version : '3.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc',
6ab9f0
+  description : 'Xmlrpc-c basic XML-RPC library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : xmlrpc_pkgconfig_req,
6ab9f0
+  libraries : libxmlrpc,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+libxmlrpc_server = library(
6ab9f0
+  'xmlrpc_server',
6ab9f0
+  sources : [
6ab9f0
+    'registry.c',
6ab9f0
+    'method.c',
6ab9f0
+    'system_method.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+  ],
6ab9f0
+  soversion : 3,
6ab9f0
+  version : '3.@0@'.format(version_minor),
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+pkgg.generate(
6ab9f0
+  name : 'xmlrpc_server',
6ab9f0
+  description : 'Xmlrpc-c XML-RPC server library',
6ab9f0
+  version : meson.project_version(),
6ab9f0
+  requires_private : ['xmlrpc', 'xmlrpc_util'],
6ab9f0
+  libraries : libxmlrpc_server,
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+
6ab9f0
+if get_option('abyss-server')
6ab9f0
+  libxmlrpc_server_abyss = library(
6ab9f0
+    'xmlrpc_server_abyss',
6ab9f0
+    sources : [
6ab9f0
+      'xmlrpc_server_abyss.c',
6ab9f0
+      'abyss_handler.c',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+      util_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpc,
6ab9f0
+      libxmlrpc_server,
6ab9f0
+      libxmlrpc_abyss,
6ab9f0
+      libxmlrpc_util,
6ab9f0
+    ],
6ab9f0
+    soversion : 3,
6ab9f0
+    version : '3.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+  pkgg.generate(
6ab9f0
+    name : 'xmlrpc_server_abyss',
6ab9f0
+    description : 'Xmlrpc-c Abyss XML-RPC server library',
6ab9f0
+    version : meson.project_version(),
6ab9f0
+    requires_private : ['xmlrpc', 'xmlrpc_server', 'xmlrpc_abyss', 'xmlrpc_util'],
6ab9f0
+    libraries : libxmlrpc_server_abyss,
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if get_option('cgi-server')
6ab9f0
+  libxmlrpc_server_cgi = library(
6ab9f0
+    'xmlrpc_server_cgi',
6ab9f0
+    sources : [
6ab9f0
+      'xmlrpc_server_cgi.c',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+      util_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpc,
6ab9f0
+      libxmlrpc_server,
6ab9f0
+      libxmlrpc_util,
6ab9f0
+    ],
6ab9f0
+    soversion : 3,
6ab9f0
+    version : '3.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+  pkgg.generate(
6ab9f0
+    name : 'xmlrpc_server_cgi',
6ab9f0
+    description : 'Xmlrpc-c CGI XML-RPC server library',
6ab9f0
+    version : meson.project_version(),
6ab9f0
+    requires_private : ['xmlrpc', 'xmlrpc_server', 'xmlrpc_util'],
6ab9f0
+    libraries : libxmlrpc_server_cgi,
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if build_client
6ab9f0
+  xmlrpc_client_transports = []
6ab9f0
+  if get_option('curl-client')
6ab9f0
+    xmlrpc_client_transports += [xmlrpc_curl_transport]
6ab9f0
+  endif
6ab9f0
+  libxmlrpc_client = library(
6ab9f0
+    'xmlrpc_client',
6ab9f0
+    sources : [
6ab9f0
+      'xmlrpc_client.c',
6ab9f0
+      'xmlrpc_client_global.c',
6ab9f0
+      'xmlrpc_server_info.c',
6ab9f0
+    ],
6ab9f0
+    include_directories : [
6ab9f0
+      top_incdir,
6ab9f0
+      hdr_incdir,
6ab9f0
+      util_incdir,
6ab9f0
+    ],
6ab9f0
+    link_with : [
6ab9f0
+      libxmlrpc,
6ab9f0
+      libxmlrpc_util,
6ab9f0
+    ],
6ab9f0
+    dependencies : xmlrpc_client_transports,
6ab9f0
+    soversion : 3,
6ab9f0
+    version : '3.@0@'.format(version_minor),
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+  pkgg.generate(
6ab9f0
+    name : 'xmlrpc_client',
6ab9f0
+    description : 'Xmlrpc-c XML-RPC client library',
6ab9f0
+    version : meson.project_version(),
6ab9f0
+    requires_private : ['xmlrpc', 'xmlrpc_util'],
6ab9f0
+    libraries : libxmlrpc_client,
6ab9f0
+    install : true,
6ab9f0
+  )
6ab9f0
+endif
6ab9f0
+
6ab9f0
+if get_option('cplusplus')
6ab9f0
+  subdir('cpp')
6ab9f0
+endif
6ab9f0
diff --git a/tools/lib/meson.build b/tools/lib/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..fc6929b8
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/lib/meson.build
6ab9f0
@@ -0,0 +1,5 @@
6ab9f0
+dumpvalue = declare_dependency(
6ab9f0
+  include_directories : include_directories('include'),
6ab9f0
+  sources : 'dumpvalue.c',
6ab9f0
+  link_with : [libxmlrpc_util, libxmlrpc],
6ab9f0
+)
6ab9f0
diff --git a/tools/meson.build b/tools/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..f48a28f9
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/meson.build
6ab9f0
@@ -0,0 +1,17 @@
6ab9f0
+subdir('lib')
6ab9f0
+subdir('xml')
6ab9f0
+if build_client
6ab9f0
+  subdir('xmlrpc')
6ab9f0
+  subdir('xmlrpc_transport')
6ab9f0
+  if get_option('cplusplus')
6ab9f0
+    subdir('xml-rpc-api2cpp')
6ab9f0
+    subdir('xml-rpc-api2txt')
6ab9f0
+    subdir('xmlrpc_cpp_proxy')
6ab9f0
+    if build_xmlrpc_pstream
6ab9f0
+      subdir('xmlrpc_pstream')
6ab9f0
+    endif
6ab9f0
+  endif
6ab9f0
+endif
6ab9f0
+if get_option('cplusplus')
6ab9f0
+  subdir('xmlrpc_dumpserver')
6ab9f0
+endif
6ab9f0
diff --git a/tools/xml-rpc-api2cpp/meson.build b/tools/xml-rpc-api2cpp/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..ec01212f
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xml-rpc-api2cpp/meson.build
6ab9f0
@@ -0,0 +1,21 @@
6ab9f0
+executable(
6ab9f0
+  'xml-rpc-api2cpp',
6ab9f0
+  sources : [
6ab9f0
+    'xml-rpc-api2cpp.cpp',
6ab9f0
+    'DataType.cpp',
6ab9f0
+    'XmlRpcFunction.cpp',
6ab9f0
+    'XmlRpcClass.cpp',
6ab9f0
+    'SystemProxy.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpc_client,
6ab9f0
+    libxmlrpc_cpp,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
+install_man('xml-rpc-api2cpp.1')
6ab9f0
diff --git a/tools/xml-rpc-api2txt/meson.build b/tools/xml-rpc-api2txt/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..2a0a61e8
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xml-rpc-api2txt/meson.build
6ab9f0
@@ -0,0 +1,2 @@
6ab9f0
+install_data('xml-rpc-api2txt', install_dir : get_option('bindir'))
6ab9f0
+install_man('xml-rpc-api2txt.1')
6ab9f0
diff --git a/tools/xml/meson.build b/tools/xml/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..2d856c60
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xml/meson.build
6ab9f0
@@ -0,0 +1,15 @@
6ab9f0
+executable(
6ab9f0
+  'xmlrpc_parsecall',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_parsecall.c',
6ab9f0
+  ],
6ab9f0
+  dependencies : [
6ab9f0
+    util_casprintf_dep,
6ab9f0
+    dumpvalue,
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/tools/xmlrpc/meson.build b/tools/xmlrpc/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..e1e8d552
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xmlrpc/meson.build
6ab9f0
@@ -0,0 +1,20 @@
6ab9f0
+executable(
6ab9f0
+  'xmlrpc',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc.c',
6ab9f0
+  ],
6ab9f0
+  dependencies : [
6ab9f0
+    dumpvalue,
6ab9f0
+    util_dep,
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpc_client,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/tools/xmlrpc_cpp_proxy/meson.build b/tools/xmlrpc_cpp_proxy/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..f3fc9988
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xmlrpc_cpp_proxy/meson.build
6ab9f0
@@ -0,0 +1,19 @@
6ab9f0
+executable(
6ab9f0
+  'xmlrpc_cpp_proxy',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_cpp_proxy.cpp',
6ab9f0
+    'xmlrpcMethod.cpp',
6ab9f0
+    'xmlrpcType.cpp',
6ab9f0
+    'proxyClass.cpp',
6ab9f0
+    'systemProxy.cpp',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpcpp,
6ab9f0
+    libxmlrpc_clientpp,
6ab9f0
+    libxmlrpc_utilpp,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/tools/xmlrpc_dumpserver/meson.build b/tools/xmlrpc_dumpserver/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..b7aa7cfc
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xmlrpc_dumpserver/meson.build
6ab9f0
@@ -0,0 +1,23 @@
6ab9f0
+executable(
6ab9f0
+  'xmlrpc_dumpserver',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_dumpserver.c',
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+    util_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc,
6ab9f0
+    libxmlrpc_server,
6ab9f0
+    libxmlrpc_server_abyss,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+  ],
6ab9f0
+  dependencies : [
6ab9f0
+    util_dep,
6ab9f0
+    util_casprintf_dep,
6ab9f0
+    dumpvalue,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/tools/xmlrpc_pstream/meson.build b/tools/xmlrpc_pstream/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..9cd3eb85
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xmlrpc_pstream/meson.build
6ab9f0
@@ -0,0 +1,21 @@
6ab9f0
+executable(
6ab9f0
+  'xmlrpc_pstream',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_pstream.cpp',
6ab9f0
+  ],
6ab9f0
+  dependencies : [
6ab9f0
+    dumpvalue,
6ab9f0
+    util_cpp_dep,
6ab9f0
+    readline,
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpcpp,
6ab9f0
+    libxmlrpc_clientpp,
6ab9f0
+    libxmlrpc_utilpp,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/tools/xmlrpc_transport/meson.build b/tools/xmlrpc_transport/meson.build
6ab9f0
new file mode 100644
6ab9f0
index 00000000..cbb6f835
6ab9f0
--- /dev/null
6ab9f0
+++ b/tools/xmlrpc_transport/meson.build
6ab9f0
@@ -0,0 +1,18 @@
6ab9f0
+executable(
6ab9f0
+  'xmlrpc_transport',
6ab9f0
+  sources : [
6ab9f0
+    'xmlrpc_transport.c',
6ab9f0
+  ],
6ab9f0
+  dependencies : [
6ab9f0
+    util_dep,
6ab9f0
+  ],
6ab9f0
+  include_directories : [
6ab9f0
+    top_incdir,
6ab9f0
+    hdr_incdir,
6ab9f0
+  ],
6ab9f0
+  link_with : [
6ab9f0
+    libxmlrpc_client,
6ab9f0
+    libxmlrpc_util,
6ab9f0
+  ],
6ab9f0
+  install : true,
6ab9f0
+)
6ab9f0
diff --git a/transport_config.h.in b/transport_config.h.in
6ab9f0
new file mode 100644
6ab9f0
index 00000000..687fdaf2
6ab9f0
--- /dev/null
6ab9f0
+++ b/transport_config.h.in
6ab9f0
@@ -0,0 +1,4 @@
6ab9f0
+#define MUST_BUILD_WININET_CLIENT @MUST_BUILD_WININET_CLIENT@
6ab9f0
+#define MUST_BUILD_CURL_CLIENT @MUST_BUILD_CURL_CLIENT@
6ab9f0
+#define MUST_BUILD_LIBWWW_CLIENT @MUST_BUILD_LIBWWW_CLIENT@
6ab9f0
+static const char * const XMLRPC_DEFAULT_TRANSPORT = @XMLRPC_DEFAULT_TRANSPORT@;
6ab9f0
diff --git a/xmlrpc-c-config b/xmlrpc-c-config
6ab9f0
new file mode 100755
6ab9f0
index 00000000..25f95194
6ab9f0
--- /dev/null
6ab9f0
+++ b/xmlrpc-c-config
6ab9f0
@@ -0,0 +1,114 @@
6ab9f0
+#!/bin/sh
6ab9f0
+
6ab9f0
+comp=
6ab9f0
+
6ab9f0
+need_cxx=
6ab9f0
+need_client=
6ab9f0
+need_server=
6ab9f0
+need_abyss_server=
6ab9f0
+need_pstream=
6ab9f0
+need_packetsocket=
6ab9f0
+need_cgi=
6ab9f0
+need_abyss=
6ab9f0
+need_openssl=
6ab9f0
+
6ab9f0
+show_help() {
6ab9f0
+    cat <
6ab9f0
+Usage: xmlrpc-c-config <feature> ... <option> ...
6ab9f0
+
6ab9f0
+The features are:
6ab9f0
+  c++            legacy C++ wrapper API
6ab9f0
+  c++2           modern C++ API
6ab9f0
+  client         client functions
6ab9f0
+  cgi-server     CGI-based server functions
6ab9f0
+  abyss-server   ABYSS-based server functions
6ab9f0
+  pstream-server pstream-based server functions
6ab9f0
+  server-util    basic server functions (implied by *-server)
6ab9f0
+  abyss          Abyss HTTP server (not necessary with abyss-server)
6ab9f0
+  openssl        Openssl convenience functions
6ab9f0
+
6ab9f0
+Options are:
6ab9f0
+  --version      The version number of the package
6ab9f0
+  --features     List all features (aka modules) currently installed
6ab9f0
+  --cflags       C compiler flags to use when '#include'ing package headers
6ab9f0
+  --libs         Libraries and flags to use when linking programs normally
6ab9f0
+  --ldadd        Libraries to use with automake
6ab9f0
+  --ldflags      Flags to use with automake & libtool
6ab9f0
+  --prefix       The prefix under which the package was installed
6ab9f0
+EOF
6ab9f0
+    exit $1
6ab9f0
+}
6ab9f0
+
6ab9f0
+test $# -ne 0 || show_help 1 >&2
6ab9f0
+
6ab9f0
+while test $# -gt 0; do
6ab9f0
+    case $1 in
6ab9f0
+      (c++)                  comp="$comp xmlrpc_cpp";;
6ab9f0
+      (server-util)          need_server=1;;
6ab9f0
+      (cgi-server)           need_cgi=1;;
6ab9f0
+      (c++2)                 need_cxx=1;;
6ab9f0
+      (abyss-server)         need_abyss_server=1;;
6ab9f0
+      (pstream-server)       need_pstream=1;;
6ab9f0
+      (packetsocket)         need_packetsocket=1;;
6ab9f0
+      (client|libwww-client) need_client=1;;
6ab9f0
+      (abyss)                need_abyss=1;;
6ab9f0
+      (openssl)              need_openssl=1;;
6ab9f0
+      (--help) show_help 0;;
6ab9f0
+      (--) shift; break;;
6ab9f0
+      (--*) break;;
6ab9f0
+      (*)
6ab9f0
+      echo "Unrecognized token '$1'"
6ab9f0
+      exit 1
6ab9f0
+      ;;
6ab9f0
+    esac
6ab9f0
+    shift
6ab9f0
+done
6ab9f0
+
6ab9f0
+if test -z "$need_cxx"; then
6ab9f0
+    test -z "$need_client"       || comp="$comp xmlrpc_client"
6ab9f0
+    test -z "$need_abyss_server" || comp="$comp xmlrpc_server_abyss"
6ab9f0
+    test -z "$need_abyss"        || comp="$comp xmlrpc_abyss"
6ab9f0
+    test -z "$need_server"       || comp="$comp xmlrpc_server"
6ab9f0
+    test -z "$need_cgi"          || comp="$comp xmlrpc_server_cgi"
6ab9f0
+else
6ab9f0
+    test -z "$need_client"       || comp="$comp xmlrpc_client++"
6ab9f0
+    test -z "$need_abyss_server" || comp="$comp xmlrpc_server_abyss++"
6ab9f0
+    test -z "$need_abyss"        || comp="$comp xmlrpc_abyss++"
6ab9f0
+    test -z "$need_server"       || comp="$comp xmlrpc_server++"
6ab9f0
+    test -z "$need_cgi"          || comp="$comp xmlrpc_server_cgi++"
6ab9f0
+fi
6ab9f0
+
6ab9f0
+test -z "$need_packetsocket" || comp="$comp xmlrpc_packetsocket"
6ab9f0
+test -z "$need_pstream"      || comp="$comp xmlrpc_server_pstream++"
6ab9f0
+test -z "$need_openssl"      || comp="$comp xmlrpc_openssl"
6ab9f0
+test -n "$comp"              || comp="xmlrpc xmlrpc_util"
6ab9f0
+
6ab9f0
+case $1 in
6ab9f0
+  (--features|--modules)
6ab9f0
+  echo "c++ abyss-server curl-client"
6ab9f0
+  exit 0
6ab9f0
+  ;;
6ab9f0
+  (--version)
6ab9f0
+  comp=xmlrpc
6ab9f0
+  set -- --modversion
6ab9f0
+  ;;
6ab9f0
+  (--exec-prefix)
6ab9f0
+  comp=xmlrpc
6ab9f0
+  set -- --variable=prefix
6ab9f0
+  ;;
6ab9f0
+  (--*dir|--prefix)
6ab9f0
+  comp=xmlrpc
6ab9f0
+  set -- --variable=${1##--}
6ab9f0
+  ;;
6ab9f0
+  (--ldflags)
6ab9f0
+  set -- --libs-only-L
6ab9f0
+  ;;
6ab9f0
+  (--ldadd)
6ab9f0
+  set -- --libs-only-l
6ab9f0
+  ;;
6ab9f0
+  (--cflags)
6ab9f0
+  set -- "$1"
6ab9f0
+  ;;
6ab9f0
+esac
6ab9f0
+
6ab9f0
+exec pkg-config "$@" $comp