From: Santiago Vila <sanvila@debian.org>
Subject: Use correct prefix when using PostgreSQL

--- a/configure
+++ b/configure
@@ -20,7 +20,7 @@
 ac_help="$ac_help
  --with-pgsql=DIR     	Set root of PostgreSQL distribution.
 		Should contain include/postgresql/libpq-fe.h and
-		lib/libpq.so [default=/usr/local].
+		lib/libpq.so [default=/usr].
 		Cannot be used at the same time as --with-mysql."
 
 # Initialize some variables set by options.
@@ -547,7 +547,7 @@
   withval="$with_pgsql"
   PGSQL_SET=1; PGSQL_PREFIX=$with_pgsql
 else
-  PGSQL_SET=0; PGSQL_PREFIX="/usr/local"
+  PGSQL_SET=0; PGSQL_PREFIX="/usr"
 fi
 
 
@@ -557,7 +557,7 @@
 
 
 if [ "${PGSQL_PREFIX}" = "yes" ]; then
-	PGSQL_PREFIX=/usr/local
+	PGSQL_PREFIX=/usr
 fi
 
 if [ "${MYSQL_PREFIX}" = "yes" ]; then
--- a/configure.in
+++ b/configure.in
@@ -13,10 +13,10 @@
 AC_ARG_WITH(pgsql,
     [ --with-pgsql=DIR     	Set root of PostgreSQL distribution.
 		Should contain include/postgresql/libpq-fe.h and
-		lib/libpq.so [default=/usr/local].
+		lib/libpq.so [default=/usr].
 		Cannot be used at the same time as --with-mysql.],
     [PGSQL_SET=1; PGSQL_PREFIX=$with_pgsql],
-    [PGSQL_SET=0; PGSQL_PREFIX="/usr/local"])
+    [PGSQL_SET=0; PGSQL_PREFIX="/usr"])
 
 AC_SUBST(MYSQL_PREFIX)
 AC_SUBST(PGSQL_PREFIX)
@@ -24,7 +24,7 @@
 AC_SUBST(PGSQL_SET)
 
 if [[ "${PGSQL_PREFIX}" = "yes" ]]; then
-	PGSQL_PREFIX=/usr/local
+	PGSQL_PREFIX=/usr
 fi
 
 if [[ "${MYSQL_PREFIX}" = "yes" ]]; then
