qt: add option for system sqlite
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 1 Mar 2011 14:34:00 +0000 (11:34 -0300)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 5 Mar 2011 14:32:01 +0000 (15:32 +0100)
Add an option to use the system sqlite library.
Also drop sqlite2 stub since it's pointless.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/qt/Config.sql.in
package/qt/qt.mk

index b982fdb4da8a6994ecfc79dedfe4eb7f674a7341..eceb15d643b4c7b12e0e8f7887a34a5432152c82 100644 (file)
@@ -34,16 +34,28 @@ config BR2_PACKAGE_QT_PSQL
          Build PostgreSQL driver
          If unsure, say n.
 
-config BR2_PACKAGE_QT_SQLITE
-       bool "SQLite 3 Driver"
+choice
+       prompt "SQLite 3 support"
+       default BR2_PACKAGE_QT_SQLITE_NONE
        help
-         Build SQLite driver
-         If unsure, say n.
+         Select SQLite support.
 
-config BR2_PACKAGE_QT_SQLITE2
-       bool "SQLite 2 Driver"
-       depends on BROKEN # sqlite2 not in BR
+config BR2_PACKAGE_QT_SQLITE_NONE
+       bool "No sqlite support"
        help
-         Build SQLite 2 driver
-         If unsure, say n.
+         Do not compile any kind of SQLite support.
+
+config BR2_PACKAGE_QT_SQLITE_QT
+       bool "Qt SQLite"
+       help
+         Use Qt bundled SQLite support.
+
+config BR2_PACKAGE_QT_SQLITE_SYSTEM
+       bool "System SQLite"
+       select BR2_PACKAGE_SQLITE
+       help
+         Use system SQLite.
+
+endchoice
+
 endif
index e8fff73c4b7621deec208aa99e62bb6ff8981d1c..6974b2f1f91a7574c6254a44018571aca5198e08 100644 (file)
@@ -295,11 +295,16 @@ endif
 ifeq ($(BR2_PACKAGE_QT_PSQL),y)
 QT_CONFIGURE+= -qt-sql-psql
 endif
-ifeq ($(BR2_PACKAGE_QT_SQLITE),y)
+ifeq ($(BR2_PACKAGE_QT_SQLITE_QT),y)
 QT_CONFIGURE+= -qt-sql-sqlite
 else
+ifeq ($(BR2_PACKAGE_QT_SQLITE_SYSTEM),y)
+QT_CONFIGURE+= -system-sqlite
+QT_DEP_LIBS+= sqlite
+else
 QT_CONFIGURE+= -no-sql-sqlite
 endif
+endif
 ifeq ($(BR2_PACKAGE_QT_SQLITE2),y)
 QT_CONFIGURE+= -qt-sql-sqlite2
 endif