]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
configure: fix --with-radosgw
authorSage Weil <sage@newdream.net>
Thu, 13 Aug 2009 18:23:54 +0000 (11:23 -0700)
committerSage Weil <sage@newdream.net>
Thu, 13 Aug 2009 18:23:54 +0000 (11:23 -0700)
configure.ac
src/Makefile.am

index 1d3b8d99fe4ae3a322bd9190103b2a8530cace03..565cfc4e7eb4b8a31e349307cf579e967e4b68e6 100644 (file)
@@ -40,21 +40,20 @@ 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],
+# radosgw?
+AC_ARG_WITH([radosgw],
+            [AS_HELP_STRING([--with-radosgw], [build RADOS gateway])],
+            [],
+            [with_radosgw=check])
+AS_IF([test "x$with_radosgw" != 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_RADOSGW, test "$with_radosgw" = "yes")
-
+             [HAVE_LIBFCGI=1],
+            [if test "x$with_radosgw" != xcheck; then
+                 AC_MSG_FAILURE(
+                   [--with-radosgw was given, but libfcgi not found])
+               fi
+             ])])
+AM_CONDITIONAL(WITH_RADOSGW, test "$HAVE_LIBFCGI" = "1")
 
 # fuse?
 AC_ARG_WITH([fuse],
@@ -91,7 +90,6 @@ AS_IF([test "x$with_hadoop" != xno],
              ])])
 AM_CONDITIONAL(WITH_HADOOPCLIENT, [test "$HAVE_JNI" = "1"])
 
-
 # CommonC++?
 AC_ARG_WITH([ccgnu],
             [AS_HELP_STRING([--with-ccgnu],
index 8d8420c2fa809380d4186f11850a9b6b9add802c..658a62992aa27fb925cd03cba456783f4830056a 100644 (file)
@@ -134,20 +134,6 @@ librados_a_SOURCES = ${librados_SOURCES}
 librados_a_CFLAGS = ${AM_CFLAGS}
 librados_a_CXXFLAGS = ${AM_CXXFLAGS}
 
-if WITH_RADOSGW
-libradosgw_a_SOURCES = \
-       radosgw/rgw_fs.cc \
-       radosgw/rgw_rados.cc \
-       radosgw/rgw_acl.cc \
-       radosgw/rgw_user.cc \
-       radosgw/rgw_access.cc \
-       radosgw/rgw_op.cc \
-       radosgw/rgw_rest.cc \
-       radosgw/rgw_common.cc
-libradosgw_a_CFLAGS = ${AM_CFLAGS}
-# lib_LTLIBRARIES += libradosgw.a
-endif
-
 rados_SOURCES = rados.cc
 rados_LDADD = librados.la libcrush.la
 bin_PROGRAMS += rados
@@ -161,6 +147,18 @@ radosacl_LDADD = librados.la libcrush.la
 bin_PROGRAMS += testrados testradospp radosacl
 
 if WITH_RADOSGW
+libradosgw_a_SOURCES = \
+       radosgw/rgw_fs.cc \
+       radosgw/rgw_rados.cc \
+       radosgw/rgw_acl.cc \
+       radosgw/rgw_user.cc \
+       radosgw/rgw_access.cc \
+       radosgw/rgw_op.cc \
+       radosgw/rgw_rest.cc \
+       radosgw/rgw_common.cc
+libradosgw_a_CFLAGS = ${AM_CFLAGS}
+# lib_LTLIBRARIES += libradosgw.a
+
 rgw_SOURCES = radosgw/rgw_main.cc
 rgw_LDADD = libradosgw.a librados.a libcrush.a -lfcgi -lcrypto -lexpat
 rgw_admin_SOURCES = radosgw/rgw_admin.cc