Index: /trunk/psLib/src/astro/Makefile.am
===================================================================
--- /trunk/psLib/src/astro/Makefile.am	(revision 4501)
+++ /trunk/psLib/src/astro/Makefile.am	(revision 4502)
@@ -3,16 +3,5 @@
 AM_CFLAGS=$(CFLAGS) -DPS_CONFIG_FILE_DEFAULT=\"$(sysconfdir)/pslib/psTime.config\"
 
-INCLUDES = \
-	-I$(top_srcdir)/src/astro \
-	-I$(top_srcdir)/src/db \
-	-I$(top_srcdir)/src/fft \
-	-I$(top_srcdir)/src/fits \
-	-I$(top_srcdir)/src/imageops \
-	-I$(top_srcdir)/src/math \
-	-I$(top_srcdir)/src/mathtypes \
-	-I$(top_srcdir)/src/sys \
-	-I$(top_srcdir)/src/types \
-	-I$(top_srcdir)/src/xml \
-	$(all_includes)
+INCLUDES = `echo "$(SRCLIBS} | sed sed "s|\(\\w\+\)|-I\$(top_builddir)/src/\1|g"`
 
 noinst_LTLIBRARIES = libpslibastro.la
@@ -23,7 +12,7 @@
 BUILT_SOURCES = psAstroErrors.h
 
-EXTRA_DIST = psAstroErrors.dat astro.i
+EXTRA_DIST = psAstroErrors_$(LANG).dat astro.i
 
-psAstroErrors.h: psAstroErrors.dat
+psAstroErrors.h: psAstroErrors_$(LANG).dat
 	$(top_srcdir)/src/psParseErrorCodes --data=$? $@
 
Index: /trunk/psLib/src/astro/astro.i
===================================================================
--- /trunk/psLib/src/astro/astro.i	(revision 4502)
+++ /trunk/psLib/src/astro/astro.i	(revision 4502)
@@ -0,0 +1,3 @@
+/* astro headers */
+%include "psCoord.h"
+%include "psTime.h"
Index: /trunk/psLib/src/astro/psAstroErrors_en.dat
===================================================================
--- /trunk/psLib/src/astro/psAstroErrors_en.dat	(revision 4502)
+++ /trunk/psLib/src/astro/psAstroErrors_en.dat	(revision 4502)
@@ -0,0 +1,34 @@
+#
+#  This file is used to generate psAstroErrors.h content
+#
+#  Format is:
+#  ERRORNAME(one word)    ERROR_TEXT
+#
+#  N.B. in code, the ERRORNAME appears as PS_ERRORTEXT_ERRORNAME
+####################################################################
+psTime_FILE_NOT_FOUND                  Failed to open file %s.
+psTime_FILE_TOO_MANY_ROWS              Too many rows found in file %s. Max number of rows allowed is %d.
+psTime_TIME_POSTDATES_TABLE            Specified psTime postdates (%g) the table of %s information.
+psTime_TIME_PREDATES_TABLE             Specified psTime predates (%g) the table of %s information.
+psTime_TIME_POSTDATES_TABLES           Specified psTime postdates (%g) all tables of %s information.
+psTime_TIME_PREDATES_TABLES            Specified psTime predates (%g) all tables of %s information.
+psTime_TABLE_DUPLICATE_ROWS            The %s table was found to have two rows of the same time value.
+psTime_TYPE_UNKNOWN                    Specified type, %d, is not supported.
+psTime_TYPE_INCORRECT                  Specified type, %d, is incorrect.
+psTime_TYPE_MISMATCH                   Specified psTime parameters must have same type.
+psTime_GET_TOD_FAILED                  Failed to determine the current time from gettimeofday function.
+psTime_CONVERT_TIME_TO_STRING_FAILED   Failed to convert a time via strftime function.
+psTime_APPEND_MSEC_FAILED              Failed to append millisecond to time string with snprintf function.
+psTime_USEC_INVALID                    The psTime usec attribute value, %u, is invalid.  Must be less than 1e6.
+psTime_ISOTIME_MALFORMED               Specified ISO Time string, '%s', is malformed.  Must be in 'YYYY-MM-DDThh:mm:ss.sss' format.
+psTime_INTERPOLATION_FAILED            Failed time table interpolation.
+psTime_INTERPOLATION_FAILED_NAME       Failed time table interpolation for '%s'.
+psTime_LOOKUP_METADATA_FAILED          Failed find '%s' in time metadata.
+psTime_BAD_TABLE_COUNT                 Incorrect number of table files entered. Found: %d. Expected: %d.
+psTime_BAD_VECTOR                      Incorrect vector size. Size: %d, Expected %d.
+#
+psCoord_PROJECTION_TYPE_UNDEFINED      The projection type, %s, is undefined.
+psCoord_PROJECTION_TYPE_UNKNOWN        The projection type, %d, is unknown.
+psCoord_UNITS_UNKNOWN                  Specified units, 0x%x, is not supported.
+psCoord_OFFSET_MODE_UNKNOWN            Specified offset mode, 0x%x, is not supported.
+psCoord_INVALID_MJD                    Specified time is less than 1900.
Index: /trunk/psLib/src/db/Makefile.am
===================================================================
--- /trunk/psLib/src/db/Makefile.am	(revision 4501)
+++ /trunk/psLib/src/db/Makefile.am	(revision 4502)
@@ -1,27 +1,14 @@
-#Makefile for dataIO functions of psLib
+#Makefile for db functions of psLib
 #
