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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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
  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 | 12 +++++++++---
  10. 1 file changed, 9 insertions(+), 3 deletions(-)
  11. diff --git a/configure b/configure
  12. index 0c66ecf..491486a 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. + if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
  51. + QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
  52. + QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
  53. fi
  54. [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
  55. [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
  56. --
  57. 2.1.4