Index: configure
--- configure.orig	2008-08-13 16:48:01 +0200
+++ configure	2008-09-08 13:59:06 +0200
@@ -2620,7 +2620,7 @@
 	CPPFLAGS="$CPPFLAGS $POSTGRESQL_CFLAGS"
 	CFLAGS="$CFLAGS $POSTGRESQL_CFLAGS"
 	CXXFLAGS="$CXXFLAGS $POSTGRESQL_CFLAGS"
-	LIBS="$LIBS $POSTGRESQL_LDFLAGS"
+	LIBS="$POSTGRESQL_LDFLAGS $LIBS"
 fi
 
 ####################################
@@ -3152,7 +3152,7 @@
 CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
 CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
 CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
-LIBS="$LIBS $WX_LIBS"
+LIBS="$WX_LIBS $LIBS"
 
 ######################################
 ## Includes include in include path ##
