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 --------------------------------------------------------------------
13
dnl link against libc because we're just looking for headers here
15
AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
16
#include <boost/program_options.hpp>
18
boost::program_options::options_description d;
19
d.add_options()("a","some option");
23
AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
24
[test "x${ac_cv_boost_program_options}" = "xyes"])
28
AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
29
PANDORA_HAVE_BOOST($1)
30
_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
33
AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[
34
PANDORA_REQUIRE_BOOST($1)
35
_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
36
AS_IF([test x$ac_cv_libboost_program_options = xno],
37
AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}]))