diff options
author | Peter Seiderer <ps.report@gmx.net> | 2015-03-11 19:55:42 (GMT) |
---|---|---|
committer | Peter Seiderer <ps.report@gmx.net> | 2015-03-13 19:16:49 (GMT) |
commit | 12dffd75176b93b266d27e27a45ed727ec1b14a1 (patch) | |
tree | 2d30569620c52a2af0713d2d23c290e2092c628d | |
parent | 3e55cd6dc467303a3c35312e9fcb255c2c048b32 (diff) | |
download | Qt-12dffd75176b93b266d27e27a45ed727ec1b14a1.zip Qt-12dffd75176b93b266d27e27a45ed727ec1b14a1.tar.gz Qt-12dffd75176b93b266d27e27a45ed727ec1b14a1.tar.bz2 |
configure: add '-psql_config' option
Allow setting of pg_config path for cross compilation where pg_config is
not in the command search path (do the same as for mysql_config).
This is e.g. used for buildroot (see [1] for details).
Patch is backported from qtbase/a59028d6e98bcf5a13c9103753e5e83c362c63bc.
[1] http://lists.busybox.net/pipermail/buildroot/2015-March/121654.html
Change-Id: If2cce9c8e9e3f87bcbe80fcccacad881ec14b476
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rwxr-xr-x | configure | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -741,6 +741,7 @@ CFG_INCREMENTAL=auto CFG_QCONFIG=full CFG_DEBUG=auto CFG_MYSQL_CONFIG= +CFG_PSQL_CONFIG= CFG_DEBUG_RELEASE=no CFG_SHARED=yes CFG_SM=auto @@ -1159,7 +1160,7 @@ while [ "$#" -gt 0 ]; do shift VAL=$1 ;; - -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-sysroot) + -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-psql_config|-sysroot) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` shift VAL="$1" @@ -1371,6 +1372,9 @@ while [ "$#" -gt 0 ]; do mysql_config) CFG_MYSQL_CONFIG="$VAL" ;; + psql_config) + CFG_PSQL_CONFIG="$VAL" + ;; prefix) QT_INSTALL_PREFIX="$VAL" ;; @@ -5568,10 +5572,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; psql) if [ "$CFG_SQL_psql" != "no" ]; then + [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config` # Be careful not to use native pg_config when cross building. - if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then - QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null` - QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null` + if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then + QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath` + QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath` fi [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL" [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL" |