Revision ee682d27

b/block/vdi.c
53 53
#include "block_int.h"
54 54
#include "module.h"
55 55

  
56
#if defined(HAVE_UUID_H)
56
#if defined(CONFIG_UUID)
57 57
#include <uuid/uuid.h>
58 58
#else
59 59
/* TODO: move uuid emulation to some central place in QEMU. */
......
116 116
/* Unallocated blocks use this index (no need to convert endianess). */
117 117
#define VDI_UNALLOCATED UINT32_MAX
118 118

  
119
#if !defined(HAVE_UUID_H)
119
#if !defined(CONFIG_UUID)
120 120
void uuid_generate(uuid_t out)
121 121
{
122 122
    memset(out, 0, sizeof(out));
b/configure
187 187
nptl=""
188 188
sdl=""
189 189
sparse="no"
190
uuid=""
190 191
vde=""
191 192
vnc_tls=""
192 193
vnc_sasl=""
......
452 453
  ;;
453 454
  --disable-slirp) slirp="no"
454 455
  ;;
456
  --disable-uuid) uuid="no"
457
  ;;
458
  --enable-uuid) uuid="yes"
459
  ;;
455 460
  --disable-vde) vde="no"
456 461
  ;;
457 462
  --enable-vde) vde="yes"
......
696 701
echo "  --oss-lib                path to OSS library"
697 702
echo "  --enable-uname-release=R Return R for uname -r in usermode emulation"
698 703
echo "  --sparc_cpu=V            Build qemu for Sparc architecture v7, v8, v8plus, v8plusa, v9"
704
echo "  --disable-uuid           disable uuid support"
705
echo "  --enable-uuid            enable uuid support"
699 706
echo "  --disable-vde            disable support for vde network"
700 707
echo "  --enable-vde             enable support for vde network"
701 708
echo "  --disable-linux-aio      disable Linux AIO support"
......
1048 1055
fi
1049 1056

  
1050 1057
##########################################
1058
# uuid_generate() probe, used for vdi block driver
1059
if test "$uuid" != "no" ; then
1060
  uuid_libs="-luuid"
1061
  cat > $TMPC << EOF
1062
#include <uuid/uuid.h>
1063
int main(void)
1064
{
1065
    uuid_t my_uuid;
1066
    uuid_generate(my_uuid);
1067
    return 0;
1068
}
1069
EOF
1070
  if compile_prog "" "$uuid_libs" ; then
1071
    uuid="yes"
1072
    libs_softmmu="$uuid_libs $libs_softmmu"
1073
    libs_tools="$uuid_libs $libs_tools"
1074
  else
1075
    if test "$uuid" = "yes" ; then
1076
      feature_not_found "uuid"
1077
    fi
1078
    uuid=no
1079
  fi
1080
fi
1081

  
1082
##########################################
1051 1083
# vde libraries probe
1052 1084
if test "$vde" != "no" ; then
1053 1085
  vde_libs="-lvdeplug"
......
1752 1784
echo "fdt support       $fdt"
1753 1785
echo "preadv support    $preadv"
1754 1786
echo "fdatasync         $fdatasync"
1787
echo "uuid support      $uuid"
1755 1788

  
1756 1789
if test $sdl_too_old = "yes"; then
1757 1790
echo "-> Your SDL version is too old - please upgrade to have SDL support"
......
1862 1895
if test "$fnmatch" = "yes" ; then
1863 1896
  echo "CONFIG_FNMATCH=y" >> $config_host_mak
1864 1897
fi
1898
if test "$uuid" = "yes" ; then
1899
  echo "CONFIG_UUID=y" >> $config_host_mak
1900
fi
1865 1901
qemu_version=`head $source_path/VERSION`
1866 1902
echo "VERSION=$qemu_version" >>$config_host_mak
1867 1903
echo "PKGVERSION=$pkgversion" >>$config_host_mak

Also available in: Unified diff