diff --git a/SAS/OTDB/configure.in b/SAS/OTDB/configure.in
index 20d8e2017718ae10f017fa6fe5acc22df2ba0625..269cb8f8f28a8d7f40a19f5b47a0f7aaefe9181c 100644
--- a/SAS/OTDB/configure.in
+++ b/SAS/OTDB/configure.in
@@ -53,8 +53,8 @@ dnl
 lofar_GENERAL
 lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypes.h,,)
 lofar_EXTERNAL(boost,1,boost/date_time/date.hpp, boost_date_time)
-lofar_EXTERNAL(pqxx,2.5.5,pqxx/pqxx, pqxx)
-lofar_EXTERNAL(pq,,libpq-fe.h, pq, /usr/local/pgsql)
+lofar_EXTERNAL(pqxx,1,pqxx/pqxx, pqxx)
+lofar_EXTERNAL(pq,1,libpq-fe.h, pq, "/usr/local/pgsql /Library/PostgreSQL/8.3")
 
 dnl
 dnl Output Makefiles
diff --git a/SAS/OTDB/include/OTDB/Makefile.am b/SAS/OTDB/include/OTDB/Makefile.am
index 2156bb2bc86c0db2968f5e966e22ea313f117b2c..d0ad904d7b735828ab3c7cc519856897de29ccd8 100644
--- a/SAS/OTDB/include/OTDB/Makefile.am
+++ b/SAS/OTDB/include/OTDB/Makefile.am
@@ -15,9 +15,9 @@ pkginclude_HEADERS 	= Package__Version.h  	Converter.h \
 				misc.h \
 				OTDBconnection.h \
 				TreeMaintenance.h \
-				TreeValue.h
+				TreeValue.h 
 
-NOINSTHDRS 	= 	wSpaceSplit.h\
+noinst_HEADERS	 	= 	wSpaceSplit.h \
 				OTDBaction.h \
 				OTDBactionList.h \
 				OTDBcontrol.h \
diff --git a/SAS/OTDB/test/tConnection.cc b/SAS/OTDB/test/tConnection.cc
index 8a966c2a62d7324f2b7fa15a4225890a7b0d459f..95600834b6038f4883db40365414ba380d046395 100644
--- a/SAS/OTDB/test/tConnection.cc
+++ b/SAS/OTDB/test/tConnection.cc
@@ -32,6 +32,7 @@
 #include <OTDB/TreeState.h>
 #include <OTDB/TreeStateConv.h>
 #include <OTDB/TreeMaintenance.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tConverter.cc b/SAS/OTDB/test/tConverter.cc
index e654a73b9c33c994224043f2930a30e0b495aa3f..28d204a63407533286a99a90200264f67268de00 100644
--- a/SAS/OTDB/test/tConverter.cc
+++ b/SAS/OTDB/test/tConverter.cc
@@ -29,6 +29,7 @@
 #include <Common/lofar_datetime.h>
 #include <OTDB/OTDBconnection.h>
 #include <OTDB/ParamTypeConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tPICtree.cc b/SAS/OTDB/test/tPICtree.cc
index 528eb5b3031c002921ee9eb8c6c2f7ecff36af8c..de0b7aed29f5626269bac772c40a72131a4a5746 100644
--- a/SAS/OTDB/test/tPICtree.cc
+++ b/SAS/OTDB/test/tPICtree.cc
@@ -34,6 +34,7 @@
 #include <OTDB/OTDBparam.h>
 #include <OTDB/TreeStateConv.h>
 #include <OTDB/ClassifConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tPICvalue.cc b/SAS/OTDB/test/tPICvalue.cc
index 9685003cceca4bd51645dc7860c9e3c5954153e3..ce7ec081053e3ad43d99ec84505d2a1f263f9132 100644
--- a/SAS/OTDB/test/tPICvalue.cc
+++ b/SAS/OTDB/test/tPICvalue.cc
@@ -35,6 +35,7 @@
 #include <OTDB/TreeTypeConv.h>
 #include <OTDB/TreeStateConv.h>
 #include <OTDB/ClassifConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tVHtree.cc b/SAS/OTDB/test/tVHtree.cc
index 153e16b3252ade7a85643031f3b34038fb2c727a..cf7ae43c93d556c5aa0252f647db766117644b5d 100644
--- a/SAS/OTDB/test/tVHtree.cc
+++ b/SAS/OTDB/test/tVHtree.cc
@@ -35,6 +35,7 @@
 #include <OTDB/TreeTypeConv.h>
 #include <OTDB/TreeStateConv.h>
 #include <OTDB/ClassifConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tVHvalue.cc b/SAS/OTDB/test/tVHvalue.cc
index 79568c3fb6d598d09aace2eff59774e881587e76..223a4e42229b5bcbd6e9a43a3349bafcee8323c6 100644
--- a/SAS/OTDB/test/tVHvalue.cc
+++ b/SAS/OTDB/test/tVHvalue.cc
@@ -35,6 +35,7 @@
 #include <OTDB/TreeTypeConv.h>
 #include <OTDB/TreeStateConv.h>
 #include <OTDB/ClassifConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tVICcomp.cc b/SAS/OTDB/test/tVICcomp.cc
index edc8581814f5a59c66d65e2835110850fce3038b..f4f2d5d18b061967e049e9f774f17d023d86954e 100644
--- a/SAS/OTDB/test/tVICcomp.cc
+++ b/SAS/OTDB/test/tVICcomp.cc
@@ -33,6 +33,7 @@
 #include <OTDB/VICnodeDef.h>
 #include <OTDB/OTDBparam.h>
 #include <OTDB/ClassifConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;
diff --git a/SAS/OTDB/test/tVTtree.cc b/SAS/OTDB/test/tVTtree.cc
index a1ad6ebaf533d9f5e07a158fbf4ecfe79bd2a9f5..dff1171d9496a41d1ee3ea38c7046359622dc168 100644
--- a/SAS/OTDB/test/tVTtree.cc
+++ b/SAS/OTDB/test/tVTtree.cc
@@ -35,6 +35,7 @@
 #include <OTDB/TreeTypeConv.h>
 #include <OTDB/TreeStateConv.h>
 #include <OTDB/ClassifConv.h>
+#include <libgen.h>             // for basename
 
 using namespace LOFAR;
 using namespace LOFAR::OTDB;