@@ -540,17 +540,20 @@ if not get_option('jack').auto() or have_system
540
540
method : ' pkg-config' , kwargs : static_kwargs)
541
541
endif
542
542
543
- spice = not_found
544
- spice_headers = not_found
545
543
spice_protocol = not_found
546
- if ' CONFIG_SPICE ' in config_host
547
- spice = declare_dependency ( compile_args : config_host[ ' SPICE_CFLAGS ' ].split() ,
548
- link_args : config_host[ ' SPICE_LIBS ' ].split())
549
- spice_headers = declare_dependency ( compile_args : config_host[ ' SPICE_CFLAGS ' ].split() )
544
+ if not get_option ( ' spice_protocol ' ).auto() or have_system
545
+ spice_protocol = dependency ( ' spice-protocol ' , version : ' >=0.12.3 ' ,
546
+ required : get_option ( ' spice_protocol ' ),
547
+ method : ' pkg-config ' , kwargs : static_kwargs )
550
548
endif
551
- if ' CONFIG_SPICE_PROTOCOL' in config_host
552
- spice_protocol = declare_dependency (compile_args : config_host[' SPICE_PROTOCOL_CFLAGS' ].split())
549
+ spice = not_found
550
+ if not get_option (' spice' ).auto() or have_system
551
+ spice = dependency (' spice-server' , version : ' >=0.12.5' ,
552
+ required : get_option (' spice' ),
553
+ method : ' pkg-config' , kwargs : static_kwargs)
553
554
endif
555
+ spice_headers = spice.partial_dependency(compile_args : true , includes : true )
556
+
554
557
rt = cc.find_library (' rt' , required : false )
555
558
libdl = not_found
556
559
if ' CONFIG_PLUGIN' in config_host
@@ -1481,6 +1484,8 @@ config_host_data.set('CONFIG_STATX', has_statx)
1481
1484
config_host_data.set(' CONFIG_ZSTD' , zstd.found())
1482
1485
config_host_data.set(' CONFIG_FUSE' , fuse.found())
1483
1486
config_host_data.set(' CONFIG_FUSE_LSEEK' , fuse_lseek.found())
1487
+ config_host_data.set(' CONFIG_SPICE_PROTOCOL' , spice_protocol.found())
1488
+ config_host_data.set(' CONFIG_SPICE' , spice.found())
1484
1489
config_host_data.set(' CONFIG_X11' , x11.found())
1485
1490
config_host_data.set(' CONFIG_CFI' , get_option (' cfi' ))
1486
1491
config_host_data.set(' QEMU_VERSION' , ' "@0@"' .format(meson .project_version()))
@@ -1761,7 +1766,7 @@ have_ivshmem = config_host_data.get('CONFIG_EVENTFD')
1761
1766
host_kconfig = \
1762
1767
(get_option (' fuzzing' ) ? [' CONFIG_FUZZ=y' ] : []) + \
1763
1768
(' CONFIG_TPM' in config_host ? [' CONFIG_TPM=y' ] : []) + \
1764
- (' CONFIG_SPICE ' in config_host ? [' CONFIG_SPICE=y' ] : []) + \
1769
+ (spice.found() ? [' CONFIG_SPICE=y' ] : []) + \
1765
1770
(have_ivshmem ? [' CONFIG_IVSHMEM=y' ] : []) + \
1766
1771
(' CONFIG_OPENGL' in config_host ? [' CONFIG_OPENGL=y' ] : []) + \
1767
1772
(x11.found() ? [' CONFIG_X11=y' ] : []) + \
@@ -3337,8 +3342,10 @@ summary_info += {'PVRDMA support': config_host.has_key('CONFIG_PVRDMA')}
3337
3342
summary_info += {' fdt support' : fdt_opt == ' disabled' ? false : fdt_opt}
3338
3343
summary_info += {' libcap-ng support' : libcap_ng}
3339
3344
summary_info += {' bpf support' : libbpf}
3340
- # TODO: add back protocol and server version
3341
- summary_info += {' spice support' : config_host.has_key(' CONFIG_SPICE' )}
3345
+ summary_info += {' spice protocol support' : spice_protocol}
3346
+ if spice_protocol.found()
3347
+ summary_info += {' spice server support' : spice}
3348
+ endif
3342
3349
summary_info += {' rbd support' : rbd}
3343
3350
summary_info += {' xfsctl support' : config_host.has_key(' CONFIG_XFS' )}
3344
3351
summary_info += {' smartcard support' : cacard}
0 commit comments