#include "block_int.h"
#include "module.h"
-#if defined(HAVE_UUID_H)
+#if defined(CONFIG_UUID)
#include <uuid/uuid.h>
#else
/* TODO: move uuid emulation to some central place in QEMU. */
/* Unallocated blocks use this index (no need to convert endianess). */
#define VDI_UNALLOCATED UINT32_MAX
-#if !defined(HAVE_UUID_H)
+#if !defined(CONFIG_UUID)
void uuid_generate(uuid_t out)
{
memset(out, 0, sizeof(out));
nptl=""
sdl=""
sparse="no"
+uuid=""
vde=""
vnc_tls=""
vnc_sasl=""
;;
--disable-slirp) slirp="no"
;;
+ --disable-uuid) uuid="no"
+ ;;
+ --enable-uuid) uuid="yes"
+ ;;
--disable-vde) vde="no"
;;
--enable-vde) vde="yes"
echo " --oss-lib path to OSS library"
echo " --enable-uname-release=R Return R for uname -r in usermode emulation"
echo " --sparc_cpu=V Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
+echo " --disable-uuid disable uuid support"
+echo " --enable-uuid enable uuid support"
echo " --disable-vde disable support for vde network"
echo " --enable-vde enable support for vde network"
echo " --disable-linux-aio disable Linux AIO support"
fnmatch="yes"
fi
+##########################################
+# uuid_generate() probe, used for vdi block driver
+if test "$uuid" != "no" ; then
+ uuid_libs="-luuid"
+ cat > $TMPC << EOF
+#include <uuid/uuid.h>
+int main(void)
+{
+ uuid_t my_uuid;
+ uuid_generate(my_uuid);
+ return 0;
+}
+EOF
+ if compile_prog "" "$uuid_libs" ; then
+ uuid="yes"
+ libs_softmmu="$uuid_libs $libs_softmmu"
+ libs_tools="$uuid_libs $libs_tools"
+ else
+ if test "$uuid" = "yes" ; then
+ feature_not_found "uuid"
+ fi
+ uuid=no
+ fi
+fi
+
##########################################
# vde libraries probe
if test "$vde" != "no" ; then
echo "fdt support $fdt"
echo "preadv support $preadv"
echo "fdatasync $fdatasync"
+echo "uuid support $uuid"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
if test "$fnmatch" = "yes" ; then
echo "CONFIG_FNMATCH=y" >> $config_host_mak
fi
+if test "$uuid" = "yes" ; then
+ echo "CONFIG_UUID=y" >> $config_host_mak
+fi
qemu_version=`head $source_path/VERSION`
echo "VERSION=$qemu_version" >>$config_host_mak
echo "PKGVERSION=$pkgversion" >>$config_host_mak