-INCLUDES = \
-	-I$(top_srcdir)/src/astro \
-	-I$(top_srcdir)/src/db \
-	-I$(top_srcdir)/src/fft \
-	-I$(top_srcdir)/src/fits \
-	-I$(top_srcdir)/src/imageops \
-	-I$(top_srcdir)/src/math \
-	-I$(top_srcdir)/src/mathtypes \
-	-I$(top_srcdir)/src/sys \
-	-I$(top_srcdir)/src/types \
-	-I$(top_srcdir)/src/xml \
-	$(all_includes)
+INCLUDES = `echo "$(SRCLIBS} | sed sed "s|\(\\w\+\)|-I\$(top_builddir)/src/\1|g"`
 
-noinst_LTLIBRARIES = libpslibdataIO.la
+noinst_LTLIBRARIES = libpslibdb.la
 
 libpslibdataIO_la_SOURCES = \
-	psLookupTable.c \
-	psFits.c \
 	psDB.c
 
 
-BUILT_SOURCES = psFileUtilsErrors.h
-EXTRA_DIST = psFileUtilsErrors.dat psFileUtilsErrors.h dataIO.i
+BUILT_SOURCES = psDBErrors.h
+EXTRA_DIST = psDBErrors_en.dat db.i
 
 psFileUtilsErrors.h: psFileUtilsErrors.dat
Index: /trunk/psLib/src/db/db.i
===================================================================
--- /trunk/psLib/src/db/db.i	(revision 4502)
+++ /trunk/psLib/src/db/db.i	(revision 4502)
@@ -0,0 +1,2 @@
+/* db headers */
+%include "psDB.h"
Index: /trunk/psLib/src/db/psDBErrors_en.dat
===================================================================
--- /trunk/psLib/src/db/psDBErrors_en.dat	(revision 4502)
+++ /trunk/psLib/src/db/psDBErrors_en.dat	(revision 4502)
@@ -0,0 +1,26 @@
+#
+#  This file is used to generate psDBErrors.h content
+#
+#  Format is:
+#  ERRORNAME(one word)    ERROR_TEXT
+#
+#  N.B. in code, the ERRORNAME appears as PS_ERRORTEXT_ERRORNAME
+####################################################################
+psDB_INVALID_PSDB                      Invalid psDB has been specified.
+psDB_NULL_TABLE                        NULL table specified.
+psDB_FAILED_TO_CONNECT                 Failed to connect to database.  Error: %s
+psDB_FAILED_TO_CHANGE                  Failed to change database.  Error: %s
+psDB_TABLE_PARAM_NULL                  Create table parameters may not be NULL.
+psDB_QUERY_GEN_FAIL                    Query generation failed.
+psDB_TABLE_CREATE_FAIL                 Failed to create table.
+psDB_SQL_PREPARE_FAIL                  Failed to prepare query.  Error: %s
+psDB_SQL_QUERY_FAIL                    Failed to execute SQL query.  Error: %s
+psDB_TABLE_DROP_FAIL                   Failed to drop table.
+psDB_SEL_COL_FAIL                      Failed to select column.
+psDB_QUERY_NO_DATA                     Query returned no data.  Error: %s
+psDB_INSERT_ROW_FAIL                   Failed to insert row.
+psDB_UPDATE_ROW_FAIL                   Update row SQL generate fail: values and where params may not be NULL.
+psDB_SQL_SUBSTR_FAIL                   SQL substring generation failed.
+psDB_WHERE_SUBSTR_FAIL                 WHERE parameter my not be NULL.
+
+
