@@ -19,6 +19,15 @@ config BR2_PACKAGE_PHP
if BR2_PACKAGE_PHP
+config BR2_PACKAGE_PHP_BUILD_SHARED_LIBRARY
+ bool "Build the shared library"
+ depends on !BR2_STATIC_LIBS
+ help
+ Build the libphp7.so file.
+
+comment "Building the shared library needs a toolchain w/ dynamic library"
+ depends on BR2_STATIC_LIBS
+
config BR2_PACKAGE_PHP_SAPI_APACHE
bool "Apache interface"
depends on BR2_PACKAGE_APACHE
@@ -122,6 +122,10 @@ PHP_CONF_OPTS += \
$(if $(BR2_PACKAGE_PHP_EXT_MBSTRING),--enable-mbstring) \
$(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
+ifeq ($(BR2_PACKAGE_PHP_BUILD_SHARED_LIBRARY),y)
+PHP_CONF_OPTS += --enable-embed=shared
+endif
+
ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y)
PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += libmcrypt