From 225c8cde6380721691d0668e4c8874b3de6fa770 Mon Sep 17 00:00:00 2001 From: Stefan Siegl Date: Fri, 24 Jun 2022 21:27:33 +0200 Subject: [PATCH] test compiler for c++17 support --- config.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config.m4 b/config.m4 index bb823f4..0cccd8c 100644 --- a/config.m4 +++ b/config.m4 @@ -39,11 +39,15 @@ if test "$PHP_V8JS" != "no"; then AC_CACHE_CHECK(for C standard version, ac_cv_v8_cstd, [ - ac_cv_v8_cstd="c++14" + ac_cv_v8_cstd="c++17" old_CPPFLAGS=$CPPFLAGS AC_LANG_PUSH([C++]) CPPFLAGS="-std="$ac_cv_v8_cstd - AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[],[ac_cv_v8_cstd="c++1y"],[]) + AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[],[ + ac_cv_v8_cstd="c++14" + CPPFLAGS="-std="$ac_cv_v8_cstd + AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],[],[ ac_cv_v8_cstd="c++1y" ],[]) + ],[]) AC_LANG_POP([C++]) CPPFLAGS=$old_CPPFLAGS ]);