]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/atf/atf-c++/atf-c++.m4
MFC r270507:
[FreeBSD/stable/10.git] / contrib / atf / atf-c++ / atf-c++.m4
1 dnl
2 dnl Automated Testing Framework (atf)
3 dnl
4 dnl Copyright 2011 Google Inc.
5 dnl All rights reserved.
6 dnl
7 dnl Redistribution and use in source and binary forms, with or without
8 dnl modification, are permitted provided that the following conditions are
9 dnl met:
10 dnl
11 dnl * Redistributions of source code must retain the above copyright
12 dnl   notice, this list of conditions and the following disclaimer.
13 dnl * Redistributions in binary form must reproduce the above copyright
14 dnl   notice, this list of conditions and the following disclaimer in the
15 dnl   documentation and/or other materials provided with the distribution.
16 dnl * Neither the name of Google Inc. nor the names of its contributors
17 dnl   may be used to endorse or promote products derived from this software
18 dnl   without specific prior written permission.
19 dnl
20 dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 dnl A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 dnl OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 dnl DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 dnl THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 dnl (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 dnl
32
33 dnl ATF_CHECK_CXX([version-spec])
34 dnl
35 dnl Checks if atf-c++ is present.  If version-spec is provided, ensures that
36 dnl the installed version of atf-sh matches the required version.  This
37 dnl argument must be something like '>= 0.14' and accepts any version
38 dnl specification supported by pkg-config.
39 dnl
40 dnl Defines and substitutes ATF_CXX_CFLAGS and ATF_CXX_LIBS with the compiler
41 dnl and linker flags need to build against atf-c++.
42 AC_DEFUN([ATF_CHECK_CXX], [
43     spec="atf-c++[]m4_default_nblank([ $1], [])"
44     _ATF_CHECK_ARG_WITH(
45         [PKG_CHECK_MODULES([ATF_CXX], [${spec}],
46                            [found=yes found_atf_cxx=yes], [found=no])],
47         [required ${spec} not found])
48 ])