Set correct QT_LFLAGS_SQLITE for default cases.

In systems where no pkgconfig is available, such as QNX, we set
QT_LFLAGS_SQLITE to the default values.

Change-Id: I24edd589ce7baf2614480a91842ca756ead39463
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Rafael Roquetto 2012-07-17 11:52:10 +02:00 committed by Qt by Nokia
parent fe4adec894
commit a94e917eeb
2 changed files with 13 additions and 4 deletions

3
configure vendored
View File

@ -4215,6 +4215,9 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
if [ -n "$PKG_CONFIG" ]; then
QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
else
QT_CFLAGS_SQLITE=
QT_LFLAGS_SQLITE="-lsqlite3 -lz"
fi
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $D_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
if [ "$CFG_SQL_sqlite" = "auto" ]; then

View File

@ -2010,11 +2010,17 @@ bool Configure::checkAvailability(const QString &part)
available = true; // Built in, we have a fork
else if (part == "SQL_SQLITE_LIB") {
if (dictionary[ "SQL_SQLITE_LIB" ] == "system") {
available = findFile("sqlite3.h") && findFile("sqlite3.lib");
if (available)
dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib";
} else
if ((platform() == QNX) || (platform() == BLACKBERRY)) {
available = true;
dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3 -lz";
} else {
available = findFile("sqlite3.h") && findFile("sqlite3.lib");
if (available)
dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib";
}
} else {
available = true;
}
} else if (part == "SQL_SQLITE2")
available = findFile("sqlite.h") && findFile("sqlite.lib");
else if (part == "SQL_IBASE")