]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
s3gw: make compilation optional (./configure --with-s3gw)
authorSage Weil <sage@newdream.net>
Thu, 9 Jul 2009 23:28:18 +0000 (16:28 -0700)
committerSage Weil <sage@newdream.net>
Thu, 9 Jul 2009 23:28:18 +0000 (16:28 -0700)
configure.ac
src/Makefile.am

index bb3ddf94eb5f139b0e5e7774b84d44962c0e4526..a491f915511526fafbdbdd751b7f017100e8cacb 100644 (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])],
index c9f2bec701a7c0f1c7b66fcd803f8181c3f146ea..c42d109a6b1c299599cf66a22d3d1d821ca56a01 100644 (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