This commit is contained in:
fgerlits 2006-11-08 16:10:38 +00:00
parent 3944d3d8da
commit b454abd40f
32 changed files with 2972 additions and 427 deletions

View File

@ -159,46 +159,345 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Macro to check for curl of sufficient version by looking at curl-config
dnl
dnl usage:
dnl AC_CHECK_CURL(version, action-if, action-not)
dnl
dnl defines CURL_LIBS, CURL_CFLAGS, see curl-config man page
dnl-----------------------------------------------------------------------------
AC_DEFUN([AC_CHECK_CURL], [
succeeded=no
if test -z "$CURL_CONFIG"; then
AC_PATH_PROG(CURL_CONFIG, curl-config, no)
fi
if test "$CURL_CONFIG" = "no" ; then
echo "*** The curl-config script could not be found. Make sure it is"
echo "*** in your path, and that curl is properly installed."
echo "*** Or see http://curl.haxx.se/"
else
dnl curl-config --version returns "libcurl <version>", thus cut the number
CURL_VERSION=`$CURL_CONFIG --version | cut -d" " -f2`
AC_MSG_CHECKING(for curl >= $1)
VERSION_CHECK=`expr $CURL_VERSION \>\= $1`
if test "$VERSION_CHECK" = "1" ; then
AC_MSG_RESULT(yes)
succeeded=yes
AC_MSG_CHECKING(CURL_CFLAGS)
CURL_CFLAGS=`$CURL_CONFIG --cflags`
AC_MSG_RESULT($CURL_CFLAGS)
AC_MSG_CHECKING(CURL_LIBS)
CURL_LIBS=`$CURL_CONFIG --libs`
AC_MSG_RESULT($CURL_LIBS)
else
CURL_CFLAGS=""
CURL_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
ifelse([$3], ,echo "can't find curl >= $1",)
fi
AC_SUBST(CURL_CFLAGS)
AC_SUBST(CURL_LIBS)
fi
if test $succeeded = yes; then
ifelse([$2], , :, [$2])
else
ifelse([$3], , AC_MSG_ERROR([Library requirements (curl) not met.]), [$3])
fi
])

View File

@ -288,7 +288,7 @@ dnl-----------------------------------------------------------------------------
AC_ARG_WITH([check-boost],
AC_HELP_STRING([--with-check-boost],
[check for the availability of the boost library on the
system, and use it if available (no)]),
system, and use it if available (yes)]),
[CHECK_BOOST_LIB=${withval}], [CHECK_BOOST_LIB=yes])
AC_MSG_RESULT([checking for boost library on system: ${CHECK_BOOST_LIB}])
@ -324,7 +324,7 @@ AC_ARG_WITH([check-icu],
AC_HELP_STRING([--with-check-icu],
[check for the availability of the icu library on the
system, and use it if available (no)]),
[CHECK_ICU_LIB=${withval}], [CHECK_ICU_LIB=yes])
[CHECK_ICU_LIB=${withval}], [CHECK_ICU_LIB=no])
AC_MSG_RESULT([checking for icu library on system: ${CHECK_ICU_LIB}])
@ -347,15 +347,21 @@ dnl-----------------------------------------------------------------------------
AC_SUBST(COMPILE_BOOST)
dnl check for the boost library
AX_BOOST_DATE_TIME()
if test "$CHECK_BOOST_LIB" = "yes" ; then
if test "$BOOST_DATE_TIME_LIB" = "" ; then
AC_MSG_RESULT([not found boost library of sufficient version, will compile from our own])
COMPILE_BOOST="yes"
else
if test "${CHECK_BOOST_LIB}" = "yes" ; then
found_boost_date_time="no"
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" != "x"; then
found_boost_date_time="yes"
fi
fi
if test "${found_boost_date_time}" = "yes"; then
AC_MSG_RESULT([using boost date-time library found on the system])
COMPILE_BOOST="no"
else
AC_MSG_RESULT([not found boost date-time library of sufficient version, will compile from our own])
COMPILE_BOOST="yes"
fi
else
COMPILE_BOOST="yes"

View File

