Index: /trunk/anuga_core/compile_all.py
===================================================================
--- /trunk/anuga_core/compile_all.py	(revision 8696)
+++ /trunk/anuga_core/compile_all.py	(revision 8697)
@@ -63,4 +63,6 @@
 os.chdir('..')
 os.chdir('fit_interpolate')
+subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'rand48.c'])
+subprocess.call([sys.executable, '..' + os.sep + 'utilities' + os.sep + 'compile.py', 'ptinpoly.c'])
 execfile('..' + os.sep + 'utilities' + os.sep + 'compile.py')
 
Index: /trunk/anuga_core/source/anuga/caching/caching.py
===================================================================
--- /trunk/anuga_core/source/anuga/caching/caching.py	(revision 8696)
+++ /trunk/anuga_core/source/anuga/caching/caching.py	(revision 8697)
@@ -939,19 +939,21 @@
   
   # Setup for quad_tree extension
-  from anuga.utilities import compile
-  if compile.can_use_C_extension('quad_tree_ext.c'):
-      import quad_tree_ext
-  else:
-      msg = "C implementation of quad tree extension not avaliable"
-      raise Exception(msg)
+  #from anuga.utilities import compile
+  #if compile.can_use_C_extension('quad_tree_ext.c'):
+  #import quad_tree_ext
+  #else:
+  #    msg = "C implementation of quad tree extension not avaliable"
+  #    raise Exception(msg)
 
   # Setup for sparse_matrix extension
-  from anuga.utilities import compile
-  if compile.can_use_C_extension('sparse_matrix_ext.c'):
-      import sparse_matrix_ext
-  else:
-      msg = "C implementation of sparse_matrix extension not avaliable"
-      raise Exception(msg)
-
+  #from anuga.utilities import compile
+  #if compile.can_use_C_extension('sparse_matrix_ext.c'):
+
+  #else:
+  #    msg = "C implementation of sparse_matrix extension not avaliable"
+  #    raise Exception(msg)
+
+  import anuga.utilities.sparse_matrix_ext as sparse_matrix_ext
+  import anuga.utilities.quad_tree_ext as quad_tree_ext
   from anuga.geometry.aabb import AABB
 
Index: /trunk/anuga_core/source/anuga/fit_interpolate/fit.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/fit.py	(revision 8696)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/fit.py	(revision 8697)
@@ -47,26 +47,26 @@
 
 # Setup for c fitting routines
-from anuga.utilities import compile
-if compile.can_use_C_extension('fitsmooth.c'):
-    import fitsmooth
-else:
-    msg = "C implementation of fitting algorithms (fitsmooth.c) not avalaible"
-    raise Exception(msg)
+#from anuga.utilities import compile
+#if compile.can_use_C_extension('fitsmooth.c'):
+import fitsmooth
+#else:
+#    msg = "C implementation of fitting algorithms (fitsmooth.c) not avalaible"
+#    raise Exception(msg)
 
 # Setup for quad_tree extension
-from anuga.utilities import compile
-if compile.can_use_C_extension('quad_tree_ext.c'):
-    import quad_tree_ext
-else:
-    msg = "C implementation of quad tree extension not avaliable"
-    raise Exception(msg)
+#from anuga.utilities import compile
+#if compile.can_use_C_extension('quad_tree_ext.c'):
+#from anuga.utilities import quad_tree_ext
+#else:
+#    msg = "C implementation of quad tree extension not avaliable"
+#    raise Exception(msg)
 
 # Setup for sparse_matrix extension
-from anuga.utilities import compile
-if compile.can_use_C_extension('sparse_matrix_ext.c'):
-    import sparse_matrix_ext
-else:
-    msg = "C implementation of sparse_matrix extension not avaliable"
-    raise Exception(msg)
+#from anuga.utilities import compile
+#if compile.can_use_C_extension('sparse_matrix_ext.c'):
+#from anuga.utilities import sparse_matrix_ext
+#else:
+#    msg = "C implementation of sparse_matrix extension not avaliable"
+#    raise Exception(msg)
 
 
Index: /trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py
===================================================================
--- /trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py	(revision 8696)
+++ /trunk/anuga_core/source/anuga/pmesh/mesh_quadtree.py	(revision 8697)
@@ -60,10 +60,14 @@
         extents = AABB(*self.mesh.get_extent(absolute=True))
         extents.grow(1.001)  # To avoid round off error
