From 67822ef05aeef7af677f55c675a28928254c2833 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 9 Jul 2009 16:28:18 -0700 Subject: [PATCH] s3gw: make compilation optional (./configure --with-s3gw) --- configure.ac | 16 ++++++++++++++++ src/Makefile.am | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bb3ddf94eb5f1..a491f91551152 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,22 @@ AC_ARG_WITH([debug], [with_debug=no]) AM_CONDITIONAL(WITH_DEBUG, test "$with_debug" = "yes") +# s3gw? +AC_ARG_WITH([s3gw], + [AS_HELP_STRING([--with-s3gw], [build S3 gateway])], + [with_s3gw=yes], + [with_s3gw=no]) +AS_IF([test "x$with_s3gw" != xno], + [AC_CHECK_LIB([fcgi], [FCGX_Init], + [AC_SUBST([LIBFCGI], ["-lfcgi"]) + AC_DEFINE([HAVE_LIBFCGI], [1], + [Define if you have libfcgi]) + HAVE_LIBFCGI=1 + ], + [AC_MSG_FAILURE([--with-s3gw was given, but libfcgi test failed])])]) +AM_CONDITIONAL(WITH_S3GW, test "$with_s3gw" = "yes") + + # fuse? AC_ARG_WITH([fuse], [AS_HELP_STRING([--with-fuse], [use FUSE library for client])], diff --git a/src/Makefile.am b/src/Makefile.am index c9f2bec701a7c..c42d109a6b1c2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -50,7 +50,7 @@ bin_PROGRAMS = \ mkmonfs monmaptool osdmaptool crushtool \ streamtest dupstore dumpjournal testmsgr \ testceph testrados testradospp \ - rados radosacl s3gw + rados radosacl sbin_PROGRAMS = \ mount.ceph @@ -138,8 +138,12 @@ testradospp_LDADD = librados.la libcrush.la radosacl_SOURCES = radosacl.cc radosacl_LDADD = librados.la libcrush.la +if WITH_S3GW s3gw_SOURCES = s3/s3gw.cc s3/s3fs.cc s3gw_LDADD = librados.la libcrush.la -lfcgi +bin_PROGRAMS += s3gw +endif + ## object classes # libtestclass.so: testclass.cc -- 2.39.5