Autotools check for C++11

I use AX_CXX_COMPILE_STDCXX_0X(can look on autoconf-archive) to check for c++11 capabilities of the compiler. It correctly determines that -std=c++0x required, but does not add it to CXXFLAGS. I took a look at the macro source and it actually checks but then restores previous flags.

What should I do to get CXXFLAGS set to be able to compile c++11 source?

Just adding -std=c++0x to AM_CXXFLAGS is not nice solution, because I’d like to put the burden of making the compiler compile in C++11 mode on the autoconf developers, not me.

Check external package in Autotools

I would like to check the presence of the google sparsehash package in my C++ program with the Autotools. Here is a minimal AC_PREREQ([2.69]) AC_INIT([myprog], [1.0], [[email protected]])

Build CUDA and C++ using Autotools

I’m setting up Autotools for a large scientific code written primarily in C++, but also some CUDA. I’ve found an example for compiling & linking CUDA code to C code within Autotools, but I cannot

Autotools PKG_CHECK_MODULES isn’t setting variables

My first autotools project, might be something simple and dumb: it’s creating a makefile that can’t find glib and other 3rd party libraries. (Running Ubuntu Linux, compiling a C static library if that

Compiling issues with check and autotools

I have some C unit tests with check framework. My looks like: check_PROGRAMS = check_fseqs check_fseqs_SOURCES = tests/check_fseqs.c check_fseqs_LDADD = -lcheck File structure is (some fi

C++11 in CDT with autotools

I’ve tried enabling C++11 in CDT by adding AX_CXX_COMPILE_STDCXX_11 to my file. I’ve tried moving it around in the file, this seems like the only place where it doesn’t error out. I’ve ev

C++ Autotools Google test framework

I’m trying to add Google Test Framework to my app using autotools. But i got some stange errors for me. In AC_CHECK_HEADER([gtest/gtest.h], [AC_DEFINE([HAVE_GTEST_H], 1)]) But in log I

C11 and (Free)RTOS comparision

What is the advantage of using FreeRTOS when using GCC C11? E.g in C11 I have threading and queues etc, so therefore I don’t need FreeRTOS, or not?

How do you create tests for “make check” with GNU autotools

I’m using GNU autotools for the build system on a particular project. I want to start writing automated tests for verifcation. I would like to just type make check to have it automatically run these

Check for precompiled headers with autotools?

How can I check if gcc precompiled headers are supported with autoconf? Is there a macro like AC_CHECK_GCH? The project I’m working on has a lot of templates and includes, I have tried writing a .h wi

C11 in GCC?

I’m trying to compile some C11 code using thread.h, but I can’t. I’ve recompiled GCC (running 4.6.2 now), and I’m trying to compile with gcc -std=c1x file.c -o file. I can do this in g++ (using the th


What you’re looking for has already been made as AX_CXX_COMPILE_STDCXX_11. It will add the required option to CXXFLAGS and error out if no C++11 support is available.