-        extents = [extents.xmin, extents.xmax, extents.ymin, extents.ymax]
-        self.extents = ensure_numeric(extents, num.float)
+        numextents = [extents.xmin, extents.xmax, extents.ymin, extents.ymax]
+        self.extents = num.array(numextents, num.float)
+        #print self.extents
 
     def add_quad_tree(self):
 
         V = self.mesh.get_vertex_coordinates(absolute=True)
+        
+        self.set_extents()
+        #print self.extents
         self.root = fitsmooth.build_quad_tree(self.mesh.triangles, V, self.extents)
 
Index: /trunk/anuga_core/source/anuga/utilities/compile.py
===================================================================
--- /trunk/anuga_core/source/anuga/utilities/compile.py	(revision 8696)
+++ /trunk/anuga_core/source/anuga/utilities/compile.py	(revision 8697)
@@ -302,21 +302,34 @@
   # Make shared library (*.so or *.dll)
   if FN=="fitsmooth.c":
-    if libs is "":
-      s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext)
-    else:
-      s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s "%s" -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext, libs)
+    if sys.platform == 'win32':	  
+      if libs is "":
+        s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s -lm  -fopenmp netcdf.dll' %(loader, sharedflag, object_files, root1, libext)
+      else:
+        s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s "%s" -lm  -fopenmp netcdf.dll' %(loader, sharedflag, object_files, root1, libext, libs)
+    else:    
+      if libs is "":
+        s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s -lm  -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext)
+      else:
+        s = '%s -%s %s ../utilities/quad_tree.o ../utilities/sparse_dok.o ../utilities/sparse_csr.o -o %s.%s "%s" -lm  -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext, libs)
   elif FN=="quad_tree_ext.c":
     if libs is "":
-      s = '%s -%s %s quad_tree.o -o %s.%s -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext)
+      s = '%s -%s %s quad_tree.o -o %s.%s -lm  -fopenmp' %(loader, sharedflag, object_files, root1, libext)
+    else:
+      s = '%s -%s %s quad_tree.o -o %s.%s "%s" -lm  -fopenmp ' %(loader, sharedflag, object_files, root1, libext, libs)       
   elif FN=="sparse_matrix_ext.c":
     if libs is "":
-      s = '%s -%s %s sparse_dok.o -o %s.%s -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext)
-    else:
-      s = '%s -%s %s sparse_dok.o -o %s.%s "%s" -lm -lblas -fopenmp -lnetcdf' %(loader, sharedflag, object_files, root1, libext, libs) 
+      s = '%s -%s %s sparse_dok.o -o %s.%s -lm  -fopenmp ' %(loader, sharedflag, object_files, root1, libext)
+    else:
+      s = '%s -%s %s sparse_dok.o -o %s.%s "%s" -lm  -fopenmp ' %(loader, sharedflag, object_files, root1, libext, libs) 
+  elif FN=="p_test.c":
+    if libs is "":
+      s = '%s -%s %s ptinpoly.o rand48.o -o %s.%s -lm  -fopenmp ' %(loader, sharedflag, object_files, root1, libext)
+    else:
+      s = '%s -%s %s ptinpoly.o rand48.o -o %s.%s "%s" -lm  -fopenmp ' %(loader, sharedflag, object_files, root1, libext, libs) 
   else:
     if libs is "":
-      s = '%s -%s %s -o %s.%s -lm -lblas -fopenmp' %(loader, sharedflag, object_files, root1, libext)
-    else:
-      s = '%s -%s %s -o %s.%s "%s" -lm -lblas -fopenmp' %(loader, sharedflag, object_files, root1, libext, libs)
+      s = '%s -%s %s -o %s.%s -lm  -fopenmp' %(loader, sharedflag, object_files, root1, libext)
+    else:
+      s = '%s -%s %s -o %s.%s "%s" -lm -fopenmp' %(loader, sharedflag, object_files, root1, libext, libs)
   
   
