Revision f27aaf4b configure

b/configure
332 332
trace_backend="nop"
333 333
trace_file="trace"
334 334
spice=""
335
rbd=""
335 336

  
336 337
# OS specific
337 338
if check_define __linux__ ; then
......
741 742
  ;;
742 743
  --*dir)
743 744
  ;;
745
  --disable-rbd) rbd="no"
746
  ;;
747
  --enable-rbd) rbd="yes"
748
  ;;
744 749
  *) echo "ERROR: unknown option $opt"; show_help="yes"
745 750
  ;;
746 751
  esac
......
934 939
echo "                           Default:trace-<pid>"
935 940
echo "  --disable-spice          disable spice"
936 941
echo "  --enable-spice           enable spice"
942
echo "  --enable-rbd             enable building the rados block device (rbd)"
937 943
echo ""
938 944
echo "NOTE: The object files are built at the place where configure is launched"
939 945
exit 1
......
1746 1752
fi
1747 1753

  
1748 1754
##########################################
1755
# rbd probe
1756
if test "$rbd" != "no" ; then
1757
  cat > $TMPC <<EOF
1758
#include <stdio.h>
1759
#include <rados/librados.h>
1760
int main(void) { rados_initialize(0, NULL); return 0; }
1761
EOF
1762
  rbd_libs="-lrados -lcrypto"
1763
  if compile_prog "" "$rbd_libs" ; then
1764
    librados_too_old=no
1765
    cat > $TMPC <<EOF
1766
#include <stdio.h>
1767
#include <rados/librados.h>
1768
#ifndef CEPH_OSD_TMAP_SET
1769
#error missing CEPH_OSD_TMAP_SET
1770
#endif
1771
int main(void) {
1772
    int (*func)(const rados_pool_t pool, uint64_t *snapid) = rados_selfmanaged_snap_create;
1773
    rados_initialize(0, NULL);
1774
    return 0;
1775
}
1776
EOF
1777
    if compile_prog "" "$rbd_libs" ; then
1778
      rbd=yes
1779
      libs_tools="$rbd_libs $libs_tools"
1780
      libs_softmmu="$rbd_libs $libs_softmmu"
1781
    else
1782
      rbd=no
1783
      librados_too_old=yes
1784
    fi
1785
  else
1786
    if test "$rbd" = "yes" ; then
1787
      feature_not_found "rados block device"
1788
    fi
1789
    rbd=no
1790
  fi
1791
  if test "$librados_too_old" = "yes" ; then
1792
    echo "-> Your librados version is too old - upgrade needed to have rbd support"
1793
  fi
1794
fi
1795

  
1796
##########################################
1749 1797
# linux-aio probe
1750 1798

  
1751 1799
if test "$linux_aio" != "no" ; then
......
2354 2402
echo "Trace backend     $trace_backend"
2355 2403
echo "Trace output file $trace_file-<pid>"
2356 2404
echo "spice support     $spice"
2405
echo "rbd support       $rbd"
2357 2406

  
2358 2407
if test $sdl_too_old = "yes"; then
2359 2408
echo "-> Your SDL version is too old - please upgrade to have SDL support"
......
2627 2676
if test "$zero_malloc" = "yes" ; then
2628 2677
  echo "CONFIG_ZERO_MALLOC=y" >> $config_host_mak
2629 2678
fi
2679
if test "$rbd" = "yes" ; then
2680
  echo "CONFIG_RBD=y" >> $config_host_mak
2681
fi
2630 2682

  
2631 2683
# USB host support
2632 2684
case "$usb" in

Also available in: Unified diff