Index: /trunk/zoo-project/zoo-kernel/Makefile.in
===================================================================
--- /trunk/zoo-project/zoo-kernel/Makefile.in	(revision 648)
+++ /trunk/zoo-project/zoo-kernel/Makefile.in	(revision 649)
@@ -94,5 +94,5 @@
 
 libzoo_service.${EXT}: version.h service_internal.o service.o 
-	gcc -shared ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS}  service_internal.o service.o -lfcgi
+	gcc -shared  ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS}  service_internal.o service.o -lfcgi ${GDAL_LIBS}
 
 zoo_loader.cgi: version.h libzoo_service.${EXT} zoo_loader.c zoo_service_loader.o  ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o request_parser.o sqlapi.o response_print.o server_internal.o caching.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE}
Index: /trunk/zoo-project/zoo-kernel/server_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/server_internal.c	(revision 648)
+++ /trunk/zoo-project/zoo-kernel/server_internal.c	(revision 649)
@@ -28,10 +28,4 @@
 #ifndef WIN32
 #include <dlfcn.h>
-#endif
-
-#ifdef USE_MS
-#include "service_internal_ms.h"
-#else
-#include "cpl_vsi.h"
 #endif
 
@@ -767,29 +761,4 @@
 }
 
-/**
- * Read a file using the GDAL VSI API 
- *
- * @param conf the maps containing the settings of the main.cfg file
- * @param dataSource the datasource name to read
- * @warning make sure to free ressources returned by this function
- */
-char *readVSIFile(maps* conf,const char* dataSource){
-    VSILFILE * fichier=VSIFOpenL(dataSource,"rb");
-    VSIStatBufL file_status;
-    VSIStatL(dataSource, &file_status);
-    if(fichier==NULL){
-      char tmp[1024];
-      sprintf(tmp,"Failed to open file %s for reading purpose. File seems empty %lld.",
-	      dataSource,file_status.st_size);
-      setMapInMaps(conf,"lenv","message",tmp);
-      return NULL;
-    }
-    char *res1=(char *)malloc(file_status.st_size*sizeof(char));
-    VSIFReadL(res1,1,file_status.st_size*sizeof(char),fichier);
-    res1[file_status.st_size-1]=0;
-    VSIFCloseL(fichier);
-    VSIUnlink(dataSource);
-    return res1;
-}
-
-
+
+
Index: /trunk/zoo-project/zoo-kernel/server_internal.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/server_internal.h	(revision 648)
+++ /trunk/zoo-project/zoo-kernel/server_internal.h	(revision 649)
@@ -49,5 +49,4 @@
   char* addDefaultValues(maps**,elements*,maps*,int,map**);
   char* getEncoding(maps*);
-  char *readVSIFile(maps*,const char*);
   void parseIdentifier(maps*,char*,char*,char*);
   void dumpMapsValuesToFiles(maps**,maps**);
Index: /trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 648)
+++ /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 649)
@@ -25,4 +25,9 @@
 #include "fcgi_stdio.h"
 #include "service_internal.h"
+#ifdef USE_MS
+#include "service_internal_ms.h"
+#else
+#include "cpl_vsi.h"
+#endif
 
 #ifndef TRUE
@@ -606,4 +611,30 @@
 
 /**
+ * Read a file using the GDAL VSI API 
+ *
+ * @param conf the maps containing the settings of the main.cfg file
+ * @param dataSource the datasource name to read
+ * @warning make sure to free ressources returned by this function
+ */
+char *readVSIFile(maps* conf,const char* dataSource){
+    VSILFILE * fichier=VSIFOpenL(dataSource,"rb");
+    VSIStatBufL file_status;
+    VSIStatL(dataSource, &file_status);
+    if(fichier==NULL){
+      char tmp[1024];
+      sprintf(tmp,"Failed to open file %s for reading purpose. File seems empty %lld.",
+	      dataSource,file_status.st_size);
+      setMapInMaps(conf,"lenv","message",tmp);
+      return NULL;
+    }
+    char *res1=(char *)malloc(file_status.st_size*sizeof(char));
+    VSIFReadL(res1,1,file_status.st_size*sizeof(char),fichier);
+    res1[file_status.st_size-1]=0;
+    VSIFCloseL(fichier);
+    VSIUnlink(dataSource);
+    return res1;
+}
+
+/**
  * Set an output value 
  *
Index: /trunk/zoo-project/zoo-kernel/service_internal.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 648)
+++ /trunk/zoo-project/zoo-kernel/service_internal.h	(revision 649)
@@ -94,4 +94,5 @@
 #endif
 
+  char *readVSIFile(maps*,const char*);
   int  setOutputValue( maps*, const char*, char*, size_t);
   char* getInputValue( maps*,const char*,size_t*);
