Changeset View
Changeset View
Standalone View
Standalone View
build-aux/m4/ax_boost_unit_test_framework.m4
# ================================================================================ | # ================================================================================= | ||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html | # https://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html | ||||
# ================================================================================ | # ================================================================================= | ||||
# | # | ||||
# SYNOPSIS | # SYNOPSIS | ||||
# | # | ||||
# AX_BOOST_UNIT_TEST_FRAMEWORK | # AX_BOOST_UNIT_TEST_FRAMEWORK | ||||
# | # | ||||
# DESCRIPTION | # DESCRIPTION | ||||
# | # | ||||
# Test for Unit_Test_Framework library from the Boost C++ libraries. The | # Test for Unit_Test_Framework library from the Boost C++ libraries. The | ||||
Show All 12 Lines | |||||
# | # | ||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> | # Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> | ||||
# | # | ||||
# Copying and distribution of this file, with or without modification, are | # Copying and distribution of this file, with or without modification, are | ||||
# permitted in any medium without royalty provided the copyright notice | # permitted in any medium without royalty provided the copyright notice | ||||
# and this notice are preserved. This file is offered as-is, without any | # and this notice are preserved. This file is offered as-is, without any | ||||
# warranty. | # warranty. | ||||
#serial 19 | #serial 21 | ||||
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], | AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK], | ||||
[ | [ | ||||
AC_ARG_WITH([boost-unit-test-framework], | AC_ARG_WITH([boost-unit-test-framework], | ||||
AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@], | AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@], | ||||
[use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker | [use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker | ||||
e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]), | e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]), | ||||
[ | [ | ||||
Show All 20 Lines | if test "x$want_boost" = "xyes"; then | ||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" | LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" | ||||
export LDFLAGS | export LDFLAGS | ||||
AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available, | AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available, | ||||
ax_cv_boost_unit_test_framework, | ax_cv_boost_unit_test_framework, | ||||
[AC_LANG_PUSH([C++]) | [AC_LANG_PUSH([C++]) | ||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]], | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]], | ||||
[[using boost::unit_test::test_suite; | [[using boost::unit_test::test_suite; | ||||
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])], | test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); if (test == NULL) { return 1; } else { return 0; }]])], | ||||
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no) | ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no) | ||||
AC_LANG_POP([C++]) | AC_LANG_POP([C++]) | ||||
]) | ]) | ||||
if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then | if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then | ||||
AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available]) | AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available]) | ||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` | BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` | ||||
if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then | if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |