Commit 1f717c6f authored by Mihai Moldovan's avatar Mihai Moldovan

nx{comp{,shad},proxy}: add configure flag --enable-cxx11 to enable and setup…

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.
parent 39ee56f5
# =============================================================================
# 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])])
......@@ -66,6 +66,12 @@ fi
# If in_addr_t is not defined use unsigned int.
AC_CHECK_TYPES([in_addr_t], [], [], [[#include <netinet/in.h>]])
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)])],
......
../../m4/ax_cxx_compile_stdcxx.m4
\ No newline at end of file
../../m4/ax_cxx_compile_stdcxx_11.m4
\ No newline at end of file
......@@ -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
......
../../m4/ax_cxx_compile_stdcxx.m4
\ No newline at end of file
../../m4/ax_cxx_compile_stdcxx_11.m4
\ No newline at end of file
......@@ -23,6 +23,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
man/Makefile
......
../../m4/ax_cxx_compile_stdcxx.m4
\ No newline at end of file
../../m4/ax_cxx_compile_stdcxx_11.m4
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment