@@ -16,6 +16,8 @@ add_project_arguments('-Wno-unused-parameter', language : 'c')
1616
1717libsystemd = dependency (' libsystemd' , version : ' >=247' , required : false )
1818
19+ libcap = dependency (' libcap' , required : false )
20+
1921conf = configuration_data ()
2022conf.set10(' HAVE_LINUX_MCTP_H' ,
2123 cc.has_header(' linux/mctp.h' ),
@@ -37,6 +39,10 @@ conf.set10('MCTPD_WRITABLE_CONNECTIVITY',
3739 get_option (' unsafe-writable-connectivity' ),
3840 description : ' Allow writes to the Connectivity member of the au.com.codeconstruct.MCTP.Endpoint1 interface on endpoint objects' )
3941
42+ conf.set10(' HAVE_LIBCAP' ,
43+ libcap.found(),
44+ description : ' Require mctpd to minimise its capabilities' )
45+
4046conf.set_quoted(' MCTPD_CONF_FILE_DEFAULT' ,
4147 join_paths (get_option (' prefix' ), get_option (' sysconfdir' ), ' mctpd.conf' ),
4248 description : ' Default configuration file path' ,
@@ -89,7 +95,7 @@ if libsystemd.found()
8995 sources : [
9096 ' src/mctpd.c' ,
9197 ] + netlink_sources + util_sources + ops_sources,
92- dependencies : [libsystemd, toml_dep],
98+ dependencies : [libsystemd, toml_dep, libcap ],
9399 install : true ,
94100 install_dir : get_option (' sbindir' ),
95101 c_args : [' -DOPS_SD_EVENT=1' ],
@@ -100,7 +106,7 @@ if libsystemd.found()
100106 ' src/mctpd.c' ,
101107 ] + test_ops_sources + netlink_sources + util_sources,
102108 include_directories : include_directories (' src' ),
103- dependencies : [libsystemd, toml_dep],
109+ dependencies : [libsystemd, toml_dep, libcap ],
104110 c_args : [' -DOPS_SD_EVENT=1' ],
105111 )
106112endif
0 commit comments