Skip to content

ext/intl: level up c++ runtime std for icu 74 and onwards. #13422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

devnexen
Copy link
Member

to align with what is required to build icu 74 itself.

Comment on lines 85 to 91
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <unicode/uvernum.h>

int main(int argc, char *argv[])
{
#if U_ICU_VERSION_MAJOR_NUM >= 74
return 0;
#else
return 1;
#endif
}
]])],[
AC_MSG_RESULT([yes])
PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
],[
AC_MSG_RESULT([no])
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
], [
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <unicode/uvernum.h>
int main(int argc, char *argv[])
{
#if U_ICU_VERSION_MAJOR_NUM >= 74
return 0;
#else
return 1;
#endif
}
]])],[
AC_MSG_RESULT([yes])
PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
],[
AC_MSG_RESULT([no])
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
], [
])
AS_IF([test "$PKG_CONFIG icu-uc --atleast-version=74"],[
AC_MSG_RESULT([yes])
PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
],[
AC_MSG_RESULT([no])
PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
])

Perhaps instead of running the test program, this can be checked directly from the package.

Otherwise, also something like this can be done:

AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unicode/uvernum.h>],[[
  #if U_ICU_VERSION_MAJOR_NUM >= 74
    return 0;
  #else
  # error "ICU version < 74"
  #endif
]])],[
  AC_MSG_RESULT([yes])
  PHP_CXX_COMPILE_STDCXX(17, mandatory, PHP_INTL_STDCXX)
],[
  AC_MSG_RESULT([no])
  PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
])

to align with what is required to build icu 74 itself.
@devnexen devnexen force-pushed the ext_intl_updforicu74 branch from 64ee9a0 to 65f37e1 Compare February 18, 2024 09:04
@devnexen
Copy link
Member Author

ping :)

@devnexen devnexen closed this in 037855f Feb 21, 2024
dunglas pushed a commit to dunglas/php-src that referenced this pull request Apr 19, 2024
to align with what is required to build icu 74 itself.

Close phpGH-13422.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants