@@ -44,9 +44,11 @@ endif
ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
SQLITE_DEPENDENCIES += ncurses readline
-else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
-SQLITE_DEPENDENCIES += libedit
-SQLITE_CONF_OPTS += --disable-readline --editline
+SQLITE_CONF_OPTS += --with-readline-cflags=-I$(STAGING_DIR)/usr/include
+else ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_LIBEDIT),yy)
+SQLITE_DEPENDENCIES += ncurses libedit
+SQLITE_CONF_OPTS += --with-readline-cflags=-I$(STAGING_DIR)/usr/include
+SQLITE_CONF_OPTS += --editline
else
SQLITE_CONF_OPTS += --disable-readline
endif
The autosetup script will skip checking for readline.h when cross-compiling, which will cause line-editing support for the sqlite3 shell to always be "none". In this case, if the --editline option is provided, an error will be reported: ERROR: Explicit --editline failed to find a matching library. We can use the --with-readline-cflags option to tell autosetup where to search for the readline.h file to avoid the disabled behavior. In addition, the libedit package actually depends on the ncurses package, just like the readline package. So when using the libedit package, also add the ncurses dependency. In addition, there is no need to pass the --disable-readline option when the --editline option is passed. Signed-off-by: Scott Fan <fancp2007@gmail.com> --- package/sqlite/sqlite.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)