~markwright/scalestack/zeromq

« back to all changes in this revision

Viewing changes to m4/pandora_have_libboost_options.m4

  • Committer: Eric Day
  • Date: 2010-04-27 00:25:30 UTC
  • Revision ID: eday@oddments.org-20100427002530-ygvr9qg6ddusjr9u
Updated to latest pandora-build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
  dnl link against libc because we're just looking for headers here
 
14
  AC_LANG_PUSH(C++)
 
15
  AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
 
16
    #include <boost/program_options.hpp>
 
17
  ],[
 
18
    boost::program_options::options_description d;
 
19
    d.add_options()("a","some option");
 
20
  ])
 
21
  AC_LANG_POP()
 
22
  
 
23
  AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
 
24
    [test "x${ac_cv_boost_program_options}" = "xyes"])
 
25
  
 
26
])
 
27
 
 
28
AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
 
29
  PANDORA_HAVE_BOOST($1)
 
30
  _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
 
31
])
 
32
 
 
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}]))
 
38
])
 
39