1PHP_ARG_ENABLE([embed],, 2 [AS_HELP_STRING([[--enable-embed[=TYPE]]], 3 [Enable building of embedded SAPI library TYPE is either 4 'shared' or 'static'. [TYPE=shared]])], 5 [no], 6 [no]) 7 8AC_MSG_CHECKING([for embedded SAPI library support]) 9 10if test "$PHP_EMBED" != "no"; then 11 AS_CASE([$PHP_EMBED], 12 [yes|shared], [ 13 LIBPHP_CFLAGS="-shared" 14 PHP_EMBED_TYPE=shared 15 INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(orig_libdir)" 16 ], 17 [static], [ 18 LIBPHP_CFLAGS="-static" 19 PHP_EMBED_TYPE=static 20 INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0644 $SAPI_STATIC \$(INSTALL_ROOT)\$(orig_libdir)" 21 ], 22 [PHP_EMBED_TYPE=]) 23 24 AS_VAR_IF([PHP_EMBED_TYPE],, [AC_MSG_RESULT([no])], [ 25 AC_MSG_RESULT([$PHP_EMBED_TYPE]) 26 PHP_SUBST([LIBPHP_CFLAGS]) 27 AC_SUBST([PHP_EMBED_TYPE]) 28 PHP_SELECT_SAPI([embed], 29 [$PHP_EMBED_TYPE], 30 [php_embed.c], 31 [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) 32 PHP_INSTALL_HEADERS([sapi/embed], [php_embed.h]) 33 ]) 34else 35 AC_MSG_RESULT([no]) 36fi 37