AC_SUBST(AM_CXXFLAGS)
AM_CXXFLAGS="${AM_CXXFLAGS}"
+
+###### PATCH STARTS HERE ######
+# Find out what to build (default is all of these)
+
+# rados?
+AC_ARG_WITH([rados],
+ [AS_HELP_STRING([--with-rados], [build with librados support])],
+ [],
+ [with_rados=yes])
+AM_CONDITIONAL(WITH_RADOS, test "$with_rados" = "yes")
+#AS_IF([test "$with_rados" = "yes"], [AC_DEFINE([WITH_RADOS])])
+
+# rbd?
+# rbd requires rados
+AC_ARG_WITH([rbd],
+ [AS_HELP_STRING([--with-rbd], [build rbd files])],
+ [],
+ [with_rbd=yes])
+AM_CONDITIONAL(WITH_RBD, test "$with_rbd" = "yes")
+#AS_IF([test "$with_rbd" = "yes"], [AC_DEFINE([WITH_RADOS, WITH_RBD])])
+
+# cephfs?
+# cephfs requires rados
+AC_ARG_WITH([cephfs],
+ [AS_HELP_STRING([--with-cephfs], [build cephfs files])],
+ [],
+ [with_cephfs=yes])
+AM_CONDITIONAL(WITH_CEPHFS, test "$with_cephfs" = "yes")
+#AS_IF([test "$with_cephfs" = "yes"], [AC_DEFINE([WITH_RADOS, WITH_CEPHFS])])
+
+# radosgw?
+# radosgw requires rados
+AC_ARG_WITH([radosgw],
+ [AS_HELP_STRING([--with-radosgw], [build RADOS gateway])],
+ [],
+ [with_radosgw=check])
+# AM_CONDITIONAL is defined later -- we need to check whether we can enable radosgw if no option is present
+#AS_IF([test "$with_radosgw" = "yes"], [AC_DEFINE([WITH_RADOS, WITH_RADOSGW])])
+
+# radosstriper?
+AC_ARG_WITH([radosstriper],
+ [AS_HELP_STRING([--with-radosstriper], [build radosstriper files])],
+ [],
+ [with_radosstriper=yes])
+AM_CONDITIONAL(WITH_RADOSSTRIPER, test "$with_radosstriper" = "yes")
+#AS_IF([test "$with_radostriper" = "yes"], [AC_DEFINE([WITH_RADOS, WITH_RADOSSTRIPER])])
+
+# mon?
+AC_ARG_WITH([mon],
+ [AS_HELP_STRING([--with-mon], [build Ceph monitor software files])],
+ [],
+ [with_mon=yes])
+AM_CONDITIONAL(WITH_MON, test "$with_mon" = "yes")
+#AS_IF([test "$with_mon" = "yes"], [AC_DEFINE([WITH_MON])])
+
+# osd?
+AC_ARG_WITH([osd],
+ [AS_HELP_STRING([--with-osd], [build object store daemon files])],
+ [],
+ [with_osd=yes])
+AM_CONDITIONAL(WITH_OSD, test "$with_osd" = "yes")
+#AS_IF([test "$with_osd" = "yes"], [AC_DEFINE([WITH_OSD])])
+
+# mds?
+AC_ARG_WITH([mds],
+ [AS_HELP_STRING([--with-mds], [build mds files])],
+ [],
+ [with_mds=yes])
+AM_CONDITIONAL(WITH_MDS, test "$with_mds" = "yes")
+#AS_IF([test "$with_mds" = "yes"], [AC_DEFINE([WITH_MDS])])
+
+# client?
+AC_ARG_ENABLE([client],
+ [AS_HELP_STRING([--enable-client], [enable client-side build])],
+ [],
+ [enable_client=yes])
+AM_CONDITIONAL([ENABLE_CLIENT], test "$enable_client" = "yes")
+#AS_IF([test "$enable_client" = "yes"], [AC_DEFINE([WITH_RADOS, WITH_RBD, ENABLE_CLIENT])])
+
+# server?
+AC_ARG_ENABLE([server],
+ [AS_HELP_STRING([--enable-server], [enable server-side build ])],
+ [],
+ [enable_server=yes])
+AM_CONDITIONAL(ENABLE_SERVER, test "$enable_server" = "yes")
+#AS_IF([test "$enable_server" = "yes"], [AC_DEFINE([WITH_MON, WITH_OSD, WITH_MDS, ENABLE_SERVER])])
+
+# cond-check if snappy-devel is installed, needed by leveldb that is need by server parts of the project
+AS_IF([test "$enable_server" = "yes" -a \( "$with_osd" = "yes" -o "$with_mon" = "yes" \)],
+ [AC_CHECK_LIB([snappy], [snappy_compress], [true], [AC_MSG_FAILURE([libsnappy not found])])])
+
+# cond-check leveldb, necessary if server, osd or mon enabled
+AS_IF([test "$enable_server" = "yes" -a \( "$with_osd" = "yes" -o "$with_mon" = "yes" \)],
+ [AC_CHECK_LIB([leveldb], [leveldb_open], [true], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])])
+###### PATCH ENDS HERE ######
+
+
# Check for yasm
AC_CHECK_PROG(YASM_CHECK, yasm, yes)
if test x"$YASM_CHECK" = x"yes"; then
fi
AC_SUBST(GCOV_PREFIX_STRIP, `echo $(pwd)/src | tr -dc / | wc -c`)
-# radosgw?
-AC_ARG_WITH([radosgw],
- [AS_HELP_STRING([--with-radosgw], [build RADOS gateway])],
- [],
- [with_radosgw=check])
+# is radosgw available?
RADOSGW=0
AS_IF([test "x$with_radosgw" != xno],
[AC_CHECK_LIB([fcgi], [FCGX_Init],
[with_ocf=no])
AM_CONDITIONAL(WITH_OCF, [ test "$with_ocf" = "yes" ])
-# check is snappy-devel is installed, needed by leveldb
-AC_CHECK_LIB([snappy], [snappy_compress], [true], [AC_MSG_FAILURE([libsnappy not found])])
-# use system leveldb
-AC_CHECK_LIB([leveldb], [leveldb_open], [true], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])
-# see if we can use bloom filters with leveldb
-AC_LANG_PUSH([C++])
-AC_CHECK_HEADER([leveldb/filter_policy.h], [AC_DEFINE([HAVE_LEVELDB_FILTER_POLICY], [1], [Defined if LevelDB supports bloom filters ])])
-AC_LANG_POP([C++])
+# cond-check snappy-devel and leveldb, necessary if server + osd or mon enabled
+if test "$enable_server" = "yes" -a \( "$with_osd" = "yes" -o "$with_mon" = "yes" \); then
+ AC_CHECK_LIB([snappy], [snappy_compress], [true], [AC_MSG_FAILURE([libsnappy not found])])
+ AC_CHECK_LIB([leveldb], [leveldb_open], [true], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])
+
+ # see if we can use bloom filters with leveldb
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADER([leveldb/filter_policy.h], [AC_DEFINE([HAVE_LEVELDB_FILTER_POLICY], [1], [Defined if LevelDB supports bloom filters ])])
+ AC_LANG_POP([C++])
+fi
# Find supported SIMD / NEON / SSE extensions supported by the compiler
AX_ARM_FEATURES()