Skip to content

Commit 6f44a0d

Browse files
authored
Autotools: Use AS_* macros in embed SAPI (#15387)
1 parent 40d88ca commit 6f44a0d

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

sapi/embed/config.m4

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,27 @@ PHP_ARG_ENABLE([embed],,
88
AC_MSG_CHECKING([for embedded SAPI library support])
99

1010
if test "$PHP_EMBED" != "no"; then
11-
case "$PHP_EMBED" in
12-
yes|shared)
11+
AS_CASE([$PHP_EMBED],
12+
[yes|shared], [
1313
LIBPHP_CFLAGS="-shared"
1414
PHP_EMBED_TYPE=shared
1515
INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(orig_libdir)"
16-
;;
17-
static)
16+
],
17+
[static], [
1818
LIBPHP_CFLAGS="-static"
1919
PHP_EMBED_TYPE=static
2020
INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0644 $SAPI_STATIC \$(INSTALL_ROOT)\$(orig_libdir)"
21-
;;
22-
*)
23-
PHP_EMBED_TYPE=no
24-
;;
25-
esac
26-
if test "$PHP_EMBED_TYPE" != "no"; then
21+
],
22+
[PHP_EMBED_TYPE=no])
23+
24+
AS_VAR_IF([PHP_EMBED_TYPE], [no],, [
2725
PHP_SUBST([LIBPHP_CFLAGS])
2826
PHP_SELECT_SAPI([embed],
2927
[$PHP_EMBED_TYPE],
3028
[php_embed.c],
3129
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
3230
PHP_INSTALL_HEADERS([sapi/embed], [php_embed.h])
33-
fi
31+
])
3432
AC_MSG_RESULT([$PHP_EMBED_TYPE])
3533
AC_SUBST([PHP_EMBED_TYPE])
3634
else

0 commit comments

Comments
 (0)