File tree 1 file changed +23
-4
lines changed
1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,30 @@ if [ -n "$LIBPQ_INC" -o -n "$LIBPQ_LIB" ]; then
14
14
fi
15
15
. auto/feature
16
16
else
17
+ if [ -z "$PG_CONFIG" ]; then
18
+ PG_CONFIG=pg_config
19
+ fi
20
+
21
+ if type $PG_CONFIG >/dev/null 2>&1; then
22
+ # based on information from pg_config
23
+ ngx_feature="libpq library (via $PG_CONFIG)"
24
+ ngx_feature_path="`$PG_CONFIG --includedir`"
25
+ if [ $NGX_RPATH = YES ]; then
26
+ ngx_feature_libs="-R`$PG_CONFIG --libdir` -L`$PG_CONFIG --libdir` -lpq"
27
+ else
28
+ ngx_feature_libs="-L`$PG_CONFIG --libdir` -lpq"
29
+ fi
30
+ . auto/feature
31
+ fi
32
+
17
33
# auto-discovery
18
- ngx_feature="libpq library"
19
- ngx_feature_path=
20
- ngx_feature_libs="-lpq"
21
- . auto/feature
34
+ if [ $ngx_found = no ]; then
35
+ # system-wide
36
+ ngx_feature="libpq library"
37
+ ngx_feature_path=
38
+ ngx_feature_libs="-lpq"
39
+ . auto/feature
40
+ fi
22
41
23
42
if [ $ngx_found = no ]; then
24
43
# Debian
You can’t perform that action at this time.
0 commit comments