aboutsummaryrefslogtreecommitdiff
path: root/nxcompshad
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 /nxcompshad
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 'nxcompshad')
-rw-r--r--nxcompshad/configure.ac6
l---------nxcompshad/m4/ax_cxx_compile_stdcxx.m41
l---------nxcompshad/m4/ax_cxx_compile_stdcxx_11.m41
3 files changed, 8 insertions, 0 deletions
diff --git a/nxcompshad/configure.ac b/nxcompshad/configure.ac
index 34b1c053c..966add584 100644
--- a/nxcompshad/configure.ac
+++ b/nxcompshad/configure.ac
@@ -44,6 +44,12 @@ AC_LANG([C++])
NX_COMPILER_BRAND
NX_DEFAULT_OPTIONS
+AC_ARG_ENABLE([cxx11],
+ [AS_HELP_STRING([--enable-cxx11],
+ [enable optional features requiring C++11 support (disabled by default)])],
+ [AS_IF([test x$enableval = xyes],
+ [AX_CXX_COMPILE_STDCXX_11([], [mandatory])])])
+
AC_CONFIG_FILES([
Makefile
src/Makefile
diff --git a/nxcompshad/m4/ax_cxx_compile_stdcxx.m4 b/nxcompshad/m4/ax_cxx_compile_stdcxx.m4
new file mode 120000
index 000000000..28ebfd1a6
--- /dev/null
+++ b/nxcompshad/m4/ax_cxx_compile_stdcxx.m4
@@ -0,0 +1 @@
+../../m4/ax_cxx_compile_stdcxx.m4 \ No newline at end of file
diff --git a/nxcompshad/m4/ax_cxx_compile_stdcxx_11.m4 b/nxcompshad/m4/ax_cxx_compile_stdcxx_11.m4
new file mode 120000
index 000000000..5fbe8790d
--- /dev/null
+++ b/nxcompshad/m4/ax_cxx_compile_stdcxx_11.m4
@@ -0,0 +1 @@
+../../m4/ax_cxx_compile_stdcxx_11.m4 \ No newline at end of file