0007-configure-add-psql_config-option.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 95f2e4001f9c1721cbdb26d3f9c38511adae9c4b 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
  5. Allow setting of pg_config path for cross compilation (do
  6. the same as for mysql_config).
  7. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  8. ---
  9. configure | 10 ++++++++--
  10. 1 file changed, 8 insertions(+), 2 deletions(-)
  11. diff --git a/configure b/configure
  12. index 0c66ecf..a832ae3 100755
  13. --- a/configure
  14. +++ b/configure
  15. @@ -578,6 +578,7 @@ CFG_WIDGETS=yes
  16. CFG_QCONFIG=full
  17. CFG_DEBUG=auto
  18. CFG_MYSQL_CONFIG=
  19. +CFG_PSQL_CONFIG=
  20. CFG_DEBUG_RELEASE=no
  21. CFG_FORCEDEBUGINFO=no
  22. CFG_SHARED=yes
  23. @@ -885,6 +886,7 @@ while [ "$#" -gt 0 ]; do
  24. -arch| \
  25. -host-arch| \
  26. -mysql_config| \
  27. + -psql_config| \
  28. -qpa| \
  29. -qconfig| \
  30. -qreal| \
  31. @@ -1066,6 +1068,9 @@ while [ "$#" -gt 0 ]; do
  32. mysql_config)
  33. CFG_MYSQL_CONFIG="$VAL"
  34. ;;
  35. + psql_config)
  36. + CFG_PSQL_CONFIG="$VAL"
  37. + ;;
  38. prefix)
  39. QT_INSTALL_PREFIX="$VAL"
  40. ;;
  41. @@ -4369,10 +4374,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
  42. ;;
  43. psql)
  44. if [ "$CFG_SQL_psql" != "no" ]; then
  45. + [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
  46. # Be careful not to use native pg_config when cross building.
  47. if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
  48. - QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null | filterIncludePath`
  49. - QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null | filterLibraryPath`
  50. + QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
  51. + QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
  52. fi
  53. [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
  54. [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
  55. --
  56. 2.1.4