|
@@ -42,7 +42,7 @@ endif
|
|
|
# Workaround for non-IPv6 uClibc toolchain
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
|
|
- PHP_CFLAGS += -DHAVE_DEPRECATED_DNS_FUNCS
|
|
|
+PHP_CFLAGS += -DHAVE_DEPRECATED_DNS_FUNCS
|
|
|
endif
|
|
|
endif
|
|
|
|
|
@@ -81,155 +81,158 @@ PHP_CONF_OPTS += \
|
|
|
$(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar)
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y)
|
|
|
- PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += libmcrypt
|
|
|
+PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += libmcrypt
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y)
|
|
|
- PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += openssl
|
|
|
+PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += openssl
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y)
|
|
|
- PHP_CONF_ENV += php_cv_libxml_build_works=yes
|
|
|
- PHP_CONF_OPTS += --enable-libxml --with-libxml-dir=${STAGING_DIR}/usr
|
|
|
- PHP_DEPENDENCIES += libxml2
|
|
|
+PHP_CONF_ENV += php_cv_libxml_build_works=yes
|
|
|
+PHP_CONF_OPTS += --enable-libxml --with-libxml-dir=${STAGING_DIR}/usr
|
|
|
+PHP_DEPENDENCIES += libxml2
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_WDDX),y)
|
|
|
- PHP_CONF_OPTS += --enable-wddx --with-libexpat-dir=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += expat
|
|
|
+PHP_CONF_OPTS += --enable-wddx --with-libexpat-dir=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += expat
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_XMLRPC),y)
|
|
|
- PHP_CONF_OPTS += --with-xmlrpc \
|
|
|
- $(if $(BR2_PACKAGE_LIBICONV),--with-iconv-dir=$(STAGING_DIR)/usr)
|
|
|
- PHP_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
|
|
+PHP_CONF_OPTS += \
|
|
|
+ --with-xmlrpc \
|
|
|
+ $(if $(BR2_PACKAGE_LIBICONV),--with-iconv-dir=$(STAGING_DIR)/usr)
|
|
|
+PHP_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
|
|
endif
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_PHP_EXT_ZLIB)$(BR2_PACKAGE_PHP_EXT_ZIP),)
|
|
|
- PHP_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += zlib
|
|
|
+PHP_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += zlib
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y)
|
|
|
- PHP_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
|
|
|
+PHP_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext)
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y)
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
- PHP_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += libiconv
|
|
|
+PHP_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += libiconv
|
|
|
else
|
|
|
- PHP_CONF_OPTS += --with-iconv
|
|
|
+PHP_CONF_OPTS += --with-iconv
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_INTL),y)
|
|
|
- PHP_CONF_OPTS += --enable-intl --with-icu-dir=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += icu
|
|
|
- # The intl module is implemented in C++, but PHP fails to use
|
|
|
- # g++ as the compiler for the final link. As a workaround,
|
|
|
- # tell it to link libstdc++.
|
|
|
- PHP_EXTRA_LIBS += -lstdc++
|
|
|
+PHP_CONF_OPTS += --enable-intl --with-icu-dir=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += icu
|
|
|
+# The intl module is implemented in C++, but PHP fails to use
|
|
|
+# g++ as the compiler for the final link. As a workaround,
|
|
|
+# tell it to link libstdc++.
|
|
|
+PHP_EXTRA_LIBS += -lstdc++
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y)
|
|
|
- PHP_CONF_OPTS += --with-gmp=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += gmp
|
|
|
+PHP_CONF_OPTS += --with-gmp=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += gmp
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_READLINE),y)
|
|
|
- PHP_CONF_OPTS += --with-readline=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += readline
|
|
|
+PHP_CONF_OPTS += --with-readline=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += readline
|
|
|
endif
|
|
|
|
|
|
### Native MySQL extensions
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQL),y)
|
|
|
- PHP_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += mysql
|
|
|
+PHP_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += mysql
|
|
|
endif
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQLI),y)
|
|
|
- PHP_CONF_OPTS += --with-mysqli=$(STAGING_DIR)/usr/bin/mysql_config
|
|
|
- PHP_DEPENDENCIES += mysql
|
|
|
+PHP_CONF_OPTS += --with-mysqli=$(STAGING_DIR)/usr/bin/mysql_config
|
|
|
+PHP_DEPENDENCIES += mysql
|
|
|
endif
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
|
|
|
- PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += sqlite
|
|
|
+PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += sqlite
|
|
|
endif
|
|
|
|
|
|
### PDO
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO),y)
|
|
|
- PHP_CONF_OPTS += --enable-pdo
|
|
|
+PHP_CONF_OPTS += --enable-pdo
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE),y)
|
|
|
- PHP_CONF_OPTS += --with-pdo-sqlite=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += sqlite
|
|
|
- PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION
|
|
|
+PHP_CONF_OPTS += --with-pdo-sqlite=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += sqlite
|
|
|
+PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION
|
|
|
ifneq ($(BR2_LARGEFILE),y)
|
|
|
- PHP_CFLAGS += -DSQLITE_DISABLE_LFS
|
|
|
+PHP_CFLAGS += -DSQLITE_DISABLE_LFS
|
|
|
endif
|
|
|
endif
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
|
|
|
- PHP_CONF_OPTS += --with-pdo-mysql=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += mysql
|
|
|
+PHP_CONF_OPTS += --with-pdo-mysql=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += mysql
|
|
|
endif
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL),y)
|
|
|
- PHP_CONF_OPTS += --with-pdo-pgsql=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += postgresql
|
|
|
+PHP_CONF_OPTS += --with-pdo-pgsql=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += postgresql
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
### Use external PCRE if it's available
|
|
|
ifeq ($(BR2_PACKAGE_PCRE),y)
|
|
|
- PHP_CONF_OPTS += --with-pcre-regex=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += pcre
|
|
|
+PHP_CONF_OPTS += --with-pcre-regex=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += pcre
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_CURL),y)
|
|
|
- PHP_CONF_OPTS += --with-curl=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += libcurl
|
|
|
+PHP_CONF_OPTS += --with-curl=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += libcurl
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_XSL),y)
|
|
|
- PHP_CONF_OPTS += --with-xsl=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += libxslt
|
|
|
+PHP_CONF_OPTS += --with-xsl=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += libxslt
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_BZIP2),y)
|
|
|
- PHP_CONF_OPTS += --with-bz2=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += bzip2
|
|
|
+PHP_CONF_OPTS += --with-bz2=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += bzip2
|
|
|
endif
|
|
|
|
|
|
### DBA
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_DBA),y)
|
|
|
- PHP_CONF_OPTS += --enable-dba
|
|
|
+PHP_CONF_OPTS += --enable-dba
|
|
|
ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_CDB),y)
|
|
|
- PHP_CONF_OPTS += --without-cdb
|
|
|
+PHP_CONF_OPTS += --without-cdb
|
|
|
endif
|
|
|
ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_FLAT),y)
|
|
|
- PHP_CONF_OPTS += --without-flatfile
|
|
|
+PHP_CONF_OPTS += --without-flatfile
|
|
|
endif
|
|
|
ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_INI),y)
|
|
|
- PHP_CONF_OPTS += --without-inifile
|
|
|
+PHP_CONF_OPTS += --without-inifile
|
|
|
endif
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_DBA_DB4),y)
|
|
|
- PHP_CONF_OPTS += --with-db4=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += berkeleydb
|
|
|
+PHP_CONF_OPTS += --with-db4=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += berkeleydb
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y)
|
|
|
- PHP_CONF_OPTS += --with-snmp=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += netsnmp
|
|
|
+PHP_CONF_OPTS += --with-snmp=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += netsnmp
|
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y)
|
|
|
- PHP_CONF_OPTS += --with-gd --with-jpeg-dir=$(STAGING_DIR)/usr \
|
|
|
- --with-png-dir=$(STAGING_DIR)/usr \
|
|
|
- --with-zlib-dir=$(STAGING_DIR)/usr \
|
|
|
- --with-freetype-dir=$(STAGING_DIR)/usr
|
|
|
- PHP_DEPENDENCIES += jpeg libpng freetype
|
|
|
+PHP_CONF_OPTS += \
|
|
|
+ --with-gd \
|
|
|
+ --with-jpeg-dir=$(STAGING_DIR)/usr \
|
|
|
+ --with-png-dir=$(STAGING_DIR)/usr \
|
|
|
+ --with-zlib-dir=$(STAGING_DIR)/usr \
|
|
|
+ --with-freetype-dir=$(STAGING_DIR)/usr
|
|
|
+PHP_DEPENDENCIES += jpeg libpng freetype
|
|
|
endif
|
|
|
|
|
|
define PHP_EXTENSIONS_FIXUP
|