mctp-demux-daemon: Add packet capture option

Optionally enable libpcap support in mctp-demux-daemon to capture
packets both from the Unix domain socket and binding interfaces.
Providing the two capture points allows for tracking down issues with
packets being dropped during binding initialisation.

As there's no formal linktype defined for MCTP or higher-level DMTF
protocols command-line switches provide the ability to specify one of
the private linktype values in the range 147-162.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I593d9e4be80c0198e643758f216e774169668a8c
diff --git a/Makefile.am b/Makefile.am
index ab3c80e..e91e13c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,12 @@
 endif
 
 bin_PROGRAMS = utils/mctp-demux-daemon
-utils_mctp_demux_daemon_LDADD = libmctp.la
+utils_mctp_demux_daemon_SOURCES = utils/mctp-demux-daemon.c
+if HAVE_PCAP
+utils_mctp_demux_daemon_SOURCES += utils/mctp-capture.c
+endif
+utils_mctp_demux_daemon_LDADD = libmctp.la $(pcap_LIBS)
+utils_mctp_demux_daemon_CFLAGS = $(pcap_CFLAGS)
 
 pkgconfig_DATA = libmctp.pc