@ -55,7 +55,6 @@ prefix = @prefix@
USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -93,7 +92,6 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${LIBXMLPP_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \

View File

@ -59,7 +59,6 @@ USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_BIN_DIR = ${USR_DIR}/bin
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
GENRB = @GENRB@
GENRBOPTS = --destdir ${TMP_DIR} \
@ -69,6 +68,8 @@ GENRBOPTS = --destdir ${TMP_DIR} \
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -103,12 +104,13 @@ export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${BOOST_CFLAGS} \
${TAGLIB_CFLAGS} \
${LIBXMLPP_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${CURL_LIBS} \
${ICU_LIBS} \
${TAGLIB_LIBS} \
@ -172,8 +174,8 @@ TEST_RUNNER_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
${TMP_DIR}/${PACKAGE_NAME}_hu.res \
${TMP_DIR}/${PACKAGE_NAME}_jp.res
TEST_RUNNER_LIBS = -l${CORE_LIB} ${ICU_LIBS} \
-l${BOOST_DATE_TIME_LIB} -lcppunit -ldl -lxmlrpc++ -ltar
TEST_RUNNER_LIBS = -l${CORE_LIB} ${ICU_LIBS} ${BOOST_DATE_TIME_LIB} \
-lcppunit -ldl -lxmlrpc++ -ltar
#-------------------------------------------------------------------------------

View File

@ -232,48 +232,292 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
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
dnl-----------------------------------------------------------------------------

View File

@ -63,7 +63,7 @@ AC_ARG_ENABLE([debug],
if test "x${enable_debug}" = "xyes"; then
CXXFLAGS="-g -O0"
AC_DEFINE( YDEBUG, 1, [Debug is on] )
AC_DEFINE(YDEBUG, 1, [Debug is on])
else
CXXFLAGS="-O3"
fi
@ -87,12 +87,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -56,7 +56,6 @@ prefix = @prefix@
USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -95,7 +94,6 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
${LIBXMLPP_CFLAGS} \
${LIBODBCXX_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \

View File

@ -55,7 +55,6 @@ prefix = @prefix@
USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -67,6 +66,8 @@ CORE_LIB_FILE = ${CORE_LIB_DIR}/lib${CORE_LIB}.a
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -91,12 +92,13 @@ export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-Wall -Wno-long-long \
${BOOST_CFLAGS} \
${LIBXMLPP_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${LIBXMLPP_LIBS} \
-L${USR_LIB_DIR} \
-L${CORE_LIB_DIR} \
@ -114,7 +116,7 @@ TEST_RUNNER_OBJS = ${TMP_DIR}/TestScheduledEvent.o \
${TMP_DIR}/EventSchedulerTest.o \
${TMP_DIR}/TestRunner.o
TEST_RUNNER_LIBS = -l${EVENT_SCHEDULER_LIB} -l${CORE_LIB} \
-l${BOOST_DATE_TIME_LIB} \
${BOOST_DATE_TIME_LIB} \
-lcppunit -ldl

View File

@ -116,46 +116,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -82,12 +82,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -62,7 +62,6 @@ USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_BIN_DIR = ${USR_DIR}/bin
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -74,6 +73,8 @@ CORE_LIB_FILE = ${CORE_LIB_DIR}/lib${CORE_LIB}.a
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
GSTREAMER_CFLAGS=@GSTREAMER_CFLAGS@
@ -117,15 +118,16 @@ CFLAGS = @CFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-I${INCLUDE_DIR} -I${TMP_DIR}
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-Wall -Wno-long-long \
${BOOST_CFLAGS} \
${GSTREAMER_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
GST_LDFLAGS = @LDFLAGS@ ${GSTREAMER_LIBS} \
-L${USR_LIB_DIR} \
-L${LIB_DIR}
LDFLAGS = @LDFLAGS@ ${GSTREAMER_LIBS} \
${BOOST_LIBS} \
-L${USR_LIB_DIR} \
-L${CORE_LIB_DIR} \
-L${LIB_DIR}
@ -159,12 +161,12 @@ DONT_TEST= ${TMP_DIR}/AutoplugTest.o \
${TMP_DIR}/MinimalAudioSmilTest.o
TEST_RUNNER_LIBS = -l${GSTREAMER_ELEMENTS_LIB} -l${CORE_LIB} \
-l${BOOST_DATE_TIME_LIB} \
${BOOST_DATE_TIME_LIB} \
-lcppunit -ldl -lxmlrpc++
PLAY_OBJS = ${TMP_DIR}/play.o
PLAY_LIBS = -l${GSTREAMER_ELEMENTS_LIB} -l${CORE_LIB}
PLAY_LIBS = -l${GSTREAMER_ELEMENTS_LIB} -l${CORE_LIB}
#-------------------------------------------------------------------------------

View File

@ -115,45 +115,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
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

View File

@ -82,12 +82,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
fi
AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}])
PKG_CHECK_MODULES(GSTREAMER,[gstreamer-0.8 >= 0.8])
AC_SUBST(GSTREAMER_CFLAGS)

View File

@ -58,7 +58,6 @@ prefix = @prefix@
USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -78,6 +77,8 @@ GST_REAL_LIB_DIR=${REAL_BASE_DIR}/modules/gstreamerElements/lib
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -114,14 +115,15 @@ export GST_PLUGIN_PATH=${GST_REAL_LIB_DIR}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-Wall -Wno-long-long \
${BOOST_CFLAGS} \
${LIBXMLPP_CFLAGS} \
${GSTREAMER_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${GSTREAMER_ELEMENTS_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${LIBXMLPP_LIBS} \
${ICU_LIBS} \
${GSTREAMER_LIBS} \
@ -143,7 +145,7 @@ TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
TEST_RUNNER_LIBS = -l${PLAYLIST_EXECUTOR_LIB} -l${CORE_LIB} \
-l${GSTREAMER_ELEMENTS_LIB} \
${TAGLIB_LIBS} \
-l${BOOST_DATE_TIME_LIB} -lcppunit -ldl -lm -lxmlrpc++
${BOOST_DATE_TIME_LIB} -lcppunit -ldl -lm -lxmlrpc++
TWOTEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
${TMP_DIR}/TwoGstreamerPlayersTest.o

View File

@ -232,46 +232,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -81,12 +81,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -55,7 +55,6 @@ prefix = @prefix@
USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -79,6 +78,8 @@ SCHEDULER_EXE = ${SCHEDULER_DIR}/tmp/scheduler
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -113,14 +114,15 @@ export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${BOOST_CFLAGS} \
${LIBXMLPP_CFLAGS} \
${LIBTAR_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${AUTHENTICATION_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${LIBXMLPP_LIBS} \
${CURL_LIBS} \
${ICU_LIBS} \
@ -145,7 +147,7 @@ TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
TEST_RUNNER_LIBS = -l${SCHEDULER_CLIENT_LIB} \
-l${CORE_LIB} \
-l${AUTHENTICATION_LIB} \
-l${BOOST_DATE_TIME_LIB} \
${BOOST_DATE_TIME_LIB} \
-lcppunit -ldl -lxmlrpc++ -lssl -ltar

View File

@ -288,46 +288,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -84,12 +84,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -55,7 +55,6 @@ prefix = @prefix@
USR_DIR = ${prefix}
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
@ -73,6 +72,8 @@ AUTHENTICATION_LIB_FILE = ${AUTHENTICATION_LIB_DIR}/lib${AUTHENTICATION_LIB}.a
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -108,12 +109,13 @@ CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
-I${USR_INCLUDE_DIR} \
${BOOST_CFLAGS} \
${LIBXMLPP_CFLAGS} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${AUTHENTICATION_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${LIBXMLPP_LIBS} \
${ICU_LIBS} \
${CURL_LIBS} \
@ -138,7 +140,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} \
${BOOST_DATE_TIME_LIB} \
-lcppunit -ldl -lxmlrpc++ -lssl -ltar

View File

@ -288,46 +288,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -82,12 +82,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -61,8 +61,6 @@ USR_BIN_DIR = ${USR_DIR}/bin
USR_LIB_DIR = ${USR_DIR}/lib
USR_VAR_DIR = ${USR_DIR}/var
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
MODULES_DIR = ${BASE_DIR}/..
CORE_DIR = ${MODULES_DIR}/core
@ -79,6 +77,8 @@ GENRBOPTS = --destdir ${TMP_DIR} \
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -111,14 +111,15 @@ export LD_LIBRARY_PATH:=${USR_LIB_DIR}:${LD_LIBRARY_PATH}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${BOOST_CFLAGS} \
${LIBXMLPP_CFLAGS} \
${ICU_CFLAGS} \
${GTKMM_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${LIBXMLPP_LIBS} \
${ICU_LIBS} \
${GTKMM_LIBS} \
@ -160,7 +161,7 @@ TEST_RUNNER_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
${TMP_DIR}/${PACKAGE_NAME}_hu.res
TEST_EXE_LIBS = -l${WIDGETS_LIB} -l${CORE_LIB} ${ICU_LIBS} \
-l${BOOST_DATE_TIME_LIB} -lxmlrpc++ -lssl
${BOOST_DATE_TIME_LIB} -lxmlrpc++ -lssl
#-------------------------------------------------------------------------------
# Targets

View File

@ -116,48 +116,292 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
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
dnl-----------------------------------------------------------------------------
@ -218,3 +462,4 @@ AC_DEFUN([AC_CHECK_ICU], [
ifelse([$3], , AC_MSG_ERROR([Library requirements (ICU) not met.]), [$3])
fi
])

View File

@ -82,12 +82,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
fi
AC_MSG_RESULT([checking BOOST_DATE_TIME_LIB... ${BOOST_DATE_TIME_LIB}])
AC_CHECK_ICU(3.0)
AC_SUBST(ICU_CFLAGS)

View File

@ -66,7 +66,6 @@ USR_ETC_DIR = ${USR_DIR}/etc
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
USR_VAR_DIR = ${USR_DIR}/var
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
HOSTNAME = @HOSTNAME@
WWW_PORT = @WWW_PORT@
@ -167,6 +166,8 @@ WIDGETS_LIB_DIR = ${WIDGETS_DIR}/lib
WIDGETS_LIB = livesupport_widgets
WIDGETS_LIB_FILE = ${WIDGETS_LIB_DIR}/lib${WIDGETS_LIB}.a
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -209,12 +210,12 @@ export GST_PLUGIN_PATH=${GST_REAL_LIB_DIR}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${BOOST_CFLAGS} \
${TAGLIB_CFLAGS} \
${LIBXMLPP_CFLAGS} \
${GTKMM_CFLAGS} \
${GSTREAMER_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${AUTHENTICATION_INCLUDE_DIR} \
-I${STORAGE_CLIENT_INCLUDE_DIR} \
@ -224,6 +225,7 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-I${PLAYLIST_EXECUTOR_INCLUDE_DIR} \
-I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${ICU_LIBS} \
${LIBXMLPP_LIBS} \
${CURL_LIBS} \
@ -293,7 +295,7 @@ G_LIVESUPPORT_EXE_LIBS = -l${PLAYLIST_EXECUTOR_LIB} \
-l${WIDGETS_LIB} \
-l${SCHEDULER_CLIENT_LIB} \
-l${CORE_LIB} \
-l${BOOST_DATE_TIME_LIB} \
${BOOST_DATE_TIME_LIB} \
-lxmlrpc++ -lssl -ltar
TEST_RUNNER_OBJS = ${G_LIVESUPPORT_OBJS} \

View File

@ -288,46 +288,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -83,12 +83,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -64,7 +64,6 @@ USR_ETC_DIR = ${USR_DIR}/etc
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
USR_TMP_DIR = ${USR_DIR}/tmp
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_33_1
HOSTNAME = @HOSTNAME@
WWW_PORT = @WWW_PORT@
@ -102,6 +101,8 @@ REPLACE_SED_STRING="s/ls_lib_dir/${USR_LIB_DIR_S}/; \
VPATH = ${SRC_DIR}
BOOST_CFLAGS=@BOOST_CPPFLAGS@
BOOST_LIBS=@BOOST_LDFLAGS@
BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
LIBXMLPP_CFLAGS=@LIBXMLPP_CFLAGS@
@ -194,13 +195,13 @@ export GST_PLUGIN_PATH=${GST_REAL_LIB_DIR}
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-pedantic -Wall -Wno-long-long \
${BOOST_CFLAGS} \
${LIBXMLPP_CFLAGS} \
${LIBODBCXX_CFLAGS} \
${GSTREAMER_CFLAGS} \
${TAGLIB_CFLAGS} \
${LIBTAR_CFLAGS} \
-I${USR_INCLUDE_DIR} \
-I${BOOST_INCLUDE_DIR} \
-I${CORE_INCLUDE_DIR} \
-I${AUTHENTICATION_INCLUDE_DIR} \
-I${DB_INCLUDE_DIR} \
@ -210,6 +211,7 @@ CXXFLAGS = @CXXFLAGS@ @DEFS@ @COVERAGE_CXXFLAGS@ -pthread \
-I${EVENT_SCHEDULER_INCLUDE_DIR} \
-I${TMP_DIR}
LDFLAGS = @LDFLAGS@ -pthread \
${BOOST_LIBS} \
${LIBXMLPP_LIBS} \
${LIBODBCXX_LIBS} \
${GSTREAMER_LIBS} \
@ -265,7 +267,7 @@ SCHEDULER_EXE_LIBS = -l${EVENT_SCHEDULER_LIB} -l${PLAYLIST_EXECUTOR_LIB} \
-l${STORAGE_CLIENT_LIB} -l${DB_LIB} \
-l${AUTHENTICATION_LIB} \
-l${CORE_LIB} \
-l${BOOST_DATE_TIME_LIB} \
${BOOST_DATE_TIME_LIB} \
-lxmlrpc++ -lssl -ltar
TEST_RUNNER_OBJS = ${SCHEDULER_OBJS} \

View File

@ -288,46 +288,290 @@ fi
dnl-----------------------------------------------------------------------------
dnl Macro to check for the boost datetime library.
dnl Test for the Boost C++ libraries of a particular version (or newer).
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 http://autoconf-archive.cryp.to/ax_boost_base.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 If no path to the installed boost library is given the macro searches
dnl under ${prefix}, /usr, /usr/local, and /opt, and evaluates the $BOOST_ROOT
dnl environment variable. Further documentation is available at
dnl http://randspringer.de/boost/index.html
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 This macro calls: AC_SUBST(BOOST_CPPFLAGS) and AC_SUBST(BOOST_LDFLAGS)
dnl and sets: HAVE_BOOST
dnl
dnl Modified for Campcaster:
dnl * --with-boost default changed to Yes;
dnl * if the library is not found, it does not die, just prints "no", leaves
dnl HAVE_BOOST undefined, and sets the BOOST_CPPFLAGS and BOOST_LDFLAGS
dnl variables to "";
dnl * ${prefix} is prepended to the search path.
dnl
dnl Author: Thomas Porschberg <thomas@randspringer.de>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
dnl-----------------------------------------------------------------------------
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is Yes) - it is possible to specify the root directory for boost (optional)]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
else
for ac_boost_path_tmp in ${prefix} /usr /usr/local /opt ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/lib"
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
for ac_boost_path in /usr /usr/local /opt ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
BOOST_LDFLAGS="-L$best_path/lib"
if test "x$BOOST_ROOT" != "x"; then
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
BOOST_CPPFLAGS=""
BOOST_LDFLAGS=""
AC_MSG_RESULT(no)
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
dnl-----------------------------------------------------------------------------
dnl Test for Date_Time library from the Boost C++ libraries.
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 The macro requires a preceding call to AX_BOOST_BASE.
dnl Further documentation is available at
dnl <http://randspringer.de/boost/index.html>.
dnl
dnl This macro calls AC_SUBST(BOOST_DATE_TIME_LIB).
dnl This macro calls: AC_SUBST(BOOST_DATE_TIME_LIB)
dnl and sets: HAVE_BOOST_DATE_TIME
dnl
dnl Modified for Campcaster:
dnl * --with-boost-date-time default changed to Yes.
dnl
dnl Authors:
dnl Thomas Porschberg <thomas@randspringer.de>
dnl Michael Tindal <mtindal@paradoxpoint.com>
dnl
dnl License:
dnl Copyright © 2006 Thomas Porschberg <thomas@randspringer.de>
dnl Copying and distribution of this file, with or without modification,
dnl are permitted in any medium without royalty provided the copyright notice
dnl and this notice are preserved.
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 <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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
[
AC_ARG_WITH([boost-date-time],
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_date_time_lib=""
else
want_boost="yes"
ax_boost_user_date_time_lib="$withval"
fi
],
[want_boost="yes"]
)
if test "x$want_boost" = "xyes"; then
AC_REQUIRE([AC_PROG_CC])
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
ax_cv_boost_date_time,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
[[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_POP([C++])
])
if test "x$ax_cv_boost_date_time" = "xyes"; then
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
BN=boost_date_time
if test "x$ax_boost_user_date_time_lib" = "x"; then
for ax_lib in $BN $BN-$CC $BN-$CC-mt $BN-$CC-mt-s $BN-$CC-s \
lib$BN lib$BN-$CC lib$BN-$CC-mt lib$BN-$CC-mt-s lib$BN-$CC-s \
$BN-mgw $BN-mgw $BN-mgw-mt $BN-mgw-mt-s $BN-mgw-s ; do
AC_CHECK_LIB($ax_lib, main, [BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
else
for ax_lib in $ax_boost_user_date_time_lib $BN-$ax_boost_user_date_time_lib; do
AC_CHECK_LIB($ax_lib, main,
[BOOST_DATE_TIME_LIB="-l$ax_lib" AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes" break],
[link_date_time="no"])
done
fi
if test "x$link_date_time" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -84,12 +84,15 @@ 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)
AX_BOOST_BASE([1.33.1])
if test "x${BOOST_CPPFLAGS}" != "x"; then
AX_BOOST_DATE_TIME
if test "x${BOOST_DATE_TIME_LIB}" = "x"; then
AC_MSG_ERROR([Boost date-time library not found])
fi
else
AC_MSG_ERROR([Boost library >= 1.33.1 not found])
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)

View File

@ -72,6 +72,8 @@ install: all
cd ${BOOST_DIR} && \
./tools/build/jam_src/bin.linuxx86/bjam "-sTOOLS=gcc" \
--prefix=${INSTALL_DIR} install
# this is a hack to make the autoconf script work
cd ${INSTALL_DIR}/include && ln -s boost-1_33_1/boost boost
clean:
cd ${BOOST_DIR} && \