Index: tags/rel-1.2.0-rc3/zoo-services/cgal/Makefile
===================================================================
--- branches/branch-1.2/zoo-services/cgal/Makefile	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/cgal/Makefile	(revision 302)
@@ -1,9 +1,10 @@
-CFLAGS=-I../../zoo-kernel/ -I./ `xml2-config --cflags` `python-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 CC=gcc
 
 cgi-env/cgal_service.zo: service.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/cgal_service.zo ./service.c -lgdal -lCGAL
+	g++ ${CFLAGS} -shared -fpic -o cgi-env/cgal_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS} -lCGAL
 
 clean:
-	rm -f cgi-env/*.zo *.o *.tab.c *.tab.h *.sr.c* service_loader lex.* *.lreg *.sibling
-	rm -rf service_loader.dSYM
+	rm -f cgi-env/*.zo
Index: tags/rel-1.2.0-rc3/zoo-services/gdal/grid/Makefile
===================================================================
--- branches/branch-1.2/zoo-services/gdal/grid/Makefile	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/gdal/grid/Makefile	(revision 302)
@@ -1,7 +1,9 @@
-CFLAGS=-I../../../zoo-kernel-svn/ -I./ `xml2-config --cflags` `python-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 CC=gcc
 
 cgi-env/service.zo: service.c
-	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/gdal_grid_service.zo ./service.c -lgdal
+	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/gdal_grid_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
 clean:
Index: tags/rel-1.2.0-rc3/zoo-services/gdal/grid/service.c
===================================================================
--- branches/branch-1.2/zoo-services/gdal/grid/service.c	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/gdal/grid/service.c	(revision 302)
@@ -879,14 +879,14 @@
       char *ext=new char[4];
       ext="tif";
-      if(strcmp(mtoupper((char*)pszFormat),"AAIGRID")==0)
+      if(strncasecmp(pszFormat,"AAIGRID",7)==0)
         ext="csv";
       else 
-        if(strcmp(mtoupper((char*)pszFormat),"PNG")==0)
+        if(strncasecmp(pszFormat,"PNG",3)==0)
           ext="png";
         else
-          if(strcmp(mtoupper((char*)pszFormat),"GIF")==0)
+          if(strncasecmp(pszFormat,"GIF",3)==0)
             ext="gif";
           else
-            if(strcmp(mtoupper((char*)pszFormat),"JPEG")==0)
+            if(strncasecmp(pszFormat,"JPEG",4)==0)
               ext="jpg";
       sprintf((char*)pszDest,"%s/%s.%s",tempPath,tmpMap->value,ext);
Index: tags/rel-1.2.0-rc3/zoo-services/gdal/profile/Makefile
===================================================================
--- branches/branch-1.2/zoo-services/gdal/profile/Makefile	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/gdal/profile/Makefile	(revision 302)
@@ -1,7 +1,9 @@
-CFLAGS=-I../../../zoo-kernel/ -I./ `xml2-config --cflags` `python-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 CC=gcc
 
 cgi-env/gdal_profile_service.zo: service.c
-	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/gdal_profile_service.zo ./service.c -lgdal
+	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/gdal_profile_service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
 clean:
Index: tags/rel-1.2.0-rc3/zoo-services/gdal/translate/Makefile
===================================================================
--- branches/branch-1.2/zoo-services/gdal/translate/Makefile	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/gdal/translate/Makefile	(revision 302)
@@ -1,9 +1,10 @@
-CFLAGS=-I../../../zoo-kernel-svn/ -I./ `xml2-config --cflags` `python-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 CC=gcc
 
 cgi-env/service.zo: service.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/service.zo ./service.c -lgdal
+	g++ ${CFLAGS} -shared -fpic -o cgi-env/service.zo ./service.c ${GDAL_LIBS} ${MACOS_LD_FLAGS}
 
 clean:
