xref: /PHP-7.3/sapi/embed/config.m4 (revision 1c850bfc)
1dnl config.m4 for sapi embed
2
3PHP_ARG_ENABLE(embed,,
4[  --enable-embed[=TYPE]     EXPERIMENTAL: Enable building of embedded SAPI library
5                          TYPE is either 'shared' or 'static'. [TYPE=shared]], no, no)
6
7AC_MSG_CHECKING([for embedded SAPI library support])
8
9if test "$PHP_EMBED" != "no"; then
10  case "$PHP_EMBED" in
11    yes|shared)
12      PHP_EMBED_TYPE=shared
13      INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
14      ;;
15    static)
16      PHP_EMBED_TYPE=static
17      INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0644 $SAPI_STATIC \$(INSTALL_ROOT)\$(prefix)/lib"
18      ;;
19    *)
20      PHP_EMBED_TYPE=no
21      ;;
22  esac
23  if test "$PHP_EMBED_TYPE" != "no"; then
24    PHP_SELECT_SAPI(embed, $PHP_EMBED_TYPE, php_embed.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
25    PHP_INSTALL_HEADERS([sapi/embed/php_embed.h])
26  fi
27  AC_MSG_RESULT([$PHP_EMBED_TYPE])
28else
29  AC_MSG_RESULT(no)
30fi
31