diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-02-23 19:03:11 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-02-23 19:03:14 +0100 |
| commit | 692c9eddba67d5a7ceb85fa4b2632f664c68f418 (patch) | |
| tree | b88223a08dfb0b2f4f1dde5a1c29fd1294182eed | |
| parent | Merge #9823: qa: Set correct path for binaries in rpc tests (diff) | |
| parent | build: force a c++ standard to be specified (diff) | |
| download | discoin-692c9eddba67d5a7ceb85fa4b2632f664c68f418.tar.xz discoin-692c9eddba67d5a7ceb85fa4b2632f664c68f418.zip | |
Merge #9831: build: force a c++ standard to be specified
9829c54 build: force a c++ standard to be specified (Cory Fields)
| -rw-r--r-- | build-aux/m4/ax_cxx_compile_stdcxx.m4 | 8 | ||||
| -rw-r--r-- | configure.ac | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/build-aux/m4/ax_cxx_compile_stdcxx.m4 b/build-aux/m4/ax_cxx_compile_stdcxx.m4 index 2c18e49c5..f147cee3b 100644 --- a/build-aux/m4/ax_cxx_compile_stdcxx.m4 +++ b/build-aux/m4/ax_cxx_compile_stdcxx.m4 @@ -57,8 +57,14 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], [$3], [optional], [ax_cxx_compile_cxx$1_required=false], [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + m4_if([$4], [], [ax_cxx_compile_cxx$1_try_default=true], + [$4], [default], [ax_cxx_compile_cxx$1_try_default=true], + [$4], [nodefault], [ax_cxx_compile_cxx$1_try_default=false], + [m4_fatal([invalid fourth argument `$4' to AX_CXX_COMPILE_STDCXX])]) AC_LANG_PUSH([C++])dnl ac_success=no + + m4_if([$4], [nodefault], [], [dnl AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, ax_cv_cxx_compile_cxx$1, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], @@ -66,7 +72,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl [ax_cv_cxx_compile_cxx$1=no])]) if test x$ax_cv_cxx_compile_cxx$1 = xyes; then ac_success=yes - fi + fi]) m4_if([$2], [noext], [], [dnl if test x$ac_success = xno; then diff --git a/configure.ac b/configure.ac index 7a02237df..5a09befea 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ case $host in ;; esac dnl Require C++11 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) +AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault]) dnl Check if -latomic is required for <std::atomic> CHECK_ATOMIC |