Skip to content

Commit 590786a

Browse files
authored
Autotools: Replace PHP_EXT_DIR with $ext_dir (#15133)
- Sync Autoconf syntax - The PHP_EXT_DIR macro doesn't accept any arguments and since this is called after PHP_NEW_EXTENSION, the $ext_dir variable can be used instead.
1 parent 21e01f3 commit 590786a

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

ext/intl/config.m4

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,17 @@ if test "$PHP_INTL" != "no"; then
9191
])
9292

9393
PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
94-
case $host_alias in
95-
*cygwin*) PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"
96-
esac
97-
if test "$ext_shared" = "no"; then
98-
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
99-
else
100-
PHP_ADD_SOURCES_X(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS, shared_objects_intl, yes)
101-
fi
94+
AS_CASE([$host_alias], [*cygwin*],
95+
[PHP_INTL_CXX_FLAGS="$PHP_INTL_CXX_FLAGS -D_POSIX_C_SOURCE=200809L"])
96+
AS_VAR_IF([ext_shared], [no],
97+
[PHP_ADD_SOURCES([$ext_dir],
98+
[$PHP_INTL_CXX_SOURCES],
99+
[$PHP_INTL_CXX_FLAGS])],
100+
[PHP_ADD_SOURCES_X([$ext_dir],
101+
[$PHP_INTL_CXX_SOURCES],
102+
[$PHP_INTL_CXX_FLAGS],
103+
[shared_objects_intl],
104+
[yes])])
102105

103106
PHP_ADD_BUILD_DIR(m4_normalize([
104107
$ext_builddir/breakiterator

0 commit comments

Comments
 (0)