aboutsummaryrefslogtreecommitdiff
path: root/m4/ax_cxx_compile_stdcxx_11.m4
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2016-11-05 21:34:21 (GMT)
committerMathias Gumz <akira@fluxbox.org>2016-11-05 21:38:47 (GMT)
commit61e951617ce7983cfb6ba476d0db290bfd0a5c3e (patch)
treea1b9ae6f411fb9260997e6d6477e5ff46fb988ec /m4/ax_cxx_compile_stdcxx_11.m4
parent4bab7afaa4943bb627c25ec4e55e383c39dd14bd (diff)
downloadfluxbox-61e951617ce7983cfb6ba476d0db290bfd0a5c3e.zip
fluxbox-61e951617ce7983cfb6ba476d0db290bfd0a5c3e.tar.bz2
add automake helpers to enforce --std=cxx11
switching to std::unique_ptr<> in 52c9f62 caused some trouble for users of "older" compilers: they needed to add the --std=cxx11 flag by hand. to make life more convenient, m4/ax_cxx_compile_stdcxx.m4 and m4/ax_cxx_compile_stdcxx_11.m4 are added to do the right thing. in my tests, the last "good" compiler is gcc-4.8, gcc-4.7 does not support the required c++11 standard. clang++-3.5 also works.
Diffstat (limited to 'm4/ax_cxx_compile_stdcxx_11.m4')
-rw-r--r--m4/ax_cxx_compile_stdcxx_11.m439
1 files changed, 39 insertions, 0 deletions
diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_11.m4
new file mode 100644
index 0000000..0aadeaf
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx_11.m4
@@ -0,0 +1,39 @@
1# ============================================================================
2# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
3# ============================================================================
4#
5# SYNOPSIS
6#
7# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
8#
9# DESCRIPTION
10#
11# Check for baseline language coverage in the compiler for the C++11
12# standard; if necessary, add switches to CXX and CXXCPP to enable
13# support.
14#
15# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
16# macro with the version set to C++11. The two optional arguments are
17# forwarded literally as the second and third argument respectively.
18# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
19# more information. If you want to use this macro, you also need to
20# download the ax_cxx_compile_stdcxx.m4 file.
21#
22# LICENSE
23#
24# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
25# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
26# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
27# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
28# Copyright (c) 2015 Paul Norman <penorman@mac.com>
29# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
30#
31# Copying and distribution of this file, with or without modification, are
32# permitted in any medium without royalty provided the copyright notice
33# and this notice are preserved. This file is offered as-is, without any
34# warranty.
35
36#serial 17
37
38AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
39AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])