--- configure.orig	2015-09-16 18:26:48 UTC
+++ configure
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Note: When adding make options to this script, ensure that the source still
@@ -41,7 +41,7 @@ else
 fi
 
 # TODO: add pg_config, mysql_config etc!
-LINK_SYSLIBDIRS="-L/usr/local/pgsql/lib -L/usr/local/lib -L/usr/lib"
+LINK_SYSLIBDIRS="-L${LOCALBASE}/lib/postgresql -L${LOCALBASE}/lib/mysql -L${LOCALBASE}/lib -L/usr/lib"
 
 # ******************** usage ********************
 
@@ -396,6 +396,7 @@ genConfigMake() {
     cfgwrite "debug:=no"
   fi
   cfgwrite ""
+  cfgwrite "NEEDS_GUI=no"
   
   if test $ARG_WITH_STRIP = 1; then
     cfgwrite "# configured to produce stripped code";