Index: trunk/psLib/swig/Makefile.am
===================================================================
--- trunk/psLib/swig/Makefile.am	(revision 4541)
+++ trunk/psLib/swig/Makefile.am	(revision 4981)
@@ -5,5 +5,7 @@
 	rm -rf psLibModule
 
-SRCDIR = $(shell cd $(top_srcdir) && pwd)
+# this is going into a make file one directory deeper in the tree so the
+# realitive paths need to be adjusted
+SWIGINC=`echo "${SRCINC}" | ${SED} "s|-I|-I../|g"`
 
 ####################################################
@@ -18,5 +20,5 @@
 psLibModule/setup.txt:
 	if [ ! -d psLibModule ]; then mkdir psLibModule; fi
-	echo "includes=$(SRCINC)" > psLibModule/setup.txt
+	echo "includes=-I../$(top_srcdir)/src $(SWIGINC) $(PSLIB_CFLAGS)" > psLibModule/setup.txt
 	echo "ldflags=-L$(top_builddir)/src $(PSLIB_LIBS)" >> psLibModule/setup.txt
 	echo "cflags=$(CFLAGS) -std=c99 -Wno-unused -Wno-strict-aliasing" >> psLibModule/setup.txt
