Skip to content

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

Closed
devnexen wants to merge 1 commit intophp:masterfrom
devnexen:ext_intl_updforicu74
Closed

ext/intl: level up c++ runtime std for icu 74 and onwards.#13422
devnexen wants to merge 1 commit intophp:masterfrom
devnexen:ext_intl_updforicu74

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