1 dnl Copyright (C) 2010 Monty Taylor
2 dnl This file is free software; Monty Taylor
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
6 AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[
7 AC_REQUIRE([AC_LIB_PREFIX])
8 AC_REQUIRE([ACX_PTHREAD])
10 dnl --------------------------------------------------------------------
11 dnl Check for Boost.Date_Time
12 dnl --------------------------------------------------------------------
15 AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[
16 #include <boost/date_time.hpp>
18 boost::gregorian::date weekstart(2002,2,1);
20 AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[
21 AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[
22 #include <boost/date_time.hpp>
24 boost::gregorian::date weekstart(2002,2,1);
29 AM_CONDITIONAL(HAVE_BOOST_DATE_TIME,
30 [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"])
31 BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}"
35 AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[
36 PANDORA_HAVE_BOOST($1)
37 _PANDORA_SEARCH_BOOST_DATE_TIME($1)
40 AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[
41 PANDORA_REQUIRE_BOOST($1)
42 _PANDORA_SEARCH_BOOST_DATE_TIME($1)
43 AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"],
44 AC_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}]))