build: Add meson build

This replicates most of the current autotools build.

Code coverage is omitted, it should be possible to use built-in
Meson functionality.

Valgrind for tests has not been added, instead it can run as
meson test --wrap='valgrind --leak-check=full --error-exitcode=1'

Change-Id: I5566a6c30630c486d22390e126899dbe4a6331ce
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/utils/meson.build b/utils/meson.build
new file mode 100644
index 0000000..ae03af8
--- /dev/null
+++ b/utils/meson.build
@@ -0,0 +1,32 @@
+demux_sources = ['mctp-demux-daemon.c']
+demux_args = []
+demux_dep = [libmctp_dep, pcap_dep, libsystemd_dep]
+# While mctp-demux-daemon will build without pcap, it won't
+# be functional.
+# TODO only build mctp-demux-daemon when pcap is available.
+if pcap_dep.found()
+    demux_args += '-DHAVE_PCAP'
+    demux_sources += 'mctp-capture.c'
+endif
+
+demux = executable('mctp-demux-daemon',
+    demux_sources,
+    include_directories: libmctp_include_dir,
+    dependencies: demux_dep,
+    c_args: demux_args,
+    install: true,
+)
+
+pipe = executable('mctp-pipe',
+    'mctp-pipe.c',
+    include_directories: libmctp_include_dir,
+    dependencies: [libmctp_dep],
+    install: false,
+)
+
+mctp_in = executable('mctp-in',
+    'mctp-in.c',
+    include_directories: libmctp_include_dir,
+    dependencies: [libmctp_dep],
+    install: false,
+)