summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2010-06-10 12:58:16 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-06-10 12:59:12 (GMT)
commitec3bc9bbba71438374148118e539e75ee119a65f (patch)
treebab329afa712e5a49dc4f96a0811de0cddfd19f6
parentb65a1e0be447abca16f20001efe1be43a0469808 (diff)
downloadQt-ec3bc9bbba71438374148118e539e75ee119a65f.zip
Qt-ec3bc9bbba71438374148118e539e75ee119a65f.tar.gz
Qt-ec3bc9bbba71438374148118e539e75ee119a65f.tar.bz2
make postgresql support sensitive to PSQL_LIBS
The PSQL_LIBS environment variable is a standard way to pass the required library list. The changes here add support for this to the configures. Merge-request: 673 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r--config.tests/unix/psql/psql.pro2
-rwxr-xr-xconfigure2
-rw-r--r--tools/configure/configureapp.cpp4
-rw-r--r--tools/configure/configureapp.h1
4 files changed, 8 insertions, 1 deletions
diff --git a/config.tests/unix/psql/psql.pro b/config.tests/unix/psql/psql.pro
index 64bb3d6..38bfb3e 100644
--- a/config.tests/unix/psql/psql.pro
+++ b/config.tests/unix/psql/psql.pro
@@ -1,4 +1,4 @@
SOURCES = psql.cpp
CONFIG -= qt dylib
mac:CONFIG -= app_bundle
-LIBS += -lpq
+LIBS *= -lpq
diff --git a/configure b/configure
index 5ba0e57..f61ac6c 100755
--- a/configure
+++ b/configure
@@ -4921,6 +4921,8 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
fi
[ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
[ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
+ # But, respect PSQL_LIBS if set
+ [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
if [ "$CFG_SQL_psql" = "auto" ]; then
CFG_SQL_psql=plugin
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a5f9f2c..2e2d8ba 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1035,6 +1035,8 @@ void Configure::parseCmdLine()
qmakeLibs += QString("-l" + configCmdLine.at(i));
} else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS=")) {
opensslLibs = configCmdLine.at(i);
+ } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) {
+ psqlLibs = configCmdLine.at(i);
}
else if( ( configCmdLine.at(i) == "-override-version" ) || ( configCmdLine.at(i) == "-version-override" ) ){
@@ -2747,6 +2749,8 @@ void Configure::generateOutputVars()
else
qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32");
}
+ if (!psqlLibs.isEmpty())
+ qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1);
if (!qmakeSql.isEmpty())
qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " " );
if (!qmakeSqlPlugins.isEmpty())
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index 6c10dd8..ff2ee8b 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -133,6 +133,7 @@ private:
QStringList qmakeIncludes;
QStringList qmakeLibs;
QString opensslLibs;
+ QString psqlLibs;
QMap<QString,QString> licenseInfo;
QString outputLine;