+##########################################
+# check for rados
+if test "$rados" != "yes" ; then
+ rados="no"
+fi
+cat > $TMPC << EOF
+#include <rados/librados.h>
+
+int main(int argc, char **argv)
+{
+ rados_t cluster;
+ rados_ioctx_t io_ctx;
+ const char cluster_name[] = "ceph";
+ const char user_name[] = "client.admin";
+ const char pool[] = "rados";
+
+ /* The rados_create2 signature required was only introduced in ceph 0.65 */
+ rados_create2(&cluster, cluster_name, user_name, 0);
+ rados_ioctx_create(cluster, pool, &io_ctx);
+
+ return 0;
+}
+EOF
+if test "$disable_rados" != "yes" && compile_prog "" "-lrados" "rados"; then
+ LIBS="-lrados $LIBS"
+ rados="yes"
+fi
+print_config "Rados engine" "$rados"
+