Index: trunk/zoo-project/zoo-kernel/configure.ac
===================================================================
--- trunk/zoo-project/zoo-kernel/configure.ac	(revision 637)
+++ trunk/zoo-project/zoo-kernel/configure.ac	(revision 640)
@@ -51,4 +51,310 @@
 AC_SUBST([CGI_DIR])
 
+
+# ===========================================================================
+# Detect if libyaml is available
+# ===========================================================================
+
+AC_ARG_WITH([yaml],
+        [AS_HELP_STRING([--with-yaml=PATH], [specify an alternative location for the yaml library])],
+        [YAMLPATH="$withval"], [YAMLPATH=""])
+
+if test -z "$YAMLPATH"
+then
+	YAML_LDFLAGS=""
+	YAML_CPPFLAGS=""
+	YAML_FILE=""
+	YAML_FILE1=""
+else
+
+	# Extract the linker and include flags
+	YAML_LDFLAGS="-L$YAMLPATH/lib -lyaml"
+	YAML_CPPFLAGS="-I$YAMLPATH/include -DYAML"
+	YAML_FILE="service_yaml.o"
+	YAML_FILE1="zcfg2yaml"
+	
+	# Check headers file
+	CPPFLAGS_SAVE="$CPPFLAGS"
+	CPPFLAGS="$YAML_CPPFLAGS"
+	LIBS_SAVE="$LIBS"
+	LIBS="$YAML_LDFLAGS"
+	AC_CHECK_LIB([yaml], [yaml_parser_initialize,yaml_parser_set_input_file,yaml_parser_scan])
+	AC_CHECK_HEADERS([yaml.h],
+                 [], [AC_MSG_ERROR([could not find headers include related to YAML])])
+	LIBS="$LIBS_SAVE"
+fi
+AC_SUBST([YAML_CPPFLAGS])
+AC_SUBST([YAML_LDFLAGS])
+AC_SUBST([YAML_FILE])
+AC_SUBST([YAML_FILE1])
+
+# ===========================================================================
+# Detect if fastcgi is available
+# ===========================================================================
+
+AC_ARG_WITH([fastcgi],
+        [AS_HELP_STRING([--with-fastcgi=PATH], [specify an alternative location for the fastcgi library])],
+        [FCGIPATH="$withval"], [FCGIPATH="/usr"])
+
+# Extract the linker and include flags
+FCGI_LDFLAGS="-L$FCGIPATH/lib"
+FCGI_CPPFLAGS="-I$FCGIPATH/include"
+
+# Check headers file
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$FCGI_CPPFLAGS"
+LIBS_SAVE="$LIBS"
+LIBS="$FCGI_LDFLAGS"
+AC_CHECK_LIB([fcgi], [main])
+AC_CHECK_HEADERS([fcgi_stdio.h],
+                 [], [AC_MSG_ERROR([could not find headers include related to fastcgi])])
+LIBS="$LIBS_SAVE"
+AC_SUBST([FCGI_CPPFLAGS])
+AC_SUBST([FCGI_LDFLAGS])
+
+# ===========================================================================
+# Detect if libxml2 is installed
+# ===========================================================================
+
+AC_ARG_WITH([xml2config], 
+	[AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])], 
+	[XML2CONFIG="$withval"], [XML2CONFIG=""])
+
+if test "x$XML2CONFIG" = "x"; then
+	# XML2CONFIG was not specified, so search within the current path
+	AC_PATH_PROG([XML2CONFIG], [xml2-config])
+
+	# If we couldn't find xml2-config, display a warning
+	if test "x$XML2CONFIG" = "x"; then
+		AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.])
+	fi
+else
+	# XML2CONFIG was specified; display a message to the user
+	if test "x$XML2CONFIG" = "xyes"; then
+		AC_MSG_ERROR([you must specify a parameter to --with-xml2config, e.g. --with-xml2config=/path/to/xml2-config])
+	else
+		if test -f $XML2CONFIG; then
+			AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG])
+		else
+			AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist])
+		fi	
+	fi
+fi
+
+# Extract the linker and include flags 
+XML2_LDFLAGS=`$XML2CONFIG --libs`
+XML2_CPPFLAGS=`$XML2CONFIG --cflags`
+
+# Check headers file
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$XML2_CPPFLAGS"
+AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h],
+		 [], [AC_MSG_ERROR([could not find headers include related to libxml2])])
+
+# Ensure we can link against libxml2
+LIBS_SAVE="$LIBS"
+LIBS="$XML2_LDFLAGS"
+AC_CHECK_LIB([xml2], [xmlInitParser], [], [AC_MSG_ERROR([could not find libxml2])], [])
+
+AC_SUBST([XML2_CPPFLAGS])
+AC_SUBST([XML2_LDFLAGS])
+LIBS="$LIBS_SAVE"
+
+
+# ===========================================================================
+# Detect if libxslt is installed
+# ===========================================================================
+
+AC_ARG_WITH([xsltconfig], 
+	[AS_HELP_STRING([--with-xsltconfig=FILE], [specify an alternative xslt-config file])], 
+	[XSLTCONFIG="$withval"], [XSLTCONFIG=""])
+
+if test "x$XSLTCONFIG" = "x"; then
+	# XSLTCONFIG was not specified, so search within the current path
+	AC_PATH_PROG([XSLTCONFIG], [xslt-config])
+
+	# If we couldn't find xslt-config, display a warning
+	if test "x$XSLTCONFIG" = "x"; then
+		AC_MSG_ERROR([could not find xslt-config from libxslt within the current path. You may need to try re-running configure with a --with-xtltconfig parameter.])
+	fi
+else
+	# XSLTCONFIG was specified; display a message to the user
+	if test "x$XSLTCONFIG" = "xyes"; then
+		AC_MSG_ERROR([you must specify a parameter to --with-xsltconfig, e.g. --with-xsltconfig=/path/to/xslt-config])
+	else
+		if test -f $XSLTCONFIG; then
+			AC_MSG_RESULT([Using user-specified xslt-config file: $XSLTCONFIG])
+		else
+			AC_MSG_ERROR([the user-specified xslt-config file $XSLTCONFIG does not exist])
+		fi	
+	fi
+fi
+
+# Extract the linker and include flags 
+XSLT_LDFLAGS=`$XSLTCONFIG --libs`
+XSLT_CPPFLAGS=`$XSLTCONFIG --cflags`
+
+# Check headers file
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$XSLT_CPPFLAGS"
+AC_CHECK_HEADERS([libxslt/xslt.h libxslt/xsltInternals.h libxslt/transform.h libxslt/xsltutils.h],
+		 [], [AC_MSG_ERROR([could not find headers include related to libxlst])])
+
+AC_SUBST([XSLT_CPPFLAGS])
+AC_SUBST([XSLT_LDFLAGS])
+
+#============================================================================
+# Detect if gdal is installed
+#============================================================================
+
+AC_ARG_WITH([gdal-config], 
+	[AS_HELP_STRING([--with-gdal-config=FILE], [specify an alternative gdal-config file])], 
+	[GDAL_CONFIG="$withval"], [GDAL_CONFIG=""])
+if test -z $GDAL_CONFIG;
+then
+	AC_PATH_PROG([GDAL_CONFIG], [gdal-config])
+	if test -z $GDAL_CONFIG; 
+	then
+		AC_MSG_ERROR([could not find gdal-config from libgdal within the current path. You may need to try re-running configure with a --with-gdal-config parameter.])
+	fi
+	
+else
+	if test -f $GDAL_CONFIG; then
+		AC_MSG_RESULT([Using user-specified gdal-config file: $GDAL_CONFIG])
+	else
+		AC_MSG_ERROR([the user-specified gdal-config file $GDAL_CONFIG does not exist])
+	fi
+fi
+
+GDAL_CFLAGS="`$GDAL_CONFIG --cflags`"
+GDAL_LIBS="`$GDAL_CONFIG --libs`"
+
+AC_SUBST([GDAL_CFLAGS])
+AC_SUBST([GDAL_LIBS])
+
+# ===========================================================================
+# Detect if proj is installed
+# ===========================================================================
+
+AC_ARG_WITH([proj],
+        [AS_HELP_STRING([--with-proj=PATH], [specify an alternative location for PROJ4 setup])],
+        [PROJPATH="$withval"], [PROJPATH=""])
+
+# Extract the linker and include flags
+PROJ_LDFLAGS="-L$PROJPATH/lib"
+PROJ_CPPFLAGS="-I$PROJPATH/include"
+
+# Check headers file
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$PROJ_CPPFLAGS"
+AC_CHECK_HEADERS([proj_api.h],
+                 [], [AC_MSG_ERROR([could not find headers include related to PROJ4])])
+
+AC_SUBST([PROJ_CPPFLAGS])
+AC_SUBST([PROJ_LDFLAGS])
+
+# ===========================================================================
+# Detect if libgeos is installed
+# ===========================================================================
+
+AC_ARG_WITH([geosconfig], 
+	[AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], 
+	[GEOSCONFIG="$withval"], [GEOSCONFIG=""])
+
+if test "x$GEOSCONFIG" = "x"; then
+	# GEOSCONFIG was not specified, so search within the current path
+	AC_PATH_PROG([GEOSCONFIG], [geos-config])
+
+	# If we couldn't find geos-config, display a warning
+	if test "x$GEOSCONFIG" = "x"; then
+		AC_MSG_WARN([could not find geos-config from libgeos within the current path. You may need to try re-running configure with a --with-geosconfig parameter.])
+	fi
+else
+	# GEOSCONFIG was specified; display a message to the user
+	if test "x$GEOSCONFIG" = "xyes"; then
+		AC_MSG_WARN([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config])
+	else
+		if test -f $GEOSCONFIG; then
+			AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG])
+		else
+			AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist])
+		fi	
+	fi
+fi
+
+GEOS_LDFLAGS=`$GEOSCONFIG --libs`
+GEOS_CPPFLAGS=`$GEOSCONFIG --cflags`
+
+# Check headers file
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$GEOS_CPPFLAGS"
+AC_CHECK_HEADERS([geos_c.h],
+		 [], [AC_MSG_WARN([could not find headers include related to libgeos])])
+
+AC_SUBST([GEOS_CPPFLAGS])
+AC_SUBST([GEOS_LDFLAGS])
+
+
+# ===========================================================================
+# Detect if cgal is installed
+# ===========================================================================
+
+AC_ARG_WITH([cgal],
+        [AS_HELP_STRING([--with-cgal=PATH], [specify an alternative location for CGAL setup])],
+        [CGALPATH="$withval"], [CGALPATH="/usr"])
+
+
+# Check headers file
+CPPFLAGS_SAVE="$CPPFLAGS"
+CPPFLAGS="$CGAL_CPPFLAGS"
+AC_CHECK_HEADERS([CGAL/Delaunay_triangulation_2.h],
+         [], [AC_MSG_WARN([could not find headers include related to libCGAL])])
+
+# Extract the linker and include flags
+CGAL_LDFLAGS="-L$CGALPATH/lib"
+CGAL_CPPFLAGS="-I$CGALPATH/include"
+
+
+AC_SUBST([CGAL_CPPFLAGS])
+AC_SUBST([CGAL_LDFLAGS])
+#============================================================================
+# Detect if mapserver is installed
+#============================================================================
+
+AC_ARG_WITH([mapserver], 
+       [AS_HELP_STRING([--with-mapserver=PATH], [specify the path for MapServer compiled source tree])], 
+       [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""])
+
+if test -z $MS_SRC_PATH;
+then
+	MS_CPPFLAGS=""
+	MS_LDFLAGS=""
+else
+       if test "x$MS_SRC_PATH" = "xmacos";
+       then
+               MS_LDFLAGS="/Library/Frameworks/MapServer.framework//Versions/6.0/MapServer -lintl"
+               MS_CPPFLAGS="-DUSE_MS `/Library/Frameworks/MapServer.framework/Programs/mapserver-config --includes` -I/Library/Frameworks/MapServer.framework/Versions/Current/Headers/ -I../mapserver "
+               AC_MSG_WARN([Please make sure that ../mapserver exists and contains MapServer source tree])
+               AC_MSG_RESULT([Using MacOS X Framework for MapServer])
+       else
+               if test -d $MS_SRC_PATH; then
+                       MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`"
+                       MS_CPPFLAGS="-DUSE_MS `$MS_SRC_PATH/mapserver-config --includes` `$MS_SRC_PATH/mapserver-config --cflags` -I$MS_SRC_PATH "
+               
+                       AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH])
+               else
+                       AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist])
+               fi
+       fi
+       MS_FILE="service_internal_ms.o"
+fi
+
+MS_CFLAGS="$MS_CPPFLAGS"
+MS_LIBS="$MS_LDFLAGS"
+
+AC_SUBST([MS_CFLAGS])
+AC_SUBST([MS_LIBS])
+AC_SUBST([MS_FILE])
+
 # ===========================================================================
 # Detect if python is installed
@@ -100,4 +406,5 @@
 	AC_SUBST([PYTHON_CPPFLAGS])
 	AC_SUBST([PYTHON_LDFLAGS])
+	LIBS="$LIBS_SAVE"
 fi
 
@@ -151,14 +458,15 @@
 	CPPFLAGS_SAVE="$CPPFLAGS"
         CPPFLAGS="$JS_CPPFLAGS"
-
-	#AC_CHECK_HEADERS([jsapi.h],
-        #                [], [AC_MSG_ERROR([could not find headers include related to libjs])])
-
-	
+	AC_LANG_PUSH([C++])
+	AC_CHECK_HEADERS([jsapi.h],
+                        [], [AC_MSG_ERROR([could not find headers include related to libjs])])
+
+	AC_LANG_POP([C++])
 	LIBS_SAVE="$LIBS"
         LIBS="$JS_LDFLAGS"
 
         AC_CHECK_LIB([$JS_LIB], [JS_CompileFile,JS_CallFunctionName], [], [AC_MSG_ERROR([could not find $JS_LIB])], [])
-			
+	LIBS="$LIBS_SAVE"
+	
         AC_SUBST([JS_CPPFLAGS])
         AC_SUBST([JS_LDFLAGS])
@@ -206,4 +514,5 @@
 	# Shouldn't we get php here rather than php5 :) ??
 	AC_CHECK_LIB([php5], [call_user_function], [], [AC_MSG_ERROR([could not find libphp])], [])
+	LIBS="$LIBS_SAVE"
 	AC_SUBST([PHP_CPPFLAGS])
 	AC_SUBST([PHP_LDFLAGS])
@@ -264,4 +573,5 @@
 		AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [], [AC_MSG_ERROR([could not find libjvm])], [])
 	fi
+	LIBS="$LIBS_SAVE"
 
 	AC_SUBST([JAVA_CPPFLAGS])
@@ -304,4 +614,5 @@
 	LIBS="$RUBY_LDFLAGS"
 	# AC_CHECK_LIB([lruby], [PyObject_CallObject], [], [AC_MSG_ERROR([could not find libpython])], [])
+	LIBS="$LIBS_SAVE"
 	AC_SUBST([RUBY_CPPFLAGS])
 	AC_SUBST([RUBY_LDFLAGS])
@@ -387,8 +698,15 @@
 	CPPFLAGS="$OTB_CPPFLAGS"
 	LDFLAGS_SAVE="$LDFLAGS"
-	LDFLAGS="$OTB_LDFLAGS"
+	LIBS="$LIBS_SAVE $OTB_LDFLAGS"
 	AC_CHECK_HEADERS([otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h],
 			[], [AC_MSG_ERROR([could not find header file $i related to OTB])])
 	AC_LANG_POP([C++])
+	AC_LANG(C++)
+	LDFLAGS_SAVE="$LDFLAGS"
+	LDFLAGS="$OTB_LDFLAGS"
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "otbWrapperApplication.h"],[std::vector<std::string> list = otb::Wrapwper::ApplicationRegistry::GetAvailableApplication();]])],
+		[AC_MSG_RESULT([checking for GetAvailableApplication... yes])],[AC_MSG_ERROR([checking for GetAvailableApplication... failed])])
+	LDFLAGS="$LDFLAGS_SAVE"
+			
 fi
 AC_SUBST([OTB_CPPFLAGS])
@@ -435,9 +753,9 @@
 	LIBS_SAVE="$LIBS"
 	LIBS="$SAGA_LDFLAGS"
-	AC_MSG_RESULT(CPPFLAGS are $CPPFLAGS)
 	AC_CHECK_HEADERS([module_library.h],
 			[], [AC_MSG_ERROR([could not find header file $i related to SAGA-GIS])])
-	LIBS_SAVE="$LIBS"
-	AC_CHECK_LIB([saga_api], [SG_Set_UI_Callback,SG_Get_Module_Library_Manager])
+	AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "module_library.h"],[SG_Get_Module_Library_Manager();]])],
+		[AC_MSG_RESULT([checking for SG_Get_Module_Library_Manager... yes])],[AC_MSG_ERROR([checking for SG_Get_Module_Library_Manager... failed])])
+	LIBS="$LIBS_SAVE"
 	AC_LANG_POP([C++])
 fi
@@ -447,308 +765,4 @@
 AC_SUBST([SAGA_ENABLED])
 
-# ===========================================================================
-# Detect if libyaml is available
-# ===========================================================================
-
-AC_ARG_WITH([yaml],
-        [AS_HELP_STRING([--with-yaml=PATH], [specify an alternative location for the yaml library])],
-        [YAMLPATH="$withval"], [YAMLPATH=""])
-
-if test -z "$YAMLPATH"
-then
-	YAML_LDFLAGS=""
-	YAML_CPPFLAGS=""
-	YAML_FILE=""
-	YAML_FILE1=""
-else
-
-	# Extract the linker and include flags
-	YAML_LDFLAGS="-L$YAMLPATH/lib -lyaml"
-	YAML_CPPFLAGS="-I$YAMLPATH/include -DYAML"
-	YAML_FILE="service_yaml.o"
-	YAML_FILE1="zcfg2yaml"
-	
-	# Check headers file
-	CPPFLAGS_SAVE="$CPPFLAGS"
-	CPPFLAGS="$YAML_CPPFLAGS"
-	LIBS_SAVE="$LIBS"
-	LIBS="$YAML_LDFLAGS"
-	AC_CHECK_LIB([yaml], [yaml_parser_initialize,yaml_parser_set_input_file,yaml_parser_scan])
-	AC_CHECK_HEADERS([yaml.h],
-                 [], [AC_MSG_ERROR([could not find headers include related to YAML])])
-	LIBS="$LIBS_SAVE"
-fi
-AC_SUBST([YAML_CPPFLAGS])
-AC_SUBST([YAML_LDFLAGS])
-AC_SUBST([YAML_FILE])
-AC_SUBST([YAML_FILE1])
-
-# ===========================================================================
-# Detect if fastcgi is available
-# ===========================================================================
-
-AC_ARG_WITH([fastcgi],
-        [AS_HELP_STRING([--with-fastcgi=PATH], [specify an alternative location for the fastcgi library])],
-        [FCGIPATH="$withval"], [FCGIPATH="/usr"])
-
-# Extract the linker and include flags
-FCGI_LDFLAGS="-L$FCGIPATH/lib"
-FCGI_CPPFLAGS="-I$FCGIPATH/include"
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$FCGI_CPPFLAGS"
-LIBS_SAVE="$LIBS"
-LIBS="$FCGI_LDFLAGS"
-AC_CHECK_LIB([fcgi], [main])
-AC_CHECK_HEADERS([fcgi_stdio.h],
-                 [], [AC_MSG_ERROR([could not find headers include related to fastcgi])])
-LIBS="$LIBS_SAVE"
-AC_SUBST([FCGI_CPPFLAGS])
-AC_SUBST([FCGI_LDFLAGS])
-
-
-# ===========================================================================
-# Detect if libxml2 is installed
-# ===========================================================================
-
-AC_ARG_WITH([xml2config], 
-	[AS_HELP_STRING([--with-xml2config=FILE], [specify an alternative xml2-config file])], 
-	[XML2CONFIG="$withval"], [XML2CONFIG=""])
-
-if test "x$XML2CONFIG" = "x"; then
-	# XML2CONFIG was not specified, so search within the current path
-	AC_PATH_PROG([XML2CONFIG], [xml2-config])
-
-	# If we couldn't find xml2-config, display a warning
-	if test "x$XML2CONFIG" = "x"; then
-		AC_MSG_ERROR([could not find xml2-config from libxml2 within the current path. You may need to try re-running configure with a --with-xml2config parameter.])
-	fi
-else
-	# XML2CONFIG was specified; display a message to the user
-	if test "x$XML2CONFIG" = "xyes"; then
-		AC_MSG_ERROR([you must specify a parameter to --with-xml2config, e.g. --with-xml2config=/path/to/xml2-config])
-	else
-		if test -f $XML2CONFIG; then
-			AC_MSG_RESULT([Using user-specified xml2-config file: $XML2CONFIG])
-		else
-			AC_MSG_ERROR([the user-specified xml2-config file $XML2CONFIG does not exist])
-		fi	
-	fi
-fi
-
-# Extract the linker and include flags 
-XML2_LDFLAGS=`$XML2CONFIG --libs`
-XML2_CPPFLAGS=`$XML2CONFIG --cflags`
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$XML2_CPPFLAGS"
-AC_CHECK_HEADERS([libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h],
-		 [], [AC_MSG_ERROR([could not find headers include related to libxml2])])
-
-# Ensure we can link against libxml2
-LIBS_SAVE="$LIBS"
-LIBS="$XML2_LDFLAGS"
-AC_CHECK_LIB([xml2], [xmlInitParser], [], [AC_MSG_ERROR([could not find libxml2])], [])
-
-AC_SUBST([XML2_CPPFLAGS])
-AC_SUBST([XML2_LDFLAGS])
-
-# ===========================================================================
-# Detect if libxslt is installed
-# ===========================================================================
-
-AC_ARG_WITH([xsltconfig], 
-	[AS_HELP_STRING([--with-xsltconfig=FILE], [specify an alternative xslt-config file])], 
-	[XSLTCONFIG="$withval"], [XSLTCONFIG=""])
-
-if test "x$XSLTCONFIG" = "x"; then
-	# XSLTCONFIG was not specified, so search within the current path
-	AC_PATH_PROG([XSLTCONFIG], [xslt-config])
-
-	# If we couldn't find xslt-config, display a warning
-	if test "x$XSLTCONFIG" = "x"; then
-		AC_MSG_ERROR([could not find xslt-config from libxslt within the current path. You may need to try re-running configure with a --with-xtltconfig parameter.])
-	fi
-else
-	# XSLTCONFIG was specified; display a message to the user
-	if test "x$XSLTCONFIG" = "xyes"; then
-		AC_MSG_ERROR([you must specify a parameter to --with-xsltconfig, e.g. --with-xsltconfig=/path/to/xslt-config])
-	else
-		if test -f $XSLTCONFIG; then
-			AC_MSG_RESULT([Using user-specified xslt-config file: $XSLTCONFIG])
-		else
-			AC_MSG_ERROR([the user-specified xslt-config file $XSLTCONFIG does not exist])
-		fi	
-	fi
-fi
-
-# Extract the linker and include flags 
-XSLT_LDFLAGS=`$XSLTCONFIG --libs`
-XSLT_CPPFLAGS=`$XSLTCONFIG --cflags`
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$XSLT_CPPFLAGS"
-AC_CHECK_HEADERS([libxslt/xslt.h libxslt/xsltInternals.h libxslt/transform.h libxslt/xsltutils.h],
-		 [], [AC_MSG_ERROR([could not find headers include related to libxlst])])
-
-AC_SUBST([XSLT_CPPFLAGS])
-AC_SUBST([XSLT_LDFLAGS])
-
-#============================================================================
-# Detect if gdal is installed
-#============================================================================
-
-AC_ARG_WITH([gdal-config], 
-	[AS_HELP_STRING([--with-gdal-config=FILE], [specify an alternative gdal-config file])], 
-	[GDAL_CONFIG="$withval"], [GDAL_CONFIG=""])
-if test -z $GDAL_CONFIG;
-then
-	AC_PATH_PROG([GDAL_CONFIG], [gdal-config])
-	if test -z $GDAL_CONFIG; 
-	then
-		AC_MSG_ERROR([could not find gdal-config from libgdal within the current path. You may need to try re-running configure with a --with-gdal-config parameter.])
-	fi
-	
-else
-	if test -f $GDAL_CONFIG; then
-		AC_MSG_RESULT([Using user-specified gdal-config file: $GDAL_CONFIG])
-	else
-		AC_MSG_ERROR([the user-specified gdal-config file $GDAL_CONFIG does not exist])
-	fi
-fi
-
-GDAL_CFLAGS="`$GDAL_CONFIG --cflags`"
-GDAL_LIBS="`$GDAL_CONFIG --libs`"
-
-AC_SUBST([GDAL_CFLAGS])
-AC_SUBST([GDAL_LIBS])
-
-# ===========================================================================
-# Detect if proj is installed
-# ===========================================================================
-
-AC_ARG_WITH([proj],
-        [AS_HELP_STRING([--with-proj=PATH], [specify an alternative location for PROJ4 setup])],
-        [PROJPATH="$withval"], [PROJPATH=""])
-
-# Extract the linker and include flags
-PROJ_LDFLAGS="-L$PROJPATH/lib"
-PROJ_CPPFLAGS="-I$PROJPATH/include"
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$PROJ_CPPFLAGS"
-AC_CHECK_HEADERS([proj_api.h],
-                 [], [AC_MSG_ERROR([could not find headers include related to PROJ4])])
-
-AC_SUBST([PROJ_CPPFLAGS])
-AC_SUBST([PROJ_LDFLAGS])
-
-# ===========================================================================
-# Detect if libgeos is installed
-# ===========================================================================
-
-AC_ARG_WITH([geosconfig], 
-	[AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], 
-	[GEOSCONFIG="$withval"], [GEOSCONFIG=""])
-
-if test "x$GEOSCONFIG" = "x"; then
-	# GEOSCONFIG was not specified, so search within the current path
-	AC_PATH_PROG([GEOSCONFIG], [geos-config])
-
-	# If we couldn't find geos-config, display a warning
-	if test "x$GEOSCONFIG" = "x"; then
-		AC_MSG_WARN([could not find geos-config from libgeos within the current path. You may need to try re-running configure with a --with-geosconfig parameter.])
-	fi
-else
-	# GEOSCONFIG was specified; display a message to the user
-	if test "x$GEOSCONFIG" = "xyes"; then
-		AC_MSG_WARN([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config])
-	else
-		if test -f $GEOSCONFIG; then
-			AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG])
-		else
-			AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist])
-		fi	
-	fi
-fi
-
-GEOS_LDFLAGS=`$GEOSCONFIG --libs`
-GEOS_CPPFLAGS=`$GEOSCONFIG --cflags`
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$GEOS_CPPFLAGS"
-AC_CHECK_HEADERS([geos_c.h],
-		 [], [AC_MSG_WARN([could not find headers include related to libgeos])])
-
-AC_SUBST([GEOS_CPPFLAGS])
-AC_SUBST([GEOS_LDFLAGS])
-
-
-# ===========================================================================
-# Detect if cgal is installed
-# ===========================================================================
-
-AC_ARG_WITH([cgal],
-        [AS_HELP_STRING([--with-cgal=PATH], [specify an alternative location for CGAL setup])],
-        [CGALPATH="$withval"], [CGALPATH="/usr"])
-
-
-# Check headers file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$CGAL_CPPFLAGS"
-AC_CHECK_HEADERS([CGAL/Delaunay_triangulation_2.h],
-         [], [AC_MSG_WARN([could not find headers include related to libCGAL])])
-
-# Extract the linker and include flags
-CGAL_LDFLAGS="-L$CGALPATH/lib"
-CGAL_CPPFLAGS="-I$CGALPATH/include"
-
-
-AC_SUBST([CGAL_CPPFLAGS])
-AC_SUBST([CGAL_LDFLAGS])
-#============================================================================
-# Detect if mapserver is installed
-#============================================================================
-
-AC_ARG_WITH([mapserver], 
-       [AS_HELP_STRING([--with-mapserver=PATH], [specify the path for MapServer compiled source tree])], 
-       [MS_SRC_PATH="$withval"], [MS_SRC_PATH=""])
-
-if test -z $MS_SRC_PATH;
-then
-	MS_CPPFLAGS=""
-	MS_LDFLAGS=""
-else
-       if test "x$MS_SRC_PATH" = "xmacos";
-       then
-               MS_LDFLAGS="/Library/Frameworks/MapServer.framework//Versions/6.0/MapServer -lintl"
-               MS_CPPFLAGS="-DUSE_MS `/Library/Frameworks/MapServer.framework/Programs/mapserver-config --includes` -I/Library/Frameworks/MapServer.framework/Versions/Current/Headers/ -I../mapserver "
-               AC_MSG_WARN([Please make sure that ../mapserver exists and contains MapServer source tree])
-               AC_MSG_RESULT([Using MacOS X Framework for MapServer])
-       else
-               if test -d $MS_SRC_PATH; then
-                       MS_LDFLAGS="-L$MS_SRC_PATH -lmapserver `$MS_SRC_PATH/mapserver-config --libs`"
-                       MS_CPPFLAGS="-DUSE_MS `$MS_SRC_PATH/mapserver-config --includes` `$MS_SRC_PATH/mapserver-config --cflags` -I$MS_SRC_PATH "
-               
-                       AC_MSG_RESULT([Using user-specified MapServer src path: $MS_SRC_PATH])
-               else
-                       AC_MSG_ERROR([the user-specified mapserver-config file $MS_SRC_PATH does not exist])
-               fi
-       fi
-       MS_FILE="service_internal_ms.o"
-fi
-
-MS_CFLAGS="$MS_CPPFLAGS"
-MS_LIBS="$MS_LDFLAGS"
-
-AC_SUBST([MS_CFLAGS])
-AC_SUBST([MS_LIBS])
-AC_SUBST([MS_FILE])
-
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([ZOOMakefile.opts])
