This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
configure.ac
58 lines (45 loc) · 1.58 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
AC_PREREQ([2.60])
AC_INIT([mms], [0.18.0], [[email protected]])
AM_INIT_AUTOMAKE([foreign -Wall])
AC_CONFIG_SRCDIR([include/mms/writer.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# TODO: find out how to make automake accept header-only libraries
AM_CONDITIONAL([am__EXEEXT], [true])
AC_LANG_CPLUSPLUS
AC_PROG_CXX
AC_PROG_LIBTOOL
AX_BOOST_BASE([1.40], [mms_have_boost=yes], [
AC_MSG_WARN([no boost found on your system; unit tests will be unavailable.])
])
AX_BOOST_UNIT_TEST_FRAMEWORK
AC_CACHE_CHECK([whether compiler supports C++11], [mms_cv_cxx11_supported],[
mms_saved_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -std=c++0x"
AC_TRY_COMPILE([
#include <type_traits>
// Variable templates
template<class... Args> class Foo {};
Foo<int, char, double> g_foo;
struct Nontrivial {
Nontrivial(const Nontrivial&);
};
static_assert( std::is_trivial<int>::value, "int should be trivial" );
static_assert( !std::is_trivial<Nontrivial>::value, "Nontrivial should not be trivial" );
], [], [mms_cv_cxx11_supported=yes], [ mms_cv_cxx11_supported=no ])
CXXFLAGS="$mms_saved_CXXFLAGS"
])
if test "x$mms_cv_cxx11_supported" != xyes; then
AC_MSG_WARN([your compiler does not support C++11; unit tests will be unavailable.])
fi
AM_CONDITIONAL([ENABLE_UNITTESTS], [\
test "x$mms_have_boost" = xyes \
&& test "x$ax_cv_boost_unit_test_framework" = xyes \
&& test "x$mms_cv_cxx11_supported" = xyes \
])
AC_CONFIG_FILES([
Makefile
tests/Makefile
include/Makefile
])
AC_OUTPUT