From 23aa046283790c6a13722caf8b91ab18451ea93c Mon Sep 17 00:00:00 2001 From: fgerlits Date: Thu, 23 Mar 2006 21:36:58 +0000 Subject: [PATCH] added boost_date_time dependence for the storageClient module; added diagnostic message in the configure scripts for BOOST_DATE_TIME_LIB --- livesupport/src/modules/core/etc/configure.ac | 3 +- .../modules/eventScheduler/etc/configure.ac | 3 +- .../modules/playlistExecutor/etc/configure.ac | 3 +- .../modules/schedulerClient/etc/configure.ac | 3 +- .../src/modules/storageClient/etc/Makefile.in | 3 + .../modules/storageClient/etc/acinclude.m4 | 69 +++++++++++++++++++ .../modules/storageClient/etc/configure.ac | 7 ++ .../src/modules/widgets/etc/configure.ac | 5 +- .../products/gLiveSupport/etc/configure.ac | 2 +- .../src/products/scheduler/etc/configure.ac | 3 +- 10 files changed, 87 insertions(+), 14 deletions(-) diff --git a/livesupport/src/modules/core/etc/configure.ac b/livesupport/src/modules/core/etc/configure.ac index 29393f5b2..7becdb405 100644 --- a/livesupport/src/modules/core/etc/configure.ac +++ b/livesupport/src/modules/core/etc/configure.ac @@ -67,12 +67,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi - +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) diff --git a/livesupport/src/modules/eventScheduler/etc/configure.ac b/livesupport/src/modules/eventScheduler/etc/configure.ac index 81f9a790e..e6344b9e9 100644 --- a/livesupport/src/modules/eventScheduler/etc/configure.ac +++ b/livesupport/src/modules/eventScheduler/etc/configure.ac @@ -61,12 +61,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi - +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) diff --git a/livesupport/src/modules/playlistExecutor/etc/configure.ac b/livesupport/src/modules/playlistExecutor/etc/configure.ac index 210859df6..5accc054c 100644 --- a/livesupport/src/modules/playlistExecutor/etc/configure.ac +++ b/livesupport/src/modules/playlistExecutor/etc/configure.ac @@ -61,12 +61,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi - +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) diff --git a/livesupport/src/modules/schedulerClient/etc/configure.ac b/livesupport/src/modules/schedulerClient/etc/configure.ac index d2e6f3a86..61470e057 100644 --- a/livesupport/src/modules/schedulerClient/etc/configure.ac +++ b/livesupport/src/modules/schedulerClient/etc/configure.ac @@ -61,12 +61,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi - +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) diff --git a/livesupport/src/modules/storageClient/etc/Makefile.in b/livesupport/src/modules/storageClient/etc/Makefile.in index 28bb47a58..d555084b6 100644 --- a/livesupport/src/modules/storageClient/etc/Makefile.in +++ b/livesupport/src/modules/storageClient/etc/Makefile.in @@ -73,6 +73,8 @@ AUTHENTICATION_LIB_FILE = ${AUTHENTICATION_LIB_DIR}/lib${AUTHENTICATION_LIB}.a VPATH = ${SRC_DIR} +BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@ + LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@ LIBXMLPP_LIBS=@LIBXMLPP_LIBS@ @@ -136,6 +138,7 @@ TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ TEST_RUNNER_LIBS = -l${STORAGE_CLIENT_LIB} -l${CORE_LIB} \ -l${AUTHENTICATION_LIB} \ + -l${BOOST_DATE_TIME_LIB} \ -lcppunit -ldl -lxmlrpc++ -lssl diff --git a/livesupport/src/modules/storageClient/etc/acinclude.m4 b/livesupport/src/modules/storageClient/etc/acinclude.m4 index 15046870b..9725e771d 100644 --- a/livesupport/src/modules/storageClient/etc/acinclude.m4 +++ b/livesupport/src/modules/storageClient/etc/acinclude.m4 @@ -262,3 +262,72 @@ AC_DEFUN([AC_CHECK_CURL], [ +dnl----------------------------------------------------------------------------- +dnl Macro to check for C++ namespaces +dnl for more information on this macro, see +dnl http://autoconf-archive.cryp.to/ac_cxx_namespaces.html +dnl +dnl usage: +dnl If the compiler can prevent names clashes using namespaces, +dnl define HAVE_NAMESPACES. +dnl----------------------------------------------------------------------------- +AC_DEFUN([AC_CXX_NAMESPACES], +[AC_CACHE_CHECK(whether the compiler implements namespaces, +ac_cv_cxx_namespaces, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], + [using namespace Outer::Inner; return i;], + ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) + AC_LANG_RESTORE +]) +if test "$ac_cv_cxx_namespaces" = yes; then + AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) +fi +]) + + +dnl----------------------------------------------------------------------------- +dnl Macro to check for the boost datetime library. +dnl for more information on boost, see http://www.boost.org/ +dnl for more information on this macro, see +dnl http://autoconf-archive.cryp.to/ax_boost_date-time.html +dnl +dnl usage: +dnl This macro checks to see if the Boost.DateTime library is installed. +dnl It also attempts to guess the currect library name using several attempts. +dnl It tries to build the library name using a user supplied name or suffix +dnl and then just the raw library. +dnl +dnl If the library is found, HAVE_BOOST_DATE_TIME is defined and +dnl BOOST_DATE_TIME_LIB is set to the name of the library. +dnl +dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB). +dnl----------------------------------------------------------------------------- +AC_DEFUN([AX_BOOST_DATE_TIME], +[AC_REQUIRE([AC_CXX_NAMESPACES])dnl +AC_CACHE_CHECK(whether the Boost::DateTime library is available, +ax_cv_boost_date_time, +[AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include ]], + [[using namespace boost::gregorian; date d(2002,Jan,10); return 0;]]), + ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no) + AC_LANG_RESTORE +]) +if test "$ax_cv_boost_date_time" = yes; then + AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::DateTime library is available]) + dnl Now determine the appropriate file names + AC_ARG_WITH([boost-date-time],AS_HELP_STRING([--with-boost-date-time], + [specify the boost date-time library or suffix to use]), + [if test "x$with_boost_date_time" != "xno"; then + ax_date_time_lib=$with_boost_date_time + ax_boost_date_time_lib=boost_date_time-$with_boost_date_time + fi]) + for ax_lib in $ax_date_time_lib $ax_boost_date_time_lib boost_date_time; do + AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB=$ax_lib break]) + done + AC_SUBST(BOOST_DATE_TIME_LIB) +fi +])dnl + diff --git a/livesupport/src/modules/storageClient/etc/configure.ac b/livesupport/src/modules/storageClient/etc/configure.ac index fd56df9e9..5a14e2004 100644 --- a/livesupport/src/modules/storageClient/etc/configure.ac +++ b/livesupport/src/modules/storageClient/etc/configure.ac @@ -60,6 +60,13 @@ export PKG_CONFIG_PATH export PATH=${prefix}/bin:${PATH} +AX_BOOST_DATE_TIME() +if test "$BOOST_DATE_TIME_LIB" = "" ; then + BOOST_DATE_TIME_LIB=boost_date_time-gcc + AC_SUBST(BOOST_DATE_TIME_LIB) +fi +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) + PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) AC_SUBST(LIBXMLPP_LIBS) diff --git a/livesupport/src/modules/widgets/etc/configure.ac b/livesupport/src/modules/widgets/etc/configure.ac index 041b73eda..8238b6740 100644 --- a/livesupport/src/modules/widgets/etc/configure.ac +++ b/livesupport/src/modules/widgets/etc/configure.ac @@ -1,4 +1,4 @@ -dnl----------------------------------------------------------------------------- +bdnl----------------------------------------------------------------------------- dnl Copyright (c) 2004 Media Development Loan Fund dnl dnl This file is part of the LiveSupport project. @@ -61,12 +61,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi - +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) diff --git a/livesupport/src/products/gLiveSupport/etc/configure.ac b/livesupport/src/products/gLiveSupport/etc/configure.ac index a992d8d3b..0ef8536c7 100644 --- a/livesupport/src/products/gLiveSupport/etc/configure.ac +++ b/livesupport/src/products/gLiveSupport/etc/configure.ac @@ -62,11 +62,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS) diff --git a/livesupport/src/products/scheduler/etc/configure.ac b/livesupport/src/products/scheduler/etc/configure.ac index a9826c546..9111bc5ca 100644 --- a/livesupport/src/products/scheduler/etc/configure.ac +++ b/livesupport/src/products/scheduler/etc/configure.ac @@ -62,12 +62,11 @@ export PATH=${prefix}/bin:${PATH} AX_BOOST_DATE_TIME() - if test "$BOOST_DATE_TIME_LIB" = "" ; then BOOST_DATE_TIME_LIB=boost_date_time-gcc AC_SUBST(BOOST_DATE_TIME_LIB) fi - +AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}]) PKG_CHECK_MODULES(LIBXMLPP,[libxml++-2.6 >= 2.8.1]) AC_SUBST(LIBXMLPP_CFLAGS)