s3gw: make compilation optional (./configure --with-s3gw)

This commit is contained in:
Sage Weil 2009-07-09 16:28:18 -07:00
parent 280e4df95d
commit 67822ef05a
2 changed files with 21 additions and 1 deletions

View File

@ -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])],

View File

@ -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