I am creating a C ++ extension for PHP using the config.m4 template from this post and this article .
I need to use C ++ 11 in the standard to compile my classes, so I used the EXTRA_FLAGS clause like:
EXTRA_FLAGS="-std=c++11"
in my config.m4. Final code:
PHP_ARG_ENABLE(vehicles, [Whether to enable the "vehicles" extension], [ --enable-vehicles Enable "vehicles" extension support]) if test $PHP_VEHICLES != "no"; then EXTRA_FLAGS="-std=c++11" PHP_REQUIRE_CXX() PHP_SUBST(VEHICLES_SHARED_LIBADD) PHP_ADD_LIBRARY(stdc++, 1, VEHICLES_SHARED_LIBADD) PHP_NEW_EXTENSION(vehicles, vehicles.cc car.cc, $ext_shared) fi
This does not work at all (the compiler does not receive additional flags). Then I assume that this EXTRA_FLAGS parameter is not associated with the compiler at all, but with the script ....
How can I send a flag to the g ++ compiler to use C ++ 11?
Thanks for the help.
source share