Index: trunk/zoo-project/zoo-kernel/configure.ac
===================================================================
--- trunk/zoo-project/zoo-kernel/configure.ac	(revision 368)
+++ trunk/zoo-project/zoo-kernel/configure.ac	(revision 370)
@@ -175,5 +175,10 @@
 	then
 		# PHP was not specified, so search within the current path
+		PYTHONCFG_PATH=`which python${PYTHON_VERS}-config`
+		if test -z "${PYTHONCFG_PATH}" ; then
+		AC_PATH_PROG([PYTHONCONFIG], [python-config-${PYTHON_VERS}])
+		else
 		AC_PATH_PROG([PYTHONCONFIG], [python${PYTHON_VERS}-config])
+		fi
 	else
 		PYTHONCONFIG="$PYTHON_PATH/bin/python${PYTHON_VERS}-config"
Index: trunk/zoo-project/zoo-kernel/nmake.opt
===================================================================
--- trunk/zoo-project/zoo-kernel/nmake.opt	(revision 368)
+++ trunk/zoo-project/zoo-kernel/nmake.opt	(revision 370)
@@ -10,5 +10,5 @@
 
 !IFDEF MS_DIR
-MS_CFLAGS=-DUSE_MS -I$(MS_DIR)
+MS_CFLAGS=-DUSE_MS -I$(MS_DIR) /DNEED_STRCASESTR 
 MS_LDFLAGS=$(MS_DIR)/mapserver_i.lib
 MS_FILE=service_internal_ms.obj
Index: trunk/zoo-project/zoo-kernel/service_internal_ms.c
===================================================================
--- trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 368)
+++ trunk/zoo-project/zoo-kernel/service_internal_ms.c	(revision 370)
@@ -1,4 +1,8 @@
 #ifdef USE_MS
-
+#ifndef WIN32
+#define CLASS class
+#else
+#define CLASS _class
+#endif
 #include "service_internal_ms.h"
 
@@ -555,10 +559,10 @@
     if(msGrowLayerClasses(myLayer) == NULL)
       return -1;
-    if(initClass((myLayer->_class[myLayer->numclasses])) == -1)
+    if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1)
       return -1;
-    myLayer->_class[myLayer->numclasses]->type = myLayer->type;
-    if(msGrowClassStyles(myLayer->_class[myLayer->numclasses]) == NULL)
+    myLayer->CLASS[myLayer->numclasses]->type = myLayer->type;
+    if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL)
       return -1;
-    if(initStyle(myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]) == -1)
+    if(initStyle(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]) == -1)
       return -1;
 
@@ -568,15 +572,15 @@
     tmpMap=getMap(output->content,"msStyle");
     if(tmpMap!=NULL)
-      msUpdateStyleFromString(myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles],tmpMap->value,0);
+      msUpdateStyleFromString(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles],tmpMap->value,0);
     else{
       /**
        * Set style
        */
-      myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.red=125;
-      myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.green=125;
-      myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.blue=255;
-      myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.red=80;
-      myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.green=80;
-      myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinecolor.blue=80;
+      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.red=125;
+      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.green=125;
+      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.blue=255;
+      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.red=80;
+      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.green=80;
+      myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinecolor.blue=80;
 
       /**
@@ -584,16 +588,16 @@
        */
       if(myLayer->type == MS_LAYER_POLYGON)
-	myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->width=3;
+	myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->width=3;
       if(myLayer->type == MS_LAYER_LINE){
-	myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->width=3;
-	myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->outlinewidth=1.5;
+	myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->width=3;
+	myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->outlinewidth=1.5;
       }
       if(myLayer->type == MS_LAYER_POINT){
-	myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->symbol=1;
-	myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->size=15;
-      }
-
-    }
-    myLayer->_class[myLayer->numclasses]->numstyles++;
+	myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->symbol=1;
+	myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->size=15;
+      }
+
+    }
+    myLayer->CLASS[myLayer->numclasses]->numstyles++;
     myLayer->numclasses++;
     m->layerorder[m->numlayers] = m->numlayers;
@@ -795,10 +799,10 @@
 	    if(msGrowLayerClasses(myLayer) == NULL)
 	      return -1;
-	    if(initClass((myLayer->_class[myLayer->numclasses])) == -1)
+	    if(initClass((myLayer->CLASS[myLayer->numclasses])) == -1)
 	      return -1;
-	    myLayer->_class[myLayer->numclasses]->type = myLayer->type;
-	    if(msGrowClassStyles(myLayer->_class[myLayer->numclasses]) == NULL)
+	    myLayer->CLASS[myLayer->numclasses]->type = myLayer->type;
+	    if(msGrowClassStyles(myLayer->CLASS[myLayer->numclasses]) == NULL)
 	      return -1;
-	    if(initStyle(myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]) == -1)
+	    if(initStyle(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]) == -1)
 	      return -1;
 	    
@@ -808,5 +812,5 @@
 	    char className[7];
 	    sprintf(className,"class%d",i);
-	    myLayer->_class[myLayer->numclasses]->name=strdup(className);
+	    myLayer->CLASS[myLayer->numclasses]->name=strdup(className);
 	    
 	    /**
@@ -818,14 +822,14 @@
 	    else
 	      sprintf(expression,"([pixel]>=%.3f AND [pixel]<=%.3f)",cstep,cstep+interval);
-	    msLoadExpressionString(&myLayer->_class[myLayer->numclasses]->expression,expression);
+	    msLoadExpressionString(&myLayer->CLASS[myLayer->numclasses]->expression,expression);
 	    
 	    /**
 	     * Set color
 	     */
-	    myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.red=_tmpColors[i][0];
-	    myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.green=_tmpColors[i][1];
-	    myLayer->_class[myLayer->numclasses]->styles[myLayer->_class[myLayer->numclasses]->numstyles]->color.blue=_tmpColors[i][2];
+	    myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.red=_tmpColors[i][0];
+	    myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.green=_tmpColors[i][1];
+	    myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles]->color.blue=_tmpColors[i][2];
 	    cstep+=interval;
-	    myLayer->_class[myLayer->numclasses]->numstyles++;
+	    myLayer->CLASS[myLayer->numclasses]->numstyles++;
 	    myLayer->numclasses++;
 	    
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 368)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 370)
@@ -87,16 +87,21 @@
 #ifdef WIN32
 extern "C" {
-__declspec(dllexport) char *strcasestr(char const *a, char const *b) { 
-    char *x=_strdup(a); 
-    char *y=_strdup(b); 
-
-    x=_strlwr(x); 
-    y=_strlwr(y); 
-    char *pos = strstr(x, y); 
-    char *ret = pos == NULL ? NULL : (char *)(a + (pos-x)); 
-    free(x); 
-    free(y); 
-    return ret; 
-} 
+  __declspec(dllexport) char *strcasestr(char const *a, char const *b)
+#ifndef USE_MS
+ { 
+  char *x=_strdup(a); 
+  char *y=_strdup(b); 
+  
+  x=_strlwr(x); 
+  y=_strlwr(y); 
+  char *pos = strstr(x, y); 
+  char *ret = pos == NULL ? NULL : (char *)(a + (pos-x)); 
+  free(x); 
+  free(y); 
+  return ret; 
+ };
+#else
+  ;
+#endif
 }
 #endif
