1 From f23a18de3c398c908c92b8cf8f20edc12435b9d1 Mon Sep 17 00:00:00 2001
2 From: Peter Seiderer <ps.report@gmx.net>
3 Date: Thu, 19 Feb 2015 22:41:02 +0100
4 Subject: [PATCH] configure: add '-psql_config' option
6 Allow setting of pg_config path for cross compilation (do
7 the same as for mysql_config).
9 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
11 configure | 12 +++++++++---
12 1 file changed, 9 insertions(+), 3 deletions(-)
14 diff --git a/configure b/configure
15 index 0c66ecf..491486a 100755
18 @@ -578,6 +578,7 @@ CFG_WIDGETS=yes
26 @@ -885,6 +886,7 @@ while [ "$#" -gt 0 ]; do
34 @@ -1066,6 +1068,9 @@ while [ "$#" -gt 0 ]; do
36 CFG_MYSQL_CONFIG="$VAL"
39 + CFG_PSQL_CONFIG="$VAL"
42 QT_INSTALL_PREFIX="$VAL"
44 @@ -4369,10 +4374,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
47 if [ "$CFG_SQL_psql" != "no" ]; then
48 + [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
49 # Be careful not to use native pg_config when cross building.
50 - if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
51 - QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null | filterIncludePath`
52 - QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null | filterLibraryPath`
53 + if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
54 + QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
55 + QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
57 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
58 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"