summarylogtreecommitdiffstats
path: root/0014-Fix-linking-against-shared-static-PostgreSQL.patch
blob: 88dba2748e771d334306fdbf7aa5a56bd3ccedf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 953ca26efa1cb2e86a958c52ce737ada0078e1a3 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 18:58:25 +0200
Subject: [PATCH 14/30] Fix linking against shared/static PostgreSQL

---
 src/sql/configure.json | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/sql/configure.json b/src/sql/configure.json
index fce948026f..f560c191fd 100644
--- a/src/sql/configure.json
+++ b/src/sql/configure.json
@@ -72,9 +72,10 @@
             "label": "PostgreSQL",
             "test": "unix/psql",
             "sources": [
-                { "type": "pkgConfig", "args": "libpq" },
                 { "type": "psqlConfig" },
-                { "type": "psqlEnv", "libs": "-llibpq -lws2_32 -ladvapi32", "condition": "config.win32" },
+                { "type": "psqlEnv", "libs": "-lpq -lintl -lssl -lcrypto -lshell32 -lws2_32 -lsecur32", "condition": "config.win32 && !features.shared" },
+                { "type": "psqlEnv", "libs": "-Wl,-Bdynamic -lpq -Wl,-Bstatic", "condition": "config.win32 && !features.shared" },
+                { "type": "psqlEnv", "libs": "-lpq", "condition": "config.win32 && features.shared" },
                 { "type": "psqlEnv", "libs": "-lpq", "condition": "!config.win32" }
             ]
         },
-- 
2.12.1