Index: trunk/zoo-services/ogr/ogr2ogr/Makefile
===================================================================
--- trunk/zoo-services/ogr/ogr2ogr/Makefile	(revision 1)
+++ trunk/zoo-services/ogr/ogr2ogr/Makefile	(revision 38)
@@ -1,9 +1,26 @@
-GDAL_SRC=/var/tmp/portage/sci-libs/gdal-1.6.1/work/gdal-1.6.1/ogr/
-CFLAGS=-I$(GDAL_SRC) -I../../../zoo-kernel-svn/ -I./ `xml2-config --cflags` `python-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG
-CC=gcc
+GDAL_SRC=./gdal_src/
 
-cgi-env/ogr2ogr_service.zo: service.c
-	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/ogr2ogr_service.zo ./service.c -lgdal
+include $(GDAL_SRC)GDALmake.opt
+
+CPPFLAGS        :=      $(GDAL_INCLUDE) -I$(GDAL_ROOT)/frmts $(CPPFLAGS)
+DEP_LIBS        =       $(EXE_DEP_LIBS) $(XTRAOBJ)
+BIN_LIST = cgi-env/ogr2ogr_service.zo
+
+default:        $(BIN_LIST)
+
+all: default
+
+lib-depend:
+	(cd $(GDAL_SRC)/gcore ; $(MAKE) )
+	(cd $(GDAL_SRC)/port ; $(MAKE) )
+
+CFLAGS=-DZOO_SERVICE -I../../../zoo-kernel/
+
+#cgi-env/ogr2ogr_service.zo: service.c
+#	g++  -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/ogr2ogr_service.zo ./service.c -lgdal
+
+cgi-env/ogr2ogr_service.zo: service.c $(DEP_LIBS)
+	g++ $(CFLAGS) $(CPPFLAGS) -shared -fpic $< `gdal-config --libs` -o $@
 
 clean:
-	rm -f cgi-env/*.zo
+	rm -f cgi-env/*zo
Index: trunk/zoo-services/ogr/ogr2ogr/cgi-env/Ogr2Ogr.zcfg
===================================================================
--- trunk/zoo-services/ogr/ogr2ogr/cgi-env/Ogr2Ogr.zcfg	(revision 1)
+++ trunk/zoo-services/ogr/ogr2ogr/cgi-env/Ogr2Ogr.zcfg	(revision 38)
@@ -1,5 +1,5 @@
 [Ogr2Ogr]
- Title = Convert raster data from one format to another. 
- Abstract = Converts raster data between different formats.
+ Title = Convert vector data from one format to another. 
+ Abstract = Converts vector data between different formats.
  processVersion = 1
  storeSupported = true
@@ -7,6 +7,6 @@
  serviceType = C
  serviceProvider = ogr2ogr_service.zo
- <MetaData lang="en">
-   title = My Demo
+ <MetaData>
+   Title = My Demo
  </MetaData>
  <DataInputs>
@@ -19,8 +19,7 @@
     DataType = string
     <Default>
-     value = AAIGrid
+     value = ESRI ShapeFile
     </Default>
     <Supported>
-     value = AAIGrid
     </Supported>
    </LiteralData>
@@ -33,13 +32,11 @@
     DataType = string
     <Default>
-     uom = feet
     </Default>	
     <Supported>
-     value = AAIGrid
     </Supported>
    </LiteralData>
   [OutputDSN]
    Title = The output data source name
-   Abstract = The output data source name to use as source for convertion.
+   Abstract = The full path of the output data source name created.
    minOccurs = 1
    maxOccurs = 1
@@ -47,8 +44,6 @@
     DataType = string
     <Default>
-     uom = feet
     </Default>	
     <Supported>
-     value = AAIGrid
     </Supported>
    </LiteralData>
@@ -61,8 +56,6 @@
     DataType = string
     <Default>
-     uom = feet
     </Default>	
     <Supported>
-     value = AAIGrid
     </Supported>
    </LiteralData>
Index: trunk/zoo-services/ogr/ogr2ogr/service.c
===================================================================
--- trunk/zoo-services/ogr/ogr2ogr/service.c	(revision 1)
+++ trunk/zoo-services/ogr/ogr2ogr/service.c	(revision 38)
@@ -101,4 +101,5 @@
 	{
 		fprintf(stderr,"Not correct version of the gdal library\n");
+		setMapInMaps(conf,"lenv","message","Unable to check gdal version for ogr2ogr_service.zo");
 		return SERVICE_FAILED;
 	}
@@ -548,4 +549,5 @@
         Usage();
 #ifdef ZOO_SERVICE
+		setMapInMaps(conf,"lenv","message","Wrong parameter");
 		return SERVICE_FAILED;
 	}
@@ -575,4 +577,7 @@
         }
 #ifdef ZOO_SERVICE
+		char tmp[1024];
+		sprintf(tmp,"Unable to open datasource `%s' with the following drivers.",pszDataSource);
+		setMapInMaps(conf,"lenv","message",tmp);
 		return SERVICE_FAILED;
 #else
@@ -595,4 +600,7 @@
                     pszDestDataSource );
 #ifdef ZOO_SERVICE
+		char tmp[1024];
+		sprintf(tmp,"Unable to open existing output datasource `%s'.",pszDestDataSource);
+		setMapInMaps(conf,"lenv","message",tmp);
 		return SERVICE_FAILED;
 #else
@@ -637,4 +645,7 @@
             }
 #ifdef ZOO_SERVICE
+			char tmp[1024];
+			sprintf(tmp,"Unable to find driver `%s'.",pszFormat);
+			setMapInMaps(conf,"lenv","message",tmp);
 			return SERVICE_FAILED;
 #else
@@ -648,4 +659,7 @@
                     pszFormat );
 #ifdef ZOO_SERVICE
+			char tmp[1024];
+			sprintf(tmp,"%s driver does not support data source creation.",pszFormat);
+			setMapInMaps(conf,"lenv","message",tmp);
 			return SERVICE_FAILED;
 #else
@@ -663,4 +677,7 @@
                     pszFormat, pszDestDataSource );
 #ifdef ZOO_SERVICE
+			char tmp[1024];
+			sprintf(tmp,"%s driver failed to create %s",pszFormat, pszDestDataSource);
+			setMapInMaps(conf,"lenv","message",tmp);
 			return SERVICE_FAILED;
 #else
@@ -681,4 +698,7 @@
                     pszOutputSRSDef );
 #ifdef ZOO_SERVICE
+			char tmp[1024];
+			sprintf(tmp,"Failed to process SRS definition: %s",pszOutputSRSDef);
+			setMapInMaps(conf,"lenv","message",tmp);
 			return SERVICE_FAILED;
 #else
@@ -699,4 +719,7 @@
                     pszSourceSRSDef );
 #ifdef ZOO_SERVICE
+			char tmp[1024];
+			sprintf(tmp,"Failed to process SRS definition: %s",pszOutputSRSDef);
+			setMapInMaps(conf,"lenv","message",tmp);
 			return SERVICE_FAILED;
 #else
@@ -752,4 +775,7 @@
                     iLayer );
 #ifdef ZOO_SERVICE
+			char tmp[1024];
+			sprintf(tmp,"Couldn't fetch advertised layer %d!",iLayer);
+			setMapInMaps(conf,"lenv","message",tmp);
 			return SERVICE_FAILED;
 #else
@@ -780,4 +806,7 @@
 
 #ifdef ZOO_SERVICE
+				char tmp[1024];
+				sprintf(tmp,"Terminating translation prematurely after failed of layer %s",poLayer->GetLayerDefn()->GetName() );
+				setMapInMaps(conf,"lenv","message",tmp);
 				return SERVICE_FAILED;
 #else
