summaryrefslogtreecommitdiff
path: root/package/php
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2011-01-02 12:28:35 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2011-01-02 22:53:16 +0100
commitb25cf0a05c1146b8f09da0c73032f3e08f768d86 (patch)
tree731f901722050e08758aedef812a48d1f95574e9 /package/php
parent358214a8ba3e36f465829a33de7ea5c5ad0cef38 (diff)
php: fix CFLAGS handling
The shell doesn't understand += assignments. Fixes a build issue with sqlite extension and !largefile (and possibly with ext toolchains as well). Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/php')
-rw-r--r--package/php/php.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/package/php/php.mk b/package/php/php.mk
index 36b105dbf..aa99d233b 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -19,6 +19,8 @@ PHP_CONF_OPT = --mandir=/usr/share/man \
--with-config-file-path=/etc \
--localstatedir=/var \
+PHP_CFLAGS = $(TARGET_CFLAGS)
+
ifneq ($(BR2_PACKAGE_PHP_CLI),y)
PHP_CONF_OPT += --disable-cli
else
@@ -142,7 +144,7 @@ endif
ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
PHP_CONF_OPT += --with-sqlite
ifneq ($(BR2_LARGEFILE),y)
- PHP_CONF_ENV += CFLAGS+=" -DSQLITE_DISABLE_LFS"
+ PHP_CFLAGS += -DSQLITE_DISABLE_LFS
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE_UTF8),y)
PHP_CONF_OPT += --enable-sqlite-utf8
@@ -159,9 +161,9 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE_EXTERNAL),y)
else
PHP_CONF_OPT += --with-pdo-sqlite
endif
- PHP_CONF_ENV += CFLAGS+=" -DSQLITE_OMIT_LOAD_EXTENSION"
+ PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION
ifneq ($(BR2_LARGEFILE),y)
- PHP_CONF_ENV += CFLAGS+=" -DSQLITE_DISABLE_LFS"
+ PHP_CFLAGS += -DSQLITE_DISABLE_LFS
endif
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
@@ -192,4 +194,6 @@ define PHP_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/bin/php*
endef
+PHP_CONF_ENV += CFLAGS="$(PHP_CFLAGS)"
+
$(eval $(call AUTOTARGETS,package,php))