summaryrefslogtreecommitdiffstats
path: root/sca-cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-05-16 05:22:18 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-05-16 05:22:18 +0000
commiteaeae2522f38912fb727197bb3fbe5945ce2ada6 (patch)
treeaf2732e3c75dbd0152ff14de127afc99e750cccf /sca-cpp
parentea518b0fea5745b393db8a849a822b64c46d1208 (diff)
Add dependencies on Apache Thrift and Facebook Scribe, for use by the Log component.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@944766 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp')
-rw-r--r--sca-cpp/trunk/INSTALL35
-rw-r--r--sca-cpp/trunk/components/log/Makefile.am29
-rw-r--r--sca-cpp/trunk/configure.ac67
-rwxr-xr-xsca-cpp/trunk/ubuntu/ubuntu-install40
4 files changed, 170 insertions, 1 deletions
diff --git a/sca-cpp/trunk/INSTALL b/sca-cpp/trunk/INSTALL
index d8e3bddfbe..a1fc55c5ce 100644
--- a/sca-cpp/trunk/INSTALL
+++ b/sca-cpp/trunk/INSTALL
@@ -101,6 +101,9 @@ requires libcheck-0.9.6
SQL Database:
postgresql-9.0 (http://www.postgresql.org/)
+Logging:
+Apache Thrift-0.2.0 (http://incubator.apache.org/thrift/)
+Facebook Scribe-2.2 (http://github.com/facebook/scribe/downloads)
To configure the Tuscany SCA build do this:
./bootstrap
@@ -164,6 +167,8 @@ dependencies installed under $HOME:
--enable-chat --with-libstrophe=$HOME/libstrophe-bin \
--with-vysper=$HOME/vysper-0.5 \
--enable-sqldb --with-pgsql=$HOME/postgresql-9.0-bin \
+--enable-log --with-thrift=$HOME/thrift-0.2.0-bin \
+--with-scribe=$HOME/scribe-2.2-bin \
--enable-maintainer-mode
@@ -287,3 +292,33 @@ cd postgresql-9.0alpha5
make
make install
+Apache Thrift (including Facebook fb303):
+wget http://www.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz
+tar xzf thrift-0.2.0-incubating.tar.gz
+cd thrift-0.2.0
+./bootstrap.sh
+./configure --prefix=$HOME/thrift-0.2.0-bin --with-java=no --with-erlang=no \
+--with-py=no --with-perl=no --with-ruby=no --with-csharp=no --disable-static
+make
+make install
+cd contrib/fb303
+./bootstrap.sh
+./configure --prefix=$HOME/thrift-0.2.0-bin/contrib/fb303 \
+PY_PREFIX=$HOME/thrift-0.2.0-bin/contrib/fb303 \
+--with-thriftpath=$HOME/thrift-0.2.0-bin
+make
+make install
+cp cpp/lib/libfb303.so $HOME/thrift-0.2.0-bin/contrib/fb303/lib
+
+Facebook Scribe:
+wget http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz
+tar xzf scribe-2.2.tar.gz
+cd scribe
+./bootstrap.sh --prefix=$HOME/scribe-2.2-bin PY_PREFIX=$HOME/scribe-2.2-bin \
+--with-thriftpath=$HOME/thrift-0.2.0-bin \
+--with-fb303path=$HOME/thrift-0.2.0-bin/contrib/fb303 \
+--disable-static
+make
+make install
+cp src/lib/libscribe.so $HOME/scribe-2.2-bin/lib
+
diff --git a/sca-cpp/trunk/components/log/Makefile.am b/sca-cpp/trunk/components/log/Makefile.am
index de5c2d1b1e..e9e742d8c8 100644
--- a/sca-cpp/trunk/components/log/Makefile.am
+++ b/sca-cpp/trunk/components/log/Makefile.am
@@ -15,3 +15,32 @@
# specific language governing permissions and limitations
# under the License.
+if WANT_LOG
+
+INCLUDES = -I${SCRIBE_INCLUDE}
+
+#comp_SCRIPTS = qpidd-start qpidd-stop
+compdir=$(prefix)/components/log
+
+comp_DATA = scribe.prefix
+scribe.prefix: $(top_builddir)/config.status
+ echo ${SCRIBE_PREFIX} >scribe.prefix
+
+#comp_LTLIBRARIES = libqueue-sender.la libqueue-listener.la
+#
+#libqueue_sender_la_SOURCES = queue-sender.cpp
+#libqueue_sender_la_LDFLAGS = -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon
+#
+#libqueue_listener_la_SOURCES = queue-listener.cpp
+#libqueue_listener_la_LDFLAGS = -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon
+#
+#qpid_test_SOURCES = qpid-test.cpp
+#qpid_test_LDFLAGS = -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon
+#
+#client_test_SOURCES = client-test.cpp
+#client_test_LDFLAGS = -lxml2 -lcurl -lmozjs -L${QPIDC_LIB} -R${QPIDC_LIB} -lqpidclient -lqpidcommon
+#
+#noinst_PROGRAMS = qpid-test client-test
+#TESTS = send-test server-test
+
+endif
diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac
index c114410f0e..58c516c3ee 100644
--- a/sca-cpp/trunk/configure.ac
+++ b/sca-cpp/trunk/configure.ac
@@ -676,6 +676,73 @@ else
AM_CONDITIONAL([WANT_VYSPER], false)
fi
+# Configure path to Apache Thrift (and Facebook fb303).
+AC_MSG_CHECKING([for thrift])
+AC_ARG_WITH([thrift], [AC_HELP_STRING([--with-thrift=PATH], [path to installed Apache Thrift [default=/usr/local]])], [
+ THRIFT_PREFIX="${withval}"
+ THRIFT_INCLUDE="${withval}/include"
+ THRIFT_LIB="${withval}/lib"
+ FB303_PREFIX="${withval}/contrib/fb303"
+ FB303_INCLUDE="${withval}/contrib/fb303/include"
+ FB303_LIB="${withval}/contrib/fb303/lib"
+ AC_MSG_RESULT("${withval}")
+], [
+ THRIFT_PREFIX="/usr/local"
+ THRIFT_INCLUDE="/usr/local/include"
+ THRIFT_LIB="/usr/local/lib"
+ FB303_PREFIX="/usr/local"
+ FB303_INCLUDE="/usr/local/include"
+ FB303_LIB="/usr/local/lib"
+ AC_MSG_RESULT(/usr/local)
+])
+AC_SUBST(THRIFT_PREFIX)
+AC_SUBST(THRIFT_INCLUDE)
+AC_SUBST(THRIFT_LIB)
+AC_SUBST(FB303_PREFIX)
+AC_SUBST(FB303_INCLUDE)
+AC_SUBST(FB303_LIB)
+
+# Configure path to Facebook Scribe.
+AC_MSG_CHECKING([for scribe])
+AC_ARG_WITH([scribe], [AC_HELP_STRING([--with-scribe=PATH], [path to installed Facebook Scribe [default=/usr/local]])], [
+ SCRIBE_PREFIX="${withval}"
+ SCRIBE_INCLUDE="${withval}/include"
+ SCRIBE_LIB="${withval}/lib"
+ AC_MSG_RESULT("${withval}")
+], [
+ SCRIBE_PREFIX="/usr/local"
+ SCRIBE_INCLUDE="/usr/local/include"
+ SCRIBE_LIB="/usr/local/lib"
+ AC_MSG_RESULT(/usr/local)
+])
+AC_SUBST(SCRIBE_PREFIX)
+AC_SUBST(SCRIBE_INCLUDE)
+AC_SUBST(SCRIBE_LIB)
+
+# Enable Log component.
+AC_MSG_CHECKING([whether to enable the Log component])
+AC_ARG_ENABLE(log, [AS_HELP_STRING([--enable-log], [enable Log component [default=no]])],
+[ case "${enableval}" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ want_log=true
+ ;;
+ esac ],
+[ AC_MSG_RESULT(no)])
+if test "${want_log}" = "true"; then
+ LIBS="-L${THRIFT_LIB} -L${FB303_LIB} -L${SCRIBE_LIB} ${default_LIBS}"
+ AC_CHECK_LIB([thrift], [_init], [], [AC_MSG_ERROR([couldn't find a suitable libthrift, use --with-thrift=PATH])])
+ AC_CHECK_LIB([fb303], [_init], [], [AC_MSG_ERROR([couldn't find a suitable libfb303, use --with-thrift=PATH])])
+ AC_CHECK_LIB([scribe], [_init], [], [AC_MSG_ERROR([couldn't find a suitable libscribe, use --with-scribe=PATH])])
+ AM_CONDITIONAL([WANT_LOG], true)
+ AC_DEFINE([WANT_LOG], 1, [enable Log component])
+else
+ AM_CONDITIONAL([WANT_LOG], false)
+fi
+
# Configure GCC C++ and LD options.
AC_SUBST([CXXFLAGS], ["${cxxflags}"])
AC_SUBST([LDFLAGS], ["${ldflags}"])
diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install b/sca-cpp/trunk/ubuntu/ubuntu-install
index 978bffe27d..3a06e6befa 100755
--- a/sca-cpp/trunk/ubuntu/ubuntu-install
+++ b/sca-cpp/trunk/ubuntu/ubuntu-install
@@ -231,12 +231,50 @@ if [ "$?" != "0" ]; then
fi
cd $build
+# Build Apache Thrift
+wget http://www.apache.org/dist/incubator/thrift/0.2.0-incubating/thrift-0.2.0-incubating.tar.gz
+tar xzf thrift-0.2.0-incubating.tar.gz
+cd thrift-0.2.0
+./bootstrap.sh
+./configure --prefix=$build/thrift-0.2.0-bin --with-java=no --with-erlang=no --with-py=no --with-perl=no --with-ruby=no --with-csharp=no --disable-static
+make
+make install
+if [ "$?" != "0" ]; then
+ exit $?
+fi
+cd $build
+
+# Build Facebook fb303
+cd thrift-0.2.0/contrib/fb303
+./bootstrap.sh
+./configure --prefix=$build/thrift-0.2.0-bin/contrib/fb303 PY_PREFIX=$build/thrift-0.2.0-bin/contrib/fb303 --with-thriftpath=$build/thrift-0.2.0-bin --disable-static
+make
+make install
+if [ "$?" != "0" ]; then
+ exit $?
+fi
+cp cpp/lib/libfb303.so $build/thrift-0.2.0-bin/contrib/fb303/lib
+cd $build
+
+# Build Facebook Scribe
+wget http://github.com/downloads/facebook/scribe/scribe-2.2.tar.gz
+tar xzf scribe-2.2.tar.gz
+cd scribe
+./bootstrap.sh --prefix=$build/scribe-2.2-bin PY_PREFIX=$build/scribe-2.2-bin --with-thriftpath=$build/thrift-0.2.0-bin --with-fb303path=$build/thrift-0.2.0-bin/contrib/fb303 --disable-static
+make
+make install
+if [ "$?" != "0" ]; then
+ exit $?
+fi
+cp src/lib/libscribe.so $HOME/scribe-2.2-bin/lib
+cd $build
+
# Build Tuscany SCA
git clone git://git.apache.org/tuscany-sca-cpp
cd tuscany-sca-cpp
cp etc/git-exclude .git/info/exclude
./bootstrap
-./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --with-memcached=$build/memcached-1.4.4-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --enable-threads --enable-python --enable-gae --with-gae=$build/google_appengine --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --with-vysper=$build/vysper-0.5 --enable-sqldb --with-pgsql=$build/postgresql-9.0-bin
+./configure --prefix=$build/tuscany-sca-cpp-bin --with-curl=$build/curl-7.19.5-bin --with-apr=$build/httpd-2.2.15-bin --with-httpd=$build/httpd-2.2.15-bin --with-memcached=$build/memcached-1.4.4-bin --with-tinycdb=$build/tinycdb-0.77-bin --with-js-include=$build/tracemonkey-bin/include/js --with-js-lib=$build/tracemonkey-bin/lib --enable-threads --enable-python --enable-gae --with-gae=$build/google_appengine --enable-java --with-java=/usr/lib/jvm/java-6-openjdk --enable-webservice --with-libxml2=$build/libxml2-2.7.7-bin --with-axis2c=$build/axis2c-1.6.0-bin --enable-queue --with-qpidc=$build/qpidc-0.6-bin --enable-chat --with-libstrophe=$build/libstrophe-bin --with-vysper=$build/vysper-0.5 --enable-sqldb --with-pgsql=$build/postgresql-9.0-bin --enable-log --with-thrift=$build/thrift-0.2.0-bin --with-scribe=$build/scribe-2.2-bin
make
make install
if [ "$?" != "0" ]; then