Revision ad32e9c0 configure
b/configure | ||
---|---|---|
1917 | 1917 |
if test "$rbd" != "no" ; then |
1918 | 1918 |
cat > $TMPC <<EOF |
1919 | 1919 |
#include <stdio.h> |
1920 |
#include <rados/librados.h> |
|
1921 |
int main(void) { rados_initialize(0, NULL); return 0; } |
|
1922 |
EOF |
|
1923 |
rbd_libs="-lrados" |
|
1924 |
if compile_prog "" "$rbd_libs" ; then |
|
1925 |
librados_too_old=no |
|
1926 |
cat > $TMPC <<EOF |
|
1927 |
#include <stdio.h> |
|
1928 |
#include <rados/librados.h> |
|
1929 |
#ifndef CEPH_OSD_TMAP_SET |
|
1930 |
#error missing CEPH_OSD_TMAP_SET |
|
1931 |
#endif |
|
1920 |
#include <rbd/librbd.h> |
|
1932 | 1921 |
int main(void) { |
1933 |
int (*func)(const rados_pool_t pool, uint64_t *snapid) = rados_selfmanaged_snap_create;
|
|
1934 |
rados_initialize(0, NULL);
|
|
1922 |
rados_t cluster;
|
|
1923 |
rados_create(&cluster, NULL);
|
|
1935 | 1924 |
return 0; |
1936 | 1925 |
} |
1937 | 1926 |
EOF |
1938 |
if compile_prog "" "$rbd_libs" ; then |
|
1939 |
rbd=yes |
|
1940 |
libs_tools="$rbd_libs $libs_tools" |
|
1941 |
libs_softmmu="$rbd_libs $libs_softmmu" |
|
1942 |
else |
|
1943 |
rbd=no |
|
1944 |
librados_too_old=yes |
|
1945 |
fi |
|
1927 |
rbd_libs="-lrbd -lrados" |
|
1928 |
if compile_prog "" "$rbd_libs" ; then |
|
1929 |
rbd=yes |
|
1930 |
libs_tools="$rbd_libs $libs_tools" |
|
1931 |
libs_softmmu="$rbd_libs $libs_softmmu" |
|
1946 | 1932 |
else |
1947 | 1933 |
if test "$rbd" = "yes" ; then |
1948 | 1934 |
feature_not_found "rados block device" |
1949 | 1935 |
fi |
1950 | 1936 |
rbd=no |
1951 | 1937 |
fi |
1952 |
if test "$librados_too_old" = "yes" ; then |
|
1953 |
echo "-> Your librados version is too old - upgrade needed to have rbd support" |
|
1954 |
fi |
|
1955 | 1938 |
fi |
1956 | 1939 |
|
1957 | 1940 |
########################################## |
Also available in: Unified diff