php: fix sqlite module
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 21 Feb 2009 09:06:43 +0000 (09:06 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 21 Feb 2009 09:06:43 +0000 (09:06 -0000)
- php comes with it's own embedded sqlite, so no need to select sqlite
- disable largefile support for !BR2_LARGEFILE
- php somehow forgets to link with -ldl, breaking the sqlite extension.
  Fix it by disabling the (unused?) modload support in sqlite.

package/php/Config.ext
package/php/php.mk

index 7f583fcf85d52ab4d866de1594fb2da8092192bf..5c1f3a93f323e8c77784923384a912ca4c7745f5 100644 (file)
@@ -131,7 +131,6 @@ comment "Database extensions"
 config BR2_PACKAGE_PHP_EXT_SQLITE
        bool "sqlite"
        depends on BR2_PACKAGE_PHP
-       select BR2_PACKAGE_SQLITE
        default y
        help
          SQLite
index 7ccc5985e7537099dd6bb3be9c8c4c2171bcfc94..3aeb2665f92c0101d12cc63f7cacb88af5907d8f 100644 (file)
@@ -109,7 +109,9 @@ endif
 ### Database extensions
 ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
        PHP_CONFIGURE+=--with-sqlite
-       PHP_DEPS+=sqlite
+ifneq ($(BR2_LARGEFILE),y)
+       PHP_CFLAGS+= -DSQLITE_DISABLE_LFS
+endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE_UTF8),y)
        PHP_CONFIGURE+=--enable-sqlite-utf8
 endif
@@ -118,6 +120,7 @@ ifeq ($(BR2_PACKAGE_PHP_EXT_PDO),y)
        PHP_CONFIGURE+=--enable-pdo
 ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE),y)
        PHP_CONFIGURE+=--with-pdo-sqlite
+       PHP_CFLAGS+= -DSQLITE_OMIT_LOAD_EXTENSION
 endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y)
        PHP_CONFIGURE+=--with-pdo-mysql=$(STAGING_DIR)/usr
@@ -164,7 +167,7 @@ $(PHP_DIR)/.configured: $(PHP_DIR)/.unpacked
        touch $@
 
 $(PHP_DIR)/.built: $(PHP_DIR)/.configured
-       $(MAKE) CC=$(TARGET_CC) -C $(PHP_DIR)
+       $(MAKE) CC="$(TARGET_CC) $(PHP_CFLAGS)" -C $(PHP_DIR)
        touch $@
 
 $(PHP_DIR)/.staged: $(PHP_DIR)/.built