Index: /trunk/zoo-project/zoo-kernel/Makefile.in
===================================================================
--- /trunk/zoo-project/zoo-kernel/Makefile.in	(revision 971)
+++ /trunk/zoo-project/zoo-kernel/Makefile.in	(revision 972)
@@ -51,5 +51,5 @@
 
 sqlapi.o: sqlapi.c sqlapi.h
-	g++ -fPIC ${METADB_ENABLED} ${GDAL_CFLAGS} ${XML2CFLAGS} ${CFLAGS} ${JSCFLAGS} ${JS_ENABLED} -c sqlapi.c
+	g++ -fPIC ${JSON_CFLAGS} ${METADB_ENABLED} ${GDAL_CFLAGS} ${XML2CFLAGS} ${CFLAGS} ${JSCFLAGS} ${JS_ENABLED} -c sqlapi.c
 
 caching.o: caching.c
@@ -120,14 +120,14 @@
 	g++ -g -O2 ${JSON_CFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${CFLAGS} ${MONO_CFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${RCFLAGS} ${PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${SAGA_ENABLED} ${OTB_ENABLED} ${HPC_ENABLED} ${PYTHON_ENABLED} ${R_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} ${MONO_ENABLED} ${METADB_ENABLED} -c zoo_service_loader.c  -fno-common -DPIC -o zoo_service_loader.o
 
-libzoo_service.${EXT}: version.h service_internal.o service.o sqlapi.o
-	g++ -shared  ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS}  service_internal.o service.o sqlapi.o ${FCGI_LDFLAGS} ${GDAL_LIBS} ${ZOO_LDFLAGS} ${MACOS_LD_FLAGS}
+libzoo_service.${EXT}: version.h service_internal.o service.o sqlapi.o ${CALLBACK_FILE}
+	g++ -shared  ${GDAL_CFLAGS} ${DEFAULT_OPTS} -fpic -o libzoo_service.${EXT} ${CFLAGS}  service_internal.o service.o sqlapi.o ${CALLBACK_FILE} ${FCGI_LDFLAGS} ${GDAL_LIBS} ${ZOO_LDFLAGS} ${MACOS_LD_FLAGS}
 
-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 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} ${R_FILE} ${SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${CALLBACK_FILE}
+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 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} ${R_FILE} ${SAGA_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} 
 	g++ -g -O2 ${JSON_CFLAGS} ${JSCFLAGS} ${PHPCFLAGS}  ${PERLCFLAGS} ${RUBYCFLAGS}  ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c zoo_loader.c  -fno-common -DPIC -o zoo_loader.o
-	g++  ${JSON_CFLAGS} ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE}  ${PERL_FILE} ${PHP_FILE}  ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${R_FILE} ${CALLBACK_FILE} response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS}
+	g++  ${JSON_CFLAGS} ${JSCFLAGS} ${SAGA_CFLAGS} ${OTBCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o ${MS_FILE} ${PYTHON_FILE}  ${PERL_FILE} ${PHP_FILE}  ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ${OTB_FILE} ${SAGA_FILE} ${MONO_FILE} ${HPC_FILES} ${METADB_FILE} ${JSON_FILE} ${R_FILE}  response_print.o server_internal.o caching.o request_parser.o ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -L. ${LDFLAGS}
 
-zcfg2yaml: zcfg2yaml.c service.h lex.sr.o service_conf.tab.o service_conf.y main_conf_read.tab.o lex.cr.o response_print.o server_internal.o service_internal.o ${MS_FILE} ${YAML_FILE} ${CALLBACK_FILE}
+zcfg2yaml: zcfg2yaml.c service.h lex.sr.o service_conf.tab.o service_conf.y main_conf_read.tab.o lex.cr.o response_print.o server_internal.o service_internal.o ${MS_FILE} ${YAML_FILE} 
 	g++ -g -O2 ${JSCFLAGS} ${RUBYCFLAGS} ${XML2CFLAGS} ${CFLAGS} -c zcfg2yaml.c  -fno-common -DPIC -o zcfg2yaml.o
-	g++  ${XML2CFLAGS} ${CFLAGS} zcfg2yaml.o caching.o ulinet.o ${CALLBACK_FILE} server_internal.o service_internal.o ${MS_FILE} response_print.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o  ${YAML_FILE} -o zcfg2yaml -L. ${LDFLAGS}
+	g++  ${XML2CFLAGS} ${CFLAGS} zcfg2yaml.o caching.o ulinet.o server_internal.o service_internal.o ${MS_FILE} response_print.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o  ${YAML_FILE} -o zcfg2yaml -L. ${LDFLAGS}
 
 install: zoo_loader.cgi
Index: /trunk/zoo-project/zoo-kernel/service_callback.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_callback.c	(revision 971)
+++ /trunk/zoo-project/zoo-kernel/service_callback.c	(revision 972)
@@ -27,5 +27,7 @@
  */
 
+#ifdef USE_CALLBACK
 #include "service_internal_ms.h"
+#endif
 #include <pthread.h>
 #include <libxml/tree.h>
@@ -284,5 +286,6 @@
     return true;
   }
-  
+
+#ifdef USE_CALLBACK
   /**
    * Practically invoke the callback, meaning sending the HTTP POST request.
@@ -1035,5 +1038,6 @@
     return true;
   }
-
+#endif
+  
   /**
    * Wait for the threads to end then, clean used memory.
Index: /trunk/zoo-project/zoo-kernel/service_callback.h
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_callback.h	(revision 971)
+++ /trunk/zoo-project/zoo-kernel/service_callback.h	(revision 972)
@@ -39,5 +39,7 @@
 
   bool invokeBasicCallback(maps*,int);
+#ifdef USE_CALLBACK
   bool invokeCallback(maps*,maps*,maps*,int,int);
+#endif
   void cleanupCallbackThreads();
   
Index: /trunk/zoo-project/zoo-kernel/service_internal.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 971)
+++ /trunk/zoo-project/zoo-kernel/service_internal.c	(revision 972)
@@ -30,4 +30,5 @@
 #endif
 #include "service_internal.h"
+#include "service_callback.h"
 
 #ifdef WIN32
@@ -471,5 +472,7 @@
       fflush(fstatus);
       fclose(fstatus);
+#ifdef USE_JSON
       invokeBasicCallback(conf,SERVICE_STARTED);
+#endif
     }
     if(stat!=NULL){
Index: /trunk/zoo-project/zoo-kernel/sqlapi.c
===================================================================
--- /trunk/zoo-project/zoo-kernel/sqlapi.c	(revision 971)
+++ /trunk/zoo-project/zoo-kernel/sqlapi.c	(revision 972)
@@ -389,5 +389,7 @@
   cleanUpResultSet(conf,zoo_ds_nb-1);
   free(sqlQuery);
+#ifdef USE_JSON  
   invokeBasicCallback(conf,SERVICE_STARTED);
+#endif
   return 0;
 }