-	rm -f *.zo *.o *.tab.c *.tab.h *.sr.c* service_loader lex.* *.lreg *.sibling
-	rm -rf service_loader.dSYM
+	rm -f cgi-env/*.zo
Index: tags/rel-1.2.0-rc3/zoo-services/gdal/translate/cgi-env/Gdal_Translate.zcfg
===================================================================
--- branches/branch-1.2/zoo-services/gdal/translate/cgi-env/Gdal_Translate.zcfg	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/gdal/translate/cgi-env/Gdal_Translate.zcfg	(revision 302)
@@ -8,5 +8,5 @@
  serviceProvider = gdal_service.zo
  <MetaData>
-   Test = My Demo
+   title = My Demo
  </MetaData>
  <DataInputs>
@@ -19,5 +19,5 @@
     DataType = string
     <Default>
-     value = AAIGrid
+     value = demo.tif
     </Default>
    </LiteralData>
Index: tags/rel-1.2.0-rc3/zoo-services/gdal/translate/service.c
===================================================================
--- branches/branch-1.2/zoo-services/gdal/translate/service.c	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/gdal/translate/service.c	(revision 302)
@@ -133,14 +133,14 @@
       char *ext=new char[4];
       ext="tif";
-      if(strcmp(mtoupper((char*)pszFormat),"AAIGRID")==0)
+      if(strncasecmp(pszFormat,"AAIGRID",7)==0)
 	ext="csv";
       else 
-	if(strcmp(mtoupper((char*)pszFormat),"PNG")==0)
+	if(strncasecmp(pszFormat,"PNG",3)==0)
 	  ext="png";
 	else
-	  if(strcmp(mtoupper((char*)pszFormat),"GIF")==0)
+	  if(strncasecmp(pszFormat,"GIF",3)==0)
 	    ext="gif";
 	  else
-	    if(strcmp(mtoupper((char*)pszFormat),"JPEG")==0)
+	    if(strncasecmp(pszFormat,"JPEG",4)==0)
 	      ext="jpg";
       sprintf((char*)pszDest,"%s/%s.%s",tempPath,tmpMap->value,ext);
Index: tags/rel-1.2.0-rc3/zoo-services/ogr/base-vect-ops/Makefile
===================================================================
--- branches/branch-1.2/zoo-services/ogr/base-vect-ops/Makefile	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/ogr/base-vect-ops/Makefile	(revision 302)
@@ -1,9 +1,8 @@
-CFLAGS=-I../../../zoo-kernel/ -I./ `geos-config --cflags` `xml2-config --cflags`  `gdal-config --cflags`  -DLINUX_FREE_ISSUE #-DDEBUG
-# if JS_ENABLED flag is set to true in your ZOO-Kernel Makefile then you'll have
-# uncomment the following line
-# JS_LDFLAGS=../../../zoo-kernel/ulinet.o ../../../zoo-kernel/service_internal_js.o
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=${ZOO_CFLAGS} ${JSCFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} `geos-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
 
 cgi-env/ogr_service.zo: service.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/ogr_service.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} `xml2-config --libs` `gdal-config --libs` `geos-config --libs`
+	g++ ${CFLAGS} -shared -fpic -o cgi-env/ogr_service.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} ${JSLDFLAGS} ${GDAL_LIBS} ${XML2LDFLAGS} ${MACOS_LD_FLAGS} ${ZOO_LDFLAGS} ${MACOS_LD_NET_FLAGS} `geos-config --libs`
 
 clean:
Index: tags/rel-1.2.0-rc3/zoo-services/ogr/base-vect-ops/service.c
===================================================================
--- branches/branch-1.2/zoo-services/ogr/base-vect-ops/service.c	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/ogr/base-vect-ops/service.c	(revision 302)
@@ -44,4 +44,5 @@
   void printExceptionReportResponse(maps*,map*);
   char *base64(const char *input, int length);
+  int errorException(maps *m, const char *message, const char *errorcode);
 
   OGRGeometryH createGeometryFromGML(maps* conf,char* inputStr){
Index: tags/rel-1.2.0-rc3/zoo-services/utils/status/Makefile
===================================================================
--- branches/branch-1.2/zoo-services/utils/status/Makefile	(revision 268)
+++ tags/rel-1.2.0-rc3/zoo-services/utils/status/Makefile	(revision 302)
@@ -1,9 +1,8 @@
-CFLAGS=-I../../../thirds/cgic206/ -I../../../zoo-kernel/ -I./ `xslt-config --cflags` `xml2-config --cflags` -lintl -lfcgi -lcrypto -DLINUX_FREE_ISSUE #-DDEBUG
-# if JS_ENABLED flag is set to true in your ZOO-Kernel Makefile then you'll have
-# uncomment the following line
-# JS_LDFLAGS=../../../zoo-kernel/ulinet.o ../../../zoo-kernel/service_internal_js.o
+ZRPATH=../../..
+include ${ZRPATH}/zoo-kernel/ZOOMakefile.opts
+CFLAGS=${ZOO_CFLAGS} ${XML2CFLAGS} ${GDAL_CFLAGS} ${PYTHONCFLAGS} -DLINUX_FREE_ISSUE #-DDEBUG
 
 cgi-env/wps_status.zo: service.c
-	g++ ${CFLAGS} -shared -fpic -o cgi-env/wps_status.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} `xml2-config --libs` `xslt-config --libs`
+	g++ ${CFLAGS} -shared -fpic -o cgi-env/wps_status.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} ${JSLDFLAGS} ${GDAL_LIBS} ${XML2LDFLAGS} ${MACOS_LD_FLAGS} ${ZOO_LDFLAGS} ${MACOS_LD_NET_FLAGS} `xslt-config --libs` -lfcgi
 
 clean:
