1491.5.2
by Monty Taylor
Added build checking requiring libboost_program_options |
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. |
|
5 |
||
6 |
AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[ |
|
7 |
AC_REQUIRE([AC_LIB_PREFIX]) |
|
8 |
||
9 |
dnl -------------------------------------------------------------------- |
|
10 |
dnl Check for boost::program_options |
|
11 |
dnl -------------------------------------------------------------------- |
|
12 |
||
13 |
AC_LANG_PUSH(C++) |
|
1497.3.12
by Monty Taylor
Make sure we pick -mt instead of not -mt if there are both. |
14 |
AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[ |
1491.5.2
by Monty Taylor
Added build checking requiring libboost_program_options |
15 |
#include <boost/program_options.hpp>
|
16 |
],[ |
|
17 |
boost::program_options::options_description d;
|
|
18 |
d.add_options()("a","some option");
|
|
19 |
]) |
|
1497.3.12
by Monty Taylor
Make sure we pick -mt instead of not -mt if there are both. |
20 |
AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[ |
21 |
AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
|
|
1497.3.10
by mordred
Fixed the check for boost::program_options on platforms which only install the |
22 |
#include <boost/program_options.hpp>
|
23 |
],[ |
|
24 |
boost::program_options::options_description d;
|
|
25 |
d.add_options()("a","some option");
|
|
26 |
]) |
|
27 |
]) |
|
1491.5.2
by Monty Taylor
Added build checking requiring libboost_program_options |
28 |
AC_LANG_POP() |
29 |
|
|
30 |
AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS, |
|
1497.3.10
by mordred
Fixed the check for boost::program_options on platforms which only install the |
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}" |
|
33 |
AC_SUBST(BOOST_LIBS) |
|
1491.5.2
by Monty Taylor
Added build checking requiring libboost_program_options |
34 |
]) |
35 |
||
36 |
AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[ |
|
37 |
PANDORA_HAVE_BOOST($1)
|
|
38 |
_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
|
|
39 |
]) |
|
40 |
||
41 |
AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[ |
|
42 |
PANDORA_REQUIRE_BOOST($1)
|
|
43 |
_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
|
|
1497.3.10
by mordred
Fixed the check for boost::program_options on platforms which only install the |
44 |
AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"], |
1491.5.2
by Monty Taylor
Added build checking requiring libboost_program_options |
45 |
AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}])) |
46 |
]) |
|
47 |