Index: configure
--- configure.orig	2003-09-21 05:00:43.000000000 +0200
+++ configure	2003-10-24 17:28:20.000000000 +0200
@@ -1241,7 +1241,7 @@
 
 
 case $host_os in 
-	*linux-gnu)
+	*linux*)
 		cat >> confdefs.h <<\EOF
 #define LINUX 1
 EOF
@@ -1257,7 +1257,7 @@
 EOF
 
 		;;
-	*freebsd)
+	*freebsd*)
 		cat >> confdefs.h <<\EOF
 #define FREEBSD 1
 EOF
@@ -2886,8 +2886,8 @@
 fi
 
 	
-	ac_safe=`echo "PGSQL_INCLUDE_DIR/libpq-fe.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for PGSQL_INCLUDE_DIR/libpq-fe.h""... $ac_c" 1>&6
+	ac_safe=`echo "$PGSQL_INCLUDE_DIR/libpq-fe.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $PGSQL_INCLUDE_DIR/libpq-fe.h""... $ac_c" 1>&6
 echo "configure:2892: checking for PGSQL_INCLUDE_DIR/libpq-fe.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2895,7 +2895,7 @@
   cat > conftest.$ac_ext <<EOF
 #line 2897 "configure"
 #include "confdefs.h"
-#include <PGSQL_INCLUDE_DIR/libpq-fe.h>
+#include <$PGSQL_INCLUDE_DIR/libpq-fe.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 { (eval echo configure:2902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Index: skey_fn.c
--- skey_fn.c.orig	2002-10-08 22:49:51.000000000 +0200
+++ skey_fn.c	2003-10-24 17:28:20.000000000 +0200
@@ -17,6 +17,8 @@
    FITNESS FOR A PARTICULAR PURPOSE.
 */
 
+#include "config.h"
+
 #ifdef SKEY
 #include "tac_plus.h"
 #include "expire.h"
Index: db_pgsql.c
--- db_pgsql.c.orig	2003-09-20 06:05:54.000000000 +0200
+++ db_pgsql.c	2003-10-24 17:28:20.000000000 +0200
@@ -1,3 +1,5 @@
+#include "config.h"
+#include "tac_plus.h"
 #if defined(DB_PGSQL) && defined(USE_DB)
 
 /*
@@ -11,7 +13,6 @@
 
 */
 
-#include "tac_plus.h"
 #include <stdio.h>
 #include <libpq-fe.h> 
 #include "db.h" 
