sqlite: work around build breakage with !BR2_LARGEFILE
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 23 Nov 2009 10:03:27 +0000 (11:03 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 23 Nov 2009 10:03:27 +0000 (11:03 +0100)
Should get fixed properly upstream, but this is good enough for 2009.11-rc1.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/database/sqlite/sqlite.mk

index 00e55598b758f101b3e9f5622883cd425e0a4a3c..3375ca98418888f6df724c1250a8c95da01c093d 100644 (file)
@@ -11,6 +11,15 @@ SQLITE_INSTALL_STAGING = YES
 SQLITE_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
 SQLITE_LIBTOOL_PATCH = NO
 
+ifneq ($(BR2_LARGEFILE),y)
+# the sqlite configure script fails to define SQLITE_DISABLE_LFS when
+# --disable-largefile is passed, breaking the build. Work around it by
+# simply adding it to CFLAGS for configure instead
+SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DSQLITE_DISABLE_LFS"
+# changing CFLAGS doesn't work with config.cache
+SQLITE_USE_CONFIG_CACHE = NO
+endif
+
 SQLITE_CONF_OPT =      --enable-shared \
                        --enable-static \
                        --enable-tempstore=yes \