Index: /trunk/zoo-api/js/ZOO-proj4js.js
===================================================================
--- /trunk/zoo-api/js/ZOO-proj4js.js	(revision 3)
+++ /trunk/zoo-api/js/ZOO-proj4js.js	(revision 1)
@@ -1,13 +1,25 @@
-/*
-  proj4js.js -- Javascript reprojection library. 
-  
-  Authors:      Mike Adair madairATdmsolutions.ca
-                Richard Greenwood richATgreenwoodmap.com
-                Didier Richard didier.richardATign.fr
-                Stephen Irons
-  License:      LGPL as per: http://www.gnu.org/copyleft/lesser.html 
-                Note: This program is an almost direct port of the C library
-                Proj4.
-*/
+/**
+ * Author : René-Luc D'Hont
+ *
+ * Copyright 2010 3liz SARL. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
 Proj4js={defaultDatum:'WGS84',transform:function(source,dest,point){if(!source.readyToUse||!dest.readyToUse){this.reportError("Proj4js initialization for "+source.srsCode+" not yet complete");return point;}
 if((source.srsProjNumber=="900913"&&dest.datumCode!="WGS84")||(dest.srsProjNumber=="900913"&&source.datumCode!="WGS84")){var wgs84=Proj4js.WGS84;this.transform(source,wgs84,point);source=wgs84;}
Index: /trunk/zoo-kernel/configure.ac
===================================================================
--- /trunk/zoo-kernel/configure.ac	(revision 3)
+++ /trunk/zoo-kernel/configure.ac	(revision 1)
@@ -169,4 +169,5 @@
 # Shouldn't we get python here rather than python2.6 :) ??
 PY_LIB=`$PYTHONCONFIG --libs | sed -e 's/^.*\(python2\..\)$/\1/'`
+echo $PY_LIB
 AC_CHECK_LIB([$PY_LIB], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
 
@@ -320,70 +321,56 @@
 
 AC_ARG_WITH([js], 
-	[AS_HELP_STRING([--with-js=PATH], [specify --with-js to enabled js support or --with-js=path-to-js js support is disabled by default ])], 
+	[AS_HELP_STRING([--with-js=PATH], [specify an alternative directory for spidermonkey installation or --with-js=no to disabled js support])], 
 	[JSHOME="$withval"], [JSHOME=""])
-
-JS_ENABLED=""
-JS_FILE=""
-
-
-if test "$JSHOME" = "yes"
+if test "$JSHOME" != "no";
 then
-	JS_ENABLED="-DUSE_JS"
+        JS_ENABLED="-DUSE_JS"
         JS_FILE="service_internal_js.o"
 
-	#on teste si on est sous debian like 
-	if test -f "/usr/bin/dpkg"
-	then
-		if test -n "`dpkg -l | grep libmozjs-dev`"
-		then
-			JS_CPPFLAGS="-I/usr/include/mozjs/"
-                        JS_LDFLAGS="-L/usr/lib -lmozjs -lm"
-                        JS_LIB="mozjs"
-		else
-			AC_MSG_ERROR([You must install libmozjs-dev or specify your custom install of libjs])
-		fi
-	else
-		JS_LIB="js"
-	fi
+	#if test "x$JSHOME" = "x"; then
+	#	# JS was not specified, so search within the current path
+#		# AC_PATH_PROG([JSCONFIG], [js-config])
+#	
+#		# If we couldn't find js-config, display a warning
+#		if test "x$JSHOME" = "x"; then
+#			AC_MSG_ERROR([could not find js-config from libpython within the current path. You may need to try re-running configure with a --with-js parameter.])
+#		fi
+#	else
+#		# JS was specified; display a message to the user
+#		if test "x$JSHOME" = "xyes"; then
+#			AC_MSG_ERROR([you must specify a parameter to --with-js, e.g. --with-js=/path/to/js])
+#		else
+#			if test -f $JSHOME; then
+#			AC_MSG_RESULT([Using user-specified js-config file: $JSCONFIG])
+#			else
+#				AC_MSG_ERROR([the user-specified js-config file $JSCONFIG does not exist])
+#			fi	
+#		fi
+#	fi
+
+
+	# Extract the linker and include flags 
+	JS_CPPFLAGS="-I$JSHOME/include"
+	JS_LDFLAGS="-L$JSHOME/lib -ljs -lm"
+	# Check headers file
+	CPPFLAGS_SAVE="$CPPFLAGS"
+	CPPFLAGS="$JS_CPPFLAGS"
+	#AC_CHECK_HEADERS([jsapi.h],
+	#		 [], [AC_MSG_ERROR([could not find headers include related to libjs])])
+
+	# Ensure we can link against libjs
+	LIBS_SAVE="$LIBS"
+	LIBS="$JS_LDFLAGS"
 	
-
-	CPPFLAGS_SAVE="$CPPFLAGS"
-        CPPFLAGS="$JS_CPPFLAGS"
-        #AC_CHECK_HEADERS([jsapi.h],
-        #                [], [AC_MSG_ERROR([could not find headers include related to libjs])])
-
-        # Ensure we can link against libjs
-        LIBS_SAVE="$LIBS"
-        LIBS="$JS_LDFLAGS"
-
-        AC_CHECK_LIB([$JS_LIB], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], [])
-
-        AC_SUBST([JS_CPPFLAGS])
-        AC_SUBST([JS_LDFLAGS])
-
-
-else if test  "$JSHOME" != ""
-	then 
-		JS_ENABLED="-DUSE_JS"
-        	JS_FILE="service_internal_js.o"
-		JS_CPPFLAGS="-I$JSHOME/include"
-                JS_LDFLAGS="-L$JSHOME/lib -ljs -lm"
-                JS_LIB="js"
-
-		CPPFLAGS_SAVE="$CPPFLAGS"
-        	CPPFLAGS="$JS_CPPFLAGS"
-        	#AC_CHECK_HEADERS([jsapi.h],
-        	#                [], [AC_MSG_ERROR([could not find headers include related to libjs])])
-
-        	# Ensure we can link against libjs
-        	LIBS_SAVE="$LIBS"
-        	LIBS="$JS_LDFLAGS"
-
-        	AC_CHECK_LIB([$JS_LIB], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], [])
-
-        	AC_SUBST([JS_CPPFLAGS])
-        	AC_SUBST([JS_LDFLAGS])
-	fi
-fi
+	AC_CHECK_LIB([js], [JS_CallFunctionName], [], [AC_MSG_ERROR([could not find libjs])], [])
+
+	AC_SUBST([JS_CPPFLAGS])
+	AC_SUBST([JS_LDFLAGS])
+
+else
+        JS_ENABLED=""
+        JS_FILE=""
+fi
+
 AC_SUBST([JS_ENABLED])
 AC_SUBST([JS_FILE])
Index: /trunk/zoo-kernel/zoo_service_loader.c
===================================================================
--- /trunk/zoo-kernel/zoo_service_loader.c	(revision 3)
+++ /trunk/zoo-kernel/zoo_service_loader.c	(revision 1)
@@ -1392,9 +1392,7 @@
 	  charxxxToMaps((char***)&outputs[0],&request_output_real_format);
 	}else{
-#ifdef WIN32
 	  errstr = GetLastError();
 #ifdef DEBUG
 	  fprintf(stderr,"Function %s failed to load because of %d\n",r_inputs->value,errstr);
-#endif
 #endif
 	  r_inputs=getMap(request_inputs,"Identifier");
