3
## DP: Make configure use pg_config if it is available.
4
## DP: Author: Jaldhar H. Vyas <jaldhar@debian.org>
10
diff -urN dovecot-1.1.1/configure.in dovecot-1.1.1-postgres/configure.in
11
--- dovecot-1.1.1/configure.in 2008-06-22 05:02:27.000000000 -0600
12
+++ dovecot-1.1.1-postgres/configure.in 2008-06-23 22:04:39.000000000 -0600
13
@@ -1807,21 +1807,29 @@
16
if test $want_pgsql != no; then
17
- # based on code from PHP
18
- for i in /usr /usr/local /usr/local/pgsql; do
19
- for j in include include/pgsql include/postgres include/postgresql ""; do
20
- if test -r "$i/$j/libpq-fe.h"; then
23
+ PGSQL_INCLUDE="`pg_config --includedir`"
24
+ if test "$PGSQL_INCLUDE" = ""; then
25
+ # based on code from PHP
26
+ for i in /usr /usr/local /usr/local/pgsql; do
27
+ for j in include include/pgsql include/postgres include/postgresql ""; do
28
+ if test -r "$i/$j/libpq-fe.h"; then
33
- for lib in lib lib64; do
34
- for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
35
- if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
40
+ PGSQL_LIBDIR="`pg_config --libdir`"
41
+ if test "$PGSQL_LIBDIR" = ""; then
42
+ for i in /usr /usr/local /usr/local/pgsql; do
43
+ for lib in lib lib64; do
44
+ for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
45
+ if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
55
if test "$PGSQL_LIBDIR" != ""; then