aboutsummaryrefslogtreecommitdiff
path: root/m4/ax_cxx_compile_stdcxx_11.m4
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-09-29 17:19:06 +0200
committerMihai Moldovan <ionic@ionic.de>2017-10-27 08:45:42 +0200
commit1f717c6fdfa478f1c422bff51bc8574360dbe127 (patch)
tree44be7037766a0f332fb899fdfba1172acd212170 /m4/ax_cxx_compile_stdcxx_11.m4
parent39ee56f5dbe968cddebf6e7891667a2cf8b5af76 (diff)
downloadnx-libs-1f717c6fdfa478f1c422bff51bc8574360dbe127.tar.gz
nx-libs-1f717c6fdfa478f1c422bff51bc8574360dbe127.tar.bz2
nx-libs-1f717c6fdfa478f1c422bff51bc8574360dbe127.zip
nx{comp{,shad},proxy}: add configure flag --enable-cxx11 to enable and setup optional C++11 support.
Use AX_CXX_COMPILE_STDCXX(_11) from autotools archive. Note: should only be used in tandem. Make sure that each component either uses the C++11 ABI or none uses it. Mixing and matching libraries and binaries with different C++ ABIs might lead to weird errors.
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 000000000..1733fd85f
--- /dev/null
+++ b/m4/ax_cxx_compile_stdcxx_11.m4
@@ -0,0 +1,39 @@
+# =============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
+# =============================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional])
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the C++11
+# standard; if necessary, add switches to CXX and CXXCPP to enable
+# support.
+#
+# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX
+# macro with the version set to C++11. The two optional arguments are
+# forwarded literally as the second and third argument respectively.
+# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for
+# more information. If you want to use this macro, you also need to
+# download the ax_cxx_compile_stdcxx.m4 file.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
+# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
+# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
+# Copyright (c) 2015 Paul Norman <penorman@mac.com>
+# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 18
+
+AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])])