0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 19:51:51 +00:00

Support g++-4.6 in configuration script.

gcc 4.6 doesn't have the -std=c++11 option, it uses the not-yet-finalized
-std=c++0x option.  Use whichever is found to be appropriate at configure
time.
This commit is contained in:
C. Scott Ananian 2013-10-12 01:07:34 -04:00
parent 0319b74250
commit d416d9b59b

View File

@ -75,8 +75,18 @@ CPPFLAGS=$old_CPPFLAGS
else else
AC_MSG_ERROR([could not determine libv8 version]) AC_MSG_ERROR([could not determine libv8 version])
fi fi
AC_CACHE_CHECK(for C standard version, ac_cv_v8_cstd, [
ac_cv_v8_cstd="c++11"
old_CPPFLAGS=$CPPFLAGS
AC_LANG_PUSH([C++])
CPPFLAGS="-std="$ac_cv_v8_cstd
AC_TRY_RUN([int main() { return 0; }],[],[ac_cv_v8_cstd="c++0x"],[])
AC_LANG_POP([C++])
CPPFLAGS=$old_CPPFLAGS
]);
PHP_NEW_EXTENSION(v8js, v8js.cc v8js_convert.cc v8js_methods.cc v8js_variables.cc v8js_commonjs.cc, $ext_shared, , "-std=c++11") PHP_NEW_EXTENSION(v8js, v8js.cc v8js_convert.cc v8js_methods.cc v8js_variables.cc v8js_commonjs.cc, $ext_shared, , "-std="$ac_cv_v8_cstd)
PHP_ADD_MAKEFILE_FRAGMENT PHP_ADD_MAKEFILE_FRAGMENT
fi fi