From 1f717c6fdfa478f1c422bff51bc8574360dbe127 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 29 Sep 2017 17:19:06 +0200 Subject: 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. --- nxcomp/configure.ac | 6 ++++++ nxcomp/m4/ax_cxx_compile_stdcxx.m4 | 1 + nxcomp/m4/ax_cxx_compile_stdcxx_11.m4 | 1 + 3 files changed, 8 insertions(+) create mode 120000 nxcomp/m4/ax_cxx_compile_stdcxx.m4 create mode 120000 nxcomp/m4/ax_cxx_compile_stdcxx_11.m4 (limited to 'nxcomp') diff --git a/nxcomp/configure.ac b/nxcomp/configure.ac index 0b30915c2..89081cbb6 100644 --- a/nxcomp/configure.ac +++ b/nxcomp/configure.ac @@ -66,6 +66,12 @@ fi # If in_addr_t is not defined use unsigned int. AC_CHECK_TYPES([in_addr_t], [], [], [[#include ]]) +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_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable to get info session log output (disabled by default)])], diff --git a/nxcomp/m4/ax_cxx_compile_stdcxx.m4 b/nxcomp/m4/ax_cxx_compile_stdcxx.m4 new file mode 120000 index 000000000..28ebfd1a6 --- /dev/null +++ b/nxcomp/m4/ax_cxx_compile_stdcxx.m4 @@ -0,0 +1 @@ +../../m4/ax_cxx_compile_stdcxx.m4 \ No newline at end of file diff --git a/nxcomp/m4/ax_cxx_compile_stdcxx_11.m4 b/nxcomp/m4/ax_cxx_compile_stdcxx_11.m4 new file mode 120000 index 000000000..5fbe8790d --- /dev/null +++ b/nxcomp/m4/ax_cxx_compile_stdcxx_11.m4 @@ -0,0 +1 @@ +../../m4/ax_cxx_compile_stdcxx_11.m4 \ No newline at end of file -- cgit v1.2.3