fi
fi
-##########################################
-# check if mingw environment provides a recent ntddscsi.h
-guest_agent_ntddscsi="no"
-if test "$mingw32" = "yes"; then
- cat > $TMPC << EOF
-#include <windows.h>
-#include <ntddscsi.h>
-int main(void) {
-#if !defined(IOCTL_SCSI_GET_ADDRESS)
-#error Missing required ioctl definitions
-#endif
- SCSI_ADDRESS addr = { .Lun = 0, .TargetId = 0, .PathId = 0 };
- return addr.Lun;
-}
-EOF
- if compile_prog "" "" ; then
- guest_agent_ntddscsi=yes
- fi
-fi
-
##########################################
# capstone
fi
if test "$mingw32" = "yes" ; then
echo "CONFIG_WIN32=y" >> $config_host_mak
- if test "$guest_agent_ntddscsi" = "yes" ; then
- echo "CONFIG_QGA_NTDDSCSI=y" >> $config_host_mak
- fi
echo "QEMU_GA_MSI_MINGW_DLL_PATH=${QEMU_GA_MSI_MINGW_DLL_PATH}" >> $config_host_mak
echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER}" >> $config_host_mak
echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO}" >> $config_host_mak
int main(void) { return VSS_CTX_BACKUP; }''')
endif
+have_ntddscsi = false
+if targetos == 'windows'
+ have_ntddscsi = cc.compiles('''
+ #include <windows.h>
+ #include <ntddscsi.h>
+ int main(void) {
+ #if !defined(IOCTL_SCSI_GET_ADDRESS)
+ #error Missing required ioctl definitions
+ #endif
+ SCSI_ADDRESS addr = { .Lun = 0, .TargetId = 0, .PathId = 0 };
+ return addr.Lun;
+ }
+''')
+endif
+config_host_data.set('HAVE_NTDDSCSI', have_ntddscsi)
+
ignored = ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target
'HAVE_GDB_BIN']
arrays = ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST']
if targetos == 'windows'
if have_ga
summary_info += {'QGA VSS support': have_qga_vss}
- summary_info += {'QGA w32 disk info': config_host.has_key('CONFIG_QGA_NTDDSCSI')}
+ summary_info += {'QGA w32 disk info': have_ntddscsi}
endif
endif
summary_info += {'seccomp support': seccomp}
#include <ws2tcpip.h>
#include <iptypes.h>
#include <iphlpapi.h>
-#ifdef CONFIG_QGA_NTDDSCSI
+#ifdef HAVE_NTDDSCSI
#include <winioctl.h>
#include <ntddscsi.h>
#endif
}
}
-#ifdef CONFIG_QGA_NTDDSCSI
+#ifdef HAVE_NTDDSCSI
static GuestDiskBusType win2qemu[] = {
[BusTypeUnknown] = GUEST_DISK_BUS_TYPE_UNKNOWN,
return NULL;
}
-#endif /* CONFIG_QGA_NTDDSCSI */
+#endif /* HAVE_NTDDSCSI */
static GuestFilesystemInfo *build_guest_fsinfo(char *guid, Error **errp)
{
qga_libs += ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,--enable-stdcall-fixup']
subdir('vss-win32')
endif
- if 'CONFIG_QGA_NTDDSCSI' in config_host
+ if have_ntddscsi
qga_libs += ['-lsetupapi', '-lcfgmgr32']
endif
endif