Next: , Previous: , Up: The Macros  


ax_cxx_compile_stdcxx

Synopsis

AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])

Description

Check for baseline language coverage in the compiler for the specified version of the C++ standard. If necessary, add switches to CXX and CXXCPP to enable support. VERSION may be ’11’, ’14’, ’17’, or ’20’ for the respective C++ standard version.

The second argument, if specified, indicates whether you insist on an extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -std=c++11). If neither is specified, you get whatever works, with preference for no added switch, and then for an extended mode.

The third argument, if specified ’mandatory’ or if left unspecified, indicates that baseline support for the specified C++ standard is required and that the macro should error out if no mode with that support is found. If specified ’optional’, then configuration proceeds regardless, after defining HAVE_CXX${VERSION} if and only if a supporting mode is found.

Source Code

Download the latest version of ax_cxx_compile_stdcxx.m4 or browse the macro’s revision history.

License

Copyright © 2008 Benjamin Kosnik bkoz@redhat.com
Copyright © 2012 Zack Weinberg zackw@panix.com
Copyright © 2013 Roy Stogner roystgnr@ices.utexas.edu
Copyright © 2014, 2015 Google Inc.; contributed by Alexey Sokolov sokolov@google.com
Copyright © 2015 Paul Norman penorman@mac.com
Copyright © 2015 Moritz Klammler moritz@klammler.eu
Copyright © 2016, 2018 Krzesimir Nowak qdlacz@gmail.com
Copyright © 2019 Enji Cooper yaneurabeya@gmail.com
Copyright © 2020 Jason Merrill jason@redhat.com
Copyright © 2021 Jörn Heusipp osmanx@problemloesungsmaschine.de

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.