Index: configure.in
===================================================================
RCS file: /cvs/tools/config_office/configure.in,v
retrieving revision 1.209
diff -u -u -r1.209 configure.in
--- config_office/configure.in	18 Jun 2007 16:36:20 -0000	1.209
+++ config_office/configure.in	18 Jul 2007 16:01:44 -0000
@@ -3226,6 +3226,23 @@
 AC_SUBST(HSQLDB_JAR)
 
 dnl ===================================================================
+dnl Check for PostgreSQL stuff
+dnl ===================================================================
+AC_PATH_PROG(PGCONFIG, pg_config)
+if test -z "$PGCONFIG"; then
+	AC_MSG_ERROR([pg_config needed])
+fi
+save_CXXFLAGS=$CXXFLAGS
+save_LDFLAGS=$LDFLAGS
+CXXFLAGS="-I`pg_config --includedir`"
+AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
+AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR(libpq is needed)], [])
+CXXFLAGS=$save_CXXFLAGS
+LDFLAGS=$save_LDFLAGS
+SYSTEM_POSTGRESQL=YES # only option atm :-)
+AC_SUBST(SYSTEM_POSTGRESQL)
+
+dnl ===================================================================
 dnl Check for system beanshell
 dnl ===================================================================
 AC_MSG_CHECKING([which beanshell to use])
Index: set_soenv.in
===================================================================
RCS file: /cvs/tools/config_office/set_soenv.in,v
retrieving revision 1.149
diff -u -u -r1.149 set_soenv.in
--- config_office/set_soenv.in        18 Jun 2007 16:36:33 -0000      1.149
+++ config_office/set_soenv.in        19 Jul 2007 17:26:36 -0000
@@ -1892,6 +1892,7 @@
 ToFile( "ENABLE_JAM",        "@ENABLE_JAM@",       "e" );
 ToFile( "USE_XINERAMA",      "@USE_XINERAMA@",     "e" );
 ToFile( "XINERAMA_LINK",     "@XINERAMA_LINK@",    "e" );
+ToFile( "SYSTEM_POSTGRESQL",  "@SYSTEM_POSTGRESQL@", "e" );
 ToFile( "SYSTEM_HUNSPELL",   "@SYSTEM_HUNSPELL@",  "e" );
 ToFile( "HUNSPELL_CFLAGS",   "@HUNSPELL_CFLAGS@",  "e" );
 ToFile( "SYSTEM_HYPH",       "@SYSTEM_HYPH@",      "e" );

