Index: trunk/zoo-project/zoo-kernel/Makefile.in
===================================================================
--- trunk/zoo-project/zoo-kernel/Makefile.in	(revision 465)
+++ trunk/zoo-project/zoo-kernel/Makefile.in	(revision 466)
@@ -12,5 +12,5 @@
 JAVA_FILE=@JAVA_FILE@
 
-CFLAGS=-fpic ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
+CFLAGS=@DEB_DEF@ -fpic ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
 LDFLAGS=-lcurl -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${YAML_LDFLAGS} 
 
@@ -30,5 +30,5 @@
 
 version.h:
-	echo "#define ZOO_VERSION \"`svnversion -q -c -n .`\"" > version.h
+	echo "#define ZOO_VERSION \"`svnversion`\"" > version.h
 
 main_conf_read.tab.c: main_conf_read.y service.h
Index: trunk/zoo-project/zoo-kernel/configure.ac
===================================================================
--- trunk/zoo-project/zoo-kernel/configure.ac	(revision 465)
+++ trunk/zoo-project/zoo-kernel/configure.ac	(revision 466)
@@ -36,4 +36,13 @@
 AC_FUNC_REALLOC
 AC_CHECK_FUNCS([dup2 getcwd memset setenv strdup strstr])
+
+#============================================================================
+# Detect if run on debian / ubuntu
+#============================================================================
+if test -f "/usr/bin/dpkg"
+then
+	DEB_DEF=-DDEB
+fi
+AC_SUBST([DEB_DEF])
 
 #============================================================================
Index: trunk/zoo-project/zoo-kernel/service.h
===================================================================
--- trunk/zoo-project/zoo-kernel/service.h	(revision 465)
+++ trunk/zoo-project/zoo-kernel/service.h	(revision 466)
@@ -733,11 +733,12 @@
   static void dumpElementsAsYAML(elements* e){
     elements* tmp=e;
-    while(tmp!=NULL){
-      for(int i=0;i<2;i++)
+    int i;
+    while(tmp!=NULL){
+      for(i=0;i<2;i++)
 	fprintf(stderr," ");
       fprintf(stderr,"%s:\n",tmp->name);
       map* mcurs=tmp->content;
       while(mcurs!=NULL){
-	for(int i=0;i<4;i++)
+	for(i=0;i<4;i++)
 	  fprintf(stderr," ");
 	_dumpMap(mcurs);
@@ -746,9 +747,9 @@
       mcurs=tmp->metadata;
       if(mcurs!=NULL){
-	for(int i=0;i<4;i++)
+	for(i=0;i<4;i++)
 	  fprintf(stderr," ");
 	fprintf(stderr,"MetaData:\n");
 	while(mcurs!=NULL){
-	  for(int i=0;i<6;i++)
+	  for(i=0;i<6;i++)
 	    fprintf(stderr," ");
 	  _dumpMap(mcurs);
@@ -756,5 +757,5 @@
 	}
       }
-      for(int i=0;i<4;i++)
+      for(i=0;i<4;i++)
 	fprintf(stderr," ");
       fprintf(stderr,"%s:\n",tmp->format);
@@ -762,10 +763,10 @@
       int ioc=0;
       while(tmpio!=NULL){
-	for(int i=0;i<6;i++)
+	for(i=0;i<6;i++)
 	  fprintf(stderr," ");
 	fprintf(stderr,"default:\n");
 	mcurs=tmpio->content;
 	while(mcurs!=NULL){
-	  for(int i=0;i<8;i++)
+	  for(i=0;i<8;i++)
 	    fprintf(stderr," ");
 	  if(strcasecmp(mcurs->name,"range")==0){
@@ -781,10 +782,10 @@
       ioc=0;
       while(tmpio!=NULL){
-	for(int i=0;i<6;i++)
+	for(i=0;i<6;i++)
 	  fprintf(stderr," ");
 	fprintf(stderr,"supported:\n");
 	mcurs=tmpio->content;
 	while(mcurs!=NULL){
-	  for(int i=0;i<8;i++)
+	  for(i=0;i<8;i++)
 	    fprintf(stderr," ");
 	  if(strcasecmp(mcurs->name,"range")==0){
@@ -881,4 +882,5 @@
   static void dumpServiceAsYAML(service* s){
     int level=0;
+    int i;
     fprintf(stderr,"# %s\n\n",s->name);
     if(s->content!=NULL){
@@ -889,5 +891,5 @@
 	fprintf(stderr,"MetaData:\n");
 	while(mcurs!=NULL){
-	  for(int i=0;i<2;i++)
+	  for(i=0;i<2;i++)
 	    fprintf(stderr," ");
 	  _dumpMap(mcurs);
@@ -997,5 +999,6 @@
 	  else{
 	    if(hasLength!=NULL){
-	      for(int j=0;j<atoi(hasLength->value);j++){
+	      int j;
+	      for(j=0;j<atoi(hasLength->value);j++){
 		map* tmp0=getMapArray(curs->content,"value",j);
 		if(j==0)
Index: trunk/zoo-project/zoo-kernel/zoo_service_loader.c
===================================================================
--- trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 465)
+++ trunk/zoo-project/zoo-kernel/zoo_service_loader.c	(revision 466)
@@ -606,6 +606,13 @@
     char *tmp=zStrdup(r_inputs->value);
     setMapInMaps(m,"main","language",tmp);
+#ifdef DEB
+    char tmp2[12];
+    sprintf(tmp2,"%s.utf-8",tmp);
+    translateChar(tmp2,'-','_');
+    setlocale (LC_ALL, tmp2);
+#else
     translateChar(tmp,'-','_');
     setlocale (LC_ALL, tmp);
+#endif
 #ifndef WIN32
     setenv("LC_ALL",tmp,1);
