UIMA-2433 Updated for newer version of python and swig

git-svn-id: https://svn.apache.org/repos/asf/uima/uimacpp/trunk@1360170 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scriptators/perl/Makefile b/scriptators/perl/Makefile
index d87e1b5..c394fb8 100644
--- a/scriptators/perl/Makefile
+++ b/scriptators/perl/Makefile
@@ -19,7 +19,8 @@
   $(error UIMACPP_HOME not set)
 endif
 
-SWIGVERSION:=$(subst SWIG Version ,,$(filter SWIG Version 1.3.%,$(shell swig -version 2>&1)))
+SWIGVERSION:=$(shell swig -version  | grep SWIG | sed "s/SWIG Version //" )
+#SWIGVERSION:=$(subst SWIG Version ,,$(filter SWIG Version 1.3.%,$(shell swig -version 2>&1)))
 
 ifeq ($(SWIGVERSION),)
   $(error unable to determine SWIGVERSION)
diff --git a/scriptators/python/Makefile b/scriptators/python/Makefile
index 9732a0f..65b8eeb 100644
--- a/scriptators/python/Makefile
+++ b/scriptators/python/Makefile
@@ -19,16 +19,16 @@
   $(error UIMACPP_HOME not set)
 endif
 
-SWIGVERSION:=$(subst SWIG Version ,,$(filter SWIG Version 1.3.%,$(shell swig -version 2>&1)))
+SWIGVERSION:=$(shell swig -version  | grep SWIG | sed "s/SWIG Version //" )
+#SWIGVERSION:=$(subst SWIG Version ,,$(filter SWIG Version $(SWIGMAJORMINOR).% ,$(shell swig -version 2>&1)))
 
 ifeq ($(SWIGVERSION),)
-  $(error unable to determine SWIGVERSION)
+  $(error unable to determine SWIGVERSION looking for $(SWIGMAJOR).$(MAJOR)) Rerun passing in SWIGMAJOR and SWIGMINOR)
 endif
 
 SWIGDEPS=uimapywrap.h
 SWIGFLAGS=-DSWIG$(subst .,_,$(SWIGVERSION))
 
-
 PYTHONVERSION:=$(subst ., ,$(subst Python ,,$(shell python -V 2>&1)))
 ifeq ($(PYTHONVERSION),)
   $(error PYTHONVERSION could not be determined)
diff --git a/scriptators/tcl/Makefile b/scriptators/tcl/Makefile
index 5806bf8..29ab969 100644
--- a/scriptators/tcl/Makefile
+++ b/scriptators/tcl/Makefile
@@ -19,7 +19,8 @@
   $(error UIMACPP_HOME not set)
 endif
 
-SWIGVERSION:=$(subst SWIG Version ,,$(filter SWIG Version 1.3.%,$(shell swig -version 2>&1)))
+SWIGVERSION:=$(shell swig -version  | grep SWIG | sed "s/SWIG Version //" )
+#SWIGVERSION:=$(subst SWIG Version ,,$(filter SWIG Version 1.3.%,$(shell swig -version 2>&1)))
 
 ifeq ($(SWIGVERSION),)
   $(error unable to determine SWIGVERSION)
diff --git a/scriptators/uima.i b/scriptators/uima.i
index 3ead68d..e502a02 100644
--- a/scriptators/uima.i
+++ b/scriptators/uima.i
@@ -68,6 +68,7 @@
 static bool PyStringConvert(PyObject *obj, UnicodeString &rv) {
   char *src;
   int len;
+  //Py_ssize_t len;
   PyString_AsStringAndSize(obj, &src, &len);
   rv = UnicodeString((const char *) src, (int32_t) len);
   return true;