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_PROGRAM_OPTIONS],[
7
AC_REQUIRE([AC_LIB_PREFIX])
9
dnl --------------------------------------------------------------------
10
dnl Check for boost::program_options
11
dnl --------------------------------------------------------------------
14
AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[
15
#include <boost/program_options.hpp>
17
boost::program_options::options_description d;
18
d.add_options()("a","some option");
20
AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[
21
AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
22
#include <boost/program_options.hpp>
24
boost::program_options::options_description d;
25
d.add_options()("a","some option");
30
AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
31
[test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"])
32
BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}"
36
AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
37
PANDORA_HAVE_BOOST($1)
38
_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
41
AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[
42
PANDORA_REQUIRE_BOOST($1)
43
_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
44
AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"],
45
AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}]))