+dnl Set drive interface used by the guestfs_add_drive{,_ro} calls
+dnl ('-drive ...,if=...' option to qemu).
+dnl
+dnl NB. We will change the default in future to virtio, but at the
+dnl moment this causes a performance problem, RHBZ#509383.
+AC_ARG_WITH([drive-if],
+ [AS_HELP_STRING([--with-drive-if],
+ [set default driver (ide|scsi|virtio) @<:@default=ide@:>@])],
+ [],
+ [with_drive_if=ide])
+AC_DEFINE_UNQUOTED([DRIVE_IF],["$with_drive_if"],[Default drive interface.])
+
+dnl Set interface used by the network. Normally you should
+dnl leave this at the default (virtio) but you can use the
+dnl alternative (ne2k_pci) because of bugs in virtio networking
+dnl eg. https://bugzilla.redhat.com/show_bug.cgi?id=516022
+AC_ARG_WITH([net-if],
+ [AS_HELP_STRING([--with-net-if],
+ [set default net driver (virtio|ne2k_pci) @<:@default=virtio@:>@])],
+ [],
+ [with_net_if=virtio])
+AC_DEFINE_UNQUOTED([NET_IF],["$with_net_if"],[Default network interface.])
+