[Pkg-scicomp-commits] [SCM] MAdLib, a mesh adaptation library. branch, master, updated. debian/1.2.2-1-23-g2ebd255

Christophe Prud'homme prudhomm at debian.org
Sun Oct 11 14:37:39 UTC 2009


The following commit has been merged in the master branch:
commit 85fd05ca15d1a4b98ae0eb431d593585527c62ce
Author: Christophe Prud'homme <prudhomm at debian.org>
Date:   Sun Oct 11 15:45:32 2009 +0200

    Imported Upstream version 1.2.3

diff --git a/Adapt/AdaptInterface.cc b/Adapt/AdaptInterface.cc
index 0bf46d5..7454e53 100644
--- a/Adapt/AdaptInterface.cc
+++ b/Adapt/AdaptInterface.cc
@@ -10,14 +10,39 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
+// from Common
+#include "MAdMessage.h"
+
 #include "AdaptInterface.h"
 #include "MAdResourceManager.h"
 #include "MAdTimeManager.h"
 #include "NodalDataManager.h"
 #include "MAdStatistics.h"
 #include "ModelConstraintManager.h"
-#include "MAdMessage.h"
 #include "History.h"
+#include "SizeFieldManager.h"
+#include "DistanceFunction.h"
+#include "MeshParametersManager.h"
+#include "CallbackManager.h"
+
+// operators
+#include "MAdOperatorBase.h"
+#include "EdgeSplitOp.h"
+#include "EdgeCollapseOp.h"
+#include "FaceCollapseOp.h"
+#include "DESCOp.h"
+#include "EdgeSwapOp.h"
+#include "FaceSwapOp.h"
+#include "VertexMoveOp.h"
+#include "RegionRemoveOp.h"
+#include "SliverFaceHandler.h"
+#include "SliverRegionHandler.h"
+
+// repositioning
+#include "GeoMatcher.h"
+#include "NodesRepositioningOp.h"
+#include "LaplaceSmoothingOp.h"
+#include "MobileObject.h"
 
 // standard C/C++
 #include <iostream>
@@ -121,7 +146,7 @@ namespace MAd {
 
 #ifdef PARALLEL
     load_balance_algorithm = DEFAULT_ALGORITHM;
-    dataExchanger = NULL;
+    dataExchanger = new PWLSFieldDE((PWLSField*) SFManager->getSizeField());
 #endif
 
     updateSFFrequency = 0;
@@ -200,12 +225,21 @@ namespace MAd {
 
   // -------------------------------------------------------------------
   void MeshAdapter::setGeoTracking(bool track, bool cavityEqualMesh, 
-                                   int cavityThickness, double chi)
+                                   int cavityThickness, double chi,
+                                   bool strictChecking, bool forceRelocation)
   {
     if ( track && !geoTracker) {
-      geoTracker = new geoMatcher(mesh);
+      geoTracker = new geoMatcher(mesh,this);
       geoTracker->setCavityEqualMesh(cavityEqualMesh,cavityThickness);
       geoTracker->setStiffnessAlterationCoef(chi);
+      geoTracker->setStrictChecking(strictChecking);
+      geoTracker->setForceRelocation(forceRelocation);
+      if ( !sliverFOp && !sliverROp ) {
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Build sliver handler before setting up geo tracker");
+      }
+      geoTracker->setSliverFaceHandler(sliverFOp);
+      geoTracker->setSliverRegionHandler(sliverROp);
     }
     else if ( !track && geoTracker) { 
       delete geoTracker;
@@ -640,17 +674,17 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
-  bool MeshAdapter::moveVertices (multiset<vDisplacement,vDisplacementLess>& vDisps)
-  {
-    return vMoveOp->move(vDisps);
-  }
+//   bool MeshAdapter::moveVertices (multiset<vDisplacement,vDisplacementLess>& vDisps)
+//   {
+//     return vMoveOp->move(vDisps);
+//   }
 
   // -------------------------------------------------------------------
   // LEVEL 2 OPERATIONS
   // -------------------------------------------------------------------
 
   // -------------------------------------------------------------------
-  double MeshAdapter::LaplaceSmoothing(LaplSmooType type)
+  double MeshAdapter::LaplaceSmoothing()
   {
     MAdResourceManager& tm   = MAdResourceManagerSgl::instance();
     MAdStatistics&  stat = MAdStatisticsSgl ::instance();
@@ -660,11 +694,11 @@ namespace MAd {
     double convergenceCriterion = 1e-2;
     double L2Disp = 0.;
     LaplaceSmoothingOp* laplOp = new LaplaceSmoothingOp(mesh,SFManager->getSizeField());
-    laplOp->run(type,&L2Disp);
+    laplOp->run(&L2Disp);
     double L2Disp0 = L2Disp; int i = 0;
     double L2DispTot = 0.;
     while ( ( L2Disp > convergenceCriterion * L2Disp0 ) && ( L2Disp > MAdTOL ) ) {
-      laplOp->run(type,&L2Disp);
+      laplOp->run(&L2Disp);
       i++;
       L2DispTot += L2Disp;
     }
@@ -920,62 +954,9 @@ namespace MAd {
       MAdResourceManager& tm = MAdResourceManagerSgl::instance();
       double t0 = tm.getTime();
 
-      // --- prepare the node motion ---
-      geoTracker->buildCavity();
-      geoTracker->setDirichletBC();
-      geoTracker->compute();
-
-// #warning "debug"
-//       geoTracker->forceRelocation();
-      
-      // --- perform the node motion ---
-      double ratio = 0.;
-      int achieved = -1;
-      while ( achieved != 2 )
-        {
-          achieved = geoTracker->advance(&ratio,1.e-12);
-          
-          if ( achieved == 0 ) {
-            MAdMsgSgl::instance().warning(-1,__FILE__,
-                                          "Could not advance snapping, achieved: %d, ratio: %f",achieved,ratio);
-          }
-          else {
-            MAdMsgSgl::instance().info(-1,__FILE__,
-                                       "Advance snapping, achieved: %d, ratio: %f",achieved,ratio);
-          }
-          if ( debugLevel >= 4 && !checkTheMesh() )  abort(__LINE__,__FILE__);
-          
-          if ( achieved <= 1 ) {
-            // Apply the operations that do not add vertices or manage their 
-            // target locations (complicated!)
-            bool slivR, slivF;
-            if ( sliverROp ) slivR = sliverROp->getNewVertexPermission();
-            if ( sliverFOp ) slivF = sliverFOp->getNewVertexPermission();
-            if ( sliverROp ) sliverROp->newVertexPermission(false);
-            if ( sliverFOp ) sliverFOp->newVertexPermission(false);
-            if ( !removeSlivers() ) {
-              if ( !optimiseElementShape() ) {
-                string filename = outPrefix + "dirichlet.txt";
-                std::ofstream dirichletOut(filename.c_str());
-                geoTracker->printDirichlet(dirichletOut);
-                dirichletOut.close();
-                filename = outPrefix + "relocations.txt";
-                std::ofstream relocationsOut(filename.c_str());
-                geoTracker->printRelocations(relocationsOut);
-                relocationsOut.close();
-                MAdMsgSgl::instance().warning(__LINE__,__FILE__,
-                                            "Could not snap vertices, ratio reached: %f",ratio);
-                geoTracker->reportFailure(ratio);
-                break;
-              }
-            }
-            if ( sliverROp ) sliverROp->newVertexPermission( slivR );
-            if ( sliverFOp ) sliverFOp->newVertexPermission( slivF );
-            if ( debugLevel >= 4 && !checkTheMesh() )  abort(__LINE__,__FILE__);
-          }
-        }
-      
-      geoTracker->clear();
+      if ( !(geoTracker->snap()) ) {
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,"Snapping failed");
+      }
 
       double dt = tm.getTime() - t0;
       MAdMsgSgl::instance().info(__LINE__,__FILE__,
@@ -1139,7 +1120,8 @@ namespace MAd {
         break;
       case METIS_ALGORITHM:
 #ifdef _HAVE_PARMETIS_
-        BalanceMetis2( mesh, *dataExchanger );
+#warning "Temporary removed calls to load balancing with Metis (bug in it)"
+//         BalanceMetis2( mesh, *dataExchanger );
 #else
         MAdMsgSgl::instance().error(__LINE__,__FILE__,
                                     "Could not balance load: Parmetis not enabled");
@@ -1158,6 +1140,9 @@ namespace MAd {
     }
 #endif
 
+    // --- clean up the mesh by deleting dead elements ---
+    M_clean(mesh);
+
     // --- check the mesh (debug) ---
     if ( debugLevel >= 2 && !checkTheMesh() )  abort(__LINE__,__FILE__);
 
@@ -1281,7 +1266,8 @@ namespace MAd {
     MPI_Barrier(MPI_COMM_WORLD);
     if( load_balance_algorithm != METIS_ALGORITHM ) {   
 #ifdef _HAVE_PARMETIS_ 
-      BalanceMetis2( mesh, *dataExchanger );
+#warning "Temporary removed calls to load balancing with Metis (bug in it)"
+//       BalanceMetis2( mesh, *dataExchanger );
 #endif
     }
 #endif
@@ -1299,10 +1285,10 @@ namespace MAd {
     load_balance_algorithm = lbAlgo;
   }
   // -------------------------------------------------------------------
-  void MeshAdapter::setDataExchanger( MDB_DataExchanger* dataExch )
-  {
-    dataExchanger = dataExch;
-  }
+//   void MeshAdapter::setDataExchanger( MDB_DataExchanger* dataExch )
+//   {
+//     dataExchanger = dataExch;
+//   }
 #endif
 
   // -------------------------------------------------------------------
diff --git a/Adapt/AdaptInterface.h b/Adapt/AdaptInterface.h
index cd19aad..4620a57 100644
--- a/Adapt/AdaptInterface.h
+++ b/Adapt/AdaptInterface.h
@@ -14,41 +14,43 @@
 #ifndef _H_ADAPTINTERFACE
 #define _H_ADAPTINTERFACE
 
-// from Adapt
-#include "MAdOutput.h"
-#include "MobileObject.h"
-#include "MeshParametersManager.h"
-#include "SizeFieldManager.h"
-#include "CallBackManager.h"
-#include "CheckMesh.h"
-#include "GeoMatcher.h"
-
-// from Adapt - operators
-#include "MAdOperatorBase.h"
-#include "EdgeSplitOp.h"
-#include "EdgeCollapseOp.h"
-#include "FaceCollapseOp.h"
-#include "DESCOp.h"
-#include "EdgeSwapOp.h"
-#include "FaceSwapOp.h"
-#include "VertexMoveOp.h"
-#include "RegionRemoveOp.h"
-#include "SliverFaceHandler.h"
-#include "SliverRegionHandler.h"
-#include "NodesRepositioningOp.h"
-#include "LaplaceSmoothingOp.h"
+// from Geo
+#include "ModelInterface.h"
 
 // from Mesh
-#include "MSops.h"
+#include "MeshDataBaseInterface.h"
+#include "CheckMesh.h"
 #ifdef PARALLEL
 #include "MeshDataBaseComm.h"
 #endif
 
+// from Adapt
+#include "MAdOutput.h"
+#include "CallbackDefinition.h"
+
 #include <set>
 #include <string>
+#include <vector>
 
 namespace MAd {
 
+  class SizeFieldManager;
+  class geoMatcher;
+  class mobileObjectSet;
+  class MeshParametersManager;
+  
+  // Local mesh modification operators
+  class edgeSplitOp;
+  class edgeCollapseOp;
+  class faceCollapseOp;
+  class DESCOp;
+  class edgeSwapOp;
+  class faceSwapOp;
+  class vertexMoveOp;
+  class regionRemoveOp;
+  class sliverFaceHandler;
+  class sliverRegionHandler;
+  
   // -------------------------------------------------------------------
 
   enum algorithmDefinition {
@@ -91,7 +93,7 @@ namespace MAd {
     // set load balancing algorithm
     void setLoadBalancingAlgorithm( loadBalanceAlgorithm lbAlgo );
     // set the data Exchanger
-    void setDataExchanger( MDB_DataExchanger* dataExch);
+//     void setDataExchanger( MDB_DataExchanger* dataExch);
 #endif
 
     // impose the interval governing edges length in the transformed space
@@ -123,7 +125,8 @@ namespace MAd {
 
     // tell if you want to project new vertices on geometric entities
     void setGeoTracking(bool enable, bool cavityEqualMesh=false,
-                        int cavityThickness=2, double chi=1.0);
+                        int cavityThickness=2, double chi=1.0,
+                        bool strictChecking=false, bool forceRelocation=false);
 
     // set a value for a very huge edge length (default=1.e14)
     void setInfiniteLength(double length);
@@ -187,13 +190,13 @@ namespace MAd {
     bool removeRegion(pRegion region);
     bool moveVertex (pVertex v, double dxyz[3]);
     bool putVertex (pVertex v, double xyz[3]);
-    bool moveVertices (std::multiset<vDisplacement,vDisplacementLess>& vDisps);
+    //    bool moveVertices (std::multiset<vDisplacement,vDisplacementLess>& vDisps);
 
     // ----- Level 2 -----
     // ---> Loops on one elementary operation
 
     // node repositioning
-    double LaplaceSmoothing(LaplSmooType type);
+    double LaplaceSmoothing();
 
     // topology operations
     int eSplitLoop();
diff --git a/Adapt/Makefile b/Adapt/Makefile
deleted file mode 100644
index aee788c..0000000
--- a/Adapt/Makefile
+++ /dev/null
@@ -1,100 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../variables
-
-LIB = ../lib/libMAdAdapt${LIBEXT}
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common\
-       ${DASH}I$(MAdROOT)/Adapt\
-       ${DASH}I$(MAdROOT)/Adapt/constraint\
-       ${DASH}I$(MAdROOT)/Adapt/operator\
-       ${DASH}I$(MAdROOT)/Adapt/output\
-       ${DASH}I$(MAdROOT)/Adapt/quality\
-       ${DASH}I$(MAdROOT)/Adapt/repositioning\
-       ${DASH}I$(MAdROOT)/Adapt/sizeField\
-       ${DASH}I$(MAdROOT)/Adapt/utils
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = AdaptInterface.cc\
-      MeshParametersManager.cc\
-      constraint/Constraint.cc\
-      constraint/ModelConstraintManager.cc\
-      operator/DESCOp.cc\
-      operator/EdgeCollapseOp.cc\
-      operator/EdgeSplitOp.cc\
-      operator/EdgeSwapConfig.cc\
-      operator/EdgeSwapOp.cc\
-      operator/FaceCollapseOp.cc\
-      operator/FaceSwapOp.cc\
-      operator/MAdOperatorBase.cc\
-      operator/OperatorTools.cc\
-      operator/RegionRemoveOp.cc\
-      operator/SliverFaceHandler.cc\
-      operator/SliverRegionHandler.cc\
-      operator/VertexMoveOp.cc\
-      output/MAdOutput.cc\
-      quality/MeanRatioEvaluator.cc\
-      quality/OrientedMeanRatioEvaluator.cc\
-      quality/MeshQualityManager.cc\
-      repositioning/GeoMatcher.cc\
-      repositioning/LaplaceSmoothingOp.cc\
-      repositioning/MAdElasticityOp.cc\
-      repositioning/MobileObject.cc\
-      sizeField/AnalyticalSField.cc\
-      sizeField/AnisoMeshSize.cc\
-      sizeField/DiscreteSF.cc\
-      sizeField/IsoMeshSize.cc\
-      sizeField/LocalSizeField.cc\
-      sizeField/MeshSizeBase.cc\
-      sizeField/NullSField.cc\
-      sizeField/PWLinearSField.cc\
-      sizeField/SizeFieldBase.cc\
-      sizeField/SizeFieldManager.cc\
-      utils/CallBackManager.cc\
-      utils/History.cc\
-      utils/MAdStatistics.cc\
-      utils/MAdTimeManager.cc\
-      utils/NodalDataManager.cc\
-      utils/DistanceFunction.cc\
-      ../Contrib/mathex/mathex.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${LIB}: ${OBJ} 
-	${AR} ${ARFLAGS} ${LIB} ${OBJ}
-	${RANLIB} ${LIB}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} ${MAdLib_TMPDIR}/.
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} */*.o *.o *.obj ../Contrib/mathex/*.o
-
-purge:
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Adapt/Makefile.am b/Adapt/Makefile.am
new file mode 100644
index 0000000..fa87d07
--- /dev/null
+++ b/Adapt/Makefile.am
@@ -0,0 +1,82 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+srcdir = @srcdir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+VPATH = @srcdir@
+
+noinst_LTLIBRARIES = libMAdAdapt.la
+
+CPPFLAGS += ${MAdLib_DEFS}
+
+AM_CPPFLAGS =  ${MAdLib_INCLUDES}\
+  -I$(srcdir)/../Common\
+  -I$(srcdir)/../Geo\
+  -I$(srcdir)/../Mesh\
+  -I${srcdir}/../Contrib/mathex\
+  -I$(srcdir)/constraint\
+  -I$(srcdir)/operator\
+  -I$(srcdir)/output\
+  -I$(srcdir)/quality\
+  -I$(srcdir)/repositioning\
+  -I$(srcdir)/sizeField\
+  -I$(srcdir)/utils
+
+libMAdAdapt_la_SOURCES = \
+  ../Contrib/mathex/mathex.cpp\
+  AdaptInterface.cc\
+  MeshParametersManager.cc\
+  constraint/Constraint.cc\
+  constraint/ModelConstraintManager.cc\
+  operator/DESCOp.cc\
+  operator/EdgeCollapseOp.cc\
+  operator/EdgeSplitOp.cc\
+  operator/EdgeSwapConfig.cc\
+  operator/EdgeSwapOp.cc\
+  operator/FaceCollapseOp.cc\
+  operator/FaceSwapOp.cc\
+  operator/MAdOperatorBase.cc\
+  operator/OperatorTools.cc\
+  operator/RegionRemoveOp.cc\
+  operator/SliverFaceHandler.cc\
+  operator/SliverRegionHandler.cc\
+  operator/VertexMoveOp.cc\
+  output/MAdOutput.cc\
+  quality/MeanRatioEvaluator.cc\
+  quality/OrientedMeanRatioEvaluator.cc\
+  quality/MeshQualityManager.cc\
+  repositioning/GeoMatcher.cc\
+  repositioning/LaplaceSmoothingOp.cc\
+  repositioning/MAdElasticityOp.cc\
+  repositioning/MobileObject.cc\
+  sizeField/AnalyticalSField.cc\
+  sizeField/AnisoMeshSize.cc\
+  sizeField/BackgroundSF.cc\
+  sizeField/DiscreteSF.cc\
+  sizeField/IsoMeshSize.cc\
+  sizeField/LocalSizeField.cc\
+  sizeField/MeshSizeBase.cc\
+  sizeField/NullSField.cc\
+  sizeField/PWLinearSField.cc\
+  sizeField/SizeFieldBase.cc\
+  sizeField/SizeFieldManager.cc\
+  utils/CallbackManager.cc\
+  utils/History.cc\
+  utils/MAdStatistics.cc\
+  utils/MAdTimeManager.cc\
+  utils/NodalDataManager.cc\
+  utils/DistanceFunction.cc
+
+purge:
diff --git a/Adapt/Makefile.in b/Adapt/Makefile.in
new file mode 100644
index 0000000..f23bb23
--- /dev/null
+++ b/Adapt/Makefile.in
@@ -0,0 +1,907 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = Adapt
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libMAdAdapt_la_LIBADD =
+am_libMAdAdapt_la_OBJECTS = mathex.lo AdaptInterface.lo \
+	MeshParametersManager.lo Constraint.lo \
+	ModelConstraintManager.lo DESCOp.lo EdgeCollapseOp.lo \
+	EdgeSplitOp.lo EdgeSwapConfig.lo EdgeSwapOp.lo \
+	FaceCollapseOp.lo FaceSwapOp.lo MAdOperatorBase.lo \
+	OperatorTools.lo RegionRemoveOp.lo SliverFaceHandler.lo \
+	SliverRegionHandler.lo VertexMoveOp.lo MAdOutput.lo \
+	MeanRatioEvaluator.lo OrientedMeanRatioEvaluator.lo \
+	MeshQualityManager.lo GeoMatcher.lo LaplaceSmoothingOp.lo \
+	MAdElasticityOp.lo MobileObject.lo AnalyticalSField.lo \
+	AnisoMeshSize.lo BackgroundSF.lo DiscreteSF.lo IsoMeshSize.lo \
+	LocalSizeField.lo MeshSizeBase.lo NullSField.lo \
+	PWLinearSField.lo SizeFieldBase.lo SizeFieldManager.lo \
+	CallbackManager.lo History.lo MAdStatistics.lo \
+	MAdTimeManager.lo NodalDataManager.lo DistanceFunction.lo
+libMAdAdapt_la_OBJECTS = $(am_libMAdAdapt_la_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libMAdAdapt_la_SOURCES)
+DIST_SOURCES = $(libMAdAdapt_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+VPATH = @srcdir@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@ ${MAdLib_DEFS}
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libMAdAdapt.la
+AM_CPPFLAGS = ${MAdLib_INCLUDES}\
+  -I$(srcdir)/../Common\
+  -I$(srcdir)/../Geo\
+  -I$(srcdir)/../Mesh\
+  -I${srcdir}/../Contrib/mathex\
+  -I$(srcdir)/constraint\
+  -I$(srcdir)/operator\
+  -I$(srcdir)/output\
+  -I$(srcdir)/quality\
+  -I$(srcdir)/repositioning\
+  -I$(srcdir)/sizeField\
+  -I$(srcdir)/utils
+
+libMAdAdapt_la_SOURCES = \
+  ../Contrib/mathex/mathex.cpp\
+  AdaptInterface.cc\
+  MeshParametersManager.cc\
+  constraint/Constraint.cc\
+  constraint/ModelConstraintManager.cc\
+  operator/DESCOp.cc\
+  operator/EdgeCollapseOp.cc\
+  operator/EdgeSplitOp.cc\
+  operator/EdgeSwapConfig.cc\
+  operator/EdgeSwapOp.cc\
+  operator/FaceCollapseOp.cc\
+  operator/FaceSwapOp.cc\
+  operator/MAdOperatorBase.cc\
+  operator/OperatorTools.cc\
+  operator/RegionRemoveOp.cc\
+  operator/SliverFaceHandler.cc\
+  operator/SliverRegionHandler.cc\
+  operator/VertexMoveOp.cc\
+  output/MAdOutput.cc\
+  quality/MeanRatioEvaluator.cc\
+  quality/OrientedMeanRatioEvaluator.cc\
+  quality/MeshQualityManager.cc\
+  repositioning/GeoMatcher.cc\
+  repositioning/LaplaceSmoothingOp.cc\
+  repositioning/MAdElasticityOp.cc\
+  repositioning/MobileObject.cc\
+  sizeField/AnalyticalSField.cc\
+  sizeField/AnisoMeshSize.cc\
+  sizeField/BackgroundSF.cc\
+  sizeField/DiscreteSF.cc\
+  sizeField/IsoMeshSize.cc\
+  sizeField/LocalSizeField.cc\
+  sizeField/MeshSizeBase.cc\
+  sizeField/NullSField.cc\
+  sizeField/PWLinearSField.cc\
+  sizeField/SizeFieldBase.cc\
+  sizeField/SizeFieldManager.cc\
+  utils/CallbackManager.cc\
+  utils/History.cc\
+  utils/MAdStatistics.cc\
+  utils/MAdTimeManager.cc\
+  utils/NodalDataManager.cc\
+  utils/DistanceFunction.cc
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Adapt/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Adapt/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libMAdAdapt.la: $(libMAdAdapt_la_OBJECTS) $(libMAdAdapt_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libMAdAdapt_la_OBJECTS) $(libMAdAdapt_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AdaptInterface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AnalyticalSField.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/AnisoMeshSize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/BackgroundSF.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CallbackManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Constraint.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DESCOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DiscreteSF.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DistanceFunction.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/EdgeCollapseOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/EdgeSplitOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/EdgeSwapConfig.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/EdgeSwapOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/FaceCollapseOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/FaceSwapOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/GeoMatcher.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/History.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/IsoMeshSize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/LaplaceSmoothingOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/LocalSizeField.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdElasticityOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdOperatorBase.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdOutput.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdStatistics.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdTimeManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeanRatioEvaluator.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshParametersManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshQualityManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshSizeBase.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MobileObject.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ModelConstraintManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/NodalDataManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/NullSField.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/OperatorTools.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/OrientedMeanRatioEvaluator.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PWLinearSField.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/RegionRemoveOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SizeFieldBase.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SizeFieldManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SliverFaceHandler.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/SliverRegionHandler.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/VertexMoveOp.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mathex.Plo at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mathex.lo: ../Contrib/mathex/mathex.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT mathex.lo -MD -MP -MF $(DEPDIR)/mathex.Tpo -c -o mathex.lo `test -f '../Contrib/mathex/mathex.cpp' || echo '$(srcdir)/'`../Contrib/mathex/mathex.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/mathex.Tpo $(DEPDIR)/mathex.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='../Contrib/mathex/mathex.cpp' object='mathex.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o mathex.lo `test -f '../Contrib/mathex/mathex.cpp' || echo '$(srcdir)/'`../Contrib/mathex/mathex.cpp
+
+Constraint.lo: constraint/Constraint.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Constraint.lo -MD -MP -MF $(DEPDIR)/Constraint.Tpo -c -o Constraint.lo `test -f 'constraint/Constraint.cc' || echo '$(srcdir)/'`constraint/Constraint.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/Constraint.Tpo $(DEPDIR)/Constraint.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='constraint/Constraint.cc' object='Constraint.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Constraint.lo `test -f 'constraint/Constraint.cc' || echo '$(srcdir)/'`constraint/Constraint.cc
+
+ModelConstraintManager.lo: constraint/ModelConstraintManager.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ModelConstraintManager.lo -MD -MP -MF $(DEPDIR)/ModelConstraintManager.Tpo -c -o ModelConstraintManager.lo `test -f 'constraint/ModelConstraintManager.cc' || echo '$(srcdir)/'`constraint/ModelConstraintManager.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/ModelConstraintManager.Tpo $(DEPDIR)/ModelConstraintManager.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='constraint/ModelConstraintManager.cc' object='ModelConstraintManager.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ModelConstraintManager.lo `test -f 'constraint/ModelConstraintManager.cc' || echo '$(srcdir)/'`constraint/ModelConstraintManager.cc
+
+DESCOp.lo: operator/DESCOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DESCOp.lo -MD -MP -MF $(DEPDIR)/DESCOp.Tpo -c -o DESCOp.lo `test -f 'operator/DESCOp.cc' || echo '$(srcdir)/'`operator/DESCOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/DESCOp.Tpo $(DEPDIR)/DESCOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/DESCOp.cc' object='DESCOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DESCOp.lo `test -f 'operator/DESCOp.cc' || echo '$(srcdir)/'`operator/DESCOp.cc
+
+EdgeCollapseOp.lo: operator/EdgeCollapseOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EdgeCollapseOp.lo -MD -MP -MF $(DEPDIR)/EdgeCollapseOp.Tpo -c -o EdgeCollapseOp.lo `test -f 'operator/EdgeCollapseOp.cc' || echo '$(srcdir)/'`operator/EdgeCollapseOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/EdgeCollapseOp.Tpo $(DEPDIR)/EdgeCollapseOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/EdgeCollapseOp.cc' object='EdgeCollapseOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EdgeCollapseOp.lo `test -f 'operator/EdgeCollapseOp.cc' || echo '$(srcdir)/'`operator/EdgeCollapseOp.cc
+
+EdgeSplitOp.lo: operator/EdgeSplitOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EdgeSplitOp.lo -MD -MP -MF $(DEPDIR)/EdgeSplitOp.Tpo -c -o EdgeSplitOp.lo `test -f 'operator/EdgeSplitOp.cc' || echo '$(srcdir)/'`operator/EdgeSplitOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/EdgeSplitOp.Tpo $(DEPDIR)/EdgeSplitOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/EdgeSplitOp.cc' object='EdgeSplitOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EdgeSplitOp.lo `test -f 'operator/EdgeSplitOp.cc' || echo '$(srcdir)/'`operator/EdgeSplitOp.cc
+
+EdgeSwapConfig.lo: operator/EdgeSwapConfig.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EdgeSwapConfig.lo -MD -MP -MF $(DEPDIR)/EdgeSwapConfig.Tpo -c -o EdgeSwapConfig.lo `test -f 'operator/EdgeSwapConfig.cc' || echo '$(srcdir)/'`operator/EdgeSwapConfig.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/EdgeSwapConfig.Tpo $(DEPDIR)/EdgeSwapConfig.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/EdgeSwapConfig.cc' object='EdgeSwapConfig.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EdgeSwapConfig.lo `test -f 'operator/EdgeSwapConfig.cc' || echo '$(srcdir)/'`operator/EdgeSwapConfig.cc
+
+EdgeSwapOp.lo: operator/EdgeSwapOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT EdgeSwapOp.lo -MD -MP -MF $(DEPDIR)/EdgeSwapOp.Tpo -c -o EdgeSwapOp.lo `test -f 'operator/EdgeSwapOp.cc' || echo '$(srcdir)/'`operator/EdgeSwapOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/EdgeSwapOp.Tpo $(DEPDIR)/EdgeSwapOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/EdgeSwapOp.cc' object='EdgeSwapOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o EdgeSwapOp.lo `test -f 'operator/EdgeSwapOp.cc' || echo '$(srcdir)/'`operator/EdgeSwapOp.cc
+
+FaceCollapseOp.lo: operator/FaceCollapseOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FaceCollapseOp.lo -MD -MP -MF $(DEPDIR)/FaceCollapseOp.Tpo -c -o FaceCollapseOp.lo `test -f 'operator/FaceCollapseOp.cc' || echo '$(srcdir)/'`operator/FaceCollapseOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/FaceCollapseOp.Tpo $(DEPDIR)/FaceCollapseOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/FaceCollapseOp.cc' object='FaceCollapseOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FaceCollapseOp.lo `test -f 'operator/FaceCollapseOp.cc' || echo '$(srcdir)/'`operator/FaceCollapseOp.cc
+
+FaceSwapOp.lo: operator/FaceSwapOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FaceSwapOp.lo -MD -MP -MF $(DEPDIR)/FaceSwapOp.Tpo -c -o FaceSwapOp.lo `test -f 'operator/FaceSwapOp.cc' || echo '$(srcdir)/'`operator/FaceSwapOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/FaceSwapOp.Tpo $(DEPDIR)/FaceSwapOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/FaceSwapOp.cc' object='FaceSwapOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FaceSwapOp.lo `test -f 'operator/FaceSwapOp.cc' || echo '$(srcdir)/'`operator/FaceSwapOp.cc
+
+MAdOperatorBase.lo: operator/MAdOperatorBase.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MAdOperatorBase.lo -MD -MP -MF $(DEPDIR)/MAdOperatorBase.Tpo -c -o MAdOperatorBase.lo `test -f 'operator/MAdOperatorBase.cc' || echo '$(srcdir)/'`operator/MAdOperatorBase.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MAdOperatorBase.Tpo $(DEPDIR)/MAdOperatorBase.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/MAdOperatorBase.cc' object='MAdOperatorBase.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MAdOperatorBase.lo `test -f 'operator/MAdOperatorBase.cc' || echo '$(srcdir)/'`operator/MAdOperatorBase.cc
+
+OperatorTools.lo: operator/OperatorTools.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OperatorTools.lo -MD -MP -MF $(DEPDIR)/OperatorTools.Tpo -c -o OperatorTools.lo `test -f 'operator/OperatorTools.cc' || echo '$(srcdir)/'`operator/OperatorTools.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/OperatorTools.Tpo $(DEPDIR)/OperatorTools.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/OperatorTools.cc' object='OperatorTools.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OperatorTools.lo `test -f 'operator/OperatorTools.cc' || echo '$(srcdir)/'`operator/OperatorTools.cc
+
+RegionRemoveOp.lo: operator/RegionRemoveOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RegionRemoveOp.lo -MD -MP -MF $(DEPDIR)/RegionRemoveOp.Tpo -c -o RegionRemoveOp.lo `test -f 'operator/RegionRemoveOp.cc' || echo '$(srcdir)/'`operator/RegionRemoveOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/RegionRemoveOp.Tpo $(DEPDIR)/RegionRemoveOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/RegionRemoveOp.cc' object='RegionRemoveOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RegionRemoveOp.lo `test -f 'operator/RegionRemoveOp.cc' || echo '$(srcdir)/'`operator/RegionRemoveOp.cc
+
+SliverFaceHandler.lo: operator/SliverFaceHandler.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SliverFaceHandler.lo -MD -MP -MF $(DEPDIR)/SliverFaceHandler.Tpo -c -o SliverFaceHandler.lo `test -f 'operator/SliverFaceHandler.cc' || echo '$(srcdir)/'`operator/SliverFaceHandler.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/SliverFaceHandler.Tpo $(DEPDIR)/SliverFaceHandler.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/SliverFaceHandler.cc' object='SliverFaceHandler.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SliverFaceHandler.lo `test -f 'operator/SliverFaceHandler.cc' || echo '$(srcdir)/'`operator/SliverFaceHandler.cc
+
+SliverRegionHandler.lo: operator/SliverRegionHandler.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SliverRegionHandler.lo -MD -MP -MF $(DEPDIR)/SliverRegionHandler.Tpo -c -o SliverRegionHandler.lo `test -f 'operator/SliverRegionHandler.cc' || echo '$(srcdir)/'`operator/SliverRegionHandler.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/SliverRegionHandler.Tpo $(DEPDIR)/SliverRegionHandler.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/SliverRegionHandler.cc' object='SliverRegionHandler.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SliverRegionHandler.lo `test -f 'operator/SliverRegionHandler.cc' || echo '$(srcdir)/'`operator/SliverRegionHandler.cc
+
+VertexMoveOp.lo: operator/VertexMoveOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT VertexMoveOp.lo -MD -MP -MF $(DEPDIR)/VertexMoveOp.Tpo -c -o VertexMoveOp.lo `test -f 'operator/VertexMoveOp.cc' || echo '$(srcdir)/'`operator/VertexMoveOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/VertexMoveOp.Tpo $(DEPDIR)/VertexMoveOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='operator/VertexMoveOp.cc' object='VertexMoveOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o VertexMoveOp.lo `test -f 'operator/VertexMoveOp.cc' || echo '$(srcdir)/'`operator/VertexMoveOp.cc
+
+MAdOutput.lo: output/MAdOutput.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MAdOutput.lo -MD -MP -MF $(DEPDIR)/MAdOutput.Tpo -c -o MAdOutput.lo `test -f 'output/MAdOutput.cc' || echo '$(srcdir)/'`output/MAdOutput.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MAdOutput.Tpo $(DEPDIR)/MAdOutput.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='output/MAdOutput.cc' object='MAdOutput.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MAdOutput.lo `test -f 'output/MAdOutput.cc' || echo '$(srcdir)/'`output/MAdOutput.cc
+
+MeanRatioEvaluator.lo: quality/MeanRatioEvaluator.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MeanRatioEvaluator.lo -MD -MP -MF $(DEPDIR)/MeanRatioEvaluator.Tpo -c -o MeanRatioEvaluator.lo `test -f 'quality/MeanRatioEvaluator.cc' || echo '$(srcdir)/'`quality/MeanRatioEvaluator.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MeanRatioEvaluator.Tpo $(DEPDIR)/MeanRatioEvaluator.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='quality/MeanRatioEvaluator.cc' object='MeanRatioEvaluator.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MeanRatioEvaluator.lo `test -f 'quality/MeanRatioEvaluator.cc' || echo '$(srcdir)/'`quality/MeanRatioEvaluator.cc
+
+OrientedMeanRatioEvaluator.lo: quality/OrientedMeanRatioEvaluator.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OrientedMeanRatioEvaluator.lo -MD -MP -MF $(DEPDIR)/OrientedMeanRatioEvaluator.Tpo -c -o OrientedMeanRatioEvaluator.lo `test -f 'quality/OrientedMeanRatioEvaluator.cc' || echo '$(srcdir)/'`quality/OrientedMeanRatioEvaluator.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/OrientedMeanRatioEvaluator.Tpo $(DEPDIR)/OrientedMeanRatioEvaluator.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='quality/OrientedMeanRatioEvaluator.cc' object='OrientedMeanRatioEvaluator.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OrientedMeanRatioEvaluator.lo `test -f 'quality/OrientedMeanRatioEvaluator.cc' || echo '$(srcdir)/'`quality/OrientedMeanRatioEvaluator.cc
+
+MeshQualityManager.lo: quality/MeshQualityManager.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MeshQualityManager.lo -MD -MP -MF $(DEPDIR)/MeshQualityManager.Tpo -c -o MeshQualityManager.lo `test -f 'quality/MeshQualityManager.cc' || echo '$(srcdir)/'`quality/MeshQualityManager.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MeshQualityManager.Tpo $(DEPDIR)/MeshQualityManager.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='quality/MeshQualityManager.cc' object='MeshQualityManager.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MeshQualityManager.lo `test -f 'quality/MeshQualityManager.cc' || echo '$(srcdir)/'`quality/MeshQualityManager.cc
+
+GeoMatcher.lo: repositioning/GeoMatcher.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT GeoMatcher.lo -MD -MP -MF $(DEPDIR)/GeoMatcher.Tpo -c -o GeoMatcher.lo `test -f 'repositioning/GeoMatcher.cc' || echo '$(srcdir)/'`repositioning/GeoMatcher.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/GeoMatcher.Tpo $(DEPDIR)/GeoMatcher.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='repositioning/GeoMatcher.cc' object='GeoMatcher.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o GeoMatcher.lo `test -f 'repositioning/GeoMatcher.cc' || echo '$(srcdir)/'`repositioning/GeoMatcher.cc
+
+LaplaceSmoothingOp.lo: repositioning/LaplaceSmoothingOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT LaplaceSmoothingOp.lo -MD -MP -MF $(DEPDIR)/LaplaceSmoothingOp.Tpo -c -o LaplaceSmoothingOp.lo `test -f 'repositioning/LaplaceSmoothingOp.cc' || echo '$(srcdir)/'`repositioning/LaplaceSmoothingOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/LaplaceSmoothingOp.Tpo $(DEPDIR)/LaplaceSmoothingOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='repositioning/LaplaceSmoothingOp.cc' object='LaplaceSmoothingOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o LaplaceSmoothingOp.lo `test -f 'repositioning/LaplaceSmoothingOp.cc' || echo '$(srcdir)/'`repositioning/LaplaceSmoothingOp.cc
+
+MAdElasticityOp.lo: repositioning/MAdElasticityOp.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MAdElasticityOp.lo -MD -MP -MF $(DEPDIR)/MAdElasticityOp.Tpo -c -o MAdElasticityOp.lo `test -f 'repositioning/MAdElasticityOp.cc' || echo '$(srcdir)/'`repositioning/MAdElasticityOp.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MAdElasticityOp.Tpo $(DEPDIR)/MAdElasticityOp.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='repositioning/MAdElasticityOp.cc' object='MAdElasticityOp.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MAdElasticityOp.lo `test -f 'repositioning/MAdElasticityOp.cc' || echo '$(srcdir)/'`repositioning/MAdElasticityOp.cc
+
+MobileObject.lo: repositioning/MobileObject.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MobileObject.lo -MD -MP -MF $(DEPDIR)/MobileObject.Tpo -c -o MobileObject.lo `test -f 'repositioning/MobileObject.cc' || echo '$(srcdir)/'`repositioning/MobileObject.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MobileObject.Tpo $(DEPDIR)/MobileObject.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='repositioning/MobileObject.cc' object='MobileObject.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MobileObject.lo `test -f 'repositioning/MobileObject.cc' || echo '$(srcdir)/'`repositioning/MobileObject.cc
+
+AnalyticalSField.lo: sizeField/AnalyticalSField.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AnalyticalSField.lo -MD -MP -MF $(DEPDIR)/AnalyticalSField.Tpo -c -o AnalyticalSField.lo `test -f 'sizeField/AnalyticalSField.cc' || echo '$(srcdir)/'`sizeField/AnalyticalSField.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/AnalyticalSField.Tpo $(DEPDIR)/AnalyticalSField.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/AnalyticalSField.cc' object='AnalyticalSField.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AnalyticalSField.lo `test -f 'sizeField/AnalyticalSField.cc' || echo '$(srcdir)/'`sizeField/AnalyticalSField.cc
+
+AnisoMeshSize.lo: sizeField/AnisoMeshSize.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT AnisoMeshSize.lo -MD -MP -MF $(DEPDIR)/AnisoMeshSize.Tpo -c -o AnisoMeshSize.lo `test -f 'sizeField/AnisoMeshSize.cc' || echo '$(srcdir)/'`sizeField/AnisoMeshSize.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/AnisoMeshSize.Tpo $(DEPDIR)/AnisoMeshSize.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/AnisoMeshSize.cc' object='AnisoMeshSize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AnisoMeshSize.lo `test -f 'sizeField/AnisoMeshSize.cc' || echo '$(srcdir)/'`sizeField/AnisoMeshSize.cc
+
+BackgroundSF.lo: sizeField/BackgroundSF.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BackgroundSF.lo -MD -MP -MF $(DEPDIR)/BackgroundSF.Tpo -c -o BackgroundSF.lo `test -f 'sizeField/BackgroundSF.cc' || echo '$(srcdir)/'`sizeField/BackgroundSF.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/BackgroundSF.Tpo $(DEPDIR)/BackgroundSF.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/BackgroundSF.cc' object='BackgroundSF.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BackgroundSF.lo `test -f 'sizeField/BackgroundSF.cc' || echo '$(srcdir)/'`sizeField/BackgroundSF.cc
+
+DiscreteSF.lo: sizeField/DiscreteSF.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DiscreteSF.lo -MD -MP -MF $(DEPDIR)/DiscreteSF.Tpo -c -o DiscreteSF.lo `test -f 'sizeField/DiscreteSF.cc' || echo '$(srcdir)/'`sizeField/DiscreteSF.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/DiscreteSF.Tpo $(DEPDIR)/DiscreteSF.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/DiscreteSF.cc' object='DiscreteSF.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DiscreteSF.lo `test -f 'sizeField/DiscreteSF.cc' || echo '$(srcdir)/'`sizeField/DiscreteSF.cc
+
+IsoMeshSize.lo: sizeField/IsoMeshSize.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT IsoMeshSize.lo -MD -MP -MF $(DEPDIR)/IsoMeshSize.Tpo -c -o IsoMeshSize.lo `test -f 'sizeField/IsoMeshSize.cc' || echo '$(srcdir)/'`sizeField/IsoMeshSize.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/IsoMeshSize.Tpo $(DEPDIR)/IsoMeshSize.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/IsoMeshSize.cc' object='IsoMeshSize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o IsoMeshSize.lo `test -f 'sizeField/IsoMeshSize.cc' || echo '$(srcdir)/'`sizeField/IsoMeshSize.cc
+
+LocalSizeField.lo: sizeField/LocalSizeField.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT LocalSizeField.lo -MD -MP -MF $(DEPDIR)/LocalSizeField.Tpo -c -o LocalSizeField.lo `test -f 'sizeField/LocalSizeField.cc' || echo '$(srcdir)/'`sizeField/LocalSizeField.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/LocalSizeField.Tpo $(DEPDIR)/LocalSizeField.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/LocalSizeField.cc' object='LocalSizeField.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o LocalSizeField.lo `test -f 'sizeField/LocalSizeField.cc' || echo '$(srcdir)/'`sizeField/LocalSizeField.cc
+
+MeshSizeBase.lo: sizeField/MeshSizeBase.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MeshSizeBase.lo -MD -MP -MF $(DEPDIR)/MeshSizeBase.Tpo -c -o MeshSizeBase.lo `test -f 'sizeField/MeshSizeBase.cc' || echo '$(srcdir)/'`sizeField/MeshSizeBase.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MeshSizeBase.Tpo $(DEPDIR)/MeshSizeBase.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/MeshSizeBase.cc' object='MeshSizeBase.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MeshSizeBase.lo `test -f 'sizeField/MeshSizeBase.cc' || echo '$(srcdir)/'`sizeField/MeshSizeBase.cc
+
+NullSField.lo: sizeField/NullSField.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NullSField.lo -MD -MP -MF $(DEPDIR)/NullSField.Tpo -c -o NullSField.lo `test -f 'sizeField/NullSField.cc' || echo '$(srcdir)/'`sizeField/NullSField.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/NullSField.Tpo $(DEPDIR)/NullSField.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/NullSField.cc' object='NullSField.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NullSField.lo `test -f 'sizeField/NullSField.cc' || echo '$(srcdir)/'`sizeField/NullSField.cc
+
+PWLinearSField.lo: sizeField/PWLinearSField.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PWLinearSField.lo -MD -MP -MF $(DEPDIR)/PWLinearSField.Tpo -c -o PWLinearSField.lo `test -f 'sizeField/PWLinearSField.cc' || echo '$(srcdir)/'`sizeField/PWLinearSField.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/PWLinearSField.Tpo $(DEPDIR)/PWLinearSField.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/PWLinearSField.cc' object='PWLinearSField.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PWLinearSField.lo `test -f 'sizeField/PWLinearSField.cc' || echo '$(srcdir)/'`sizeField/PWLinearSField.cc
+
+SizeFieldBase.lo: sizeField/SizeFieldBase.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SizeFieldBase.lo -MD -MP -MF $(DEPDIR)/SizeFieldBase.Tpo -c -o SizeFieldBase.lo `test -f 'sizeField/SizeFieldBase.cc' || echo '$(srcdir)/'`sizeField/SizeFieldBase.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/SizeFieldBase.Tpo $(DEPDIR)/SizeFieldBase.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/SizeFieldBase.cc' object='SizeFieldBase.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SizeFieldBase.lo `test -f 'sizeField/SizeFieldBase.cc' || echo '$(srcdir)/'`sizeField/SizeFieldBase.cc
+
+SizeFieldManager.lo: sizeField/SizeFieldManager.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SizeFieldManager.lo -MD -MP -MF $(DEPDIR)/SizeFieldManager.Tpo -c -o SizeFieldManager.lo `test -f 'sizeField/SizeFieldManager.cc' || echo '$(srcdir)/'`sizeField/SizeFieldManager.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/SizeFieldManager.Tpo $(DEPDIR)/SizeFieldManager.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sizeField/SizeFieldManager.cc' object='SizeFieldManager.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SizeFieldManager.lo `test -f 'sizeField/SizeFieldManager.cc' || echo '$(srcdir)/'`sizeField/SizeFieldManager.cc
+
+CallbackManager.lo: utils/CallbackManager.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CallbackManager.lo -MD -MP -MF $(DEPDIR)/CallbackManager.Tpo -c -o CallbackManager.lo `test -f 'utils/CallbackManager.cc' || echo '$(srcdir)/'`utils/CallbackManager.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/CallbackManager.Tpo $(DEPDIR)/CallbackManager.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils/CallbackManager.cc' object='CallbackManager.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CallbackManager.lo `test -f 'utils/CallbackManager.cc' || echo '$(srcdir)/'`utils/CallbackManager.cc
+
+History.lo: utils/History.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT History.lo -MD -MP -MF $(DEPDIR)/History.Tpo -c -o History.lo `test -f 'utils/History.cc' || echo '$(srcdir)/'`utils/History.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/History.Tpo $(DEPDIR)/History.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils/History.cc' object='History.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o History.lo `test -f 'utils/History.cc' || echo '$(srcdir)/'`utils/History.cc
+
+MAdStatistics.lo: utils/MAdStatistics.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MAdStatistics.lo -MD -MP -MF $(DEPDIR)/MAdStatistics.Tpo -c -o MAdStatistics.lo `test -f 'utils/MAdStatistics.cc' || echo '$(srcdir)/'`utils/MAdStatistics.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MAdStatistics.Tpo $(DEPDIR)/MAdStatistics.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils/MAdStatistics.cc' object='MAdStatistics.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MAdStatistics.lo `test -f 'utils/MAdStatistics.cc' || echo '$(srcdir)/'`utils/MAdStatistics.cc
+
+MAdTimeManager.lo: utils/MAdTimeManager.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MAdTimeManager.lo -MD -MP -MF $(DEPDIR)/MAdTimeManager.Tpo -c -o MAdTimeManager.lo `test -f 'utils/MAdTimeManager.cc' || echo '$(srcdir)/'`utils/MAdTimeManager.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/MAdTimeManager.Tpo $(DEPDIR)/MAdTimeManager.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils/MAdTimeManager.cc' object='MAdTimeManager.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o MAdTimeManager.lo `test -f 'utils/MAdTimeManager.cc' || echo '$(srcdir)/'`utils/MAdTimeManager.cc
+
+NodalDataManager.lo: utils/NodalDataManager.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NodalDataManager.lo -MD -MP -MF $(DEPDIR)/NodalDataManager.Tpo -c -o NodalDataManager.lo `test -f 'utils/NodalDataManager.cc' || echo '$(srcdir)/'`utils/NodalDataManager.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/NodalDataManager.Tpo $(DEPDIR)/NodalDataManager.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils/NodalDataManager.cc' object='NodalDataManager.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NodalDataManager.lo `test -f 'utils/NodalDataManager.cc' || echo '$(srcdir)/'`utils/NodalDataManager.cc
+
+DistanceFunction.lo: utils/DistanceFunction.cc
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DistanceFunction.lo -MD -MP -MF $(DEPDIR)/DistanceFunction.Tpo -c -o DistanceFunction.lo `test -f 'utils/DistanceFunction.cc' || echo '$(srcdir)/'`utils/DistanceFunction.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/DistanceFunction.Tpo $(DEPDIR)/DistanceFunction.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='utils/DistanceFunction.cc' object='DistanceFunction.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DistanceFunction.lo `test -f 'utils/DistanceFunction.cc' || echo '$(srcdir)/'`utils/DistanceFunction.cc
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+purge:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Adapt/constraint/Constraint.cc b/Adapt/constraint/Constraint.cc
index 5071c82..fb8e0a9 100644
--- a/Adapt/constraint/Constraint.cc
+++ b/Adapt/constraint/Constraint.cc
@@ -10,11 +10,14 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#include "Constraint.h"
-#include "ModelConstraintManager.h"
+// GC: this should be moved to Mesh/
 
+#include "MeshDataBase.h"
 #include "MeshDataBaseParallelInterface.h"
 
+#include "Constraint.h"
+#include "ModelConstraintManager.h"
+
 static unsigned int CONSTRAIN_MARK_ID = 1687354269;
 
 namespace MAd {
diff --git a/Adapt/operator/DESCOp.cc b/Adapt/operator/DESCOp.cc
index 8ee3a71..6637db2 100644
--- a/Adapt/operator/DESCOp.cc
+++ b/Adapt/operator/DESCOp.cc
@@ -12,6 +12,7 @@
 
 #include "DESCOp.h"
 #include "OperatorTools.h"
+#include "MeshSizeBase.h"
 
 namespace MAd {
 
@@ -167,14 +168,14 @@ namespace MAd {
   void DESCOp::getCavity(pPList * cavity) const
   {
     *cavity = PList_new();
-    PList_append(*cavity,region);
+    PList_append(*cavity,(pEntity)region);
 
     for(int i=0; i<2; i++) {
       pPList eRegs = E_regions(splitE[i]);
       void * iter = NULL;
       for(pRegion pR; ( pR=(pRegion)PList_next(eRegs,&iter) ); ) {
         if( pR != region ) {
-          PList_append(*cavity,pR);
+          PList_append(*cavity,(pEntity)pR);
         }
       }
       PList_delete(eRegs);
diff --git a/Adapt/operator/EdgeCollapseOp.cc b/Adapt/operator/EdgeCollapseOp.cc
index 7268214..3208dfc 100644
--- a/Adapt/operator/EdgeCollapseOp.cc
+++ b/Adapt/operator/EdgeCollapseOp.cc
@@ -13,6 +13,7 @@
 #include "EdgeCollapseOp.h"
 #include "OperatorTools.h"
 #include <map>
+#include <cmath>
 
 using std::map;
 
@@ -62,7 +63,7 @@ namespace MAd {
           void * temp = NULL;
           pFace pf;
           while ( ( pf = (pFace)PList_next(vDelFaces,&temp) ) ) {
-            if ( F_inClosure(pf,edgeDel) ) continue;
+            if ( F_inClosure(pf,(pEntity)edgeDel) ) continue;
             if ( F_whatInType(pf) == 2 ) {
               oppE           = F_vtOpEd(pf,vDel);
               newSurfaceFace = F_exist(oppE,vTgt);
diff --git a/Adapt/operator/EdgeSplitOp.h b/Adapt/operator/EdgeSplitOp.h
index fa0becb..0d6cf72 100644
--- a/Adapt/operator/EdgeSplitOp.h
+++ b/Adapt/operator/EdgeSplitOp.h
@@ -15,6 +15,7 @@
 #define _H_EDGESPLITOP
 
 #include "MAdOperatorBase.h"
+#include "MeshSizeBase.h"
 
 namespace MAd {
 
diff --git a/Adapt/operator/EdgeSwapOp.cc b/Adapt/operator/EdgeSwapOp.cc
index 8cb975d..78aa3ad 100644
--- a/Adapt/operator/EdgeSwapOp.cc
+++ b/Adapt/operator/EdgeSwapOp.cc
@@ -12,7 +12,7 @@
 
 #include "EdgeSwapOp.h"
 #include "MAdDefines.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 #include "MAdOutput.h"
 #include "MathUtils.h"
 #include "MAdMessage.h"
@@ -24,6 +24,7 @@ using std::endl;
 using std::cerr;
 using std::stringstream;
 #include <math.h>
+#include <assert.h>
 
 namespace MAd
 {
@@ -441,15 +442,18 @@ namespace MAd
 
     // new triangles [v0,v2,v3] && [v1,v2,v3]
     pEdge newe  = M_createE(mesh, v2, v3, gface);
-    pEdge e02 = mesh->find_edge( v0, v2, (MDB_Triangle*)f0 );
-    pEdge e03 = mesh->find_edge( v0, v3, (MDB_Triangle*)f1 );
-    pEdge e12 = mesh->find_edge( v1, v2, (MDB_Triangle*)f0 );
-    pEdge e13 = mesh->find_edge( v1, v3, (MDB_Triangle*)f1 );
-    pFace newf0 = mesh->add_triangle( e02, newe, e03, gface);
-    pFace newf1 = mesh->add_triangle( e12, newe, e13, gface);
-
-    PList_append(new_faces, newf0);
-    PList_append(new_faces, newf1);
+    pEdge e02 = F_findEdge(f0,v0,v2);
+    pEdge e03 = F_findEdge(f1,v0,v3);
+    pEdge e12 = F_findEdge(f0,v1,v2);
+    pEdge e13 = F_findEdge(f1,v1,v3);
+    pEdge fEdges[3];
+    fEdges[0] = e02; fEdges[1] = newe; fEdges[2] = e03;
+    pFace newf0 = M_createF( mesh, 3, fEdges, gface);
+    fEdges[0] = e12; fEdges[1] = newe; fEdges[2] = e13;
+    pFace newf1 = M_createF( mesh, 3, fEdges, gface);
+
+    PList_append(new_faces, (pEntity)newf0);
+    PList_append(new_faces, (pEntity)newf1);
 
     // call callback
     CallBackManagerSgl::instance().callCallBacks(old_faces, new_faces, MAd_ESWAP, (pEntity)edge);
@@ -482,18 +486,21 @@ namespace MAd
     }
 
     // create new regions for the selected swap configuration
-    pVertex v[3];
+    pVertex v1[4], v2[4];
     for( int i=0; i < swap_config.nb_tri_triangulation(); i++ )
       {
         int t = swap_config.triangulation(conf,i);
-        for( int j=0; j<3; j++ )
-          v[j] = vertices[ swap_config.triangle(t,j) ];
+        for( int j=0; j<3; j++ ) {
+          v1[j] = vertices[ swap_config.triangle(t,j) ];
+        }
+        v1[3] = vt;
+        v2[0] = v1[0]; v2[1] = v1[2]; v2[2] = v1[1]; v2[3] = vb;
 
         //create new regions
-        pRegion r1 = mesh->add_tet( v[0], v[1],v[2], vt, (pGEntity)greg );
-        pRegion r2 = mesh->add_tet( v[0], v[2],v[1], vb, (pGEntity)greg );
-        PList_append( newRegions, r1 );
-        PList_append( newRegions, r2 );
+        pRegion r1 = M_createR( mesh, 4, v1, (pGEntity)greg );
+        pRegion r2 = M_createR( mesh, 4, v2, (pGEntity)greg );
+        PList_append( newRegions, (pEntity)r1 );
+        PList_append( newRegions, (pEntity)r2 );
       }
 
     // If swap on a boundary, classify new boundary entities (1 edge, 2 faces)
diff --git a/Adapt/operator/FaceCollapseOp.cc b/Adapt/operator/FaceCollapseOp.cc
index 6d48dc8..f837bb3 100644
--- a/Adapt/operator/FaceCollapseOp.cc
+++ b/Adapt/operator/FaceCollapseOp.cc
@@ -12,6 +12,7 @@
 
 #include "FaceCollapseOp.h"
 #include "OperatorTools.h"
+#include "MeshSizeBase.h"
 
 namespace MAd {
 
@@ -94,7 +95,7 @@ namespace MAd {
             for (int iF=0; iF<4; iF++) {
               pFace pf = R_face(reg,iF);
               if ( pf == delFace ) continue;
-              if ( F_inClosure(pf,delEdge) && F_whatInType(pf) == 2 ) C1 = true;
+              if ( F_inClosure(pf,(pEntity)delEdge) && F_whatInType(pf) == 2 ) C1 = true;
             }
 
             // check C2
@@ -114,7 +115,7 @@ namespace MAd {
             while ( ( pf = (pFace) PList_next(delEdgeFaces,&temp) ) )
               {
                 if ( pf == delFace ) continue;
-                if ( R_inClosure(pr,pf) ) continue;
+                if ( R_inClosure(pr,(pEntity)pf) ) continue;
                 if ( E_exist(oppV, F_edOpVt(pf,delEdge) ) ) {
                   PList_delete(delEdgeFaces); return false;
                 }
@@ -455,7 +456,7 @@ namespace MAd {
           pPList eRegs = E_regions(delEdge);
           void * temp = 0;
           while ( pRegion region = (pRegion)PList_next(eRegs,&temp) ) {
-            if ( !PList_inList(*cavity,region) ) PList_append(*cavity,region);
+            if ( !PList_inList(*cavity,(pEntity)region) ) PList_append(*cavity,(pEntity)region);
           }
           PList_delete(eRegs);
         }
@@ -464,7 +465,7 @@ namespace MAd {
           pPList eFaces = E_faces(delEdge);
           void * temp = 0;
           while ( pFace face = (pFace)PList_next(eFaces,&temp) ) {
-            if ( !PList_inList(*cavity,face) ) PList_append(*cavity,face);
+            if ( !PList_inList(*cavity,(pEntity)face) ) PList_append(*cavity,(pEntity)face);
           }
           PList_delete(eFaces);
 
diff --git a/Adapt/operator/FaceSwapOp.cc b/Adapt/operator/FaceSwapOp.cc
index a21e1bf..360af2b 100644
--- a/Adapt/operator/FaceSwapOp.cc
+++ b/Adapt/operator/FaceSwapOp.cc
@@ -11,7 +11,7 @@
 // -------------------------------------------------------------------
 
 #include "FaceSwapOp.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 
 namespace MAd {
 
@@ -113,8 +113,8 @@ namespace MAd {
   void faceSwapOp::getCavity(pPList * cavity) const
   {
     *cavity = PList_new();
-    PList_append(*cavity, fRegions[0]);
-    PList_append(*cavity, fRegions[1]);
+    PList_append(*cavity, (pEntity)(fRegions[0]));
+    PList_append(*cavity, (pEntity)(fRegions[1]));
   }
 
   // -------------------------------------------------------------------
@@ -163,13 +163,13 @@ namespace MAd {
       rFaces[3] = newFaces[(iR+2)%3];
 
       pRegion newR = M_createR(mesh,4,rFaces,(pGEntity)geoEntity);
-      PList_append(newRegions, newR);
+      PList_append(newRegions, (pEntity)newR);
     }
 
     // list deleted regions
     pPList oldRegions = PList_new();
-    PList_append(oldRegions,fRegions[0]);
-    PList_append(oldRegions,fRegions[1]);
+    PList_append(oldRegions,(pEntity)(fRegions[0]));
+    PList_append(oldRegions,(pEntity)(fRegions[1]));
 
     // call callback functions
     CallBackManagerSgl::instance().callCallBacks(oldRegions,
diff --git a/Adapt/repositioning/GeoMatcher.h b/Adapt/operator/MAdOperations.h
similarity index 65%
copy from Adapt/repositioning/GeoMatcher.h
copy to Adapt/operator/MAdOperations.h
index 9533d69..1425e13 100644
--- a/Adapt/repositioning/GeoMatcher.h
+++ b/Adapt/operator/MAdOperations.h
@@ -11,31 +11,22 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#ifndef _H_GEOMATCHER
-#define _H_GEOMATCHER
-
-#include "MAdElasticityOp.h"
-#include <list>
+#ifndef _H_MADOPERATIONS
+#define _H_MADOPERATIONS
 
 namespace MAd {
 
   // -------------------------------------------------------------------
-  class geoMatcher: public MAdElasticityOp
-  {
-
-  public:
-
-    geoMatcher(pMesh);
-    geoMatcher(const geoMatcher&);
-    ~geoMatcher();
-
-    void reportFailure(double ratio) { failures.push_back(ratio); }
-    void printFailures(std::ostream&) const;
-
-  private:
-
-    std::list<double> failures;
-
+  enum operationType {
+    MAd_UNKNOWNOPERATION = 0,
+    MAd_VERTEXMOVE       = 1,
+    MAd_ESPLIT           = 2,
+    MAd_ECOLLAPSE        = 3,
+    MAd_FCOLLAPSE        = 4,
+    MAd_DESPLTCLPS       = 5,
+    MAd_ESWAP            = 6,
+    MAd_FSWAP            = 7,
+    MAd_RREMOVE          = 8
   };
 
   // -------------------------------------------------------------------
diff --git a/Adapt/operator/MAdOperatorBase.cc b/Adapt/operator/MAdOperatorBase.cc
index 11a7d5f..5cf4362 100644
--- a/Adapt/operator/MAdOperatorBase.cc
+++ b/Adapt/operator/MAdOperatorBase.cc
@@ -72,7 +72,7 @@ namespace MAd {
         void * temp2 = NULL;
         pFace face;
         while ( ( face = (pFace)PList_next(rFaces,&temp2) ) ) {
-          if ( F_whatInType(face) == 2 ) PList_appUnique(cavity,face);
+          if ( F_whatInType(face) == 2 ) PList_appUnique(cavity,(pEntity)face);
         }
         PList_delete(rFaces);
       }
diff --git a/Adapt/operator/MAdOperatorBase.h b/Adapt/operator/MAdOperatorBase.h
index 4a2f6f8..85cfb02 100644
--- a/Adapt/operator/MAdOperatorBase.h
+++ b/Adapt/operator/MAdOperatorBase.h
@@ -14,12 +14,13 @@
 #ifndef _H_MADOPERATORBASE
 #define _H_MADOPERATORBASE
 
-#include "MAdDefines.h"
+#include "MAdOperations.h"
 #include "DiscreteSF.h"
 #include "ElementStatistics.h"
 #include "MeshQualityManager.h"
 #include "Constraint.h"
 #include "History.h"
+#include "MAdDefines.h"
 
 #include <string>
 
diff --git a/Adapt/operator/OperatorTools.cc b/Adapt/operator/OperatorTools.cc
index dd6ea96..9d65bb4 100644
--- a/Adapt/operator/OperatorTools.cc
+++ b/Adapt/operator/OperatorTools.cc
@@ -11,10 +11,12 @@
 // -------------------------------------------------------------------
 
 #include "OperatorTools.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 #include "MAdMessage.h"
+#include "Constraint.h"
 
 #include <map>
+#include <assert.h>
 
 namespace MAd {
 
@@ -42,9 +44,10 @@ namespace MAd {
       E_collapseOnGFace(mesh,edgeDel,vDel,vTgt);
       return;
     }
-    
+
     // --- build the new mesh ---
 
+    pVertex verts[4];
     pPList newRegions = PList_new();
     pPList vDelRegions = V_regions(vDel);
     void * temp = NULL;
@@ -56,8 +59,10 @@ namespace MAd {
         
         // create the region
         pGEntity rGEntity = (pGEntity)R_whatIn(region);
-        pRegion newR = mesh->add_tet(vTgt,F_vertex(fExt,0),F_vertex(fExt,1),F_vertex(fExt,2),rGEntity);
-        PList_append(newRegions, newR);
+        verts[0] = vTgt;
+        for (int iV = 0; iV<3; iV++) verts[iV+1] = F_vertex(fExt,iV);
+        pRegion newR = M_createR (mesh, 4, verts, rGEntity);
+        PList_append(newRegions, (pEntity)newR);
       }
     PList_delete(eRegions);
 
@@ -70,7 +75,6 @@ namespace MAd {
         pPList vDelEdges = V_edges(vDel);
         temp = NULL;
         pEdge pe;
-        int count = 0;
         while ( ( pe = (pEdge)PList_next(vDelEdges,&temp) ) ) {
           if ( pe == edgeDel ) continue;
           if ( E_whatInType(pe) == 1 ) {
@@ -78,17 +82,9 @@ namespace MAd {
             pVertex oppV = E_otherVertex(pe,vDel);
             pEdge newLineEdge = E_exist(vTgt,oppV);
             E_setWhatIn(newLineEdge,gEdge2);
-            count++;
           }
         }
         PList_delete(vDelEdges);
-        if ( count != 1 ) {
-          V_info(vDel);
-          E_info(edgeDel);
-          MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                      "Count should be equal to 1, count = %d",count);
-          assert (count == 1);
-        }
       }
 
     // classify faces on surfaces
@@ -102,7 +98,7 @@ namespace MAd {
         temp = NULL;
         pFace pf;
         while ( ( pf = (pFace)PList_next(vDelFaces,&temp) ) ) {
-          if ( F_inClosure(pf,edgeDel) ) continue;
+          if ( F_inClosure(pf,(pEntity)edgeDel) ) continue;
           if ( F_whatInType(pf) == 2 ) {
             gFace          = F_whatIn(pf);
             oppE           = F_vtOpEd(pf,vDel);
@@ -142,6 +138,7 @@ namespace MAd {
     PList_delete(vEdges);
 
     M_removeVertex(mesh,vDel);
+
   }
     
 
@@ -306,7 +303,7 @@ namespace MAd {
       // create the region
       pGEntity rGEntity = (pGEntity)R_whatIn(region);
       pRegion newRegion = M_createR(mesh, 4, rFaces, rGEntity);
-      PList_append(newRegions, newRegion);
+      PList_append(newRegions, (pEntity)newRegion);
     }
 
     PList_delete(eRegions);
@@ -433,7 +430,7 @@ namespace MAd {
       // create the face
       pGEntity fGEntity = F_whatIn(face);
       pFace newFace = M_createF(mesh, 3, fEdges, fGEntity);
-      PList_append(newFaces,newFace);
+      PList_append(newFaces,(pEntity)newFace);
     }
 
     PList_delete(eFaces);
@@ -491,9 +488,9 @@ namespace MAd {
     // --- build the edges ---
     pPList newEdges = PList_new();
     pEdge e1 = M_createE(mesh, E_vertex(edge,0), newV, edgeGE);
-    PList_append(newEdges,e1);
+    PList_append(newEdges,(pEntity)e1);
     pEdge e2 = M_createE(mesh, newV, E_vertex(edge,1), edgeGE);
-    PList_append(newEdges,e2);
+    PList_append(newEdges,(pEntity)e2);
     
     // --- build the faces bordered by new edges ---
     pPList newFaces = PList_new();
@@ -537,8 +534,8 @@ namespace MAd {
       EN_attachDataP((pEntity)newF1,"_EdgeSplitMarker_",face);
       EN_attachDataP((pEntity)newF2,"_EdgeSplitMarker_",face);
       
-      PList_append(newFaces,newF1);
-      PList_append(newFaces,newF2);
+      PList_append(newFaces,(pEntity)newF1);
+      PList_append(newFaces,(pEntity)newF2);
     }
     
     pPList delRegs = PList_new();
@@ -600,13 +597,13 @@ namespace MAd {
         }
         M_createR(mesh, 4, rFaces, rGE);
 
-        PList_append(delRegs,region);
+        PList_append(delRegs,(pEntity)region);
       }
     }
     PList_delete(eRegs);
     
     pPList delEdge = PList_new();
-    PList_append(delEdge,edge);
+    PList_append(delEdge,(pEntity)edge);
     CallBackManagerSgl::instance().callCallBacks(delEdge, newEdges, 
                                                  MAd_ESPLIT, (pEntity)newV);
     PList_delete(delEdge);
diff --git a/Adapt/operator/OperatorTools.h b/Adapt/operator/OperatorTools.h
index 1167260..f60f2de 100644
--- a/Adapt/operator/OperatorTools.h
+++ b/Adapt/operator/OperatorTools.h
@@ -14,7 +14,7 @@
 #ifndef _H_OPERATORTOOLS
 #define _H_OPERATORTOOLS
 
-#include "MSops.h"
+#include "MeshDataBaseInterface.h"
 
 namespace MAd {
 
diff --git a/Adapt/operator/RegionRemoveOp.cc b/Adapt/operator/RegionRemoveOp.cc
index d31503f..d38b163 100644
--- a/Adapt/operator/RegionRemoveOp.cc
+++ b/Adapt/operator/RegionRemoveOp.cc
@@ -11,7 +11,7 @@
 // -------------------------------------------------------------------
 
 #include "RegionRemoveOp.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 
 namespace MAd {
 
@@ -103,7 +103,7 @@ namespace MAd {
     // --- list faces to delete ---
     pPList delF = PList_new();
     for (int iF=0; iF < 4; iF++) {
-      if ( delFace[iF] == true ) PList_append(delF,R_face(region,iF));
+      if ( delFace[iF] == true ) PList_append(delF,(pEntity)R_face(region,iF));
     }
 
     // --- list edges to delete ---
@@ -115,10 +115,10 @@ namespace MAd {
       pPList eFaces = E_faces(edge);
       void * temp2 = NULL;
       while ( pFace face = (pFace) PList_next(eFaces,&temp2) ) {
-        if ( !PList_inList(delF,face) ) { toDel = false; break; }
+        if ( !PList_inList(delF,(pEntity)face) ) { toDel = false; break; }
       }
       PList_delete(eFaces);
-      if (toDel) PList_append(delE,edge);
+      if (toDel) PList_append(delE,(pEntity)edge);
     }
     PList_delete(rEdges);
 
@@ -131,9 +131,9 @@ namespace MAd {
       pPList vEdges = V_edges(vert);
       void * temp4 = NULL;
       while ( pEdge edge = (pEdge) PList_next(vEdges,&temp4) ) {
-        if ( !PList_inList(delE,edge) ) { toDel = false; break; }
+        if ( !PList_inList(delE,(pEntity)edge) ) { toDel = false; break; }
       }
-      if (toDel) PList_append(delV,vert);
+      if (toDel) PList_append(delV,(pEntity)vert);
     }
     PList_delete(rVerts);
   
@@ -142,15 +142,15 @@ namespace MAd {
     pPList emptyList;
     pPList delEn = PList_new();
     void * delTmp = NULL;
-    while ( pFace face = (pFace) PList_next(delF,&delTmp) ) PList_append(delEn,face);
+    while ( pFace face = (pFace) PList_next(delF,&delTmp) ) PList_append(delEn,(pEntity)face);
     delTmp = NULL;
-    while ( pEdge edge = (pEdge) PList_next(delE,&delTmp) ) PList_append(delEn,edge);
+    while ( pEdge edge = (pEdge) PList_next(delE,&delTmp) ) PList_append(delEn,(pEntity)edge);
     delTmp = NULL;
-    while ( pVertex vert = (pVertex) PList_next(delV,&delTmp) ) PList_append(delEn,vert);
+    while ( pVertex vert = (pVertex) PList_next(delV,&delTmp) ) PList_append(delEn,(pEntity)vert);
     CallBackManagerSgl::instance().callCallBacks(delEn,
                                                  emptyList,
                                                  MAd_RREMOVE,
-                                                 region);
+                                                 (pEntity)region);
     PList_delete(delEn);
   
     // --- delete entities ---
diff --git a/Adapt/operator/RegionRemoveOp.h b/Adapt/operator/RegionRemoveOp.h
index 48ba6af..3f871bc 100644
--- a/Adapt/operator/RegionRemoveOp.h
+++ b/Adapt/operator/RegionRemoveOp.h
@@ -14,6 +14,7 @@
 #ifndef _H_REGIONREMOVEOP
 #define _H_REGIONREMOVEOP
 
+#include "MeshDataBaseInterface.h"
 #include "MAdOperatorBase.h"
 
 namespace MAd {
@@ -77,7 +78,7 @@ namespace MAd {
   // -------------------------------------------------------------------
   inline void regionRemoveOp::getCavity(pPList * cavity) const
   {
-    PList_append(*cavity,region);
+    PList_append(*cavity,(pEntity)region);
   }
 
   // -------------------------------------------------------------------
diff --git a/Adapt/operator/SliverFaceHandler.cc b/Adapt/operator/SliverFaceHandler.cc
index 920c9a7..cc5aee9 100644
--- a/Adapt/operator/SliverFaceHandler.cc
+++ b/Adapt/operator/SliverFaceHandler.cc
@@ -17,8 +17,10 @@
 #include "MeshParametersManager.h"
 #include "MAdOutput.h"
 
+
 // standard C/C++
 #include <set>
+#include <stdio.h>
 using std::set;
 #include <sstream>
 using std::stringstream;
@@ -249,7 +251,7 @@ namespace MAd {
   
     pPList cavity = PList_new();
 
-    PList_append(cavity,face);
+    PList_append(cavity,(pEntity)face);
   
     for (int iV=0; iV<F_numVertices(face); iV++) {
 
@@ -258,7 +260,7 @@ namespace MAd {
       pPList vFaces = V_faces(vertex);
       void * temp = 0;
       while ( pFace pf = (pFace)PList_next(vFaces,&temp) ) {
-        PList_appUnique(cavity,pf);
+        PList_appUnique(cavity,(pEntity)pf);
       }
       PList_delete(vFaces);
     }
diff --git a/Adapt/operator/SliverRegionHandler.cc b/Adapt/operator/SliverRegionHandler.cc
index ddac9d6..a2299e7 100644
--- a/Adapt/operator/SliverRegionHandler.cc
+++ b/Adapt/operator/SliverRegionHandler.cc
@@ -21,6 +21,7 @@
 #include "MeshParametersManager.h"
 #include "MAdOutput.h"
 #include "MathUtils.h"
+#include "DistanceFunction.h"
 
 #include <sstream>
 using std::stringstream;
@@ -1195,7 +1196,7 @@ namespace MAd {
   
     pPList cavity = PList_new();
 
-    PList_append(cavity,region);
+    PList_append(cavity, (pEntity)region);
   
     for (int iV=0; iV<R_numVertices(region); iV++) {
 
@@ -1204,7 +1205,7 @@ namespace MAd {
       pPList vRegs = V_regions(vertex);
       void * temp = 0;
       while ( pRegion pr = (pRegion)PList_next(vRegs,&temp) ) {
-        PList_appUnique(cavity,pr);
+        PList_appUnique(cavity,(pEntity)pr);
       }
       PList_delete(vRegs);
     }
diff --git a/Adapt/operator/VertexMoveOp.cc b/Adapt/operator/VertexMoveOp.cc
index 38492f0..1a95f0e 100644
--- a/Adapt/operator/VertexMoveOp.cc
+++ b/Adapt/operator/VertexMoveOp.cc
@@ -20,6 +20,7 @@ using std::cerr;
 using std::queue;
 using std::set;
 using std::multiset;
+#include <cmath>
 
 namespace MAd {
 
diff --git a/Adapt/operator/VertexMoveOp.h b/Adapt/operator/VertexMoveOp.h
index b4ebce7..89740f0 100644
--- a/Adapt/operator/VertexMoveOp.h
+++ b/Adapt/operator/VertexMoveOp.h
@@ -15,6 +15,8 @@
 #define _H_VERTEXMOVEOP
 
 #include "MAdOperatorBase.h"
+#include "MobileObject.h"
+#include "DistanceFunction.h"
 
 #include <set>
 
@@ -24,22 +26,6 @@
 namespace MAd {
 
   // -------------------------------------------------------------------
-  // GCTODO: rewrite it simpler
-  struct vDisplacement
-  {
-    vDisplacement(const vDisplacement&);
-    vDisplacement(pVertex, double[3]);
-    void scale(double);
-    pVertex pv;
-    double dxyz[3];    // displacement
-  };
-
-  struct vDisplacementLess
-  {
-    bool operator() (const vDisplacement&, const vDisplacement&) const;
-  };
-
-  // -------------------------------------------------------------------
   class vertexMoveOp : public MAdOperatorBase
   {
   public:
diff --git a/Adapt/output/MAdOutput.cc b/Adapt/output/MAdOutput.cc
index 0c7d83c..ddb0ba1 100644
--- a/Adapt/output/MAdOutput.cc
+++ b/Adapt/output/MAdOutput.cc
@@ -16,7 +16,9 @@
 #include "MAdMessage.h"
 #include "MathUtils.h"
 #include "LocalSizeField.h"
+#include "DistanceFunction.h"
 #include "MAdResourceManager.h"
+#include "MeshSizeBase.h"
 
 #include <iostream>
 using std::cout;
@@ -703,7 +705,7 @@ namespace MAd {
 
     set<pRegion>::const_iterator rIter = regs.begin();
     for (; rIter != regs.end(); rIter++) {
-      double* data = getData(type,*rIter,sf);
+      double* data = getData(type,(pEntity)(*rIter),sf);
       double xyz[4][3];
       R_coordP1(*rIter, xyz);
       fprintf (f,"SS(%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g,%g) {%g,%g,%g,%g};\n",
diff --git a/Adapt/output/MAdOutput.h b/Adapt/output/MAdOutput.h
index 1246af5..47bd193 100644
--- a/Adapt/output/MAdOutput.h
+++ b/Adapt/output/MAdOutput.h
@@ -15,7 +15,7 @@
 #define _H_MADOUTPUT
 
 #include "SizeFieldBase.h"
-#include "MSops.h"
+#include "MeshDataBaseInterface.h"
 
 #include <string>
 #include <set>
diff --git a/Adapt/quality/ElementStatistics.h b/Adapt/quality/ElementStatistics.h
index 39798f1..814e243 100644
--- a/Adapt/quality/ElementStatistics.h
+++ b/Adapt/quality/ElementStatistics.h
@@ -14,6 +14,8 @@
 #ifndef _H_ELEMENTSTATISTICS
 #define _H_ELEMENTSTATISTICS
 
+#include "MAdDefines.h"
+
 namespace MAd {
 
   // -------------------------------------------------------------------
diff --git a/Adapt/quality/MeanRatioEvaluator.cc b/Adapt/quality/MeanRatioEvaluator.cc
index d41e5d7..30662ae 100644
--- a/Adapt/quality/MeanRatioEvaluator.cc
+++ b/Adapt/quality/MeanRatioEvaluator.cc
@@ -11,6 +11,8 @@
 // -------------------------------------------------------------------
 
 #include "MeanRatioEvaluator.h"
+#include "MeshSizeBase.h"
+#include "MAdDefines.h"
 
 #include <iostream>
 using std::cout;
diff --git a/Adapt/quality/MeshQualityManager.cc b/Adapt/quality/MeshQualityManager.cc
index 03acff6..a4f42d4 100644
--- a/Adapt/quality/MeshQualityManager.cc
+++ b/Adapt/quality/MeshQualityManager.cc
@@ -13,7 +13,8 @@
 #include "MeshQualityManager.h"
 #include "MeanRatioEvaluator.h"
 #include "OrientedMeanRatioEvaluator.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
+#include "MAdDefines.h"
 
 #include <iostream>
 using std::cout;
@@ -22,6 +23,7 @@ using std::endl;
 using std::ostream;
 #include <iomanip>
 #include <math.h>
+#include <stdio.h>
 
 namespace MAd {
 
@@ -217,7 +219,6 @@ namespace MAd {
   // -------------------------------------------------------------------
   int MeshQualityManager::getShape(pRegion pr, double * result) const
   {
-    //   return evaluator->R_shape(pr,result);
     if ( !getAttachedShape((pEntity)pr, result) ) {
       int flag = evaluator->R_shape(pr,result);
       attachShape((pEntity)pr,*result);
diff --git a/Adapt/quality/OrientedMeanRatioEvaluator.cc b/Adapt/quality/OrientedMeanRatioEvaluator.cc
index 0e09bf6..69027b7 100644
--- a/Adapt/quality/OrientedMeanRatioEvaluator.cc
+++ b/Adapt/quality/OrientedMeanRatioEvaluator.cc
@@ -12,6 +12,7 @@
 
 #include "OrientedMeanRatioEvaluator.h"
 #include "AnisoMeshSize.h"
+#include "MAdDefines.h"
 
 #include <iostream>
 using std::cout;
diff --git a/Adapt/repositioning/GeoMatcher.cc b/Adapt/repositioning/GeoMatcher.cc
index 81dab88..397d3cf 100644
--- a/Adapt/repositioning/GeoMatcher.cc
+++ b/Adapt/repositioning/GeoMatcher.cc
@@ -11,10 +11,11 @@
 // -------------------------------------------------------------------
 
 #include "GeoMatcher.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 #include "MathUtils.h"
 #include "ModelInterface.h"
 #include "MAdMessage.h"
+#include "AdaptInterface.h"
 
 namespace MAd {
 
@@ -111,15 +112,17 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
-  geoMatcher::geoMatcher(pMesh _mesh):
-    MAdElasticityOp(_mesh)
+  geoMatcher::geoMatcher(pMesh _mesh, MeshAdapter * _ma):
+    MAdElasticityOp(_mesh), force(false), strictChecking(false),
+    adapter(_ma), sliverFOp(NULL), sliverROp(NULL)
   {
     CallBackManagerSgl::instance().registerCallBack(GeoMatcherCBFunction,this);
   }
 
   // -------------------------------------------------------------------
   geoMatcher::geoMatcher(const geoMatcher& gm):
-    MAdElasticityOp(gm)
+    MAdElasticityOp(gm), force(gm.force), strictChecking(gm.strictChecking),
+    adapter(gm.adapter), sliverFOp(gm.sliverFOp), sliverROp(gm.sliverROp)
   {
     CallBackManagerSgl::instance().registerCallBack(GeoMatcherCBFunction,this);
   }
@@ -131,6 +134,83 @@ namespace MAd {
   }
   
   // -------------------------------------------------------------------
+  bool geoMatcher::snap()
+  {
+    bool res = true;
+
+    // --- prepare the node motion ---
+    buildCavity();
+    setDirichletBC();
+    compute();
+    
+    // --- perform the node motion ---
+    if ( force ) forceRelocation();
+    else
+      {
+        double ratio = 0.;
+        int achieved = -1;
+        while ( achieved != 2 )
+          {
+            achieved = advance(&ratio,1.e-12);
+          
+            if ( achieved == 0 ) {
+              MAdMsgSgl::instance().warning(-1,__FILE__,
+                                            "Could not advance snapping, achieved: %d, ratio: %f",
+                                            achieved,ratio);
+            }
+            else {
+              MAdMsgSgl::instance().info(-1,__FILE__,
+                                         "Advance snapping, achieved: %d, ratio: %f",
+                                         achieved,ratio);
+            }
+        
+            if ( achieved <= 1 ) {
+
+              // Apply the operations that do not add vertices or manage their 
+              // target locations (complicated!)
+              bool slivR, slivF;
+              if ( sliverROp ) slivR = sliverROp->getNewVertexPermission();
+              if ( sliverFOp ) slivF = sliverFOp->getNewVertexPermission();
+              if ( sliverROp ) sliverROp->newVertexPermission(false);
+              if ( sliverFOp ) sliverFOp->newVertexPermission(false);
+
+              int nbBefore, nbAfter;
+              if (M_dim(mesh) == 3) sliverROp->removeSliverRegions(&nbBefore,&nbAfter);
+              else                  sliverFOp->removeSliverFaces  (&nbBefore,&nbAfter);
+              std::cout << "Removed slivers " << nbBefore << " -> " << nbAfter <<"\n";
+
+              if ( !( nbBefore - nbAfter ) )
+                {
+                  if ( !adapter->optimiseElementShape() ) {
+                    //                 string filename = outPrefix + "dirichlet.txt";
+                    //                 std::ofstream dirichletOut(filename.c_str());
+                    //                 geoTracker->printDirichlet(dirichletOut);
+                    //                 dirichletOut.close();
+                    //                 filename = outPrefix + "relocations.txt";
+                    //                 std::ofstream relocationsOut(filename.c_str());
+                    //                 printRelocations(relocationsOut);
+                    //                 relocationsOut.close();
+                    MAdMsgSgl::instance().warning(__LINE__,__FILE__,
+                                                  "Could not snap vertices, ratio reached: %f",
+                                                  ratio);
+                    reportFailure(ratio);
+                    break;
+                  }
+                }
+              if ( sliverROp ) sliverROp->newVertexPermission( slivR );
+              if ( sliverFOp ) sliverFOp->newVertexPermission( slivF );
+            }
+          }
+
+        if ( strictChecking && achieved != 2 ) { res = false; }
+      }
+    
+    clear();
+
+    return res;
+  }
+  
+  // -------------------------------------------------------------------
   void geoMatcher::printFailures(std::ostream& out) const
   {
     if ( failures.size() ) {
diff --git a/Adapt/repositioning/GeoMatcher.h b/Adapt/repositioning/GeoMatcher.h
index 9533d69..2dd9283 100644
--- a/Adapt/repositioning/GeoMatcher.h
+++ b/Adapt/repositioning/GeoMatcher.h
@@ -15,27 +15,47 @@
 #define _H_GEOMATCHER
 
 #include "MAdElasticityOp.h"
+#include "SliverFaceHandler.h"
+#include "SliverRegionHandler.h"
 #include <list>
 
 namespace MAd {
 
+  class MeshAdapter;
+
   // -------------------------------------------------------------------
   class geoMatcher: public MAdElasticityOp
   {
 
   public:
 
-    geoMatcher(pMesh);
+    geoMatcher(pMesh, MeshAdapter *);
     geoMatcher(const geoMatcher&);
     ~geoMatcher();
 
+    void setForceRelocation(bool _force) { force = _force; }
+    void setStrictChecking (bool sc) { strictChecking = sc; }
+
+    void setSliverFaceHandler(sliverFaceHandler * s) { sliverFOp = s; }
+    void setSliverRegionHandler(sliverRegionHandler * s) { sliverROp = s; }
+
+    bool snap();
+
     void reportFailure(double ratio) { failures.push_back(ratio); }
     void printFailures(std::ostream&) const;
 
   private:
 
+    bool force; // if the nodes are snapped without any check nor repositioning inside the domain
+    bool strictChecking; // true: snap() returns true only if we the full snapping is done
+
     std::list<double> failures;
 
+    MeshAdapter * adapter;
+
+    sliverFaceHandler    *  sliverFOp;
+    sliverRegionHandler  *  sliverROp;
+
   };
 
   // -------------------------------------------------------------------
diff --git a/Adapt/repositioning/LaplaceSmoothingOp.cc b/Adapt/repositioning/LaplaceSmoothingOp.cc
index 872c794..4191dfb 100644
--- a/Adapt/repositioning/LaplaceSmoothingOp.cc
+++ b/Adapt/repositioning/LaplaceSmoothingOp.cc
@@ -29,11 +29,11 @@ namespace MAd {
   // -------------------------------------------------------------------
   int LaplaceSmoothingOp::run(double * L2Norm)
   {
-    return run(OPTIMAL,L2Norm);
+    return runOptimal(L2Norm);
   }
 
   // -------------------------------------------------------------------
-  int LaplaceSmoothingOp::run(LaplSmooType type, double * L2Norm)
+  int LaplaceSmoothingOp::runOptimal(double * L2Norm)
   {
     *L2Norm = 0.0;
 
@@ -48,13 +48,41 @@ namespace MAd {
       V_coord(pv,ori);
 
       double opt[3];
-      if ( type == OPTIMAL ) {
-        if (vMove->computeOptimalLocation(pv, opt)) vMove->setPosition(pv, opt);
-      } else {
-        V_cavityCenter(pv,opt);
-        vMove->setPosition(pv, opt);
+      if (vMove->computeOptimalLocation(pv, opt)) vMove->setPosition(pv, opt);
+
+      double worst;
+      if( vMove->evaluate(&worst) ) {
+        vMove->apply();
+        double disp[3];
+        diffVec(ori,opt,disp);
+        *L2Norm += dotProd(disp,disp);
       }
 
+      vMove->resetDisplacements();
+    }
+
+    return 1;
+  }
+
+  // -------------------------------------------------------------------
+  int LaplaceSmoothingOp::runFast(double * L2Norm)
+  {
+    *L2Norm = 0.0;
+
+    vertexMoveOp * vMove = new vertexMoveOp(mesh,sizeField,true);
+
+    VIter vit = M_vertexIter(mesh);
+    while( pVertex pv = VIter_next(vit) ) {
+
+      if ( V_whatInType(pv) != dim ) continue;
+
+      double ori[3];
+      V_coord(pv,ori);
+
+      double opt[3];
+      V_cavityCenter(pv,opt);
+      vMove->setPosition(pv, opt);
+
       double worst;
       if( vMove->evaluate(&worst) ) {
         vMove->apply();
diff --git a/Adapt/repositioning/LaplaceSmoothingOp.h b/Adapt/repositioning/LaplaceSmoothingOp.h
index ce4804d..855af29 100644
--- a/Adapt/repositioning/LaplaceSmoothingOp.h
+++ b/Adapt/repositioning/LaplaceSmoothingOp.h
@@ -19,12 +19,6 @@
 namespace MAd {
 
   // -------------------------------------------------------------------
-  enum LaplSmooType {
-    FAST,
-    OPTIMAL
-  };
-
-  // -------------------------------------------------------------------
   class LaplaceSmoothingOp : public nodesRepositioningOp {
 
   public:
@@ -35,7 +29,8 @@ namespace MAd {
   public:
 
     virtual int run(double * L2Norm);
-    virtual int run(LaplSmooType type, double * L2Norm);
+    virtual int runOptimal(double * L2Norm);
+    virtual int runFast(double * L2Norm);
 
   };
 
diff --git a/Adapt/repositioning/MAdElasticityOp.cc b/Adapt/repositioning/MAdElasticityOp.cc
index 44f291d..d005d52 100644
--- a/Adapt/repositioning/MAdElasticityOp.cc
+++ b/Adapt/repositioning/MAdElasticityOp.cc
@@ -15,7 +15,8 @@
 #include "OperatorTools.h"
 #include "MathUtils.h"
 #include "MAdOutput.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
+#include "MAdMessage.h"
 
 #include <iostream>
 using std::cout;
@@ -135,52 +136,104 @@ namespace MAd {
 
     if ( cavityThickness < 1 ) return;
 
-    set<pVertex> innerNodes; // nodes inside the cavity and dirichlet
-    set<pRegion> prevLayer;
+    if (dim == 3)
+      {
+        set<pVertex> innerNodes; // nodes inside the cavity and dirichlet
+        set<pRegion> prevLayer;
 
-    // --- first layer ---
-    pRegion pr;
-    pVertex pv;
-    map<pVertex,smallVector>::const_iterator dIter = dirichlet.begin();
-    for (; dIter != dirichlet.end(); dIter++) {
-      pv = (*dIter).first;
-      pPList vRegs = V_regions(pv);
-      void * temp = NULL;
-      while ( ( pr = (pRegion)PList_next(vRegs,&temp) ) ) {
-        cavity.insert(pr);
-        prevLayer.insert(pr);
+        // --- first layer ---
+        pRegion pr;
+        pVertex pv;
+        map<pVertex,smallVector>::const_iterator dIter = dirichlet.begin();
+        for (; dIter != dirichlet.end(); dIter++) {
+          pv = (*dIter).first;
+          pPList vRegs = V_regions(pv);
+          void * temp = NULL;
+          while ( ( pr = (pRegion)PList_next(vRegs,&temp) ) ) {
+            cavity.insert((pEntity)pr);
+            prevLayer.insert(pr);
+          }
+          PList_delete(vRegs);
+          innerNodes.insert(pv);
+        }
+
+        // --- next layers ---
+        for (int iL=1; iL < cavityThickness; iL++) {
+          set<pRegion> curLayer;
+          set<pRegion>::const_iterator rIter = prevLayer.begin();
+          for (; rIter != prevLayer.end(); rIter++ ) {
+            pPList rVerts = R_vertices(*rIter);
+            void * temp = NULL;
+            while ( ( pv = (pVertex)PList_next(rVerts,&temp) ) ) {
+              if ( innerNodes.find(pv) == innerNodes.end() ) {
+                pPList vRegs = V_regions(pv);
+                void * temp = NULL;
+                while ( ( pr = (pRegion)PList_next(vRegs,&temp) ) ) {
+                  if ( cavity.find((pEntity)pr) == cavity.end() ) {
+                    cavity.insert((pEntity)pr);
+                    curLayer.insert(pr);
+                  }
+                }
+                PList_delete(vRegs);
+                innerNodes.insert(pv);
+              }
+            }
+            PList_delete(rVerts);
+          }
+          prevLayer.clear();
+          prevLayer.insert(curLayer.begin(),curLayer.end());
+          curLayer.clear();
+        }
       }
-      PList_delete(vRegs);
-      innerNodes.insert(pv);
-    }
+    else 
+      {
+        set<pVertex> innerNodes; // nodes inside the cavity and dirichlet
+        set<pFace>   prevLayer;
 
-    // --- next layers ---
-    for (int iL=1; iL < cavityThickness; iL++) {
-      set<pRegion> curLayer;
-      set<pRegion>::const_iterator rIter = prevLayer.begin();
-      for (; rIter != prevLayer.end(); rIter++ ) {
-        pPList rVerts = R_vertices(*rIter);
-        void * temp = NULL;
-        while ( ( pv = (pVertex)PList_next(rVerts,&temp) ) ) {
-          if ( innerNodes.find(pv) == innerNodes.end() ) {
-            pPList vRegs = V_regions(pv);
+        // --- first layer ---
+        pFace pf;
+        pVertex pv;
+        map<pVertex,smallVector>::const_iterator dIter = dirichlet.begin();
+        for (; dIter != dirichlet.end(); dIter++) {
+          pv = (*dIter).first;
+          pPList vFaces = V_faces(pv);
+          void * temp = NULL;
+          while ( ( pf = (pFace)PList_next(vFaces,&temp) ) ) {
+            cavity.insert((pEntity)pf);
+            prevLayer.insert(pf);
+          }
+          PList_delete(vFaces);
+          innerNodes.insert(pv);
+        }
+
+        // --- next layers ---
+        for (int iL=1; iL < cavityThickness; iL++) {
+          set<pFace> curLayer;
+          set<pFace>::const_iterator fIter = prevLayer.begin();
+          for (; fIter != prevLayer.end(); fIter++ ) {
+            pPList fVerts = F_vertices(*fIter,1);
             void * temp = NULL;
-            while ( ( pr = (pRegion)PList_next(vRegs,&temp) ) ) {
-              if ( cavity.find(pr) == cavity.end() ) {
-                cavity.insert(pr);
-                curLayer.insert(pr);
+            while ( ( pv = (pVertex)PList_next(fVerts,&temp) ) ) {
+              if ( innerNodes.find(pv) == innerNodes.end() ) {
+                pPList vFaces = V_faces(pv);
+                void * temp = NULL;
+                while ( ( pf = (pFace)PList_next(vFaces,&temp) ) ) {
+                  if ( cavity.find((pEntity)pf) == cavity.end() ) {
+                    cavity.insert((pEntity)pf);
+                    curLayer.insert(pf);
+                  }
+                }
+                PList_delete(vFaces);
+                innerNodes.insert(pv);
               }
             }
-            PList_delete(vRegs);
-            innerNodes.insert(pv);
+            PList_delete(fVerts);
           }
+          prevLayer.clear();
+          prevLayer.insert(curLayer.begin(),curLayer.end());
+          curLayer.clear();
         }
-        PList_delete(rVerts);
       }
-      prevLayer.clear();
-      prevLayer.insert(curLayer.begin(),curLayer.end());
-      curLayer.clear();
-    }
 
     printf("Built a cavity with %d elements, dirichlet size: %d\n",cavity.size(),dirichlet.size());
 
@@ -214,40 +267,74 @@ namespace MAd {
   {
     if ( cavityEqualMesh ) 
       {
-        FIter fit = M_faceIter(mesh);
-        while ( pFace pf = FIter_next(fit) ) {
-          if ( EN_whatInType((pEntity)pf) == 2 ) {
-            pPList fV = F_vertices(pf,1);
-            void* tmp=0;
-            while ( pVertex pv = (pVertex)PList_next(fV,&tmp) ) {
-              (*bcVerts).insert(pv);
+        if ( dim == 3 )
+          {
+            FIter fit = M_faceIter(mesh);
+            while ( pFace pf = FIter_next(fit) ) {
+              if ( EN_whatInType((pEntity)pf) == 2 ) {
+                pPList fV = F_vertices(pf,1);
+                void* tmp=0;
+                while ( pVertex pv = (pVertex)PList_next(fV,&tmp) ) {
+                  (*bcVerts).insert(pv);
+                }
+                PList_delete(fV);
+              }
             }
-            PList_delete(fV);
+            FIter_delete(fit);
+          }
+        else
+          {
+            EIter eit = M_edgeIter(mesh);
+            while ( pEdge pe = EIter_next(eit) ) {
+              if ( EN_whatInType((pEntity)pe) == 1 ) {
+                (*bcVerts).insert( E_vertex(pe,0) );
+                (*bcVerts).insert( E_vertex(pe,1) );
+              }
+            }
+            EIter_delete(eit);
           }
-        }
-        FIter_delete(fit);
       }
     else
       {
-        set<pRegion>::const_iterator cavIter = cavity.begin();
-        for (; cavIter != cavity.end(); cavIter++) {
-          pPList rFaces = R_faces(*cavIter);
-          void * temp = NULL;
-          pFace pf;
-          while ( ( pf = (pFace)PList_next(rFaces,&temp) ) ) {
-            pRegion otherR = F_otherRegion(pf,*cavIter);
-            if ( !otherR || cavity.find(otherR) == cavity.end() ) {
-              pPList fVerts = F_vertices(pf,1);
-              void * temp2 = NULL;
-              pVertex pv;
-              while ( ( pv = (pVertex)PList_next(fVerts,&temp2) ) ) {
-                (*bcVerts).insert(pv);
+        if ( dim == 3 )
+          {
+            set<pEntity>::const_iterator cavIter = cavity.begin();
+            for (; cavIter != cavity.end(); cavIter++) {
+              pPList rFaces = R_faces((pRegion) *cavIter);
+              void * temp = NULL;
+              pFace pf;
+              while ( ( pf = (pFace)PList_next(rFaces,&temp) ) ) {
+                pRegion otherR = F_otherRegion(pf,(pRegion) *cavIter);
+                if ( !otherR || cavity.find((pEntity)otherR) == cavity.end() ) {
+                  pPList fVerts = F_vertices(pf,1);
+                  void * temp2 = NULL;
+                  pVertex pv;
+                  while ( ( pv = (pVertex)PList_next(fVerts,&temp2) ) ) {
+                    (*bcVerts).insert(pv);
+                  }
+                  PList_delete(fVerts);
+                }
               }
-              PList_delete(fVerts);
+              PList_delete(rFaces);
+            }
+          }
+        else
+          {
+            set<pEntity>::const_iterator cavIter = cavity.begin();
+            for (; cavIter != cavity.end(); cavIter++) {
+              pPList fEdges = F_edges((pFace) *cavIter);
+              void * temp = NULL;
+              pEdge pe;
+              while ( ( pe = (pEdge)PList_next(fEdges,&temp) ) ) {
+                pFace otherF = E_otherFace(pe,(pFace) *cavIter);
+                if ( !otherF || cavity.find((pEntity)otherF) == cavity.end() ) {
+                  (*bcVerts).insert( E_vertex(pe,0) );
+                  (*bcVerts).insert( E_vertex(pe,1) );
+                }
+              }
+              PList_delete(fEdges);
             }
           }
-          PList_delete(rFaces);
-        }
       }
   }
 
@@ -304,36 +391,44 @@ namespace MAd {
     }
     else {
       set<pVertex> verts;
-      set<pRegion>::const_iterator cavIter = cavity.begin();
+      set<pEntity>::const_iterator cavIter = cavity.begin();
       for (; cavIter != cavity.end(); cavIter++) {
-        pPList rVerts = R_vertices(*cavIter);
+        pPList enVerts;
+        if ( dim == 3 ) enVerts = R_vertices( (pRegion) *cavIter);
+        else            enVerts = F_vertices( (pFace) *cavIter, 1);
         void * temp = NULL;
-        while ( pVertex pv = (pVertex)PList_next(rVerts,&temp) ) {
+        while ( pVertex pv = (pVertex)PList_next(enVerts,&temp) ) {
           if ( verts.find(pv) == verts.end() ) {
             localIds[pv] = id;
             id++;
             verts.insert(pv);
           }
         }
-        PList_delete(rVerts);
+        PList_delete(enVerts);
       }
     }
     return id;
   }
 
   // -------------------------------------------------------------------
-  void MAdElasticityOp::addToMatrix(const pRegion pr,
+  void MAdElasticityOp::addToMatrix(const pEntity pe,
                                     int nbVert,
                                     MAdLinearSystemDef * lsys)
   {
-    int rNodes = R_numVertices(pr);
-    int locSyze = rNodes*dim;
+    int nodes;
+    if ( dim == 3 ) nodes = R_numVertices((pRegion) pe);
+    else            nodes = F_numVertices((pFace) pe);
+    int locSyze = nodes*3;
 
     smallMatrix locK(locSyze,locSyze);
-    element3DMatrix(pr, locK);
+    elementMatrix(pe, locK);
+//     if ( dim == 3 ) element3DMatrix((pRegion)pe, locK);
+//     else            element2DMatrix((pFace)  pe, locK);
+
+    pPList vertsI,vertsJ;
+    if ( dim == 3 ) { vertsI = R_vertices((pRegion)pe); vertsJ = R_vertices((pRegion)pe); }
+    else            { vertsI = F_vertices((pFace)pe,1); vertsJ = F_vertices((pFace)pe,1); }
 
-    pPList vertsI = R_vertices(pr);
-    pPList vertsJ = R_vertices(pr);
     void* tmpI = 0;
     int i = 0;
     while ( pVertex pvI = (pVertex)PList_next(vertsI,&tmpI) ) {
@@ -346,9 +441,9 @@ namespace MAd {
         
         int locIdJ = localIds[pvJ];
         
-        for (int k=0; k<dim; k++) {
-          for (int l=0; l<dim; l++) {
-            lsys->addToMatrix(nbVert*k + locIdI, nbVert*l+locIdJ, locK(k*rNodes+i,l*rNodes+j));
+        for (int k=0; k<3; k++) {
+          for (int l=0; l<3; l++) {
+            lsys->addToMatrix(nbVert*k + locIdI, nbVert*l+locIdJ, locK(k*nodes+i,l*nodes+j));
           }
         }
         j++;
@@ -376,20 +471,41 @@ namespace MAd {
     }
     else {
       map<pVertex,set<pVertex> > conn;
-      set<pRegion>::const_iterator cIter = cavity.begin();
-      for (; cIter != cavity.end(); cIter++) {
-        pPList rEdges = R_edges(*cIter);
-        void * temp = NULL;
-        pEdge edge;
-        pVertex v0, v1;
-        while ( ( edge = (pEdge)PList_next(rEdges,&temp)) ) {
-          v0 = E_vertex(edge,0);
-          v1 = E_vertex(edge,1);
-          conn[v0].insert(v1);
-          conn[v1].insert(v0);
+
+      if ( dim == 3 )
+        {
+          set<pEntity>::const_iterator cIter = cavity.begin();
+          for (; cIter != cavity.end(); cIter++) {
+            pPList rEdges = R_edges((pRegion)*cIter);
+            void * temp = NULL;
+            pEdge edge;
+            pVertex v0, v1;
+            while ( ( edge = (pEdge)PList_next(rEdges,&temp)) ) {
+              v0 = E_vertex(edge,0);
+              v1 = E_vertex(edge,1);
+              conn[v0].insert(v1);
+              conn[v1].insert(v0);
+            }
+            PList_delete(rEdges);
+          }
+        }
+      else
+        {
+          set<pEntity>::const_iterator cIter = cavity.begin();
+          for (; cIter != cavity.end(); cIter++) {
+            pPList fEdges = F_edges((pFace)*cIter);
+            void * temp = NULL;
+            pEdge edge;
+            pVertex v0, v1;
+            while ( ( edge = (pEdge)PList_next(fEdges,&temp)) ) {
+              v0 = E_vertex(edge,0);
+              v1 = E_vertex(edge,1);
+              conn[v0].insert(v1);
+              conn[v1].insert(v0);
+            }
+            PList_delete(fEdges);
+          }
         }
-        PList_delete(rEdges);
-      }
         
       pVertex pv;
       map<pVertex,set<pVertex> >::const_iterator conIter = conn.begin();
@@ -457,6 +573,7 @@ namespace MAd {
       int row = nbVert*iDir + id;
       dX(iDir) = lsys->getFromSolution(row);
     }
+    //    if ( dim < 3 ) dX(2) = 0.;
 
     relocations[pv] = dX;
   }
@@ -477,16 +594,32 @@ namespace MAd {
     }
     else {
       set<pVertex> vertices;
-      set<pRegion>::const_iterator cIter = cavity.begin();
-      for (; cIter != cavity.end(); cIter++) {
-        pPList rVerts = R_vertices(*cIter);
-        void * temp = NULL;
-        pVertex pv;
-        while ( ( pv = (pVertex)PList_next(rVerts,&temp) ) ) {
-          vertices.insert(pv);
+      if ( dim == 3 )
+        {
+          set<pEntity>::const_iterator cIter = cavity.begin();
+          for (; cIter != cavity.end(); cIter++) {
+            pPList rVerts = R_vertices((pRegion)*cIter);
+            void * temp = NULL;
+            pVertex pv;
+            while ( ( pv = (pVertex)PList_next(rVerts,&temp) ) ) {
+              vertices.insert(pv);
+            }
+            PList_delete(rVerts);
+          }
+        }
+      else
+        {
+          set<pEntity>::const_iterator cIter = cavity.begin();
+          for (; cIter != cavity.end(); cIter++) {
+            pPList fVerts = F_vertices((pFace)*cIter,1);
+            void * temp = NULL;
+            pVertex pv;
+            while ( ( pv = (pVertex)PList_next(fVerts,&temp) ) ) {
+              vertices.insert(pv);
+            }
+            PList_delete(fVerts);
+          }
         }
-        PList_delete(rVerts);
-      }
 
       set<pVertex>::const_iterator vIter = vertices.begin();
       for (; vIter != vertices.end(); vIter++) {
@@ -503,12 +636,14 @@ namespace MAd {
     for(; iter != relocations.end(); iter++)
       {
         pVertex pv = (*iter).first;
-        int id = EN_id(pv);
+        int id = V_id(pv);
         pGEntity ge = V_whatIn(pv);
         int gdim = GEN_type(ge);
         int gtag = GEN_tag(ge);
         smallVector dX = (*iter).second;
-        out <<"Vertex "<<pv<<" with id "<<id<<" and class ("<<gdim<<","<<gtag<<"): "<<dX(0)<<" "<<dX(1)<<" "<<dX(2)<<"\n";
+        out <<"Vertex "<<pv<<" with id "<<id<<" and class ("<<gdim<<","<<gtag<<"):";
+        for (int i=0; i<3; i++) out << " " << dX(i);
+        out <<"\n";
       }
     
     out << "Printed relocation: "<<relocations.size()<<" vertices relocated\n";
@@ -522,12 +657,14 @@ namespace MAd {
     for(; iter != dirichlet.end(); iter++)
       {
         pVertex pv = (*iter).first;
-        int id = EN_id(pv);
+        int id = V_id(pv);
         pGEntity ge = V_whatIn(pv);
         int gdim = GEN_type(ge);
         int gtag = GEN_tag(ge);
         smallVector dX = (*iter).second;
-        out <<"Vertex "<<pv<<" with id "<<id<<" and class ("<<gdim<<","<<gtag<<"): "<<dX(0)<<" "<<dX(1)<<" "<<dX(2)<<"\n";
+        out <<"Vertex "<<pv<<" with id "<<id<<" and class ("<<gdim<<","<<gtag<<"):";
+        for (int i=0; i<3; i++) out << " " << dX(i);
+        out <<"\n";
       }
     
     out << "Printed dirichlet BCs: "<<dirichlet.size()<<" vertices\n";
@@ -554,12 +691,6 @@ namespace MAd {
     // ... if an elastic computation has to be performed
     // --------------------------------------------------
     else {
-
-      if ( dim != 3 ) {
-        MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                    "Elasticity model only implemented for dimension 3, current dimension is %d",
-                                    dim);
-      }
       
       MeshQualityManagerSgl::instance().evaluateSizes(); // required for detJ0
 
@@ -570,7 +701,7 @@ namespace MAd {
 
       // --- create the linear system ---
       double t_sys0 = tm.getTime();
-      int sysSize = dim * nbVert;
+      int sysSize = 3 * nbVert;
       MAdLinearSystemDef * lsys = new MAdLinearSystemDef();
       lsys->allocate(sysSize);
 
@@ -595,12 +726,19 @@ namespace MAd {
       // --- assemble the matrix ---
       double t_ass0 = tm.getTime();
       if (cavityEqualMesh) {
-        RIter rit = M_regionIter(mesh);
-        while ( pRegion pr = RIter_next(rit) ) addToMatrix(pr,nbVert,lsys);
-        RIter_delete(rit);
+        if ( dim == 3 ) {
+          RIter rit = M_regionIter(mesh);
+          while ( pRegion pr = RIter_next(rit) ) addToMatrix((pEntity)pr,nbVert,lsys);
+          RIter_delete(rit);
+        }
+        else {
+          FIter fit = M_faceIter(mesh);
+          while ( pFace pf = FIter_next(fit) ) addToMatrix((pEntity)pf,nbVert,lsys);
+          FIter_delete(fit);
+        }
       }
       else {
-        set<pRegion>::const_iterator cavIter = cavity.begin();
+        set<pEntity>::const_iterator cavIter = cavity.begin();
         for (; cavIter != cavity.end(); cavIter++) addToMatrix(*cavIter,nbVert,lsys);
       }
       double dt_ass = tm.getTime() - t_ass0;
@@ -629,6 +767,16 @@ namespace MAd {
         }
     
       }
+      if ( dim == 2 ) {
+        MAdMsgSgl::instance().warning(__LINE__,__FILE__,"Fixing Z coordinates");
+        for ( int iV=0; iV<nbVert; iV++) {
+          for (int iD=2; iD<3; iD++){
+            int row = nbVert*iD + iV;
+            lsys->addToMatrix(row,row,1.e12);
+          }
+        }
+      }
+
       double dt_bc = tm.getTime() - t_bc0;
       MAdMsgSgl::instance().info(-1,__FILE__,
                                  "Applied boundary conditions in %f seconds",dt_bc);
@@ -855,11 +1003,18 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
-  void MAdElasticityOp::element3DMatrix(pRegion pr, smallMatrix& m) const
+  void MAdElasticityOp::elementMatrix(pEntity pe, smallMatrix& m) const
   {
-    int nbNodes = 4;
+    int nbNodes;
     double xyz[4][3];
-    R_coordP1(pr,xyz);
+    if ( dim == 3 ) {
+        R_coordP1((pRegion)pe,xyz);
+        nbNodes = 4;
+    }
+    else {
+      F_coordP1((pFace)pe,xyz);
+      nbNodes = 3;
+    }
 
     double FACT = E / (1 + nu);
     double C11 = FACT * (1 - nu) / (1 - 2 * nu);
@@ -882,12 +1037,14 @@ namespace MAd {
     smallMatrix BTH (3*nbNodes,6);
     smallMatrix BT  (3*nbNodes,6);
 
-    const double gradShpFct[4][3] =
+    double gradShpFct[4][3] =
       { {-1., -1., -1.},
         { 1.,  0.,  0.},
         { 0.,  1.,  0.},
         { 0.,  0.,  1.} };
 
+    if ( dim < 3 ) gradShpFct[0][2] = 0.;
+
     double jac [3][3];
     jac[0][0] = jac[0][1] = jac[0][2] = 0.;
     jac[1][0] = jac[1][1] = jac[1][2] = 0.;
@@ -897,12 +1054,19 @@ namespace MAd {
       jac[1][0] += xyz[i][0] * gradShpFct[i][1]; jac[1][1] += xyz[i][1] * gradShpFct[i][1]; jac[1][2] += xyz[i][2] * gradShpFct[i][1];
       jac[2][0] += xyz[i][0] * gradShpFct[i][2]; jac[2][1] += xyz[i][1] * gradShpFct[i][2]; jac[2][2] += xyz[i][2] * gradShpFct[i][2];
     }
-    const double detJ = fabs(jac[0][0] * jac[1][1] * jac[2][2] + jac[0][2] * jac[1][0] * jac[2][1] +
-                             jac[0][1] * jac[1][2] * jac[2][0] - jac[0][2] * jac[1][1] * jac[2][0] -
-                             jac[0][0] * jac[1][2] * jac[2][1] - jac[0][1] * jac[1][0] * jac[2][2]);
 
+    if ( dim < 3 ) jac[2][2] = 1.;
+
+    double detJ;
     double invjac [3][3];
-    inverseMat (jac, invjac) ;
+    if ( dim == 3 ) detJ = fabs ( inverseMat (jac, invjac) );
+    else {
+      double itmp[2][2]; 
+      double tmp[2][2]; for (int i=0;i<2;i++) for (int j=0;j<2;j++) tmp[i][j]=jac[i][j];
+      detJ = fabs ( inverseMat22(tmp,itmp) );
+      for (int i=0;i<2;i++) for (int j=0;j<2;j++) invjac[i][j]=itmp[i][j];
+      for (int i=0;i<3;i++) { invjac[i][2]=0.; invjac[2][i]=0.; }
+    }
 
     double Grads[4][3];
 
@@ -943,7 +1107,9 @@ namespace MAd {
 
     double scaleFactor = pow( detJ0 / detJ, chi);
     if ( scaleFactor > 1.e12 || scaleFactor < 1.e-12 ) {
-      cout <<"Warning in MAdElasticity: scale factor for element stiffness is "<<scaleFactor<<endl;
+      MAdMsgSgl::instance().warning(__LINE__,__FILE__,
+                                    "Scale factor for element stiffness is %e",
+                                    scaleFactor);
     }
 
     m.scale ( scaleFactor );
diff --git a/Adapt/repositioning/MAdElasticityOp.h b/Adapt/repositioning/MAdElasticityOp.h
index d82aafc..d5fad30 100644
--- a/Adapt/repositioning/MAdElasticityOp.h
+++ b/Adapt/repositioning/MAdElasticityOp.h
@@ -104,8 +104,10 @@ namespace MAd {
     int generateVertexIds();
     void collectBCVertices(std::set<pVertex> * bcVerts);
   
-    void element3DMatrix (pRegion pr, smallMatrix& m) const;
-    void addToMatrix(const pRegion, int, MAdLinearSystemDef *);
+    void elementMatrix (pEntity pe, smallMatrix& m) const;
+//     void element2DMatrix (pFace pr, smallMatrix& m) const;
+//     void element3DMatrix (pRegion pr, smallMatrix& m) const;
+    void addToMatrix(const pEntity, int, MAdLinearSystemDef *);
     void allocateMatrix(int, MAdLinearSystemDef *);
 
     void setVertexResult(int, pVertex, const MAdLinearSystemDef *);
@@ -117,7 +119,7 @@ namespace MAd {
     bool checkVolumes(double ratio);
     void relocate(double ratio);
 
-  private:
+  protected:
 
     pMesh mesh;
     int dim;
@@ -135,7 +137,7 @@ namespace MAd {
 
     bool cavityEqualMesh;
     int cavityThickness;
-    std::set<pRegion> cavity;
+    std::set<pEntity> cavity;
 
     std::map<pVertex,smallVector > dirichlet;
     std::map<pVertex,smallVector > relocations;
diff --git a/Adapt/repositioning/MobileObject.cc b/Adapt/repositioning/MobileObject.cc
index aa731ea..0553180 100644
--- a/Adapt/repositioning/MobileObject.cc
+++ b/Adapt/repositioning/MobileObject.cc
@@ -12,6 +12,11 @@
 
 #include "MobileObject.h"
 #include "NodalDataManager.h"
+#include "VertexMoveOp.h"
+#include "MAdElasticityOp.h"
+#include "DistanceFunction.h"
+
+#include "MAdStringFieldEvaluator.h"
 
 #include <iostream>
 using std::cerr;
@@ -24,6 +29,7 @@ using std::list;
 using std::pair;
 using std::vector;
 using std::string;
+#include <stdlib.h>
 
 namespace MAd {
 
diff --git a/Adapt/repositioning/MobileObject.h b/Adapt/repositioning/MobileObject.h
index 8621260..e4da972 100644
--- a/Adapt/repositioning/MobileObject.h
+++ b/Adapt/repositioning/MobileObject.h
@@ -14,11 +14,9 @@
 #ifndef _H_MOBILEOBJECT
 #define _H_MOBILEOBJECT
 
-#include "VertexMoveOp.h"
-#include "MAdStringFieldEvaluator.h"
+#include "MeshDataBaseInterface.h"
+#include "AdaptInterface.h"
 #include "LocalSizeField.h"
-#include "MSops.h"
-#include "MAdElasticityOp.h"
 
 #include <set>
 #include <list>
@@ -28,6 +26,25 @@
 
 namespace MAd {
 
+  class MAdElasticityOp;
+  class MAdStringFieldEvaluator;
+
+  // -------------------------------------------------------------------
+  // GCTODO: rewrite it simpler
+  struct vDisplacement
+  {
+    vDisplacement(const vDisplacement&);
+    vDisplacement(pVertex, double[3]);
+    void scale(double);
+    pVertex pv;
+    double dxyz[3];    // displacement
+  };
+
+  struct vDisplacementLess
+  {
+    bool operator() (const vDisplacement&, const vDisplacement&) const;
+  };
+
   // ----------------------------------------------------------------------
   enum velocityFormulation {
     NOFORMULATION,
diff --git a/Adapt/sizeField/AnalyticalSField.cc b/Adapt/sizeField/AnalyticalSField.cc
index 28f5b4a..6246a3f 100644
--- a/Adapt/sizeField/AnalyticalSField.cc
+++ b/Adapt/sizeField/AnalyticalSField.cc
@@ -16,6 +16,8 @@
 #include "AnisoMeshSize.h"
 #include "MathUtils.h"
 #include "MAdMessage.h"
+#include "MAdStringFieldEvaluator.h"
+#include "MAdDefines.h"
 
 #include <math.h>
 #include <stdio.h>
diff --git a/Adapt/sizeField/AnalyticalSField.h b/Adapt/sizeField/AnalyticalSField.h
index 8fb179f..62b3768 100644
--- a/Adapt/sizeField/AnalyticalSField.h
+++ b/Adapt/sizeField/AnalyticalSField.h
@@ -15,12 +15,13 @@
 #define _H_ANALYTICALSFIELD
 
 #include "SizeFieldBase.h"
-#include "MAdStringFieldEvaluator.h"
 
 #include <vector>
 
 namespace MAd {
 
+  class MAdStringFieldEvaluator;
+
   // -------------------------------------------------------------------
   typedef pMSize (*sizeFunction)(const double[3],double);
 
diff --git a/Adapt/sizeField/AnisoMeshSize.cc b/Adapt/sizeField/AnisoMeshSize.cc
index f494fc9..fff47b3 100644
--- a/Adapt/sizeField/AnisoMeshSize.cc
+++ b/Adapt/sizeField/AnisoMeshSize.cc
@@ -16,6 +16,7 @@
 #include "MAdDefines.h"
 #include "MeshParametersManager.h"
 
+#include <math.h>
 #include <iostream>
 using std::string;
 
@@ -169,7 +170,7 @@ namespace MAd {
     doubleVector S = doubleVector(3);
     M.eig(V,S,true);
     double s = 1. / sqrt( S(i) );
-    if ( std::isnan(s) ) return MeshParametersManagerSgl::instance().getBigLength();
+    if ( isnan(s) ) return MeshParametersManagerSgl::instance().getBigLength();
     return s;
   }
 
@@ -181,7 +182,7 @@ namespace MAd {
     M.eig(V,S,true);
     for (int i=0; i<3; i++) {
       _h[i] = ( 1. / sqrt( S(i) ) );
-      if ( std::isnan(_h[i]) ) _h[i] = MeshParametersManagerSgl::instance().getBigLength();
+      if ( isnan(_h[i]) ) _h[i] = MeshParametersManagerSgl::instance().getBigLength();
     }
   }
 
@@ -193,7 +194,7 @@ namespace MAd {
     M.eig(V,S,true); // each column of V is a direction, S gives corresponding 1/h^2
     for (int iC=0; iC<3; iC++) dir[iC] = V(iC,i);
     double s = 1. / sqrt( S(i) );
-    if ( std::isnan(s) ) return MeshParametersManagerSgl::instance().getBigLength();
+    if ( isnan(s) ) return MeshParametersManagerSgl::instance().getBigLength();
     return s;
   }
 
diff --git a/Adapt/sizeField/BackgroundSF.cc b/Adapt/sizeField/BackgroundSF.cc
new file mode 100644
index 0000000..ec2a127
--- /dev/null
+++ b/Adapt/sizeField/BackgroundSF.cc
@@ -0,0 +1,324 @@
+// -------------------------------------------------------------------
+// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+//
+// See the Copyright.txt and License.txt files for license information. 
+// You should have received a copy of these files along with MAdLib. 
+// If not, see <http://www.madlib.be/license/>
+//
+// Please report all bugs and problems to <contrib at madlib.be>
+//
+// Authors: Gaetan Compere, Jean-Francois Remacle
+// -------------------------------------------------------------------
+
+#include "BackgroundSF.h"
+#include "IsoMeshSize.h"
+#include "MAdDefines.h"
+
+#include <math.h>
+#include <cmath>
+#include <string.h>
+#include <map>
+
+namespace MAd {
+
+  // -------------------------------------------------------------------
+  BackgroundSF::BackgroundSF(std::string _name): 
+    SizeFieldBase(_name), bgModel(NULL), bgMesh(NULL)
+  {
+    pMSizeFieldId = MD_newMeshDataId("");
+  }
+
+  // -------------------------------------------------------------------
+  BackgroundSF::~BackgroundSF()
+  {
+    MD_deleteMeshDataId(pMSizeFieldId);
+    if ( bgMesh ) M_delete(bgMesh);
+    if ( bgModel ) GM_delete(bgModel);
+  }
+
+  // -------------------------------------------------------------------
+  void BackgroundSF::setSize(pEntity ent, double h)
+  {
+    pMSize pS = new IsoMeshSize(h);
+    setSize(ent,pS);
+  }
+
+  // -------------------------------------------------------------------
+  void BackgroundSF::setSize(pEntity pEnt, pMSize pS)
+  {
+    void * temp;
+    if( EN_getDataPtr(pEnt,pMSizeFieldId,&temp) ) {
+      delete (pMSize)temp;
+      EN_modifyDataPtr(pEnt,pMSizeFieldId,pS);
+    }
+    else {
+      EN_attachDataPtr(pEnt,pMSizeFieldId,pS);
+    }
+  }
+
+  // -------------------------------------------------------------------
+  // GC warning: very low implementation: should use octrees
+  pMSize BackgroundSF::getSize(const pVertex pv) const
+  {
+    if ( M_dim(bgMesh) < 3 ) {
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "Background size fields not implemented for dim < 3");
+    }
+
+    double xyz[3];
+    V_coord(pv,xyz);
+
+    pRegion pr;
+    pRegion rBest = NULL;
+    {
+      RIter rit = M_regionIter(bgMesh);
+      while( ( pr = RIter_next(rit) ) )
+        {
+          if ( !R_inBox(pr,xyz,1.e-6) ) continue;
+          if ( !R_contains(pr,xyz,1.e-6) ) continue;
+          rBest = pr;
+          break;
+        }
+      RIter_delete(rit);
+    }
+    if ( !rBest ) {
+    
+      double best = 1.e12;
+      double tmp[4], tmp2;
+      RIter rit = M_regionIter(bgMesh);
+      while( ( pr = RIter_next(rit) ) )
+        {
+          R_linearParams(pr,xyz,tmp);
+          tmp[3] = 1. - tmp[0] - tmp[1] - tmp[2];
+          
+          double mi = std::min(tmp[0],std::min(tmp[1],std::min(tmp[2],tmp[3])));
+          double ma = std::max(tmp[0],std::max(tmp[1],std::max(tmp[2],tmp[3])));
+        
+          tmp2 = 0.;
+          if ( mi < 0. ) tmp2 = std::abs(mi);
+          if ( ma > 1. ) tmp2 = std::max(tmp2,ma-1.);
+
+          if ( tmp2 < best ) {
+            best = tmp2;
+            rBest = pr;
+          }
+        }
+      RIter_delete(rit);
+    }
+
+    void * temp;
+    if( EN_getDataPtr((pEntity)rBest,pMSizeFieldId,&temp) ) {
+      return MS_copy((pMSize)temp);
+    }
+    return NULL;
+  }
+
+  // -------------------------------------------------------------------
+  void BackgroundSF::loadData(std::string mshName)
+  {
+    GM_create(&bgModel,"bgModel");
+    bgMesh = M_new(bgModel);
+    M_load(bgMesh,mshName.c_str());
+
+    FILE * fp = fopen(mshName.c_str(),"r");
+    if(!fp) {
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "Unknown file %s",mshName.c_str());
+    }
+
+#ifdef PARALLEL
+    MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                "Set sizes from file not implemented in parallel"); 
+#endif
+    
+    char str[256] = "XXX";
+    double version = 1.0;
+    
+    std::map<int,pEntity> elId;
+
+    while(1) {
+
+      while(str[0] != '$') {
+        if(!fgets(str, sizeof(str), fp) || feof(fp)) {
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                      "No data section found in file %s",
+                                      mshName.c_str());
+        }
+      }
+
+      if(!strncmp(&str[1], "MeshFormat", 10)) {
+        if(!fgets(str, sizeof(str), fp)) throw;
+        int format, size;
+        if(sscanf(str, "%lf %d %d", &version, &format, &size) != 3) throw;
+      }
+      else if(!strncmp(&str[1], "ELM", 3) || !strncmp(&str[1], "Elements", 8)) {
+        if(!fgets(str, sizeof(str), fp)) throw;
+        int numElements;
+        sscanf(str, "%d", &numElements);
+
+        for(int i = 0; i < numElements; i++) {
+          int num, type, physical = 0, elementary = 0, partition = 0, numV;
+          if(version <= 1.0){
+            fscanf(fp, "%d %d %d %d %d", &num, &type, &physical, &elementary, &numV);
+          }
+          else{
+            int numTags;
+            fscanf(fp, "%d %d %d", &num, &type, &numTags);
+            //	  printf("%d %d %d\n", num, type, numTags);
+            //	  getchar();
+            for(int j = 0; j < numTags; j++){
+              int tag;
+              fscanf(fp, "%d", &tag);       
+              if(j == 0)      physical = tag;
+              else if(j == 1) elementary = tag;
+              else if(j == 2) partition = tag;
+              // ignore any other tags for now
+            }
+            if (type == 15) numV = 1;
+            else if (type == 1) numV = 2;
+            else if (type == 2) numV = 3;
+            else if (type == 3) numV = 4;
+            else if (type == 4) numV = 4;
+            else throw;
+          }
+
+          int indices[60];
+          for(int j = 0; j < numV; j++) fscanf(fp, "%d", &indices[j]);
+	
+          if ( M_dim(bgMesh) == 3 && type == 4 ){
+            pRegion pr = M_region( bgMesh, indices );
+            if ( !pr ) printf("didn't find element with nodes %d %d %d %d\n",indices[0],indices[1],indices[2],indices[3]);
+            elId[num] = (pEntity)pr;
+          }
+          else if ( M_dim(bgMesh) == 2 && type == 2 ){
+            pFace pf = M_face(  bgMesh, indices );
+            elId[num] = (pEntity)pf;
+          }
+        }
+      }
+//       else if(!strncmp(&str[1], "NodeData", 8)) {
+
+//         int numStringTags;
+//         fscanf(fp,"%d\n",&numStringTags);
+//         char dummy[256];
+//         for (int i=0;i<numStringTags;i++){
+//           fgets(dummy,256,fp);
+//         }
+
+//         int numDoubleTags;
+//         fscanf(fp,"%d\n",&numDoubleTags);
+//         for (int i=0;i<numDoubleTags;i++){
+//           fgets(dummy,256,fp);
+//         }
+
+//         int numIntTags;
+//         fscanf(fp,"%d\n",&numIntTags);
+//         int numDataVertices;
+//         for (int i=0;i<numIntTags;i++){	
+//           if (i == 2)fscanf(fp,"%d",&numDataVertices);
+//           else fgets(dummy,256,fp);
+//         }
+
+//         if ( M_numVertices(bgMesh) != numDataVertices ) {
+//           MAdMsgSgl::instance().error(__LINE__,__FILE__,
+//                                       "Data available for %d vertices in file %s while there are %d vertices in the mesh",
+//                                       numDataVertices, mshName.c_str(),
+//                                       M_numVertices(bgMesh));
+//         }
+
+//         for (int i=0; i<numDataVertices; i++) {
+//           double dData;
+//           int vId;
+//           fscanf(fp,"%d %lf",&vId,&dData);
+//           setSize(vId,dData);
+//         }
+
+//         break;
+//       }
+      
+      else if(!strncmp(&str[1], "ElementData", 11)) {
+
+        int numStringTags;
+        fscanf(fp,"%d\n",&numStringTags);
+        char dummy[256];
+        for (int i=0;i<numStringTags;i++){
+          fgets(dummy,256,fp);
+        }
+
+        int numDoubleTags;
+        fscanf(fp,"%d\n",&numDoubleTags);
+        for (int i=0;i<numDoubleTags;i++){
+          fgets(dummy,256,fp);
+        }
+
+        int numIntTags;
+        fscanf(fp,"%d\n",&numIntTags);
+        int numDataEl;
+        for (int i=0;i<numIntTags;i++){	
+          if (i == 2)fscanf(fp,"%d",&numDataEl);
+          else fgets(dummy,256,fp);
+        }
+
+        int nElem = M_numRegions(bgMesh);
+        if ( !nElem ) nElem = M_numFaces(bgMesh);
+        if ( nElem != numDataEl ) {
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                      "Data available for %d elements in file %s while there are %d elements in the mesh",
+                                      numDataEl, mshName.c_str(), nElem );
+        }
+
+        for (int i=0; i<nElem; i++) {
+          double dData;
+          int eId;
+          fscanf(fp,"%d %lf",&eId,&dData);
+          pEntity pe = elId[eId];
+          setSize(pe,dData);
+        }
+
+        break;
+      }
+    
+      do {
+        if(!fgets(str, sizeof(str), fp) || feof(fp)) {
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                      "No data section found in file %s",
+                                      mshName.c_str());
+        }
+      } while(str[0] != '$');
+    }
+      
+    fclose(fp);
+    
+  }
+
+  // -------------------------------------------------------------------
+  void BackgroundSF::redistributeToVertices()
+  {
+    VIter vIter = M_vertexIter(bgMesh);
+    while( pVertex pV = VIter_next(vIter) )
+      {
+        pPList vRegs = V_regions(pV);
+        void * tmp = NULL;
+        pRegion pr;
+        void * ms;
+        double h = 0.;
+        int count = 0;
+        while ( ( pr = (pRegion)PList_next(vRegs,&tmp) ) ) {
+          EN_getDataPtr( (pEntity)pr, pMSizeFieldId, &ms);
+          if ( !ms ) {
+            MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                        "No size defined for an entity");
+          }
+          h += ((pMSize)ms)->getMeanLength();
+          count++;
+        }
+        PList_delete(vRegs);
+        h /= (double)count;
+        setSize((pEntity)pV,h);
+      }
+    VIter_delete(vIter);
+    
+  }
+
+  // -------------------------------------------------------------------
+}
diff --git a/Adapt/sizeField/NullSField.h b/Adapt/sizeField/BackgroundSF.h
similarity index 57%
copy from Adapt/sizeField/NullSField.h
copy to Adapt/sizeField/BackgroundSF.h
index ff1e9b3..705729f 100644
--- a/Adapt/sizeField/NullSField.h
+++ b/Adapt/sizeField/BackgroundSF.h
@@ -11,56 +11,65 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#ifndef _H_NULLSFIELD
-#define _H_NULLSFIELD
+#ifndef _H_BACKGROUNDSF
+#define _H_BACKGROUNDSF
 
 #include "SizeFieldBase.h"
 
 namespace MAd {
 
   // -------------------------------------------------------------------
-  class NullSField : public SizeFieldBase
+  class BackgroundSF: public SizeFieldBase
   {
   public:
 
-    NullSField(): SizeFieldBase() {}
-    ~NullSField() {}
+    BackgroundSF(std::string _name="");
+    ~BackgroundSF();
 
-    sFieldType getType() const { return NULLSFIELD; }
+    void loadData(std::string fileName);
+
+  public:
+
+    sFieldType getType() const { return BACKGROUNDSFIELD; }
+
+    void scale(double) {throw;}
+
+    // get the size at a location (allocate space!)
+    pMSize getSize(const pVertex) const;
+    pMSize getSizeOnEntity(const pEntity, const double[3]) const { throw; return 0; }
 
     // edge length (squared)
-    double SF_VV_lengthSq(const pVertex, const pVertex) const;
+    double SF_VV_lengthSq(const pVertex, const pVertex) const { throw; return -1.; }
     double SF_XYZ_lengthSq(const double[3], const double[3],
-                           const pMSize, const pMSize=NULL) const;
+                           const pMSize, const pMSize=NULL) const { throw; return -1.; }
 
     // face area (squared)
-    double SF_F_areaSq(const pFace) const;
+    double SF_F_areaSq(const pFace) const { throw; return -1.; }
     double SF_XYZ_areaSq(const double[3][3], const pMSize,
-                         const double[3]) const;
+                         const double[3]) const { throw; return -1.; }
 
     // region volume
-    double SF_R_volume(const pRegion) const;
-    double SF_XYZ_volume(const double[4][3], const pMSize) const;
+    double SF_R_volume(const pRegion) const { throw; return -1.; }
+    double SF_XYZ_volume(const double[4][3], const pMSize) const { throw; return -1.; }
 
     // center and its associated size
-    double SF_E_center(const pEdge, double[3], double * reducSq, pMSize *) const;
+    double SF_E_center(const pEdge, double[3], double * reducSq, pMSize *) const { throw; return -1.; }
     double SF_VV_center(const pVertex, const pVertex,
-                        double[3], double * reducSq, pMSize *) const;
+                        double[3], double * reducSq, pMSize *) const { throw; return -1.; }
 
-  public: // functions that have no sense here...
+  private:
 
-    void scale(double) {return;}
+    void setSize(pEntity, pMSize);
+    void setSize(pEntity, double);
 
-    void setSize(pEntity, pMSize) {return;}
-    void setSize(pEntity, double) {return;}
-    void deleteSize(pEntity) {return;}
+    void redistributeToVertices();
 
-    pMSize getSize(const pVertex) const {return NULL;}
-    pMSize getSizeOnEntity(const pEntity, const double[3]) const {return NULL;};
+    pGModel bgModel;
+    pMesh bgMesh;
+    pMeshDataId pMSizeFieldId;
   };
 
 }
 
 // -------------------------------------------------------------------
-
 #endif
diff --git a/Adapt/sizeField/DiscreteSF.cc b/Adapt/sizeField/DiscreteSF.cc
index 420f3b4..a811c96 100644
--- a/Adapt/sizeField/DiscreteSF.cc
+++ b/Adapt/sizeField/DiscreteSF.cc
@@ -76,5 +76,13 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
+  void DiscreteSF::setSize(int id, double h)
+  {
+    pVertex pv = M_vertex(mesh,id);
+    pMSize pS = new IsoMeshSize(h);
+    setSize((pEntity)pv,pS);
+  }
+
+  // -------------------------------------------------------------------
 
 }
diff --git a/Adapt/sizeField/DiscreteSF.h b/Adapt/sizeField/DiscreteSF.h
index 1a839c9..d3a7bdc 100644
--- a/Adapt/sizeField/DiscreteSF.h
+++ b/Adapt/sizeField/DiscreteSF.h
@@ -16,6 +16,8 @@
 
 #include "SizeFieldBase.h"
 
+#include <string>
+
 namespace MAd {
 
   // -------------------------------------------------------------------
@@ -60,6 +62,7 @@ namespace MAd {
     void setSize(pEntity, double[3][3], double[3]);
     void setSize(pEntity, pMSize);
     void setSize(pEntity, double);
+    void setSize(int, double);
 
     // get the size at a location (allocate space!)
     virtual pMSize getSize(const pVertex) const = 0;
diff --git a/Adapt/sizeField/LocalSizeField.cc b/Adapt/sizeField/LocalSizeField.cc
index 584288f..8fa5b6e 100644
--- a/Adapt/sizeField/LocalSizeField.cc
+++ b/Adapt/sizeField/LocalSizeField.cc
@@ -18,6 +18,8 @@
 #include "MeshParametersManager.h"
 #include "MAdTimeManager.h"
 #include "MAdResourceManager.h"
+#include "DistanceFunction.h"
+#include "MAdStringFieldEvaluator.h"
 
 #include <iostream>
 using std::cerr;
@@ -481,7 +483,7 @@ namespace MAd {
             while (pVertex pv = VIter_next(vit))
               {
                 if ( EN_whatIn((pEntity)pv) == *it ) {
-                  ents->insert(pv);
+                  ents->insert((pEntity)pv);
                   verts->insert(pv);
                 }
               }
@@ -495,7 +497,7 @@ namespace MAd {
               {
                 if ( EN_whatIn((pEntity)pe) == *it )
                   {
-                    ents->insert(pe);
+                    ents->insert((pEntity)pe);
                     verts->insert(E_vertex (pe,0));
                     verts->insert(E_vertex (pe,1));
                   }
@@ -509,7 +511,7 @@ namespace MAd {
               {
                 if ( EN_whatIn((pEntity)pf) == *it )
                   {
-                    ents->insert(pf);
+                    ents->insert((pEntity)pf);
                     verts->insert(F_vertex (pf,0));
                     verts->insert(F_vertex (pf,1));
                     verts->insert(F_vertex (pf,2));
@@ -524,7 +526,7 @@ namespace MAd {
               {
                 if ( EN_whatIn((pEntity)pr) == *it )
                   {
-                    ents->insert(pr);
+                    ents->insert((pEntity)pr);
                     verts->insert(R_vertex (pr,0));
                     verts->insert(R_vertex (pr,1));
                     verts->insert(R_vertex (pr,2));
diff --git a/Adapt/sizeField/LocalSizeField.h b/Adapt/sizeField/LocalSizeField.h
index a6f3162..02203da 100644
--- a/Adapt/sizeField/LocalSizeField.h
+++ b/Adapt/sizeField/LocalSizeField.h
@@ -16,7 +16,6 @@
 
 #include "SizeFieldBase.h"
 #include "DistanceFunction.h"
-#include "MAdStringFieldEvaluator.h"
 
 #include <set>
 #include <utility>
@@ -42,6 +41,8 @@
 
 namespace MAd {
 
+  class MAdStringFieldEvaluator;
+
   // -------------------------------------------------------------------
   class LocalSizeField : public SizeFieldBase {
 
@@ -60,7 +61,7 @@ namespace MAd {
 
     void setIsoSize(double _radius, std::string _sizeN);
     void setAnisoSize(double _radius, std::string _sizeN, std::string _sizeT);
-    void setCurvatureLimiter(double onTgSize, double _maxCurv=MAdBIG);
+    void setCurvatureLimiter(double onTgSize, double _maxCurv=1.e12);
 
     // get the size at a location (allocate space!)
     pMSize getSize(const pVertex) const;
diff --git a/Adapt/sizeField/PWLinearSField.cc b/Adapt/sizeField/PWLinearSField.cc
index ecce2fd..9ac7ead 100644
--- a/Adapt/sizeField/PWLinearSField.cc
+++ b/Adapt/sizeField/PWLinearSField.cc
@@ -11,7 +11,7 @@
 // -------------------------------------------------------------------
 
 #include "PWLinearSField.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 #include "IsoMeshSize.h"
 #include "AnisoMeshSize.h"
 #include "MathUtils.h"
@@ -25,9 +25,13 @@ using std::cout;
 using std::cerr;
 using std::endl;
 #include <queue>
+#include <stdlib.h>
+#include <string.h>
 
 using namespace MAd;
 
+static int PWLSFDE_tag = 86586745;
+
 // -------------------------------------------------------------------
 void PWLinearSFCBFunction (pPList before, pPList after, void * data,
                            operationType type , pEntity ppp) 
@@ -62,7 +66,7 @@ void PWLinearSFCBFunction (pPList before, pPList after, void * data,
     void * temp = NULL;
     while ( pEntity pE = PList_next(before,&temp) ) {
       if ( EN_type(pE) == 0 ) {
-        pwl->deleteSize( (pVertex)pE );
+        pwl->deleteSize( pE );
       }
     }
     break;
@@ -116,7 +120,7 @@ namespace MAd {
         else {
           pMSize newS = MS_intersect(intS,extS);
           delete extS;
-          setSize(pV,newS);
+          setSize((pEntity)pV,newS);
         }
       }
     VIter_delete(iter);
@@ -203,7 +207,7 @@ namespace MAd {
   // -------------------------------------------------------------------
   void PWLSField::setCurvatureSize(bool aniso, double alpha, double hMin) 
   {
-    if ( !(mesh->isParametric()) ) {
+    if ( !(M_isParametric(mesh)) ) {
       MAdMsgSgl::instance().error(__LINE__,__FILE__,
                                   "Curvature not available without a geometry (mesh is not parametric");
     }
@@ -587,4 +591,58 @@ namespace MAd {
 
   // -------------------------------------------------------------------
 
+  // -------------------------------------------------------------------
+#ifdef PARALLEL
+  PWLSFieldDE::PWLSFieldDE(PWLSField *f) : 
+    MDB_DataExchanger(PWLSFDE_tag), field(f) {}
+  
+  PWLSFieldDE::~PWLSFieldDE() {}
+  
+  // user allocates sends a message of _size size related to mesh entity pe to proc iProc
+  void * PWLSFieldDE::sendData (pEntity pe,    // in
+                                int iProcDest, // in
+                                int &_size ) {
+    if(EN_type(pe)==0){
+      pMSize pS = field->findSize((pVertex) pe);
+      if ( pS->getType() == ANISOTROPIC ) {
+        MAdMsgSgl::instance().warning(__LINE__,__FILE__,
+                                      "Anisotropic sizes exchange not implemented");
+      }
+      _size = sizeof(double);
+      double *msg = (double * )malloc(_size);
+      double size = pS->size(0);
+      msg[0] = size;
+      return msg;
+    } 
+    else {
+      _size = 0;
+      return 0;
+    }
+  }
+  
+  // mesh entity pe recieves data *buf form proc iProc.
+  // The user shall NOT delete the message !!
+  void PWLSFieldDE::receiveData (pEntity pe,      //in
+                                 int iProcSender, //in
+                                 void *buf ) {
+    if(EN_type(pe)==0){
+      double *msg = (double *) buf;
+      if(buf){
+        field->setSize((pEntity)pe,msg[0]);
+      }
+    }
+    //pEntity * msg = (pEntity *) buf;
+    //assert(pe==*msg);
+  }
+  
+  // After migration  and if the entity is deleted on the proc,
+  // the related data should be removed to avoid memory leak
+  void PWLSFieldDE::deleteExternalData(pEntity pe) const {
+    if(EN_type(pe)==0){ 
+      pMSize pS = field->findSize((pVertex) pe);
+      if( pS ) delete pS;
+    }
+  }
+#endif
+  
 }
diff --git a/Adapt/sizeField/PWLinearSField.h b/Adapt/sizeField/PWLinearSField.h
index d254cc1..d7650cd 100644
--- a/Adapt/sizeField/PWLinearSField.h
+++ b/Adapt/sizeField/PWLinearSField.h
@@ -15,6 +15,9 @@
 #define _H_PWLINEARSFIELD
 
 #include "DiscreteSF.h"
+#ifdef PARALLEL
+#include "MeshDataBaseComm.h"
+#endif
 
 #include <set>
 
@@ -86,8 +89,30 @@ namespace MAd {
     pMSize getSizeOnRegionParam(const pRegion, const double[3]) const;
 
     void smoothOnEdge(const pEdge, double, std::set<pEdge>*);
+  };
 
+  // -------------------------------------------------------------------
+#ifdef PARALLEL
+  class PWLSFieldDE : public MDB_DataExchanger
+  {
+  public :
+    
+    PWLSField *field;
+    
+    PWLSFieldDE(PWLSField *f);
+    virtual ~PWLSFieldDE();
+    
+    virtual void * sendData (pEntity pe,    // in
+                             int iProcDest, // in
+                             int &_size );
+    
+    virtual void receiveData (pEntity pe,      //in
+                              int iProcSender, //in
+                              void *buf );
+    
+    virtual void deleteExternalData(pEntity pe) const;
   };
+#endif
 
 }
 
diff --git a/Mesh/MSops.h b/Adapt/sizeField/SizeField.h
similarity index 69%
rename from Mesh/MSops.h
rename to Adapt/sizeField/SizeField.h
index 77ef95f..d5596b1 100644
--- a/Mesh/MSops.h
+++ b/Adapt/sizeField/SizeField.h
@@ -8,11 +8,12 @@
 //
 // Please report all bugs and problems to <contrib at madlib.be>
 //
-// Authors: Jean-Francois Remacle, Gaetan Compere
+// Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#ifndef _MESHDATABASE_OPS
-#define _MESHDATABASE_OPS
-#include "ModelInterface.h"
-#include "MeshDataBaseInterface.h"
-#endif
+#include "SizeFieldBase.h"
+#include "DiscreteSF.h"
+#include "PWLinearSField.h"
+#include "LocalSizeField.h"
+#include "AnalyticalSField.h"
+#include "BackgroundSF.h"
diff --git a/Adapt/sizeField/SizeFieldBase.cc b/Adapt/sizeField/SizeFieldBase.cc
index b8b7dc8..7a1253a 100644
--- a/Adapt/sizeField/SizeFieldBase.cc
+++ b/Adapt/sizeField/SizeFieldBase.cc
@@ -13,6 +13,7 @@
 #include "SizeFieldBase.h"
 #include "MAdOutput.h"
 #include "MathUtils.h"
+#include "MeshSizeBase.h"
 
 using std::string;
 
diff --git a/Adapt/sizeField/SizeFieldBase.h b/Adapt/sizeField/SizeFieldBase.h
index 74aab5f..c65c9fd 100644
--- a/Adapt/sizeField/SizeFieldBase.h
+++ b/Adapt/sizeField/SizeFieldBase.h
@@ -14,9 +14,7 @@
 #ifndef _H_SIZEFIELDBASE
 #define _H_SIZEFIELDBASE
 
-#include "MeshSizeBase.h"
-#include "MSops.h"
-#include "MAdDefines.h"
+#include "MeshDataBaseInterface.h"
 
 #include <string>
 
@@ -28,11 +26,13 @@ namespace MAd {
     NULLSFIELD,
     DISCRETESFIELD,
     ANALYTICALSFIELD,
-    LOCALSFIELD
+    LOCALSFIELD,
+    BACKGROUNDSFIELD
   };
 
   // -------------------------------------------------------------------
   typedef class SizeFieldBase * pSField;
+  typedef class MeshSizeBase  * pMSize;
 
   // -------------------------------------------------------------------
   class SizeFieldBase 
diff --git a/Adapt/sizeField/SizeFieldManager.cc b/Adapt/sizeField/SizeFieldManager.cc
index d69a5c9..98ab20f 100644
--- a/Adapt/sizeField/SizeFieldManager.cc
+++ b/Adapt/sizeField/SizeFieldManager.cc
@@ -15,6 +15,7 @@
 #include "MAdTimeManager.h"
 #include "MeshQualityManager.h"
 #include "MAdMessage.h"
+#include "MeshSizeBase.h"
 
 #include <iostream>
 using std::cerr;
@@ -62,8 +63,14 @@ namespace MAd {
         addLocalSF( locsf );
         break;
       }
+      case BACKGROUNDSFIELD: {
+        BackgroundSF* bg = static_cast<BackgroundSF*>(psf);
+        addBGSF( bg );
+        break;
+      }
       default: {
-        cerr <<"Error: unknown size field type "<<type<<"\n"; throw;
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "unknown size field type %d", type);
       }
       }
     }  
@@ -76,6 +83,7 @@ namespace MAd {
     linears.clear();
     analyticals.clear();
     locals.clear();
+    bgs.clear();
   }
 
   // -------------------------------------------------------------------
@@ -117,6 +125,11 @@ namespace MAd {
       addLocalSF( locsf );
       break;
     }
+    case BACKGROUNDSFIELD: {
+      BackgroundSF* bg = static_cast<BackgroundSF*>(sf);
+      addBGSF( bg );
+      break;
+    }
     default: {
       MAdMsgSgl::instance().error(__LINE__,__FILE__,
                                   "Unknown size field type %d",type);
@@ -140,6 +153,11 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
+  void SizeFieldManager::addBGSF(BackgroundSF* sf) {
+    bgs.insert(sf);
+  }
+
+  // -------------------------------------------------------------------
   void SizeFieldManager::update()
   {
     MeshQualityManagerSgl::instance().clearAllShapes(); // not useful in isotropic case (be careful about the hypothesis)
@@ -165,6 +183,12 @@ namespace MAd {
       mainSF->intersect(*locIter);
     }
 
+    set<BackgroundSF*>::iterator bgIter = bgs.begin();
+    set<BackgroundSF*>::iterator bgLast = bgs.end();
+    for (; bgIter != bgLast; bgIter++) {
+      mainSF->intersect(*bgIter);
+    }
+
     if ( smooth ) mainSF->smooth(maxGradient);
 
     localTime = MAdTimeManagerSgl::instance().getTime();
diff --git a/Adapt/sizeField/SizeFieldManager.h b/Adapt/sizeField/SizeFieldManager.h
index 99207fc..e15be53 100644
--- a/Adapt/sizeField/SizeFieldManager.h
+++ b/Adapt/sizeField/SizeFieldManager.h
@@ -18,6 +18,8 @@
 #include "PWLinearSField.h"
 #include "LocalSizeField.h"
 #include "AnalyticalSField.h"
+#include "BackgroundSF.h"
+#include "DistanceFunction.h"
 
 #include <set>
 
@@ -61,6 +63,7 @@ namespace MAd {
     void addPWLinearSF(PWLSField * sf);
     void addAnalyticalSF(AnalyticalSField * sf);
     void addLocalSF(LocalSizeField * sf);
+    void addBGSF(BackgroundSF * bg);
 
   private:
 
@@ -69,6 +72,7 @@ namespace MAd {
     std::set<PWLSField *>        linears;
     std::set<AnalyticalSField *> analyticals;
     std::set<LocalSizeField *>   locals;
+    std::set<BackgroundSF *>       bgs;
 
     pMesh mesh;
 
diff --git a/Adapt/utils/CallBackManager.h b/Adapt/utils/CallBackManager.h
deleted file mode 100644
index 2adb42a..0000000
--- a/Adapt/utils/CallBackManager.h
+++ /dev/null
@@ -1,89 +0,0 @@
-// -*- C++ -*-
-// -------------------------------------------------------------------
-// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-//
-// See the Copyright.txt and License.txt files for license information. 
-// You should have received a copy of these files along with MAdLib. 
-// If not, see <http://www.madlib.be/license/>
-//
-// Please report all bugs and problems to <contrib at madlib.be>
-//
-// Authors: Gaetan Compere, Jean-Francois Remacle
-// -------------------------------------------------------------------
-
-#ifndef _H_CALLBACKMANAGER
-#define _H_CALLBACKMANAGER
-
-#include "MAdOperatorBase.h"
-
-#include "MAdSingleton.h"
-
-#include "MSops.h"
-#include <list>
-
-namespace MAd {
-
-  // -------------------------------------------------------------------
-  // callback functions
-  typedef void (*CBFunction)(pPList, pPList, 
-                             void *, operationType, pEntity);
-  typedef void (*CBFunc_move)(pVertex, double *, void *);
-
-  // -------------------------------------------------------------------
-  struct CBStructure {
-
-    CBFunction function;
-    void* data;
-
-    bool operator== (CBStructure cb) const {
-      if ( function==cb.function && data==cb.data) return true;
-      return false;
-    }
-  };
-
-  // -------------------------------------------------------------------
-  struct CBStructureMove {
-    CBFunc_move function;
-    void* data;
-
-    bool operator== (CBStructureMove cbm) const {
-      if ( function==cbm.function && data==cbm.data) return true;
-      return false;
-    }
-  };
-
-  // -------------------------------------------------------------------
-  class CallBackManager {
-
-  public:
-  
-    CallBackManager() {};
-    ~CallBackManager() {};
-  
-    void initialize();
-    void finalize();
-
-    void registerCallBack(CBFunction CB, void* userData);
-    void registerCallBackMove(CBFunc_move CB_move, void* userData_move);
-
-    void unregisterCallBack(CBFunction CB, void* userData);
-    void unregisterCallBackMove(CBFunc_move CB_move, void* userData_move);
-
-    void callCallBacks(pPList before, pPList after,
-                       operationType type , pEntity ppp);
-    void callCallBackMoves(pVertex, double *);
-  
-  private:
-
-    std::list<CBStructure> CB;
-    std::list<CBStructureMove> CBMove;
-
-  };
-
-  // -------------------------------------------------------------------
-
-  typedef MAdSingleton<CallBackManager> CallBackManagerSgl;
-
-}
-
-#endif
diff --git a/Adapt/repositioning/NodesRepositioningOp.h b/Adapt/utils/CallbackDefinition.h
similarity index 55%
copy from Adapt/repositioning/NodesRepositioningOp.h
copy to Adapt/utils/CallbackDefinition.h
index ef5daf4..e30e0a5 100644
--- a/Adapt/repositioning/NodesRepositioningOp.h
+++ b/Adapt/utils/CallbackDefinition.h
@@ -11,48 +11,42 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#ifndef _H_NODESREPOSITIONINGOP
-#define _H_NODESREPOSITIONINGOP
+#ifndef _H_CALLBACKDEFINITION
+#define _H_CALLBACKDEFINITION
 
-#include "DiscreteSF.h"
-#include "MeshQualityManager.h"
 #include "MeshDataBaseInterface.h"
+#include "MAdOperations.h"
 
 namespace MAd {
 
   // -------------------------------------------------------------------
-  enum repositionType {
-    LAPLACE_FAST,
-    LAPLACE_OPTIMAL
-  };
+  // callback functions
+  typedef void (*CBFunction)(pPList, pPList, 
+                             void *, operationType, pEntity);
+  typedef void (*CBFunc_move)(pVertex, double *, void *);
 
   // -------------------------------------------------------------------
-  class nodesRepositioningOp {
+  struct CBStructure {
 
-  public:
+    CBFunction function;
+    void* data;
 
-    nodesRepositioningOp(pMesh m, DiscreteSF * sf): 
-      mesh(m), sizeField(sf), mqm(MeshQualityManagerSgl::instance())
-    {
-      dim = 3;
-      if ( M_numRegions(mesh) == 0 ) dim = 2;
+    bool operator== (CBStructure cb) const {
+      if ( function==cb.function && data==cb.data) return true;
+      return false;
     }
-    virtual ~nodesRepositioningOp() {}
-
-  public:
-
-    virtual int run(double * L2Norm)=0;
-
-  protected:
-
-    pMesh mesh;
-    int dim;
-    DiscreteSF * sizeField;
-    MeshQualityManager& mqm;
-
   };
 
   // -------------------------------------------------------------------
+  struct CBStructureMove {
+    CBFunc_move function;
+    void* data;
+
+    bool operator== (CBStructureMove cbm) const {
+      if ( function==cbm.function && data==cbm.data) return true;
+      return false;
+    }
+  };
 
 }
 
diff --git a/Adapt/utils/CallBackManager.cc b/Adapt/utils/CallbackManager.cc
similarity index 99%
rename from Adapt/utils/CallBackManager.cc
rename to Adapt/utils/CallbackManager.cc
index e69b8da..a4e4864 100644
--- a/Adapt/utils/CallBackManager.cc
+++ b/Adapt/utils/CallbackManager.cc
@@ -10,7 +10,7 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 
 using std::list;
 
diff --git a/Common/MAdMessage.h b/Adapt/utils/CallbackManager.h
similarity index 53%
copy from Common/MAdMessage.h
copy to Adapt/utils/CallbackManager.h
index 89c931f..dcbc9ef 100644
--- a/Common/MAdMessage.h
+++ b/Adapt/utils/CallbackManager.h
@@ -11,53 +11,47 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#ifndef _H_MESSAGE_MAD_
-#define _H_MESSAGE_MAD_
+#ifndef _H_CALLBACKMANAGER
+#define _H_CALLBACKMANAGER
 
 #include "MAdSingleton.h"
+#include "CallbackDefinition.h"
 
-#include <ostream>
 #include <list>
 
 namespace MAd {
 
   // -------------------------------------------------------------------
-  // abort function
-  typedef void (*AbortFunction)(void *);
-
-  // -------------------------------------------------------------------
-  class MAdMsg {
+  class CallBackManager {
 
   public:
-
-    MAdMsg();
-    ~MAdMsg() {}
+  
+    CallBackManager() {};
+    ~CallBackManager() {};
   
     void initialize();
     void finalize();
 
-    void registerAbortFct(AbortFunction, void *);
+    void registerCallBack(CBFunction CB, void* userData);
+    void registerCallBackMove(CBFunc_move CB_move, void* userData_move);
 
-    void info   (int, const char*, const char*,...) const;
-    void warning(int, const char*, const char*,...) const;
-    void error  (int, const char*, const char*,...) const;
-
-  private:
-
-    std::string writePosition(int, const char*) const;
+    void unregisterCallBack(CBFunction CB, void* userData);
+    void unregisterCallBackMove(CBFunc_move CB_move, void* userData_move);
 
+    void callCallBacks(pPList before, pPList after,
+                       operationType type , pEntity ppp);
+    void callCallBackMoves(pVertex, double *);
+  
   private:
 
-    std::ostream* outStream;
-    std::ostream* errStream;
-
-    std::list<std::pair<AbortFunction,void*> > abortFcts; 
+    std::list<CBStructure> CB;
+    std::list<CBStructureMove> CBMove;
 
   };
 
   // -------------------------------------------------------------------
 
-  typedef MAdSingleton<MAdMsg> MAdMsgSgl;
+  typedef MAdSingleton<CallBackManager> CallBackManagerSgl;
 
 }
 
diff --git a/Adapt/utils/DistanceFunction.cc b/Adapt/utils/DistanceFunction.cc
index 16b5f65..031a467 100644
--- a/Adapt/utils/DistanceFunction.cc
+++ b/Adapt/utils/DistanceFunction.cc
@@ -13,7 +13,9 @@
 
 #include "DistanceFunction.h"
 #include "MAdOutput.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
+#include "MeshSizeBase.h"
+#include "MAdDefines.h"
 
 namespace MAd {
 
diff --git a/Adapt/utils/DistanceFunction.h b/Adapt/utils/DistanceFunction.h
index 1e8b074..7fcb8ae 100644
--- a/Adapt/utils/DistanceFunction.h
+++ b/Adapt/utils/DistanceFunction.h
@@ -17,6 +17,7 @@
 #include "MeshDataBaseInterface.h"
 #include "DistanceToPoints.h"
 #include <set>
+#include <map>
 
 namespace MAd {
 
diff --git a/Adapt/utils/DistanceToPoints.h b/Adapt/utils/DistanceToPoints.h
index 149be91..30b6793 100644
--- a/Adapt/utils/DistanceToPoints.h
+++ b/Adapt/utils/DistanceToPoints.h
@@ -14,8 +14,10 @@
 #ifndef _H_DISTANCETOPOINTS
 #define _H_DISTANCETOPOINTS
 
+#include <stdio.h>
+
 #ifdef _HAVE_ANN_
-#include <ANN/ANN.h>
+#include "ANN.h"
 #endif
 
 namespace MAd {
@@ -123,6 +125,8 @@ namespace MAd {
         tmp[i] += eps;
         grad[i] = 1000. * ( dEps[1] - dEps[0] );
       }
+      
+      return dSq;
     }
 
     private:
diff --git a/Adapt/utils/MAdLinearSystemPETSc.h b/Adapt/utils/MAdLinearSystemPETSc.h
index f5a68e0..a33824f 100644
--- a/Adapt/utils/MAdLinearSystemPETSc.h
+++ b/Adapt/utils/MAdLinearSystemPETSc.h
@@ -26,6 +26,7 @@
 #include "petscmat.h"
 #include "petscvec.h"
 #include <iostream>
+#include <string>
 
 namespace MAd {
   class MAdLinearMatrixPETSc {
@@ -82,6 +83,14 @@ namespace MAd {
       //assemble();
       MatZeroEntries(mat);
     }
+    void print(std::string name)
+    {
+      printf("\nPrinting matrix %s:\n\n",name.c_str());
+      if ( !allocated ) {printf("Not allocated!\n"); return;}
+      if ( !assembled ) {printf("Not assembled!\n"); return;}
+
+      MatView(mat,PETSC_VIEWER_STDOUT_WORLD);
+    }
   };
   class MAdLinearVectorPETSc {
   private:
@@ -124,6 +133,11 @@ namespace MAd {
     void restore_array(){
       VecRestoreArray(vec,&entries);
     }
+    void print(std::string name)
+    {
+      printf("\nPrinting vector %s:\n\n",name.c_str());
+      VecView(vec,PETSC_VIEWER_STDOUT_WORLD);
+    }
   };
 
   // -------------------------------------------------------------------
@@ -193,6 +207,11 @@ namespace MAd {
       rhs->restore_array();
       X->restore_array();
       matrix->assemble();
+
+// #warning "debug"
+//       printMatrix();
+//       printRhs();
+
       std::string options;
       options="-pc_type bjacobi -sub_pc_type icc -ksp_type cg -ksp_rtol 1e-6";
 //      options="-pc_type hypre -pc_hypre_type boomeramg -pc_hypre_boomeramg_print_statistics -ksp_type gmres -ksp_rtol 1e-7 -ksp_monitor";
@@ -207,6 +226,16 @@ namespace MAd {
       return KSPGetConvergedReason(ksp,&reason);
     }
 
+    void printMatrix(std::string name="")
+    {
+      matrix->print("Left hand size");
+    }
+
+    void printRhs(std::string name="")
+    {
+      rhs->print("Right hand size");
+    }
+
   };
 }
 
diff --git a/Adapt/utils/NodalDataManager.cc b/Adapt/utils/NodalDataManager.cc
index cad2d15..95f0928 100644
--- a/Adapt/utils/NodalDataManager.cc
+++ b/Adapt/utils/NodalDataManager.cc
@@ -11,10 +11,9 @@
 // -------------------------------------------------------------------
 
 #include "NodalDataManager.h"
-#include "CallBackManager.h"
+#include "CallbackManager.h"
 #include "MAdOutput.h"
-
-#include "MSops.h"
+#include "MeshSizeBase.h"
 
 #include <iostream>
 using std::cerr;
@@ -98,7 +97,7 @@ namespace MAd {
           set<string>::const_iterator tLast = (*knownDataNames).end();
           for (; tIter != tLast; tIter++ ) {
             pMeshDataId dataId = MD_lookupMeshDataId((*tIter).c_str());
-            EN_deleteData( (pVertex)pE, dataId);
+            EN_deleteData(pE, dataId);
           }
         }
       }
@@ -199,7 +198,7 @@ namespace MAd {
             int gotit = EN_getDataPtr((pEntity)ppp, dataId,  &data);
             vector<double> * vec = (vector<double>*) data;
             if (gotit && vec) delete vec;
-            EN_deleteData((pVertex)pE, dataId);
+            EN_deleteData(pE, dataId);
           }
         }
       }
diff --git a/Adapt/utils/NodalDataManager.h b/Adapt/utils/NodalDataManager.h
index ad4cbd7..9608215 100644
--- a/Adapt/utils/NodalDataManager.h
+++ b/Adapt/utils/NodalDataManager.h
@@ -14,9 +14,8 @@
 #ifndef _H_NODALDATAMANAGER
 #define _H_NODALDATAMANAGER
 
-#include "MSops.h"
-
 #include "MAdSingleton.h"
+#include "MeshDataBaseInterface.h"
 
 #include <vector>
 #include <string>
diff --git a/Benchmarks/checkMesh/Makefile.am b/Benchmarks/checkMesh/Makefile.am
new file mode 100644
index 0000000..d2884ba
--- /dev/null
+++ b/Benchmarks/checkMesh/Makefile.am
@@ -0,0 +1,31 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+includedir = @includedir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_LIBS = @MAdLib_LIBS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+RM = @RM@
+
+bin_PROGRAMS = checkMesh
+
+checkMesh_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+checkMesh_SOURCES = main.cc
+
+checkMesh_LDADD = -L$(top_builddir) ${MAdLib_LIBS}
+
+purge:
+	${RM} *.msh *.geo *.pos
diff --git a/Benchmarks/checkMesh/Makefile.in b/Benchmarks/checkMesh/Makefile.in
new file mode 100644
index 0000000..a18b254
--- /dev/null
+++ b/Benchmarks/checkMesh/Makefile.in
@@ -0,0 +1,545 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = checkMesh$(EXEEXT)
+subdir = Benchmarks/checkMesh
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_checkMesh_OBJECTS = checkMesh-main.$(OBJEXT)
+checkMesh_OBJECTS = $(am_checkMesh_OBJECTS)
+am__DEPENDENCIES_1 =
+checkMesh_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(checkMesh_SOURCES)
+DIST_SOURCES = $(checkMesh_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+checkMesh_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+checkMesh_SOURCES = main.cc
+checkMesh_LDADD = -L$(top_builddir) ${MAdLib_LIBS}
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Benchmarks/checkMesh/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Benchmarks/checkMesh/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+checkMesh$(EXEEXT): $(checkMesh_OBJECTS) $(checkMesh_DEPENDENCIES) 
+	@rm -f checkMesh$(EXEEXT)
+	$(CXXLINK) $(checkMesh_OBJECTS) $(checkMesh_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/checkMesh-main.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+checkMesh-main.o: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(checkMesh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT checkMesh-main.o -MD -MP -MF $(DEPDIR)/checkMesh-main.Tpo -c -o checkMesh-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/checkMesh-main.Tpo $(DEPDIR)/checkMesh-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='checkMesh-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(checkMesh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o checkMesh-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+checkMesh-main.obj: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(checkMesh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT checkMesh-main.obj -MD -MP -MF $(DEPDIR)/checkMesh-main.Tpo -c -o checkMesh-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/checkMesh-main.Tpo $(DEPDIR)/checkMesh-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='checkMesh-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(checkMesh_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o checkMesh-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+purge:
+	${RM} *.msh *.geo *.pos
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Benchmarks/checkMesh/main.cc b/Benchmarks/checkMesh/main.cc
new file mode 100644
index 0000000..fe3cd12
--- /dev/null
+++ b/Benchmarks/checkMesh/main.cc
@@ -0,0 +1,78 @@
+// -------------------------------------------------------------------
+// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+//
+// See the Copyright.txt and License.txt files for license information. 
+// You should have received a copy of these files along with MAdLib. 
+// If not, see <http://www.madlib.be/license/>
+//
+// Please report all bugs and problems to <contrib at madlib.be>
+//
+// Authors: Gaetan Compere, Jean-Francois Remacle
+// -------------------------------------------------------------------
+
+#include "MAdLib.h"
+
+#include <iostream>
+using std::cout;
+#include <sys/resource.h>
+#include <string>
+using std::string;
+#include <stdlib.h>
+
+using namespace MAd;
+
+#ifdef PARALLEL
+#include "mpi.h"
+#endif
+
+// ----------------------------------------------------------------------
+int main(int argc, char* argv[]) {
+
+#ifdef PARALLEL 
+  MPI_Init(&argc, &argv);
+#endif
+
+  // Check input
+  // ------------
+  if ( argc != 3 && argc != 2  ) {
+    printf("Error: usage: \'executable mshFile [geoFile]\'\n");
+    exit(0);
+  }
+  string meshFile = argv[1];
+
+  // Build tools
+  // ------------
+  printf ("Checking mesh %s...\n\n",meshFile.c_str());
+
+  // --- Reading model ---
+  pGModel model = 0;
+  GM_create(&model,"theModel");
+  
+  if ( argc == 3 ) {
+    string geoFile  = argv[2];
+    GM_read(model, geoFile.c_str());
+  }
+  else {
+    GM_readFromMSH(model, meshFile.c_str());
+  }
+
+  pMesh mesh = M_new(model);
+  M_load(mesh,meshFile.c_str());
+
+  MeshStatus status = VALID;
+  if ( !checkMesh(mesh, CHECK_ALL, 1, std::cout, &status) )
+    {
+      printf("\nThe mesh is invalid, status = %d\n\n",status);
+    }
+  else
+    {
+      printf("\nThe mesh is valid, status = %d\n\n",status);
+    }
+
+
+#ifdef PARALLEL 
+  MPI_Finalize();
+#endif
+}
+
+// ----------------------------------------------------------------------
diff --git a/Benchmarks/meshInfo/Makefile b/Benchmarks/meshInfo/Makefile
deleted file mode 100644
index d7c290d..0000000
--- a/Benchmarks/meshInfo/Makefile
+++ /dev/null
@@ -1,59 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../../variables
-
-BIN = $(MAdROOT)/bin/meshInfo
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common\
-       ${DASH}I$(MAdROOT)/Adapt\
-       ${DASH}I$(MAdROOT)/Adapt/constraint\
-       ${DASH}I$(MAdROOT)/Adapt/operator\
-       ${DASH}I$(MAdROOT)/Adapt/output\
-       ${DASH}I$(MAdROOT)/Adapt/quality\
-       ${DASH}I$(MAdROOT)/Adapt/repositioning\
-       ${DASH}I$(MAdROOT)/Adapt/sizeField\
-       ${DASH}I$(MAdROOT)/Adapt/utils
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = main.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${BIN}: ${OBJ}
-	${LINKER} ${OPTIM} ${DASH}o $@ $(OBJ) ${MAdLib_LIBS}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} $(MAdROOT)/bin/
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} *.o *.obj
-
-purge:
-	${RM} *.msh *.geo *.pos
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Benchmarks/meshInfo/Makefile.am b/Benchmarks/meshInfo/Makefile.am
new file mode 100644
index 0000000..3f485c6
--- /dev/null
+++ b/Benchmarks/meshInfo/Makefile.am
@@ -0,0 +1,31 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+includedir = @includedir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_LIBS = @MAdLib_LIBS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+RM = @RM@
+
+bin_PROGRAMS = meshInfo
+
+meshInfo_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+meshInfo_SOURCES = main.cc
+
+meshInfo_LDADD = -L$(top_builddir) ${MAdLib_LIBS}
+
+purge:
+	${RM} *.msh *.geo *.pos
diff --git a/Benchmarks/meshInfo/Makefile.in b/Benchmarks/meshInfo/Makefile.in
new file mode 100644
index 0000000..5153199
--- /dev/null
+++ b/Benchmarks/meshInfo/Makefile.in
@@ -0,0 +1,545 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = meshInfo$(EXEEXT)
+subdir = Benchmarks/meshInfo
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_meshInfo_OBJECTS = meshInfo-main.$(OBJEXT)
+meshInfo_OBJECTS = $(am_meshInfo_OBJECTS)
+am__DEPENDENCIES_1 =
+meshInfo_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(meshInfo_SOURCES)
+DIST_SOURCES = $(meshInfo_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+meshInfo_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+meshInfo_SOURCES = main.cc
+meshInfo_LDADD = -L$(top_builddir) ${MAdLib_LIBS}
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Benchmarks/meshInfo/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Benchmarks/meshInfo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+meshInfo$(EXEEXT): $(meshInfo_OBJECTS) $(meshInfo_DEPENDENCIES) 
+	@rm -f meshInfo$(EXEEXT)
+	$(CXXLINK) $(meshInfo_OBJECTS) $(meshInfo_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/meshInfo-main.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+meshInfo-main.o: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(meshInfo_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT meshInfo-main.o -MD -MP -MF $(DEPDIR)/meshInfo-main.Tpo -c -o meshInfo-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/meshInfo-main.Tpo $(DEPDIR)/meshInfo-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='meshInfo-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(meshInfo_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o meshInfo-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+meshInfo-main.obj: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(meshInfo_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT meshInfo-main.obj -MD -MP -MF $(DEPDIR)/meshInfo-main.Tpo -c -o meshInfo-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/meshInfo-main.Tpo $(DEPDIR)/meshInfo-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='meshInfo-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(meshInfo_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o meshInfo-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+purge:
+	${RM} *.msh *.geo *.pos
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Benchmarks/meshInfo/main.cc b/Benchmarks/meshInfo/main.cc
index b5372dd..e99b24f 100644
--- a/Benchmarks/meshInfo/main.cc
+++ b/Benchmarks/meshInfo/main.cc
@@ -10,18 +10,16 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#include "MSops.h"
-#include "AdaptInterface.h"
-#include "NullSField.h"
-#include "AnalyticalSField.h"
-#include "MAdResourceManager.h"
 #include "MAdLib.h"
 
 #include <iostream>
 using std::cout;
+#include <sys/time.h>
 #include <sys/resource.h>
 #include <string>
 using std::string;
+#include <stdlib.h>
+#include <fstream>
 
 using namespace MAd;
 
@@ -30,9 +28,101 @@ using namespace MAd;
 #endif
 
 // ----------------------------------------------------------------------
+#ifdef PARALLEL
+class EmptyExchanger : public MDB_DataExchanger
+{
+public:
+  EmptyExchanger(int _tag): MDB_DataExchanger(_tag) {}
+  ~EmptyExchanger() {}
+
+  void * sendData (pEntity pe,    // in
+		   int iProcDest, // in
+		   int &_size ) {
+    _size = 0;
+    return NULL;
+  }
+  void receiveData (pEntity pe,      //in
+	            int iProcSender, //in
+		    void *buf ) {}
+  void deleteExternalData( pEntity pe) const {}
+};
+#endif
+
+
+// ----------------------------------------------------------------------
+double CPUTime() {
+  
+#ifdef PARALLEL
+  return MPI_Wtime();
+#else
+  struct timeval tp;
+  struct timezone tz;
+
+  gettimeofday(&tp,&tz);
+
+  return ((double) tp.tv_sec +
+          (double) ((double) .000001 * (double) tp.tv_usec));
+#endif
+}
+
+// ----------------------------------------------------------------------
+#if defined(__linux) || defined(linux)
+void process_mem_usage(double& vm_usage, double& resident_set)
+{
+  using std::ios_base;
+  using std::ifstream;
+  using std::string;
+  
+  vm_usage     = 0.0;
+  resident_set = 0.0;
+  
+  // 'file' stat seems to give the most reliable results
+  //
+  ifstream stat_stream("/proc/self/stat",ios_base::in);
+  
+  // dummy vars for leading entries in stat that we don't care about
+  //
+  string pid, comm, state, ppid, pgrp, session, tty_nr;
+  string tpgid, flags, minflt, cminflt, majflt, cmajflt;
+  string utime, stime, cutime, cstime, priority, nice;
+  string O, itrealvalue, starttime;
+  
+  // the two fields we want
+  //
+  unsigned long vsize;
+  long rss;
+  
+  stat_stream >> pid >> comm >> state >> ppid >> pgrp >> session >> tty_nr
+              >> tpgid >> flags >> minflt >> cminflt >> majflt >> cmajflt
+              >> utime >> stime >> cutime >> cstime >> priority >> nice
+              >> O >> itrealvalue >> starttime >> vsize >> rss; // don't care about the rest
+  
+  long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; // in case x86-64 is configured to use 2MB pages
+  vm_usage     = vsize / 1024.0 / 1024;
+  resident_set = rss * page_size_kb / 1024;
+}
+#endif
+
+// ----------------------------------------------------------------------
 void displayMemoryUsage(string step="")
 {
-  MAdResourceManagerSgl::instance().printMemoryUsage(step,std::cout);
+  double ram, virt;
+
+#if defined(__linux) || defined(linux)
+  process_mem_usage(virt,ram);
+  
+#ifdef PARALLEL
+    double send[2] = {virt,ram};
+    double recv[2];
+    MPI_Allreduce(send,recv,2,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+    virt  = recv[0];
+    ram = recv[1];
+#endif
+
+  std::cout << "Memory usage at step \'"<<step<<"\': " 
+            << ram  << " Mb (resident), "
+            << virt << " Mb (virtual)\n";
+#endif
 }
 
 // ----------------------------------------------------------------------
@@ -105,6 +195,7 @@ int main(int argc, char* argv[]) {
 
   // Outputs
   // --------
+//   M_writeMsh(mesh,"test.msh",2);
   ma->printStatistics(std::cout);
   ma->writePos("meanRatio.pos",OD_MEANRATIO);
 
diff --git a/Benchmarks/moveIt/Makefile b/Benchmarks/moveIt/Makefile
deleted file mode 100644
index 995be41..0000000
--- a/Benchmarks/moveIt/Makefile
+++ /dev/null
@@ -1,59 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../../variables
-
-BIN = $(MAdROOT)/bin/moveIt
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common\
-       ${DASH}I$(MAdROOT)/Adapt\
-       ${DASH}I$(MAdROOT)/Adapt/constraint\
-       ${DASH}I$(MAdROOT)/Adapt/operator\
-       ${DASH}I$(MAdROOT)/Adapt/output\
-       ${DASH}I$(MAdROOT)/Adapt/quality\
-       ${DASH}I$(MAdROOT)/Adapt/repositioning\
-       ${DASH}I$(MAdROOT)/Adapt/sizeField\
-       ${DASH}I$(MAdROOT)/Adapt/utils
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = main.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${BIN}: ${OBJ}
-	${LINKER} ${OPTIM} ${DASH}o $@ $(OBJ) ${MAdLib_LIBS}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} $(MAdROOT)/bin/
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} *.o *.obj
-
-purge:
-	${RM} *.msh *.geo *.pos MyParams.h example/tube/result/*
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Benchmarks/moveIt/Makefile.am b/Benchmarks/moveIt/Makefile.am
new file mode 100644
index 0000000..402a899
--- /dev/null
+++ b/Benchmarks/moveIt/Makefile.am
@@ -0,0 +1,32 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+includedir = @includedir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_LIBS = @MAdLib_LIBS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+RM = @RM@
+
+bin_PROGRAMS = moveIt
+
+noinst_HEADERS=Parameters.h MyParams.h moveItParse.h
+moveIt_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+moveIt_SOURCES = main.cc
+
+moveIt_LDADD = -L$(top_builddir)  ${MAdLib_LIBS}
+
+purge:
+	${RM} *.msh *.geo *.pos MyParams.h example/tube/result/*
diff --git a/Benchmarks/moveIt/Makefile.in b/Benchmarks/moveIt/Makefile.in
new file mode 100644
index 0000000..56c8c90
--- /dev/null
+++ b/Benchmarks/moveIt/Makefile.in
@@ -0,0 +1,549 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = moveIt$(EXEEXT)
+subdir = Benchmarks/moveIt
+DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_moveIt_OBJECTS = moveIt-main.$(OBJEXT)
+moveIt_OBJECTS = $(am_moveIt_OBJECTS)
+am__DEPENDENCIES_1 =
+moveIt_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(moveIt_SOURCES)
+DIST_SOURCES = $(moveIt_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_HEADERS = Parameters.h MyParams.h moveItParse.h
+moveIt_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+moveIt_SOURCES = main.cc
+moveIt_LDADD = -L$(top_builddir)  ${MAdLib_LIBS}
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Benchmarks/moveIt/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Benchmarks/moveIt/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+moveIt$(EXEEXT): $(moveIt_OBJECTS) $(moveIt_DEPENDENCIES) 
+	@rm -f moveIt$(EXEEXT)
+	$(CXXLINK) $(moveIt_OBJECTS) $(moveIt_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/moveIt-main.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+moveIt-main.o: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moveIt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT moveIt-main.o -MD -MP -MF $(DEPDIR)/moveIt-main.Tpo -c -o moveIt-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/moveIt-main.Tpo $(DEPDIR)/moveIt-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='moveIt-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moveIt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o moveIt-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+moveIt-main.obj: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moveIt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT moveIt-main.obj -MD -MP -MF $(DEPDIR)/moveIt-main.Tpo -c -o moveIt-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/moveIt-main.Tpo $(DEPDIR)/moveIt-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='moveIt-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moveIt_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o moveIt-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+purge:
+	${RM} *.msh *.geo *.pos MyParams.h example/tube/result/*
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Benchmarks/moveIt/examples/tube/MyParams.h b/Benchmarks/moveIt/MyParams.h
similarity index 98%
rename from Benchmarks/moveIt/examples/tube/MyParams.h
rename to Benchmarks/moveIt/MyParams.h
index 20e567b..6c45fbf 100644
--- a/Benchmarks/moveIt/examples/tube/MyParams.h
+++ b/Benchmarks/moveIt/MyParams.h
@@ -63,6 +63,8 @@ void setCurrentParameters(MoveParameters * params) {
 //   params->snap_cavityIsMesh = false;
 //   params->snap_thickness = 3;
 //   params->snap_chi = 1.;
+//   params->snap_check = false;
+//   params->snap_force = false;
   
   params->SFSmoothing = true;
   params->SFSmoothGrad = 1.;
diff --git a/Benchmarks/moveIt/Parameters.h b/Benchmarks/moveIt/Parameters.h
index 98b29a8..ab7d6a1 100644
--- a/Benchmarks/moveIt/Parameters.h
+++ b/Benchmarks/moveIt/Parameters.h
@@ -62,11 +62,14 @@ struct SizeFieldDef
   vector<string> anisoDir0, anisoDir1, anisoDir2;
 
   // piecewise linear size fields
-  string pwlSource; // curvature or initial length
+  string pwlSource; // curvature, initial length or file
   
   // curvature parameters
   bool curv_aniso;
   double curv_alpha, curv_hMin;
+
+  // file parameters
+  string mshFile;
 };
 
 // ----------------------------------------------------------------------
@@ -119,6 +122,7 @@ struct MoveParameters {
   // Mesh adaptation
   // ----------------
 
+  bool adapt;
   int maxInnerIter;
   double lowerLength, upperLength;
   double infLength;
@@ -138,6 +142,8 @@ struct MoveParameters {
   bool   snap_cavityIsMesh;
   int    snap_thickness;
   double snap_chi;
+  bool   snap_check;
+  bool   snap_force;
 
   bool SFSmoothing;
   double SFSmoothGrad;
@@ -191,6 +197,8 @@ void setDefaultParameters(MoveParameters * params)
   params->sliverReports = false;
   params->testSliverOperators = false;
 
+  params->adapt = true;
+  
   params->maxInnerIter = 10;
   params->lowerLength = 1./sqrt(3.);
   params->upperLength = sqrt(3.);
@@ -213,6 +221,8 @@ void setDefaultParameters(MoveParameters * params)
   params->snap_cavityIsMesh = false;
   params->snap_thickness = 3;
   params->snap_chi = 1.;
+  params->snap_check = false;
+  params->snap_force = false;
 
   params->SFSmoothing = false;
   params->SFSmoothGrad = 1.;
diff --git a/Benchmarks/moveIt/examples/tube/result/quality b/Benchmarks/moveIt/examples/tube/result/quality
deleted file mode 100644
index fe2a50c..0000000
--- a/Benchmarks/moveIt/examples/tube/result/quality
+++ /dev/null
@@ -1,3 +0,0 @@
-iter	mean quality	worst quality
-0	0.559586	1.71371e-06
-0	5.759428e-01	2.011903e-02
diff --git a/Benchmarks/moveIt/examples/tube/tube.geo b/Benchmarks/moveIt/examples/tube/tube.geo
deleted file mode 100644
index a3c0d17..0000000
--- a/Benchmarks/moveIt/examples/tube/tube.geo
+++ /dev/null
@@ -1,85 +0,0 @@
-// -*- C++ -*-
-
-lc1 = 0.1;//0.1
-lc2 = 0.2;//0.4
-lcBox = 0.6;//0.6
-
-// cylinders parameters
-r = 0.9;
-R = 1.;
-dR = 0.2;
-L1 = 3.;
-L2 = 3.;
-dL = 1.;
-
-// external box parameters
-B1 = 2.;
-B2 = 2.;
-B3 = 3.;
-
-// first cylinder (small one)
-Point(1) = {0,0,0,lc1};
-Point(2) = {r,0,0,lc1};
-Point(3) = {0,r,0,lc1};
-Point(4) = {0,-r,0,lc1};
-Point(5) = {-r,0,0,lc1};
-Circle(1) = {2,1,3};
-Circle(2) = {3,1,5};
-Circle(3) = {5,1,4};
-Circle(4) = {4,1,2};
-Extrude {0,0,L1} {
-  Line{3,2,1,4};
-}
-Line Loop(21) = {13,9,5,17};
-Plane Surface(22) = {21};
-
-// tube
-Point(20) = {R,0,L1+dL,lc2};
-Point(21) = {-R,0,L1+dL,lc2};
-Point(22) = {0,R,L1+dL,lc2};
-Point(23) = {0,-R,L1+dL,lc2};
-Point(24) = {0,-R-dR,L1+dL,lc2};
-Point(25) = {0,+R+dR,L1+dL,lc2};
-Point(26) = {R+dR,0,L1+dL,lc2};
-Point(27) = {-R-dR,0,L1+dL,lc2};
-Point(28) = {0,0,L1+dL,lc2};
-Circle(29) = {23,28,20};
-Circle(30) = {20,28,22};
-Circle(31) = {22,28,21};
-Circle(32) = {21,28,23};
-Circle(33) = {24,28,26};
-Circle(34) = {26,28,25};
-Circle(35) = {25,28,27};
-Circle(36) = {27,28,24};
-Extrude {0,0,L2} {
-  Line{36,33,34,35,31,30,29,32};
-}
-Line Loop(69) = {45,49,37,41};
-Line Loop(70) = {53,65,61,57};
-Plane Surface(71) = {69,70};
-Line Loop(104) = {35,36,33,34};
-Line Loop(105) = {32,29,30,31};
-Plane Surface(106) = {104,105};
-
-// // external box
-Point(62) = {B3,B3,-B1,lcBox};
-Point(63) = {-B3,B3,-B1,lcBox};
-Point(64) = {-B3,-B3,-B1,lcBox};
-Point(65) = {B3,-B3,-B1,lcBox};
-Line(82) = {64,63};
-Line(83) = {63,62};
-Line(84) = {62,65};
-Line(85) = {65,64};
-Extrude {0,0,B1+L1+dL+L2+B2} {
-  Line{82,83,84,85};
-}
-Line Loop(123) = {107,111,115,119};
-Plane Surface(124) = {123};
-Line Loop(125) = {2,3,4,1};
-Plane Surface(126) = {125};
-Line Loop(130) = {84,85,82,83};
-Plane Surface(131) = {130};
-Surface Loop(132) = {124,110,131,118,122,114};
-Surface Loop(133) = {52,106,40,44,48,71,60,56,68,64};
-Surface Loop(134) = {12,126,8,20,16,22};
-Volume(135) = {132,133,134};
diff --git a/Benchmarks/moveIt/examples/tube/tube.mad b/Benchmarks/moveIt/examples/tube/tube.mad
deleted file mode 100644
index c80e3a0..0000000
--- a/Benchmarks/moveIt/examples/tube/tube.mad
+++ /dev/null
@@ -1,144 +0,0 @@
-//-*- C++ -*-
-
-Input {
-  Mesh {
-    MshFile = "tube.msh"; // gmsh -3 -optimize tube.geo
-    //GeoFile = "tube.geo";
-    //MshFile = "tube_fullGeo.msh"; // gmsh -3 -optimize tube_fullGeo.geo -parametric
-    //GeoFile = "tube_fullGeo.geo";
-  }
-}
-Output {
-  Prefix = "result/";
-  Frequency = 100;
-  Type = Msh;
-}
-Task {
-  Type = MobileObject; // RemoveRegion SizeField RemoveSliverFaces LaplaceSmoothing GeoConstraints TopoConstraints FaceSwap UglyMesh RemoveSliverRegions DESC EdgeSwap GeoMatcher EdgeSplit EdgeCollapse EdgeSplitCollapse FaceCollapse OptimizeLength OptimizeShape None
-}
-Debug {
-  DebugLevel = 1;
-//  OpenJournal = Yes;
-//  ReferenceJournal = "";
-//  ReportSlivers = Yes;
-}
-Adaptation {
-//   LowerLengthBound     = 0.58; // 1/sqrt(3)
-//   UpperLengthBound     = 1.73; // sqrt(3)
-//   SwapMinImproveRatio  = 1.0;
-//   SliverQuality        = 0.02;
-//   SplitCanMakeSlivers    = Yes;
-//   CollapseCanMakeSlivers = Yes;
-//   SliverLowerLengthSqBound = 0.32; // 1/sqrt(10)
-//   SliverUpperLengthSqBound = 3.16; // sqrt(10)
-//   CollapseOnBoundary = Yes;
-//   BoundaryCollapses {
-//     Tolerance = 1.e-2;
-//   }
-//   SwapOnBoundary = Yes;
-//   BoundarySwaps {
-//     Tolerance = 1.e6;
-//   }
-//   TrackGeometry = No;
-//   VertexSnapping {
-//     IsMeshTheCavity = Yes;
-//     CavityThickness = 0;
-//     StiffnessAlteration = 1.;
-//   }
-  SmoothSizeField = Yes;
-  SizeFieldSmoothing {
-    // MaximumGradient = 1.000000e+00;
-  }
-}
-MovingObjects {
-  Object = "Cylinder" {
-    Geometry {
-      GeometricalType = Face; 
-      GeometricalTags = [8 12 16 20 22 126];
-    }
-    Kinematics {
-
-      KinematicsSpecification = Velocity;
-      Velocity {
-        Formulation = ["0." "0." "1.*sign(sin(2.*3.14159265/8.*t+1.e-6))"];
-        //        Formulation = ["0." "0." "1."];
-        //Formulation = ["0." "0." "0."];
-      }
-    } 
-    LocalSizeField {
-      DistanceComputation = ToWallVertices;
-      Orientation = Isotropic;
-      Radius = 1.0;
-      Isotropic {
-        Size  = "0.1+(x/1.0)*(0.6-0.1)"; // linear
-        //Size  = "0.02+(sqrt(x)/sqrt(0.5))*(0.2-0.02)"; // sqrt
-      }
-      Anisotropic {
-        NormalSize  = "0.02+(x/1.0)*(0.4-0.02)"; // linear
-        TangentSize = "0.4";
-      }
-      CurvatureBasedLimiter {
-        Enable = No;
-        TangentSizeOverRadius = 0.4;
-      }
-    }
-  }
-  Object = "Tube" {
-    Geometry {
-      GeometricalType = Face; 
-      GeometricalTags = [40 44 48 52 56 60 64 68 71 106];
-    }
-    Kinematics {
-      KinematicsSpecification = Velocity;
-      Velocity {
-        Formulation = ["0." "0." "-1.*sign(sin(2.*3.14159265/8.*t+1.e-6))"];
-        //Formulation = ["0." "0." "-1."];
-        //Formulation = ["0." "0." "0."];
-      }
-    }
-    LocalSizeField {
-      DistanceComputation = ToWallVertices;
-      Orientation = Isotropic;
-      Radius = 1.0;
-      Isotropic {
-        Size  = "0.2+(x/1.0)*(0.6-0.2)"; // linear
-      }
-      Anisotropic {
-        NormalSize  = "0.02+(x/1.0)*(0.4-0.02)"; // linear
-        TangentSize = "0.4";
-      }
-      CurvatureBasedLimiter {
-        Enable = No;
-        TangentSizeOverRadius = 0.4;
-      }
-    }
-  }
-}
-SizeField {
-  Type = Analytical;
-  Analytical {
-    OrientationType = Isotropic; // Isotropic Anisotropic
-    Isotropic {
-      Length = "0.6";
-    }
-//     Anisotropic {
-//       Lengths = ["0.6" "0.3" "0.2"];
-//       Direction1 = ["1." "0." "0."];
-//       Direction2 = ["0." "1." "0."];
-//       Direction3 = ["0." "0." "1."];
-//     }
-  }
-}
-NodeMotion {
-  Type = ElasticAnalogy; // ElasticAnalogy ForceBoundaries None
-  ElasticParameters {
-    StiffnessAlteration = 1.;
-    IsMeshTheCavity = Yes;
-    //    CavityThickness = 3;
-  }
-}
-TimeSpecifications {
-  //  MaxTimeSteps = 4000;
-  TimeStep = 0.01;
-  FinalTime = 4.0;
-}
diff --git a/Benchmarks/moveIt/examples/tube/tube_fullGeo.geo b/Benchmarks/moveIt/examples/tube/tube_fullGeo.geo
deleted file mode 100644
index 667d083..0000000
--- a/Benchmarks/moveIt/examples/tube/tube_fullGeo.geo
+++ /dev/null
@@ -1,130 +0,0 @@
-Point (1) = {0, 0, 0, 0.1};
-Point (2) = {0.9, 0, 0, 0.1};
-Point (3) = {0, 0.9, 0, 0.1};
-Point (4) = {0, -0.9, 0, 0.1};
-Point (5) = {-0.9, 0, 0, 0.1};
-Point (6) = {-0.9, 0, 3, 0.1};
-Point (7) = {0, 0, 3, 0.1};
-Point (8) = {0, -0.9, 3, 0.1};
-Point (9) = {0, 0.9, 3, 0.1};
-Point (10) = {0.9, 0, 3, 0.1};
-Point (20) = {1, 0, 4, 0.4};
-Point (21) = {-1, 0, 4, 0.4};
-Point (22) = {0, 1, 4, 0.4};
-Point (23) = {0, -1, 4, 0.4};
-Point (24) = {0, -1.2, 4, 0.4};
-Point (25) = {0, 1.2, 4, 0.4};
-Point (26) = {1.2, 0, 4, 0.4};
-Point (27) = {-1.2, 0, 4, 0.4};
-Point (28) = {0, 0, 4, 0.4};
-Point (29) = {-1.2, 0, 7, 0.4};
-Point (30) = {0, 0, 7, 0.4};
-Point (31) = {0, -1.2, 7, 0.4};
-Point (34) = {1.2, 0, 7, 0.4};
-Point (37) = {0, 1.2, 7, 0.4};
-Point (38) = {0, 1, 7, 0.4};
-Point (40) = {-1, 0, 7, 0.4};
-Point (41) = {1, 0, 7, 0.4};
-Point (42) = {0, -1, 7, 0.4};
-Point (62) = {3, 3, -2, 0.6};
-Point (63) = {-3, 3, -2, 0.6};
-Point (64) = {-3, -3, -2, 0.6};
-Point (65) = {3, -3, -2, 0.6};
-Point (66) = {-3, -3, 9, 0.6};
-Point (67) = {-3, 3, 9, 0.6};
-Point (69) = {3, 3, 9, 0.6};
-Point (71) = {3, -3, 9, 0.6};
-Circle (1) = {2, 1, 3};
-Circle (2) = {3, 1, 5};
-Circle (3) = {5, 1, 4};
-Circle (4) = {4, 1, 2};
-Circle (5) = {6, 7, 8};
-Line (6) = {5, 6};
-Line (7) = {4, 8};
-Circle (9) = {9, 7, 6};
-Line (10) = {3, 9};
-Circle (13) = {10, 7, 9};
-Line (14) = {2, 10};
-Circle (17) = {8, 7, 10};
-Circle (29) = {23, 28, 20};
-Circle (30) = {20, 28, 22};
-Circle (31) = {22, 28, 21};
-Circle (32) = {21, 28, 23};
-Circle (33) = {24, 28, 26};
-Circle (34) = {26, 28, 25};
-Circle (35) = {25, 28, 27};
-Circle (36) = {27, 28, 24};
-Circle (37) = {29, 30, 31};
-Line (38) = {27, 29};
-Line (39) = {24, 31};
-Circle (41) = {31, 30, 34};
-Line (43) = {26, 34};
-Circle (45) = {34, 30, 37};
-Line (47) = {25, 37};
-Circle (49) = {37, 30, 29};
-Circle (53) = {38, 30, 40};
-Line (54) = {22, 38};
-Line (55) = {21, 40};
-Circle (57) = {41, 30, 38};
-Line (58) = {20, 41};
-Circle (61) = {42, 30, 41};
-Line (62) = {23, 42};
-Circle (65) = {40, 30, 42};
-Line (82) = {64, 63};
-Line (83) = {63, 62};
-Line (84) = {62, 65};
-Line (85) = {65, 64};
-Line (107) = {66, 67};
-Line (108) = {64, 66};
-Line (109) = {63, 67};
-Line (111) = {67, 69};
-Line (113) = {62, 69};
-Line (115) = {69, 71};
-Line (117) = {65, 71};
-Line (119) = {71, 66};
-Line Loop (8) = {3, 7, -5, -6};
-Ruled Surface (8) = {8};
-Line Loop (12) = {2, 6, -9, -10};
-Ruled Surface (12) = {12};
-Line Loop (16) = {1, 10, -13, -14};
-Ruled Surface (16) = {16};
-Line Loop (20) = {4, 14, -17, -7};
-Ruled Surface (20) = {20};
-Line Loop (22) = {13, 9, 5, 17};
-Plane Surface (22) = {22};
-Line Loop (40) = {36, 39, -37, -38};
-Ruled Surface (40) = {40};
-Line Loop (44) = {33, 43, -41, -39};
-Ruled Surface (44) = {44};
-Line Loop (48) = {34, 47, -45, -43};
-Ruled Surface (48) = {48};
-Line Loop (52) = {35, 38, -49, -47};
-Ruled Surface (52) = {52};
-Line Loop (56) = {31, 55, -53, -54};
-Ruled Surface (56) = {56};
-Line Loop (60) = {30, 54, -57, -58};
-Ruled Surface (60) = {60};
-Line Loop (64) = {29, 58, -61, -62};
-Ruled Surface (64) = {64};
-Line Loop (68) = {32, 62, -65, -55};
-Ruled Surface (68) = {68};
-Line Loop (71) = {45, 49, 37, 41, -57, -61, -65, -53};
-Plane Surface (71) = {71};
-Line Loop (106) = {35, 36, 33, 34, -31, -30, -29, -32};
-Plane Surface (106) = {106};
-Line Loop (110) = {82, 109, -107, -108};
-Ruled Surface (110) = {110};
-Line Loop (114) = {83, 113, -111, -109};
-Ruled Surface (114) = {114};
-Line Loop (118) = {84, 117, -115, -113};
-Ruled Surface (118) = {118};
-Line Loop (122) = {85, 108, -119, -117};
-Ruled Surface (122) = {122};
-Line Loop (124) = {107, 111, 115, 119};
-Plane Surface (124) = {124};
-Line Loop (126) = {2, 3, 4, 1};
-Plane Surface (126) = {126};
-Line Loop (131) = {84, 85, 82, 83};
-Plane Surface (131) = {131};
-Surface Loop (135) = {124, 110, 131, 118, 122, 114, 52, 106, 40, 44, 48, 71, 60, 56, 68, 64, 12, 126, 8, 20, 16, 22};
-Volume (135) = {135};
diff --git a/Benchmarks/moveIt/main.cc b/Benchmarks/moveIt/main.cc
index 4dd8097..7a94f67 100644
--- a/Benchmarks/moveIt/main.cc
+++ b/Benchmarks/moveIt/main.cc
@@ -20,8 +20,6 @@
 #endif
 
 #include "MAdLib.h"
-#include "MathUtils.h"
-#include "MAdResourceManager.h"
 
 #include <iostream>
 #include <sstream>
@@ -85,9 +83,63 @@ double CPUTime() {
 }
 
 // ----------------------------------------------------------------------
+#if defined(__linux) || defined(linux)
+void process_mem_usage(double& vm_usage, double& resident_set)
+{
+  using std::ios_base;
+  using std::ifstream;
+  using std::string;
+  
+  vm_usage     = 0.0;
+  resident_set = 0.0;
+  
+  // 'file' stat seems to give the most reliable results
+  //
+  ifstream stat_stream("/proc/self/stat",ios_base::in);
+  
+  // dummy vars for leading entries in stat that we don't care about
+  //
+  string pid, comm, state, ppid, pgrp, session, tty_nr;
+  string tpgid, flags, minflt, cminflt, majflt, cmajflt;
+  string utime, stime, cutime, cstime, priority, nice;
+  string O, itrealvalue, starttime;
+  
+  // the two fields we want
+  //
+  unsigned long vsize;
+  long rss;
+  
+  stat_stream >> pid >> comm >> state >> ppid >> pgrp >> session >> tty_nr
+              >> tpgid >> flags >> minflt >> cminflt >> majflt >> cmajflt
+              >> utime >> stime >> cutime >> cstime >> priority >> nice
+              >> O >> itrealvalue >> starttime >> vsize >> rss; // don't care about the rest
+  
+  long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; // in case x86-64 is configured to use 2MB pages
+  vm_usage     = vsize / 1024.0 / 1024;
+  resident_set = rss * page_size_kb / 1024;
+}
+#endif
+
+// ----------------------------------------------------------------------
 void displayMemoryUsage(string step="")
 {
-  MAdResourceManagerSgl::instance().printMemoryUsage(step,std::cout);
+  double ram, virt;
+
+#if defined(__linux) || defined(linux)
+  process_mem_usage(virt,ram);
+  
+#ifdef PARALLEL
+    double send[2] = {virt,ram};
+    double recv[2];
+    MPI_Allreduce(send,recv,2,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+    virt  = recv[0];
+    ram = recv[1];
+#endif
+
+  std::cout << "Memory usage at step \'"<<step<<"\': " 
+            << ram  << " Mb (resident), "
+            << virt << " Mb (virtual)\n";
+#endif
 }
 
 // ----------------------------------------------------------------------
@@ -267,15 +319,17 @@ int main(int argc, char* argv[])
   ma->setGeoTracking         (parameters.trackGeometry,
                               parameters.snap_cavityIsMesh,
                               parameters.snap_thickness,
-                              parameters.snap_chi);
+                              parameters.snap_chi,
+                              parameters.snap_check,
+                              parameters.snap_force);
   ma->setSizeFieldSmoothing  (parameters.SFSmoothing,
                               parameters.SFSmoothGrad);
   ma->setInfiniteLength(parameters.infLength);
 
-#ifdef PARALLEL
-  EmptyExchanger * dExch = new EmptyExchanger(4238458);
-  ma->setDataExchanger( dExch );
-#endif
+// #ifdef PARALLEL
+//   EmptyExchanger * dExch = new EmptyExchanger(4238458);
+//   ma->setDataExchanger( dExch );
+// #endif
 
   ma->setSFUpdateFrequency(0);
 
@@ -330,6 +384,12 @@ int main(int argc, char* argv[])
         }
         else throw;
       }
+    else if ( (*sIter).type == BACKGROUNDSFIELD )
+      {
+        sizeField = new BackgroundSF();
+        string mshFile = (*sIter).mshFile;
+        ((BackgroundSF*) sizeField)->loadData(mshFile);
+      }
     else throw;
 
     sizeFields.insert(sizeField);
@@ -341,8 +401,8 @@ int main(int argc, char* argv[])
 
   displayMemoryUsage("Size fields built");
 
-// #warning "debug"
-//   ma->writePos("testSF.pos",OD_SIZEFIELD_MEAN);
+#warning "debug"
+  ma->writePos("initSF.pos",OD_SIZEFIELD_MEAN);
 
   ma->printStatistics(cout);
 
@@ -500,8 +560,7 @@ int main(int argc, char* argv[])
             // --- move nodes (dummy move and Laplace smoothing) ---
             if ( !strcmp(nodeMotionType.c_str(),"ForceBoundaries") ) {
 
-              MAdMsgSgl::instance().warning(__LINE__,__FILE__,
-                                            "Forcing boundaries is followed by Laplace smoothing");
+              std::cout << "Warning: forcing boundaries is followed by Laplace smoothing\n";
               throw;
 
               double part;
@@ -512,7 +571,7 @@ int main(int argc, char* argv[])
               dt_iter *= part;
 
               if ( debugLevel >= 1 && !(ma->checkTheMesh()) )  ma->abort(__LINE__,__FILE__);
-              ma->LaplaceSmoothing(OPTIMAL);
+              ma->LaplaceSmoothing();
               if ( debugLevel >= 1 && !(ma->checkTheMesh()) )  ma->abort(__LINE__,__FILE__);
             }
 
@@ -532,10 +591,12 @@ int main(int argc, char* argv[])
         cpu_move += ( cpu_t2 - cpu_t1 );
 
         // --- adapt the mesh ---
-        ma->run();
+        if ( parameters.adapt ) {
+          ma->run();
+          displayMemoryUsage("After adaptation");
+        }
         double cpu_t3 = CPUTime();
         cpu_adapt += ( cpu_t3 - cpu_t2 );
-        displayMemoryUsage("After adaptation");
 
         // --- outputs ---
 
@@ -680,7 +741,7 @@ int main(int argc, char* argv[])
   else if ( !strcmp(parameters.task.c_str(),"LaplaceSmoothing") )
     {
       for (int i=0; i<1; i++) {
-        ma->LaplaceSmoothing(FAST);
+        ma->LaplaceSmoothing();
         cout << "Smoothing "<<i<<" operated\n";
         if ( !checkMesh(mesh,CHECK_ALL,1) )  ma->abort(__LINE__,__FILE__);
       }
@@ -715,7 +776,7 @@ int main(int argc, char* argv[])
       while ( ( pv = VIter_next(vi) ) ) {
         // int gtag  = GEN_tag ( EN_whatIn ((pEntity)pv) );
         int gtype = GEN_type( EN_whatIn ((pEntity)pv) );
-        if ( gtype == 0 ) EN_constrain((pEntity)pv);
+        if ( gtype == 0 ) ma->setConstraint((pEntity)pv);
       } 
       VIter_delete(vi);
     }
@@ -962,8 +1023,14 @@ int main(int argc, char* argv[])
 
         writeSolution(ma,i,outputType);
       }
+    }
 
-      /*
+  // ------------------------------------------------
+  // TEST EDGE SPLIT AND COLLAPSE 2
+  // ------------------------------------------------
+  
+  else if ( !strcmp(parameters.task.c_str(),"EdgeSplitCollapse2") )
+    {
       for (int i=0; i<10; i++) {
         int count = 0;
         int oriNumEdges = M_numEdges(mesh);
@@ -995,7 +1062,7 @@ int main(int argc, char* argv[])
         writeSolution(ma,i,outputType);
 //         ma->printStatistics(std::cout);
       }
-      */
+      
     }
 
   // ------------------------------------------------
@@ -1050,26 +1117,26 @@ int main(int argc, char* argv[])
   // TEST METRIC
   // ------------------------------------------------
 
-  else if ( !strcmp(parameters.task.c_str(),"Metric") )
-    {
-      double h[3] = { 2., 3., 10. };
-      double e[3][3] = {
-        {sqrt(2.)/2., sqrt(2.)/2., 0.},
-        {0., 0., 1.},
-        {sqrt(2.)/2., -sqrt(2.)/2., 0.}
-      };
-
-      MAdMetric M = MAdMetric(h[0],h[1],h[2],e[0],e[1],e[2]);
-
-      doubleMatrix V = doubleMatrix(3,3);
-      doubleVector S = doubleVector(3);
-      M.eig(V,S,true);
-
-      printVec(h,"h");
-      printMat(e,"e");
-      V.print("V");
-      S.print("S");
-    }
+//   else if ( !strcmp(parameters.task.c_str(),"Metric") )
+//     {
+//       double h[3] = { 2., 3., 10. };
+//       double e[3][3] = {
+//         {sqrt(2.)/2., sqrt(2.)/2., 0.},
+//         {0., 0., 1.},
+//         {sqrt(2.)/2., -sqrt(2.)/2., 0.}
+//       };
+
+//       MAdMetric M = MAdMetric(h[0],h[1],h[2],e[0],e[1],e[2]);
+
+//       doubleMatrix V = doubleMatrix(3,3);
+//       doubleVector S = doubleVector(3);
+//       M.eig(V,S,true);
+
+//       printVec(h,"h");
+//       printMat(e,"e");
+//       V.print("V");
+//       S.print("S");
+//     }
 
   // ------------------------------------------------
   // TEST CURVATURES
@@ -1125,13 +1192,35 @@ int main(int argc, char* argv[])
     }
 
   // ------------------------------------------------
+  // MISCELLANEOUS
+  // ------------------------------------------------
+  
+  else if ( !strcmp(parameters.task.c_str(),"Miscellaneous") )
+    {
+      int count = 0;
+      EIter ei = M_edgeIter(mesh);
+      pEdge pe;
+      while ( ( pe = EIter_next(ei) ) ) {
+        count++;
+        if ( count == 69 ) //65
+          {
+            if ( !(ma->collapseEdge(pe)) ) {
+              printf("not collapsed\n");
+              throw;
+            }
+            break;
+          }
+      } 
+      EIter_delete(ei);
+    }
+
+  // ------------------------------------------------
   else if ( !strcmp(parameters.task.c_str(),"None") )
     {
     }
 
   else {
-    MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                "Unknown task %s",parameters.task.c_str());
+    std::cerr << "Error: unknown task " << parameters.task.c_str() << "\n";
   }
 
   // ------------------------------------------------
diff --git a/Benchmarks/moveIt/moveItParse.h b/Benchmarks/moveIt/moveItParse.h
index df96ca6..8cdff09 100644
--- a/Benchmarks/moveIt/moveItParse.h
+++ b/Benchmarks/moveIt/moveItParse.h
@@ -18,8 +18,7 @@
 
 #include "Parser.h"
 
-#include "MSops.h"
-#include "MAdMessage.h"
+#include "MAdLib.h"
 #include "Parameters.h"
 
 #include <iostream>
@@ -55,7 +54,7 @@ void DefineMMCtrlFile() {
   // ----------------
 
   ClassParameter& task = Parser::instance().add("Task");
-  task.addToken("Type",22,
+  task.addToken("Type",24,
                 "MobileObject",
                 "RemoveRegion",
                 "SizeField",
@@ -72,11 +71,13 @@ void DefineMMCtrlFile() {
                 "EdgeSplit",
                 "EdgeCollapse",
                 "EdgeSplitCollapse",
+                "EdgeSplitCollapse2",
                 "FaceCollapse",
                 "OptimizeLength",
                 "OptimizeShape",
                 "Metric",
                 "Curvatures",
+                "Miscellaneous",
                 "None",
                 "MobileObject");
 
@@ -94,6 +95,7 @@ void DefineMMCtrlFile() {
   // ----------------
 
   ClassParameter& ma = Parser::instance().add("Adaptation");
+  ma.addToken("Enable",2,"No","Yes","Yes");
   ma.addInteger("MaxNumberOfInnerIteration",10);
   ma.addDouble("LowerLengthBound",1./sqrt(3.));
   ma.addDouble("UpperLengthBound",sqrt(3.));
@@ -112,6 +114,8 @@ void DefineMMCtrlFile() {
   maboundswp.addDouble("Tolerance",1.e-6);
   ma.addToken("TrackGeometry",2,"No","Yes","No");
   ClassParameter& masnap = ma.add("VertexSnapping");
+  masnap.addToken("ForceRelocation",2,"No","Yes","No");
+  masnap.addToken("StrictChecking",2,"No","Yes","No");
   masnap.addToken("IsMeshTheCavity",2,"No","Yes","No");
   masnap.addInteger("CavityThickness",3);
   masnap.addDouble("StiffnessAlteration",1.0);
@@ -164,7 +168,7 @@ void DefineMMCtrlFile() {
   // ---------------------
 
   ClassParameter& sf = Parser::instance().addMultiple("SizeField");
-  sf.addToken("Type",2,"Analytical","PiecewiseLinear","Analytical");
+  sf.addToken("Type",3,"Analytical","PiecewiseLinear","Background","Analytical");
   ClassParameter& sf_an = sf.add("Analytical");
   sf_an.addToken("OrientationType",2,"Isotropic","Anisotropic","Isotropic");
   ClassParameter& sf_an_iso = sf_an.add("Isotropic");
@@ -180,6 +184,8 @@ void DefineMMCtrlFile() {
   sf_pwl_curv.addToken("Anisotropic",2,"Yes","No","Yes");
   sf_pwl_curv.addDouble("Alpha",2.);
   sf_pwl_curv.addDouble("MinimalLength",1.e-4);
+  ClassParameter& sf_bg = sf.add("Background");
+  sf_bg.addString("FileName","");
   
   // Node motion
   // -----------
@@ -324,6 +330,11 @@ void setCurrentParameters(MoveParameters * params)
   // ----------------
 
   ClassParameter& adParam = Parser::instance().get("Adaptation");
+
+  params->adapt = true;
+  string enable = adParam.getToken("Enable");
+  if ( !strcmp(enable.c_str(),"No") ) params->adapt = false;
+
   params->maxInnerIter = adParam.getInteger("MaxNumberOfInnerIteration");
   params->lowerLength = adParam.getDouble("LowerLengthBound");
   params->upperLength = adParam.getDouble("UpperLengthBound");
@@ -361,6 +372,14 @@ void setCurrentParameters(MoveParameters * params)
     params->trackGeometry = true;
   }
   ClassParameter& snapParams = adParam.get("VertexSnapping");
+  params->snap_force = false;
+  if ( !strcmp( snapParams.getToken("ForceRelocation"), "Yes" ) ) {
+    params->snap_force = true;
+  }
+  params->snap_check = false;
+  if ( !strcmp( snapParams.getToken("StrictChecking"), "Yes" ) ) {
+    params->snap_check = true;
+  }
   params->snap_cavityIsMesh = false;
   if ( !strcmp( snapParams.getToken("IsMeshTheCavity"), "Yes" ) ) {
     params->snap_cavityIsMesh = true;
@@ -432,8 +451,8 @@ void setCurrentParameters(MoveParameters * params)
       string kinType = kinPar.getToken("KinematicsSpecification");
       if ( !strcmp(kinType.c_str(),"Displacement") ) {
         object.kinType = KT_DISPLACEMENT;
-        MAd::MAdMsgSgl::instance().warning(__LINE__,__FILE__,
-                                           "Displacement formulation for object is wrong when using geometry tracking");
+        cout << "Displacement formulation for object is wrong "
+             << "when using geometry tracking\n";
         ClassParameter& kinParDx = kinPar.get("Displacement");
         object.kinExpression = kinParDx.getStringList("Formulation");
       }
@@ -550,6 +569,16 @@ void setCurrentParameters(MoveParameters * params)
           sfDef.curv_hMin  = sf_pwl_curv.getDouble("MinimalLength");
         }
 
+      // background:
+      else if ( !strcmp(sfType.c_str(),"Background") )
+        {
+          sfDef.type = MAd::BACKGROUNDSFIELD;
+
+          ClassParameter& sf_bg = sfParam.get("Background");
+          sfDef.mshFile = sf_bg.getString("FileName");
+          
+        }
+
       else throw;
 
       params->sizes.push_back(sfDef);
diff --git a/Benchmarks/optimize/Makefile b/Benchmarks/optimize/Makefile
deleted file mode 100644
index 48353fe..0000000
--- a/Benchmarks/optimize/Makefile
+++ /dev/null
@@ -1,59 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../../variables
-
-BIN = $(MAdROOT)/bin/optimize
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common\
-       ${DASH}I$(MAdROOT)/Adapt\
-       ${DASH}I$(MAdROOT)/Adapt/constraint\
-       ${DASH}I$(MAdROOT)/Adapt/operator\
-       ${DASH}I$(MAdROOT)/Adapt/output\
-       ${DASH}I$(MAdROOT)/Adapt/quality\
-       ${DASH}I$(MAdROOT)/Adapt/repositioning\
-       ${DASH}I$(MAdROOT)/Adapt/sizeField\
-       ${DASH}I$(MAdROOT)/Adapt/utils
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = main.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${BIN}: ${OBJ}
-	${LINKER} ${OPTIM} ${DASH}o $@ $(OBJ) ${MAdLib_LIBS}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} $(MAdROOT)/bin/
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} *.o *.obj
-
-purge:
-	${RM} *.msh *.geo *.pos
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Benchmarks/optimize/Makefile.am b/Benchmarks/optimize/Makefile.am
new file mode 100644
index 0000000..7095908
--- /dev/null
+++ b/Benchmarks/optimize/Makefile.am
@@ -0,0 +1,32 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+includedir = @includedir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_LIBS = @MAdLib_LIBS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+RM = @RM@
+
+bin_PROGRAMS = optimize
+
+optimize_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+optimize_SOURCES = main.cc
+
+optimize_LDADD = -L$(top_builddir) ${MAdLib_LIBS}
+
+purge:
+	${RM} *.msh *.geo *.pos
+
diff --git a/Benchmarks/optimize/Makefile.in b/Benchmarks/optimize/Makefile.in
new file mode 100644
index 0000000..d4efc55
--- /dev/null
+++ b/Benchmarks/optimize/Makefile.in
@@ -0,0 +1,545 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = optimize$(EXEEXT)
+subdir = Benchmarks/optimize
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_optimize_OBJECTS = optimize-main.$(OBJEXT)
+optimize_OBJECTS = $(am_optimize_OBJECTS)
+am__DEPENDENCIES_1 =
+optimize_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(optimize_SOURCES)
+DIST_SOURCES = $(optimize_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+optimize_CPPFLAGS = ${MAdLib_DEFS} ${MAdLib_INCLUDES}\
+  -I$(includedir)
+
+optimize_SOURCES = main.cc
+optimize_LDADD = -L$(top_builddir) ${MAdLib_LIBS}
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Benchmarks/optimize/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Benchmarks/optimize/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p || test -f $$p1; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+optimize$(EXEEXT): $(optimize_OBJECTS) $(optimize_DEPENDENCIES) 
+	@rm -f optimize$(EXEEXT)
+	$(CXXLINK) $(optimize_OBJECTS) $(optimize_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/optimize-main.Po at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+optimize-main.o: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(optimize_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT optimize-main.o -MD -MP -MF $(DEPDIR)/optimize-main.Tpo -c -o optimize-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/optimize-main.Tpo $(DEPDIR)/optimize-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='optimize-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(optimize_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o optimize-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc
+
+optimize-main.obj: main.cc
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(optimize_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT optimize-main.obj -MD -MP -MF $(DEPDIR)/optimize-main.Tpo -c -o optimize-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/optimize-main.Tpo $(DEPDIR)/optimize-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cc' object='optimize-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(optimize_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o optimize-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-libtool ctags distclean distclean-compile \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+purge:
+	${RM} *.msh *.geo *.pos
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Benchmarks/optimize/main.cc b/Benchmarks/optimize/main.cc
index 8589bda..cacb709 100644
--- a/Benchmarks/optimize/main.cc
+++ b/Benchmarks/optimize/main.cc
@@ -10,10 +10,7 @@
 // Authors: Gaetan Compere, Jean-Francois Remacle
 // -------------------------------------------------------------------
 
-#include "MSops.h"
-#include "AdaptInterface.h"
-#include "NullSField.h"
-#include "AnalyticalSField.h"
+#include "MAdLib.h"
 
 #include <iostream>
 using std::cout;
@@ -21,6 +18,7 @@ using std::cout;
 using std::string;
 #include <vector>
 using std::vector;
+#include <stdlib.h>
 
 using namespace MAd;
 
diff --git a/Common/MAdDefines.h b/Common/MAdDefines.h
index b0faeca..fa932a6 100644
--- a/Common/MAdDefines.h
+++ b/Common/MAdDefines.h
@@ -1,4 +1,15 @@
 // -*- C++ -*-
+// -------------------------------------------------------------------
+// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+//
+// See the Copyright.txt and License.txt files for license information. 
+// You should have received a copy of these files along with MAdLib. 
+// If not, see <http://www.madlib.be/license/>
+//
+// Please report all bugs and problems to <contrib at madlib.be>
+//
+// Authors: Gaetan Compere, Jean-Francois Remacle
+// -------------------------------------------------------------------
 
 #ifndef _H_MADDEFINES
 #define _H_MADDEFINES
@@ -13,23 +24,4 @@
 #define MAdTOL   1.e-12
 #define MAdTOLSQ 1.e-24
 
-namespace MAd {
-
-  // -------------------------------------------------------------------
-  enum operationType {
-    MAd_UNKNOWNOPERATION = 0,
-    MAd_VERTEXMOVE       = 1,
-    MAd_ESPLIT           = 2,
-    MAd_ECOLLAPSE        = 3,
-    MAd_FCOLLAPSE        = 4,
-    MAd_DESPLTCLPS       = 5,
-    MAd_ESWAP            = 6,
-    MAd_FSWAP            = 7,
-    MAd_RREMOVE          = 8
-  };
-
-  // -------------------------------------------------------------------
-
-}
-
 #endif
diff --git a/Common/MAdLib.h b/Common/MAdLib.h
index 5d28b37..abb50e4 100644
--- a/Common/MAdLib.h
+++ b/Common/MAdLib.h
@@ -19,9 +19,16 @@
 
 // interface to the mesh
 #include "MeshDataBaseInterface.h"
+#include "MeshDataBaseParallelInterface.h"
+#include "MeshDataBaseComm.h"
+#include "MeshDataBaseCommPeriodic.h"
+#include "CheckMesh.h"
 
 // interface to mesh adaptation
 #include "AdaptInterface.h"
+#include "SizeField.h"
+#include "CallbackDefinition.h"
+#include "MobileObject.h"
 
 //! Needed with the Gmsh geometrical model
 void MAdLibInitialize(int * argc, char** argv[]);
diff --git a/Common/MAdMatrix.cc b/Common/MAdMatrix.cc
index 4a3f14e..33e68dd 100644
--- a/Common/MAdMatrix.cc
+++ b/Common/MAdMatrix.cc
@@ -12,6 +12,7 @@
 // -------------------------------------------------------------------
 
 #include "MAdMatrix.h"
+#include <stdio.h>
 
 #if defined(HAVE_LAPACK)
 extern "C" {
diff --git a/Common/MAdMatrix.h b/Common/MAdMatrix.h
index 1fa73d7..90d3c97 100644
--- a/Common/MAdMatrix.h
+++ b/Common/MAdMatrix.h
@@ -19,6 +19,7 @@
 #include <assert.h>
 #include <math.h>
 #include <iostream>
+#include <stdio.h>
 
 #if defined(_HAVE_GSL_)
 #include <gsl/gsl_linalg.h>
@@ -869,55 +870,4 @@ namespace MAd {
 
 }
 
-// -------------------------------------------------------------------
-// Gmsh matrices
-// -------------------------------------------------------------------
-
-#ifdef _HAVE_GMSH_
-
-#include "gmsh/GmshMatrix.h"
-namespace MAd {
-  typedef gmshMatrix<double> gmshMat;
-  typedef gmshVector<double> gmshVec;
-}
-
-#else
-
-namespace MAd {
-  
-  class nullVector {
-  public:
-    nullVector() {
-      MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                  "Not implemented, Gmsh required");
-    }
-    nullVector(double) {
-      MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                  "Not implemented, Gmsh required");
-    }
-    inline double operator () (int i) const { return -1.; }
-    void print(const char * name="") const {}
-  };
-  class nullMatrix {
-  public:
-    nullMatrix() {
-      MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                  "Not implemented, Gmsh required");
-    }
-    nullMatrix(double, double) {
-      MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                  "Not implemented, Gmsh required");
-    }
-    inline double operator () (int i, int j) const { return -1.; }
-    void print(const char * name="") const {}
-  };
-
-  typedef nullMatrix gmshMat;
-  typedef nullVector gmshVec;
-}
-
-#endif
-
-  // -------------------------------------------------------------------
-
 #endif
diff --git a/Common/MAdMessage.cc b/Common/MAdMessage.cc
index 2ad99a2..fad41bb 100644
--- a/Common/MAdMessage.cc
+++ b/Common/MAdMessage.cc
@@ -16,6 +16,7 @@
 #include <iostream>
 #include <sstream>
 #include <stdlib.h>
+#include <stdio.h>
 
 using std::stringstream;
 using std::string;
diff --git a/Common/Makefile b/Common/Makefile
deleted file mode 100644
index 3f66744..0000000
--- a/Common/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../variables
-
-LIB = ../lib/libMAdCommon${LIBEXT}
-
-INC = ${MAdLib_INCLUDES}
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = MathUtils.cc\
-      MAdStringFieldEvaluator.cc\
-      MAdMessage.cc\
-      MAdMatrix.cc\
-      MAdMetric.cc\
-      MAdResourceManager.cc\
-      MAdLib.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${LIB}: ${OBJ} 
-	${AR} ${ARFLAGS} ${LIB} ${OBJ}
-	${RANLIB} ${LIB}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} ${MAdLib_TMPDIR}/.
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} */*.o *.o *.obj
-
-purge:
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Common/Makefile.am b/Common/Makefile.am
new file mode 100644
index 0000000..c9bd5a5
--- /dev/null
+++ b/Common/Makefile.am
@@ -0,0 +1,35 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+srcdir = @srcdir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+
+noinst_LTLIBRARIES = libMAdCommon.la
+
+CPPFLAGS += ${MAdLib_DEFS}
+
+AM_CPPFLAGS =  ${MAdLib_INCLUDES} -I.\
+  -I${srcdir}/../Contrib/mathex
+
+libMAdCommon_la_SOURCES = \
+  MathUtils.cc\
+  MAdStringFieldEvaluator.cc\
+  MAdMessage.cc\
+  MAdMatrix.cc\
+  MAdMetric.cc\
+  MAdResourceManager.cc\
+  MAdLib.cc
+
+purge:
diff --git a/Common/Makefile.in b/Common/Makefile.in
new file mode 100644
index 0000000..7d59687
--- /dev/null
+++ b/Common/Makefile.in
@@ -0,0 +1,505 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = Common
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libMAdCommon_la_LIBADD =
+am_libMAdCommon_la_OBJECTS = MathUtils.lo MAdStringFieldEvaluator.lo \
+	MAdMessage.lo MAdMatrix.lo MAdMetric.lo MAdResourceManager.lo \
+	MAdLib.lo
+libMAdCommon_la_OBJECTS = $(am_libMAdCommon_la_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libMAdCommon_la_SOURCES)
+DIST_SOURCES = $(libMAdCommon_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@ ${MAdLib_DEFS}
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libMAdCommon.la
+AM_CPPFLAGS = ${MAdLib_INCLUDES} -I.\
+  -I${srcdir}/../Contrib/mathex
+
+libMAdCommon_la_SOURCES = \
+  MathUtils.cc\
+  MAdStringFieldEvaluator.cc\
+  MAdMessage.cc\
+  MAdMatrix.cc\
+  MAdMetric.cc\
+  MAdResourceManager.cc\
+  MAdLib.cc
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Common/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Common/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libMAdCommon.la: $(libMAdCommon_la_OBJECTS) $(libMAdCommon_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libMAdCommon_la_OBJECTS) $(libMAdCommon_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdLib.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdMatrix.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdMessage.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdMetric.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdResourceManager.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdStringFieldEvaluator.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MathUtils.Plo at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+purge:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Common/MathUtils.cc b/Common/MathUtils.cc
index 4fdddf2..d0381a9 100644
--- a/Common/MathUtils.cc
+++ b/Common/MathUtils.cc
@@ -186,13 +186,31 @@ namespace MAd {
       inv[2][2] =  (mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0]) * idet;
     }
     else{
-      printf("Error: Singular matrix\n");
+      MAdMsgSgl::instance().warning(__LINE__,__FILE__,"Singular matrix");
       for(int i=0; i<3; i++) for(int j=0; j<3; j++) inv[i][j] = 0.;
     }
     return det;
   }
 
   // -------------------------------------------------------------------
+  double inverseMat22 (const double mat[2][2], double inv[2][2])
+  {
+    double det = mat[0][0] * mat[1][1] -  mat[0][1] * mat[1][0];
+    if (det) {
+      double idet = 1. / det;
+      inv[0][0] =  idet * mat[1][1];
+      inv[0][1] = -idet * mat[0][1];
+      inv[1][0] = -idet * mat[1][0];
+      inv[1][1] =  idet * mat[0][0];
+    }
+    else{
+      MAdMsgSgl::instance().warning(__LINE__,__FILE__,"Singular matrix");
+      for(int i=0; i<2; i++) for(int j=0; j<2; j++) inv[i][j] = 0.;
+    }
+    return det;
+  }
+
+  // -------------------------------------------------------------------
   double invertMat(double mat[3][3])
   {
     double inv[3][3];
diff --git a/Common/MathUtils.h b/Common/MathUtils.h
index 8469b87..1882ccf 100644
--- a/Common/MathUtils.h
+++ b/Common/MathUtils.h
@@ -29,6 +29,7 @@ namespace MAd {
   // -------------------------------------------------------------------
   // --- Matrices ---
 
+  // 3 x 3
   void   transpose    (double [3][3]);
   void   transpMat    (const double [3][3], double [3][3]);
   double detMat       (const double [3][3]);
@@ -46,6 +47,9 @@ namespace MAd {
   void   meanRow43    (const double [4][3], double [3]);
   bool   isNanMat     (const double [3][3]);
 
+  // 2 x 2
+  double inverseMat22 (const double [2][2], double [2][2]);
+
   // -------------------------------------------------------------------
 
   void sort(double [3]);
diff --git a/Contrib/ANN/Copyright.txt b/Contrib/ANN/Copyright.txt
deleted file mode 100755
index 201b616..0000000
--- a/Contrib/ANN/Copyright.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-ANN: Approximate Nearest Neighbors
-Version: 1.1
-Release Date: May 3, 2005
-----------------------------------------------------------------------------
-Copyright (c) 1997-2006 University of Maryland and Sunil Arya and David
-Mount All Rights Reserved.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser Public License as published by the
-Free Software Foundation; either version 2.1 of the License, or (at your
-option) any later version.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser Public License for more details.
-
-A copy of the terms and conditions of the license can be found in
-License.txt or online at
-
-    http://www.gnu.org/copyleft/lesser.html
-
-To obtain a copy, write to the Free Software Foundation, Inc.,
-59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-Disclaimer
-----------
-The University of Maryland and the authors make no representations about
-the suitability or fitness of this software for any purpose.  It is
-provided "as is" without express or implied warranty.
----------------------------------------------------------------------
-
-Authors
--------
-David Mount
-Dept of Computer Science
-University of Maryland,
-College Park, MD 20742 USA
-mount at cs.umd.edu
-http://www.cs.umd.edu/~mount/
-
-Sunil Arya
-Dept of Computer Science
-Hong University of Science and Technology
-Clearwater Bay, HONG KONG
-arya at cs.ust.hk
-http://www.cs.ust.hk/faculty/arya/
diff --git a/Contrib/ANN/License.txt b/Contrib/ANN/License.txt
deleted file mode 100755
index 456ea97..0000000
--- a/Contrib/ANN/License.txt
+++ /dev/null
@@ -1,450 +0,0 @@
-----------------------------------------------------------------------
-The ANN Library (all versions) is provided under the terms and
-conditions of the GNU Lesser General Public Library, which is stated
-below.  It can also be found at:
-
-   http://www.gnu.org/copyleft/lesser.html
-
-----------------------------------------------------------------------
-
-GNU LESSER GENERAL PUBLIC LICENSE
-
-Version 2.1, February 1999
-
-Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
-as the successor of the GNU Library Public License, version 2, hence the
-version number 2.1.]
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public Licenses are
-intended to guarantee your freedom to share and change free software--to
-make sure the software is free for all its users.
-
-This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the Free
-Software Foundation and other authors who decide to use it. You can use
-it too, but we suggest you first think carefully about whether this
-license or the ordinary General Public License is the better strategy to
-use in any particular case, based on the explanations below.
-
-When we speak of free software, we are referring to freedom of use, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish); that you receive source code or can get it if
-you want it; that you can change the software and use pieces of it in
-new free programs; and that you are informed that you can do these
-things.
-
-To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for you
-if you distribute copies of the library or if you modify it.
-
-For example, if you distribute copies of the library, whether gratis or
-for a fee, you must give the recipients all the rights that we gave you.
-You must make sure that they, too, receive or can get the source code.
-If you link other code with the library, you must provide complete
-object files to the recipients, so that they can relink them with the
-library after making changes to the library and recompiling it. And you
-must show them these terms so they know their rights.
-
-We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-To protect each distributor, we want to make it very clear that there is
-no warranty for the free library. Also, if the library is modified by
-someone else and passed on, the recipients should know that what they
-have is not the original version, so that the original author's
-reputation will not be affected by problems that might be introduced by
-others.
-
-Finally, software patents pose a constant threat to the existence of any
-free program. We wish to make sure that a company cannot effectively
-restrict the users of a free program by obtaining a restrictive license
-from a patent holder. Therefore, we insist that any patent license
-obtained for a version of the library must be consistent with the full
-freedom of use specified in this license.
-
-Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License. This license, the GNU Lesser General Public
-License, applies to certain designated libraries, and is quite different
-from the ordinary General Public License. We use this license for
-certain libraries in order to permit linking those libraries into
-non-free programs.
-
-When a program is linked with a library, whether statically or using a
-shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the entire
-combination fits its criteria of freedom. The Lesser General Public
-License permits more lax criteria for linking other code with the
-library.
-
-We call this license the "Lesser" General Public License because it does
-Less to protect the user's freedom than the ordinary General Public
-License. It also provides other free software developers Less of an
-advantage over competing non-free programs. These disadvantages are the
-reason we use the ordinary General Public License for many libraries.
-However, the Lesser license provides advantages in certain special
-circumstances.
-
-For example, on rare occasions, there may be a special need to encourage
-the widest possible use of a certain library, so that it becomes a
-de-facto standard. To achieve this, non-free programs must be allowed to
-use the library. A more frequent case is that a free library does the
-same job as widely used non-free libraries. In this case, there is
-little to gain by limiting the free library to free software only, so we
-use the Lesser General Public License.
-
-In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of free
-software. For example, permission to use the GNU C Library in non-free
-programs enables many more people to use the whole GNU operating system,
-as well as its variant, the GNU/Linux operating system.
-
-Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is linked
-with the Library has the freedom and the wherewithal to run that program
-using a modified version of the Library.
-
-The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or other
-authorized party saying it may be distributed under the terms of this
-Lesser General Public License (also called "this License"). Each
-licensee is addressed as "you".
-
-A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-The "Library", below, refers to any such software library or work which
-has been distributed under these terms. A "work based on the Library"
-means either the Library or any derivative work under copyright law:
-that is to say, a work containing the Library or a portion of it, either
-verbatim or with modifications and/or translated straightforwardly into
-another language. (Hereinafter, translation is included without
-limitation in the term "modification".)
-
-"Source code" for a work means the preferred form of the work for making
-modifications to it. For a library, complete source code means all the
-source code for all modules it contains, plus any associated interface
-definition files, plus the scripts used to control compilation and
-installation of the library.
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of running
-a program using the Library is not restricted, and output from such a
-program is covered only if its contents constitute a work based on the
-Library (independent of the use of the Library in a tool for writing
-it). Whether that is true depends on what the Library does and what the
-program that uses the Library does.
-
-1. You may copy and distribute verbatim copies of the Library's complete
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the notices
-that refer to this License and to the absence of any warranty; and
-distribute a copy of this License along with the Library.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Library or any portion of
-it, thus forming a work based on the Library, and copy and distribute
-such modifications or work under the terms of Section 1 above, provided
-that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-    b) You must cause the files modified to carry prominent notices
-       stating that you changed the files and the date of any change.
-    c) You must cause the whole of the work to be licensed at no
-       charge to all third parties under the terms of this License.
-    d) If a facility in the modified Library refers to a function or a
-       table of data to be supplied by an application program that uses
-       the facility, other than as an argument passed when the facility
-       is invoked, then you must make a good faith effort to ensure that,
-       in the event an application does not supply such function or
-       table, the facility still operates, and performs whatever part of
-       its purpose remains meaningful.
-
-      (For example, a function in a library to compute square roots has
-a purpose that is entirely well-defined independent of the application.
-Therefore, Subsection 2d requires that any application-supplied function
-or table used by this function must be optional: if the application does
-not supply it, the square root function must still compute square
-roots.)
-
-      These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library, and
-can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based on
-the Library, the distribution of the whole must be on the terms of this
-License, whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote it.
-
-      Thus, it is not the intent of this section to claim rights or
-contest your rights to work written entirely by you; rather, the intent
-is to exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-      In addition, mere aggregation of another work not based on the
-Library with the Library (or with a work based on the Library) on a
-volume of a storage or distribution medium does not bring the other work
-under the scope of this License. 
-
-3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so that
-they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in these
-notices.
-
-Once this change is made in a given copy, it is irreversible for that
-copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of the
-Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or derivative
-of it, under Section 2) in object code or executable form under the
-terms of Sections 1 and 2 above provided that you accompany it with the
-complete corresponding machine-readable source code, which must be
-distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange.
-
-If distribution of object code is made by offering access to copy from a
-designated place, then offering equivalent access to copy the source
-code from the same place satisfies the requirement to distribute the
-source code, even though third parties are not compelled to copy the
-source along with the object code.
-
-5. A program that contains no derivative of any portion of the Library,
-but is designed to work with the Library by being compiled or linked
-with it, is called a "work that uses the Library". Such a work, in
-isolation, is not a derivative work of the Library, and therefore falls
-outside the scope of this License.
-
-However, linking a "work that uses the Library" with the Library creates
-an executable that is a derivative of the Library (because it contains
-portions of the Library), rather than a "work that uses the library".
-The executable is therefore covered by this License. Section 6 states
-terms for distribution of such executables.
-
-When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be linked
-without the Library, or if the work is itself a library. The threshold
-for this to be true is not precisely defined by law.
-
-If such an object file uses only numerical parameters, data structure
-layouts and accessors, and small macros and small inline functions (ten
-lines or less in length), then the use of the object file is
-unrestricted, regardless of whether it is legally a derivative work.
-(Executables containing this object code plus portions of the Library
-will still fall under Section 6.)
-
-Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6, whether
-or not they are linked directly with the Library itself.
-
-6. As an exception to the Sections above, you may also combine or link a
-"work that uses the Library" with the Library to produce a work
-containing portions of the Library, and distribute that work under terms
-of your choice, provided that the terms permit modification of the work
-for the customer's own use and reverse engineering for debugging such
-modifications.
-
-You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work during
-execution displays copyright notices, you must include the copyright
-notice for the Library among them, as well as a reference directing the
-user to the copy of this License. Also, you must do one of these things:
-
-    a) Accompany the work with the complete corresponding
-       machine-readable source code for the Library including whatever
-       changes were used in the work (which must be distributed under
-       Sections 1 and 2 above); and, if the work is an executable linked
-       with the Library, with the complete machine-readable "work that
-       uses the Library", as object code and/or source code, so that the
-       user can modify the Library and then relink to produce a modified
-       executable containing the modified Library. (It is understood that
-       the user who changes the contents of definitions files in the
-       Library will not necessarily be able to recompile the application
-       to use the modified definitions.)
-    b) Use a suitable shared library mechanism for linking with the
-       Library. A suitable mechanism is one that (1) uses at run time a
-       copy of the library already present on the user's computer system,
-       rather than copying library functions into the executable, and (2)
-       will operate properly with a modified version of the library, if
-       the user installs one, as long as the modified version is
-       interface-compatible with the version that the work was made with.
-    c) Accompany the work with a written offer, valid for at least
-       three years, to give the same user the materials specified in
-       Subsection 6a, above, for a charge no more than the cost of
-       performing this distribution.
-    d) If distribution of the work is made by offering access to copy
-       from a designated place, offer equivalent access to copy the above
-       specified materials from the same place.
-    e) Verify that the user has already received a copy of these
-       materials or that you have already sent this user a copy. 
-
-For an executable, the required form of the "work that uses the Library"
-must include any data and utility programs needed for reproducing the
-executable from it. However, as a special exception, the materials to be
-distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler,
-kernel, and so on) of the operating system on which the executable runs,
-unless that component itself accompanies the executable.
-
-It may happen that this requirement contradicts the license restrictions
-of other proprietary libraries that do not normally accompany the
-operating system. Such a contradiction means you cannot use both them
-and the Library together in an executable that you distribute.
-
-7. You may place library facilities that are a work based on the Library
-side-by-side in a single library together with other library facilities
-not covered by this License, and distribute such a combined library,
-provided that the separate distribution of the work based on the Library
-and of the other library facilities is otherwise permitted, and provided
-that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-       based on the Library, uncombined with any other library
-       facilities. This must be distributed under the terms of the
-       Sections above.
-    b) Give prominent notice with the combined library of the fact
-       that part of it is a work based on the Library, and explaining
-       where to find the accompanying uncombined form of the same work. 
-
-8. You may not copy, modify, sublicense, link with, or distribute the
-Library except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense, link with, or distribute the
-Library is void, and will automatically terminate your rights under this
-License. However, parties who have received copies, or rights, from you
-under this License will not have their licenses terminated so long as
-such parties remain in full compliance.
-
-9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and all
-its terms and conditions for copying, distributing or modifying the
-Library or works based on it.
-
-10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot distribute
-so as to satisfy simultaneously your obligations under this License and
-any other pertinent obligations, then as a consequence you may not
-distribute the Library at all. For example, if a patent license would
-not permit royalty-free redistribution of the Library by all those who
-receive copies directly or indirectly through you, then the only way you
-could satisfy both it and this License would be to refrain entirely from
-distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is implemented
-by public license practices. Many people have made generous
-contributions to the wide range of software distributed through that
-system in reliance on consistent application of that system; it is up to
-the author/donor to decide if he or she is willing to distribute
-software through any other system and a licensee cannot impose that
-choice.
-
-This section is intended to make thoroughly clear what is believed to be
-a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may
-add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among countries
-not thus excluded. In such case, this License incorporates the
-limitation as if written in the body of this License.
-
-13. The Free Software Foundation may publish revised and/or new versions
-of the Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a license
-version number, you may choose any version ever published by the Free
-Software Foundation.
-
-14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free Software
-Foundation; we sometimes make exceptions for this. Our decision will be
-guided by the two goals of preserving the free status of all derivatives
-of our free software and of promoting the sharing and reuse of software
-generally.
-
-NO WARRANTY
-
-15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH
-YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
-DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
-DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY
-(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
-INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
-THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR
-OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
diff --git a/Contrib/ANN/Makefile b/Contrib/ANN/Makefile
deleted file mode 100755
index 4451f2e..0000000
--- a/Contrib/ANN/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../../variables
-
-default:
-	@cd src && ${MAKE}
-
-cpobj:
-	@cd src && ${MAKE} cpobj
-
-clean:
-	@cd src && ${MAKE} clean
-
-depend:
-	@cd src && ${MAKE} depend
diff --git a/Contrib/ANN/Makefile.am b/Contrib/ANN/Makefile.am
new file mode 100644
index 0000000..25a958d
--- /dev/null
+++ b/Contrib/ANN/Makefile.am
@@ -0,0 +1,54 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+srcdir = @srcdir@
+includedir = @includedir@
+
+noinst_LTLIBRARIES = libMAdANN.la
+
+include_HEADERS = \
+  include/ANN/ANN.h\
+  include/ANN/ANNperf.h\
+  include/ANN/ANNx.h
+
+noinst_HEADERS=src/bd_tree.h\
+src/kd_fix_rad_search.h\
+src/kd_pr_search.h\
+src/kd_search.h\
+src/kd_split.h\
+src/kd_tree.h\
+src/kd_util.h\
+src/pr_queue.h\
+src/pr_queue_k.h
+
+
+AM_CPPFLAGS = -I${srcdir}/include
+
+libMAdANN_la_SOURCES = \
+  src/ANN.cpp\
+  src/bd_fix_rad_search.cpp\
+  src/bd_pr_search.cpp\
+  src/bd_search.cpp\
+  src/bd_tree.cpp\
+  src/brute.cpp\
+  src/kd_dump.cpp\
+  src/kd_fix_rad_search.cpp\
+  src/kd_pr_search.cpp\
+  src/kd_search.cpp\
+  src/kd_split.cpp\
+  src/kd_tree.cpp\
+  src/kd_util.cpp\
+  src/perf.cpp
+
+purge:
diff --git a/Contrib/ANN/Makefile.in b/Contrib/ANN/Makefile.in
new file mode 100644
index 0000000..2d96b66
--- /dev/null
+++ b/Contrib/ANN/Makefile.in
@@ -0,0 +1,680 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = Contrib/ANN
+DIST_COMMON = README $(include_HEADERS) $(noinst_HEADERS) \
+	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libMAdANN_la_LIBADD =
+am_libMAdANN_la_OBJECTS = ANN.lo bd_fix_rad_search.lo bd_pr_search.lo \
+	bd_search.lo bd_tree.lo brute.lo kd_dump.lo \
+	kd_fix_rad_search.lo kd_pr_search.lo kd_search.lo kd_split.lo \
+	kd_tree.lo kd_util.lo perf.lo
+libMAdANN_la_OBJECTS = $(am_libMAdANN_la_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libMAdANN_la_SOURCES)
+DIST_SOURCES = $(libMAdANN_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(includedir)"
+HEADERS = $(include_HEADERS) $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libMAdANN.la
+include_HEADERS = \
+  include/ANN/ANN.h\
+  include/ANN/ANNperf.h\
+  include/ANN/ANNx.h
+
+noinst_HEADERS = src/bd_tree.h\
+src/kd_fix_rad_search.h\
+src/kd_pr_search.h\
+src/kd_search.h\
+src/kd_split.h\
+src/kd_tree.h\
+src/kd_util.h\
+src/pr_queue.h\
+src/pr_queue_k.h
+
+AM_CPPFLAGS = -I${srcdir}/include
+libMAdANN_la_SOURCES = \
+  src/ANN.cpp\
+  src/bd_fix_rad_search.cpp\
+  src/bd_pr_search.cpp\
+  src/bd_search.cpp\
+  src/bd_tree.cpp\
+  src/brute.cpp\
+  src/kd_dump.cpp\
+  src/kd_fix_rad_search.cpp\
+  src/kd_pr_search.cpp\
+  src/kd_search.cpp\
+  src/kd_split.cpp\
+  src/kd_tree.cpp\
+  src/kd_util.cpp\
+  src/perf.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Contrib/ANN/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Contrib/ANN/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libMAdANN.la: $(libMAdANN_la_OBJECTS) $(libMAdANN_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libMAdANN_la_OBJECTS) $(libMAdANN_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ANN.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bd_fix_rad_search.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bd_pr_search.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bd_search.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bd_tree.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/brute.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_dump.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_fix_rad_search.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_pr_search.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_search.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_split.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_tree.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/kd_util.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/perf.Plo at am__quote@
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+ANN.lo: src/ANN.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ANN.lo -MD -MP -MF $(DEPDIR)/ANN.Tpo -c -o ANN.lo `test -f 'src/ANN.cpp' || echo '$(srcdir)/'`src/ANN.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/ANN.Tpo $(DEPDIR)/ANN.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/ANN.cpp' object='ANN.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ANN.lo `test -f 'src/ANN.cpp' || echo '$(srcdir)/'`src/ANN.cpp
+
+bd_fix_rad_search.lo: src/bd_fix_rad_search.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bd_fix_rad_search.lo -MD -MP -MF $(DEPDIR)/bd_fix_rad_search.Tpo -c -o bd_fix_rad_search.lo `test -f 'src/bd_fix_rad_search.cpp' || echo '$(srcdir)/'`src/bd_fix_rad_search.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/bd_fix_rad_search.Tpo $(DEPDIR)/bd_fix_rad_search.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/bd_fix_rad_search.cpp' object='bd_fix_rad_search.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bd_fix_rad_search.lo `test -f 'src/bd_fix_rad_search.cpp' || echo '$(srcdir)/'`src/bd_fix_rad_search.cpp
+
+bd_pr_search.lo: src/bd_pr_search.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bd_pr_search.lo -MD -MP -MF $(DEPDIR)/bd_pr_search.Tpo -c -o bd_pr_search.lo `test -f 'src/bd_pr_search.cpp' || echo '$(srcdir)/'`src/bd_pr_search.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/bd_pr_search.Tpo $(DEPDIR)/bd_pr_search.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/bd_pr_search.cpp' object='bd_pr_search.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bd_pr_search.lo `test -f 'src/bd_pr_search.cpp' || echo '$(srcdir)/'`src/bd_pr_search.cpp
+
+bd_search.lo: src/bd_search.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bd_search.lo -MD -MP -MF $(DEPDIR)/bd_search.Tpo -c -o bd_search.lo `test -f 'src/bd_search.cpp' || echo '$(srcdir)/'`src/bd_search.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/bd_search.Tpo $(DEPDIR)/bd_search.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/bd_search.cpp' object='bd_search.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bd_search.lo `test -f 'src/bd_search.cpp' || echo '$(srcdir)/'`src/bd_search.cpp
+
+bd_tree.lo: src/bd_tree.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT bd_tree.lo -MD -MP -MF $(DEPDIR)/bd_tree.Tpo -c -o bd_tree.lo `test -f 'src/bd_tree.cpp' || echo '$(srcdir)/'`src/bd_tree.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/bd_tree.Tpo $(DEPDIR)/bd_tree.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/bd_tree.cpp' object='bd_tree.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o bd_tree.lo `test -f 'src/bd_tree.cpp' || echo '$(srcdir)/'`src/bd_tree.cpp
+
+brute.lo: src/brute.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT brute.lo -MD -MP -MF $(DEPDIR)/brute.Tpo -c -o brute.lo `test -f 'src/brute.cpp' || echo '$(srcdir)/'`src/brute.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/brute.Tpo $(DEPDIR)/brute.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/brute.cpp' object='brute.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o brute.lo `test -f 'src/brute.cpp' || echo '$(srcdir)/'`src/brute.cpp
+
+kd_dump.lo: src/kd_dump.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_dump.lo -MD -MP -MF $(DEPDIR)/kd_dump.Tpo -c -o kd_dump.lo `test -f 'src/kd_dump.cpp' || echo '$(srcdir)/'`src/kd_dump.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_dump.Tpo $(DEPDIR)/kd_dump.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_dump.cpp' object='kd_dump.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_dump.lo `test -f 'src/kd_dump.cpp' || echo '$(srcdir)/'`src/kd_dump.cpp
+
+kd_fix_rad_search.lo: src/kd_fix_rad_search.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_fix_rad_search.lo -MD -MP -MF $(DEPDIR)/kd_fix_rad_search.Tpo -c -o kd_fix_rad_search.lo `test -f 'src/kd_fix_rad_search.cpp' || echo '$(srcdir)/'`src/kd_fix_rad_search.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_fix_rad_search.Tpo $(DEPDIR)/kd_fix_rad_search.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_fix_rad_search.cpp' object='kd_fix_rad_search.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_fix_rad_search.lo `test -f 'src/kd_fix_rad_search.cpp' || echo '$(srcdir)/'`src/kd_fix_rad_search.cpp
+
+kd_pr_search.lo: src/kd_pr_search.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_pr_search.lo -MD -MP -MF $(DEPDIR)/kd_pr_search.Tpo -c -o kd_pr_search.lo `test -f 'src/kd_pr_search.cpp' || echo '$(srcdir)/'`src/kd_pr_search.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_pr_search.Tpo $(DEPDIR)/kd_pr_search.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_pr_search.cpp' object='kd_pr_search.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_pr_search.lo `test -f 'src/kd_pr_search.cpp' || echo '$(srcdir)/'`src/kd_pr_search.cpp
+
+kd_search.lo: src/kd_search.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_search.lo -MD -MP -MF $(DEPDIR)/kd_search.Tpo -c -o kd_search.lo `test -f 'src/kd_search.cpp' || echo '$(srcdir)/'`src/kd_search.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_search.Tpo $(DEPDIR)/kd_search.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_search.cpp' object='kd_search.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_search.lo `test -f 'src/kd_search.cpp' || echo '$(srcdir)/'`src/kd_search.cpp
+
+kd_split.lo: src/kd_split.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_split.lo -MD -MP -MF $(DEPDIR)/kd_split.Tpo -c -o kd_split.lo `test -f 'src/kd_split.cpp' || echo '$(srcdir)/'`src/kd_split.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_split.Tpo $(DEPDIR)/kd_split.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_split.cpp' object='kd_split.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_split.lo `test -f 'src/kd_split.cpp' || echo '$(srcdir)/'`src/kd_split.cpp
+
+kd_tree.lo: src/kd_tree.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_tree.lo -MD -MP -MF $(DEPDIR)/kd_tree.Tpo -c -o kd_tree.lo `test -f 'src/kd_tree.cpp' || echo '$(srcdir)/'`src/kd_tree.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_tree.Tpo $(DEPDIR)/kd_tree.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_tree.cpp' object='kd_tree.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_tree.lo `test -f 'src/kd_tree.cpp' || echo '$(srcdir)/'`src/kd_tree.cpp
+
+kd_util.lo: src/kd_util.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT kd_util.lo -MD -MP -MF $(DEPDIR)/kd_util.Tpo -c -o kd_util.lo `test -f 'src/kd_util.cpp' || echo '$(srcdir)/'`src/kd_util.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/kd_util.Tpo $(DEPDIR)/kd_util.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/kd_util.cpp' object='kd_util.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o kd_util.lo `test -f 'src/kd_util.cpp' || echo '$(srcdir)/'`src/kd_util.cpp
+
+perf.lo: src/perf.cpp
+ at am__fastdepCXX_TRUE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT perf.lo -MD -MP -MF $(DEPDIR)/perf.Tpo -c -o perf.lo `test -f 'src/perf.cpp' || echo '$(srcdir)/'`src/perf.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/perf.Tpo $(DEPDIR)/perf.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='src/perf.cpp' object='perf.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o perf.lo `test -f 'src/perf.cpp' || echo '$(srcdir)/'`src/perf.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-includeHEADERS install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-includeHEADERS
+
+
+purge:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Contrib/ANN/src/Makefile b/Contrib/ANN/src/Makefile
deleted file mode 100755
index 78c86a4..0000000
--- a/Contrib/ANN/src/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../../../variables
-
-LIB = ../../../lib/libMAdANN${LIBEXT}
-
-INC = ${DASH}I../../../Common ${DASH}I../include
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = ANN.cpp\
-      bd_fix_rad_search.cpp\
-      bd_pr_search.cpp\
-      bd_search.cpp\
-      bd_tree.cpp\
-      brute.cpp\
-      kd_dump.cpp\
-      kd_fix_rad_search.cpp\
-      kd_pr_search.cpp\
-      kd_search.cpp\
-      kd_split.cpp\
-      kd_tree.cpp\
-      kd_util.cpp\
-      perf.cpp
-
-OBJ = ${SRC:.cpp=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cpp
-
-${LIB}: ${OBJ} 
-	${AR} ${ARFLAGS}${LIB} ${OBJ} 
-	${RANLIB} ${LIB}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} ../../../lib/
-
-.cpp${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $<
-
-clean:
-	${RM} *.o *.obj
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
-
diff --git a/Contrib/gmm/gmm.h b/Contrib/gmm/gmm.h
deleted file mode 100755
index c6bd391..0000000
--- a/Contrib/gmm/gmm.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Include common gmm files.
-*/
-#ifndef GMM_H__
-#define GMM_H__
-
-#include "gmm_kernel.h"
-#include "gmm_dense_lu.h"
-#include "gmm_dense_qr.h"
-
-#include "gmm_iter_solvers.h"
-#include "gmm_condition_number.h"
-#include "gmm_inoutput.h"
-
-#include "gmm_lapack_interface.h"
-#include "gmm_superlu_interface.h"
-
-
-#include "gmm_domain_decomp.h"
-
-#endif //  GMM_H__
diff --git a/Contrib/gmm/gmm_MUMPS_interface.h b/Contrib/gmm/gmm_MUMPS_interface.h
deleted file mode 100755
index a7c1401..0000000
--- a/Contrib/gmm/gmm_MUMPS_interface.h
+++ /dev/null
@@ -1,306 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_MUMPS_interface.h
-   @author Yves Renard <Yves.Renard at insa-lyon.fr>,
-   @author Julien Pommier <Julien.Pommier at insa-toulouse.fr>
-   @date December 8, 2005.
-   @brief Interface with MUMPS (LU direct solver for sparse matrices).
-*/
-#if defined(GMM_USES_MUMPS)
-
-#ifndef GMM_MUMPS_INTERFACE_H
-#define GMM_MUMPS_INTERFACE_H
-
-#include "gmm_kernel.h"
-
-
-extern "C" {
-
-#include <smumps_c.h>
-#undef F_INT
-#undef F_DOUBLE
-#undef F_DOUBLE2
-#include <dmumps_c.h>
-#undef F_INT
-#undef F_DOUBLE
-#undef F_DOUBLE2
-#include <cmumps_c.h>
-#undef F_INT
-#undef F_DOUBLE
-#undef F_DOUBLE2
-#include <zmumps_c.h>
-#undef F_INT
-#undef F_DOUBLE
-#undef F_DOUBLE2
-
-}
-
-namespace gmm {
-
-  template <typename T> struct ij_sparse_matrix {
-    std::vector<int> irn;
-    std::vector<int> jcn;
-    std::vector<T>        a;
-    
-    template <typename L> void store(const L& l, size_type i) {
-       typename linalg_traits<L>::const_iterator it = vect_const_begin(l),
-	 ite = vect_const_end(l);
-       for (; it != ite; ++it)
-	 { irn.push_back(i + 1); jcn.push_back(it.index() + 1); a.push_back(*it); }
-    }
-
-    template <typename L> void build_from(const L& l, row_major) {
-      for (size_type i = 0; i < mat_nrows(l); ++i)
-	store(mat_const_row(l, i), i);
-    }
-
-    template <typename L> void build_from(const L& l, col_major) {
-      for (size_type i = 0; i < mat_ncols(l); ++i)
-	store(mat_const_col(l, i), i);
-      irn.swap(jcn);
-    }
-
-    template <typename L> ij_sparse_matrix(const L& A) {
-      size_type nz = nnz(A);
-      irn.reserve(nz); jcn.reserve(nz); a.reserve(nz);
-      build_from(A,  typename principal_orientation_type<typename
-	       linalg_traits<L>::sub_orientation>::potype());
-    }
-  };
-
-  /* ********************************************************************* */
-  /*   MUMPS solve interface                                               */
-  /* ********************************************************************* */
-
-
-  template <typename T> struct mumps_interf {};
-
-  template <> struct mumps_interf<float> {
-    typedef SMUMPS_STRUC_C  MUMPS_STRUC_C;
-    typedef float value_type;
-
-    static void mumps_c(MUMPS_STRUC_C &id) { smumps_c(&id); }
-  };
-
-  template <> struct mumps_interf<double> {
-    typedef DMUMPS_STRUC_C  MUMPS_STRUC_C;
-    typedef double value_type;
-    static void mumps_c(MUMPS_STRUC_C &id) { dmumps_c(&id); }
-  };
-
-  template <> struct mumps_interf<std::complex<float> > {
-    typedef CMUMPS_STRUC_C  MUMPS_STRUC_C;
-    typedef mumps_complex value_type;
-    static void mumps_c(MUMPS_STRUC_C &id) { cmumps_c(&id); }
-  };
-
-  template <> struct mumps_interf<std::complex<double> > {
-    typedef ZMUMPS_STRUC_C  MUMPS_STRUC_C;
-    typedef mumps_double_complex value_type;
-    static void mumps_c(MUMPS_STRUC_C &id) { zmumps_c(&id); }
-  };
-
-
-  /** MUMPS solve interface  
-   *  Works only with sparse or skyline matrices
-   */
-  template <typename MAT, typename VECTX, typename VECTB>
-  void MUMPS_solve(const MAT &A, const VECTX &X_, const VECTB &B) {
-    VECTX &X = const_cast<VECTX &>(X_);
-
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename mumps_interf<T>::value_type MUMPS_T;
-    GMM_ASSERT2(gmm::mat_nrows(A) == gmm::mat_ncols(A), "Non square matrix");
-  
-    std::vector<T> rhs(gmm::vect_size(B)); gmm::copy(B, rhs);
-  
-    ij_sparse_matrix<T> AA(A);
-  
-    const int JOB_INIT = -1;
-    const int JOB_END = -2;
-    const int USE_COMM_WORLD = -987654;
-
-    typename mumps_interf<T>::MUMPS_STRUC_C id;
-
-#ifdef GMM_USES_MPI
-    int rank;
-    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-#endif
-    
-    id.job = JOB_INIT;
-    id.par = 1;
-    id.sym = 0;
-    id.comm_fortran = USE_COMM_WORLD;
-    mumps_interf<T>::mumps_c(id);
-    
-#ifdef GMM_USES_MPI
-    if (rank == 0) {
-#endif
-      id.n = gmm::mat_nrows(A);
-      id.nz = AA.irn.size();
-      id.irn = &(AA.irn[0]);
-      id.jcn = &(AA.jcn[0]);
-      id.a = (MUMPS_T*)(&(AA.a[0]));
-      id.rhs = (MUMPS_T*)(&(rhs[0]));
-#ifdef GMM_USES_MPI
-    }
-#endif
-
-#define ICNTL(I) icntl[(I)-1]
-#define INFO(I) info[(I)-1]
-    id.ICNTL(1) = -1; id.ICNTL(2) = -1; id.ICNTL(3) = -1; id.ICNTL(4) = 0;
-    id.job = 6;
-    
-    id.ICNTL(14) += 40; /* small boost to the workspace size as we have encountered some problem
-			   who did not fit in the default settings of mumps.. 
-			   by default, ICNTL(14) = 15 or 20
-		       */
-    //cout << "ICNTL(14): " << id.ICNTL(14) << "\n";
-
-    mumps_interf<T>::mumps_c(id);
-    if (id.INFO(1) < 0) {
-      switch (id.INFO(1)) {
-	case -6 : case -10 :
-	  GMM_ASSERT1(false, "Solve with MUMPS failed: matrix is singular");
-	case -13 :
-	  GMM_ASSERT1(false, "Solve with MUMPS failed: not enough memory");
-        case -9:
-	  GMM_ASSERT1(false, "Solve with MUMPS failed: error " << id.INFO(1)
-		      << ", increase ICNTL(14)");
-	default :
-	  GMM_ASSERT1(false, "Solve with MUMPS failed with error "
-		      << id.INFO(1));
-      }
-    }
-
-    id.job = JOB_END;
-    mumps_interf<T>::mumps_c(id);
-
-    gmm::copy(rhs, X);
-
-#undef ICNTL
-#undef INFO
-
-  }
-
-
-
-  /** MUMPS solve interface for distributed matrices 
-   *  Works only with sparse or skyline matrices
-   */
-  template <typename MAT, typename VECTX, typename VECTB>
-  void MUMPS_distributed_matrix_solve(const MAT &A, const VECTX &X_,
-				      const VECTB &B) {
-    VECTX &X = const_cast<VECTX &>(X_);
-
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename mumps_interf<T>::value_type MUMPS_T;
-    GMM_ASSERT2(gmm::mat_nrows(A) == gmm::mat_ncols(A), "Non-square matrix");
-  
-    std::vector<T> rhs(gmm::vect_size(B)); gmm::copy(B, rhs);
-  
-    ij_sparse_matrix<T> AA(A);
-  
-    const int JOB_INIT = -1;
-    const int JOB_END = -2;
-    const int USE_COMM_WORLD = -987654;
-
-    typename mumps_interf<T>::MUMPS_STRUC_C id;
-
-#ifdef GMM_USES_MPI
-    int rank;
-    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-#endif
-    
-    id.job = JOB_INIT;
-    id.par = 1;
-    id.sym = 0;
-    id.comm_fortran = USE_COMM_WORLD;
-    mumps_interf<T>::mumps_c(id);
-    
-    id.n = gmm::mat_nrows(A);
-    id.nz_loc = AA.irn.size();
-    id.irn_loc = &(AA.irn[0]);
-    id.jcn_loc = &(AA.jcn[0]);
-    id.a_loc = (MUMPS_T*)(&(AA.a[0]));
-
-#ifdef GMM_USES_MPI
-    if (rank == 0) {
-#endif
-      id.rhs = (MUMPS_T*)(&(rhs[0]));
-#ifdef GMM_USES_MPI
-    }
-#endif
-
-#define ICNTL(I) icntl[(I)-1]
-#define INFO(I) info[(I)-1]
-    id.ICNTL(1) = -1; id.ICNTL(2) = 6; // id.ICNTL(2) = -1;
-    id.ICNTL(3) = 6;
-    // id.ICNTL(3) = -1; 
-    id.ICNTL(4) = 2;
-    id.ICNTL(5)=0; id.ICNTL(18)=3;
-    id.job = 6;
-    mumps_interf<T>::mumps_c(id);
-    if (id.INFO(1) < 0) {
-      switch (id.INFO(1)) {
-      case -6 : case -10 :
-	GMM_ASSERT1(false, "Solve with MUMPS failed: matrix is singular");
-      case -13:
-	GMM_ASSERT1(false, "Solve with MUMPS failed: not enough memory");
-      case -9:
-	GMM_ASSERT1(false, "Solve with MUMPS failed: error " << id.INFO(1)
-		    << ", increase ICNTL(14)");
-      default :
-	GMM_ASSERT1(false, "Solve with MUMPS failed with error " <<id.INFO(1));
-      }
-    }
-
-    id.job = JOB_END;
-    mumps_interf<T>::mumps_c(id);
-#ifdef GMM_USES_MPI
-    MPI_Bcast(&(rhs[0]),id.n,gmm::mpi_type(T()),0,MPI_COMM_WORLD);
-#endif
-    gmm::copy(rhs, X);
-
-#undef ICNTL
-#undef INFO
-
-  }
-
-
-
-
-}
-
-  
-#endif // GMM_MUMPS_INTERFACE_H
-
-#endif // GMM_USES_MUMPS
diff --git a/Contrib/gmm/gmm_algobase.h b/Contrib/gmm/gmm_algobase.h
deleted file mode 100755
index 1b72ac2..0000000
--- a/Contrib/gmm/gmm_algobase.h
+++ /dev/null
@@ -1,225 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2000-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/** @file gmm_algobase.h 
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date September 28, 2000.
-    @brief Miscelleanous algorithms on containers.
-*/
-
-#ifndef GMM_ALGOBASE_H__
-#define GMM_ALGOBASE_H__
-#include "gmm_std.h"
-#include "gmm_except.h"
-#include <functional>
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /* Definitition de classes de comparaison.                               */
-  /* retournant un int.                                                    */
-  /* ********************************************************************* */
-  
-  template <class T>
-    struct less : public std::binary_function<T, T, int> {
-    inline int operator()(const T& x, const T& y) const
-    { return (x < y) ? -1 : ((y < x) ? 1 : 0); }
-  };
-
-  template<> struct less<int> : public std::binary_function<int, int, int>
-  { int operator()(int x, int y) const { return x-y; } };
-  template<> struct less<char> : public std::binary_function<char, char, int>
-  { int operator()(char x, char y) const { return int(x-y); } };
-  template<> struct less<short> : public std::binary_function<short,short,int>
-  { int operator()(short x, short y) const { return int(x-y); } };
-  template<> struct less<unsigned char>
-     : public std::binary_function<unsigned char, unsigned char, int> {
-    int operator()(unsigned char x, unsigned char y) const
-    { return int(x)-int(y); }
-  };
-  
-
-  template <class T>
-    struct greater : public std::binary_function<T, T, int> {
-    inline int operator()(const T& x, const T& y) const
-    { return (y < x) ? -1 : ((x < y) ? 1 : 0); }
-  };
-
-  template<> struct greater<int> : public std::binary_function<int, int, int>
-  { int operator()(int x, int y) const { return y-x; } };
-  template<> struct greater<char> : public std::binary_function<char,char,int>
-  { int operator()(char x, char y) const { return int(y-x); } };
-  template<> struct greater<short>
-      : public std::binary_function<short, short, int>
-  { int operator()(short x, short y) const { return int(y-x); } };
-  template<> struct greater<unsigned char>
-    : public std::binary_function<unsigned char, unsigned char, int> {
-    int operator()(unsigned char x, unsigned char y) const
-      { return int(y)-int(x); }
-  };
-
-  template <typename T> inline T my_abs(T a) { return (a < T(0)) ? T(-a) : a; }
-  
-  template <class T>
-    struct approx_less : public std::binary_function<T, T, int> { 
-    double eps;
-    inline int operator()(const T &x, const T &y) const
-    { if (my_abs(x - y) <= eps) return 0; if (x < y) return -1; return 1; }
-    approx_less(double e = 1E-13) { eps = e; }
-  };
-
-  template <class T>
-    struct approx_greater : public std::binary_function<T, T, int> { 
-    double eps;
-    inline int operator()(const T &x, const T &y) const
-    { if (my_abs(x - y) <= eps) return 0; if (x > y) return -1; return 1; }
-    approx_greater(double e = 1E-13) { eps = e; }
-  };
-
-  template<class ITER1, class ITER2, class COMP>
-    int lexicographical_compare(ITER1 b1, const ITER1 &e1,
-				ITER2 b2, const ITER2 &e2, const COMP &c)  {
-    int i;
-    for ( ; b1 != e1 && b2 != e2; ++b1, ++b2)
-      if ((i = c(*b1, *b2)) != 0) return i;
-    if (b1 != e1) return 1; if (b2 != e2) return -1; return 0; 
-  }
-
-  template<class CONT, class COMP = gmm::less<typename CONT::value_type> >
-    struct lexicographical_less : public std::binary_function<CONT, CONT, int>
-  { 
-    COMP c;
-    int operator()(const CONT &x, const CONT &y) const {
-      return gmm::lexicographical_compare(x.begin(), x.end(),
-					  y.begin(), y.end(), c);
-    }
-    lexicographical_less(const COMP &d = COMP()) { c = d; }
-  };
-
-  template<class CONT, class COMP = gmm::less<typename CONT::value_type> >
-  struct lexicographical_greater
-    : public std::binary_function<CONT, CONT, int> { 
-    COMP c;
-    int operator()(const CONT &x, const CONT &y) const {
-      return -gmm::lexicographical_compare(x.begin(), x.end(),
-					   y.begin(), y.end(), c);
-    }
-    lexicographical_greater(const COMP &d = COMP()) { c = d; }
-  };
-  
-
-  /* ********************************************************************* */
-  /* "Virtual" iterators on sequences.                                     */
-  /* The class T represent a class of sequence.                            */
-  /* ********************************************************************* */
-
-  template<class T> struct sequence_iterator {
-    
-    typedef T             value_type;
-    typedef value_type*   pointer;
-    typedef value_type&   reference;
-    typedef const value_type& const_reference;
-    typedef std::forward_iterator_tag iterator_category;
-
-    T Un;
-
-    sequence_iterator(T U0 = T(0)) { Un = U0; }
-    
-    sequence_iterator &operator ++()
-    { ++Un; return *this; }
-    sequence_iterator operator ++(int)
-    { sequence_iterator tmp = *this; (*this)++; return tmp; }
-	
-    const_reference operator *() const { return Un; }
-    reference operator *() { return Un; }
-    
-    bool operator ==(const sequence_iterator &i) const { return (i.Un==Un);}
-    bool operator !=(const sequence_iterator &i) const { return (i.Un!=Un);}
-  };
-
-  /* ********************************************************************* */
-  /* generic algorithms.                                                   */
-  /* ********************************************************************* */
-
-  template <class ITER1, class SIZE, class ITER2>
-  ITER2 copy_n(ITER1 first, SIZE count, ITER2 result) {
-    for ( ; count > 0; --count, ++first, ++result) *result = *first;
-    return result;
-  }
-
-  template<class ITER>
-    typename std::iterator_traits<ITER>::value_type
-      mean_value(ITER first, const ITER &last) {
-    GMM_ASSERT2(first != last, "mean value of empty container");
-    size_t n = 1;
-    typename std::iterator_traits<ITER>::value_type res = *first++;
-    while (first != last) { res += *first; ++first; ++n; }
-    res /= n;
-    return res;
-  }
-
-  template<class CONT>
-    typename CONT::value_type
-  mean_value(const CONT &c) { return mean_value(c.begin(), c.end()); }
-
-  template<class ITER> /* hum ... */
-    void minmax_box(typename std::iterator_traits<ITER>::value_type &pmin,
-		    typename std::iterator_traits<ITER>::value_type &pmax,
-		    ITER first, const ITER &last) {
-    typedef typename std::iterator_traits<ITER>::value_type PT;
-    if (first != last) { pmin = pmax = *first; ++first; }
-    while (first != last) {
-      typename PT::const_iterator b = (*first).begin(), e = (*first).end();
-      typename PT::iterator b1 = pmin.begin(), b2 = pmax.begin();
-      while (b != e)
-	{ *b1 = std::min(*b1, *b); *b2 = std::max(*b2, *b); ++b; ++b1; ++b2; }
-    }
-  }
-
-  template<typename VEC> struct sorted_indexes_aux {
-    const VEC &v;
-  public:
-    sorted_indexes_aux(const VEC& v_) : v(v_) {}
-    template <typename IDX>
-    bool operator()(const IDX &ia, const IDX &ib) const
-    { return v[ia] < v[ib]; }
-  };
-
-  template<typename VEC, typename IVEC> 
-  void sorted_indexes(const VEC &v, IVEC &iv) {
-    iv.clear(); iv.resize(v.size());
-    for (size_t i=0; i < v.size(); ++i) iv[i] = i;
-    std::sort(iv.begin(), iv.end(), sorted_indexes_aux<VEC>(v));
-  }
-
-}
-
-
-#endif /* GMM_ALGOBASE_H__ */
diff --git a/Contrib/gmm/gmm_blas.h b/Contrib/gmm/gmm_blas.h
deleted file mode 100755
index 31c76cc..0000000
--- a/Contrib/gmm/gmm_blas.h
+++ /dev/null
@@ -1,2282 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_blas.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Basic linear algebra functions.
-*/
-
-#ifndef GMM_BLAS_H__
-#define GMM_BLAS_H__
-
-#include "gmm_scaled.h"
-#include "gmm_transposed.h"
-#include "gmm_conjugated.h"
-
-namespace gmm {
-
-  /* ******************************************************************** */
-  /*		                                         		  */
-  /*		Generic algorithms                           		  */
-  /*		                                         		  */
-  /* ******************************************************************** */
-
-
-  /* ******************************************************************** */
-  /*		Miscellaneous                           		  */
-  /* ******************************************************************** */
-
-  /** clear (fill with zeros) a vector or matrix. */
-  template <typename L> inline void clear(L &l)
-  { linalg_traits<L>::do_clear(l); }
-  /** @cond DOXY_SHOW_ALL_FUNCTIONS 
-      skip all these redundant definitions in doxygen documentation..
-   */
-  template <typename L> inline void clear(const L &l)
-  { linalg_traits<L>::do_clear(linalg_const_cast(l)); }
-
-  ///@endcond
-  /** count the number of non-zero entries of a vector or matrix. */  template <typename L> inline size_type nnz(const L& l)
-  { return nnz(l, typename linalg_traits<L>::linalg_type()); }
-
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename L> inline size_type nnz(const L& l, abstract_vector) { 
-    typename linalg_traits<L>::const_iterator it = vect_const_begin(l),
-      ite = vect_const_end(l);
-    size_type res(0);
-    for (; it != ite; ++it) ++res;
-    return res;
-  }
-
-  template <typename L> inline size_type nnz(const L& l, abstract_matrix) {
-    return nnz(l,  typename principal_orientation_type<typename
-	       linalg_traits<L>::sub_orientation>::potype());
-  }
-
-  template <typename L> inline size_type nnz(const L& l, row_major) {
-    size_type res(0);
-    for (size_type i = 0; i < mat_nrows(l); ++i)
-      res += nnz(mat_const_row(l, i));
-    return res;
-  } 
-
-  template <typename L> inline size_type nnz(const L& l, col_major) {
-    size_type res(0);
-    for (size_type i = 0; i < mat_ncols(l); ++i)
-      res += nnz(mat_const_col(l, i));
-    return res;
-  }
-
-  ///@endcond
-
-
-  /** fill a vector or matrix with x. */
-  template <typename L> inline
-  void fill(L& l, typename gmm::linalg_traits<L>::value_type x) {
-    typedef typename gmm::linalg_traits<L>::value_type T;
-    if (x == T(0)) gmm::clear(l);
-    fill(l, x, typename linalg_traits<L>::linalg_type());
-  }
-
-  template <typename L> inline
-  void fill(const L& l, typename gmm::linalg_traits<L>::value_type x) {
-    fill(linalg_const_cast(l), x);
-  }
-
-  template <typename L> inline // to be optimized for dense vectors ...
-  void fill(L& l,  typename gmm::linalg_traits<L>::value_type x,
-		   abstract_vector) {
-    for (size_type i = 0; i < vect_size(l); ++i) l[i] = x;
-  }
-
-  template <typename L> inline // to be optimized for dense matrices ...
-  void fill(L& l, typename gmm::linalg_traits<L>::value_type x,
-		   abstract_matrix) {
-    for (size_type i = 0; i < mat_nrows(l); ++i)
-      for (size_type j = 0; j < mat_ncols(l); ++j)
-	l(i,j) = x;
-  }
-
-  /** fill a vector or matrix with random value (uniform [0,1]). */
-  template <typename L> inline void fill_random(L& l)
-  { fill_random(l, typename linalg_traits<L>::linalg_type()); }
-
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename L> inline void fill_random(const L& l) {
-    fill_random(linalg_const_cast(l),
-		typename linalg_traits<L>::linalg_type());
-  }
-
-  template <typename L> inline void fill_random(L& l, abstract_vector) {
-    for (size_type i = 0; i < vect_size(l); ++i)
-      l[i] = gmm::random(typename linalg_traits<L>::value_type());
-  }
-
-  template <typename L> inline void fill_random(L& l, abstract_matrix) {
-    for (size_type i = 0; i < mat_nrows(l); ++i)
-      for (size_type j = 0; j < mat_ncols(l); ++j)
-	l(i,j) = gmm::random(typename linalg_traits<L>::value_type());
-  }
-
-  ///@endcond
-  /** fill a vector or matrix with random value.
-      @param l a vector or matrix.
-      @param cfill probability of a non-zero value.
-  */
-  template <typename L> inline void fill_random(L& l, double cfill)
-  { fill_random(l, cfill, typename linalg_traits<L>::linalg_type()); }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L> inline void fill_random(const L& l, double cfill) {
-    fill_random(linalg_const_cast(l), cfill,
-		typename linalg_traits<L>::linalg_type());
-  }
-
-  template <typename L> inline
-  void fill_random(L& l, double cfill, abstract_vector) {
-    typedef typename linalg_traits<L>::value_type T;
-    size_type ntot = std::min(vect_size(l), size_type(vect_size(l)*cfill) + 1);
-    for (size_type nb = 0; nb < ntot;) {
-      size_type i = gmm::irandom(vect_size(l));
-      if (l[i] == T(0)) { 
-	l[i] = gmm::random(typename linalg_traits<L>::value_type());
-	++nb;
-      }
-    }
-  }
-
-  template <typename L> inline
-  void fill_random(L& l, double cfill, abstract_matrix) {
-    fill_random(l, cfill, typename principal_orientation_type<typename
-		linalg_traits<L>::sub_orientation>::potype());
-  }
-
-  template <typename L> inline
-  void fill_random(L& l, double cfill, row_major) {
-    for (size_type i=0; i < mat_nrows(l); ++i) fill_random(mat_row(l,i),cfill);
-  }
-
-  template <typename L> inline
-  void fill_random(L& l, double cfill, col_major) {
-    for (size_type j=0; j < mat_ncols(l); ++j) fill_random(mat_col(l,j),cfill);
-  }
-
-  /* resize a vector */
-  template <typename V> inline
-  void resize(V &v, size_type n, linalg_false)
-  { linalg_traits<V>::resize(v, n); }
-
-  template <typename V> inline
-  void resize(V &, size_type , linalg_modifiable)
-  { GMM_ASSERT1(false, "You cannot resize a reference"); }
-
-  template <typename V> inline
-  void resize(V &, size_type , linalg_const)
-  { GMM_ASSERT1(false, "You cannot resize a reference"); }
-
-  ///@endcond
-  /** resize a vector. */
-   template <typename V> inline
-  void resize(V &v, size_type n) {
-    resize(v, n, typename linalg_traits<V>::is_reference());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  /** resize a matrix **/
-  template <typename M> inline
-  void resize(M &v, size_type m, size_type n, linalg_false) {
-    linalg_traits<M>::resize(v, m, n);
-  }
-
-  template <typename M> inline
-  void resize(M &, size_type, size_type, linalg_modifiable)
-  { GMM_ASSERT1(false, "You cannot resize a reference"); }
-
-  template <typename M> inline
-  void resize(M &, size_type, size_type, linalg_const)
-  { GMM_ASSERT1(false, "You cannot resize a reference"); }
-
-  ///@endcond 
-  /** resize a matrix */
-  template <typename M> inline
-  void resize(M &v, size_type m, size_type n)
-  { resize(v, m, n, typename linalg_traits<M>::is_reference()); }
-  ///@cond
-
-  template <typename M> inline
-  void reshape(M &v, size_type m, size_type n, linalg_false)
-  { linalg_traits<M>::reshape(v, m, n); }
-
-  template <typename M> inline
-  void reshape(M &, size_type, size_type, linalg_modifiable)
-  { GMM_ASSERT1(false, "You cannot reshape a reference"); }
-
-  template <typename M> inline
-  void reshape(M &, size_type, size_type, linalg_const)
-  { GMM_ASSERT1(false, "You cannot reshape a reference"); }
-
-  ///@endcond 
-  /** reshape a matrix */
-  template <typename M> inline
-  void reshape(M &v, size_type m, size_type n)
-  { reshape(v, m, n, typename linalg_traits<M>::is_reference()); }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  
-
-  /* ******************************************************************** */
-  /*		Scalar product                             		  */
-  /* ******************************************************************** */
-
-  ///@endcond
-  /** scalar product between two vectors */
-  template <typename V1, typename V2> inline
-  typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2) {
-    GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-    return vect_sp(v1, v2,
-		   typename linalg_traits<V1>::storage_type(), 
-		   typename linalg_traits<V2>::storage_type());
-  }
-
-  /** scalar product between two vectors, using a matrix.
-      @param ps the matrix of the scalar product.
-      @param v1 the first vector
-      @param v2 the second vector
-  */
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp(const MATSP &ps, const V1 &v1, const V2 &v2) {
-    return vect_sp_with_mat(ps, v1, v2,
-			    typename linalg_traits<MATSP>::sub_orientation());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename MATSP, typename V1, typename V2> inline
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_mat(const MATSP &ps, const V1 &v1, const V2 &v2, row_major) {
-    return vect_sp_with_matr(ps, v1, v2, 
-			     typename linalg_traits<V2>::storage_type());
-  }
-
-  template <typename MATSP, typename V1, typename V2> inline 
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_matr(const MATSP &ps, const V1 &v1, const V2 &v2,
-		      abstract_sparse) {
-    GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) &&
-		vect_size(v2) == mat_nrows(ps), "dimensions mismatch");
-    size_type nr = mat_nrows(ps);
-    typename linalg_traits<V2>::const_iterator
-      it = vect_const_begin(v2), ite = vect_const_end(v2);
-    typename strongest_value_type3<V1,V2,MATSP>::value_type res(0);
-    for (; it != ite; ++it)
-      res += vect_sp(mat_const_row(ps, it.index()), v1)* (*it);
-    return res;
-  }
-
-  template <typename MATSP, typename V1, typename V2> inline
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_matr(const MATSP &ps, const V1 &v1, const V2 &v2,
-		      abstract_skyline)
-  { return vect_sp_with_matr(ps, v1, v2, abstract_sparse()); }
-
-  template <typename MATSP, typename V1, typename V2> inline
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_matr(const MATSP &ps, const V1 &v1, const V2 &v2,
-		      abstract_dense) {
-    GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) &&
-		vect_size(v2) == mat_nrows(ps), "dimensions mismatch");
-    typename linalg_traits<V2>::const_iterator
-      it = vect_const_begin(v2), ite = vect_const_end(v2);
-    typename strongest_value_type3<V1,V2,MATSP>::value_type res(0);
-    for (size_type i = 0; it != ite; ++i, ++it)
-      res += vect_sp(mat_const_row(ps, i), v1) * (*it);
-    return res;
-  }
-
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-  vect_sp_with_mat(const MATSP &ps, const V1 &v1,const V2 &v2,row_and_col)
-  { return vect_sp_with_mat(ps, v1, v2, row_major()); }
-
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-  vect_sp_with_mat(const MATSP &ps, const V1 &v1, const V2 &v2,col_major){
-    return vect_sp_with_matc(ps, v1, v2,
-			     typename linalg_traits<V1>::storage_type());
-  }
-
-  template <typename MATSP, typename V1, typename V2> inline
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_matc(const MATSP &ps, const V1 &v1, const V2 &v2,
-		      abstract_sparse) {
-    GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) &&
-		vect_size(v2) == mat_nrows(ps),"dimensions mismatch");
-    typename linalg_traits<V1>::const_iterator
-      it = vect_const_begin(v1), ite = vect_const_end(v1);
-    typename strongest_value_type3<V1,V2,MATSP>::value_type res(0);
-    for (; it != ite; ++it)
-      res += vect_sp(mat_const_col(ps, it.index()), v2) * (*it);
-    return res;
-  }
-
-  template <typename MATSP, typename V1, typename V2> inline
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_matc(const MATSP &ps, const V1 &v1, const V2 &v2,
-		      abstract_skyline)
-  { return vect_sp_with_matc(ps, v1, v2, abstract_sparse()); }
-
-  template <typename MATSP, typename V1, typename V2> inline
-    typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_sp_with_matc(const MATSP &ps, const V1 &v1, const V2 &v2,
-		      abstract_dense) {
-    GMM_ASSERT2(vect_size(v1) == mat_ncols(ps) &&
-		vect_size(v2) == mat_nrows(ps), "dimensions mismatch");
-    typename linalg_traits<V1>::const_iterator
-      it = vect_const_begin(v1), ite = vect_const_end(v1);
-    typename strongest_value_type3<V1,V2,MATSP>::value_type res(0);
-    for (size_type i = 0; it != ite; ++i, ++it)
-      res += vect_sp(mat_const_col(ps, i), v2) * (*it);
-    return res;
-  }
-
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-  vect_sp_with_mat(const MATSP &ps, const V1 &v1,const V2 &v2,col_and_row)
-  { return vect_sp_with_mat(ps, v1, v2, col_major()); }
-
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-  vect_sp_with_mat(const MATSP &ps, const V1 &v1, const V2 &v2,
-		   abstract_null_type) {
-    typename temporary_vector<V1>::vector_type w(mat_nrows(ps));
-    GMM_WARNING2("Warning, a temporary is used in scalar product\n");
-    mult(ps, v1, w); 
-    return vect_sp(w, v2);
-  }
-
-  template <typename IT1, typename IT2> inline
-  typename strongest_numeric_type<typename std::iterator_traits<IT1>::value_type,
-				  typename std::iterator_traits<IT2>::value_type>::T
-  vect_sp_dense_(IT1 it, IT1 ite, IT2 it2) {
-    typename strongest_numeric_type<typename std::iterator_traits<IT1>::value_type,
-      typename std::iterator_traits<IT2>::value_type>::T res(0);
-    for (; it != ite; ++it, ++it2) res += (*it) * (*it2);
-    return res;
-  }
-  
-  template <typename IT1, typename V> inline
-    typename strongest_numeric_type<typename std::iterator_traits<IT1>::value_type,
-				    typename linalg_traits<V>::value_type>::T
-    vect_sp_sparse_(IT1 it, IT1 ite, const V &v) {
-      typename strongest_numeric_type<typename std::iterator_traits<IT1>::value_type,
-	typename linalg_traits<V>::value_type>::T res(0);
-    for (; it != ite; ++it) res += (*it) * v[it.index()];
-    return res;
-  }
-
-  template <typename V1, typename V2> inline
-  typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_dense, abstract_dense) {
-    return vect_sp_dense_(vect_const_begin(v1), vect_const_end(v1),
-			  vect_const_begin(v2));
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_skyline, abstract_dense) {
-    typename linalg_traits<V1>::const_iterator it1 = vect_const_begin(v1),
-      ite =  vect_const_end(v1);
-    typename linalg_traits<V2>::const_iterator it2 = vect_const_begin(v2);
-    return vect_sp_dense_(it1, ite, it2 + it1.index());
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_dense, abstract_skyline) {
-    typename linalg_traits<V2>::const_iterator it1 = vect_const_begin(v2),
-      ite =  vect_const_end(v2);
-    typename linalg_traits<V1>::const_iterator it2 = vect_const_begin(v1);
-    return vect_sp_dense_(it1, ite, it2 + it1.index());
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_skyline, abstract_skyline) {
-    typedef typename strongest_value_type<V1,V2>::value_type T;
-    typename linalg_traits<V1>::const_iterator it1 = vect_const_begin(v1),
-      ite1 =  vect_const_end(v1);
-    typename linalg_traits<V2>::const_iterator it2 = vect_const_begin(v2),
-      ite2 =  vect_const_end(v2);
-    size_type n = std::min(ite1.index(), ite2.index());
-    size_type l = std::max(it1.index(), it2.index());
-
-    if (l < n) {
-      size_type m = l - it1.index(), p = l - it2.index(), q = m + n - l;
-      return vect_sp_dense_(it1+m, it1+q, it2 + p);
-    }
-    return T(0);
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-  vect_sp(const V1 &v1, const V2 &v2,abstract_sparse,abstract_dense) {
-    return vect_sp_sparse_(vect_const_begin(v1), vect_const_end(v1), v2);
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_sparse, abstract_skyline) {
-    return vect_sp_sparse_(vect_const_begin(v1), vect_const_end(v1), v2);
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_skyline, abstract_sparse) {
-    return vect_sp_sparse_(vect_const_begin(v2), vect_const_end(v2), v1);
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2, abstract_dense,abstract_sparse) {
-    return vect_sp_sparse_(vect_const_begin(v2), vect_const_end(v2), v1);
-  }
-
-
-  template <typename V1, typename V2> inline
-  typename strongest_value_type<V1,V2>::value_type
-  vect_sp_sparse_sparse(const V1 &v1, const V2 &v2, linalg_true) {
-    typename linalg_traits<V1>::const_iterator it1 = vect_const_begin(v1),
-      ite1 = vect_const_end(v1);
-    typename linalg_traits<V2>::const_iterator it2 = vect_const_begin(v2),
-      ite2 = vect_const_end(v2);
-    typename strongest_value_type<V1,V2>::value_type res(0);
-    
-    while (it1 != ite1 && it2 != ite2) {
-      if (it1.index() == it2.index())
-	{ res += (*it1) * *it2; ++it1; ++it2; }
-      else if (it1.index() < it2.index()) ++it1; else ++it2;
-    }
-    return res;
-  }
-
-  template <typename V1, typename V2> inline
-  typename strongest_value_type<V1,V2>::value_type
-  vect_sp_sparse_sparse(const V1 &v1, const V2 &v2, linalg_false) {
-    return vect_sp_sparse_(vect_const_begin(v1), vect_const_end(v1), v2);
-  }
-
-  template <typename V1, typename V2> inline
-    typename strongest_value_type<V1,V2>::value_type
-    vect_sp(const V1 &v1, const V2 &v2,abstract_sparse,abstract_sparse) {
-    return vect_sp_sparse_sparse(v1, v2,
-	    typename linalg_and<typename linalg_traits<V1>::index_sorted,
-	    typename linalg_traits<V2>::index_sorted>::bool_type());
-  }
-  
-  /* ******************************************************************** */
-  /*		Hermitian product                             		  */
-  /* ******************************************************************** */
-  ///@endcond
-  /** Hermitian product. */
-  template <typename V1, typename V2>
-  inline typename strongest_value_type<V1,V2>::value_type
-  vect_hp(const V1 &v1, const V2 &v2)
-  { return vect_sp(v1, conjugated(v2)); }
-
-  /** Hermitian product with a matrix. */
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-    vect_hp(const MATSP &ps, const V1 &v1, const V2 &v2) {
-    return vect_sp(ps, v1, gmm::conjugated(v2));
-  }
-
-  /* ******************************************************************** */
-  /*		Trace of a matrix                             		  */
-  /* ******************************************************************** */
-  
-  /** Trace of a matrix */
-   template <typename M>
-   typename linalg_traits<M>::value_type
-   mat_trace(const M &m) {
-     typedef typename linalg_traits<M>::value_type T;
-     T res(0);
-     for (size_type i = 0; i < std::max(mat_nrows(m), mat_ncols(m)); ++i)
-       res += m(i,i);
-     return res;
-  }
-
-  /* ******************************************************************** */
-  /*		Euclidean norm                             		  */
-  /* ******************************************************************** */
-
-  /** Euclidean norm of a vector. */
-  template <typename V>
-  typename number_traits<typename linalg_traits<V>::value_type>
-  ::magnitude_type
-  vect_norm2_sqr(const V &v) {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    typename linalg_traits<V>::const_iterator
-      it = vect_const_begin(v), ite = vect_const_end(v);
-    R res(0);
-    for (; it != ite; ++it) res += gmm::abs_sqr(*it);
-    return res;
-  }
-
-  /** squared Euclidean norm of a vector. */
-  template <typename V> inline
-   typename number_traits<typename linalg_traits<V>::value_type>
-   ::magnitude_type 
-  vect_norm2(const V &v)
-  { return sqrt(vect_norm2_sqr(v)); }
-  
-
-  /** squared Euclidean distance between two vectors */
-  template <typename V1, typename V2> inline
-   typename number_traits<typename linalg_traits<V1>::value_type>
-   ::magnitude_type
-  vect_dist2_sqr(const V1 &v1, const V2 &v2) { // not fully optimized 
-    typedef typename linalg_traits<V1>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    typename linalg_traits<V1>::const_iterator
-      it1 = vect_const_begin(v1), ite1 = vect_const_end(v1);
-    typename linalg_traits<V2>::const_iterator
-      it2 = vect_const_begin(v2), ite2 = vect_const_end(v2);
-    size_type k1(0), k2(0);
-    R res(0);
-    while (it1 != ite1 && it2 != ite2) {
-      size_type i1 = index_of_it(it1, k1,
-				 typename linalg_traits<V1>::storage_type());
-      size_type i2 = index_of_it(it2, k2,
-				 typename linalg_traits<V2>::storage_type());
-
-      if (i1 == i2) {
-	res += gmm::abs_sqr(*it2 - *it1); ++it1; ++k1; ++it2; ++k2;
-      }
-      else if (i1 < i2) {
-	res += gmm::abs_sqr(*it1); ++it1; ++k1; 
-      }
-      else  {
-	res += gmm::abs_sqr(*it2); ++it2; ++k2; 
-      }
-    }
-    while (it1 != ite1) { res += gmm::abs_sqr(*it1); ++it1; }
-    while (it2 != ite2) { res += gmm::abs_sqr(*it2); ++it2; }
-    return res;
-  }
- 
-  /** Euclidean distance between two vectors */
-  template <typename V1, typename V2> inline
-   typename number_traits<typename linalg_traits<V1>::value_type>
-   ::magnitude_type
-  vect_dist2(const V1 &v1, const V2 &v2)
-  { return sqrt(vect_dist2_sqr(v1, v2)); }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_euclidean_norm_sqr(const M &m, row_major) {
-    typename number_traits<typename linalg_traits<M>::value_type>
-      ::magnitude_type res(0);
-    for (size_type i = 0; i < mat_nrows(m); ++i)
-      res += vect_norm2_sqr(mat_const_row(m, i));
-    return res;
-  }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_euclidean_norm_sqr(const M &m, col_major) {
-    typename number_traits<typename linalg_traits<M>::value_type>
-      ::magnitude_type res(0);
-    for (size_type i = 0; i < mat_ncols(m); ++i)
-      res += vect_norm2_sqr(mat_const_col(m, i));
-    return res;
-  }
-  ///@endcond
-  /** squared Euclidean norm of a matrix. */
-  template <typename M> inline
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_euclidean_norm_sqr(const M &m) {
-    return mat_euclidean_norm_sqr(m,
-		     typename principal_orientation_type<typename
-		     linalg_traits<M>::sub_orientation>::potype());
-  }
-
-  /** Euclidean norm of a matrix. */
-  template <typename M> inline
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_euclidean_norm(const M &m)
-  { return gmm::sqrt(mat_euclidean_norm_sqr(m)); }
-
-  /* ******************************************************************** */
-  /*		vector norm1                                    	  */
-  /* ******************************************************************** */
-  /** 1-norm of a vector */
-  template <typename V>
-  typename number_traits<typename linalg_traits<V>::value_type>
-  ::magnitude_type
-  vect_norm1(const V &v) {
-    typename linalg_traits<V>::const_iterator
-      it = vect_const_begin(v), ite = vect_const_end(v);
-    typename number_traits<typename linalg_traits<V>::value_type>
-	::magnitude_type res(0);
-    for (; it != ite; ++it) res += gmm::abs(*it);
-    return res;
-  }
-
-  /* ******************************************************************** */
-  /*		vector Infinity norm                              	  */
-  /* ******************************************************************** */
-  /** Infinity norm of a vector. */
-  template <typename V>
-  typename number_traits<typename linalg_traits<V>::value_type>
-  ::magnitude_type 
-  vect_norminf(const V &v) {
-    typename linalg_traits<V>::const_iterator
-      it = vect_const_begin(v), ite = vect_const_end(v);
-      typename number_traits<typename linalg_traits<V>::value_type>
-	::magnitude_type res(0);
-    for (; it != ite; ++it) res = std::max(res, gmm::abs(*it));
-    return res;
-  }
-
-  /* ******************************************************************** */
-  /*		matrix norm1                                    	  */
-  /* ******************************************************************** */
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norm1(const M &m, col_major) {
-    typename number_traits<typename linalg_traits<M>::value_type>
-      ::magnitude_type res(0);
-    for (size_type i = 0; i < mat_ncols(m); ++i)
-      res = std::max(res, vect_norm1(mat_const_col(m,i)));
-    return res;
-  }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norm1(const M &m, row_major) {
-    typedef typename linalg_traits<M>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    typedef typename linalg_traits<M>::storage_type store_type;
-    
-    std::vector<R> aux(mat_ncols(m));
-    for (size_type i = 0; i < mat_nrows(m); ++i) {
-      typedef typename linalg_traits<M>::const_sub_row_type row_type;
-      row_type row = mat_const_row(m, i);
-      typename linalg_traits<row_type>::const_iterator
-	it = vect_const_begin(row), ite = vect_const_end(row);
-      for (size_type k = 0; it != ite; ++it, ++k)
-	aux[index_of_it(it, k, store_type())] += gmm::abs(*it);
-    }
-    return vect_norminf(aux);
-  }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norm1(const M &m, col_and_row)
-  { return mat_norm1(m, col_major()); }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norm1(const M &m, row_and_col)
-  { return mat_norm1(m, col_major()); }
-  ///@endcond
-  /** 1-norm of a matrix */
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norm1(const M &m) {
-    return mat_norm1(m, typename linalg_traits<M>::sub_orientation());
-  }
-
-
-  /* ******************************************************************** */
-  /*		matrix Infinity norm                              	  */
-  /* ******************************************************************** */
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norminf(const M &m, row_major) {
-    typename number_traits<typename linalg_traits<M>::value_type>
-      ::magnitude_type res(0);
-    for (size_type i = 0; i < mat_nrows(m); ++i)
-      res = std::max(res, vect_norm1(mat_const_row(m,i)));
-    return res;
-  }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norminf(const M &m, col_major) {
-    typedef typename linalg_traits<M>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    typedef typename linalg_traits<M>::storage_type store_type;
-    
-    std::vector<R> aux(mat_nrows(m));
-    for (size_type i = 0; i < mat_ncols(m); ++i) {
-      typedef typename linalg_traits<M>::const_sub_col_type col_type;
-      col_type col = mat_const_col(m, i);
-      typename linalg_traits<col_type>::const_iterator
-	it = vect_const_begin(col), ite = vect_const_end(col);
-      for (size_type k = 0; it != ite; ++it, ++k)
-	aux[index_of_it(it, k, store_type())] += gmm::abs(*it);
-    }
-    return vect_norminf(aux);
-  }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norminf(const M &m, col_and_row)
-  { return mat_norminf(m, row_major()); }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norminf(const M &m, row_and_col)
-  { return mat_norminf(m, row_major()); }
-  ///@endcond
-  /** infinity-norm of a matrix.*/
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_norminf(const M &m) {
-    return mat_norminf(m, typename linalg_traits<M>::sub_orientation());
-  }
-
-  /* ******************************************************************** */
-  /*		Max norm for matrices                              	  */
-  /* ******************************************************************** */
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_maxnorm(const M &m, row_major) {
-    typename number_traits<typename linalg_traits<M>::value_type>
-      ::magnitude_type res(0);
-    for (size_type i = 0; i < mat_nrows(m); ++i)
-      res = std::max(res, vect_norminf(mat_const_row(m,i)));
-    return res;
-  }
-
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_maxnorm(const M &m, col_major) {
-    typename number_traits<typename linalg_traits<M>::value_type>
-      ::magnitude_type res(0);
-    for (size_type i = 0; i < mat_ncols(m); ++i)
-      res = std::max(res, vect_norminf(mat_const_col(m,i)));
-    return res;
-  }
-  ///@endcond
-  /** max-norm of a matrix. */
-  template <typename M>
-   typename number_traits<typename linalg_traits<M>::value_type>
-   ::magnitude_type
-   mat_maxnorm(const M &m) {
-    return mat_maxnorm(m,
-		     typename principal_orientation_type<typename
-		     linalg_traits<M>::sub_orientation>::potype());
-  }
-
-  /* ******************************************************************** */
-  /*		Clean                                    		  */
-  /* ******************************************************************** */
-  /** Clean a vector or matrix (replace near-zero entries with zeroes).   */
-  
-  template <typename L> inline void clean(L &l, double threshold);
-
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L, typename T>
-  void clean(L &l, double threshold, abstract_dense, T) {
-    typedef typename number_traits<T>::magnitude_type R;
-    typename linalg_traits<L>::iterator it = vect_begin(l), ite = vect_end(l);
-    for (; it != ite; ++it)
-      if (gmm::abs(*it) < R(threshold)) *it = T(0);
-  }
-
-  template <typename L, typename T>
-  void clean(L &l, double threshold, abstract_skyline, T)
-  { gmm::clean(l, threshold, abstract_dense(), T()); }
-
-  template <typename L, typename T>
-  void clean(L &l, double threshold, abstract_sparse, T) {
-    typedef typename number_traits<T>::magnitude_type R;
-    typename linalg_traits<L>::iterator it = vect_begin(l), ite = vect_end(l);
-    std::vector<size_type> ind;
-    for (; it != ite; ++it)
-      if (gmm::abs(*it) < R(threshold)) ind.push_back(it.index());
-    for (size_type i = 0; i < ind.size(); ++i) l[ind[i]] = T(0);
-  }
-  
-  template <typename L, typename T>
-  void clean(L &l, double threshold, abstract_dense, std::complex<T>) {
-    typename linalg_traits<L>::iterator it = vect_begin(l), ite = vect_end(l);
-    for (; it != ite; ++it){
-      if (gmm::abs((*it).real()) < T(threshold))
-	*it = std::complex<T>(T(0), (*it).imag());
-      if (gmm::abs((*it).imag()) < T(threshold))
-	*it = std::complex<T>((*it).real(), T(0));
-    }
-  }
-
-  template <typename L, typename T>
-  void clean(L &l, double threshold, abstract_skyline, std::complex<T>)
-  { gmm::clean(l, threshold, abstract_dense(), std::complex<T>()); }
-
-  template <typename L, typename T>
-  void clean(L &l, double threshold, abstract_sparse, std::complex<T>) {
-    typename linalg_traits<L>::iterator it = vect_begin(l), ite = vect_end(l);
-    std::vector<size_type> ind;
-    for (; it != ite; ++it) {
-      bool r = (gmm::abs((*it).real()) < T(threshold));
-      bool i = (gmm::abs((*it).imag()) < T(threshold));
-      if (r && i) ind.push_back(it.index());
-      else if (r) (*it).real() = T(0);
-      else if (i) (*it).imag() = T(0);
-    }
-    for (size_type i = 0; i < ind.size(); ++i)
-      l[ind[i]] = std::complex<T>(T(0),T(0));
-  }
-
-  template <typename L> inline void clean(L &l, double threshold,
-					  abstract_vector) {
-    gmm::clean(l, threshold, typename linalg_traits<L>::storage_type(),
-	       typename linalg_traits<L>::value_type());
-  }
-
-  template <typename L> inline void clean(const L &l, double threshold);
-
-  template <typename L> void clean(L &l, double threshold, row_major) {
-    for (size_type i = 0; i < mat_nrows(l); ++i)
-      gmm::clean(mat_row(l, i), threshold);
-  }
-
-  template <typename L> void clean(L &l, double threshold, col_major) {
-    for (size_type i = 0; i < mat_ncols(l); ++i)
-      gmm::clean(mat_col(l, i), threshold);
-  }
-
-  template <typename L> inline void clean(L &l, double threshold,
-					  abstract_matrix) {
-    gmm::clean(l, threshold,
-	       typename principal_orientation_type<typename
-	       linalg_traits<L>::sub_orientation>::potype());
-  }
-
-  template <typename L> inline void clean(L &l, double threshold)
-  { clean(l, threshold, typename linalg_traits<L>::linalg_type()); }
- 
-  template <typename L> inline void clean(const L &l, double threshold)
-  { gmm::clean(linalg_const_cast(l), threshold); }
-
-  /* ******************************************************************** */
-  /*		Copy                                    		  */
-  /* ******************************************************************** */
-  ///@endcond
-  /** Copy vectors or matrices. 
-      @param l1 source vector or matrix.
-      @param l2 destination.
-  */
-  template <typename L1, typename L2> inline
-  void copy(const L1& l1, L2& l2) { 
-    if ((const void *)(&l1) != (const void *)(&l2)) {
-      if (same_origin(l1,l2))
-	GMM_WARNING2("Warning : a conflict is possible in copy\n");
-     
-      copy(l1, l2, typename linalg_traits<L1>::linalg_type(),
-	   typename linalg_traits<L2>::linalg_type());
-    }
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L1, typename L2> inline
-  void copy(const L1& l1, const L2& l2) { copy(l1, linalg_const_cast(l2)); }
-
-  template <typename L1, typename L2> inline
-  void copy(const L1& l1, L2& l2, abstract_vector, abstract_vector) {
-    GMM_ASSERT2(vect_size(l1) == vect_size(l2), "dimensions mismatch");
-    copy_vect(l1, l2, typename linalg_traits<L1>::storage_type(),
-	      typename linalg_traits<L2>::storage_type());
-  }
-
-  template <typename L1, typename L2> inline
-  void copy(const L1& l1, L2& l2, abstract_matrix, abstract_matrix) {
-    size_type m = mat_nrows(l1), n = mat_ncols(l1);
-    if (!m || !n) return;
-    GMM_ASSERT2(n==mat_ncols(l2) && m==mat_nrows(l2), "dimensions mismatch");
-    copy_mat(l1, l2, typename linalg_traits<L1>::sub_orientation(),
-	     typename linalg_traits<L2>::sub_orientation());
-  }
-
-  template <typename V1, typename V2, typename C1, typename C2> inline 
-  void copy_vect(const V1 &v1, const V2 &v2, C1, C2)
-  { copy_vect(v1, const_cast<V2 &>(v2), C1(), C2()); }
-  
-
-  template <typename L1, typename L2>
-  void copy_mat_by_row(const L1& l1, L2& l2) {
-    size_type nbr = mat_nrows(l1);
-    for (size_type i = 0; i < nbr; ++i)
-      copy_vect(mat_const_row(l1, i), mat_row(l2, i),
-      		typename linalg_traits<L1>::storage_type(),
-		typename linalg_traits<L2>::storage_type());
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_by_col(const L1 &l1, L2 &l2) {
-    size_type nbc = mat_ncols(l1);
-    for (size_type i = 0; i < nbc; ++i) {
-      copy_vect(mat_const_col(l1, i), mat_col(l2, i),
-      		typename linalg_traits<L1>::storage_type(),
-		typename linalg_traits<L2>::storage_type());
-    }
-  }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_major, row_major)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_major, row_and_col)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_and_col, row_and_col)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_and_col, row_major)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_and_row, row_major)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_major, col_and_row)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_and_row, row_and_col)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_and_col, col_and_row)
-  { copy_mat_by_row(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_major, col_major)
-  { copy_mat_by_col(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_major, col_and_row)
-  { copy_mat_by_col(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_major, row_and_col)
-  { copy_mat_by_col(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, row_and_col, col_major)
-  { copy_mat_by_col(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_and_row, col_major)
-  { copy_mat_by_col(l1, l2); }
-
-  template <typename L1, typename L2> inline
-  void copy_mat(const L1& l1, L2& l2, col_and_row, col_and_row)
-  { copy_mat_by_col(l1, l2); }
-  
-  template <typename L1, typename L2> inline
-  void copy_mat_mixed_rc(const L1& l1, L2& l2, size_type i) {
-    copy_mat_mixed_rc(l1, l2, i, typename linalg_traits<L1>::storage_type());
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_mixed_rc(const L1& l1, L2& l2, size_type i, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it)
-      l2(i, it.index()) = *it;
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_mixed_rc(const L1& l1, L2& l2, size_type i, abstract_skyline) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it)
-      l2(i, it.index()) = *it;
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_mixed_rc(const L1& l1, L2& l2, size_type i, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (size_type j = 0; it != ite; ++it, ++j) l2(i, j) = *it;
-  }
-
-  template <typename L1, typename L2> inline
-  void copy_mat_mixed_cr(const L1& l1, L2& l2, size_type i) {
-    copy_mat_mixed_cr(l1, l2, i, typename linalg_traits<L1>::storage_type());
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_mixed_cr(const L1& l1, L2& l2, size_type i, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2(it.index(), i) = *it;
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_mixed_cr(const L1& l1, L2& l2, size_type i, abstract_skyline) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2(it.index(), i) = *it;
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat_mixed_cr(const L1& l1, L2& l2, size_type i, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (size_type j = 0; it != ite; ++it, ++j) l2(j, i) = *it;
-  }
-
-  template <typename L1, typename L2>
-  void copy_mat(const L1& l1, L2& l2, row_major, col_major) {
-    clear(l2);
-    size_type nbr = mat_nrows(l1);
-    for (size_type i = 0; i < nbr; ++i)
-      copy_mat_mixed_rc(mat_const_row(l1, i), l2, i);
-  }
-  
-  template <typename L1, typename L2>
-  void copy_mat(const L1& l1, L2& l2, col_major, row_major) {
-    clear(l2);
-    size_type nbc = mat_ncols(l1);
-    for (size_type i = 0; i < nbc; ++i)
-      copy_mat_mixed_cr(mat_const_col(l1, i), l2, i);
-  }
-  
-  template <typename L1, typename L2> inline
-  void copy_vect(const L1 &l1, L2 &l2, abstract_dense, abstract_dense) {
-    std::copy(vect_const_begin(l1), vect_const_end(l1), vect_begin(l2));
-  }
-
-  template <typename L1, typename L2> inline // to be optimised ?
-  void copy_vect(const L1 &l1, L2 &l2, abstract_skyline, abstract_skyline) {
-    typename linalg_traits<L1>::const_iterator it1 = vect_const_begin(l1),
-      ite1 = vect_const_end(l1);
-    while (it1 != ite1 && *it1 == typename linalg_traits<L1>::value_type(0))
-      ++it1;
-
-    if (ite1 - it1 > 0) {
-      clear(l2);
-      typename linalg_traits<L2>::iterator it2 = vect_begin(l2), 
-	ite2 = vect_end(l2);
-      while (*(ite1-1) == typename linalg_traits<L1>::value_type(0)) ite1--;
-
-      if (it2 == ite2) {
-	l2[it1.index()] = *it1; ++it1;
-	l2[ite1.index()-1] = *(ite1-1); --ite1;
-	if (it1 < ite1)
-	  { it2 = vect_begin(l2); ++it2; std::copy(it1, ite1, it2); }
-      }
-      else {
-	ptrdiff_t m = it1.index() - it2.index();
-	if (m >= 0 && ite1.index() <= ite2.index())
-	  std::copy(it1, ite1, it2 + m);
-	else {
-	  if (m < 0) l2[it1.index()] = *it1;
-	  if (ite1.index() > ite2.index()) l2[ite1.index()-1] = *(ite1-1);
-	  it2 = vect_begin(l2); ite2 = vect_end(l2);
-	  m = it1.index() - it2.index();
-	  std::copy(it1, ite1, it2 + m);
-	}
-      }
-    }
-  }
-  
-  template <typename L1, typename L2>
-  void copy_vect(const L1& l1, L2& l2, abstract_sparse, abstract_dense) {
-    clear(l2);
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) { l2[it.index()] = *it; }
-  }
-
-  template <typename L1, typename L2>
-  void copy_vect(const L1& l1, L2& l2, abstract_sparse, abstract_skyline) {
-    clear(l2);
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2[it.index()] = *it;
-  }
-
-  template <typename L1, typename L2>
-  void copy_vect(const L1& l1, L2& l2, abstract_skyline, abstract_dense) {
-    typedef typename linalg_traits<L1>::value_type T;
-    typedef typename linalg_traits<L1>::const_iterator l1_const_iterator;
-    typedef typename linalg_traits<L2>::iterator l2_iterator;
-    l1_const_iterator it = vect_const_begin(l1), ite = vect_const_end(l1);
-    if (it == ite)
-      gmm::clear(l2);
-    else {
-      l2_iterator it2 = vect_begin(l2), ite2 = vect_end(l2);
-      
-      size_type i = it.index(), j;
-      for (j = 0; j < i; ++j, ++it2) *it2 = T(0);
-      for (; it != ite; ++it, ++it2) *it2 = *it;
-      for (; it2 != ite2; ++it2) *it2 = T(0);
-    }
-  }
-    
-  template <typename L1, typename L2>
-  void copy_vect(const L1& l1, L2& l2, abstract_sparse, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    clear(l2);
-    for (; it != ite; ++it)
-      if (*it != (typename linalg_traits<L1>::value_type)(0))
-	l2[it.index()] = *it;
-  }
-  
-  template <typename L1, typename L2>
-  void copy_vect(const L1& l1, L2& l2, abstract_dense, abstract_sparse) {
-    clear(l2);
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (size_type i = 0; it != ite; ++it, ++i)
-      if (*it != (typename linalg_traits<L1>::value_type)(0))
-	l2[i] = *it;
-  }
-
-  template <typename L1, typename L2> // to be optimised ...
-  void copy_vect(const L1& l1, L2& l2, abstract_dense, abstract_skyline) {
-    clear(l2);
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (size_type i = 0; it != ite; ++it, ++i)
-      if (*it != (typename linalg_traits<L1>::value_type)(0))
-	l2[i] = *it;
-  }
-
-  
-  template <typename L1, typename L2>
-  void copy_vect(const L1& l1, L2& l2, abstract_skyline, abstract_sparse) {
-    clear(l2);
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it)
-      if (*it != (typename linalg_traits<L1>::value_type)(0))
-	l2[it.index()] = *it;
-  }
-
-  /* ******************************************************************** */
-  /*		Matrix and vector addition                             	  */
-  /*   algorithms are built in order to avoid some conflicts whith        */
-  /*   repeated arguments or with overlapping part of a same object.      */
-  /*   In the latter case, conflicts are still possible.                  */
-  /* ******************************************************************** */
-  ///@endcond
-  /** Add two vectors or matrices
-      @param l1
-      @param l2 contains on output, l2+l1.
-  */
-  template <typename L1, typename L2> inline
-    void add(const L1& l1, L2& l2) {
-      add_spec(l1, l2, typename linalg_traits<L2>::linalg_type());
-  }
-  ///@cond
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, const L2& l2) { add(l1, linalg_const_cast(l2)); }
-
-  template <typename L1, typename L2> inline
-    void add_spec(const L1& l1, L2& l2, abstract_vector) {
-    GMM_ASSERT2(vect_size(l1) == vect_size(l2), "dimensions mismatch");
-    add(l1, l2, typename linalg_traits<L1>::storage_type(),
-	typename linalg_traits<L2>::storage_type());
-  }
-
-  template <typename L1, typename L2> inline
-    void add_spec(const L1& l1, L2& l2, abstract_matrix) {
-    size_type m = mat_nrows(l1), n = mat_ncols(l1);
-    GMM_ASSERT2(m==mat_nrows(l2) && n==mat_ncols(l2), "dimensions mismatch");
-    add(l1, l2, typename linalg_traits<L1>::sub_orientation(),
-	typename linalg_traits<L2>::sub_orientation());
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, row_major, row_major) {
-    typename linalg_traits<L1>::const_row_iterator it1 = mat_row_begin(l1),
-      ite = mat_row_end(l1);
-    typename linalg_traits<L2>::row_iterator it2 = mat_row_begin(l2);
-    for ( ; it1 != ite; ++it1, ++it2)
-      add(linalg_traits<L1>::row(it1), linalg_traits<L2>::row(it2));
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, col_major, col_major) {
-    typename linalg_traits<L1>::const_col_iterator
-      it1 = mat_col_const_begin(l1),
-      ite = mat_col_const_end(l1);
-    typename linalg_traits<L2>::col_iterator it2 = mat_col_begin(l2);
-    for ( ; it1 != ite; ++it1, ++it2)
-      add(linalg_traits<L1>::col(it1),  linalg_traits<L2>::col(it2));
-  }
-  
-    template <typename L1, typename L2> inline
-  void add_mat_mixed_rc(const L1& l1, L2& l2, size_type i) {
-    add_mat_mixed_rc(l1, l2, i, typename linalg_traits<L1>::storage_type());
-  }
-
-  template <typename L1, typename L2>
-  void add_mat_mixed_rc(const L1& l1, L2& l2, size_type i, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2(i, it.index()) += *it;
-  }
-
-  template <typename L1, typename L2>
-  void add_mat_mixed_rc(const L1& l1, L2& l2, size_type i, abstract_skyline) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2(i, it.index()) += *it;
-  }
-
-  template <typename L1, typename L2>
-  void add_mat_mixed_rc(const L1& l1, L2& l2, size_type i, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (size_type j = 0; it != ite; ++it, ++j) l2(i, j) += *it;
-  }
-
-  template <typename L1, typename L2> inline
-  void add_mat_mixed_cr(const L1& l1, L2& l2, size_type i) {
-    add_mat_mixed_cr(l1, l2, i, typename linalg_traits<L1>::storage_type());
-  }
-
-  template <typename L1, typename L2>
-  void add_mat_mixed_cr(const L1& l1, L2& l2, size_type i, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2(it.index(), i) += *it;
-  }
-
-  template <typename L1, typename L2>
-  void add_mat_mixed_cr(const L1& l1, L2& l2, size_type i, abstract_skyline) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (; it != ite; ++it) l2(it.index(), i) += *it;
-  }
-
-  template <typename L1, typename L2>
-  void add_mat_mixed_cr(const L1& l1, L2& l2, size_type i, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator
-      it  = vect_const_begin(l1), ite = vect_const_end(l1);
-    for (size_type j = 0; it != ite; ++it, ++j) l2(j, i) += *it;
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, row_major, col_major) {
-    size_type nbr = mat_nrows(l1);
-    for (size_type i = 0; i < nbr; ++i)
-      add_mat_mixed_rc(mat_const_row(l1, i), l2, i);
-  }
-  
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, col_major, row_major) {
-    size_type nbc = mat_ncols(l1);
-    for (size_type i = 0; i < nbc; ++i)
-      add_mat_mixed_cr(mat_const_col(l1, i), l2, i);
-  }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, row_and_col, row_major)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, row_and_col, row_and_col)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, row_and_col, col_and_row)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, col_and_row, row_and_col)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, row_major, row_and_col)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, col_and_row, row_major)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, row_major, col_and_row)
-  { add(l1, l2, row_major(), row_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, row_and_col, col_major)
-  { add(l1, l2, col_major(), col_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, col_major, row_and_col)
-  { add(l1, l2, col_major(), col_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, col_and_row, col_major)
-  { add(l1, l2, col_major(), col_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, col_and_row, col_and_row)
-  { add(l1, l2, col_major(), col_major()); }
-
-  template <typename L1, typename L2> inline
-  void add(const L1& l1, L2& l2, col_major, col_and_row)
-  { add(l1, l2, col_major(), col_major()); }
-
-  ///@endcond
-  /** Addition of two vectors/matrices
-      @param l1
-      @param l2
-      @param l3 contains l1+l2 on output
-  */
-  template <typename L1, typename L2, typename L3> inline
-  void add(const L1& l1, const L2& l2, L3& l3) {
-    add_spec(l1, l2, l3, typename linalg_traits<L2>::linalg_type());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L1, typename L2, typename L3> inline
-  void add(const L1& l1, const L2& l2, const L3& l3)
-  { add(l1, l2, linalg_const_cast(l3)); }
-
-  template <typename L1, typename L2, typename L3> inline
-    void add_spec(const L1& l1, const L2& l2, L3& l3, abstract_matrix)
-  { copy(l2, l3); add(l1, l3); }
-
-  template <typename L1, typename L2, typename L3> inline
-    void add_spec(const L1& l1, const L2& l2, L3& l3, abstract_vector) {
-    GMM_ASSERT2(vect_size(l1) == vect_size(l2) &&
-		vect_size(l1) == vect_size(l3), "dimensions mismatch");
-    if ((const void *)(&l1) == (const void *)(&l3))
-      add(l2, l3);
-    else if ((const void *)(&l2) == (const void *)(&l3))
-      add(l1, l3);
-    else
-      add(l1, l2, l3, typename linalg_traits<L1>::storage_type(),
-	  typename linalg_traits<L2>::storage_type(),
-	  typename linalg_traits<L3>::storage_type());
-  }
-
-  template <typename IT1, typename IT2, typename IT3>
-    void add_full_(IT1 it1, IT2 it2, IT3 it3, IT3 ite) {
-    for (; it3 != ite; ++it3, ++it2, ++it1) *it3 = *it1 + *it2;
-  }
-
-  template <typename IT1, typename IT2, typename IT3>
-    void add_almost_full_(IT1 it1, IT1 ite1, IT2 it2, IT3 it3, IT3 ite3) {
-    IT3 it = it3;
-    for (; it != ite3; ++it, ++it2) *it = *it2;
-    for (; it1 != ite1; ++it1)
-      *(it3 + it1.index()) += *it1;
-  }
-
-  template <typename IT1, typename IT2, typename IT3>
-  void add_to_full_(IT1 it1, IT1 ite1, IT2 it2, IT2 ite2,
-		    IT3 it3, IT3 ite3) {
-    typedef typename std::iterator_traits<IT3>::value_type T;
-    IT3 it = it3;
-    for (; it != ite3; ++it) *it = T(0);
-    for (; it1 != ite1; ++it1) *(it3 + it1.index()) = *it1;
-    for (; it2 != ite2; ++it2) *(it3 + it2.index()) += *it2;    
-  }
-  
-  template <typename L1, typename L2, typename L3> inline
-  void add(const L1& l1, const L2& l2, L3& l3,
-	   abstract_dense, abstract_dense, abstract_dense) {
-    add_full_(vect_const_begin(l1), vect_const_begin(l2),
-	      vect_begin(l3), vect_end(l3));
-  }
-  
-  // generic function for add(v1, v2, v3).
-  // Need to be specialized to optimize particular additions.
-  template <typename L1, typename L2, typename L3,
-	    typename ST1, typename ST2, typename ST3>
-  inline void add(const L1& l1, const L2& l2, L3& l3, ST1, ST2, ST3)
-  { copy(l2, l3); add(l1, l3, ST1(), ST3()); }
-
-  template <typename L1, typename L2, typename L3> inline
-  void add(const L1& l1, const L2& l2, L3& l3,
-	   abstract_sparse, abstract_dense, abstract_dense) {
-    add_almost_full_(vect_const_begin(l1), vect_const_end(l1),
-		     vect_const_begin(l2), vect_begin(l3), vect_end(l3));
-  }
-  
-  template <typename L1, typename L2, typename L3> inline
-  void add(const L1& l1, const L2& l2, L3& l3,
-	   abstract_dense, abstract_sparse, abstract_dense)
-  { add(l2, l1, l3, abstract_sparse(), abstract_dense(), abstract_dense()); }
-  
-  template <typename L1, typename L2, typename L3> inline
-  void add(const L1& l1, const L2& l2, L3& l3,
-	   abstract_sparse, abstract_sparse, abstract_dense) {
-    add_to_full_(vect_const_begin(l1), vect_const_end(l1),
-		 vect_const_begin(l2), vect_const_end(l2),
-		 vect_begin(l3), vect_end(l3));
-  }
-
-
-  template <typename L1, typename L2, typename L3>
-  void add_spspsp(const L1& l1, const L2& l2, L3& l3, linalg_true) {
-    typename linalg_traits<L1>::const_iterator
-      it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    typename linalg_traits<L2>::const_iterator
-      it2 = vect_const_begin(l2), ite2 = vect_const_end(l2);
-    clear(l3);
-    while (it1 != ite1 && it2 != ite2) {
-      ptrdiff_t d = it1.index() - it2.index();
-      if (d < 0)
-	{ l3[it1.index()] += *it1; ++it1; }
-      else if (d > 0)
-	{ l3[it2.index()] += *it2; ++it2; }
-      else
-	{ l3[it1.index()] = *it1 + *it2; ++it1; ++it2; }
-    }
-    for (; it1 != ite1; ++it1) l3[it1.index()] += *it1;
-    for (; it2 != ite2; ++it2) l3[it2.index()] += *it2;   
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void add_spspsp(const L1& l1, const L2& l2, L3& l3, linalg_false)
-  { copy(l2, l3); add(l2, l3); }
-  
-  template <typename L1, typename L2, typename L3>
-  void add(const L1& l1, const L2& l2, L3& l3,
-	   abstract_sparse, abstract_sparse, abstract_sparse) {
-    add_spspsp(l1, l2, l3, typename linalg_and<typename
-	       linalg_traits<L1>::index_sorted,
-	       typename linalg_traits<L2>::index_sorted>::bool_type());
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_dense, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator it1 = vect_const_begin(l1); 
-    typename linalg_traits<L2>::iterator
-             it2 = vect_begin(l2), ite = vect_end(l2);
-    for (; it2 != ite; ++it2, ++it1) *it2 += *it1;
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_dense, abstract_skyline) {
-    typedef typename linalg_traits<L1>::const_iterator const_l1_iterator;
-    typedef typename linalg_traits<L2>::iterator l2_iterator;
-    typedef typename linalg_traits<L1>::value_type T;
-
-    const_l1_iterator it1 = vect_const_begin(l1), ite1 = vect_const_end(l1); 
-    size_type i1 = 0, ie1 = vect_size(l1);
-    while (it1 != ite1 && *it1 == T(0)) { ++it1; ++i1; }
-    if (it1 != ite1) {
-      l2_iterator it2 = vect_begin(l2), ite2 = vect_end(l2);
-      while (ie1 && *(ite1-1) == T(0)) { ite1--; --ie1; }
-
-      if (it2 == ite2 || i1 < it2.index()) {
-	l2[i1] = *it1; ++i1; ++it1;
-	if (it1 == ite1) return;
-	it2 = vect_begin(l2); ite2 = vect_end(l2);
-      }
-      if (ie1 > ite2.index()) {
-	--ite1; l2[ie1 - 1] = *ite1;
-	it2 = vect_begin(l2);
-      }
-      it2 += i1 - it2.index();
-      for (; it1 != ite1; ++it1, ++it2) { *it2 += *it1; }
-    }
-  }
-
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_skyline, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator it1 = vect_const_begin(l1),
-      ite1 = vect_const_end(l1);
-    if (it1 != ite1) {
-      typename linalg_traits<L2>::iterator it2 = vect_begin(l2);
-      it2 += it1.index();
-      for (; it1 != ite1; ++it2, ++it1) *it2 += *it1;
-    }
-  }
-
-  
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_sparse, abstract_dense) {
-    typename linalg_traits<L1>::const_iterator
-      it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    for (; it1 != ite1; ++it1) l2[it1.index()] += *it1;
-  }
-  
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_sparse, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    for (; it1 != ite1; ++it1) l2[it1.index()] += *it1;
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_sparse, abstract_skyline) {
-    typename linalg_traits<L1>::const_iterator
-      it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    for (; it1 != ite1; ++it1) l2[it1.index()] += *it1;
-  }
-
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_skyline, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    for (; it1 != ite1; ++it1)
-      if (*it1 != typename linalg_traits<L1>::value_type(0))
-	l2[it1.index()] += *it1;
-  }
-
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_skyline, abstract_skyline) {
-    typedef typename linalg_traits<L1>::const_iterator const_l1_iterator;
-    typedef typename linalg_traits<L2>::iterator l2_iterator;
-    typedef typename linalg_traits<L1>::value_type T1;
-    typedef typename linalg_traits<L2>::value_type T2;
-
-    const_l1_iterator it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    
-    while (it1 != ite1 && *it1 == T1(0)) ++it1;
-    if (ite1 != it1) {
-      l2_iterator it2 = vect_begin(l2), ite2 = vect_end(l2);
-      while (*(ite1-1) == T1(0)) ite1--;
-      if (it2 == ite2 || it1.index() < it2.index()) {
-	l2[it1.index()] = T2(0);
-	it2 = vect_begin(l2); ite2 = vect_end(l2);
-      }
-      if (ite1.index() > ite2.index()) {
-	l2[ite1.index() - 1] = T2(0);
-	it2 = vect_begin(l2); 
-      }
-      it2 += it1.index() - it2.index();
-      for (; it1 != ite1; ++it1, ++it2) *it2 += *it1;
-    }
-  }
-  
-  template <typename L1, typename L2>
-  void add(const L1& l1, L2& l2, abstract_dense, abstract_sparse) {
-    typename linalg_traits<L1>::const_iterator
-      it1 = vect_const_begin(l1), ite1 = vect_const_end(l1);
-    for (size_type i = 0; it1 != ite1; ++it1, ++i)
-      if (*it1 != typename linalg_traits<L1>::value_type(0)) l2[i] += *it1;
-  } 
-
-  /* ******************************************************************** */
-  /*		Matrix-vector mult                                    	  */
-  /* ******************************************************************** */
-  ///@endcond
-  /** matrix-vector or matrix-matrix product.
-      @param l1 a matrix.
-      @param l2 a vector or matrix.
-      @param l3 the product l1*l2.
-  */
-  template <typename L1, typename L2, typename L3> inline
-  void mult(const L1& l1, const L2& l2, L3& l3) {
-    mult_dispatch(l1, l2, l3, typename linalg_traits<L2>::linalg_type());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult(const L1& l1, const L2& l2, const L3& l3)
-  { mult(l1, l2, linalg_const_cast(l3)); }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_dispatch(const L1& l1, const L2& l2, L3& l3, abstract_vector) {
-    size_type m = mat_nrows(l1), n = mat_ncols(l1);
-    if (!m || !n) { gmm::clear(l3); return; }
-    GMM_ASSERT2(n==vect_size(l2) && m==vect_size(l3), "dimensions mismatch");
-    if (!same_origin(l2, l3))
-      mult_spec(l1, l2, l3, typename principal_orientation_type<typename
-		linalg_traits<L1>::sub_orientation>::potype());
-    else {
-      GMM_WARNING2("Warning, A temporary is used for mult\n");
-      typename temporary_vector<L3>::vector_type temp(vect_size(l3));
-      mult_spec(l1, l2, temp, typename principal_orientation_type<typename
-		linalg_traits<L1>::sub_orientation>::potype());
-      copy(temp, l3);
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_by_row(const L1& l1, const L2& l2, L3& l3, abstract_sparse) {
-    typedef typename  linalg_traits<L3>::value_type T;
-    clear(l3);
-    size_type nr = mat_nrows(l1);
-    for (size_type i = 0; i < nr; ++i) {
-      T aux = vect_sp(mat_const_row(l1, i), l2);
-      if (aux != T(0)) l3[i] = aux;
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_by_row(const L1& l1, const L2& l2, L3& l3, abstract_skyline) {
-    typedef typename  linalg_traits<L3>::value_type T;
-    clear(l3); 
-    size_type nr = mat_nrows(l1);
-    for (size_type i = 0; i < nr; ++i) {
-      T aux = vect_sp(mat_const_row(l1, i), l2);
-      if (aux != T(0)) l3[i] = aux;
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_by_row(const L1& l1, const L2& l2, L3& l3, abstract_dense) {
-    typename linalg_traits<L3>::iterator it=vect_begin(l3), ite=vect_end(l3);
-    typename linalg_traits<L1>::const_row_iterator
-      itr = mat_row_const_begin(l1); 
-    for (; it != ite; ++it, ++itr)
-      *it = vect_sp(linalg_traits<L1>::row(itr), l2,
-		    typename linalg_traits<L1>::storage_type(),
-		    typename linalg_traits<L2>::storage_type());
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_by_col(const L1& l1, const L2& l2, L3& l3, abstract_dense) {
-    clear(l3);
-    size_type nc = mat_ncols(l1);
-    for (size_type i = 0; i < nc; ++i)
-      add(scaled(mat_const_col(l1, i), l2[i]), l3);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_by_col(const L1& l1, const L2& l2, L3& l3, abstract_sparse) {
-    typedef typename linalg_traits<L2>::value_type T;
-    clear(l3);
-    typename linalg_traits<L2>::const_iterator it = vect_const_begin(l2),
-      ite = vect_const_end(l2);
-    for (; it != ite; ++it)
-      if (*it != T(0)) add(scaled(mat_const_col(l1, it.index()), *it), l3);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_by_col(const L1& l1, const L2& l2, L3& l3, abstract_skyline) {
-    typedef typename linalg_traits<L2>::value_type T;
-    clear(l3); 
-    typename linalg_traits<L2>::const_iterator it = vect_const_begin(l2),
-      ite = vect_const_end(l2);
-    for (; it != ite; ++it)
-      if (*it != T(0)) add(scaled(mat_const_col(l1, it.index()), *it), l3);
-  }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, row_major)
-  { mult_by_row(l1, l2, l3, typename linalg_traits<L3>::storage_type()); }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, col_major)
-  { mult_by_col(l1, l2, l3, typename linalg_traits<L2>::storage_type()); }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, abstract_null_type)
-  { mult_ind(l1, l2, l3, typename linalg_traits<L1>::storage_type()); }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_ind(const L1& l1, const L2& l2, L3& l3, abstract_indirect) {
-    GMM_ASSERT1(false, "gmm::mult(m, ., .) undefined for this kind of matrix");
-  }
-
-  template <typename L1, typename L2, typename L3, typename L4> inline
-  void mult(const L1& l1, const L2& l2, const L3& l3, L4& l4) {
-    size_type m = mat_nrows(l1), n = mat_ncols(l1);
-    copy(l3, l4);
-    if (!m || !n) { gmm::copy(l3, l4); return; }
-    GMM_ASSERT2(n==vect_size(l2) && m==vect_size(l4), "dimensions mismatch");
-    if (!same_origin(l2, l4)) {
-      mult_add_spec(l1, l2, l4, typename principal_orientation_type<typename
-		    linalg_traits<L1>::sub_orientation>::potype());
-    }
-    else {
-      GMM_WARNING2("Warning, A temporary is used for mult\n");
-      typename temporary_vector<L2>::vector_type temp(vect_size(l2));
-      copy(l2, temp);
-      mult_add_spec(l1,temp, l4, typename principal_orientation_type<typename
-		linalg_traits<L1>::sub_orientation>::potype());
-    }
-  }
-
-  template <typename L1, typename L2, typename L3, typename L4> inline
-  void mult(const L1& l1, const L2& l2, const L3& l3, const L4& l4)
-  { mult(l1, l2, l3, linalg_const_cast(l4)); } 
-
-  ///@endcond
-  /** Multiply-accumulate. l3 += l1*l2; */
-  template <typename L1, typename L2, typename L3> inline
-  void mult_add(const L1& l1, const L2& l2, L3& l3) {
-    size_type m = mat_nrows(l1), n = mat_ncols(l1);
-    if (!m || !n) return;
-    GMM_ASSERT2(n==vect_size(l2) && m==vect_size(l3), "dimensions mismatch");
-    if (!same_origin(l2, l3)) {
-      mult_add_spec(l1, l2, l3, typename principal_orientation_type<typename
-		    linalg_traits<L1>::sub_orientation>::potype());
-    }
-    else {
-      GMM_WARNING2("Warning, A temporary is used for mult\n");
-      typename temporary_vector<L3>::vector_type temp(vect_size(l2));
-      copy(l2, temp);
-      mult_add_spec(l1,temp, l3, typename principal_orientation_type<typename
-		linalg_traits<L1>::sub_orientation>::potype());
-    }
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_add(const L1& l1, const L2& l2, const L3& l3)
-  { mult_add(l1, l2, linalg_const_cast(l3)); } 
-
-  template <typename L1, typename L2, typename L3>
-  void mult_add_by_row(const L1& l1, const L2& l2, L3& l3, abstract_sparse) {
-    typedef typename linalg_traits<L3>::value_type T;
-    size_type nr = mat_nrows(l1);
-    for (size_type i = 0; i < nr; ++i) {
-      T aux = vect_sp(mat_const_row(l1, i), l2);
-      if (aux != T(0)) l3[i] += aux;
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_add_by_row(const L1& l1, const L2& l2, L3& l3, abstract_skyline) {
-    typedef typename linalg_traits<L3>::value_type T;
-    size_type nr = mat_nrows(l1);
-    for (size_type i = 0; i < nr; ++i) {
-      T aux = vect_sp(mat_const_row(l1, i), l2);
-      if (aux != T(0)) l3[i] += aux;
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_add_by_row(const L1& l1, const L2& l2, L3& l3, abstract_dense) {
-    typename linalg_traits<L3>::iterator it=vect_begin(l3), ite=vect_end(l3);
-    typename linalg_traits<L1>::const_row_iterator
-      itr = mat_row_const_begin(l1);
-    for (; it != ite; ++it, ++itr)
-      *it += vect_sp(linalg_traits<L1>::row(itr), l2);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_add_by_col(const L1& l1, const L2& l2, L3& l3, abstract_dense) {
-    size_type nc = mat_ncols(l1);
-    for (size_type i = 0; i < nc; ++i)
-      add(scaled(mat_const_col(l1, i), l2[i]), l3);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_add_by_col(const L1& l1, const L2& l2, L3& l3, abstract_sparse) {
-    typename linalg_traits<L2>::const_iterator it = vect_const_begin(l2),
-      ite = vect_const_end(l2);
-    for (; it != ite; ++it)
-      if (*it != typename linalg_traits<L2>::value_type(0))
-	add(scaled(mat_const_col(l1, it.index()), *it), l3);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_add_by_col(const L1& l1, const L2& l2, L3& l3, abstract_skyline) {
-    typename linalg_traits<L2>::const_iterator it = vect_const_begin(l2),
-      ite = vect_const_end(l2);
-    for (; it != ite; ++it)
-      if (*it != typename linalg_traits<L2>::value_type(0))
-	add(scaled(mat_const_col(l1, it.index()), *it), l3);
-  }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_add_spec(const L1& l1, const L2& l2, L3& l3, row_major)
-  { mult_add_by_row(l1, l2, l3, typename linalg_traits<L3>::storage_type()); }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_add_spec(const L1& l1, const L2& l2, L3& l3, col_major)
-  { mult_add_by_col(l1, l2, l3, typename linalg_traits<L2>::storage_type()); }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_add_spec(const L1& l1, const L2& l2, L3& l3, abstract_null_type)
-  { mult_ind(l1, l2, l3, typename linalg_traits<L1>::storage_type()); }
-
-  template <typename L1, typename L2, typename L3>
-  void transposed_mult(const L1& l1, const L2& l2, const L3& l3)
-  { mult(gmm::transposed(l1), l2, l3); }
-
-
-  /* ******************************************************************** */
-  /*		Matrix-matrix mult                                    	  */
-  /* ******************************************************************** */
-  
-
-  struct g_mult {};  // generic mult, less optimized
-  struct c_mult {};  // col x col -> col mult
-  struct r_mult {};  // row x row -> row mult
-  struct rcmult {};  // row x col -> col mult
-  struct crmult {};  // col x row -> row mult
-
-
-  template<typename SO1, typename SO2, typename SO3> struct mult_t;
-  #define DEFMU__ template<> struct mult_t
-  DEFMU__<row_major  , row_major  , row_major  > { typedef r_mult t; };
-  DEFMU__<row_major  , row_major  , col_major  > { typedef g_mult t; };
-  DEFMU__<row_major  , row_major  , col_and_row> { typedef r_mult t; };
-  DEFMU__<row_major  , row_major  , row_and_col> { typedef r_mult t; };
-  DEFMU__<row_major  , col_major  , row_major  > { typedef rcmult t; };
-  DEFMU__<row_major  , col_major  , col_major  > { typedef rcmult t; };
-  DEFMU__<row_major  , col_major  , col_and_row> { typedef rcmult t; };
-  DEFMU__<row_major  , col_major  , row_and_col> { typedef rcmult t; };
-  DEFMU__<row_major  , col_and_row, row_major  > { typedef r_mult t; };
-  DEFMU__<row_major  , col_and_row, col_major  > { typedef rcmult t; };
-  DEFMU__<row_major  , col_and_row, col_and_row> { typedef rcmult t; };
-  DEFMU__<row_major  , col_and_row, row_and_col> { typedef rcmult t; };
-  DEFMU__<row_major  , row_and_col, row_major  > { typedef r_mult t; };
-  DEFMU__<row_major  , row_and_col, col_major  > { typedef rcmult t; };
-  DEFMU__<row_major  , row_and_col, col_and_row> { typedef r_mult t; };
-  DEFMU__<row_major  , row_and_col, row_and_col> { typedef r_mult t; };
-  DEFMU__<col_major  , row_major  , row_major  > { typedef crmult t; };
-  DEFMU__<col_major  , row_major  , col_major  > { typedef g_mult t; };
-  DEFMU__<col_major  , row_major  , col_and_row> { typedef crmult t; };
-  DEFMU__<col_major  , row_major  , row_and_col> { typedef crmult t; };
-  DEFMU__<col_major  , col_major  , row_major  > { typedef g_mult t; };
-  DEFMU__<col_major  , col_major  , col_major  > { typedef c_mult t; };
-  DEFMU__<col_major  , col_major  , col_and_row> { typedef c_mult t; };
-  DEFMU__<col_major  , col_major  , row_and_col> { typedef c_mult t; };
-  DEFMU__<col_major  , col_and_row, row_major  > { typedef crmult t; };
-  DEFMU__<col_major  , col_and_row, col_major  > { typedef c_mult t; };
-  DEFMU__<col_major  , col_and_row, col_and_row> { typedef c_mult t; };
-  DEFMU__<col_major  , col_and_row, row_and_col> { typedef c_mult t; };
-  DEFMU__<col_major  , row_and_col, row_major  > { typedef crmult t; };
-  DEFMU__<col_major  , row_and_col, col_major  > { typedef c_mult t; };
-  DEFMU__<col_major  , row_and_col, col_and_row> { typedef c_mult t; };
-  DEFMU__<col_major  , row_and_col, row_and_col> { typedef c_mult t; };
-  DEFMU__<col_and_row, row_major  , row_major  > { typedef r_mult t; };
-  DEFMU__<col_and_row, row_major  , col_major  > { typedef c_mult t; };
-  DEFMU__<col_and_row, row_major  , col_and_row> { typedef r_mult t; };
-  DEFMU__<col_and_row, row_major  , row_and_col> { typedef r_mult t; };
-  DEFMU__<col_and_row, col_major  , row_major  > { typedef rcmult t; };
-  DEFMU__<col_and_row, col_major  , col_major  > { typedef c_mult t; };
-  DEFMU__<col_and_row, col_major  , col_and_row> { typedef c_mult t; };
-  DEFMU__<col_and_row, col_major  , row_and_col> { typedef c_mult t; };
-  DEFMU__<col_and_row, col_and_row, row_major  > { typedef r_mult t; };
-  DEFMU__<col_and_row, col_and_row, col_major  > { typedef c_mult t; };
-  DEFMU__<col_and_row, col_and_row, col_and_row> { typedef c_mult t; };
-  DEFMU__<col_and_row, col_and_row, row_and_col> { typedef c_mult t; };
-  DEFMU__<col_and_row, row_and_col, row_major  > { typedef r_mult t; };
-  DEFMU__<col_and_row, row_and_col, col_major  > { typedef c_mult t; };
-  DEFMU__<col_and_row, row_and_col, col_and_row> { typedef c_mult t; };
-  DEFMU__<col_and_row, row_and_col, row_and_col> { typedef r_mult t; };
-  DEFMU__<row_and_col, row_major  , row_major  > { typedef r_mult t; };
-  DEFMU__<row_and_col, row_major  , col_major  > { typedef c_mult t; };
-  DEFMU__<row_and_col, row_major  , col_and_row> { typedef r_mult t; };
-  DEFMU__<row_and_col, row_major  , row_and_col> { typedef r_mult t; };
-  DEFMU__<row_and_col, col_major  , row_major  > { typedef rcmult t; };
-  DEFMU__<row_and_col, col_major  , col_major  > { typedef c_mult t; };
-  DEFMU__<row_and_col, col_major  , col_and_row> { typedef c_mult t; };
-  DEFMU__<row_and_col, col_major  , row_and_col> { typedef c_mult t; };
-  DEFMU__<row_and_col, col_and_row, row_major  > { typedef rcmult t; };
-  DEFMU__<row_and_col, col_and_row, col_major  > { typedef rcmult t; };
-  DEFMU__<row_and_col, col_and_row, col_and_row> { typedef rcmult t; };
-  DEFMU__<row_and_col, col_and_row, row_and_col> { typedef rcmult t; };
-  DEFMU__<row_and_col, row_and_col, row_major  > { typedef r_mult t; };
-  DEFMU__<row_and_col, row_and_col, col_major  > { typedef c_mult t; };
-  DEFMU__<row_and_col, row_and_col, col_and_row> { typedef r_mult t; };
-  DEFMU__<row_and_col, row_and_col, row_and_col> { typedef r_mult t; };
-
-  template <typename L1, typename L2, typename L3>
-  void mult_dispatch(const L1& l1, const L2& l2, L3& l3, abstract_matrix) {
-    typedef typename temporary_matrix<L3>::matrix_type temp_mat_type;
-    size_type m = mat_nrows(l1), n = mat_ncols(l1), k = mat_ncols(l2);
-    if (n == 0) { gmm::clear(l3); return; }
-    GMM_ASSERT2(n == mat_nrows(l2) && m == mat_nrows(l3) && k == mat_ncols(l3),
-		"dimensions mismatch");
-
-    if (same_origin(l2, l3) || same_origin(l1, l3)) {
-      GMM_WARNING2("A temporary is used for mult");
-      temp_mat_type temp(mat_nrows(l3), mat_ncols(l3));
-      mult_spec(l1, l2, temp, typename mult_t<
-		typename linalg_traits<L1>::sub_orientation,
-		typename linalg_traits<L2>::sub_orientation,
-		typename linalg_traits<temp_mat_type>::sub_orientation>::t());
-      copy(temp, l3);
-    }
-    else
-      mult_spec(l1, l2, l3, typename mult_t<
-		typename linalg_traits<L1>::sub_orientation,
-		typename linalg_traits<L2>::sub_orientation,
-		typename linalg_traits<L3>::sub_orientation>::t());
-  }
-
-  // Completely generic but inefficient
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, g_mult) {
-    typedef typename linalg_traits<L3>::value_type T;
-    GMM_WARNING2("Inefficient generic matrix-matrix mult is used");
-    for (size_type i = 0; i < mat_nrows(l3) ; ++i)
-      for (size_type j = 0; j < mat_ncols(l3) ; ++j) {
-	T a(0);
-	for (size_type k = 0; k < mat_nrows(l2) ; ++k) a += l1(i, k)*l2(k, j);
-	l3(i, j) = a;
-      }
-  }
-
-  // row x col matrix-matrix mult
-
-  template <typename L1, typename L2, typename L3>
-  void mult_row_col_with_temp(const L1& l1, const L2& l2, L3& l3, col_major) {
-    typedef typename temporary_col_matrix<L1>::matrix_type temp_col_mat;
-    temp_col_mat temp(mat_nrows(l1), mat_ncols(l1));
-    copy(l1, temp);
-    mult(temp, l2, l3);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_row_col_with_temp(const L1& l1, const L2& l2, L3& l3, row_major) {
-    typedef typename temporary_row_matrix<L2>::matrix_type temp_row_mat;
-    temp_row_mat temp(mat_nrows(l2), mat_ncols(l2));
-    copy(l2, temp);
-    mult(l1, temp, l3);
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, rcmult) {
-    if (is_sparse(l1) && is_sparse(l2)) {
-      GMM_WARNING3("Inefficient row matrix - col matrix mult for "
-		  "sparse matrices, using temporary");
-      mult_row_col_with_temp(l1, l2, l3, 
-			     typename principal_orientation_type<typename
-			     linalg_traits<L3>::sub_orientation>::potype());
-    }
-    else {
-      typename linalg_traits<L2>::const_col_iterator
-	it2b = linalg_traits<L2>::col_begin(l2), it2,
-	ite = linalg_traits<L2>::col_end(l2);
-      size_type i,j, k = mat_nrows(l1);
-      
-      for (i = 0; i < k; ++i) {
-	typename linalg_traits<L1>::const_sub_row_type r1=mat_const_row(l1, i);
-	for (it2 = it2b, j = 0; it2 != ite; ++it2, ++j)
-	  l3(i,j) = vect_sp(r1, linalg_traits<L2>::col(it2));
-      }
-    }
-  }
-
-  // row - row matrix-matrix mult
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, r_mult) {
-    mult_spec(l1, l2, l3,r_mult(),typename linalg_traits<L1>::storage_type());
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, r_mult, abstract_dense) {
-    // optimizable
-    clear(l3);
-    size_type nn = mat_nrows(l3), mm = mat_nrows(l2);
-    for (size_type i = 0; i < nn; ++i) {
-      for (size_type j = 0; j < mm; ++j) {
-	add(scaled(mat_const_row(l2, j), l1(i, j)), mat_row(l3, i));
-      }
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, r_mult, abstract_sparse) {
-    // optimizable
-    clear(l3);
-    size_type nn = mat_nrows(l3);
-    for (size_type i = 0; i < nn; ++i) {
-      typename linalg_traits<L1>::const_sub_row_type rl1=mat_const_row(l1, i);
-      typename linalg_traits<typename linalg_traits<L1>::const_sub_row_type>::
-	const_iterator it = vect_const_begin(rl1), ite = vect_const_end(rl1);
-      for (; it != ite; ++it)
-	add(scaled(mat_const_row(l2, it.index()), *it), mat_row(l3, i));
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, r_mult, abstract_skyline)
-  { mult_spec(l1, l2, l3, r_mult(), abstract_sparse()); }
-
-  // col - col matrix-matrix mult
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, c_mult) {
-    mult_spec(l1, l2,l3,c_mult(),typename linalg_traits<L2>::storage_type(),
-	      typename linalg_traits<L2>::sub_orientation());
-  }
-
-
-  template <typename L1, typename L2, typename L3, typename ORIEN>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, c_mult,
-		 abstract_dense, ORIEN) {
-    typedef typename linalg_traits<L2>::value_type T;
-    size_type nn = mat_ncols(l3), mm = mat_ncols(l1);
-
-    for (size_type i = 0; i < nn; ++i) {
-      clear(mat_col(l3, i));
-      for (size_type j = 0; j < mm; ++j) {
-	T b = l2(j, i);
-	if (b != T(0)) add(scaled(mat_const_col(l1, j), b), mat_col(l3, i));
-      }
-    }
-  }
-
-  template <typename L1, typename L2, typename L3, typename ORIEN>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, c_mult,
-		 abstract_sparse, ORIEN) {
-    // optimizable
-    clear(l3);
-    size_type nn = mat_ncols(l3);
-    for (size_type i = 0; i < nn; ++i) {
-      typename linalg_traits<L2>::const_sub_col_type rc2=mat_const_col(l2, i);
-      typename linalg_traits<typename linalg_traits<L2>::const_sub_col_type>::
-	const_iterator it = vect_const_begin(rc2), ite = vect_const_end(rc2);
-      for (; it != ite; ++it)
-	add(scaled(mat_const_col(l1, it.index()), *it), mat_col(l3, i));
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, c_mult,
-		 abstract_sparse, row_major) {
-     typedef typename linalg_traits<L2>::value_type T;
-     GMM_WARNING3("Inefficient matrix-matrix mult for sparse matrices");
-     clear(l3);
-     size_type mm = mat_nrows(l2), nn = mat_ncols(l3);
-     for (size_type i = 0; i < nn; ++i)
-       for (size_type j = 0; j < mm; ++j) {
-	 T a = l2(i,j);
-	 if (a != T(0)) add(scaled(mat_const_col(l1, j), a), mat_col(l3, i));
-       }
-   }
-
-  template <typename L1, typename L2, typename L3, typename ORIEN> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, c_mult,
-		 abstract_skyline, ORIEN)
-  { mult_spec(l1, l2, l3, c_mult(), abstract_sparse(), ORIEN()); }
-
-  
-  // col - row matrix-matrix mult
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, crmult)
-  { mult_spec(l1,l2,l3,crmult(), typename linalg_traits<L1>::storage_type()); }
-
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, crmult, abstract_dense) {
-    // optimizable
-    clear(l3);
-    size_type nn = mat_ncols(l1), mm = mat_nrows(l1);
-    for (size_type i = 0; i < nn; ++i) {
-      for (size_type j = 0; j < mm; ++j)
-      add(scaled(mat_const_row(l2, i), l1(j, i)), mat_row(l3, j));
-    }
-  }
-
-  template <typename L1, typename L2, typename L3>
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, crmult, abstract_sparse) {
-    // optimizable
-    clear(l3);
-    size_type nn = mat_ncols(l1);
-    for (size_type i = 0; i < nn; ++i) {
-      typename linalg_traits<L1>::const_sub_col_type rc1=mat_const_col(l1, i);
-      typename linalg_traits<typename linalg_traits<L1>::const_sub_col_type>::
-	const_iterator it = vect_const_begin(rc1), ite = vect_const_end(rc1);
-      for (; it != ite; ++it)
-	add(scaled(mat_const_row(l2, i), *it), mat_row(l3, it.index()));
-    }
-  }
-
-  template <typename L1, typename L2, typename L3> inline
-  void mult_spec(const L1& l1, const L2& l2, L3& l3, crmult, abstract_skyline)
-  { mult_spec(l1, l2, l3, crmult(), abstract_sparse()); }
-  
-
-  /* ******************************************************************** */
-  /*		Symmetry test.                                     	  */
-  /* ******************************************************************** */
-
-  ///@endcond
-  /** test if A is symmetric.
-      @param A a matrix.
-      @param tol a threshold.
-  */
-  template <typename MAT> inline
-  bool is_symmetric(const MAT &A, magnitude_of_linalg(MAT) tol
-		    = magnitude_of_linalg(MAT)(-1)) {
-    typedef magnitude_of_linalg(MAT) R;
-    if (tol < R(0)) tol = default_tol(R()) * mat_maxnorm(A);
-    if (mat_nrows(A) != mat_ncols(A)) return false;
-    return is_symmetric(A, tol, typename linalg_traits<MAT>::storage_type());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename MAT> 
-  bool is_symmetric(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    abstract_dense) {
-    size_type m = mat_nrows(A);
-    for (size_type i = 1; i < m; ++i)
-      for (size_type j = 0; j < i; ++j)
-	if (gmm::abs(A(i, j)-A(j, i)) > tol) return false;
-    return true;
-  }
-
-  template <typename MAT> 
-  bool is_symmetric(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    abstract_sparse) {
-    return is_symmetric(A, tol, typename principal_orientation_type<typename
-			linalg_traits<MAT>::sub_orientation>::potype());
-  }
-
-  template <typename MAT> 
-  bool is_symmetric(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    row_major) {
-    for (size_type i = 0; i < mat_nrows(A); ++i) {
-      typedef typename linalg_traits<MAT>::const_sub_row_type row_type;
-      row_type row = mat_const_row(A, i);
-      typename linalg_traits<row_type>::const_iterator
-	it = vect_const_begin(row), ite = vect_const_end(row);
-      for (; it != ite; ++it)
-	if (gmm::abs(*it - A(it.index(), i)) > tol) return false;
-    }
-    return true;
-  }
-
-  template <typename MAT> 
-  bool is_symmetric(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    col_major) {
-    for (size_type i = 0; i < mat_ncols(A); ++i) {
-      typedef typename linalg_traits<MAT>::const_sub_col_type col_type;
-      col_type col = mat_const_col(A, i);
-      typename linalg_traits<col_type>::const_iterator
-	it = vect_const_begin(col), ite = vect_const_end(col);
-      for (; it != ite; ++it)
-	if (gmm::abs(*it - A(i, it.index())) > tol) return false;
-    }
-    return true;
-  }
-
-  template <typename MAT> 
-  bool is_symmetric(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    abstract_skyline)
-  { return is_symmetric(A, tol, abstract_sparse()); }
-
-  ///@endcond
-  /** test if A is Hermitian.
-      @param A a matrix.
-      @param tol a threshold.
-  */
-  template <typename MAT> inline
-  bool is_hermitian(const MAT &A, magnitude_of_linalg(MAT) tol
-		    = magnitude_of_linalg(MAT)(-1)) {
-    typedef magnitude_of_linalg(MAT) R;
-    if (tol < R(0)) tol = default_tol(R()) * mat_maxnorm(A);
-    if (mat_nrows(A) != mat_ncols(A)) return false;
-    return is_hermitian(A, tol, typename linalg_traits<MAT>::storage_type());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename MAT> 
-  bool is_hermitian(const MAT &A, magnitude_of_linalg(MAT) tol,
-		    abstract_dense) {
-    size_type m = mat_nrows(A);
-    for (size_type i = 1; i < m; ++i)
-      for (size_type j = 0; j < i; ++j)
-	if (gmm::abs(A(i, j)-gmm::conj(A(j, i))) > tol) return false;
-    return true;
-  }
-
-  template <typename MAT> 
-  bool is_hermitian(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    abstract_sparse) {
-    return is_hermitian(A, tol, typename principal_orientation_type<typename
-			linalg_traits<MAT>::sub_orientation>::potype());
-  }
-
-  template <typename MAT> 
-  bool is_hermitian(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    row_major) {
-    for (size_type i = 0; i < mat_nrows(A); ++i) {
-      typedef typename linalg_traits<MAT>::const_sub_row_type row_type;
-      row_type row = mat_const_row(A, i);
-      typename linalg_traits<row_type>::const_iterator
-	it = vect_const_begin(row), ite = vect_const_end(row);
-      for (; it != ite; ++it)
-	if (gmm::abs(gmm::conj(*it) - A(it.index(), i)) > tol) return false;
-    }
-    return true;
-  }
-
-  template <typename MAT> 
-  bool is_hermitian(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    col_major) {
-    for (size_type i = 0; i < mat_ncols(A); ++i) {
-      typedef typename linalg_traits<MAT>::const_sub_col_type col_type;
-      col_type col = mat_const_col(A, i);
-      typename linalg_traits<col_type>::const_iterator
-	it = vect_const_begin(col), ite = vect_const_end(col);
-      for (; it != ite; ++it)
-	if (gmm::abs(gmm::conj(*it) - A(i, it.index())) > tol) return false;
-    }
-    return true;
-  }
-
-  template <typename MAT> 
-  bool is_hermitian(const MAT &A, magnitude_of_linalg(MAT) tol, 
-		    abstract_skyline)
-  { return is_hermitian(A, tol, abstract_sparse()); }
-  ///@endcond
-}
-
-
-#endif //  GMM_BLAS_H__
diff --git a/Contrib/gmm/gmm_blas_interface.h b/Contrib/gmm/gmm_blas_interface.h
deleted file mode 100755
index 44e1dd8..0000000
--- a/Contrib/gmm/gmm_blas_interface.h
+++ /dev/null
@@ -1,853 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_blas_interface.h
-   @author  Caroline Lecalvez, Caroline.Lecalvez at gmm.insa-tlse.fr, Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 7, 2003.
-   @brief gmm interface for fortran BLAS.
-*/
-
-#if defined(GETFEM_USES_BLAS) || defined(GMM_USES_BLAS) \
-  || defined(GMM_USES_LAPACK) || defined(GMM_USES_ATLAS)
-
-#ifndef GMM_BLAS_INTERFACE_H
-#define GMM_BLAS_INTERFACE_H
-
-#include "gmm_blas.h"
-#include "gmm_interface.h"
-#include "gmm_matrix.h"
-
-namespace gmm {
-
-#define GMMLAPACK_TRACE(f) 
-  // #define GMMLAPACK_TRACE(f) cout << "function " << f << " called" << endl;
-
-  /* ********************************************************************* */
-  /* Operations interfaced for T = float, double, std::complex<float>      */
-  /*    or std::complex<double> :                                          */
-  /*                                                                       */
-  /* vect_norm2(std::vector<T>)                                            */
-  /*                                                                       */
-  /* vect_sp(std::vector<T>, std::vector<T>)                               */
-  /* vect_sp(scaled(std::vector<T>), std::vector<T>)                       */
-  /* vect_sp(std::vector<T>, scaled(std::vector<T>))                       */
-  /* vect_sp(scaled(std::vector<T>), scaled(std::vector<T>))               */
-  /*                                                                       */
-  /* vect_hp(std::vector<T>, std::vector<T>)                               */
-  /* vect_hp(scaled(std::vector<T>), std::vector<T>)                       */
-  /* vect_hp(std::vector<T>, scaled(std::vector<T>))                       */
-  /* vect_hp(scaled(std::vector<T>), scaled(std::vector<T>))               */
-  /*                                                                       */
-  /* add(std::vector<T>, std::vector<T>)                                   */
-  /* add(scaled(std::vector<T>, a), std::vector<T>)                        */ 
-  /*                                                                       */
-  /* mult(dense_matrix<T>, dense_matrix<T>, dense_matrix<T>)               */
-  /* mult(transposed(dense_matrix<T>), dense_matrix<T>, dense_matrix<T>)   */
-  /* mult(dense_matrix<T>, transposed(dense_matrix<T>), dense_matrix<T>)   */
-  /* mult(transposed(dense_matrix<T>), transposed(dense_matrix<T>),        */
-  /*      dense_matrix<T>)                                                 */
-  /* mult(conjugated(dense_matrix<T>), dense_matrix<T>, dense_matrix<T>)   */
-  /* mult(dense_matrix<T>, conjugated(dense_matrix<T>), dense_matrix<T>)   */
-  /* mult(conjugated(dense_matrix<T>), conjugated(dense_matrix<T>),        */
-  /*      dense_matrix<T>)                                                 */
-  /*                                                                       */
-  /* mult(dense_matrix<T>, std::vector<T>, std::vector<T>)                 */
-  /* mult(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>)     */
-  /* mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>)     */
-  /* mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>)         */
-  /* mult(transposed(dense_matrix<T>), scaled(std::vector<T>),             */
-  /*      std::vector<T>)                                                  */
-  /* mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),             */
-  /*      std::vector<T>)                                                  */
-  /*                                                                       */
-  /* mult_add(dense_matrix<T>, std::vector<T>, std::vector<T>)             */
-  /* mult_add(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>) */
-  /* mult_add(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>) */
-  /* mult_add(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>)     */
-  /* mult_add(transposed(dense_matrix<T>), scaled(std::vector<T>),         */
-  /*          std::vector<T>)                                              */
-  /* mult_add(conjugated(dense_matrix<T>), scaled(std::vector<T>),         */
-  /*          std::vector<T>)                                              */
-  /*                                                                       */
-  /* mult(dense_matrix<T>, std::vector<T>, std::vector<T>, std::vector<T>) */
-  /* mult(transposed(dense_matrix<T>), std::vector<T>, std::vector<T>,     */
-  /*      std::vector<T>)                                                  */
-  /* mult(conjugated(dense_matrix<T>), std::vector<T>, std::vector<T>,     */
-  /*      std::vector<T>)                                                  */
-  /* mult(dense_matrix<T>, scaled(std::vector<T>), std::vector<T>,         */
-  /*      std::vector<T>)                                                  */
-  /* mult(transposed(dense_matrix<T>), scaled(std::vector<T>),             */
-  /*      std::vector<T>, std::vector<T>)                                  */
-  /* mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),             */
-  /*      std::vector<T>, std::vector<T>)                                  */
-  /* mult(dense_matrix<T>, std::vector<T>, scaled(std::vector<T>),         */
-  /*      std::vector<T>)                                                  */
-  /* mult(transposed(dense_matrix<T>), std::vector<T>,                     */
-  /*      scaled(std::vector<T>), std::vector<T>)                          */
-  /* mult(conjugated(dense_matrix<T>), std::vector<T>,                     */
-  /*      scaled(std::vector<T>), std::vector<T>)                          */
-  /* mult(dense_matrix<T>, scaled(std::vector<T>), scaled(std::vector<T>), */
-  /*   std::vector<T>)                                                     */
-  /* mult(transposed(dense_matrix<T>), scaled(std::vector<T>),             */
-  /*      scaled(std::vector<T>), std::vector<T>)                          */
-  /* mult(conjugated(dense_matrix<T>), scaled(std::vector<T>),             */
-  /*      scaled(std::vector<T>), std::vector<T>)                          */
-  /*                                                                       */
-  /* lower_tri_solve(dense_matrix<T>, std::vector<T>, k, b)                */
-  /* upper_tri_solve(dense_matrix<T>, std::vector<T>, k, b)                */
-  /* lower_tri_solve(transposed(dense_matrix<T>), std::vector<T>, k, b)    */
-  /* upper_tri_solve(transposed(dense_matrix<T>), std::vector<T>, k, b)    */
-  /* lower_tri_solve(conjugated(dense_matrix<T>), std::vector<T>, k, b)    */
-  /* upper_tri_solve(conjugated(dense_matrix<T>), std::vector<T>, k, b)    */
-  /*                                                                       */
-  /* ********************************************************************* */
-
-  /* ********************************************************************* */
-  /* Basic defines.                                                        */
-  /* ********************************************************************* */
-
-# define BLAS_S float
-# define BLAS_D double
-# define BLAS_C std::complex<float>
-# define BLAS_Z std::complex<double>
-
-  /* ********************************************************************* */
-  /* BLAS functions used.                                                  */
-  /* ********************************************************************* */
-  extern "C" void daxpy_(const int *n, const double *alpha, const double *x, const int *incx, double *y, const int *incy);
-  extern "C" {
-    void sgemm_(...); void dgemm_(...); void cgemm_(...); void zgemm_(...);
-    void sgemv_(...); void dgemv_(...); void cgemv_(...); void zgemv_(...);
-    void strsv_(...); void dtrsv_(...); void ctrsv_(...); void ztrsv_(...);
-    void saxpy_(...); /*void daxpy_(...); */void caxpy_(...); void zaxpy_(...);
-    BLAS_S sdot_ (...); BLAS_D ddot_ (...);
-    BLAS_C cdotu_(...); BLAS_Z zdotu_(...);
-    BLAS_C cdotc_(...); BLAS_Z zdotc_(...);
-    BLAS_S snrm2_(...); BLAS_D dnrm2_(...);
-    BLAS_S scnrm2_(...); BLAS_D dznrm2_(...);
-  }
-
-  /* ********************************************************************* */
-  /* vect_norm2(x).                                                        */
-  /* ********************************************************************* */
-
-  # define nrm2_interface(param1, trans1, blas_name, base_type)            \
-  inline number_traits<base_type >::magnitude_type                         \
-    vect_norm2(param1(base_type)) {                                        \
-    GMMLAPACK_TRACE("nrm2_interface");                                     \
-    int inc(1), n(vect_size(x)); trans1(base_type);                        \
-    return blas_name(&n, &x[0], &inc);                                     \
-  }
-
-# define nrm2_p1(base_type) const std::vector<base_type > &x
-# define nrm2_trans1(base_type)
-
-  nrm2_interface(nrm2_p1, nrm2_trans1, snrm2_ , BLAS_S)
-  nrm2_interface(nrm2_p1, nrm2_trans1, dnrm2_ , BLAS_D)
-  nrm2_interface(nrm2_p1, nrm2_trans1, scnrm2_, BLAS_C)
-  nrm2_interface(nrm2_p1, nrm2_trans1, dznrm2_, BLAS_Z)
-
-  /* ********************************************************************* */
-  /* vect_sp(x, y).                                                        */
-  /* ********************************************************************* */
-
-  # define dot_interface(param1, trans1, mult1, param2, trans2, mult2,     \
-                         blas_name, base_type)                             \
-  inline base_type vect_sp(param1(base_type), param2(base_type)) {         \
-    GMMLAPACK_TRACE("dot_interface");                                      \
-    trans1(base_type); trans2(base_type); int inc(1), n(vect_size(y));     \
-    return mult1 mult2 blas_name(&n, &x[0], &inc, &y[0], &inc);            \
-  }
-
-# define dot_p1(base_type) const std::vector<base_type > &x
-# define dot_trans1(base_type)
-# define dot_p1_s(base_type)                                               \
-    const scaled_vector_const_ref<std::vector<base_type >, base_type > &x_
-# define dot_trans1_s(base_type)                                           \
-         std::vector<base_type > &x =                                      \
-         const_cast<std::vector<base_type > &>(*(linalg_origin(x_)));      \
-         base_type a(x_.r)
-
-# define dot_p2(base_type) const std::vector<base_type > &y
-# define dot_trans2(base_type)
-# define dot_p2_s(base_type)                                               \
-    const scaled_vector_const_ref<std::vector<base_type >, base_type > &y_
-# define dot_trans2_s(base_type)                                           \
-         std::vector<base_type > &y =                                      \
-         const_cast<std::vector<base_type > &>(*(linalg_origin(y_)));      \
-         base_type b(y_.r)
-
-  dot_interface(dot_p1, dot_trans1, , dot_p2, dot_trans2, , sdot_ , BLAS_S)
-  dot_interface(dot_p1, dot_trans1, , dot_p2, dot_trans2, , ddot_ , BLAS_D)
-  dot_interface(dot_p1, dot_trans1, , dot_p2, dot_trans2, , cdotu_, BLAS_C)
-  dot_interface(dot_p1, dot_trans1, , dot_p2, dot_trans2, , zdotu_, BLAS_Z)
-  
-  dot_interface(dot_p1_s, dot_trans1_s, a*, dot_p2, dot_trans2, ,sdot_ ,BLAS_S)
-  dot_interface(dot_p1_s, dot_trans1_s, a*, dot_p2, dot_trans2, ,ddot_ ,BLAS_D)
-  dot_interface(dot_p1_s, dot_trans1_s, a*, dot_p2, dot_trans2, ,cdotu_,BLAS_C)
-  dot_interface(dot_p1_s, dot_trans1_s, a*, dot_p2, dot_trans2, ,zdotu_,BLAS_Z)
-  
-  dot_interface(dot_p1, dot_trans1, , dot_p2_s, dot_trans2_s, b*,sdot_ ,BLAS_S)
-  dot_interface(dot_p1, dot_trans1, , dot_p2_s, dot_trans2_s, b*,ddot_ ,BLAS_D)
-  dot_interface(dot_p1, dot_trans1, , dot_p2_s, dot_trans2_s, b*,cdotu_,BLAS_C)
-  dot_interface(dot_p1, dot_trans1, , dot_p2_s, dot_trans2_s, b*,zdotu_,BLAS_Z)
-
-  dot_interface(dot_p1_s,dot_trans1_s,a*,dot_p2_s,dot_trans2_s,b*,sdot_ ,
-		BLAS_S)
-  dot_interface(dot_p1_s,dot_trans1_s,a*,dot_p2_s,dot_trans2_s,b*,ddot_ ,
-		BLAS_D)
-  dot_interface(dot_p1_s,dot_trans1_s,a*,dot_p2_s,dot_trans2_s,b*,cdotu_,
-		BLAS_C)
-  dot_interface(dot_p1_s,dot_trans1_s,a*,dot_p2_s,dot_trans2_s,b*,zdotu_,
-		BLAS_Z)
-
-
-  /* ********************************************************************* */
-  /* vect_hp(x, y).                                                        */
-  /* ********************************************************************* */
-
-  # define dotc_interface(param1, trans1, mult1, param2, trans2, mult2,    \
-                         blas_name, base_type)                             \
-  inline base_type vect_hp(param1(base_type), param2(base_type)) {         \
-    GMMLAPACK_TRACE("dotc_interface");                                     \
-    trans1(base_type); trans2(base_type); int inc(1), n(vect_size(y));     \
-    return mult1 mult2 blas_name(&n, &x[0], &inc, &y[0], &inc);            \
-  }
-
-# define dotc_p1(base_type) const std::vector<base_type > &x
-# define dotc_trans1(base_type)
-# define dotc_p1_s(base_type)                                              \
-    const scaled_vector_const_ref<std::vector<base_type >, base_type > &x_
-# define dotc_trans1_s(base_type)                                          \
-         std::vector<base_type > &x =                                      \
-         const_cast<std::vector<base_type > &>(*(linalg_origin(x_)));      \
-         base_type a(x_.r)
-
-# define dotc_p2(base_type) const std::vector<base_type > &y
-# define dotc_trans2(base_type)
-# define dotc_p2_s(base_type)                                              \
-    const scaled_vector_const_ref<std::vector<base_type >, base_type > &y_
-# define dotc_trans2_s(base_type)                                          \
-         std::vector<base_type > &y =                                      \
-         const_cast<std::vector<base_type > &>(*(linalg_origin(y_)));      \
-         base_type b(gmm::conj(y_.r))
-
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2, dotc_trans2, ,sdot_ ,BLAS_S)
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2, dotc_trans2, ,ddot_ ,BLAS_D)
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2, dotc_trans2, ,cdotc_,BLAS_C)
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2, dotc_trans2, ,zdotc_,BLAS_Z)
-  
-  dotc_interface(dotc_p1_s, dotc_trans1_s, a*, dotc_p2, dotc_trans2, ,sdot_,
-		 BLAS_S)
-  dotc_interface(dotc_p1_s, dotc_trans1_s, a*, dotc_p2, dotc_trans2, ,ddot_ ,
-		 BLAS_D)
-  dotc_interface(dotc_p1_s, dotc_trans1_s, a*, dotc_p2, dotc_trans2, ,cdotc_,
-		 BLAS_C)
-  dotc_interface(dotc_p1_s, dotc_trans1_s, a*, dotc_p2, dotc_trans2, ,zdotc_,
-		 BLAS_Z)
-  
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2_s, dotc_trans2_s, b*,sdot_ ,
-		 BLAS_S)
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2_s, dotc_trans2_s, b*,ddot_ ,
-		 BLAS_D)
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2_s, dotc_trans2_s, b*,cdotc_,
-		 BLAS_C)
-  dotc_interface(dotc_p1, dotc_trans1, , dotc_p2_s, dotc_trans2_s, b*,zdotc_,
-		 BLAS_Z)
-
-  dotc_interface(dotc_p1_s,dotc_trans1_s,a*,dotc_p2_s,dotc_trans2_s,b*,sdot_ ,
-		 BLAS_S)
-  dotc_interface(dotc_p1_s,dotc_trans1_s,a*,dotc_p2_s,dotc_trans2_s,b*,ddot_ ,
-		 BLAS_D)
-  dotc_interface(dotc_p1_s,dotc_trans1_s,a*,dotc_p2_s,dotc_trans2_s,b*,cdotc_,
-		 BLAS_C)
-  dotc_interface(dotc_p1_s,dotc_trans1_s,a*,dotc_p2_s,dotc_trans2_s,b*,zdotc_,
-		 BLAS_Z)
-
-  /* ********************************************************************* */
-  /* add(x, y).                                                            */
-  /* ********************************************************************* */
-
-# define axpy_interface(param1, trans1, blas_name, base_type)              \
-  inline void add(param1(base_type), std::vector<base_type > &y) {         \
-    GMMLAPACK_TRACE("axpy_interface");                                     \
-    int inc(1), n(vect_size(y)); trans1(base_type);                        \
-    blas_name(&n, &a, &x[0], &inc, &y[0], &inc);                           \
-  }
-
-# define axpy_p1(base_type) const std::vector<base_type > &x
-# define axpy_trans1(base_type) base_type a(1)
-# define axpy_p1_s(base_type)                                              \
-    const scaled_vector_const_ref<std::vector<base_type >, base_type > &x_
-# define axpy_trans1_s(base_type)                                          \
-         std::vector<base_type > &x =                                      \
-         const_cast<std::vector<base_type > &>(*(linalg_origin(x_)));      \
-         base_type a(x_.r)
-
-  axpy_interface(axpy_p1, axpy_trans1, saxpy_, BLAS_S)
-  axpy_interface(axpy_p1, axpy_trans1, daxpy_, BLAS_D)
-  axpy_interface(axpy_p1, axpy_trans1, caxpy_, BLAS_C)
-  axpy_interface(axpy_p1, axpy_trans1, zaxpy_, BLAS_Z)
-  
-  axpy_interface(axpy_p1_s, axpy_trans1_s, saxpy_, BLAS_S)
-  axpy_interface(axpy_p1_s, axpy_trans1_s, daxpy_, BLAS_D)
-  axpy_interface(axpy_p1_s, axpy_trans1_s, caxpy_, BLAS_C)
-  axpy_interface(axpy_p1_s, axpy_trans1_s, zaxpy_, BLAS_Z)
-  
-
-  /* ********************************************************************* */
-  /* mult_add(A, x, z).                                                    */
-  /* ********************************************************************* */
-  
-# define gemv_interface(param1, trans1, param2, trans2, blas_name,         \
-			base_type, orien)                                  \
-  inline void mult_add_spec(param1(base_type), param2(base_type),          \
-              std::vector<base_type > &z, orien) {                         \
-    GMMLAPACK_TRACE("gemv_interface");                                     \
-    trans1(base_type); trans2(base_type); base_type beta(1);               \
-    int m(mat_nrows(A)), lda(m), n(mat_ncols(A)), inc(1);                  \
-    if (m && n) blas_name(&t, &m, &n, &alpha, &A(0,0), &lda, &x[0], &inc,  \
-                          &beta, &z[0], &inc);                             \
-    else gmm::clear(z);                                                    \
-  }
-
-  // First parameter
-# define gem_p1_n(base_type)  const dense_matrix<base_type > &A
-# define gem_trans1_n(base_type) const char t = 'N'
-# define gem_p1_t(base_type)                                               \
-         const transposed_col_ref<dense_matrix<base_type > *> &A_
-# define gem_trans1_t(base_type) dense_matrix<base_type > &A =             \
-         const_cast<dense_matrix<base_type > &>(*(linalg_origin(A_)));     \
-         const char t = 'T'
-# define gem_p1_tc(base_type)                                              \
-         const transposed_col_ref<const dense_matrix<base_type > *> &A_
-# define gem_p1_c(base_type)                                               \
-         const conjugated_col_matrix_const_ref<dense_matrix<base_type > > &A_
-# define gem_trans1_c(base_type) dense_matrix<base_type > &A =             \
-         const_cast<dense_matrix<base_type > &>(*(linalg_origin(A_)));     \
-         const char t = 'C'
-
-  // second parameter 
-# define gemv_p2_n(base_type)  const std::vector<base_type > &x
-# define gemv_trans2_n(base_type) base_type alpha(1)
-# define gemv_p2_s(base_type)                                              \
-    const scaled_vector_const_ref<std::vector<base_type >, base_type > &x_
-# define gemv_trans2_s(base_type) std::vector<base_type > &x =             \
-         const_cast<std::vector<base_type > &>(*(linalg_origin(x_)));      \
-         base_type alpha(x_.r)
-
-  // Z <- AX + Z.
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, sgemv_,
-		 BLAS_S, col_major)
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, dgemv_,
-		 BLAS_D, col_major)
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, cgemv_,
-		 BLAS_C, col_major)
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, zgemv_,
-		 BLAS_Z, col_major)
-
-  // Z <- transposed(A)X + Z.
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, sgemv_,
-		 BLAS_S, row_major)
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, dgemv_,
-		 BLAS_D, row_major)
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, cgemv_,
-		 BLAS_C, row_major)
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, zgemv_,
-		 BLAS_Z, row_major)
-  
-  // Z <- transposed(const A)X + Z.
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, sgemv_,
-		 BLAS_S, row_major)
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, dgemv_,
-		 BLAS_D, row_major)
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, cgemv_,
-		 BLAS_C, row_major)
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, zgemv_,
-		 BLAS_Z, row_major)
-  
-  // Z <- conjugated(A)X + Z.
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, sgemv_,
-		 BLAS_S, row_major)
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, dgemv_,
-		 BLAS_D, row_major)
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, cgemv_,
-		 BLAS_C, row_major)
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, zgemv_,
-		 BLAS_Z, row_major)
-
-  // Z <- A scaled(X) + Z.
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, sgemv_,
-		 BLAS_S, col_major)
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, dgemv_,
-		 BLAS_D, col_major)
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, cgemv_,
-		 BLAS_C, col_major)
-  gemv_interface(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, zgemv_,
-		 BLAS_Z, col_major)
-
-  // Z <- transposed(A) scaled(X) + Z.
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, sgemv_,
-		 BLAS_S, row_major)
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, dgemv_,
-		 BLAS_D, row_major)
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, cgemv_,
-		 BLAS_C, row_major)
-  gemv_interface(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, zgemv_,
-		 BLAS_Z, row_major)
-  
-  // Z <- transposed(const A) scaled(X) + Z.
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, sgemv_,
-		 BLAS_S, row_major)
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, dgemv_,
-		 BLAS_D, row_major)
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, cgemv_,
-		 BLAS_C, row_major)
-  gemv_interface(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, zgemv_,
-		 BLAS_Z, row_major)
-  
-  // Z <- conjugated(A) scaled(X) + Z.
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, sgemv_,
-		 BLAS_S, row_major)
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, dgemv_,
-		 BLAS_D, row_major)
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, cgemv_,
-		 BLAS_C, row_major)
-  gemv_interface(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, zgemv_,
-		 BLAS_Z, row_major)
-
-
-  /* ********************************************************************* */
-  /* mult(A, x, y).                                                        */
-  /* ********************************************************************* */
-  
-# define gemv_interface2(param1, trans1, param2, trans2, blas_name,        \
-                         base_type, orien)                                 \
-  inline void mult_spec(param1(base_type), param2(base_type),              \
-              std::vector<base_type > &z, orien) {                         \
-    GMMLAPACK_TRACE("gemv_interface2");                                    \
-    trans1(base_type); trans2(base_type); base_type beta(0);               \
-    int m(mat_nrows(A)), lda(m), n(mat_ncols(A)), inc(1);                  \
-    if (m && n)                                                            \
-      blas_name(&t, &m, &n, &alpha, &A(0,0), &lda, &x[0], &inc, &beta,     \
-                &z[0], &inc);                                              \
-    else gmm::clear(z);                                                    \
-  }
-
-  // Y <- AX.
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, sgemv_,
-		  BLAS_S, col_major)
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, dgemv_,
-		  BLAS_D, col_major)
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, cgemv_,
-		  BLAS_C, col_major)
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_n, gemv_trans2_n, zgemv_,
-		  BLAS_Z, col_major)
-
-  // Y <- transposed(A)X.
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, sgemv_,
-		  BLAS_S, row_major)
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, dgemv_,
-		  BLAS_D, row_major)
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, cgemv_,
-		  BLAS_C, row_major)
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_n, gemv_trans2_n, zgemv_,
-		  BLAS_Z, row_major)
-  
-  // Y <- transposed(const A)X.
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, sgemv_,
-		  BLAS_S, row_major)
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, dgemv_,
-		  BLAS_D, row_major)
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, cgemv_,
-		  BLAS_C, row_major)
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_n, gemv_trans2_n, zgemv_,
-		  BLAS_Z, row_major)
-  
-  // Y <- conjugated(A)X.
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, sgemv_,
-		  BLAS_S, row_major)
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, dgemv_,
-		  BLAS_D, row_major)
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, cgemv_,
-		  BLAS_C, row_major)
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_n, gemv_trans2_n, zgemv_,
-		  BLAS_Z, row_major)
-
-  // Y <- A scaled(X).
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, sgemv_,
-		  BLAS_S, col_major)
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, dgemv_,
-		  BLAS_D, col_major)
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, cgemv_,
-		  BLAS_C, col_major)
-  gemv_interface2(gem_p1_n, gem_trans1_n, gemv_p2_s, gemv_trans2_s, zgemv_,
-		  BLAS_Z, col_major)
-
-  // Y <- transposed(A) scaled(X).
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, sgemv_,
-		  BLAS_S, row_major)
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, dgemv_,
-		  BLAS_D, row_major)
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, cgemv_,
-		  BLAS_C, row_major)
-  gemv_interface2(gem_p1_t, gem_trans1_t, gemv_p2_s, gemv_trans2_s, zgemv_,
-		  BLAS_Z, row_major)
-  
-  // Y <- transposed(const A) scaled(X).
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, sgemv_,
-		  BLAS_S, row_major)
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, dgemv_,
-		  BLAS_D, row_major)
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, cgemv_,
-		  BLAS_C, row_major)
-  gemv_interface2(gem_p1_tc, gem_trans1_t, gemv_p2_s, gemv_trans2_s, zgemv_,
-		  BLAS_Z, row_major)
-  
-  // Y <- conjugated(A) scaled(X).
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, sgemv_,
-		  BLAS_S, row_major)
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, dgemv_,
-		  BLAS_D, row_major)
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, cgemv_,
-		  BLAS_C, row_major)
-  gemv_interface2(gem_p1_c, gem_trans1_c, gemv_p2_s, gemv_trans2_s, zgemv_,
-		  BLAS_Z, row_major)
-
-  /* ********************************************************************* */
-  /* dense matrix x dense matrix multiplication.                           */
-  /* ********************************************************************* */
-
-# define gemm_interface_nn(blas_name, base_type)                           \
-  inline void mult_spec(const dense_matrix<base_type > &A,                 \
-            const dense_matrix<base_type > &B,                             \
-            dense_matrix<base_type > &C, c_mult) {                         \
-    GMMLAPACK_TRACE("gemm_interface_nn");                                  \
-    const char t = 'N';                                                    \
-    int m = mat_nrows(A), lda = m, k = mat_ncols(A), n = mat_ncols(B);     \
-    int ldb = k, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &t, &m, &n, &k, &alpha,                                \
-	          &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);     \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_nn(sgemm_, BLAS_S)
-  gemm_interface_nn(dgemm_, BLAS_D)
-  gemm_interface_nn(cgemm_, BLAS_C)
-  gemm_interface_nn(zgemm_, BLAS_Z)
-  
-  /* ********************************************************************* */
-  /* transposed(dense matrix) x dense matrix multiplication.               */
-  /* ********************************************************************* */
-
-# define gemm_interface_tn(blas_name, base_type, is_const)                 \
-  inline void mult_spec(                                                   \
-         const transposed_col_ref<is_const dense_matrix<base_type > *> &A_,\
-         const dense_matrix<base_type > &B,                                \
-         dense_matrix<base_type > &C, rcmult) {                            \
-    GMMLAPACK_TRACE("gemm_interface_tn");                                  \
-    dense_matrix<base_type > &A                                            \
-         = const_cast<dense_matrix<base_type > &>(*(linalg_origin(A_)));   \
-    const char t = 'T', u = 'N';                                           \
-    int m = mat_ncols(A), k = mat_nrows(A), n = mat_ncols(B), lda = k;     \
-    int ldb = k, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &u, &m, &n, &k, &alpha,                                \
-	          &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);     \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_tn(sgemm_, BLAS_S,)
-  gemm_interface_tn(dgemm_, BLAS_D,)
-  gemm_interface_tn(cgemm_, BLAS_C,)
-  gemm_interface_tn(zgemm_, BLAS_Z,)
-  gemm_interface_tn(sgemm_, BLAS_S, const)
-  gemm_interface_tn(dgemm_, BLAS_D, const)
-  gemm_interface_tn(cgemm_, BLAS_C, const)
-  gemm_interface_tn(zgemm_, BLAS_Z, const)
-
-  /* ********************************************************************* */
-  /* dense matrix x transposed(dense matrix) multiplication.               */
-  /* ********************************************************************* */
-
-# define gemm_interface_nt(blas_name, base_type, is_const)                 \
-  inline void mult_spec(const dense_matrix<base_type > &A,                 \
-         const transposed_col_ref<is_const dense_matrix<base_type > *> &B_,\
-         dense_matrix<base_type > &C, r_mult) {                            \
-    GMMLAPACK_TRACE("gemm_interface_nt");                                  \
-    dense_matrix<base_type > &B                                            \
-        = const_cast<dense_matrix<base_type > &>(*(linalg_origin(B_)));    \
-    const char t = 'N', u = 'T';                                           \
-    int m = mat_nrows(A), lda = m, k = mat_ncols(A), n = mat_nrows(B);     \
-    int ldb = n, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &u, &m, &n, &k, &alpha,                                \
-	        &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);       \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_nt(sgemm_, BLAS_S,)
-  gemm_interface_nt(dgemm_, BLAS_D,)
-  gemm_interface_nt(cgemm_, BLAS_C,)
-  gemm_interface_nt(zgemm_, BLAS_Z,)
-  gemm_interface_nt(sgemm_, BLAS_S, const)
-  gemm_interface_nt(dgemm_, BLAS_D, const)
-  gemm_interface_nt(cgemm_, BLAS_C, const)
-  gemm_interface_nt(zgemm_, BLAS_Z, const)
-
-  /* ********************************************************************* */
-  /* transposed(dense matrix) x transposed(dense matrix) multiplication.   */
-  /* ********************************************************************* */
-
-# define gemm_interface_tt(blas_name, base_type, isA_const, isB_const)     \
-  inline void mult_spec(                                                   \
-        const transposed_col_ref<isA_const dense_matrix<base_type > *> &A_,\
-        const transposed_col_ref<isB_const dense_matrix<base_type > *> &B_,\
-        dense_matrix<base_type > &C, r_mult) {                             \
-    GMMLAPACK_TRACE("gemm_interface_tt");                                  \
-    dense_matrix<base_type > &A                                            \
-        = const_cast<dense_matrix<base_type > &>(*(linalg_origin(A_)));    \
-    dense_matrix<base_type > &B                                            \
-        = const_cast<dense_matrix<base_type > &>(*(linalg_origin(B_)));    \
-    const char t = 'T', u = 'T';                                           \
-    int m = mat_ncols(A), k = mat_nrows(A), n = mat_nrows(B), lda = k;     \
-    int ldb = n, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &u, &m, &n, &k, &alpha,                                \
-	        &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);       \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_tt(sgemm_, BLAS_S,,)
-  gemm_interface_tt(dgemm_, BLAS_D,,)
-  gemm_interface_tt(cgemm_, BLAS_C,,)
-  gemm_interface_tt(zgemm_, BLAS_Z,,)
-  gemm_interface_tt(sgemm_, BLAS_S, const,)
-  gemm_interface_tt(dgemm_, BLAS_D, const,)
-  gemm_interface_tt(cgemm_, BLAS_C, const,)
-  gemm_interface_tt(zgemm_, BLAS_Z, const,)
-  gemm_interface_tt(sgemm_, BLAS_S,, const)
-  gemm_interface_tt(dgemm_, BLAS_D,, const)
-  gemm_interface_tt(cgemm_, BLAS_C,, const)
-  gemm_interface_tt(zgemm_, BLAS_Z,, const)
-  gemm_interface_tt(sgemm_, BLAS_S, const, const)
-  gemm_interface_tt(dgemm_, BLAS_D, const, const)
-  gemm_interface_tt(cgemm_, BLAS_C, const, const)
-  gemm_interface_tt(zgemm_, BLAS_Z, const, const)
-
-
-  /* ********************************************************************* */
-  /* conjugated(dense matrix) x dense matrix multiplication.               */
-  /* ********************************************************************* */
-
-# define gemm_interface_cn(blas_name, base_type)                           \
-  inline void mult_spec(                                                   \
-      const conjugated_col_matrix_const_ref<dense_matrix<base_type > > &A_,\
-      const dense_matrix<base_type > &B,                                   \
-      dense_matrix<base_type > &C, rcmult) {                               \
-    GMMLAPACK_TRACE("gemm_interface_cn");                                  \
-    dense_matrix<base_type > &A                                            \
-          = const_cast<dense_matrix<base_type > &>(*(linalg_origin(A_)));  \
-    const char t = 'C', u = 'N';                                           \
-    int m = mat_ncols(A), k = mat_nrows(A), n = mat_ncols(B), lda = k;     \
-    int ldb = k, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &u, &m, &n, &k, &alpha,                                \
-	        &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);       \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_cn(sgemm_, BLAS_S)
-  gemm_interface_cn(dgemm_, BLAS_D)
-  gemm_interface_cn(cgemm_, BLAS_C)
-  gemm_interface_cn(zgemm_, BLAS_Z)
-
-  /* ********************************************************************* */
-  /* dense matrix x conjugated(dense matrix) multiplication.               */
-  /* ********************************************************************* */
-
-# define gemm_interface_nc(blas_name, base_type)                           \
-  inline void mult_spec(const dense_matrix<base_type > &A,                 \
-      const conjugated_col_matrix_const_ref<dense_matrix<base_type > > &B_,\
-      dense_matrix<base_type > &C, c_mult, row_major) {                    \
-    GMMLAPACK_TRACE("gemm_interface_nc");                                  \
-    dense_matrix<base_type > &B                                            \
-         = const_cast<dense_matrix<base_type > &>(*(linalg_origin(B_)));   \
-    const char t = 'N', u = 'C';                                           \
-    int m = mat_nrows(A), lda = m, k = mat_ncols(A), n = mat_nrows(B);     \
-    int ldb = n, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &u, &m, &n, &k, &alpha,                                \
-	        &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);       \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_nc(sgemm_, BLAS_S)
-  gemm_interface_nc(dgemm_, BLAS_D)
-  gemm_interface_nc(cgemm_, BLAS_C)
-  gemm_interface_nc(zgemm_, BLAS_Z)
-
-  /* ********************************************************************* */
-  /* conjugated(dense matrix) x conjugated(dense matrix) multiplication.   */
-  /* ********************************************************************* */
-
-# define gemm_interface_cc(blas_name, base_type)                           \
-  inline void mult_spec(                                                   \
-      const conjugated_col_matrix_const_ref<dense_matrix<base_type > > &A_,\
-      const conjugated_col_matrix_const_ref<dense_matrix<base_type > > &B_,\
-      dense_matrix<base_type > &C, r_mult) {                               \
-    GMMLAPACK_TRACE("gemm_interface_cc");                                  \
-    dense_matrix<base_type > &A                                            \
-        = const_cast<dense_matrix<base_type > &>(*(linalg_origin(A_)));    \
-    dense_matrix<base_type > &B                                            \
-        = const_cast<dense_matrix<base_type > &>(*(linalg_origin(B_)));    \
-    const char t = 'C', u = 'C';                                           \
-    int m = mat_ncols(A), k = mat_nrows(A), lda = k, n = mat_nrows(B);     \
-    int ldb = n, ldc = m;                                                  \
-    base_type alpha(1), beta(0);                                           \
-    if (m && k && n)                                                       \
-      blas_name(&t, &u, &m, &n, &k, &alpha,                                \
-	        &A(0,0), &lda, &B(0,0), &ldb, &beta, &C(0,0), &ldc);       \
-    else gmm::clear(C);                                                    \
-  }
-
-  gemm_interface_cc(sgemm_, BLAS_S)
-  gemm_interface_cc(dgemm_, BLAS_D)
-  gemm_interface_cc(cgemm_, BLAS_C)
-  gemm_interface_cc(zgemm_, BLAS_Z)
-   
-  /* ********************************************************************* */
-  /* Tri solve.                                                            */
-  /* ********************************************************************* */
-
-# define trsv_interface(f_name, loru, param1, trans1, blas_name, base_type)\
-  inline void f_name(param1(base_type), std::vector<base_type > &x,        \
-                              size_type k, bool is_unit) {                 \
-    GMMLAPACK_TRACE("trsv_interface");                                     \
-    loru; trans1(base_type); char d = is_unit ? 'U' : 'N';                 \
-    int lda(mat_nrows(A)), inc(1), n(k);                                   \
-    if (lda) blas_name(&l, &t, &d, &n, &A(0,0), &lda, &x[0], &inc);        \
-  }
-
-# define trsv_upper const char l = 'U'
-# define trsv_lower const char l = 'L'
-
-  // X <- LOWER(A)^{-1}X.
-  trsv_interface(lower_tri_solve, trsv_lower, gem_p1_n, gem_trans1_n,
-		 strsv_, BLAS_S)
-  trsv_interface(lower_tri_solve, trsv_lower, gem_p1_n, gem_trans1_n,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(lower_tri_solve, trsv_lower, gem_p1_n, gem_trans1_n,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(lower_tri_solve, trsv_lower, gem_p1_n, gem_trans1_n,
-		 ztrsv_, BLAS_Z)
-  
-  // X <- UPPER(A)^{-1}X.
-  trsv_interface(upper_tri_solve, trsv_upper, gem_p1_n, gem_trans1_n,
-		 strsv_, BLAS_S)
-  trsv_interface(upper_tri_solve, trsv_upper, gem_p1_n, gem_trans1_n,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(upper_tri_solve, trsv_upper, gem_p1_n, gem_trans1_n,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(upper_tri_solve, trsv_upper, gem_p1_n, gem_trans1_n,
-		 ztrsv_, BLAS_Z)
-  
-  // X <- LOWER(transposed(A))^{-1}X.
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_t, gem_trans1_t,
-		 strsv_, BLAS_S)
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_t, gem_trans1_t,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_t, gem_trans1_t,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_t, gem_trans1_t,
-		 ztrsv_, BLAS_Z)
-  
-  // X <- UPPER(transposed(A))^{-1}X.
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_t, gem_trans1_t,
-		 strsv_, BLAS_S)
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_t, gem_trans1_t,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_t, gem_trans1_t,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_t, gem_trans1_t,
-		 ztrsv_, BLAS_Z)
-
-  // X <- LOWER(transposed(const A))^{-1}X.
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_tc, gem_trans1_t,
-		 strsv_, BLAS_S)
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_tc, gem_trans1_t,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_tc, gem_trans1_t,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_tc, gem_trans1_t,
-		 ztrsv_, BLAS_Z)
-  
-  // X <- UPPER(transposed(const A))^{-1}X.
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_tc, gem_trans1_t,
-		 strsv_, BLAS_S)
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_tc, gem_trans1_t,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_tc, gem_trans1_t,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_tc, gem_trans1_t,
-		 ztrsv_, BLAS_Z)
-
-  // X <- LOWER(conjugated(A))^{-1}X.
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_c, gem_trans1_c,
-		 strsv_, BLAS_S)
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_c, gem_trans1_c,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_c, gem_trans1_c,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(lower_tri_solve, trsv_upper, gem_p1_c, gem_trans1_c,
-		 ztrsv_, BLAS_Z)
-  
-  // X <- UPPER(conjugated(A))^{-1}X.
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_c, gem_trans1_c,
-		 strsv_, BLAS_S)
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_c, gem_trans1_c,
-		 dtrsv_, BLAS_D) 
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_c, gem_trans1_c,
-		 ctrsv_, BLAS_C) 
-  trsv_interface(upper_tri_solve, trsv_lower, gem_p1_c, gem_trans1_c,
-		 ztrsv_, BLAS_Z)
-  
-}
-
-#endif // GMM_BLAS_INTERFACE_H
-
-#endif // GMM_USES_BLAS
diff --git a/Contrib/gmm/gmm_condition_number.h b/Contrib/gmm/gmm_condition_number.h
deleted file mode 100755
index 4b9f250..0000000
--- a/Contrib/gmm/gmm_condition_number.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_condition_number.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>, Julien Pommier <Julien.Pommier at insa-toulouse.fr>
-   @date August 27, 2003.
-   @brief computation of the condition number of dense matrices.
-*/
-#ifndef GMM_CONDITION_NUMBER_H__
-#define GMM_CONDITION_NUMBER_H__
-
-#include "gmm_dense_qr.h"
-
-namespace gmm {
-
-  /** computation of the condition number of dense matrices using SVD.
-
-      Uses symmetric_qr_algorithm => dense matrices only.
-
-      @param M a matrix.
-      @param emin smallest (in magnitude) eigenvalue
-      @param emax largest eigenvalue.
-   */
-  template <typename MAT> 
-  typename number_traits<typename 
-  linalg_traits<MAT>::value_type>::magnitude_type
-  condition_number(const MAT& M, 
-	  typename number_traits<typename
-	  linalg_traits<MAT>::value_type>::magnitude_type& emin,
-	  typename number_traits<typename
-	  linalg_traits<MAT>::value_type>::magnitude_type& emax) {
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type m = mat_nrows(M), n = mat_ncols(M);
-    emax = emin = R(0);
-    std::vector<R> eig(m+n);
-
-    if (m+n == 0) return R(0);
-    if (is_hermitian(M)) {
-      eig.resize(m);
-      gmm::symmetric_qr_algorithm(M, eig);
-    }
-    else {
-      dense_matrix<T> B(m+n, m+n); // not very efficient ??
-      gmm::copy(conjugated(M), sub_matrix(B, sub_interval(m, n), sub_interval(0, m)));
-      gmm::copy(M, sub_matrix(B, sub_interval(0, m),
-					  sub_interval(m, n)));
-      gmm::symmetric_qr_algorithm(B, eig);
-    }
-    emin = emax = gmm::abs(eig[0]);
-    for (size_type i = 1; i < eig.size(); ++i) {
-      R e = gmm::abs(eig[i]); 
-      emin = std::min(emin, e);
-      emax = std::max(emax, e);
-    }
-    // cout << "emin = " << emin << " emax = " << emax << endl;
-    if (emin == R(0)) return gmm::default_max(R());
-    return emax / emin;
-  }
-
-  template <typename MAT> 
-  typename number_traits<typename 
-  linalg_traits<MAT>::value_type>::magnitude_type
-  condition_number(const MAT& M) { 
-    typename number_traits<typename
-      linalg_traits<MAT>::value_type>::magnitude_type emax, emin;
-    return condition_number(M, emin, emax);
-  }
-
-  template <typename MAT> 
-  typename number_traits<typename 
-  linalg_traits<MAT>::value_type>::magnitude_type
-  Frobenius_condition_number_sqr(const MAT& M) { 
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    size_type m = mat_nrows(M), n = mat_ncols(M);
-    dense_matrix<T> B(std::min(m,n), std::min(m,n));
-    if (m < n) mult(M,gmm::conjugated(M),B);
-    else       mult(gmm::conjugated(M),M,B);
-    R trB = abs(mat_trace(B));
-    lu_inverse(B);
-    return trB*abs(mat_trace(B));
-  }
-
-  template <typename MAT> 
-  typename number_traits<typename 
-  linalg_traits<MAT>::value_type>::magnitude_type
-  Frobenius_condition_number(const MAT& M)
-  { return sqrt(Frobenius_condition_number_sqr(M)); }
-
-  /** estimation of the condition number (TO BE DONE...)
-   */
-  template <typename MAT> 
-  typename number_traits<typename 
-  linalg_traits<MAT>::value_type>::magnitude_type
-  condest(const MAT& M, 
-	  typename number_traits<typename
-	  linalg_traits<MAT>::value_type>::magnitude_type& emin,
-	  typename number_traits<typename
-	  linalg_traits<MAT>::value_type>::magnitude_type& emax) {
-    return condition_number(M, emin, emax);
-  }
-  
-  template <typename MAT> 
-  typename number_traits<typename 
-  linalg_traits<MAT>::value_type>::magnitude_type
-  condest(const MAT& M) { 
-    typename number_traits<typename
-      linalg_traits<MAT>::value_type>::magnitude_type emax, emin;
-    return condest(M, emin, emax);
-  }
-}
-
-#endif
diff --git a/Contrib/gmm/gmm_conjugated.h b/Contrib/gmm/gmm_conjugated.h
deleted file mode 100755
index 2f18837..0000000
--- a/Contrib/gmm/gmm_conjugated.h
+++ /dev/null
@@ -1,395 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_conjugated.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date September 18, 2003.
-   @brief handle conjugation of complex matrices/vectors.
-*/
-#ifndef GMM_CONJUGATED_H__
-#define GMM_CONJUGATED_H__
-
-#include "gmm_def.h"
-
-namespace gmm {
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  /* ********************************************************************* */
-  /*		Conjugated references on vectors            		   */
-  /* ********************************************************************* */
-
-  template <typename IT> struct conjugated_const_iterator {
-    typedef typename std::iterator_traits<IT>::value_type      value_type;
-    typedef typename std::iterator_traits<IT>::pointer         pointer;
-    typedef typename std::iterator_traits<IT>::reference       reference;
-    typedef typename std::iterator_traits<IT>::difference_type difference_type;
-    typedef typename std::iterator_traits<IT>::iterator_category
-    iterator_category;
-
-    IT it;
-    
-    conjugated_const_iterator(void) {}
-    conjugated_const_iterator(const IT &i) : it(i) {}
-    
-    inline size_type index(void) const { return it.index(); }
-    conjugated_const_iterator operator ++(int)
-    { conjugated_const_iterator tmp = *this; ++it; return tmp; }
-    conjugated_const_iterator operator --(int) 
-    { conjugated_const_iterator tmp = *this; --it; return tmp; }
-    conjugated_const_iterator &operator ++() { ++it; return *this; }
-    conjugated_const_iterator &operator --() { --it; return *this; }
-    conjugated_const_iterator &operator +=(difference_type i)
-      { it += i; return *this; }
-    conjugated_const_iterator &operator -=(difference_type i)
-      { it -= i; return *this; }
-    conjugated_const_iterator operator +(difference_type i) const
-      { conjugated_const_iterator itb = *this; return (itb += i); }
-    conjugated_const_iterator operator -(difference_type i) const
-      { conjugated_const_iterator itb = *this; return (itb -= i); }
-    difference_type operator -(const conjugated_const_iterator &i) const
-      { return difference_type(it - i.it); }
-    
-    value_type operator  *() const { return gmm::conj(*it); }
-    value_type operator [](size_type ii) const { return gmm::conj(it[ii]); }
-    
-    bool operator ==(const conjugated_const_iterator &i) const
-      { return (i.it == it); }
-    bool operator !=(const conjugated_const_iterator &i) const
-      { return (i.it != it); }
-    bool operator < (const conjugated_const_iterator &i) const
-      { return (it < i.it); }
-  };
-
-  template <typename V> struct conjugated_vector_const_ref {
-    typedef conjugated_vector_const_ref<V> this_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename linalg_traits<V>::const_iterator iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::origin_type origin_type;
-
-    iterator begin_, end_;
-    const origin_type *origin;
-    size_type size_;
-
-    conjugated_vector_const_ref(const V &v)
-      : begin_(vect_const_begin(v)), end_(vect_const_end(v)),
-	origin(linalg_origin(v)),
-	size_(vect_size(v)) {}
-
-    reference operator[](size_type i) const
-    { return gmm::conj(linalg_traits<V>::access(origin, begin_, end_, i)); }
-  };
-
-  template <typename V> struct linalg_traits<conjugated_vector_const_ref<V> > {
-    typedef conjugated_vector_const_ref<V> this_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef linalg_const is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef value_type reference;
-    typedef abstract_null_type iterator;
-    typedef conjugated_const_iterator<typename
-                   linalg_traits<V>::const_iterator> const_iterator;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef typename linalg_traits<V>::index_sorted index_sorted;
-    static size_type size(const this_type &v) { return v.size_; }
-    static iterator begin(this_type &v) { return iterator(v.begin_); }
-    static const_iterator begin(const this_type &v)
-    { return const_iterator(v.begin_); }
-    static iterator end(this_type &v)
-    { return iterator(v.end_); }
-    static const_iterator end(const this_type &v)
-    { return const_iterator(v.end_); }
-    static value_type access(const origin_type *o, const const_iterator &it,
-			     const const_iterator &ite, size_type i)
-    { return gmm::conj(linalg_traits<V>::access(o, it.it, ite.it, i)); }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-  };
-
-  template<typename V> std::ostream &operator <<
-    (std::ostream &o, const conjugated_vector_const_ref<V>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ********************************************************************* */
-  /*		Conjugated references on matrices            		   */
-  /* ********************************************************************* */
-
-  template <typename M> struct conjugated_row_const_iterator {
-    typedef conjugated_row_const_iterator<M> iterator;
-    typedef typename linalg_traits<M>::const_row_iterator ITER;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-
-    ITER it;
-
-    iterator operator ++(int) { iterator tmp = *this; it++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; it--; return tmp; }
-    iterator &operator ++()   { it++; return *this; }
-    iterator &operator --()   { it--; return *this; }
-    iterator &operator +=(difference_type i) { it += i; return *this; }
-    iterator &operator -=(difference_type i) { it -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const
-    { return it - i.it; }
-
-    ITER operator *() const { return it; }
-    ITER operator [](int i) { return it + i; }
-
-    bool operator ==(const iterator &i) const { return (it == i.it); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (it < i.it); }
-
-    conjugated_row_const_iterator(void) {}
-    conjugated_row_const_iterator(const ITER &i) : it(i) { }
-
-  };
-
-  template <typename M> struct  conjugated_row_matrix_const_ref {
-    
-    typedef conjugated_row_matrix_const_ref<M> this_type;
-    typedef typename linalg_traits<M>::const_row_iterator iterator;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef typename linalg_traits<this_type>::origin_type origin_type;
-
-    iterator begin_, end_;
-    const origin_type *origin;
-    size_type nr, nc;
-
-    conjugated_row_matrix_const_ref(const M &m)
-      : begin_(mat_row_begin(m)), end_(mat_row_end(m)),
-	origin(linalg_origin(m)), nr(mat_ncols(m)), nc(mat_nrows(m)) {}
-
-    value_type operator()(size_type i, size_type j) const
-    { return gmm::conj(linalg_traits<M>::access(begin_+j, i)); }
-  };
-
-  template <typename M>
-  struct linalg_traits<conjugated_row_matrix_const_ref<M> > {
-    typedef conjugated_row_matrix_const_ref<M> this_type;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef value_type reference;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef typename linalg_traits<M>::const_sub_row_type vector_type;
-    typedef conjugated_vector_const_ref<vector_type> sub_col_type;
-    typedef conjugated_vector_const_ref<vector_type> const_sub_col_type;
-    typedef conjugated_row_const_iterator<M> col_iterator;
-    typedef conjugated_row_const_iterator<M> const_col_iterator;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_row_iterator;
-    typedef abstract_null_type row_iterator;
-    typedef col_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static inline size_type ncols(const this_type &m) { return m.nc; }
-    static inline size_type nrows(const this_type &m) { return m.nr; }
-    static inline const_sub_col_type col(const const_col_iterator &it)
-    { return conjugated(linalg_traits<M>::row(it.it)); }
-    static inline const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.begin_); }
-    static inline const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m.end_); }
-    static inline const origin_type* origin(const this_type &m)
-    { return m.origin; }
-    static value_type access(const const_col_iterator &it, size_type i)
-    { return gmm::conj(linalg_traits<M>::access(it.it, i)); }
-  };
-
-  template<typename M> std::ostream &operator <<
-  (std::ostream &o, const conjugated_row_matrix_const_ref<M>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template <typename M> struct conjugated_col_const_iterator {
-    typedef conjugated_col_const_iterator<M> iterator;
-    typedef typename linalg_traits<M>::const_col_iterator ITER;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-
-    ITER it;
-
-    iterator operator ++(int) { iterator tmp = *this; it++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; it--; return tmp; }
-    iterator &operator ++()   { it++; return *this; }
-    iterator &operator --()   { it--; return *this; }
-    iterator &operator +=(difference_type i) { it += i; return *this; }
-    iterator &operator -=(difference_type i) { it -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const
-    { return it - i.it; }
-
-    ITER operator *() const { return it; }
-    ITER operator [](int i) { return it + i; }
-
-    bool operator ==(const iterator &i) const { return (it == i.it); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (it < i.it); }
-
-    conjugated_col_const_iterator(void) {}
-    conjugated_col_const_iterator(const ITER &i) : it(i) { }
-
-  };
-
-  template <typename M> struct  conjugated_col_matrix_const_ref {
-    
-    typedef conjugated_col_matrix_const_ref<M> this_type;
-    typedef typename linalg_traits<M>::const_col_iterator iterator;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef typename linalg_traits<this_type>::origin_type origin_type;
-
-    iterator begin_, end_;
-    const origin_type *origin;
-    size_type nr, nc;
-
-    conjugated_col_matrix_const_ref(const M &m)
-      : begin_(mat_col_begin(m)), end_(mat_col_end(m)),
-	origin(linalg_origin(m)), nr(mat_ncols(m)), nc(mat_nrows(m)) {}
-
-    value_type operator()(size_type i, size_type j) const
-    { return gmm::conj(linalg_traits<M>::access(begin_+i, j)); }
-  };
-
-  template <typename M>
-  struct linalg_traits<conjugated_col_matrix_const_ref<M> > {
-    typedef conjugated_col_matrix_const_ref<M> this_type;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef value_type reference;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef typename linalg_traits<M>::const_sub_col_type vector_type;
-    typedef conjugated_vector_const_ref<vector_type> sub_row_type;
-    typedef conjugated_vector_const_ref<vector_type> const_sub_row_type;
-    typedef conjugated_col_const_iterator<M> row_iterator;
-    typedef conjugated_col_const_iterator<M> const_row_iterator;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_col_iterator;
-    typedef abstract_null_type col_iterator;
-    typedef row_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static inline size_type nrows(const this_type &m) { return m.nr; }
-    static inline size_type ncols(const this_type &m) { return m.nc; }
-    static inline const_sub_row_type row(const const_row_iterator &it)
-    { return conjugated(linalg_traits<M>::col(it.it)); }
-    static inline const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.begin_); }
-    static inline const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m.end_); }
-    static inline const origin_type* origin(const this_type &m)
-    { return m.origin; }
-    static value_type access(const const_row_iterator &it, size_type i)
-    { return gmm::conj(linalg_traits<M>::access(it.it, i)); }
-  };
-
-  template<typename M> std::ostream &operator <<
-  (std::ostream &o, const conjugated_col_matrix_const_ref<M>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template <typename L, typename SO> struct conjugated_return__ {
-    typedef conjugated_row_matrix_const_ref<L> return_type;
-  };
-  template <typename L> struct conjugated_return__<L, col_major> {
-    typedef conjugated_col_matrix_const_ref<L> return_type;
-  };
-  template <typename L, typename T, typename LT> struct conjugated_return_ {
-    typedef const L & return_type;
-  };
-  template <typename L, typename T>
-  struct conjugated_return_<L, std::complex<T>, abstract_vector> {
-    typedef conjugated_vector_const_ref<L> return_type;
-  };
-  template <typename L, typename T>
-  struct conjugated_return_<L, T, abstract_matrix> {
-    typedef typename conjugated_return__<L,
-    typename principal_orientation_type<typename
-    linalg_traits<L>::sub_orientation>::potype
-    >::return_type return_type;
-  };
-  template <typename L> struct conjugated_return {
-    typedef typename
-    conjugated_return_<L, typename linalg_traits<L>::value_type,
-		       typename linalg_traits<L>::linalg_type		       
-		       >::return_type return_type;
-  };
-
-  ///@endcond
-  /** return a conjugated view of the input matrix or vector. */
-  template <typename L> inline
-  typename conjugated_return<L>::return_type
-  conjugated(const L &v) {
-    return conjugated(v, typename linalg_traits<L>::value_type(),
-		      typename linalg_traits<L>::linalg_type());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  template <typename L, typename T, typename LT> inline
-  const L & conjugated(const L &v, T, LT) { return v; }
-
-  template <typename L, typename T> inline
-  conjugated_vector_const_ref<L> conjugated(const L &v, std::complex<T>,
-					    abstract_vector)
-  { return conjugated_vector_const_ref<L>(v); }
-
-  template <typename L, typename T> inline
-  typename conjugated_return__<L,
-    typename principal_orientation_type<typename
-    linalg_traits<L>::sub_orientation>::potype>::return_type
-  conjugated(const L &v, T, abstract_matrix) {
-    return conjugated(v, typename principal_orientation_type<typename
-		      linalg_traits<L>::sub_orientation>::potype());
-  }
-
-  template <typename L> inline
-  conjugated_row_matrix_const_ref<L> conjugated(const L &v, row_major)
-  { return conjugated_row_matrix_const_ref<L>(v); }
-
-  template <typename L> inline
-  conjugated_col_matrix_const_ref<L> conjugated(const L &v, col_major)
-  { return conjugated_col_matrix_const_ref<L>(v); }
-  
-  ///@endcond
-  
-
-}
-
-#endif //  GMM_CONJUGATED_H__
diff --git a/Contrib/gmm/gmm_def.h b/Contrib/gmm/gmm_def.h
deleted file mode 100755
index e71e33d..0000000
--- a/Contrib/gmm/gmm_def.h
+++ /dev/null
@@ -1,1117 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_def.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Basic definitions and tools of GMM.
-*/
-#ifndef GMM_DEF_H__
-#define GMM_DEF_H__
-
-#include "gmm_ref.h"
-#include <complex>
-
-#ifndef M_PI
-# define	M_E		2.7182818284590452354       /* e          */
-# define	M_LOG2E		1.4426950408889634074       /* 1/ln(2)    */
-# define	M_LOG10E	0.43429448190325182765      /* 1/ln(10)   */
-# define	M_LN2		0.69314718055994530942      /* ln(2)      */
-# define	M_LN10		2.30258509299404568402      /* ln(10)     */
-# define	M_PI		3.14159265358979323846      /* pi         */
-# define	M_PI_2		1.57079632679489661923      /* pi/2       */
-# define	M_PI_4		0.78539816339744830962      /* pi/4       */
-# define	M_1_PI		0.31830988618379067154      /* 1/pi       */
-# define	M_2_PI		0.63661977236758134308      /* 2/pi       */
-# define	M_2_SQRTPI	1.12837916709551257390      /* 2/sqrt(pi) */
-# define	M_SQRT2		1.41421356237309504880      /* sqrt(2)    */
-# define	M_SQRT1_2	0.70710678118654752440      /* sqrt(2)/2  */
-#endif 
-
-#ifndef M_PIl
-# define M_PIl       3.1415926535897932384626433832795029L  /* pi         */
-# define M_PI_2l     1.5707963267948966192313216916397514L  /* pi/2       */
-# define M_PI_4l     0.7853981633974483096156608458198757L  /* pi/4       */
-# define M_1_PIl     0.3183098861837906715377675267450287L  /* 1/pi       */
-# define M_2_PIl     0.6366197723675813430755350534900574L  /* 2/pi       */
-# define M_2_SQRTPIl 1.1283791670955125738961589031215452L  /* 2/sqrt(pi) */
-#endif
-
-namespace gmm {
-
-  typedef size_t size_type;
-
-  /* ******************************************************************** */
-  /*		Specifier types                             		  */
-  /* ******************************************************************** */
-  /* not perfectly null, required by aCC 3.33                             */
-  struct abstract_null_type { 
-    abstract_null_type(int=0) {}
-    template <typename A,typename B,typename C> void operator()(A,B,C) {}
-  }; // specify an information lake.
-
-  struct linalg_true {};
-  struct linalg_false {};
-
-  template <typename V, typename W> struct linalg_and
-  { typedef linalg_false bool_type; };
-  template <> struct linalg_and<linalg_true, linalg_true>
-  { typedef linalg_true bool_type; };
-  template <typename V, typename W> struct linalg_or
-  { typedef linalg_true bool_type; };
-  template <> struct linalg_and<linalg_false, linalg_false>
-  { typedef linalg_false bool_type; };
-
-  struct linalg_const {};       // A reference is either linalg_const,
-  struct linalg_modifiable {};  //  linalg_modifiable or linalg_false.
-
-  struct abstract_vector {};    // The object is a vector
-  struct abstract_matrix {};    // The object is a matrix
-  
-  struct abstract_sparse {};    // sparse matrix or vector
-  struct abstract_skyline {};   // 'sky-line' matrix or vector
-  struct abstract_dense {};     // dense matrix or vector
-  struct abstract_indirect {};  // matrix given by the product with a vector
-
-  struct row_major {};          // matrix with a row access.
-  struct col_major {};          // matrix with a column access
-  struct row_and_col {};        // both accesses but row preference
-  struct col_and_row {};        // both accesses but column preference
-
-  template <typename T> struct transposed_type;
-  template<> struct transposed_type<row_major>   {typedef col_major   t_type;};
-  template<> struct transposed_type<col_major>   {typedef row_major   t_type;};
-  template<> struct transposed_type<row_and_col> {typedef col_and_row t_type;};
-  template<> struct transposed_type<col_and_row> {typedef row_and_col t_type;};
-
-  template <typename T> struct principal_orientation_type
-  { typedef abstract_null_type potype; };
-  template<> struct principal_orientation_type<row_major>
-  { typedef row_major potype; };
-  template<> struct principal_orientation_type<col_major>
-  { typedef col_major potype; };
-  template<> struct principal_orientation_type<row_and_col>
-  { typedef row_major potype; };
-  template<> struct principal_orientation_type<col_and_row>
-  { typedef col_major potype; };
-
-  //  template <typename V> struct linalg_traits;
-  template <typename V> struct linalg_traits {    
-    typedef abstract_null_type this_type;
-    typedef abstract_null_type linalg_type;
-    typedef abstract_null_type value_type;
-    typedef abstract_null_type is_reference;
-    typedef abstract_null_type& reference;
-    typedef abstract_null_type* iterator;
-    typedef const abstract_null_type* const_iterator;
-    typedef abstract_null_type index_sorted;
-    typedef abstract_null_type storage_type;
-    typedef abstract_null_type origin_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_row_iterator;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_col_iterator;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type sub_orientation;    
-  };
-
-  template <typename PT, typename V> struct vect_ref_type;
-  template <typename P, typename V> struct vect_ref_type<P *, V> {
-    typedef typename linalg_traits<V>::reference access_type;
-    typedef typename linalg_traits<V>::iterator iterator;
-  };
-  template <typename P, typename V> struct vect_ref_type<const P *, V> {
-    typedef typename linalg_traits<V>::value_type access_type;
-    typedef typename linalg_traits<V>::const_iterator iterator;
-  };
-  
-  template <typename PT> struct const_pointer;
-  template <typename P> struct const_pointer<P *>
-  { typedef const P* pointer; };
-  template <typename P> struct const_pointer<const P *>
-  { typedef const P* pointer; };
-
-  template <typename PT> struct modifiable_pointer;
-  template <typename P> struct modifiable_pointer<P *>
-  { typedef P* pointer; };
-  template <typename P> struct modifiable_pointer<const P *>
-  { typedef P* pointer; };
-
-  template <typename R> struct const_reference;
-  template <typename R> struct const_reference<R &>
-  { typedef const R &reference; };
-  template <typename R> struct const_reference<const R &>
-  { typedef const R  &reference; };
-
-
-  inline bool is_sparse(abstract_sparse)   { return true;  }
-  inline bool is_sparse(abstract_dense)    { return false; }
-  inline bool is_sparse(abstract_skyline)  { return true;  }
-  inline bool is_sparse(abstract_indirect) { return false; }
-
-  template <typename L> inline bool is_sparse(const L &) 
-  { return is_sparse(typename linalg_traits<L>::storage_type()); }
-
-  inline bool is_row_matrix_(row_major)     { return true;  }
-  inline bool is_row_matrix_(col_major)     { return false; }
-  inline bool is_row_matrix_(row_and_col)   { return true;  }
-  inline bool is_row_matrix_(col_and_row)   { return true;  }
-
-  template <typename L> inline bool is_row_matrix(const L &) 
-  { return is_row_matrix_(typename linalg_traits<L>::sub_orientation()); }
-
-  inline bool is_col_matrix_(row_major)     { return false; }
-  inline bool is_col_matrix_(col_major)     { return true;  }
-  inline bool is_col_matrix_(row_and_col)   { return true;  }
-  inline bool is_col_matrix_(col_and_row)   { return true;  }
-
-  template <typename L> inline bool is_col_matrix(const L &) 
-  { return is_col_matrix_(typename linalg_traits<L>::sub_orientation()); }
-
-  inline bool is_col_matrix(row_major) { return false; }
-  inline bool is_col_matrix(col_major) { return true; }
-  inline bool is_row_matrix(row_major) { return true; }
-  inline bool is_row_matrix(col_major) { return false; }
-
-  template <typename L> inline bool is_const_reference(L) { return false; }
-  inline bool is_const_reference(linalg_const) { return true; }  
-
-
-  template <typename T> struct is_gmm_interfaced_ {
-    typedef linalg_true result;
-  };
-  
-  template<> struct is_gmm_interfaced_<abstract_null_type> {
-    typedef linalg_false result;
-  };
-  
-  template <typename T> struct is_gmm_interfaced {
-    typedef typename is_gmm_interfaced_<typename gmm::linalg_traits<T>::this_type >::result result;
-  };
-
-  /* ******************************************************************** */
-  /*  types to deal with const object representing a modifiable reference */
-  /* ******************************************************************** */
-  
-  template <typename PT, typename R> struct mref_type_ 
-  { typedef abstract_null_type return_type; };
-  template <typename L, typename R> struct mref_type_<L *, R>
-  { typedef L & return_type; };
-  template <typename L, typename R> struct mref_type_<const L *, R>
-  { typedef const L & return_type; };
-  template <typename L> struct mref_type_<L *, linalg_const>
-  { typedef const L & return_type; };
-  template <typename L> struct mref_type_<const L *, linalg_const>
-  { typedef const L & return_type; };
-  template <typename L> struct mref_type_<const L *, linalg_modifiable>
-  { typedef L & return_type; };
-  template <typename L> struct mref_type_<L *, linalg_modifiable>
-  { typedef L & return_type; };
-
-  template <typename PT> struct mref_type {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename mref_type_<PT, 
-      typename linalg_traits<L>::is_reference>::return_type return_type;
-  };
-
-  template <typename L> typename mref_type<const L *>::return_type 
-  linalg_cast(const L &l)
-  { return const_cast<typename mref_type<const L *>::return_type>(l); }
-
-  template <typename L> typename mref_type<L *>::return_type linalg_cast(L &l)
-  { return const_cast<typename mref_type<L *>::return_type>(l); }
-
-  template <typename L, typename R> struct cref_type_
-  { typedef abstract_null_type return_type; };
-  template <typename L> struct cref_type_<L, linalg_modifiable>
-  { typedef L & return_type; };
-  template <typename L> struct cref_type {
-    typedef typename cref_type_<L, 
-      typename linalg_traits<L>::is_reference>::return_type return_type;
-  };
-
-  template <typename L> typename cref_type<L>::return_type 
-  linalg_const_cast(const L &l)
-  { return const_cast<typename cref_type<L>::return_type>(l); }
-
-
-  // To be used to select between a reference or a const refercence for
-  // the return type of a function
-  // select_return<C1, C2, L *> return C1 if L is a const reference,
-  //                                   C2 otherwise.
-  // select_return<C1, C2, const L *> return C2 if L is a modifiable reference
-  //                                         C1 otherwise. 
-  template <typename C1, typename C2, typename REF> struct select_return_ {
-    typedef abstract_null_type return_type;
-  };
-  template <typename C1, typename C2, typename L>
-  struct select_return_<C1, C2, const L &> { typedef C1 return_type; };
-  template <typename C1, typename C2, typename L>
-  struct select_return_<C1, C2, L &> { typedef C2 return_type; };
-  template <typename C1, typename C2, typename PT> struct select_return {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_return_<C1, C2, 
-      typename mref_type<PT>::return_type>::return_type return_type;
-  };
-
-  
-  // To be used to select between a reference or a const refercence inside
-  // a structure or a linagl_traits
-  // select_ref<C1, C2, L *> return C1 if L is a const reference,
-  //                                C2 otherwise.
-  // select_ref<C1, C2, const L *> return C2 in any case. 
-  template <typename C1, typename C2, typename REF> struct select_ref_
-  { typedef abstract_null_type ref_type; };
-  template <typename C1, typename C2, typename L>
-  struct select_ref_<C1, C2, const L &> { typedef C1 ref_type; };
-  template <typename C1, typename C2, typename L>
-  struct select_ref_<C1, C2, L &> { typedef C2 ref_type; };
-  template <typename C1, typename C2, typename PT> struct select_ref {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_ref_<C1, C2, 
-      typename mref_type<PT>::return_type>::ref_type ref_type;
-  };
-  template <typename C1, typename C2, typename L>
-  struct select_ref<C1, C2, const L *>
-  { typedef C1 ref_type; };
-
-
-  template<typename R> struct is_a_reference_
-  { typedef linalg_true reference; };
-  template<> struct is_a_reference_<linalg_false>
-  { typedef linalg_false reference; };
-
-  template<typename L> struct is_a_reference {
-    typedef typename is_a_reference_<typename linalg_traits<L>::is_reference>
-      ::reference reference;
-  };
-
-
-  template <typename L> inline bool is_original_linalg(const L &) 
-  { return is_original_linalg(typename is_a_reference<L>::reference()); }
-  inline bool is_original_linalg(linalg_false) { return true; }
-  inline bool is_original_linalg(linalg_true) { return false; }
-
-
-  template <typename PT> struct which_reference 
-  { typedef abstract_null_type is_reference; };
-  template <typename PT> struct which_reference<PT *>
-  { typedef linalg_modifiable is_reference; };
-  template <typename PT> struct which_reference<const PT *>
-  { typedef linalg_const is_reference; };
-
-
-  template <typename C1, typename C2, typename R> struct select_orientation_
-  { typedef abstract_null_type return_type; };
-  template <typename C1, typename C2>
-  struct select_orientation_<C1, C2, row_major>
-  { typedef C1 return_type; };
-  template <typename C1, typename C2>
-  struct select_orientation_<C1, C2, col_major>
-  { typedef C2 return_type; };
-  template <typename C1, typename C2, typename L> struct select_orientation {
-    typedef typename select_orientation_<C1, C2,
-      typename principal_orientation_type<typename
-      linalg_traits<L>::sub_orientation>::potype>::return_type return_type;
-  };
-  
-  /* ******************************************************************** */
-  /*		Operations on scalars                         		  */
-  /* ******************************************************************** */
-
-  template <typename T> inline T sqr(T a) { return a * a; }
-  template <typename T> inline T abs(T a) { return (a < T(0)) ? T(-a) : a; }
-  template <typename T> inline T abs(std::complex<T> a)
-  { T x = a.real(), y = a.imag(); return ::sqrt(x*x+y*y); }
-  template <typename T> inline T abs_sqr(T a) { return a*a; }
-  template <typename T> inline T abs_sqr(std::complex<T> a)
-  { return gmm::sqr(a.real()) + gmm::sqr(a.imag()); }
-  template <typename T> inline T pos(T a) { return (a < T(0)) ? T(0) : a; }
-  template <typename T> inline T neg(T a) { return (a < T(0)) ? T(-a) : T(0); }
-  template <typename T> inline T sgn(T a) { return (a < T(0)) ? T(-1) : T(1); }
-  inline double random() { return double(rand())/(RAND_MAX+0.5); }
-  template <typename T> inline T random(T)
-  { return T(rand()*2.0)/(T(RAND_MAX)+T(1)/T(2)) - T(1); }
-  template <typename T> inline std::complex<T> random(std::complex<T>)
-  { return std::complex<T>(gmm::random(T()), gmm::random(T())); }
-  template <typename T> inline T irandom(T max)
-  { return T(gmm::random() * max); }
-  template <typename T> inline T conj(T a) { return a; }
-  template <typename T> inline std::complex<T> conj(std::complex<T> a)
-  { return std::conj(a); }
-  template <typename T> inline T real(T a) { return a; }
-  template <typename T> inline T real(std::complex<T> a) { return a.real(); }
-  template <typename T> inline T imag(T ) { return T(0); }
-  template <typename T> inline T imag(std::complex<T> a) { return a.imag(); }  
-  template <typename T> inline T sqrt(T a) { return ::sqrt(a); }
-  template <typename T> inline std::complex<T> sqrt(std::complex<T> a) {
-    T x = a.real(), y = a.imag();
-    if (x == T(0)) {
-      T t = ::sqrt(gmm::abs(y) / T(2));
-      return std::complex<T>(t, y < T(0) ? -t : t);
-    }
-    T t = ::sqrt(T(2) * (gmm::abs(a) + gmm::abs(x))), u = t / T(2);
-    return x > T(0) ? std::complex<T>(u, y / t)
-      : std::complex<T>(gmm::abs(y) / t, y < T(0) ? -u : u);
-  }
-  using std::swap;
-
-
-  template <typename T> struct number_traits {
-    typedef T magnitude_type;
-  };
- 
-  template <typename T> struct number_traits<std::complex<T> > {
-    typedef T magnitude_type;
-  };
-
-  template <typename T> inline T conj_product(T a, T b) { return a * b; }
-  template <typename T> inline
-  std::complex<T> conj_product(std::complex<T> a, std::complex<T> b)
-  { return std::conj(a) * b; } // to be optimized ?
-
-  template <typename T> inline bool is_complex(T) { return false; }
-  template <typename T> inline bool is_complex(std::complex<T> )
-  { return true; }
-
-# define magnitude_of_linalg(M) typename number_traits<typename \
-                    linalg_traits<M>::value_type>::magnitude_type
-  
-  template<typename T> inline std::complex<T> operator*(const std::complex<T>& a, int b) {
-    return a*T(b);
-  }
-  template<typename T> inline std::complex<T> operator*(int b, const std::complex<T>& a) {
-    return a*T(b);
-  }
-
-  /* ******************************************************************** */
-  /*  types promotion                                                     */
-  /* ******************************************************************** */
-
-  /* should be completed for more specific cases <unsigned int, float> etc */
-  template <typename T1, typename T2, bool c>
-  struct strongest_numeric_type_aux {
-    typedef T1 T;
-  };
-  template <typename T1, typename T2>
-  struct strongest_numeric_type_aux<T1,T2,false> {
-    typedef T2 T;
-  };
-
-  template <typename T1, typename T2>
-  struct strongest_numeric_type {
-    typedef typename
-    strongest_numeric_type_aux<T1,T2,(sizeof(T1)>sizeof(T2))>::T T;
-  };
-  template <typename T1, typename T2>
-  struct strongest_numeric_type<T1,std::complex<T2> > {
-    typedef typename number_traits<T1>::magnitude_type R1;
-    typedef std::complex<typename strongest_numeric_type<R1,T2>::T > T;
-  };
-  template <typename T1, typename T2>
-  struct strongest_numeric_type<std::complex<T1>,T2 > {
-    typedef typename number_traits<T2>::magnitude_type R2;
-    typedef std::complex<typename strongest_numeric_type<T1,R2>::T > T;
-  };
-  template <typename T1, typename T2> 
-  struct strongest_numeric_type<std::complex<T1>,std::complex<T2> > {
-    typedef std::complex<typename strongest_numeric_type<T1,T2>::T > T;
-  };
-
-  template<> struct strongest_numeric_type<int,float>   { typedef float T;  };
-  template<> struct strongest_numeric_type<float,int>   { typedef float T;  };
-  template<> struct strongest_numeric_type<long,float>  { typedef float T;  };
-  template<> struct strongest_numeric_type<float,long>  { typedef float T;  };
-  template<> struct strongest_numeric_type<long,double> { typedef double T; };
-  template<> struct strongest_numeric_type<double,long> { typedef double T; };
-
-  template <typename V1, typename V2>
-  struct strongest_value_type {
-    typedef typename
-    strongest_numeric_type<typename linalg_traits<V1>::value_type,
-			   typename linalg_traits<V2>::value_type>::T
-    value_type;
-  };
-  template <typename V1, typename V2, typename V3>
-  struct strongest_value_type3 {
-    typedef typename
-    strongest_value_type<V1, typename
-			 strongest_value_type<V2,V3>::value_type>::value_type
-    value_type;
-  };
-
-  
-
-  /* ******************************************************************** */
-  /*		Basic vectors used                         		  */
-  /* ******************************************************************** */
-  
-  template<typename T> struct dense_vector_type 
-  { typedef std::vector<T> vector_type; };
-
-  template <typename T> class wsvector;
-  template <typename T> class rsvector;
-  template<typename T> struct sparse_vector_type 
-  { typedef wsvector<T> vector_type; };
-
-  template <typename T> class slvector;
-  template <typename T> class dense_matrix;
-  template <typename VECT> class row_matrix;
-  template <typename VECT> class col_matrix;
-  
-
-  /* ******************************************************************** */
-  /*   Selects a temporary vector type                                    */
-  /*   V if V is a valid vector type,                                     */
-  /*   wsvector if V is a reference on a sparse vector,                   */
-  /*   std::vector if V is a reference on a dense vector.                 */
-  /* ******************************************************************** */
-
-  
-  template <typename R, typename S, typename L, typename V>
-  struct temporary_vector_ {
-    typedef abstract_null_type vector_type;
-  };
-  template <typename V, typename L>
-  struct temporary_vector_<linalg_true, abstract_sparse, L, V>
-  { typedef wsvector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V, typename L>
-  struct temporary_vector_<linalg_true, abstract_skyline, L, V>
-  { typedef slvector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V, typename L>
-  struct temporary_vector_<linalg_true, abstract_dense, L, V>
-  { typedef std::vector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename S, typename V>
-  struct temporary_vector_<linalg_false, S, abstract_vector, V>
-  { typedef V vector_type; };
-  template <typename V>
-  struct temporary_vector_<linalg_false, abstract_dense, abstract_matrix, V>
-  { typedef std::vector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_vector_<linalg_false, abstract_sparse, abstract_matrix, V>
-  { typedef wsvector<typename linalg_traits<V>::value_type> vector_type; };
-
-  template <typename V> struct temporary_vector {
-    typedef typename temporary_vector_<typename is_a_reference<V>::reference,
-				       typename linalg_traits<V>::storage_type,
-				       typename linalg_traits<V>::linalg_type,
-				       V>::vector_type vector_type;
-  };
-
-  /* ******************************************************************** */
-  /*   Selects a temporary matrix type                                    */
-  /*   M if M is a valid matrix type,                                     */
-  /*   row_matrix<wsvector> if M is a reference on a sparse matrix,       */
-  /*   dense_matrix if M is a reference on a dense matrix.                */
-  /* ******************************************************************** */
-
-  
-  template <typename R, typename S, typename L, typename V>
-  struct temporary_matrix_ { typedef abstract_null_type matrix_type; };
-  template <typename V, typename L>
-  struct temporary_matrix_<linalg_true, abstract_sparse, L, V> {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef row_matrix<wsvector<T> > matrix_type;
-  };
-  template <typename V, typename L>
-  struct temporary_matrix_<linalg_true, abstract_skyline, L, V> {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef row_matrix<slvector<T> > matrix_type;
-  };
-  template <typename V, typename L>
-  struct temporary_matrix_<linalg_true, abstract_dense, L, V>
-  { typedef dense_matrix<typename linalg_traits<V>::value_type> matrix_type; };
-  template <typename S, typename V>
-  struct temporary_matrix_<linalg_false, S, abstract_matrix, V>
-  { typedef V matrix_type; };
-
-  template <typename V> struct temporary_matrix {
-    typedef typename temporary_matrix_<typename is_a_reference<V>::reference,
-				       typename linalg_traits<V>::storage_type,
-				       typename linalg_traits<V>::linalg_type,
-				       V>::matrix_type matrix_type;
-  };
-
-  
-  template <typename S, typename L, typename V>
-  struct temporary_col_matrix_ { typedef abstract_null_type matrix_type; };
-  template <typename V, typename L>
-  struct temporary_col_matrix_<abstract_sparse, L, V> {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef col_matrix<wsvector<T> > matrix_type;
-  };
-  template <typename V, typename L>
-  struct temporary_col_matrix_<abstract_skyline, L, V> {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef col_matrix<slvector<T> > matrix_type;
-  };
-  template <typename V, typename L>
-  struct temporary_col_matrix_<abstract_dense, L, V>
-  { typedef dense_matrix<typename linalg_traits<V>::value_type> matrix_type; };
-
-  template <typename V> struct temporary_col_matrix {
-    typedef typename temporary_col_matrix_<
-      typename linalg_traits<V>::storage_type,
-      typename linalg_traits<V>::linalg_type,
-      V>::matrix_type matrix_type;
-  };
-
-
-
-
-  template <typename S, typename L, typename V>
-  struct temporary_row_matrix_ { typedef abstract_null_type matrix_type; };
-  template <typename V, typename L>
-  struct temporary_row_matrix_<abstract_sparse, L, V> {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef row_matrix<wsvector<T> > matrix_type;
-  };
-  template <typename V, typename L>
-  struct temporary_row_matrix_<abstract_skyline, L, V> {
-    typedef typename linalg_traits<V>::value_type T;
-    typedef row_matrix<slvector<T> > matrix_type;
-  };
-  template <typename V, typename L>
-  struct temporary_row_matrix_<abstract_dense, L, V>
-  { typedef dense_matrix<typename linalg_traits<V>::value_type> matrix_type; };
-
-  template <typename V> struct temporary_row_matrix {
-    typedef typename temporary_row_matrix_<
-      typename linalg_traits<V>::storage_type,
-      typename linalg_traits<V>::linalg_type,
-      V>::matrix_type matrix_type;
-  };
-
-
-
-  /* ******************************************************************** */
-  /*   Selects a temporary dense vector type                              */
-  /*   V if V is a valid dense vector type,                               */
-  /*   std::vector if V is a reference or another type of vector          */
-  /* ******************************************************************** */
-
-  template <typename R, typename S, typename V>
-  struct temporary_dense_vector_ { typedef abstract_null_type vector_type; };
-  template <typename S, typename V>
-  struct temporary_dense_vector_<linalg_true, S, V>
-  { typedef std::vector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_dense_vector_<linalg_false, abstract_sparse, V>
-  { typedef std::vector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_dense_vector_<linalg_false, abstract_skyline, V>
-  { typedef std::vector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_dense_vector_<linalg_false, abstract_dense, V>
-  { typedef V vector_type; };
-
-  template <typename V> struct temporary_dense_vector {
-    typedef typename temporary_dense_vector_<typename
-    is_a_reference<V>::reference,
-    typename linalg_traits<V>::storage_type, V>::vector_type vector_type;
-  };
-
-  /* ******************************************************************** */
-  /*   Selects a temporary sparse vector type                             */
-  /*   V if V is a valid sparse vector type,                              */
-  /*   wsvector if V is a reference or another type of vector             */
-  /* ******************************************************************** */
-
-  template <typename R, typename S, typename V>
-  struct temporary_sparse_vector_ { typedef abstract_null_type vector_type; };
-  template <typename S, typename V>
-  struct temporary_sparse_vector_<linalg_true, S, V>
-  { typedef wsvector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_sparse_vector_<linalg_false, abstract_sparse, V>
-  { typedef V vector_type; };
-  template <typename V>
-  struct temporary_sparse_vector_<linalg_false, abstract_dense, V>
-  { typedef wsvector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_sparse_vector_<linalg_false, abstract_skyline, V>
-  { typedef wsvector<typename linalg_traits<V>::value_type> vector_type; };
-
-  template <typename V> struct temporary_sparse_vector {
-    typedef typename temporary_sparse_vector_<typename
-    is_a_reference<V>::reference,
-    typename linalg_traits<V>::storage_type, V>::vector_type vector_type;
-  };
-
-  /* ******************************************************************** */
-  /*   Selects a temporary sky-line vector type                           */
-  /*   V if V is a valid sky-line vector type,                            */
-  /*   slvector if V is a reference or another type of vector             */
-  /* ******************************************************************** */
-
-  template <typename R, typename S, typename V>
-  struct temporary_skyline_vector_
-  { typedef abstract_null_type vector_type; };
-  template <typename S, typename V>
-  struct temporary_skyline_vector_<linalg_true, S, V>
-  { typedef slvector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_skyline_vector_<linalg_false, abstract_skyline, V>
-  { typedef V vector_type; };
-  template <typename V>
-  struct temporary_skyline_vector_<linalg_false, abstract_dense, V>
-  { typedef slvector<typename linalg_traits<V>::value_type> vector_type; };
-  template <typename V>
-  struct temporary_skyline_vector_<linalg_false, abstract_sparse, V>
-  { typedef slvector<typename linalg_traits<V>::value_type> vector_type; };
-
-  template <typename V> struct temporary_skylines_vector {
-    typedef typename temporary_skyline_vector_<typename
-    is_a_reference<V>::reference,
-    typename linalg_traits<V>::storage_type, V>::vector_type vector_type;
-  };
-
-  /* ********************************************************************* */
-  /*  Definition & Comparison of origins.                                  */
-  /* ********************************************************************* */
-
-  template <typename L> 
-  typename select_return<const typename linalg_traits<L>::origin_type *,
-			 typename linalg_traits<L>::origin_type *,
-			 L *>::return_type
-  linalg_origin(L &l)
-  { return linalg_traits<L>::origin(linalg_cast(l)); }
-
-  template <typename L> 
-  typename select_return<const typename linalg_traits<L>::origin_type *,
-			 typename linalg_traits<L>::origin_type *,
-			 const L *>::return_type
-  linalg_origin(const L &l)
-  { return linalg_traits<L>::origin(linalg_cast(l)); }
-
-  template <typename PT1, typename PT2>
-  bool same_porigin(PT1, PT2) { return false; }
-
-  template <typename PT>
-  bool same_porigin(PT pt1, PT pt2) { return (pt1 == pt2); }
-
-  template <typename L1, typename L2>
-  bool same_origin(const L1 &l1, const L2 &l2)
-  { return same_porigin(linalg_origin(l1), linalg_origin(l2)); }
-
-
-  /* ******************************************************************** */
-  /*		Miscellaneous                           		  */
-  /* ******************************************************************** */
-
-  template <typename V> inline size_type vect_size(const V &v)
-  { return linalg_traits<V>::size(v); }
-
-  template <typename MAT> inline size_type mat_nrows(const MAT &m)
-  { return linalg_traits<MAT>::nrows(m); }
-
-  template <typename MAT> inline size_type mat_ncols(const MAT &m)
-  { return linalg_traits<MAT>::ncols(m); }
-
-
-  template <typename V> inline
-  typename select_return<typename linalg_traits<V>::const_iterator,
-           typename linalg_traits<V>::iterator, V *>::return_type
-  vect_begin(V &v)
-  { return linalg_traits<V>::begin(linalg_cast(v)); }
-
-  template <typename V> inline
-  typename select_return<typename linalg_traits<V>::const_iterator,
-	   typename linalg_traits<V>::iterator, const V *>::return_type
-  vect_begin(const V &v)
-  { return linalg_traits<V>::begin(linalg_cast(v)); }
-
-  template <typename V> inline
-  typename linalg_traits<V>::const_iterator
-  vect_const_begin(const V &v)
-  { return linalg_traits<V>::begin(v); }
-
-  template <typename V> inline
-  typename select_return<typename linalg_traits<V>::const_iterator,
-    typename linalg_traits<V>::iterator, V *>::return_type
-  vect_end(V &v)
-  { return linalg_traits<V>::end(linalg_cast(v)); }
-
-  template <typename V> inline
-  typename select_return<typename linalg_traits<V>::const_iterator,
-    typename linalg_traits<V>::iterator, const V *>::return_type
-  vect_end(const V &v)
-  { return linalg_traits<V>::end(linalg_cast(v)); }
-
-  template <typename V> inline
-  typename linalg_traits<V>::const_iterator
-  vect_const_end(const V &v)
-  { return linalg_traits<V>::end(v); }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_row_iterator,
-    typename linalg_traits<M>::row_iterator, M *>::return_type
-  mat_row_begin(M &m) { return linalg_traits<M>::row_begin(linalg_cast(m)); }
-  
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_row_iterator,
-    typename linalg_traits<M>::row_iterator, const M *>::return_type
-  mat_row_begin(const M &m)
-  { return linalg_traits<M>::row_begin(linalg_cast(m)); }
-  
-  template <typename M> inline typename linalg_traits<M>::const_row_iterator
-  mat_row_const_begin(const M &m)
-  { return linalg_traits<M>::row_begin(m); }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_row_iterator,
-    typename linalg_traits<M>::row_iterator, M *>::return_type
-  mat_row_end(M &v) {
-    return linalg_traits<M>::row_end(linalg_cast(v));
-  }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_row_iterator,
-    typename linalg_traits<M>::row_iterator, const M *>::return_type
-  mat_row_end(const M &v) {
-    return linalg_traits<M>::row_end(linalg_cast(v));
-  }
-
-  template <typename M> inline
-  typename linalg_traits<M>::const_row_iterator
-  mat_row_const_end(const M &v)
-  { return linalg_traits<M>::row_end(v); }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_col_iterator,
-    typename linalg_traits<M>::col_iterator, M *>::return_type
-  mat_col_begin(M &v) {
-    return linalg_traits<M>::col_begin(linalg_cast(v));
-  }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_col_iterator,
-    typename linalg_traits<M>::col_iterator, const M *>::return_type
-  mat_col_begin(const M &v) {
-    return linalg_traits<M>::col_begin(linalg_cast(v));
-  }
-
-  template <typename M> inline
-  typename linalg_traits<M>::const_col_iterator
-  mat_col_const_begin(const M &v)
-  { return linalg_traits<M>::col_begin(v); }
-
-  template <typename M> inline
-  typename linalg_traits<M>::const_col_iterator
-  mat_col_const_end(const M &v)
-  { return linalg_traits<M>::col_end(v); }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_col_iterator,
-                         typename linalg_traits<M>::col_iterator,
-                         M *>::return_type
-  mat_col_end(M &m)
-  { return linalg_traits<M>::col_end(linalg_cast(m)); }
-
-  template <typename M> inline
-  typename select_return<typename linalg_traits<M>::const_col_iterator,
-                         typename linalg_traits<M>::col_iterator,
-                         const M *>::return_type
-  mat_col_end(const M &m)
-  { return linalg_traits<M>::col_end(linalg_cast(m)); }
-
-  template <typename MAT> inline
-  typename select_return<typename linalg_traits<MAT>::const_sub_row_type,
-                         typename linalg_traits<MAT>::sub_row_type,
-                         const MAT *>::return_type
-  mat_row(const MAT &m, size_type i)
-  { return linalg_traits<MAT>::row(mat_row_begin(m) + i); }
-
-  template <typename MAT> inline
-  typename select_return<typename linalg_traits<MAT>::const_sub_row_type,
-                         typename linalg_traits<MAT>::sub_row_type,
-                         MAT *>::return_type
-  mat_row(MAT &m, size_type i)
-  { return linalg_traits<MAT>::row(mat_row_begin(m) + i); }
-
-  template <typename MAT> inline
-  typename linalg_traits<MAT>::const_sub_row_type
-  mat_const_row(const MAT &m, size_type i)
-  { return linalg_traits<MAT>::row(mat_row_const_begin(m) + i); }
-
-  template <typename MAT> inline
-  typename select_return<typename linalg_traits<MAT>::const_sub_col_type,
-                         typename linalg_traits<MAT>::sub_col_type,
-                         const MAT *>::return_type
-  mat_col(const MAT &m, size_type i)
-  { return linalg_traits<MAT>::col(mat_col_begin(m) + i); }
-
-
-  template <typename MAT> inline
-  typename select_return<typename linalg_traits<MAT>::const_sub_col_type,
-                         typename linalg_traits<MAT>::sub_col_type,
-                         MAT *>::return_type
-  mat_col(MAT &m, size_type i)
-  { return linalg_traits<MAT>::col(mat_col_begin(m) + i); }
-  
-  template <typename MAT> inline
-  typename linalg_traits<MAT>::const_sub_col_type
-  mat_const_col(const MAT &m, size_type i)
-  { return linalg_traits<MAT>::col(mat_col_const_begin(m) + i); }
-  
-  /* ********************************************************************* */
-  /* Set to begin end set to end for iterators on non-const sparse vectors.*/
-  /* ********************************************************************* */
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_begin(IT &it, ORG o, VECT *, linalg_false)
-  { it = vect_begin(*o); }
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_begin(IT &it, ORG o, const VECT *, linalg_false) 
-  { it = vect_const_begin(*o); }
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_end(IT &it, ORG o, VECT *, linalg_false)
-  { it = vect_end(*o); }
-  
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_end(IT &it, ORG o, const VECT *, linalg_false)
-  { it = vect_const_end(*o); }
-
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_begin(IT &, ORG, VECT *, linalg_const) { }
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_begin(IT &, ORG, const VECT *, linalg_const) { }
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_end(IT &, ORG, VECT *, linalg_const) { }
-  
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_end(IT &, ORG, const VECT *, linalg_const) { }
-
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_begin(IT &, ORG, VECT *v, linalg_modifiable)
-  { GMM_ASSERT3(!is_sparse(*v), "internal_error"); v = 0; }
-
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_begin(IT &, ORG, const VECT *v, linalg_modifiable)
-  { GMM_ASSERT3(!is_sparse(*v), "internal_error"); v = 0; }
- 
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_end(IT &, ORG, VECT *v, linalg_modifiable)
-  { GMM_ASSERT3(!is_sparse(*v), "internal_error"); v = 0; }
-  
-  template <typename IT, typename ORG, typename VECT> inline
-  void set_to_end(IT &, ORG, const VECT *v, linalg_modifiable)
-  { GMM_ASSERT3(!is_sparse(*v), "internal_error"); v = 0; }
-
-  /* ******************************************************************** */
-  /*		General index for certain algorithms.         		  */
-  /* ******************************************************************** */
-
-  template<class IT> 
-  size_type index_of_it(const IT &it, size_type, abstract_sparse)
-  { return it.index(); }
-  template<class IT> 
-  size_type index_of_it(const IT &it, size_type, abstract_skyline)
-  { return it.index(); }
-  template<class IT> 
-  size_type index_of_it(const IT &, size_type k, abstract_dense)
-  { return k; }
-
-  /* ********************************************************************* */
-  /* Numeric limits.                                                       */
-  /* ********************************************************************* */
-  
-  template<typename T> inline T default_tol(T) {
-    using namespace std;
-    static T tol(10);
-    if (tol == T(10)) {
-      if (numeric_limits<T>::is_specialized)
-	tol = numeric_limits<T>::epsilon();
-      else {
-	int i=sizeof(T)/4; while(i-- > 0) tol*=T(1E-8); 
-	GMM_WARNING1("The numeric type " << typeid(T).name()
-		    << " has no numeric_limits defined !!\n"
-		    << "Taking " << tol << " as default tolerance");
-      }
-    }
-    return tol;
-  }
-  template<typename T> inline T default_tol(std::complex<T>)
-  { return default_tol(T()); }
-
-  template<typename T> inline T default_min(T) {
-    using namespace std;
-    static T mi(10);
-    if (mi == T(10)) {
-      if (numeric_limits<T>::is_specialized)
-	mi = std::numeric_limits<T>::min();
-      else {
-	mi = T(0);
-	GMM_WARNING1("The numeric type " << typeid(T).name()
-		    << " has no numeric_limits defined !!\n"
-		    << "Taking 0 as default minimum");
-      }
-    }
-    return mi;
-  }
-  template<typename T> inline T default_min(std::complex<T>)
-  { return default_min(T()); }
-
-  template<typename T> inline T default_max(T) {
-    using namespace std;
-    static T mi(10);
-    if (mi == T(10)) {
-      if (numeric_limits<T>::is_specialized)
-	mi = std::numeric_limits<T>::max();
-      else {
-	mi = T(1);
-	GMM_WARNING1("The numeric type " << typeid(T).name()
-		    << " has no numeric_limits defined !!\n"
-		    << "Taking 1 as default maximum !");
-      }
-    }
-    return mi;
-  }
-  template<typename T> inline T default_max(std::complex<T>)
-  { return default_max(T()); }
-
-  
-  /*
-    use safe_divide to avoid NaNs when dividing very small complex
-    numbers, for example
-    std::complex<float>(1e-23,1e-30)/std::complex<float>(1e-23,1e-30)
-  */
-  template<typename T> inline T safe_divide(T a, T b) { return a/b; }
-  template<typename T> inline std::complex<T>
-  safe_divide(std::complex<T> a, std::complex<T> b) {
-    T m = std::max(gmm::abs(b.real()), gmm::abs(b.imag()));
-    a = std::complex<T>(a.real()/m, a.imag()/m);
-    b = std::complex<T>(b.real()/m, b.imag()/m);
-    return a / b;
-  }
-
-
-  /* ******************************************************************** */
-  /*		Write                                   		  */
-  /* ******************************************************************** */
-
-  template <typename T> struct cast_char_type { typedef T return_type; };
-  template <> struct cast_char_type<signed char> { typedef int return_type; };
-  template <> struct cast_char_type<unsigned char>
-  { typedef unsigned int return_type; };
-  template <typename T> inline typename cast_char_type<T>::return_type
-  cast_char(const T &c) { return typename cast_char_type<T>::return_type(c); }
-
-
-  template <typename L> inline void write(std::ostream &o, const L &l)
-  { write(o, l, typename linalg_traits<L>::linalg_type()); }
-
-  template <typename L> void write(std::ostream &o, const L &l,
-				       abstract_vector) {
-    o << "vector(" << vect_size(l) << ") [";
-    write(o, l, typename linalg_traits<L>::storage_type());
-    o << " ]";
-  }
-
-  template <typename L> void write(std::ostream &o, const L &l,
-				       abstract_sparse) {
-    typename linalg_traits<L>::const_iterator it = vect_const_begin(l),
-      ite = vect_const_end(l);
-    for (; it != ite; ++it) 
-      o << " (r" << it.index() << "," << cast_char(*it) << ")";
-  }
-
-  template <typename L> void write(std::ostream &o, const L &l,
-				       abstract_dense) {
-    typename linalg_traits<L>::const_iterator it = vect_const_begin(l),
-      ite = vect_const_end(l);
-    if (it != ite) o << " " << cast_char(*it++);
-    for (; it != ite; ++it) o << ", " << cast_char(*it);
-  }
-
-  template <typename L> void write(std::ostream &o, const L &l,
-				       abstract_skyline) {
-    typedef typename linalg_traits<L>::const_iterator const_iterator;
-    const_iterator it = vect_const_begin(l), ite = vect_const_end(l);
-    if (it != ite) {
-      o << "<r+" << it.index() << ">";
-      if (it != ite) o << " " << cast_char(*it++);
-      for (; it != ite; ++it) { o << ", " << cast_char(*it); }
-    }
-  }
-
-  template <typename L> inline void write(std::ostream &o, const L &l,
-				       abstract_matrix) {
-    write(o, l, typename linalg_traits<L>::sub_orientation());
-  }
-
-
-  template <typename L> void write(std::ostream &o, const L &l,
-				       row_major) {
-    o << "matrix(" << mat_nrows(l) << ", " << mat_ncols(l) << ")" << endl;
-    for (size_type i = 0; i < mat_nrows(l); ++i) {
-      o << "(";
-      write(o, mat_const_row(l, i), typename linalg_traits<L>::storage_type());
-      o << " )\n";
-    }
-  }
-
-  template <typename L> inline
-  void write(std::ostream &o, const L &l, row_and_col) 
-  { write(o, l, row_major()); }
-
-  template <typename L> inline
-  void write(std::ostream &o, const L &l, col_and_row)
-  { write(o, l, row_major()); }
-
-  template <typename L> void write(std::ostream &o, const L &l, col_major) {
-    o << "matrix(" << mat_nrows(l) << ", " << mat_ncols(l) << ")" << endl;
-    for (size_type i = 0; i < mat_nrows(l); ++i) {
-      o << "(";
-      if (is_sparse(l)) { // not optimized ...
-	for (size_type j = 0; j < mat_ncols(l); ++j)
-	  if (l(i,j) != typename linalg_traits<L>::value_type(0)) 
-	    o << " (r" << j << ", " << l(i,j) << ")";
-      }
-      else {
-	if (mat_ncols(l) != 0) o << ' ' << l(i, 0);
-	for (size_type j = 1; j < mat_ncols(l); ++j) o << ", " << l(i, j); 
-      }
-      o << " )\n";
-    }
-  }
-
-}
-
-#endif //  GMM_DEF_H__
diff --git a/Contrib/gmm/gmm_dense_Householder.h b/Contrib/gmm/gmm_dense_Householder.h
deleted file mode 100755
index 9e34c1a..0000000
--- a/Contrib/gmm/gmm_dense_Householder.h
+++ /dev/null
@@ -1,316 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_dense_Householder.h
-   @author Caroline Lecalvez <Caroline.Lecalvez at gmm.insa-toulouse.fr>
-   @author Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date June 5, 2003.
-   @brief Householder for dense matrices.
-*/
-
-#ifndef GMM_DENSE_HOUSEHOLDER_H
-#define GMM_DENSE_HOUSEHOLDER_H
-
-#include "gmm_kernel.h"
-
-namespace gmm {
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  /* ********************************************************************* */
-  /*    Rank one update  (complex and real version)                        */
-  /* ********************************************************************* */
-
-  template <typename Matrix, typename VecX, typename VecY>
-  inline void rank_one_update(Matrix &A, const VecX& x,
-			      const VecY& y, row_major) {
-    typedef typename linalg_traits<Matrix>::value_type T;
-    size_type N = mat_nrows(A);
-    GMM_ASSERT2(N <= vect_size(x) && mat_ncols(A) <= vect_size(y),
-	       "dimensions mismatch");
-    typename linalg_traits<VecX>::const_iterator itx = vect_const_begin(x);
-    for (size_type i = 0; i < N; ++i, ++itx) {
-      typedef typename linalg_traits<Matrix>::sub_row_type row_type;
-      row_type row = mat_row(A, i);
-      typename linalg_traits<row_type>::iterator
-	it = vect_begin(row), ite = vect_end(row);
-      typename linalg_traits<VecY>::const_iterator ity = vect_const_begin(y);
-      T tx = *itx;
-      for (; it != ite; ++it, ++ity) *it += conj_product(*ity, tx);
-    }
-  }
-
-  template <typename Matrix, typename VecX, typename VecY>
-  inline void rank_one_update(Matrix &A, const VecX& x,
-			      const VecY& y, col_major) {
-    typedef typename linalg_traits<Matrix>::value_type T;
-    size_type M = mat_ncols(A);
-    GMM_ASSERT2(mat_nrows(A) <= vect_size(x) && M <= vect_size(y),
-		"dimensions mismatch");
-    typename linalg_traits<VecY>::const_iterator ity = vect_const_begin(y);
-    for (size_type i = 0; i < M; ++i, ++ity) {
-      typedef typename linalg_traits<Matrix>::sub_col_type col_type;
-      col_type col = mat_col(A, i);
-      typename linalg_traits<col_type>::iterator
-	it = vect_begin(col), ite = vect_end(col);
-      typename linalg_traits<VecX>::const_iterator itx = vect_const_begin(x);
-      T ty = *ity;
-      for (; it != ite; ++it, ++itx) *it += conj_product(ty, *itx);
-    }
-  }
-  
-  ///@endcond
-  template <typename Matrix, typename VecX, typename VecY>
-  inline void rank_one_update(const Matrix &AA, const VecX& x,
-			      const VecY& y) {
-    Matrix& A = const_cast<Matrix&>(AA);
-    rank_one_update(A, x, y, typename principal_orientation_type<typename
-		    linalg_traits<Matrix>::sub_orientation>::potype());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  /* ********************************************************************* */
-  /*    Rank two update  (complex and real version)                        */
-  /* ********************************************************************* */
-
-  template <typename Matrix, typename VecX, typename VecY>
-  inline void rank_two_update(Matrix &A, const VecX& x,
-			      const VecY& y, row_major) {
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    size_type N = mat_nrows(A);
-    GMM_ASSERT2(N <= vect_size(x) && mat_ncols(A) <= vect_size(y),
-		"dimensions mismatch");
-    typename linalg_traits<VecX>::const_iterator itx1 = vect_const_begin(x);
-    typename linalg_traits<VecY>::const_iterator ity2 = vect_const_begin(y);
-    for (size_type i = 0; i < N; ++i, ++itx1, ++ity2) {
-      typedef typename linalg_traits<Matrix>::sub_row_type row_type;
-      row_type row = mat_row(A, i);
-      typename linalg_traits<row_type>::iterator
-	it = vect_begin(row), ite = vect_end(row);
-      typename linalg_traits<VecX>::const_iterator itx2 = vect_const_begin(x);
-      typename linalg_traits<VecY>::const_iterator ity1 = vect_const_begin(y);
-      value_type tx = *itx1, ty = *ity2;
-      for (; it != ite; ++it, ++ity1, ++itx2)
-	*it += conj_product(*ity1, tx) + conj_product(*itx2, ty);
-    }
-  }
-
-  template <typename Matrix, typename VecX, typename VecY>
-  inline void rank_two_update(Matrix &A, const VecX& x,
-			      const VecY& y, col_major) {
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    size_type M = mat_ncols(A);
-    GMM_ASSERT2(mat_nrows(A) <= vect_size(x) && M <= vect_size(y),
-		"dimensions mismatch");
-    typename linalg_traits<VecX>::const_iterator itx2 = vect_const_begin(x);
-    typename linalg_traits<VecY>::const_iterator ity1 = vect_const_begin(y);
-    for (size_type i = 0; i < M; ++i, ++ity1, ++itx2) {
-      typedef typename linalg_traits<Matrix>::sub_col_type col_type;
-      col_type col = mat_col(A, i);
-      typename linalg_traits<col_type>::iterator
-	it = vect_begin(col), ite = vect_end(col);
-      typename linalg_traits<VecX>::const_iterator itx1 = vect_const_begin(x);
-      typename linalg_traits<VecY>::const_iterator ity2 = vect_const_begin(y);
-      value_type ty = *ity1, tx = *itx2;
-      for (; it != ite; ++it, ++itx1, ++ity2)
-	*it += conj_product(ty, *itx1) + conj_product(tx, *ity2); 
-    }
-  }
-  
-  ///@endcond
-  template <typename Matrix, typename VecX, typename VecY>
-  inline void rank_two_update(const Matrix &AA, const VecX& x,
-			      const VecY& y) {
-    Matrix& A = const_cast<Matrix&>(AA);
-    rank_two_update(A, x, y, typename principal_orientation_type<typename
-		    linalg_traits<Matrix>::sub_orientation>::potype());
-  }
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-
-  /* ********************************************************************* */
-  /*    Householder vector computation (complex and real version)          */
-  /* ********************************************************************* */
-
-  template <typename VECT> void house_vector(const VECT &VV) {
-    VECT &V = const_cast<VECT &>(VV);
-    typedef typename linalg_traits<VECT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    
-    R mu = vect_norm2(V), abs_v0 = gmm::abs(V[0]);
-    if (mu != R(0))
-      gmm::scale(V, (abs_v0 == R(0)) ? T(R(1) / mu)
-		 : (safe_divide(T(abs_v0), V[0]) / (abs_v0 + mu)));
-    if (gmm::real(V[vect_size(V)-1]) * R(0) != R(0)) gmm::clear(V);
-    V[0] = T(1);
-  }
-
-  template <typename VECT> void house_vector_last(const VECT &VV) {
-    VECT &V = const_cast<VECT &>(VV);
-    typedef typename linalg_traits<VECT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type m = vect_size(V);
-    R mu = vect_norm2(V), abs_v0 = gmm::abs(V[m-1]);
-    if (mu != R(0))
-      gmm::scale(V, (abs_v0 == R(0)) ? T(R(1) / mu)
-		 : ((abs_v0 / V[m-1]) / (abs_v0 + mu)));
-    if (gmm::real(V[0]) * R(0) != R(0)) gmm::clear(V);
-    V[m-1] = T(1);
-  }
-  
-  /* ********************************************************************* */
-  /*    Householder updates  (complex and real version)                    */
-  /* ********************************************************************* */
-
-  // multiply A to the left by the reflector stored in V. W is a temporary.
-  template <typename MAT, typename VECT1, typename VECT2> inline
-    void row_house_update(const MAT &AA, const VECT1 &V, const VECT2 &WW) {
-    VECT2 &W = const_cast<VECT2 &>(WW); MAT &A = const_cast<MAT &>(AA);
-    typedef typename linalg_traits<MAT>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type magnitude_type;
-
-    gmm::mult(conjugated(A),
-	      scaled(V, value_type(magnitude_type(-2)/vect_norm2_sqr(V))), W);
-    rank_one_update(A, V, W);
-  }
-
-  // multiply A to the right by the reflector stored in V. W is a temporary.
-  template <typename MAT, typename VECT1, typename VECT2> inline
-    void col_house_update(const MAT &AA, const VECT1 &V, const VECT2 &WW) {
-    VECT2 &W = const_cast<VECT2 &>(WW); MAT &A = const_cast<MAT &>(AA);
-    typedef typename linalg_traits<MAT>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type magnitude_type;
-    
-    gmm::mult(A,
-	      scaled(V, value_type(magnitude_type(-2)/vect_norm2_sqr(V))), W);
-    rank_one_update(A, W, V);
-  }
-
-  ///@endcond
-
-  /* ********************************************************************* */
-  /*    Hessemberg reduction with Householder.                             */
-  /* ********************************************************************* */
-
-  template <typename MAT1, typename MAT2>
-    void Hessenberg_reduction(const MAT1& AA, const MAT2 &QQ, bool compute_Q){
-    MAT1& A = const_cast<MAT1&>(AA); MAT2& Q = const_cast<MAT2&>(QQ);
-    typedef typename linalg_traits<MAT1>::value_type value_type;
-    if (compute_Q) gmm::copy(identity_matrix(), Q);
-    size_type n = mat_nrows(A); if (n < 2) return;
-    std::vector<value_type> v(n), w(n);
-    sub_interval SUBK(0,n);
-    for (size_type k = 1; k+1 < n; ++k) {
-      sub_interval SUBI(k, n-k), SUBJ(k-1,n-k+1);
-      v.resize(n-k);
-      for (size_type j = k; j < n; ++j) v[j-k] = A(j, k-1);
-      house_vector(v);
-      row_house_update(sub_matrix(A, SUBI, SUBJ), v, sub_vector(w, SUBJ));
-      col_house_update(sub_matrix(A, SUBK, SUBI), v, w);
-      // is it possible to "unify" the two on the common part of the matrix?
-      if (compute_Q) col_house_update(sub_matrix(Q, SUBK, SUBI), v, w);
-    }
-  }
-
-  /* ********************************************************************* */
-  /*    Householder tridiagonalization for symmetric matrices              */
-  /* ********************************************************************* */
-
-  template <typename MAT1, typename MAT2> 
-  void Householder_tridiagonalization(const MAT1 &AA, const MAT2 &QQ,
-				     bool compute_q) {
-    MAT1 &A = const_cast<MAT1 &>(AA); MAT2 &Q = const_cast<MAT2 &>(QQ);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = mat_nrows(A); if (n < 2) return;
-    std::vector<T> v(n), p(n), w(n), ww(n);
-    sub_interval SUBK(0,n);
-
-    for (size_type k = 1; k+1 < n; ++k) { // not optimized ...
-      sub_interval SUBI(k, n-k);
-      v.resize(n-k); p.resize(n-k); w.resize(n-k); 
-      for (size_type l = k; l < n; ++l) 
-	{ v[l-k] = w[l-k] = A(l, k-1); A(l, k-1) = A(k-1, l) = T(0); }
-      house_vector(v);
-      R norm = vect_norm2_sqr(v);
-      A(k-1, k) = gmm::conj(A(k, k-1) = w[0] - T(2)*v[0]*vect_hp(w, v)/norm);
-
-      gmm::mult(sub_matrix(A, SUBI), gmm::scaled(v, T(-2) / norm), p);
-      gmm::add(p, gmm::scaled(v, -vect_hp(v, p) / norm), w);
-      rank_two_update(sub_matrix(A, SUBI), v, w);
-      // it should be possible to compute only the upper or lower part
-
-      if (compute_q) col_house_update(sub_matrix(Q, SUBK, SUBI), v, ww);
-    }
-  }
-
-  /* ********************************************************************* */
-  /*    Real and complex Givens rotations                                  */
-  /* ********************************************************************* */
-
-  template <typename T> void Givens_rotation(T a, T b, T &c, T &s) {
-    typedef typename number_traits<T>::magnitude_type R;
-    R aa = gmm::abs(a), bb = gmm::abs(b);
-    if (bb == R(0)) { c = T(1); s = T(0);   return; }
-    if (aa == R(0)) { c = T(0); s = b / bb; return; }
-    if (bb > aa)
-      { T t = -safe_divide(a,b); s = T(R(1) / (sqrt(R(1)+gmm::abs_sqr(t)))); c = s * t; }
-    else
-      { T t = -safe_divide(b,a); c = T(R(1) / (sqrt(R(1)+gmm::abs_sqr(t)))); s = c * t; }
-  }
-
-  // Apply Q* v
-  template <typename T> inline
-  void Apply_Givens_rotation_left(T &x, T &y, T c, T s)
-  { T t1=x, t2=y; x = gmm::conj(c)*t1 - gmm::conj(s)*t2; y = c*t2 + s*t1; }
-
-  // Apply v^T Q
-  template <typename T> inline
-  void Apply_Givens_rotation_right(T &x, T &y, T c, T s)
-  { T t1=x, t2=y; x = c*t1 - s*t2; y = gmm::conj(c)*t2 + gmm::conj(s)*t1; }
-
-  template <typename MAT, typename T>
-  void row_rot(const MAT &AA, T c, T s, size_type i, size_type k) {
-    MAT &A = const_cast<MAT &>(AA); // can be specialized for row matrices
-    for (size_type j = 0; j < mat_ncols(A); ++j)
-      Apply_Givens_rotation_left(A(i,j), A(k,j), c, s);
-  }
-
-  template <typename MAT, typename T>
-  void col_rot(const MAT &AA, T c, T s, size_type i, size_type k) {
-    MAT &A = const_cast<MAT &>(AA); // can be specialized for column matrices
-    for (size_type j = 0; j < mat_nrows(A); ++j)
-      Apply_Givens_rotation_right(A(j,i), A(j,k), c, s);
-  }
-  
-}
-
-#endif
-
diff --git a/Contrib/gmm/gmm_dense_lu.h b/Contrib/gmm/gmm_dense_lu.h
deleted file mode 100755
index 23ca9b8..0000000
--- a/Contrib/gmm/gmm_dense_lu.h
+++ /dev/null
@@ -1,275 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of lu.h from MTL.
-// See http://osl.iu.edu/research/mtl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-// Copyright (c) 2001-2003 The Trustees of Indiana University.
-// All rights reserved.
-// Copyright (c) 1998-2001 University of Notre Dame. All rights reserved.
-// Authors: Andrew Lumsdaine, Jeremy G. Siek, Lie-Quan Lee
-//
-// This file is part of the Matrix Template Library
-//
-// Indiana University has the exclusive rights to license this product under
-// the following license.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//   1.  All redistributions of source code must retain the above  copyright
-//       notice, the list of authors in the original source code,  this list
-//       of conditions and the disclaimer listed in this license;
-//   2.  All redistributions in binary form must reproduce the above
-//       copyright notice, this list of conditions and the disclaimer listed
-//       in this license in the documentation and/or other materials provided
-//       with the distribution;
-//   3.  Any documentation included with all redistributions must include the
-//       following acknowledgement:
-//	"This product includes software developed at the University of
-//       Notre Dame and the Pervasive Technology Labs at Indiana University.
-//       For technical information contact Andrew Lumsdaine at the Pervasive
-//       Technology Labs at Indiana University. 
-//	 For administrative and license questions contact the Advanced
-//       Research and Technology Institute at 1100 Waterway Blvd.
-//       Indianapolis, Indiana 46202, phone 317-274-5905, fax  317-274-5902."
-//	 Alternatively, this acknowledgement may appear in the software
-//       itself, and wherever such third-party acknowledgments normally appear.
-//   4.  The name "MTL" shall not be used to endorse or promote  products
-//       derived from this software without prior written  permission from
-//       Indiana University. For written permission, please  contact Indiana
-//       University Advanced Research & Technology  Institute.
-//   5.  Products derived from this software may not be called "MTL", nor
-//       may "MTL" appear in their name, without  prior written permission
-//       of Indiana University Advanced Research & Technology Institute.
-//
-// Indiana University provides no reassurances that the source code provided
-// does not infringe the patent or any other intellectual property rights of
-// any other entity. Indiana University disclaims any liability to any
-// recipient for claims brought by any other entity based on infringement of 
-// intellectual property rights or otherwise.
-//
-// LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO
-// WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY
-// GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF
-// INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. 
-// INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS",
-// "VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE.
-// LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR
-// ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF 
-// INFORMATION GENERATED USING SOFTWARE.
-//===========================================================================
-
-/**@file gmm_dense_lu.h
-   @author  Andrew Lumsdaine, Jeremy G. Siek, Lie-Quan Lee, Y. Renard
-   @date June 5, 2003.
-   @brief LU factorizations and determinant computation for dense matrices.
-*/
-#ifndef GMM_DENSE_LU_H
-#define GMM_DENSE_LU_H
-
-#include "gmm_dense_Householder.h"
-#include "gmm_opt.h"
-
-namespace gmm {
-
-
-  /** LU Factorization of a general (dense) matrix (real or complex).
-  
-  This is the outer product (a level-2 operation) form of the LU
-  Factorization with pivoting algorithm . This is equivalent to
-  LAPACK's dgetf2. Also see "Matrix Computations" 3rd Ed.  by Golub
-  and Van Loan section 3.2.5 and especially page 115.
-  
-  The pivot indices in ipvt are indexed starting from 1
-  so that this is compatible with LAPACK (Fortran).
-  */
-  template <typename DenseMatrix, typename Pvector>
-  size_type lu_factor(DenseMatrix& A, Pvector& ipvt) {
-    typedef typename linalg_traits<DenseMatrix>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    size_type info(0), i, j, jp, M(mat_nrows(A)), N(mat_ncols(A));
-    size_type NN = std::min(M, N);
-    std::vector<T> c(M), r(N);
-    
-    GMM_ASSERT2(ipvt.size()+1 >= NN, "IPVT too small");
-    for (i = 0; i+1 < NN; ++i) ipvt[i] = i;
-      
-    if (M || N) {
-      for (j = 0; j+1 < NN; ++j) {
-	R max = gmm::abs(A(j,j)); jp = j;
-	for (i = j+1; i < M; ++i)		   /* find pivot.          */
-	  if (gmm::abs(A(i,j)) > max) { jp = i; max = gmm::abs(A(i,j)); }
-	ipvt[j] = jp + 1;
-	
-	if (max == R(0)) { info = j + 1; break; }
-        if (jp != j) for (i = 0; i < N; ++i) std::swap(A(jp, i), A(j, i));
-	
-        for (i = j+1; i < M; ++i) { A(i, j) /= A(j,j); c[i-j-1] = -A(i, j); }
-        for (i = j+1; i < N; ++i) r[i-j-1] = A(j, i);  // avoid the copy ?
-	rank_one_update(sub_matrix(A, sub_interval(j+1, M-j-1),
-				 sub_interval(j+1, N-j-1)), c, conjugated(r));
-      }
-      ipvt[j] = j + 1;
-    }
-    return info;
-  }
-  
-  /** LU Solve : Solve equation Ax=b, given an LU factored matrix.*/
-  //  Thanks to Valient Gough for this routine!
-  template <typename DenseMatrix, typename VectorB, typename VectorX,
-	    typename Pvector>
-  void lu_solve(const DenseMatrix &LU, const Pvector& pvector, 
-		VectorX &x, const VectorB &b) {
-    typedef typename linalg_traits<DenseMatrix>::value_type T;
-    copy(b, x);
-    for(size_type i = 0; i < pvector.size(); ++i) {
-      size_type perm = pvector[i]-1;     // permutations stored in 1's offset
-      if(i != perm) { T aux = x[i]; x[i] = x[perm]; x[perm] = aux; }
-    }
-    /* solve  Ax = b  ->  LUx = b  ->  Ux = L^-1 b.                        */
-    lower_tri_solve(LU, x, true);
-    upper_tri_solve(LU, x, false);
-  }
-
-  template <typename DenseMatrix, typename VectorB, typename VectorX>
-  void lu_solve(const DenseMatrix &A, VectorX &x, const VectorB &b) {
-    typedef typename linalg_traits<DenseMatrix>::value_type T;
-    dense_matrix<T> B(mat_nrows(A), mat_ncols(A));
-    std::vector<int> ipvt(mat_nrows(A));
-    gmm::copy(A, B);
-    size_type info = lu_factor(B, ipvt);
-    GMM_ASSERT1(!info, "Singular system, pivot = " << info);
-    lu_solve(B, ipvt, x, b);
-  }
-  
-  template <typename DenseMatrix, typename VectorB, typename VectorX,
-	    typename Pvector>
-  void lu_solve_transposed(const DenseMatrix &LU, const Pvector& pvector, 
-			   VectorX &x, const VectorB &b) {
-    typedef typename linalg_traits<DenseMatrix>::value_type T;
-    copy(b, x);
-    lower_tri_solve(transposed(LU), x, false);
-    upper_tri_solve(transposed(LU), x, true);
-    for(size_type i = pvector.size(); i > 0; --i) {
-      size_type perm = pvector[i-1]-1;    // permutations stored in 1's offset
-      if(i-1 != perm) { T aux = x[i-1]; x[i-1] = x[perm]; x[perm] = aux; }
-    }
-
-  }
-
-
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename DenseMatrixLU, typename DenseMatrix, typename Pvector>
-  void lu_inverse(const DenseMatrixLU& LU, const Pvector& pvector,
-		  DenseMatrix& AInv, col_major) {
-    typedef typename linalg_traits<DenseMatrixLU>::value_type T;
-    std::vector<T> tmp(pvector.size(), T(0));
-    std::vector<T> result(pvector.size());
-    for(size_type i = 0; i < pvector.size(); ++i) {
-      tmp[i] = T(1);
-      lu_solve(LU, pvector, result, tmp);
-      copy(result, mat_col(AInv, i));
-      tmp[i] = T(0);
-    }
-  }
-
-  template <typename DenseMatrixLU, typename DenseMatrix, typename Pvector>
-  void lu_inverse(const DenseMatrixLU& LU, const Pvector& pvector,
-		  DenseMatrix& AInv, row_major) {
-    typedef typename linalg_traits<DenseMatrixLU>::value_type T;
-    std::vector<T> tmp(pvector.size(), T(0));
-    std::vector<T> result(pvector.size());
-    for(size_type i = 0; i < pvector.size(); ++i) {
-      tmp[i] = T(1); // to be optimized !!
-      // on peut sur le premier tri solve reduire le systeme
-      // et peut etre faire un solve sur une serie de vecteurs au lieu
-      // de vecteur a vecteur (accumulation directe de l'inverse dans la
-      // matrice au fur et a mesure du calcul ... -> evite la copie finale
-      lu_solve_transposed(LU, pvector, result, tmp);
-      copy(result, mat_row(AInv, i));
-      tmp[i] = T(0);
-    }
-  }
-  ///@endcond  
-
-  /** Given an LU factored matrix, build the inverse of the matrix. */
-  template <typename DenseMatrixLU, typename DenseMatrix, typename Pvector>
-  void lu_inverse(const DenseMatrixLU& LU, const Pvector& pvector,
-		  const DenseMatrix& AInv_) {
-    DenseMatrix& AInv = const_cast<DenseMatrix&>(AInv_);
-    lu_inverse(LU, pvector, AInv, typename principal_orientation_type<typename
-	       linalg_traits<DenseMatrix>::sub_orientation>::potype());
-  }
-
-  /** Given a dense matrix, build the inverse of the matrix, and
-      return the determinant */
-  template <typename DenseMatrix>
-  typename linalg_traits<DenseMatrix>::value_type
-  lu_inverse(const DenseMatrix& A_) {
-    typedef typename linalg_traits<DenseMatrix>::value_type T;
-    DenseMatrix& A = const_cast<DenseMatrix&>(A_);
-    dense_matrix<T> B(mat_nrows(A), mat_ncols(A));
-    std::vector<int> ipvt(mat_nrows(A));
-    gmm::copy(A, B);
-    size_type info = lu_factor(B, ipvt);
-    GMM_ASSERT1(!info, "Non invertible matrix, pivot = " << info);
-    lu_inverse(B, ipvt, A);
-    return lu_det(B, ipvt);
-  }
-
-  /** Compute the matrix determinant (via a LU factorization) */
-  template <typename DenseMatrixLU, typename Pvector>
-  typename linalg_traits<DenseMatrixLU>::value_type
-  lu_det(const DenseMatrixLU& LU, const Pvector &pvector) {
-    typedef typename linalg_traits<DenseMatrixLU>::value_type T;
-    T det(1);
-    for (size_type j = 0; j < std::min(mat_nrows(LU), mat_ncols(LU)); ++j)
-      det *= LU(j,j);
-    for(size_type i = 0; i < pvector.size(); ++i)
-      if (i != size_type(pvector[i]-1)) { det = -det; }
-    return det;
-  }
-
-  template <typename DenseMatrix>
-  typename linalg_traits<DenseMatrix>::value_type
-  lu_det(const DenseMatrix& A) {
-    typedef typename linalg_traits<DenseMatrix>::value_type T;
-    dense_matrix<T> B(mat_nrows(A), mat_ncols(A));
-    std::vector<int> ipvt(mat_nrows(A));
-    gmm::copy(A, B);
-    lu_factor(B, ipvt);
-    return lu_det(B, ipvt);
-  }
-
-}
-
-#endif
-
diff --git a/Contrib/gmm/gmm_dense_qr.h b/Contrib/gmm/gmm_dense_qr.h
deleted file mode 100755
index d9effa2..0000000
--- a/Contrib/gmm/gmm_dense_qr.h
+++ /dev/null
@@ -1,788 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_dense_qr.h
-   @author  Caroline Lecalvez, Caroline.Lecalvez at gmm.insa-tlse.fr, Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date September 12, 2003.
-   @brief Dense QR factorization.
-*/
-#ifndef GMM_DENSE_QR_H
-#define GMM_DENSE_QR_H
-
-#include "gmm_dense_Householder.h"
-
-namespace gmm {
-
-
-  /**
-     QR factorization using Householder method (complex and real version).
-  */
-  template <typename MAT1>
-  void qr_factor(const MAT1 &A_) { 
-    MAT1 &A = const_cast<MAT1 &>(A_);
-    typedef typename linalg_traits<MAT1>::value_type value_type;
-
-    size_type m = mat_nrows(A), n = mat_ncols(A);
-    GMM_ASSERT2(m >= n, "dimensions mismatch");
-
-    std::vector<value_type> W(m), V(m);
-
-    for (size_type j = 0; j < n; ++j) {
-      sub_interval SUBI(j, m-j), SUBJ(j, n-j);
-      V.resize(m-j); W.resize(n-j);
-
-      for (size_type i = j; i < m; ++i) V[i-j] = A(i, j);
-      house_vector(V);
-
-      row_house_update(sub_matrix(A, SUBI, SUBJ), V, W);
-      for (size_type i = j+1; i < m; ++i) A(i, j) = V[i-j];
-    }
-  }
-
-  
-  // QR comes from QR_factor(QR) where the upper triangular part stands for R
-  // and the lower part contains the Householder reflectors.
-  // A <- AQ
-  template <typename MAT1, typename MAT2>
-  void apply_house_right(const MAT1 &QR, const MAT2 &A_) { 
-    MAT2 &A = const_cast<MAT2 &>(A_);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    size_type m = mat_nrows(QR), n = mat_ncols(QR);
-    GMM_ASSERT2(m == mat_ncols(A), "dimensions mismatch");
-    if (m == 0) return;
-    std::vector<T> V(m), W(mat_nrows(A));
-    V[0] = T(1);
-    for (size_type j = 0; j < n; ++j) {
-      V.resize(m-j);
-      for (size_type i = j+1; i < m; ++i) V[i-j] = QR(i, j);
-      col_house_update(sub_matrix(A, sub_interval(0, mat_nrows(A)),
-				  sub_interval(j, m-j)), V, W);
-    }
-  }
-
-  // QR comes from QR_factor(QR) where the upper triangular part stands for R
-  // and the lower part contains the Householder reflectors.
-  // A <- Q*A
-  template <typename MAT1, typename MAT2>
-  void apply_house_left(const MAT1 &QR, const MAT2 &A_) { 
-    MAT2 &A = const_cast<MAT2 &>(A_);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    size_type m = mat_nrows(QR), n = mat_ncols(QR);
-    GMM_ASSERT2(m == mat_nrows(A), "dimensions mismatch");
-    if (m == 0) return;
-    std::vector<T> V(m), W(mat_ncols(A));
-    V[0] = T(1);
-    for (size_type j = 0; j < n; ++j) {
-      V.resize(m-j);
-      for (size_type i = j+1; i < m; ++i) V[i-j] = QR(i, j);
-      row_house_update(sub_matrix(A, sub_interval(j, m-j),
-				  sub_interval(0, mat_ncols(A))), V, W);
-    }
-  }  
-
-  /** Compute the QR factorization, where Q is assembled. */
-  template <typename MAT1, typename MAT2, typename MAT3>
-    void qr_factor(const MAT1 &A, const MAT2 &QQ, const MAT3 &RR) { 
-    MAT2 &Q = const_cast<MAT2 &>(QQ); MAT3 &R = const_cast<MAT3 &>(RR); 
-    typedef typename linalg_traits<MAT1>::value_type value_type;
-
-    size_type m = mat_nrows(A), n = mat_ncols(A);
-    GMM_ASSERT2(m >= n, "dimensions mismatch");
-    gmm::copy(A, Q);
-    
-    std::vector<value_type> W(m);
-    dense_matrix<value_type> VV(m, n);
-
-    for (size_type j = 0; j < n; ++j) {
-      sub_interval SUBI(j, m-j), SUBJ(j, n-j);
-
-      for (size_type i = j; i < m; ++i) VV(i,j) = Q(i, j);
-      house_vector(sub_vector(mat_col(VV,j), SUBI));
-
-      row_house_update(sub_matrix(Q, SUBI, SUBJ),
-		       sub_vector(mat_col(VV,j), SUBI), sub_vector(W, SUBJ));
-    }
-
-    gmm::copy(sub_matrix(Q, sub_interval(0, n), sub_interval(0, n)), R);
-    gmm::copy(identity_matrix(), Q);
-    
-    for (size_type j = n-1; j != size_type(-1); --j) {
-      sub_interval SUBI(j, m-j), SUBJ(j, n-j);
-      row_house_update(sub_matrix(Q, SUBI, SUBJ), 
-		       sub_vector(mat_col(VV,j), SUBI), sub_vector(W, SUBJ));
-    }
-  }
-
-  ///@cond DOXY_SHOW_ALL_FUNCTIONS
-  template <typename TA, typename TV, typename Ttol, 
-	    typename MAT, typename VECT>
-  void extract_eig(const MAT &A, VECT &V, Ttol tol, TA, TV) {
-    size_type n = mat_nrows(A);
-    if (n == 0) return;
-    tol *= Ttol(2);
-    Ttol tol_i = tol * gmm::abs(A(0,0)), tol_cplx = tol_i;
-    for (size_type i = 0; i < n; ++i) {
-      if (i < n-1) {
-	tol_i = (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol;
-	tol_cplx = std::max(tol_cplx, tol_i);
-      }
-      if ((i < n-1) && gmm::abs(A(i+1,i)) >= tol_i) {
-	TA tr = A(i,i) + A(i+1, i+1);
-	TA det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i);
-	TA delta = tr*tr - TA(4) * det;
-	if (delta < -tol_cplx) {
-	  GMM_WARNING1("A complex eigenvalue has been detected : "
-		      << std::complex<TA>(tr/TA(2), gmm::sqrt(-delta)/TA(2)));
-	  V[i] = V[i+1] = tr / TA(2);
-	}
-	else {
-	  delta = std::max(TA(0), delta);
-	  V[i  ] = TA(tr + gmm::sqrt(delta))/ TA(2);
-	  V[i+1] = TA(tr -  gmm::sqrt(delta))/ TA(2);
-	}
-	++i;
-      }
-      else
-	V[i] = TV(A(i,i));
-    }
-  }
-
-  template <typename TA, typename TV, typename Ttol, 
-	    typename MAT, typename VECT>
-  void extract_eig(const MAT &A, VECT &V, Ttol tol, TA, std::complex<TV>) {
-    size_type n = mat_nrows(A);
-    tol *= Ttol(2);
-    for (size_type i = 0; i < n; ++i)
-      if ((i == n-1) ||
-	  gmm::abs(A(i+1,i)) < (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol)
-	V[i] = std::complex<TV>(A(i,i));
-      else {
-	TA tr = A(i,i) + A(i+1, i+1);
-	TA det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i);
-	TA delta = tr*tr - TA(4) * det;
-	if (delta < TA(0)) {
-	  V[i] = std::complex<TV>(tr / TA(2), gmm::sqrt(-delta) / TA(2));
-	  V[i+1] = std::complex<TV>(tr / TA(2), -gmm::sqrt(-delta)/ TA(2));
-	}
-	else {
-	  V[i  ] = TA(tr + gmm::sqrt(delta)) / TA(2);
-	  V[i+1] = TA(tr -  gmm::sqrt(delta)) / TA(2);
-	}
-	++i;
-      }
-  }
-
-  template <typename TA, typename TV, typename Ttol,
-	    typename MAT, typename VECT>
-  void extract_eig(const MAT &A, VECT &V, Ttol tol, std::complex<TA>, TV) {
-    typedef std::complex<TA> T;
-    size_type n = mat_nrows(A);
-    if (n == 0) return;
-    tol *= Ttol(2);
-    Ttol tol_i = tol * gmm::abs(A(0,0)), tol_cplx = tol_i;
-    for (size_type i = 0; i < n; ++i) {
-      if (i < n-1) {
-	tol_i = (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol;
-	tol_cplx = std::max(tol_cplx, tol_i);
-      }
-      if ((i == n-1) || gmm::abs(A(i+1,i)) < tol_i) {
-	if (gmm::abs(std::imag(A(i,i))) > tol_cplx)
-	  GMM_WARNING1("A complex eigenvalue has been detected : "
-		      << T(A(i,i)) << " : "  << gmm::abs(std::imag(A(i,i)))
-		      / gmm::abs(std::real(A(i,i))) << " : " << tol_cplx);
-	V[i] = std::real(A(i,i));
-      }
-      else {
-	T tr = A(i,i) + A(i+1, i+1);
-	T det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i);
-	T delta = tr*tr - TA(4) * det;
-	T a1 = (tr + gmm::sqrt(delta)) / TA(2);
-	T a2 = (tr - gmm::sqrt(delta)) / TA(2);
-	if (gmm::abs(std::imag(a1)) > tol_cplx)
-	  GMM_WARNING1("A complex eigenvalue has been detected : " << a1);
-	if (gmm::abs(std::imag(a2)) > tol_cplx)
-	  GMM_WARNING1("A complex eigenvalue has been detected : " << a2);
-
-	V[i] = std::real(a1); V[i+1] = std::real(a2);
-	++i;
-      }
-    }
-  }
-
-  template <typename TA, typename TV, typename Ttol,
-	    typename MAT, typename VECT>
-  void extract_eig(const MAT &A, VECT &V, Ttol tol,
-		   std::complex<TA>, std::complex<TV>) {
-    size_type n = mat_nrows(A);
-    tol *= Ttol(2);
-    for (size_type i = 0; i < n; ++i)
-      if ((i == n-1) ||
-	  gmm::abs(A(i+1,i)) < (gmm::abs(A(i,i))+gmm::abs(A(i+1,i+1)))*tol)
-	V[i] = std::complex<TV>(A(i,i));
-      else {
-	std::complex<TA> tr = A(i,i) + A(i+1, i+1);
-	std::complex<TA> det = A(i,i)*A(i+1, i+1) - A(i,i+1)*A(i+1, i);
-	std::complex<TA> delta = tr*tr - TA(4) * det;
-	V[i] = (tr + gmm::sqrt(delta)) / TA(2);
-	V[i+1] = (tr - gmm::sqrt(delta)) / TA(2);
-	++i;
-      }
-  }
-
-  ///@endcond
-  /**
-     Compute eigenvalue vector.
-  */
-  template <typename MAT, typename Ttol, typename VECT> inline
-  void extract_eig(const MAT &A, const VECT &V, Ttol tol) {
-    extract_eig(A, const_cast<VECT&>(V), tol,
-		typename linalg_traits<MAT>::value_type(),
-		typename linalg_traits<VECT>::value_type());
-  }
-
-  /* ********************************************************************* */
-  /*    Stop criterion for QR algorithms                                   */
-  /* ********************************************************************* */
-
-  template <typename MAT, typename Ttol>
-  void qr_stop_criterion(MAT &A, size_type &p, size_type &q, Ttol tol) {
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    R rmin = default_min(R()) * R(2);
-    size_type n = mat_nrows(A);
-    if (n <= 2) { q = n; p = 0; }
-    else {
-      for (size_type i = 1; i < n-q; ++i)
-	if (gmm::abs(A(i,i-1)) < (gmm::abs(A(i,i))+ gmm::abs(A(i-1,i-1)))*tol
-	    || gmm::abs(A(i,i-1)) < rmin)
-	  A(i,i-1) = T(0);
-      
-      while ((q < n-1 && A(n-1-q, n-2-q) == T(0)) ||
-	     (q < n-2 && A(n-2-q, n-3-q) == T(0))) ++q;
-      if (q >= n-2) q = n;
-      p = n-q; if (p) --p; if (p) --p;
-      while (p > 0 && A(p,p-1) != T(0)) --p;
-    }
-  }
-  
-  template <typename MAT, typename Ttol> inline
-  void symmetric_qr_stop_criterion(const MAT &AA, size_type &p, size_type &q,
-				Ttol tol) {
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    R rmin = default_min(R()) * R(2);
-    MAT& A = const_cast<MAT&>(AA);
-    size_type n = mat_nrows(A);
-    if (n <= 1) { q = n; p = 0; }
-    else {
-      for (size_type i = 1; i < n-q; ++i)
-	if (gmm::abs(A(i,i-1)) < (gmm::abs(A(i,i))+ gmm::abs(A(i-1,i-1)))*tol
-	    || gmm::abs(A(i,i-1)) < rmin)
-	  A(i,i-1) = T(0);
-      
-      while (q < n-1 && A(n-1-q, n-2-q) == T(0)) ++q;
-      if (q >= n-1) q = n;
-      p = n-q; if (p) --p; if (p) --p;
-      while (p > 0 && A(p,p-1) != T(0)) --p;
-    }
-  }
-
-  template <typename VECT1, typename VECT2, typename Ttol> inline
-  void symmetric_qr_stop_criterion(const VECT1 &diag, const VECT2 &sdiag_,
-				   size_type &p, size_type &q, Ttol tol) {
-    typedef typename linalg_traits<VECT2>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    R rmin = default_min(R()) * R(2);
-    VECT2 &sdiag = const_cast<VECT2 &>(sdiag_);
-    size_type n = vect_size(diag);
-    if (n <= 1) { q = n; p = 0; return; }
-    for (size_type i = 1; i < n-q; ++i)
-      if (gmm::abs(sdiag[i-1]) < (gmm::abs(diag[i])+ gmm::abs(diag[i-1]))*tol
-	  || gmm::abs(sdiag[i-1]) < rmin)
-	sdiag[i-1] = T(0);
-    while (q < n-1 && sdiag[n-2-q] == T(0)) ++q;
-    if (q >= n-1) q = n;
-    p = n-q; if (p) --p; if (p) --p;
-    while (p > 0 && sdiag[p-1] != T(0)) --p;
-  }
-
-  /* ********************************************************************* */
-  /*    2x2 blocks reduction for Schur vectors                             */
-  /* ********************************************************************* */
-
-  template <typename MATH, typename MATQ, typename Ttol>
-  void block2x2_reduction(MATH &H, MATQ &Q, Ttol tol) {
-    typedef typename linalg_traits<MATH>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = mat_nrows(H), nq = mat_nrows(Q);
-    sub_interval SUBQ(0, nq), SUBL(0, 2);
-    std::vector<T> v(2), w(std::max(n, nq)); v[0] = T(1);
-    if (n < 2) return;
-    tol *= Ttol(2);
-    Ttol tol_i = tol * gmm::abs(H(0,0)), tol_cplx = tol_i;
-    for (size_type i = 0; i < n-1; ++i) {
-      tol_i = (gmm::abs(H(i,i))+gmm::abs(H(i+1,i+1)))*tol;
-      tol_cplx = std::max(tol_cplx, tol_i);
-      
-      if (gmm::abs(H(i+1,i)) > tol_i) { // 2x2 block detected
-	T tr = (H(i+1, i+1) - H(i,i)) / T(2);
-	T delta = tr*tr + H(i,i+1)*H(i+1, i);
-	
-	if (is_complex(T()) || gmm::real(delta) >= R(0)) {
-	  sub_interval SUBI(i, 2);
-	  T theta = (tr - gmm::sqrt(delta)) / H(i+1,i);
-	  R a = gmm::abs(theta);
-	  v[1] = (a == R(0)) ? T(-1)
-	    : gmm::conj(theta) * (R(1) - gmm::sqrt(a*a + R(1)) / a);
-	  row_house_update(sub_matrix(H, SUBI), v, sub_vector(w, SUBL));
-	  col_house_update(sub_matrix(H, SUBI), v, sub_vector(w, SUBL));
-	  col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ));
-	}
-	++i;
-      }
-    }
-  }
-
-  /* ********************************************************************* */
-  /*    Basic qr algorithm.                                                */
-  /* ********************************************************************* */
-
-  #define tol_type_for_qr typename number_traits<typename \
-                          linalg_traits<MAT1>::value_type>::magnitude_type
-  #define default_tol_for_qr \
-    (gmm::default_tol(tol_type_for_qr()) *  tol_type_for_qr(3))
-
-  // QR method for real or complex square matrices based on QR factorisation.
-  // eigval has to be a complex vector if A has complex eigeinvalues.
-  // Very slow method. Use implicit_qr_method instead.
-  template <typename MAT1, typename VECT, typename MAT2>
-    void rudimentary_qr_algorithm(const MAT1 &A, const VECT &eigval_,
-				  const MAT2 &eigvect_,
-				  tol_type_for_qr tol = default_tol_for_qr,
-				  bool compvect = true) {
-    VECT &eigval = const_cast<VECT &>(eigval_);
-    MAT2 &eigvect = const_cast<MAT2 &>(eigvect_);
-
-    typedef typename linalg_traits<MAT1>::value_type value_type;
-
-    size_type n = mat_nrows(A), p, q = 0, ite = 0;
-    dense_matrix<value_type> Q(n, n), R(n,n), A1(n,n); 
-    gmm::copy(A, A1);
-
-    Hessenberg_reduction(A1, eigvect, compvect);
-    qr_stop_criterion(A1, p, q, tol);
-
-    while (q < n) {
-      qr_factor(A1, Q, R);
-      gmm::mult(R, Q, A1);
-      if (compvect) { gmm::mult(eigvect, Q, R); gmm::copy(R, eigvect); }
-      
-      qr_stop_criterion(A1, p, q, tol);
-      ++ite;
-      GMM_ASSERT1(ite < n*1000, "QR algorithm failed");
-    }
-    if (compvect) block2x2_reduction(A1, Q, tol);
-    extract_eig(A1, eigval, tol); 
-  }
-
-  template <typename MAT1, typename VECT>
-    void rudimentary_qr_algorithm(const MAT1 &a, VECT &eigval,
-				  tol_type_for_qr tol = default_tol_for_qr) {
-    dense_matrix<typename linalg_traits<MAT1>::value_type> m(0,0);
-    rudimentary_qr_algorithm(a, eigval, m, tol, false); 
-  }
-
-  /* ********************************************************************* */
-  /*    Francis QR step.                                                   */
-  /* ********************************************************************* */
-
-  template <typename MAT1, typename MAT2>
-    void Francis_qr_step(const MAT1& HH, const MAT2 &QQ, bool compute_Q) {
-    MAT1& H = const_cast<MAT1&>(HH); MAT2& Q = const_cast<MAT2&>(QQ);
-    typedef typename linalg_traits<MAT1>::value_type value_type;
-    size_type n = mat_nrows(H), nq = mat_nrows(Q); 
-    
-    std::vector<value_type> v(3), w(std::max(n, nq));
-
-    value_type s = H(n-2, n-2) + H(n-1, n-1);
-    value_type t = H(n-2, n-2) * H(n-1, n-1) - H(n-2, n-1) * H(n-1, n-2);
-    value_type x = H(0, 0) * H(0, 0) + H(0,1) * H(1, 0) - s * H(0,0) + t;
-    value_type y = H(1, 0) * (H(0,0) + H(1,1) - s);
-    value_type z = H(1, 0) * H(2, 1);
-
-    sub_interval SUBQ(0, nq);
-
-    for (size_type k = 0; k < n - 2; ++k) {
-      v[0] = x; v[1] = y; v[2] = z;
-      house_vector(v);
-      size_type r = std::min(k+4, n), q = (k==0) ? 0 : k-1;
-      sub_interval SUBI(k, 3), SUBJ(0, r), SUBK(q, n-q);
-      
-      row_house_update(sub_matrix(H, SUBI, SUBK),  v, sub_vector(w, SUBK));
-      col_house_update(sub_matrix(H, SUBJ, SUBI),  v, sub_vector(w, SUBJ));
-      
-      if (compute_Q)
-       	col_house_update(sub_matrix(Q, SUBQ, SUBI),  v, sub_vector(w, SUBQ));
-
-      x = H(k+1, k); y = H(k+2, k);
-      if (k < n-3) z = H(k+3, k);
-    }
-    sub_interval SUBI(n-2,2), SUBJ(0, n), SUBK(n-3,3), SUBL(0, 3);
-    v.resize(2);
-    v[0] = x; v[1] = y;
-    house_vector(v);
-    row_house_update(sub_matrix(H, SUBI, SUBK), v, sub_vector(w, SUBL));
-    col_house_update(sub_matrix(H, SUBJ, SUBI), v, sub_vector(w, SUBJ));
-    if (compute_Q)
-      col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ));
-  }
-
-  /* ********************************************************************* */
-  /*    Wilkinson Double shift QR step (from Lapack).                      */
-  /* ********************************************************************* */
-
-  template <typename MAT1, typename MAT2, typename Ttol>
-  void Wilkinson_double_shift_qr_step(const MAT1& HH, const MAT2 &QQ,
-				      Ttol tol, bool exc, bool compute_Q) {
-    MAT1& H = const_cast<MAT1&>(HH); MAT2& Q = const_cast<MAT2&>(QQ);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = mat_nrows(H), nq = mat_nrows(Q), m;
-    std::vector<T> v(3), w(std::max(n, nq));
-    const R dat1(0.75), dat2(-0.4375);
-    T h33, h44, h43h34, v1(0), v2(0), v3(0);
-    
-    if (exc) {                    /* Exceptional shift.                    */
-      R s = gmm::abs(H(n-1, n-2)) + gmm::abs(H(n-2, n-3));
-      h33 = h44 = dat1 * s;
-      h43h34 = dat2*s*s;
-    }
-    else {                        /* Wilkinson double shift.               */
-      h44 = H(n-1,n-1); h33 = H(n-2, n-2);
-      h43h34 = H(n-1, n-2) * H(n-2, n-1);
-    }
-
-    /* Look for two consecutive small subdiagonal elements.                */
-    /* Determine the effect of starting the double-shift QR iteration at   */
-    /* row m, and see if this would make H(m-1, m-2) negligible.           */
-    for (m = n-2; m != 0; --m) {
-      T h11  = H(m-1, m-1), h22  = H(m, m);
-      T h21  = H(m, m-1),   h12  = H(m-1, m);
-      T h44s = h44 - h11,   h33s = h33 - h11;
-      v1 = (h33s*h44s-h43h34) / h21 + h12;
-      v2 = h22 - h11 - h33s - h44s;
-      v3 = H(m+1, m);
-      R s = gmm::abs(v1) + gmm::abs(v2) + gmm::abs(v3);
-      v1 /= s; v2 /= s; v3 /= s;
-      if (m == 1) break;
-      T h00 = H(m-2, m-2);
-      T h10 = H(m-1, m-2);
-      R tst1 = gmm::abs(v1)*(gmm::abs(h00)+gmm::abs(h11)+gmm::abs(h22));
-      if (gmm::abs(h10)*(gmm::abs(v2)+gmm::abs(v3)) <= tol * tst1) break;
-    }
-
-    /* Double shift QR step.                                               */
-    sub_interval SUBQ(0, nq);
-    for (size_type k = (m == 0) ? 0 : m-1; k < n-2; ++k) {
-      v[0] = v1; v[1] = v2; v[2] = v3;
-      house_vector(v);
-      size_type r = std::min(k+4, n), q = (k==0) ? 0 : k-1;
-      sub_interval SUBI(k, 3), SUBJ(0, r), SUBK(q, n-q);
-      
-      row_house_update(sub_matrix(H, SUBI, SUBK),  v, sub_vector(w, SUBK));
-      col_house_update(sub_matrix(H, SUBJ, SUBI),  v, sub_vector(w, SUBJ));
-      if (k > m-1) { H(k+1, k-1) = T(0); if (k < n-3) H(k+2, k-1) = T(0); }
-      
-      if (compute_Q)
-       	col_house_update(sub_matrix(Q, SUBQ, SUBI),  v, sub_vector(w, SUBQ));
-
-      v1 = H(k+1, k); v2 = H(k+2, k);
-      if (k < n-3) v3 = H(k+3, k);
-    }
-    sub_interval SUBI(n-2,2), SUBJ(0, n), SUBK(n-3,3), SUBL(0, 3);
-    v.resize(2); v[0] = v1; v[1] = v2;
-    house_vector(v);
-    row_house_update(sub_matrix(H, SUBI, SUBK), v, sub_vector(w, SUBL));
-    col_house_update(sub_matrix(H, SUBJ, SUBI), v, sub_vector(w, SUBJ));
-    if (compute_Q)
-      col_house_update(sub_matrix(Q, SUBQ, SUBI), v, sub_vector(w, SUBQ));
-  }
-
-  /* ********************************************************************* */
-  /*    Implicit QR algorithm.                                             */
-  /* ********************************************************************* */
-
-  // QR method for real or complex square matrices based on an
-  // implicit QR factorisation. eigval has to be a complex vector
-  // if A has complex eigeinvalues. complexity about 10n^3, 25n^3 if
-  // eigenvectors are computed
-  template <typename MAT1, typename VECT, typename MAT2>
-    void implicit_qr_algorithm(const MAT1 &A, const VECT &eigval_,
-			       const MAT2 &Q_, 
-			       tol_type_for_qr tol = default_tol_for_qr,
-			       bool compvect = true) {
-    VECT &eigval = const_cast<VECT &>(eigval_);
-    MAT2 &Q = const_cast<MAT2 &>(Q_);
-    typedef typename linalg_traits<MAT1>::value_type value_type;
-
-    size_type n(mat_nrows(A)), q(0), q_old, p(0), ite(0), its(0);
-    dense_matrix<value_type> H(n,n);
-    sub_interval SUBK(0,0);
-
-    gmm::copy(A, H);
-    Hessenberg_reduction(H, Q, compvect);
-    qr_stop_criterion(H, p, q, tol);
-    
-    while (q < n) {
-      sub_interval SUBI(p, n-p-q), SUBJ(0, mat_ncols(Q));
-      if (compvect) SUBK = SUBI;
-//       Francis_qr_step(sub_matrix(H, SUBI),
-// 		      sub_matrix(Q, SUBJ, SUBK), compvect);
-      Wilkinson_double_shift_qr_step(sub_matrix(H, SUBI), 
-				     sub_matrix(Q, SUBJ, SUBK),
-				     tol, (its == 10 || its == 20), compvect);
-      q_old = q;
-      qr_stop_criterion(H, p, q, tol*2);
-      if (q != q_old) its = 0;
-      ++its; ++ite;
-      GMM_ASSERT1(ite < n*100, "QR algorithm failed");
-    }
-    if (compvect) block2x2_reduction(H, Q, tol);
-    extract_eig(H, eigval, tol);
-  }
-
-
-  template <typename MAT1, typename VECT>
-    void implicit_qr_algorithm(const MAT1 &a, VECT &eigval,
-			       tol_type_for_qr tol = default_tol_for_qr) {
-    dense_matrix<typename linalg_traits<MAT1>::value_type> m(0,0);
-    implicit_qr_algorithm(a, eigval, m, tol, false); 
-  }
-
-  /* ********************************************************************* */
-  /*    Implicit symmetric QR step with Wilkinson Shift.                   */
-  /* ********************************************************************* */
-
-  template <typename MAT1, typename MAT2> 
-    void symmetric_Wilkinson_qr_step(const MAT1& MM, const MAT2 &ZZ,
-				     bool compute_z) {
-    MAT1& M = const_cast<MAT1&>(MM); MAT2& Z = const_cast<MAT2&>(ZZ);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    size_type n = mat_nrows(M);
-
-    for (size_type i = 0; i < n; ++i) {
-      M(i, i) = T(gmm::real(M(i, i)));
-      if (i > 0) {
-	T a = (M(i, i-1) + gmm::conj(M(i-1, i)))/R(2);
-	M(i, i-1) = a; M(i-1, i) = gmm::conj(a);
-      }
-    }
-
-    R d = gmm::real(M(n-2, n-2) - M(n-1, n-1)) / R(2);
-    R e = gmm::abs_sqr(M(n-1, n-2));
-    R nu = d + gmm::sgn(d)*gmm::sqrt(d*d+e);
-    if (nu == R(0)) { M(n-1, n-2) = T(0); return; }
-    R mu = gmm::real(M(n-1, n-1)) - e / nu;
-    T x = M(0,0) - T(mu), z = M(1, 0), c, s;
-
-    for (size_type k = 1; k < n; ++k) {
-      Givens_rotation(x, z, c, s);
-
-      if (k > 1) Apply_Givens_rotation_left(M(k-1,k-2), M(k,k-2), c, s);
-      Apply_Givens_rotation_left(M(k-1,k-1), M(k,k-1), c, s);
-      Apply_Givens_rotation_left(M(k-1,k  ), M(k,k  ), c, s);
-      if (k < n-1) Apply_Givens_rotation_left(M(k-1,k+1), M(k,k+1), c, s);
-      if (k > 1) Apply_Givens_rotation_right(M(k-2,k-1), M(k-2,k), c, s);
-      Apply_Givens_rotation_right(M(k-1,k-1), M(k-1,k), c, s);
-      Apply_Givens_rotation_right(M(k  ,k-1), M(k,k)  , c, s);
-      if (k < n-1) Apply_Givens_rotation_right(M(k+1,k-1), M(k+1,k), c, s);
-
-      if (compute_z) col_rot(Z, c, s, k-1, k);
-      if (k < n-1) { x = M(k, k-1); z = M(k+1, k-1); }
-    }
-
-  }
-
-  template <typename VECT1, typename VECT2, typename MAT> 
-  void symmetric_Wilkinson_qr_step(const VECT1& diag_, const VECT2& sdiag_,
-				   const MAT &ZZ, bool compute_z) {
-    VECT1& diag = const_cast<VECT1&>(diag_);
-    VECT2& sdiag = const_cast<VECT2&>(sdiag_);
-    MAT& Z = const_cast<MAT&>(ZZ);
-    typedef typename linalg_traits<VECT2>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = vect_size(diag);
-    R d = (diag[n-2] - diag[n-1]) / R(2);
-    R e = gmm::abs_sqr(sdiag[n-2]);
-    R nu = d + gmm::sgn(d)*gmm::sqrt(d*d+e);
-    if (nu == R(0)) { sdiag[n-2] = T(0); return; }
-    R mu = diag[n-1] - e / nu;
-    T x = diag[0] - T(mu), z = sdiag[0], c, s;
-
-    T a01(0), a02(0);
-    T a10(0), a11(diag[0]), a12(gmm::conj(sdiag[0])), a13(0);
-    T a20(0), a21(sdiag[0]), a22(diag[1]), a23(gmm::conj(sdiag[1]));
-    T a31(0), a32(sdiag[1]);
-
-    for (size_type k = 1; k < n; ++k) {
-      Givens_rotation(x, z, c, s);
-
-      if (k > 1) Apply_Givens_rotation_left(a10, a20, c, s);
-      Apply_Givens_rotation_left(a11, a21, c, s);
-      Apply_Givens_rotation_left(a12, a22, c, s);
-      if (k < n-1) Apply_Givens_rotation_left(a13, a23, c, s);
-
-      if (k > 1) Apply_Givens_rotation_right(a01, a02, c, s);
-      Apply_Givens_rotation_right(a11, a12, c, s);
-      Apply_Givens_rotation_right(a21, a22, c, s);
-      if (k < n-1) Apply_Givens_rotation_right(a31, a32, c, s);
-
-      if (compute_z) col_rot(Z, c, s, k-1, k);
-
-      diag[k-1] = gmm::real(a11);
-      diag[k] = gmm::real(a22);
-      if (k > 1) sdiag[k-2] = (gmm::conj(a01) + a10) / R(2);
-      sdiag[k-1] = (gmm::conj(a12) + a21) / R(2);
-
-      x = sdiag[k-1]; z = (gmm::conj(a13) + a31) / R(2);
-
-      a01 = a12; a02 = a13;
-      a10 = a21; a11 = a22; a12 = a23; a13 = T(0);
-      a20 = a31; a21 = a32; a31 = T(0);
-
-      if (k < n-1) {
-	sdiag[k] = (gmm::conj(a23) + a32) / R(2);
-	a22 = T(diag[k+1]); a32 = sdiag[k+1]; a23 = gmm::conj(a32);
-      }
-    }
-  }
-
-  /* ********************************************************************* */
-  /*    Implicit QR algorithm for symmetric or hermitian matrices.         */
-  /* ********************************************************************* */
-
-  // implicit QR method for real square symmetric matrices or complex
-  // hermitian matrices.
-  // eigval has to be a complex vector if A has complex eigeinvalues.
-  // complexity about 4n^3/3, 9n^3 if eigenvectors are computed
-  template <typename MAT1, typename VECT, typename MAT2>
-  void symmetric_qr_algorithm_old(const MAT1 &A, const VECT &eigval_,
-			      const MAT2 &eigvect_,
-			      tol_type_for_qr tol = default_tol_for_qr,
-			      bool compvect = true) {
-    VECT &eigval = const_cast<VECT &>(eigval_);
-    MAT2 &eigvect = const_cast<MAT2 &>(eigvect_);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    if (compvect) gmm::copy(identity_matrix(), eigvect);
-    size_type n = mat_nrows(A), q = 0, p, ite = 0;
-    dense_matrix<T> Tri(n, n);
-    gmm::copy(A, Tri);
-
-    Householder_tridiagonalization(Tri, eigvect, compvect);
-    
-    symmetric_qr_stop_criterion(Tri, p, q, tol);
-    
-    while (q < n) {
-
-      sub_interval SUBI(p, n-p-q), SUBJ(0, mat_ncols(eigvect)), SUBK(p, n-p-q);
-      if (!compvect) SUBK = sub_interval(0,0);
-      symmetric_Wilkinson_qr_step(sub_matrix(Tri, SUBI), 
-				  sub_matrix(eigvect, SUBJ, SUBK), compvect);
-      
-      symmetric_qr_stop_criterion(Tri, p, q, tol*R(2));
-      ++ite;
-      GMM_ASSERT1(ite < n*100, "QR algorithm failed. Probably, your matrix"
-		  " is not real symmetric or complex hermitian");
-    }
-    
-    extract_eig(Tri, eigval, tol);
-  }
-
-  template <typename MAT1, typename VECT, typename MAT2>
-  void symmetric_qr_algorithm(const MAT1 &A, const VECT &eigval_,
-			      const MAT2 &eigvect_,
-			      tol_type_for_qr tol = default_tol_for_qr,
-			      bool compvect = true) {
-    VECT &eigval = const_cast<VECT &>(eigval_);
-    MAT2 &eigvect = const_cast<MAT2 &>(eigvect_);
-    typedef typename linalg_traits<MAT1>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = mat_nrows(A), q = 0, p, ite = 0;
-    if (compvect) gmm::copy(identity_matrix(), eigvect);
-    if (n == 0) return;
-    if (n == 1) { eigval[0]=gmm::real(A(0,0)); return; }
-    dense_matrix<T> Tri(n, n);
-    gmm::copy(A, Tri);
-
-    Householder_tridiagonalization(Tri, eigvect, compvect);
-
-    std::vector<R> diag(n);
-    std::vector<T> sdiag(n);
-    for (size_type i = 0; i < n; ++i)
-      { diag[i] = gmm::real(Tri(i, i)); if (i+1 < n) sdiag[i] = Tri(i+1, i); }
-    
-    symmetric_qr_stop_criterion(diag, sdiag, p, q, tol);
-    
-    while (q < n) {
-      sub_interval SUBI(p, n-p-q), SUBJ(0, mat_ncols(eigvect)), SUBK(p, n-p-q);
-      if (!compvect) SUBK = sub_interval(0,0);
-      
-      symmetric_Wilkinson_qr_step(sub_vector(diag, SUBI),
-				  sub_vector(sdiag, SUBI),
-				  sub_matrix(eigvect, SUBJ, SUBK), compvect);
-
-      symmetric_qr_stop_criterion(diag, sdiag, p, q, tol*R(2));
-      ++ite;
-      GMM_ASSERT1(ite < n*100, "QR algorithm failed.");
-    }
-    
-    gmm::copy(diag, eigval);
-  }
-
-
-  template <typename MAT1, typename VECT>
-    void symmetric_qr_algorithm(const MAT1 &a, VECT &eigval,
-				tol_type_for_qr tol = default_tol_for_qr) {
-    dense_matrix<typename linalg_traits<MAT1>::value_type> m(0,0);
-    symmetric_qr_algorithm(a, eigval, m, tol, false);
-  }
-
-
-}
-
-#endif
-
diff --git a/Contrib/gmm/gmm_dense_sylvester.h b/Contrib/gmm/gmm_dense_sylvester.h
deleted file mode 100755
index 5a4c8fa..0000000
--- a/Contrib/gmm/gmm_dense_sylvester.h
+++ /dev/null
@@ -1,173 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/** @file gmm_dense_sylvester.h
-    @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-    @date June 5, 2003.
-    @brief Sylvester equation solver.
-*/
-#ifndef GMM_DENSE_SYLVESTER_H
-#define GMM_DENSE_SYLVESTER_H
-
-#include "gmm_kernel.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*   Kronecker system matrix.                                            */
-  /* ********************************************************************* */
-  template <typename MAT1, typename MAT2, typename MAT3>
-  void kron(const MAT1 &m1, const MAT2 &m2, const MAT3 &m3_,
-	    bool init = true) {
-    MAT3 &m3 = const_cast<MAT3 &>(m3_);
-    size_type m = mat_nrows(m1), n = mat_ncols(m1);
-    size_type l = mat_nrows(m2), k = mat_ncols(m2);
-
-    GMM_ASSERT2(mat_nrows(m3) == m*l && mat_ncols(m3) == n*k,
-		"dimensions mismatch");
-
-    for (size_type i = 0; i < m; ++i)
-      for (size_type j = 0; j < m; ++j)
-	if (init)
-	  gmm::copy(gmm::scaled(m2, m1(i,j)),
-		    gmm::sub_matrix(m3, sub_interval(l*i, l),
-				    sub_interval(k*j, k)));
-	else
-	  gmm::add(gmm::scaled(m2, m1(i,j)),
-		    gmm::sub_matrix(m3, sub_interval(l*i, l),
-				    sub_interval(k*j, k)));
-  }
-	
-
-  /* ********************************************************************* */
-  /*   Copy a matrix into a vector.                                        */
-  /* ********************************************************************* */
-
-  template <typename MAT, typename VECT>
-  colmatrix_to_vector(const MAT &A, VECT &v, col_major) {
-    size_type m = mat_nrows(A), n = mat_ncols(A);
-    GMM_ASSERT2(m*n == vect_size(v), "dimensions mismatch");
-    for (size_type i = 0; i < n; ++i)
-      gmm::copy(mat_col(A, i), sub_vector(v, sub_interval(i*m, m)));
-  }
-
-  template <typename MAT, typename VECT>
-  colmatrix_to_vector(const MAT &A, VECT &v, row_and_col)
-  { colmatrix_to_vector(A, v, col_major()); }
-
-  template <typename MAT, typename VECT>
-  colmatrix_to_vector(const MAT &A, VECT &v, col_and_row)
-  { colmatrix_to_vector(A, v, col_major()); }
-
-  template <typename MAT, typename VECT>
-  colmatrix_to_vector(const MAT &A, VECT &v, row_major) {
-    size_type m = mat_nrows(mat), n = mat_ncols(A);
-    GMM_ASSERT2(m*n == vect_size(v), "dimensions mismatch");
-    for (size_type i = 0; i < m; ++i)
-      gmm::copy(mat_row(A, i), sub_vector(v, sub_slice(i, n, m)));
-  }
-
-  template <typename MAT, typename VECT> inline
-  colmatrix_to_vector(const MAT &A, const VECT &v_) {
-    VECT &v = const_cast<VECT &>(v_);
-    colmatrix_to_vector(A, v, typename linalg_traits<MAT>::sub_orientation());
-  }
-
-
-  /* ********************************************************************* */
-  /*   Copy a vector into a matrix.                                        */
-  /* ********************************************************************* */
-
-  template <typename MAT, typename VECT>
-  vector_to_colmatrix(const VECT &v, MAT &A, col_major) {
-    size_type m = mat_nrows(A), n = mat_ncols(A);
-    GMM_ASSERT2(m*n == vect_size(v), "dimensions mismatch");
-    for (size_type i = 0; i < n; ++i)
-      gmm::copy(sub_vector(v, sub_interval(i*m, m)), mat_col(A, i));
-  }
-
-  template <typename MAT, typename VECT>
-  vector_to_colmatrix(const VECT &v, MAT &A, row_and_col)
-  { vector_to_colmatrix(v, A, col_major()); }
-
-  template <typename MAT, typename VECT>
-  vector_to_colmatrix(const VECT &v, MAT &A, col_and_row)
-  { vector_to_colmatrix(v, A, col_major()); }
-
-  template <typename MAT, typename VECT>
-  vector_to_colmatrix(const VECT &v, MAT &A, row_major) {
-    size_type m = mat_nrows(mat), n = mat_ncols(A);
-    GMM_ASSERT2(m*n == vect_size(v), "dimensions mismatch");
-    for (size_type i = 0; i < m; ++i)
-      gmm::copy(sub_vector(v, sub_slice(i, n, m)), mat_row(A, i));
-  }
-
-  template <typename MAT, typename VECT> inline
-  vector_to_colmatrix(const VECT &v, const MAT &A_) {
-    MAT &A = const_cast<MAT &>(A_);
-    vector_to_colmatrix(v, A, typename linalg_traits<MAT>::sub_orientation());
-  }
-
-  /* ********************************************************************* */
-  /*   Solve sylvester equation.                                           */
-  /* ********************************************************************* */
-
-  // very prohibitive solver, to be replaced ... 
-  template <typename MAT1, typename MAT2, typename MAT3, typename MAT4 >
-  void sylvester(const MAT1 &m1, const MAT2 &m2, const MAT3 &m3,
-		 const MAT4 &m4_) {
-    typedef typename linalg_traits<Mat>::value_type T;
-    
-    MAT3 &m4 = const_cast<MAT4 &>(m4_);
-    size_type m = mat_nrows(m1), n = mat_ncols(m1);
-    size_type l = mat_nrows(m2), k = mat_ncols(m2);
-    
-    GMM_ASSERT2(m == n && l == k && m == mat_nrows(m3) &&
-		l == mat_ncols(m3) && m == mat_nrows(m4) && l == mat_ncols(m4),
-		"dimensions mismatch");
-
-    gmm::dense_matrix<T> akronb(m*l, m*l);
-    gmm::dense_matrix<T> idm(m, m), idl(l,l);
-    gmm::copy(identity_matrix(), idm);
-    gmm::copy(identity_matrix(), idl);
-    std::vector<T> x(m*l), c(m*l);
-    
-    kron(idl, m1, akronb);
-    kron(gmm::transposed(m2), idm, akronb, false);
-
-    colmatrix_to_vector(m3, c);
-    lu_solve(akronb, c, x);
-    vector_to_colmatrix(x, m4);
-
-  }
-}
-
-#endif
-
diff --git a/Contrib/gmm/gmm_domain_decomp.h b/Contrib/gmm/gmm_domain_decomp.h
deleted file mode 100755
index a2f9d52..0000000
--- a/Contrib/gmm/gmm_domain_decomp.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2004-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/** @file gmm_domain_decomp.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date May 21, 2004.
-    @brief Domain decomposition.
-*/
-#ifndef GMM_DOMAIN_DECOMP_H__
-#define GMM_DOMAIN_DECOMP_H__
-
-#include "gmm_kernel.h"
-#include <map>
-
-
-namespace gmm {
-
-  /** This function separates into small boxes of size msize with a ratio
-   * of overlap (in [0,1[) a set of points. The result is given into a
-   * vector of sparse matrices vB.
-   */
-  template <typename Matrix, typename Point>
-  void rudimentary_regular_decomposition(std::vector<Point> pts,
-					 double msize,
-					 double overlap,
-					 std::vector<Matrix> &vB) {
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef abstract_null_type void_type;
-    typedef std::map<size_type, void_type> map_type;
-
-    size_type nbpts = pts.size();
-    if (!nbpts || pts[0].size() == 0) { vB.resize(0); return; }
-    int dim = int(pts[0].size());
-
-    // computation of the global box and the number of sub-domains
-    Point pmin = pts[0], pmax = pts[0];
-    for (size_type i = 1; i < nbpts; ++i)
-      for (int k = 0; k < dim; ++k) {
-	pmin[k] = std::min(pmin[k], pts[i][k]);
-	pmax[k] = std::max(pmax[k], pts[i][k]);
-      }
-    
-    std::vector<size_type> nbsub(dim), mult(dim);
-    std::vector<int> pts1(dim), pts2(dim);
-    size_type nbtotsub = 1;
-    for (int k = 0; k < dim; ++k) {
-      nbsub[k] = size_type((pmax[k] - pmin[k]) / msize)+1;
-      mult[k] = nbtotsub; nbtotsub *= nbsub[k];
-    }
-    
-    std::vector<map_type> subs(nbtotsub);
-    // points ventilation
-    std::vector<size_type> ns(dim), na(dim), nu(dim);
-    for (size_type i = 0; i < nbpts; ++i) {
-      for (int k = 0; k < dim; ++k) {
-	register double a = (pts[i][k] - pmin[k]) / msize;
-	ns[k] = size_type(a) - 1; na[k] = 0;
-	pts1[k] = int(a + overlap); pts2[k] = int(ceil(a-1.0-overlap));
-      }
-      size_type sum = 0;
-      do {
-	bool ok = 1;
-	for (int k = 0; k < dim; ++k)
-	  if ((ns[k] >= nbsub[k]) || (pts1[k] < int(ns[k]))
-	      || (pts2[k] > int(ns[k]))) { ok = false; break; }
-	if (ok) {
-	  size_type ind = ns[0];
-	  for (int k=1; k < dim; ++k) ind += ns[k]*mult[k];
-	  subs[ind][i] = void_type();
-	}
-	for (int k = 0; k < dim; ++k) {
-	  if (na[k] < 2) { na[k]++; ns[k]++; ++sum; break; }
-	  na[k] = 0; ns[k] -= 2; sum -= 2;
-	}
-      } while (sum);
-    }
-    // delete too small domains.
-    size_type nbmaxinsub = 0;
-    for (size_type i = 0; i < nbtotsub; ++i)
-      nbmaxinsub = std::max(nbmaxinsub, subs[i].size());
-    
-    std::fill(ns.begin(), ns.end(), size_type(0));
-    for (size_type i = 0; i < nbtotsub; ++i) {
-      if (subs[i].size() > 0 && subs[i].size() < nbmaxinsub / 10) {
-	
-	for (int k = 0; k < dim; ++k) nu[k] = ns[k];
-	size_type nbmax = 0, imax = 0;
-	
-	for (int l = 0; l < dim; ++l) {
-	  nu[l]--;
-	  for (int m = 0; m < 2; ++m, nu[l]+=2) {
-	    bool ok = true;
-	    for (int k = 0; k < dim && ok; ++k) 
-	      if (nu[k] >= nbsub[k]) ok = false;
-	    if (ok) {
-	      size_type ind = ns[0];
-	      for (int k=1; k < dim; ++k) ind += ns[k]*mult[k];
-	      if (subs[ind].size() > nbmax)
-		{ nbmax = subs[ind].size(); imax = ind; }
-	    }
-	  }
-	  nu[l]--;
-	}
-	
-	if (nbmax > subs[i].size()) {
-	  for (map_type::iterator it=subs[i].begin(); it!=subs[i].end(); ++it)
-	    subs[imax][it->first] = void_type();
-	  subs[i].clear();
-	}
-      }
-      for (int k = 0; k < dim; ++k)
-	{ ns[k]++; if (ns[k] < nbsub[k]) break; ns[k] = 0; }
-    }
-    
-    // delete empty domains.
-    size_type effnb = 0;
-    for (size_type i = 0; i < nbtotsub; ++i) {
-      if (subs[i].size() > 0)
-	{ if (i != effnb) std::swap(subs[i], subs[effnb]); ++effnb; }
-    }
-
-    // build matrices
-    subs.resize(effnb);
-    vB.resize(effnb);
-    for (size_type i = 0; i < effnb; ++i) {
-      clear(vB[i]); resize(vB[i], nbpts, subs[i].size());
-      size_type j = 0;
-      for (map_type::iterator it=subs[i].begin(); it!=subs[i].end(); ++it, ++j)
-	vB[i](it->first, j) = value_type(1);
-    }
-  }
-  
-
-}
-
-
-#endif
diff --git a/Contrib/gmm/gmm_except.h b/Contrib/gmm/gmm_except.h
deleted file mode 100755
index 24b4ab7..0000000
--- a/Contrib/gmm/gmm_except.h
+++ /dev/null
@@ -1,333 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/** @file gmm_except.h 
-    @author Yves Renard <Yves.Renard at insa-lyon.fr>
-    @author Julien Pommier <Julien.Pommier at insa-toulouse.fr>
-    @date September 01, 2002.
-    @brief Definition of basic exceptions.
-*/
-
-#ifndef GMM_EXCEPT_H__
-#define GMM_EXCEPT_H__
-
-#include "gmm_std.h"
-
-namespace gmm {
-
-/* *********************************************************************** */
-/*	Getfem++ generic errors.                     			   */
-/* *********************************************************************** */
-
-  class gmm_error: public std::logic_error {
-  public:
-    gmm_error(const std::string& what_arg): std::logic_error (what_arg) {}
-  };
-
-#ifdef GETFEM_HAVE_PRETTY_FUNCTION
-#  define GMM_PRETTY_FUNCTION __PRETTY_FUNCTION__
-#else 
-#  define GMM_PRETTY_FUNCTION ""
-#endif
-
-  // Errors : GMM_THROW should not be used on its own.
-  //          GMM_ASSERT1 : Non-maskable errors. Typically for in/ouput and
-  //               when the test do not significantly reduces the performance.
-  //          GMM_ASSERT2 : All tests which are potentially performance
-  //               consuming. Not hidden by default. Hidden when NDEBUG is
-  //               defined.
-  //          GMM_ASSERT3 : For internal checks. Hidden by default. Active
-  //               only when DEBUG_MODE is defined.
-
-#ifdef __EXCEPTIONS
-  inline void short_error_throw(const char *file, int line, const char *func,
-				const char *errormsg) {
-    std::stringstream msg;
-    msg << "Error in " << file << ", line " << line << " " << func
-	<< ": \n" << errormsg << ends;
-    throw gmm::gmm_error(msg.str());	
-  }
-# define GMM_THROW_(type, errormsg) {					\
-    std::stringstream msg;						\
-    msg << "Error in "__FILE__ << ", line "				\
-	<< __LINE__ << " " << GMM_PRETTY_FUNCTION << ": \n"		\
-	<< errormsg << ends;						\
-    throw (type)(msg.str());						\
-  }
-#else
-  inline void short_error_throw(const char *file, int line, const char *func,
-				const char *errormsg) {
-    std::stringstream msg;
-    msg << "Error in " << file << ", line " << line << " " << func
-	<< ": \n" << errormsg << ends;
-    ::abort();	
-  }
-# define GMM_THROW_(type, errormsg) {					\
-    std::stringstream msg;						\
-    msg << "Error in "__FILE__ << ", line "				\
-	<< __LINE__ << " " << GMM_PRETTY_FUNCTION << ": \n"		\
-	<< errormsg   << ends;						\
-    ::abort();								\
-  }
-#endif
-  
-# define GMM_ASSERT1(test, errormsg)		        		\
-  { if (!(test)) GMM_THROW_(gmm::gmm_error, errormsg); }
-
-  // inline void GMM_THROW() IS_DEPRECATED;
-  inline void GMM_THROW() {}
-#define GMM_THROW(a, b) { GMM_THROW_(a,b); gmm::GMM_THROW(); }
-
-#if defined(NDEBUG)
-# define GMM_ASSERT2(test, errormsg)
-# define GMM_ASSERT3(test, errormsg)
-#elif !defined(GMM_FULL_NDEBUG)
-# define GMM_ASSERT2(test, errormsg)				        \
-  { if (!(test)) gmm::short_error_throw(__FILE__, __LINE__,		\
-				   GMM_PRETTY_FUNCTION, errormsg); }
-# define GMM_ASSERT3(test, errormsg)				        \
-  { if (!(test)) gmm::short_error_throw(__FILE__, __LINE__,		\
-				   GMM_PRETTY_FUNCTION, errormsg); }
-#else
-# define GMM_ASSERT2(test, errormsg)          				\
-  { if (!(test)) gmm::short_error_throw(__FILE__, __LINE__,		\
-				   GMM_PRETTY_FUNCTION, errormsg); }
-# define GMM_ASSERT3(test, errormsg)
-#endif
-
-/* *********************************************************************** */
-/*	Getfem++ warnings.                         			   */
-/* *********************************************************************** */
-
-  // This allows to dynamically hide warnings
-  struct warning_level {
-    static int level(int l = -2)
-    { static int level_ = 3; return (l != -2) ? (level_ = l) : level_; }
-  };
-
-  inline void set_warning_level(int l) { warning_level::level(std::max(0,l)); }
-  inline int  get_warning_level(void)  { return warning_level::level(-2); }
-
-  // This allow not too compile some Warnings
-#ifndef GMM_WARNING_LEVEL
-# define GMM_WARNING_LEVEL 4
-#endif
-
-  // Warning levels : 0 always printed
-  //                  1 very important : specify a possible error in the code.
-  //                  2 important : specify a default of optimization for inst.
-  //                  3 remark
-  //                  4 ignored by default.
-
-#define GMM_WARNING_MSG(level_, thestr)  {			       \
-      std::stringstream msg;                                           \
-      msg << "Level " << level_ << " Warning in "__FILE__ << ", line " \
-          << __LINE__ << ": " << thestr << ends;		       \
-       std::cerr << msg.str() << std::endl;                            \
-    }
-
-#define GMM_WARNING0(thestr) GMM_WARNING_MSG(0, thestr)
-
-#if GMM_WARNING_LEVEL > 0
-# define GMM_WARNING1(thestr)                                           \
-  { if (1 <= gmm::warning_level::level()) GMM_WARNING_MSG(1, thestr) }
-#else
-# define GMM_WARNING1(thestr) {}
-#endif
-
-#if GMM_WARNING_LEVEL > 1
-# define GMM_WARNING2(thestr)                                           \
-  { if (2 <= gmm::warning_level::level()) GMM_WARNING_MSG(2, thestr) } 
-#else
-# define GMM_WARNING1(thestr) {}
-#endif
-
-#if GMM_WARNING_LEVEL > 2
-# define GMM_WARNING3(thestr)                                           \
-  { if (3 <= gmm::warning_level::level()) GMM_WARNING_MSG(3, thestr) } 
-#else
-# define GMM_WARNING1(thestr) {}
-#endif
-
-#if GMM_WARNING_LEVEL > 3
-# define GMM_WARNING4(thestr)                                           \
-  { if (4 <= gmm::warning_level::level()) GMM_WARNING_MSG(4, thestr) } 
-#else
-# define GMM_WARNING1(thestr) {}
-#endif
-
-/* *********************************************************************** */
-/*	Getfem++ traces.                         			   */
-/* *********************************************************************** */
-
-  // This allows to dynamically hide traces
-  struct traces_level {
-    static int level(int l = -2)
-    { static int level_ = 3; return (l != -2) ? (level_ = l) : level_; }
-  };
-
-  inline void set_traces_level(int l) { traces_level::level(std::max(0,l)); }
-
-  // This allow not too compile some Warnings
-#ifndef GMM_TRACES_LEVEL
-# define GMM_TRACES_LEVEL 3
-#endif
-
-  // Traces levels : 0 always printed
-  //                 1 Susceptible to occur once in a program.
-  //                 2 Susceptible to occur occasionnaly in a program (10).
-  //                 3 Susceptible to occur often (100).
-  //                 4 Susceptible to occur very often (>1000).
-
-#define GMM_TRACE_MSG_MPI     // for Parallelized version
-#define GMM_TRACE_MSG(level_, thestr)  {			       \
-    GMM_TRACE_MSG_MPI {						       \
-      std::stringstream msg;                                           \
-      msg << "Trace " << level_ << " in "__FILE__ << ", line "         \
-          << __LINE__ << ": " << thestr				       \
-          << ends;						       \
-      std::cout << msg.str() << std::endl;			       \
-    }                                                                  \
-  }        
-
-#define GMM_TRACE0(thestr) GMM_TRACE_MSG(0, thestr)
-
-#if GMM_TRACES_LEVEL > 0
-# define GMM_TRACE1(thestr)						\
-  { if (1 <= gmm::traces_level::level()) GMM_TRACE_MSG(1, thestr) }
-#else
-# define GMM_TRACE1(thestr) {}
-#endif
-  
-#if GMM_TRACES_LEVEL > 1
-# define GMM_TRACE2(thestr)						\
-  { if (2 <= gmm::traces_level::level()) GMM_TRACE_MSG(2, thestr) } 
-#else
-# define GMM_TRACE2(thestr) {}
-#endif
-  
-#if GMM_TRACES_LEVEL > 2
-# define GMM_TRACE3(thestr)						\
-  { if (3 <= gmm::traces_level::level()) GMM_TRACE_MSG(3, thestr) } 
-#else
-# define GMM_TRACE3(thestr) {}
-#endif
-  
-#if GMM_TRACES_LEVEL > 3
-# define GMM_TRACE4(thestr)						\
-  { if (4 <= gmm::traces_level::level()) GMM_TRACE_MSG(4, thestr) } 
-#else
-# define GMM_TRACE4(thestr) {}
-#endif
-  
-  
-  /* ********************************************************************* */
-  /*    Definitions for compatibility with old versions.        	   */
-  /* ********************************************************************* */ 
-  
-  using std::invalid_argument;
-  
-  struct dimension_error : public std::logic_error
-  { dimension_error(const std::string& w): std::logic_error(w) {} };
-  struct file_not_found_error : public std::logic_error
-  { file_not_found_error(const std::string& w): std::logic_error (w) {} };
-  struct internal_error : public std::logic_error
-  { internal_error(const std::string& w): std::logic_error(w) {} };
-  struct failure_error : public std::logic_error
-  { failure_error(const std::string& w): std::logic_error (w) {} };
-  struct not_linear_error : public std::logic_error
-  { not_linear_error(const std::string& w): std::logic_error (w) {} };
-  struct to_be_done_error : public std::logic_error
-  { to_be_done_error(const std::string& w): std::logic_error (w) {} };
-
-#define GMM_STANDARD_CATCH_ERROR   catch(std::logic_error e)	\
-    {								\
-      cerr << "============================================\n";	\
-      cerr << "|      An error has been detected !!!      |\n";	\
-      cerr << "============================================\n";	\
-      cerr << e.what() << endl << endl;				\
-      exit(1);							\
-    }								\
-  catch(std::runtime_error e)					\
-    {								\
-      cerr << "============================================\n";	\
-      cerr << "|      An error has been detected !!!      |\n";	\
-      cerr << "============================================\n";	\
-      cerr << e.what() << endl << endl;				\
-      exit(1);							\
-    }								\
-  catch(std::bad_alloc) {					\
-    cerr << "============================================\n";	\
-    cerr << "|  A bad allocation has been detected !!!  |\n";	\
-    cerr << "============================================\n";	\
-    exit(1);							\
-  }								\
-  catch(std::bad_typeid) {					\
-    cerr << "============================================\n";	\
-    cerr << "|  A bad typeid     has been detected !!!  |\n";	\
-    cerr << "============================================\n";	\
-    exit(1);							\
-  }								\
-  catch(std::bad_exception) {					\
-    cerr << "============================================\n";	\
-    cerr << "|  A bad exception  has been detected !!!  |\n";	\
-    cerr << "============================================\n";	\
-    exit(1);							\
-  }								\
-  catch(std::bad_cast) {					\
-    cerr << "============================================\n";	\
-    cerr << "|    A bad cast  has been detected !!!     |\n";	\
-    cerr << "============================================\n";	\
-    exit(1);							\
-  }								\
-  catch(...) {							\
-    cerr << "============================================\n";	\
-    cerr << "|  An unknown error has been detected !!!  |\n";	\
-    cerr << "============================================\n";	\
-    exit(1);							\
-  }
-  //   catch(ios_base::failure) { 
-  //     cerr << "============================================\n";
-  //     cerr << "| A ios_base::failure has been detected !!!|\n";
-  //     cerr << "============================================\n";
-  //     exit(1);
-  //   } 
-
-#if defined(__GNUC__) && (__GNUC__ > 3)
-# define GMM_SET_EXCEPTION_DEBUG				\
-  std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
-#else
-# define GMM_SET_EXCEPTION_DEBUG
-#endif
-
-}
-
-
-#endif /* GMM_EXCEPT_H__ */
diff --git a/Contrib/gmm/gmm_inoutput.h b/Contrib/gmm/gmm_inoutput.h
deleted file mode 100755
index e2455d1..0000000
--- a/Contrib/gmm/gmm_inoutput.h
+++ /dev/null
@@ -1,1131 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_inoutput.h
-   @author Yves Renard <Yves.Renard at insa-lyon.fr>
-   @author Julien Pommier <Julien.Pommier at insa-toulouse.fr>
-   @date July 8, 2003.
-   @brief Input/output on sparse matrices
-
-   Support Harwell-Boeing and Matrix-Market formats.
-*/
-#ifndef GMM_INOUTPUT_H
-#define GMM_INOUTPUT_H
-
-#include <stdio.h>
-#include "gmm_kernel.h"
-namespace gmm {
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  Functions to read and write Harwell Boeing format.                   */
-  /*                                                                       */
-  /*************************************************************************/
-
-  // Fri Aug 15 16:29:47 EDT 1997
-  // 
-  //                      Harwell-Boeing File I/O in C
-  //                               V. 1.0
-  // 
-  //          National Institute of Standards and Technology, MD.
-  //                            K.A. Remington
-  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-  //                                NOTICE
-  //
-  // Permission to use, copy, modify, and distribute this software and
-  // its documentation for any purpose and without fee is hereby granted
-  // provided that the above copyright notice appear in all copies and
-  // that both the copyright notice and this permission notice appear in
-  // supporting documentation.
-  //
-  // Neither the Author nor the Institution (National Institute of Standards
-  // and Technology) make any representations about the suitability of this 
-  // software for any purpose. This software is provided "as is" without 
-  // expressed or implied warranty.
-  // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-  inline void IOHBTerminate(const char *a) { GMM_ASSERT1(false, a);}
-
-  inline bool is_complex_double__(std::complex<double>) { return true; }
-  inline bool is_complex_double__(double) { return false; }
-
-  inline int ParseIfmt(const char *fmt, int* perline, int* width) {
-    if (SECURE_NONCHAR_SSCANF(fmt, " (%dI%d)", perline, width) != 2) {
-      *perline = 1;
-      int s = SECURE_NONCHAR_SSCANF(fmt, " (I%d)", width);
-      GMM_ASSERT1(s == 1, "invalid HB I-format: " << fmt);
-    }
-    return *width;
-  }
-  
-  inline int ParseRfmt(const char *fmt, int* perline, int* width,
-		       int* prec, int* flag) {
-    char p;
-    *perline = *width = *flag = *prec = 0;
-#ifdef GMM_SECURE_CRT
-    if (sscanf_s(fmt, " (%d%c%d.%d)", perline, &p, sizeof(char), width, prec)
-	< 3 || !strchr("PEDF", p))
-#else
-    if (sscanf(fmt, " (%d%c%d.%d)", perline, &p, width, prec) < 3
-	|| !strchr("PEDF", p))
-#endif
-	{
-      *perline = 1;
-#ifdef GMM_SECURE_CRT
-      int s = sscanf_s(fmt, " (%c%d.%d)", &p, sizeof(char), width, prec);
-#else
-      int s = sscanf(fmt, " (%c%d.%d)", &p, width, prec);
-#endif
-      GMM_ASSERT1(s>=2 && strchr("PEDF",p), "invalid HB REAL format: " << fmt);
-    }
-    *flag = p;
-    return *width;
-  }
-      
-  /** matrix input/output for Harwell-Boeing format */
-  struct HarwellBoeing_IO {
-    int nrows() const { return Nrow; }
-    int ncols() const { return Ncol; }
-    int nnz() const { return Nnzero; }
-    int is_complex() const { return Type[0] == 'C'; }
-    int is_symmetric() const { return Type[1] == 'S'; }
-    int is_hermitian() const { return Type[1] == 'H'; }
-    HarwellBoeing_IO() { clear(); }
-    HarwellBoeing_IO(const char *filename) { clear(); open(filename); }
-    ~HarwellBoeing_IO() { close(); }
-    /** open filename and reads header */
-    void open(const char *filename);
-    /** read the opened file */
-    template <typename T, int shift> void read(csc_matrix<T, shift>& A);
-    template <typename MAT> void read(MAT &M) IS_DEPRECATED;
-    template <typename T, int shift>
-    static void write(const char *filename, const csc_matrix<T, shift>& A);
-    template <typename T, int shift>
-    static void write(const char *filename, const csc_matrix<T, shift>& A,
-		      const std::vector<T> &rhs);
-    template <typename T, typename INDI, typename INDJ, int shift> 
-    static void write(const char *filename,
-		      const csc_matrix_ref<T*, INDI*, INDJ*, shift>& A);
-    template <typename T, typename INDI, typename INDJ, int shift> 
-    static void write(const char *filename,
-		      const csc_matrix_ref<T*, INDI*, INDJ*, shift>& A,
-		      const std::vector<T> &rhs);
-
-    /** static method for saving the matrix */
-    template <typename MAT> static void write(const char *filename,
-					      const MAT& A) IS_DEPRECATED;
-  private:
-    FILE *f;
-    char Title[73], Key[9], Rhstype[4], Type[4];
-    int Nrow, Ncol, Nnzero, Nrhs;
-    char Ptrfmt[17], Indfmt[17], Valfmt[21], Rhsfmt[21];
-    int Ptrcrd, Indcrd, Valcrd, Rhscrd; 
-    int lcount;
-
-
-    void close() { if (f) fclose(f); clear(); }
-    void clear() { 
-      Nrow = Ncol = Nnzero = Nrhs = 0; f = 0; lcount = 0;
-      memset(Type, 0, sizeof Type); 
-      memset(Key, 0, sizeof Key); 
-      memset(Title, 0, sizeof Title); 
-    }
-    char *getline(char *buf) { 
-      fgets(buf, BUFSIZ, f); ++lcount;
-      int s = SECURE_NONCHAR_SSCANF(buf,"%*s");
-      GMM_ASSERT1(s >= 0, "blank line in HB file at line " << lcount);
-      return buf;
-    }
-
-    int substrtoi(const char *p, size_type len) {
-      char s[100]; len = std::min(len, sizeof s - 1);
-      SECURE_STRNCPY(s, 100, p, len); s[len] = 0; return atoi(s);
-    }
-    double substrtod(const char *p, size_type len, int Valflag) {
-      char s[100]; len = std::min(len, sizeof s - 1);
-      SECURE_STRNCPY(s, 100, p, len); s[len] = 0;
-      if ( Valflag != 'F' && !strchr(s,'E')) {
-	/* insert a char prefix for exp */
-	int last = strlen(s);
-	for (int j=last+1;j>=0;j--) {
-	  s[j] = s[j-1];
-	  if ( s[j] == '+' || s[j] == '-' ) {
-	    s[j-1] = Valflag;                    
-	    break;
-	  }
-	}
-      }
-      return atof(s);
-    }
-    template <typename IND_TYPE>   
-    int readHB_data(IND_TYPE colptr[], IND_TYPE rowind[], 
-		    double val[]) {
-      /***********************************************************************/
-      /*  This function opens and reads the specified file, interpreting its */
-      /*  contents as a sparse matrix stored in the Harwell/Boeing standard  */
-      /*  format and creating compressed column storage scheme vectors to    */
-      /*  hold the index and nonzero value information.                      */
-      /*                                                                     */
-      /*    ----------                                                       */
-      /*    **CAVEAT**                                                       */
-      /*    ----------                                                       */
-      /*  Parsing real formats from Fortran is tricky, and this file reader  */
-      /*  does not claim to be foolproof.   It has been tested for cases     */
-      /*  when the real values are printed consistently and evenly spaced on */
-      /*  each line, with Fixed (F), and Exponential (E or D) formats.       */
-      /*                                                                     */
-      /*  **  If the input file does not adhere to the H/B format, the  **   */
-      /*  **             results will be unpredictable.                 **   */
-      /*                                                                     */
-      /***********************************************************************/
-      int i,ind,col,offset,count;
-      int Ptrperline, Ptrwidth, Indperline, Indwidth;
-      int Valperline, Valwidth, Valprec, Nentries;
-      int Valflag;           /* Indicates 'E','D', or 'F' float format */
-      char line[BUFSIZ];
-
-      /*  Parse the array input formats from Line 3 of HB file  */
-      ParseIfmt(Ptrfmt,&Ptrperline,&Ptrwidth);
-      ParseIfmt(Indfmt,&Indperline,&Indwidth);
-      if ( Type[0] != 'P' ) {          /* Skip if pattern only  */
-	ParseRfmt(Valfmt,&Valperline,&Valwidth,&Valprec,&Valflag);
-      }
-
-      cout << "Valwidth = " << Valwidth << endl; getchar();
-    
-      /*  Read column pointer array:   */
-      offset = 0;         /* if base 0 storage is declared (via macro def),  */
-      /* then storage entries are offset by 1            */
-    
-      for (count = 0, i=0;i<Ptrcrd;i++) {
-	getline(line);
-	for (col = 0, ind = 0;ind<Ptrperline;ind++) {
-	  if (count > Ncol) break;
-	  colptr[count] = substrtoi(line+col,Ptrwidth)-offset;
-	  count++; col += Ptrwidth;
-	}
-      }
-    
-      /*  Read row index array:  */    
-      for (count = 0, i=0;i<Indcrd;i++) {
-	getline(line);
-	for (col = 0, ind = 0;ind<Indperline;ind++) {
-	  if (count == Nnzero) break;
-	  rowind[count] = substrtoi(line+col,Indwidth)-offset;
-	  count++; col += Indwidth;
-	}
-      }
-    
-      /*  Read array of values:  */
-      if ( Type[0] != 'P' ) {          /* Skip if pattern only  */
-	if ( Type[0] == 'C' ) Nentries = 2*Nnzero;
-	else Nentries = Nnzero;
-      
-	count = 0;
-	for (i=0;i<Valcrd;i++) {
-	  getline(line);
-	  if (Valflag == 'D')  {
-            // const_cast Due to aCC excentricity
-	    char *p;
-	    while( (p = const_cast<char *>(strchr(line,'D')) )) *p = 'E';
-	  }
-	  for (col = 0, ind = 0;ind<Valperline;ind++) {
-	    if (count == Nentries) break;
-	    val[count] = substrtod(line+col, Valwidth, Valflag);
-	    count++; col += Valwidth;
-	  }
-	}
-      }
-      return 1;
-    }
-  };
-  
-  inline void HarwellBoeing_IO::open(const char *filename) {
-    int Totcrd,Neltvl,Nrhsix;
-    char line[BUFSIZ];
-    close();
-    SECURE_FOPEN(&f, filename, "r");
-    GMM_ASSERT1(f, "could not open " << filename);
-    /* First line: */
-#ifdef GMM_SECURE_CRT
-    sscanf_s(getline(line), "%c%s", Title, 72, Key, 8);
-#else
-    sscanf(getline(line), "%72c%8s", Title, Key);
-#endif
-    Key[8] = Title[72] = 0;
-    /* Second line: */
-    Totcrd = Ptrcrd = Indcrd = Valcrd = Rhscrd = 0;
-    SECURE_NONCHAR_SSCANF(getline(line), "%d%d%d%d%d", &Totcrd, &Ptrcrd,
-			  &Indcrd, &Valcrd, &Rhscrd);
-    
-    /* Third line: */
-    Nrow = Ncol = Nnzero = Neltvl = 0;
-#ifdef GMM_SECURE_CRT
-    if (sscanf_s(getline(line), "%c%d%d%d%d", Type, 3, &Nrow, &Ncol, &Nnzero,
-		 &Neltvl) < 1)
-#else
-    if (sscanf(getline(line), "%3c%d%d%d%d", Type, &Nrow, &Ncol, &Nnzero,
-	       &Neltvl) < 1)
-#endif
-      IOHBTerminate("Invalid Type info, line 3 of Harwell-Boeing file.\n");
-    for (size_type i = 0; i < 3; ++i) Type[i] = toupper(Type[i]);
-    
-      /*  Fourth line:  */
-#ifdef GMM_SECURE_CRT
-    if ( sscanf_s(getline(line), "%c%c%c%c",Ptrfmt, 16,Indfmt, 16,Valfmt,
-		  20,Rhsfmt, 20) < 3)
-#else
-    if ( sscanf(getline(line), "%16c%16c%20c%20c",Ptrfmt,Indfmt,Valfmt,
-		Rhsfmt) < 3)
-#endif
-      IOHBTerminate("Invalid format info, line 4 of Harwell-Boeing file.\n"); 
-    Ptrfmt[16] = Indfmt[16] = Valfmt[20] = Rhsfmt[20] = 0;
-    
-    /*  (Optional) Fifth line: */
-    if (Rhscrd != 0 ) { 
-      Nrhs = Nrhsix = 0;
-#ifdef GMM_SECURE_CRT
-      if ( sscanf_s(getline(line), "%c%d%d", Rhstype, 3, &Nrhs, &Nrhsix) != 1)
-#else
-      if ( sscanf(getline(line), "%3c%d%d", Rhstype, &Nrhs, &Nrhsix) != 1)
-#endif
-	IOHBTerminate("Invalid RHS type information, line 5 of"
-		      " Harwell-Boeing file.\n");
-    }
-  }
-
-  /* only valid for double and complex<double> csc matrices */
-  template <typename T, int shift> void
-  HarwellBoeing_IO::read(csc_matrix<T, shift>& A) {
-
-    typedef typename csc_matrix<T, shift>::IND_TYPE IND_TYPE;
-
-    GMM_ASSERT1(f, "no file opened!");
-    GMM_ASSERT1(Type[0] != 'P',
-		"Bad HB matrix format (pattern matrices not supported)");
-    GMM_ASSERT1(!is_complex_double__(T()) || Type[0] != 'R',
-		"Bad HB matrix format (file contains a REAL matrix)");
-    GMM_ASSERT1(is_complex_double__(T()) || Type[0] != 'C',
-		"Bad HB matrix format (file contains a COMPLEX matrix)");
-    if (A.pr) { delete[] A.pr; delete[] A.ir; delete[] A.jc; }
-    A.nc = ncols(); A.nr = nrows();
-    A.pr = 0;
-    A.jc = new IND_TYPE[ncols()+1];
-    A.ir = new IND_TYPE[nnz()];
-    A.pr = new T[nnz()];
-    readHB_data(A.jc, A.ir, (double*)A.pr);
-    for (int i = 0; i <= ncols(); ++i) { A.jc[i] += shift; A.jc[i] -= 1; }
-    for (int i = 0; i < nnz(); ++i)    { A.ir[i] += shift; A.ir[i] -= 1; }
-  }
-
-  template <typename MAT> void 
-  HarwellBoeing_IO::read(MAT &M) {
-    csc_matrix<typename gmm::linalg_traits<MAT>::value_type> csc;
-    read(csc); 
-    resize(M, mat_nrows(csc), mat_ncols(csc));
-    copy(csc, M);
-  }
-  
-  template <typename IND_TYPE> 
-  inline int writeHB_mat_double(const char* filename, int M, int N, int nz,
-				const IND_TYPE colptr[],
-				const IND_TYPE rowind[], 
-				const double val[], int Nrhs,
-				const double rhs[], const double guess[],
-				const double exact[], const char* Title,
-				const char* Key, const char* Type, 
-				const char* Ptrfmt, const char* Indfmt,
-				const char* Valfmt, const char* Rhsfmt,
-				const char* Rhstype, int shift) {
-    /************************************************************************/
-    /*  The writeHB function opens the named file and writes the specified  */
-    /*  matrix and optional right-hand-side(s) to that file in              */
-    /*  Harwell-Boeing format.                                              */
-    /*                                                                      */
-    /*  For a description of the Harwell Boeing standard, see:              */
-    /*            Duff, et al.,  ACM TOMS Vol.15, No.1, March 1989          */
-    /*                                                                      */
-    /************************************************************************/
-    FILE *out_file;
-    int i, entry, offset, j, acount, linemod;
-    int totcrd, ptrcrd, indcrd, valcrd, rhscrd;
-    int nvalentries, nrhsentries;
-    int Ptrperline, Ptrwidth, Indperline, Indwidth;
-    int Rhsperline, Rhswidth, Rhsprec, Rhsflag;
-    int Valperline, Valwidth, Valprec;
-    int Valflag;           /* Indicates 'E','D', or 'F' float format */
-    char pformat[16],iformat[16],vformat[19],rformat[19];
-    
-    if ( Type[0] == 'C' )
-      { nvalentries = 2*nz; nrhsentries = 2*M; }
-    else
-      { nvalentries = nz; nrhsentries = M; }
-    
-    if ( filename != NULL ) {
-      SECURE_FOPEN(&out_file, filename, "w");
-      GMM_ASSERT1(out_file != NULL, "Error: Cannot open file: " << filename);
-    } else out_file = stdout;
-    
-    if ( Ptrfmt == NULL ) Ptrfmt = "(8I10)";
-    ParseIfmt(Ptrfmt, &Ptrperline, &Ptrwidth);
-    SECURE_SPRINTF1(pformat,sizeof(pformat),"%%%dd",Ptrwidth);
-    ptrcrd = (N+1)/Ptrperline;
-    if ( (N+1)%Ptrperline != 0) ptrcrd++;
-    
-    if ( Indfmt == NULL ) Indfmt =  Ptrfmt;
-    ParseIfmt(Indfmt, &Indperline, &Indwidth);
-    SECURE_SPRINTF1(iformat,sizeof(iformat), "%%%dd",Indwidth);
-    indcrd = nz/Indperline;
-    if ( nz%Indperline != 0) indcrd++;
-    
-    if ( Type[0] != 'P' ) {          /* Skip if pattern only  */
-      if ( Valfmt == NULL ) Valfmt = "(4E21.13)";
-      ParseRfmt(Valfmt, &Valperline, &Valwidth, &Valprec, &Valflag);
-      if (Valflag == 'D') *strchr(Valfmt,'D') = 'E';
-      if (Valflag == 'F')
-	SECURE_SPRINTF2(vformat, sizeof(vformat), "%% %d.%df", Valwidth,
-			Valprec);
-      else
-	SECURE_SPRINTF2(vformat, sizeof(vformat), "%% %d.%dE", Valwidth,
-			Valprec);
-      valcrd = nvalentries/Valperline;
-      if ( nvalentries%Valperline != 0) valcrd++;
-    } else valcrd = 0;
-    
-    if ( Nrhs > 0 ) {
-      if ( Rhsfmt == NULL ) Rhsfmt = Valfmt;
-      ParseRfmt(Rhsfmt,&Rhsperline,&Rhswidth,&Rhsprec, &Rhsflag);
-      if (Rhsflag == 'F')
-	SECURE_SPRINTF2(rformat,sizeof(rformat), "%% %d.%df",Rhswidth,Rhsprec);
-      else
-	SECURE_SPRINTF2(rformat,sizeof(rformat), "%% %d.%dE",Rhswidth,Rhsprec);
-      if (Rhsflag == 'D') *strchr(Rhsfmt,'D') = 'E';
-      rhscrd = nrhsentries/Rhsperline; 
-      if ( nrhsentries%Rhsperline != 0) rhscrd++;
-      if ( Rhstype[1] == 'G' ) rhscrd+=rhscrd;
-      if ( Rhstype[2] == 'X' ) rhscrd+=rhscrd;
-      rhscrd*=Nrhs;
-    } else rhscrd = 0;
-    
-    totcrd = 4+ptrcrd+indcrd+valcrd+rhscrd;
-    
-    
-    /*  Print header information:  */
-    
-    fprintf(out_file,"%-72s%-8s\n%14d%14d%14d%14d%14d\n",Title, Key, totcrd,
-	    ptrcrd, indcrd, valcrd, rhscrd);
-    fprintf(out_file,"%3s%11s%14d%14d%14d%14d\n",Type,"          ", M, N, nz, 0);
-    fprintf(out_file,"%-16s%-16s%-20s", Ptrfmt, Indfmt, Valfmt);
-    if ( Nrhs != 0 ) {
-      /* Print Rhsfmt on fourth line and                              */
-      /*  optional fifth header line for auxillary vector information:*/
-      fprintf(out_file,"%-20s\n%-14s%d\n",Rhsfmt,Rhstype,Nrhs);
-    }
-    else
-      fprintf(out_file,"\n");
-    
-    offset = 1 - shift;  /* if base 0 storage is declared (via macro def), */
-    /* then storage entries are offset by 1           */
-    
-    /*  Print column pointers:   */
-    for (i = 0; i < N+1; i++) {
-      entry = colptr[i]+offset;
-      fprintf(out_file,pformat,entry);
-      if ( (i+1)%Ptrperline == 0 ) fprintf(out_file,"\n");
-    }
-    
-    if ( (N+1) % Ptrperline != 0 ) fprintf(out_file,"\n");
-    
-    /*  Print row indices:       */
-    for (i=0;i<nz;i++) {
-      entry = rowind[i]+offset;
-      fprintf(out_file,iformat,entry);
-      if ( (i+1)%Indperline == 0 ) fprintf(out_file,"\n");
-    }
-    
-    if ( nz % Indperline != 0 ) fprintf(out_file,"\n");
-    
-    /*  Print values:            */
-    
-    if ( Type[0] != 'P' ) {          /* Skip if pattern only  */
-      for (i=0;i<nvalentries;i++) {
-	fprintf(out_file,vformat,val[i]);
-	if ( (i+1)%Valperline == 0 ) fprintf(out_file,"\n");
-      }
-      
-      if ( nvalentries % Valperline != 0 ) fprintf(out_file,"\n");
-      
-      /*  Print right hand sides:  */
-      acount = 1;
-      linemod=0;
-      if ( Nrhs > 0 ) {
-	for (j=0;j<Nrhs;j++) {
-	  for (i=0;i<nrhsentries;i++) {
-	    fprintf(out_file,rformat,rhs[i] /* *Rhswidth */);
-	    if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
-	  }
-	  if ( acount%Rhsperline != linemod ) {
-	    fprintf(out_file,"\n");
-	    linemod = (acount-1)%Rhsperline;
-	  }
-	  if ( Rhstype[1] == 'G' ) {
-	    for (i=0;i<nrhsentries;i++) {
-	      fprintf(out_file,rformat,guess[i] /* *Rhswidth */);
-	      if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
-	    }
-	    if ( acount%Rhsperline != linemod ) {
-	      fprintf(out_file,"\n");
-	      linemod = (acount-1)%Rhsperline;
-	    }
-	  }
-	  if ( Rhstype[2] == 'X' ) {
-	    for (i=0;i<nrhsentries;i++) {
-	      fprintf(out_file,rformat,exact[i] /* *Rhswidth */);
-	      if ( acount++%Rhsperline == linemod ) fprintf(out_file,"\n");
-	    }
-	    if ( acount%Rhsperline != linemod ) {
-	      fprintf(out_file,"\n");
-	      linemod = (acount-1)%Rhsperline;
-	    }
-	  }
-	}
-      }
-    }
-    int s = fclose(out_file);
-    GMM_ASSERT1(s == 0, "Error closing file in writeHB_mat_double().");
-    return 1;
-  }
-  
-  template <typename T, int shift> void
-  HarwellBoeing_IO::write(const char *filename,
-			  const csc_matrix<T, shift>& A) {
-    write(filename, csc_matrix_ref<T*, unsigned*, unsigned *, shift>
-	  (A.pr, A.ir, A.jc, A.nr, A.nc));
-  }
-
-  template <typename T, int shift> void
-  HarwellBoeing_IO::write(const char *filename,
-			  const csc_matrix<T, shift>& A,
-			  const std::vector<T> &rhs) {
-    write(filename, csc_matrix_ref<T*, unsigned*, unsigned *, shift>
-	  (A.pr, A.ir, A.jc, A.nr, A.nc), rhs);
-  }
-
-  template <typename T, typename INDI, typename INDJ, int shift> void
-  HarwellBoeing_IO::write(const char *filename,
-			  const csc_matrix_ref<T*, INDI*, INDJ*, shift>& A) {
-    const char *t = 0;    
-    if (is_complex_double__(T()))
-      if (mat_nrows(A) == mat_ncols(A)) t = "CUA"; else t = "CRA";
-    else
-      if (mat_nrows(A) == mat_ncols(A)) t = "RUA"; else t = "RRA";
-    writeHB_mat_double(filename, mat_nrows(A), mat_ncols(A),
-		       A.jc[mat_ncols(A)], A.jc, A.ir,
-		       (const double *)A.pr,
-		       0, 0, 0, 0, "GETFEM++ CSC MATRIX", "CSCMAT",
-		       t, 0, 0, 0, 0, "F", shift);
-  }
-
-  template <typename T, typename INDI, typename INDJ, int shift> void
-  HarwellBoeing_IO::write(const char *filename,
-			  const csc_matrix_ref<T*, INDI*, INDJ*, shift>& A,
-			  const std::vector<T> &rhs) {
-    const char *t = 0;
-    if (is_complex_double__(T()))
-      if (mat_nrows(A) == mat_ncols(A)) t = "CUA"; else t = "CRA";
-    else
-      if (mat_nrows(A) == mat_ncols(A)) t = "RUA"; else t = "RRA";
-    int Nrhs = gmm::vect_size(rhs) / mat_nrows(A);
-    writeHB_mat_double(filename, mat_nrows(A), mat_ncols(A),
-		       A.jc[mat_ncols(A)], A.jc, A.ir,
-		       (const double *)A.pr,
-		       Nrhs, (const double *)(&rhs[0]), 0, 0,
-		       "GETFEM++ CSC MATRIX", "CSCMAT",
-		       t, 0, 0, 0, 0, "F  ", shift);
-  }
-
-  
-  template <typename MAT> void
-  HarwellBoeing_IO::write(const char *filename, const MAT& A) {
-    gmm::csc_matrix<typename gmm::linalg_traits<MAT>::value_type> 
-      tmp(gmm::mat_nrows(A), gmm::mat_ncols(A));
-    gmm::copy(A,tmp); 
-    HarwellBoeing_IO::write(filename, tmp);
-  }
-
-  /** save a "double" or "std::complex<double>" csc matrix into a
-      HarwellBoeing file
-  */
-  template <typename T, int shift> inline void
-  Harwell_Boeing_save(const std::string &filename,
-		      const csc_matrix<T, shift>& A)
-  { HarwellBoeing_IO::write(filename.c_str(), A); }
-
-  /** save a reference on "double" or "std::complex<double>" csc matrix
-      into a HarwellBoeing file
-  */
-  template <typename T, typename INDI, typename INDJ, int shift> inline void
-  Harwell_Boeing_save(const std::string &filename,
-		      const csc_matrix_ref<T, INDI, INDJ, shift>& A)
-  { HarwellBoeing_IO::write(filename.c_str(), A); }
-
-  /** save a "double" or "std::complex<double>" generic matrix
-      into a HarwellBoeing file making a copy in a csc matrix
-  */
-  template <typename MAT> inline void
-  Harwell_Boeing_save(const std::string &filename, const MAT& A) {
-    gmm::csc_matrix<typename gmm::linalg_traits<MAT>::value_type> 
-      tmp(gmm::mat_nrows(A), gmm::mat_ncols(A));
-    gmm::copy(A, tmp); 
-    HarwellBoeing_IO::write(filename.c_str(), tmp);
-  }
-
-  template <typename MAT, typename VECT> inline void
-  Harwell_Boeing_save(const std::string &filename, const MAT& A,
-		      const VECT &RHS) {
-    typedef typename gmm::linalg_traits<MAT>::value_type T;
-    gmm::csc_matrix<T> tmp(gmm::mat_nrows(A), gmm::mat_ncols(A));
-    gmm::copy(A, tmp);
-    std::vector<T> tmprhs(gmm::vect_size(RHS));
-    gmm::copy(RHS, tmprhs);
-    HarwellBoeing_IO::write(filename.c_str(), tmp, tmprhs);
-  }
-
-  /** load a "double" or "std::complex<double>" csc matrix from a
-      HarwellBoeing file
-  */
-  template <typename T, int shift> void
-  Harwell_Boeing_load(const std::string &filename, csc_matrix<T, shift>& A) {
-    HarwellBoeing_IO h(filename.c_str()); h.read(A);
-  }
-
-  /** load a "double" or "std::complex<double>" generic matrix from a
-      HarwellBoeing file
-  */
-  template <typename MAT> void
-  Harwell_Boeing_load(const std::string &filename, MAT& A) {
-    csc_matrix<typename gmm::linalg_traits<MAT>::value_type> csc;
-    Harwell_Boeing_load(filename, csc);
-    resize(A, mat_nrows(csc), mat_ncols(csc));
-    copy(csc, A);
-  }
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*  Functions to read and write MatrixMarket format.                     */
-  /*                                                                       */
-  /*************************************************************************/
-
-  /* 
-   *   Matrix Market I/O library for ANSI C
-   *
-   *   See http://math.nist.gov/MatrixMarket for details.
-   *
-   *
-   */
-
-#define MM_MAX_LINE_LENGTH 1025
-#define MatrixMarketBanner "%%MatrixMarket"
-#define MM_MAX_TOKEN_LENGTH 64
-
-  typedef char MM_typecode[4];
-
-  /******************* MM_typecode query functions *************************/
-
-#define mm_is_matrix(typecode)	        ((typecode)[0]=='M')
-  
-#define mm_is_sparse(typecode)	        ((typecode)[1]=='C')
-#define mm_is_coordinate(typecode)      ((typecode)[1]=='C')
-#define mm_is_dense(typecode)	        ((typecode)[1]=='A')
-#define mm_is_array(typecode)	        ((typecode)[1]=='A')
-  
-#define mm_is_complex(typecode)	        ((typecode)[2]=='C')
-#define mm_is_real(typecode)	        ((typecode)[2]=='R')
-#define mm_is_pattern(typecode)	        ((typecode)[2]=='P')
-#define mm_is_integer(typecode)         ((typecode)[2]=='I')
-  
-#define mm_is_symmetric(typecode)       ((typecode)[3]=='S')
-#define mm_is_general(typecode)	        ((typecode)[3]=='G')
-#define mm_is_skew(typecode)	        ((typecode)[3]=='K')
-#define mm_is_hermitian(typecode)       ((typecode)[3]=='H')
-  
-  /******************* MM_typecode modify fucntions ************************/
-
-#define mm_set_matrix(typecode)	        ((*typecode)[0]='M')
-#define mm_set_coordinate(typecode)	((*typecode)[1]='C')
-#define mm_set_array(typecode)	        ((*typecode)[1]='A')
-#define mm_set_dense(typecode)	        mm_set_array(typecode)
-#define mm_set_sparse(typecode)	        mm_set_coordinate(typecode)
-
-#define mm_set_complex(typecode)        ((*typecode)[2]='C')
-#define mm_set_real(typecode)	        ((*typecode)[2]='R')
-#define mm_set_pattern(typecode)        ((*typecode)[2]='P')
-#define mm_set_integer(typecode)        ((*typecode)[2]='I')
-
-
-#define mm_set_symmetric(typecode)      ((*typecode)[3]='S')
-#define mm_set_general(typecode)        ((*typecode)[3]='G')
-#define mm_set_skew(typecode)	        ((*typecode)[3]='K')
-#define mm_set_hermitian(typecode)      ((*typecode)[3]='H')
-
-#define mm_clear_typecode(typecode)     ((*typecode)[0]=(*typecode)[1]= \
-			       	        (*typecode)[2]=' ',(*typecode)[3]='G')
-
-#define mm_initialize_typecode(typecode) mm_clear_typecode(typecode)
-
-
-  /******************* Matrix Market error codes ***************************/
-
-
-#define MM_COULD_NOT_READ_FILE	11
-#define MM_PREMATURE_EOF		12
-#define MM_NOT_MTX				13
-#define MM_NO_HEADER			14
-#define MM_UNSUPPORTED_TYPE		15
-#define MM_LINE_TOO_LONG		16
-#define MM_COULD_NOT_WRITE_FILE	17
-
-
-  /******************** Matrix Market internal definitions *****************
-
-   MM_matrix_typecode: 4-character sequence
-
-	                object 	    sparse/   	data        storage 
-	                            dense     	type        scheme
-
-   string position:	 [0]        [1]		[2]         [3]
-
-   Matrix typecode:     M(atrix)    C(oord)	R(eal)      G(eneral)
-		                    A(array)    C(omplex)   H(ermitian)
-	                                        P(attern)   S(ymmetric)
-                                                I(nteger)   K(kew)
-
-  ***********************************************************************/
-
-#define MM_MTX_STR	   "matrix"
-#define MM_ARRAY_STR	   "array"
-#define MM_DENSE_STR	   "array"
-#define MM_COORDINATE_STR  "coordinate" 
-#define MM_SPARSE_STR	   "coordinate"
-#define MM_COMPLEX_STR	   "complex"
-#define MM_REAL_STR	   "real"
-#define MM_INT_STR	   "integer"
-#define MM_GENERAL_STR     "general"
-#define MM_SYMM_STR	   "symmetric"
-#define MM_HERM_STR	   "hermitian"
-#define MM_SKEW_STR	   "skew-symmetric"
-#define MM_PATTERN_STR     "pattern"
-
-  inline char  *mm_typecode_to_str(MM_typecode matcode) {
-    char buffer[MM_MAX_LINE_LENGTH];
-    const char *types[4] = {0,0,0,0};
-    /*    int error =0; */
-    /*   int i; */
-    
-    /* check for MTX type */
-    if (mm_is_matrix(matcode)) 
-      types[0] = MM_MTX_STR;
-    /*
-      else
-      error=1;
-    */
-    /* check for CRD or ARR matrix */
-    if (mm_is_sparse(matcode))
-      types[1] = MM_SPARSE_STR;
-    else
-      if (mm_is_dense(matcode))
-        types[1] = MM_DENSE_STR;
-      else
-        return NULL;
-    
-    /* check for element data type */
-    if (mm_is_real(matcode))
-      types[2] = MM_REAL_STR;
-    else
-      if (mm_is_complex(matcode))
-        types[2] = MM_COMPLEX_STR;
-      else
-	if (mm_is_pattern(matcode))
-	  types[2] = MM_PATTERN_STR;
-	else
-	  if (mm_is_integer(matcode))
-	    types[2] = MM_INT_STR;
-	  else
-	    return NULL;
-    
-    
-    /* check for symmetry type */
-    if (mm_is_general(matcode))
-      types[3] = MM_GENERAL_STR;
-    else if (mm_is_symmetric(matcode))
-      types[3] = MM_SYMM_STR;
-    else if (mm_is_hermitian(matcode))
-      types[3] = MM_HERM_STR;
-    else  if (mm_is_skew(matcode))
-      types[3] = MM_SKEW_STR;
-    else
-      return NULL;
-    
-    SECURE_SPRINTF4(buffer, sizeof(buffer), "%s %s %s %s", types[0], types[1],
-		    types[2], types[3]);
-    return SECURE_STRDUP(buffer);
-    
-  }
-  
-  inline int mm_read_banner(FILE *f, MM_typecode *matcode) {
-    char line[MM_MAX_LINE_LENGTH];
-    char banner[MM_MAX_TOKEN_LENGTH];
-    char mtx[MM_MAX_TOKEN_LENGTH]; 
-    char crd[MM_MAX_TOKEN_LENGTH];
-    char data_type[MM_MAX_TOKEN_LENGTH];
-    char storage_scheme[MM_MAX_TOKEN_LENGTH];
-    char *p;
-    /*    int ret_code; */
-    
-    mm_clear_typecode(matcode);  
-    
-    if (fgets(line, MM_MAX_LINE_LENGTH, f) == NULL) 
-      return MM_PREMATURE_EOF;
-
-#ifdef GMM_SECURE_CRT
-    if (sscanf_s(line, "%s %s %s %s %s", banner, sizeof(banner),
-		 mtx, sizeof(mtx), crd, sizeof(crd), data_type,
-		 sizeof(data_type), storage_scheme,
-		 sizeof(storage_scheme)) != 5)
-#else
-	if (sscanf(line, "%s %s %s %s %s", banner, mtx, crd,
-		   data_type, storage_scheme) != 5)
-#endif
-      return MM_PREMATURE_EOF;
-
-    for (p=mtx; *p!='\0'; *p=tolower(*p),p++);  /* convert to lower case */
-    for (p=crd; *p!='\0'; *p=tolower(*p),p++);  
-    for (p=data_type; *p!='\0'; *p=tolower(*p),p++);
-    for (p=storage_scheme; *p!='\0'; *p=tolower(*p),p++);
-
-    /* check for banner */
-    if (strncmp(banner, MatrixMarketBanner, strlen(MatrixMarketBanner)) != 0)
-      return MM_NO_HEADER;
-
-    /* first field should be "mtx" */
-    if (strcmp(mtx, MM_MTX_STR) != 0)
-      return  MM_UNSUPPORTED_TYPE;
-    mm_set_matrix(matcode);
-
-
-    /* second field describes whether this is a sparse matrix (in coordinate
-       storgae) or a dense array */
-
-
-    if (strcmp(crd, MM_SPARSE_STR) == 0)
-      mm_set_sparse(matcode);
-    else
-      if (strcmp(crd, MM_DENSE_STR) == 0)
-	mm_set_dense(matcode);
-      else
-        return MM_UNSUPPORTED_TYPE;
-    
-
-    /* third field */
-
-    if (strcmp(data_type, MM_REAL_STR) == 0)
-      mm_set_real(matcode);
-    else
-      if (strcmp(data_type, MM_COMPLEX_STR) == 0)
-        mm_set_complex(matcode);
-      else
-	if (strcmp(data_type, MM_PATTERN_STR) == 0)
-	  mm_set_pattern(matcode);
-	else
-	  if (strcmp(data_type, MM_INT_STR) == 0)
-	    mm_set_integer(matcode);
-	  else
-	    return MM_UNSUPPORTED_TYPE;
-    
-
-    /* fourth field */
-
-    if (strcmp(storage_scheme, MM_GENERAL_STR) == 0)
-      mm_set_general(matcode);
-    else
-      if (strcmp(storage_scheme, MM_SYMM_STR) == 0)
-        mm_set_symmetric(matcode);
-      else
-	if (strcmp(storage_scheme, MM_HERM_STR) == 0)
-	  mm_set_hermitian(matcode);
-	else
-	  if (strcmp(storage_scheme, MM_SKEW_STR) == 0)
-	    mm_set_skew(matcode);
-	  else
-	    return MM_UNSUPPORTED_TYPE;
-        
-    return 0;
-  }
-
-  inline int mm_read_mtx_crd_size(FILE *f, int *M, int *N, int *nz ) {
-    char line[MM_MAX_LINE_LENGTH];
-    /* int ret_code;*/
-    int num_items_read;
-    
-    /* set return null parameter values, in case we exit with errors */
-    *M = *N = *nz = 0;
-    
-    /* now continue scanning until you reach the end-of-comments */
-    do {
-      if (fgets(line,MM_MAX_LINE_LENGTH,f) == NULL) 
-	return MM_PREMATURE_EOF;
-    } while (line[0] == '%');
-    
-    /* line[] is either blank or has M,N, nz */
-    if (SECURE_NONCHAR_SSCANF(line, "%d %d %d", M, N, nz) == 3) return 0;
-    else
-      do { 
-	num_items_read = SECURE_NONCHAR_FSCANF(f, "%d %d %d", M, N, nz); 
-	if (num_items_read == EOF) return MM_PREMATURE_EOF;
-      }
-      while (num_items_read != 3);
-    
-    return 0;
-  }
-
-
-  inline int mm_read_mtx_crd_data(FILE *f, int, int, int nz, int I[],
-				  int J[], double val[], MM_typecode matcode) {
-    int i;
-    if (mm_is_complex(matcode)) {
-      for (i=0; i<nz; i++)
-	if (SECURE_NONCHAR_FSCANF(f, "%d %d %lg %lg", &I[i], &J[i],
-				  &val[2*i], &val[2*i+1])
-	    != 4) return MM_PREMATURE_EOF;
-    }
-    else if (mm_is_real(matcode)) {
-      for (i=0; i<nz; i++) {
-	if (SECURE_NONCHAR_FSCANF(f, "%d %d %lg\n", &I[i], &J[i], &val[i])
-	    != 3) return MM_PREMATURE_EOF;
-	
-      }
-    }
-    else if (mm_is_pattern(matcode)) {
-      for (i=0; i<nz; i++)
-	if (SECURE_NONCHAR_FSCANF(f, "%d %d", &I[i], &J[i])
-	    != 2) return MM_PREMATURE_EOF;
-    }
-    else return MM_UNSUPPORTED_TYPE;
-
-    return 0;
-  }
-
-  inline int mm_write_mtx_crd(const char *fname, int M, int N, int nz,
-			      int I[], int J[], const double val[],
-			      MM_typecode matcode) {
-    FILE *f;
-    int i;
-    
-    if (strcmp(fname, "stdout") == 0) 
-      f = stdout;
-    else {
-      SECURE_FOPEN(&f, fname, "w");
-      if (f == NULL)
-        return MM_COULD_NOT_WRITE_FILE;
-    }
-    
-    /* print banner followed by typecode */
-    fprintf(f, "%s ", MatrixMarketBanner);
-    char *str = mm_typecode_to_str(matcode);
-    fprintf(f, "%s\n", str);
-    free(str);
-    
-    /* print matrix sizes and nonzeros */
-    fprintf(f, "%d %d %d\n", M, N, nz);
-    
-    /* print values */
-    if (mm_is_pattern(matcode))
-      for (i=0; i<nz; i++)
-	fprintf(f, "%d %d\n", I[i], J[i]);
-    else
-      if (mm_is_real(matcode))
-        for (i=0; i<nz; i++)
-	  fprintf(f, "%d %d %20.16g\n", I[i], J[i], val[i]);
-      else
-	if (mm_is_complex(matcode))
-	  for (i=0; i<nz; i++)
-            fprintf(f, "%d %d %20.16g %20.16g\n", I[i], J[i], val[2*i], 
-		    val[2*i+1]);
-	else {
-	  if (f != stdout) fclose(f);
-	  return MM_UNSUPPORTED_TYPE;
-	}
-    
-    if (f !=stdout) fclose(f); 
-    return 0;
-  }
-  
-
-  /** matrix input/output for MatrixMarket storage */
-  class MatrixMarket_IO {
-    FILE *f;
-    bool isComplex, isSymmetric, isHermitian;
-    int row, col, nz;
-    MM_typecode matcode;
-  public:
-    MatrixMarket_IO() : f(0) {}
-    MatrixMarket_IO(const char *filename) : f(0) { open(filename); }
-    ~MatrixMarket_IO() { if (f) fclose(f); f = 0; }
-
-    int nrows() const { return row; }
-    int ncols() const { return col; }
-    int nnz() const { return nz; }
-    int is_complex() const { return isComplex; }
-    int is_symmetric() const { return isSymmetric; }
-    int is_hermitian() const { return isHermitian; }
-
-    /* open filename and reads header */
-    void open(const char *filename);
-    /* read opened file */
-    template <typename Matrix> void read(Matrix &A);
-    /* write a matrix */
-    template <typename T, int shift> static void 
-    write(const char *filename, const csc_matrix<T, shift>& A);  
-    template <typename T, typename INDI, typename INDJ, int shift> static void 
-    write(const char *filename,
-	  const csc_matrix_ref<T*, INDI*, INDJ*, shift>& A);  
-    template <typename MAT> static void 
-    write(const char *filename, const MAT& A);  
-  };
-
-  /** load a matrix-market file */
-  template <typename Matrix> inline void
-  MatrixMarket_load(const char *filename, Matrix& A) {
-    MatrixMarket_IO mm; mm.open(filename);
-    mm.read(A);
-  }
-  /** write a matrix-market file */
-  template <typename T, int shift> void
-  MatrixMarket_save(const char *filename, const csc_matrix<T, shift>& A) {
-    MatrixMarket_IO mm; mm.write(filename, A);
-  }
-
-  template <typename T, typename INDI, typename INDJ, int shift> inline void
-  MatrixMarket_save(const char *filename,
-		    const csc_matrix_ref<T, INDI, INDJ, shift>& A) {
-    MatrixMarket_IO mm; mm.write(filename, A);
-  }
-
-
-  inline void MatrixMarket_IO::open(const char *filename) {
-    if (f) { fclose(f); }
-    SECURE_FOPEN(&f, filename, "r");
-    GMM_ASSERT1(f, "Sorry, cannot open file " << filename);
-    int s1 = mm_read_banner(f, &matcode);
-    GMM_ASSERT1(s1 == 0, "Sorry, cannnot find the matrix market banner in "
-		<< filename);
-    int s2 = mm_is_coordinate(matcode), s3 = mm_is_matrix(matcode);
-    GMM_ASSERT1(s2 > 0 && s3 > 0,
-		"file is not coordinate storage or is not a matrix");
-    int s4 = mm_is_pattern(matcode);
-    GMM_ASSERT1(s4 == 0,
-	       "the file does only contain the pattern of a sparse matrix");
-    int s5 = mm_is_skew(matcode);
-    GMM_ASSERT1(s5 == 0, "not currently supporting skew symmetric");
-    isSymmetric = mm_is_symmetric(matcode) || mm_is_hermitian(matcode); 
-    isHermitian = mm_is_hermitian(matcode); 
-    isComplex =   mm_is_complex(matcode);
-    mm_read_mtx_crd_size(f, &row, &col, &nz);
-  }
-
-  template <typename Matrix> void MatrixMarket_IO::read(Matrix &A) {
-    typedef typename linalg_traits<Matrix>::value_type T;
-    GMM_ASSERT1(f, "no file opened!");
-    GMM_ASSERT1(!is_complex_double__(T()) || isComplex,
-		"Bad MM matrix format (complex matrix expected)");
-    GMM_ASSERT1(is_complex_double__(T()) || !isComplex,
-		"Bad MM matrix format (real matrix expected)");
-    A = Matrix(row, col);
-    gmm::clear(A);
-    
-    std::vector<int> I(nz), J(nz);
-    std::vector<typename Matrix::value_type> PR(nz);
-    mm_read_mtx_crd_data(f, row, col, nz, &I[0], &J[0],
-			 (double*)&PR[0], matcode);
-    
-    for (size_type i = 0; i < size_type(nz); ++i) A(I[i]-1, J[i]-1) = PR[i];
-  }
-
-  template <typename T, int shift> void 
-  MatrixMarket_IO::write(const char *filename, const csc_matrix<T, shift>& A) {
-    write(filename, csc_matrix_ref<T*,unsigned*,unsigned*,shift>
-	  (A.pr, A.ir, A.jc, A.nr, A.nc));
-  }
-
-  template <typename T, typename INDI, typename INDJ, int shift> void 
-  MatrixMarket_IO::write(const char *filename, 
-			 const csc_matrix_ref<T*, INDI*, INDJ*, shift>& A) {
-    static MM_typecode t1 = {'M', 'C', 'R', 'G'};
-    static MM_typecode t2 = {'M', 'C', 'C', 'G'};
-    MM_typecode t;
-    
-    if (is_complex_double__(T())) std::copy(&(t2[0]), &(t2[0])+4, &(t[0]));
-    else std::copy(&(t1[0]), &(t1[0])+4, &(t[0]));
-    size_type nz = A.jc[mat_ncols(A)];
-    std::vector<int> I(nz), J(nz);
-    for (size_type j=0; j < mat_ncols(A); ++j) {      
-      for (size_type i = A.jc[j]; i < A.jc[j+1]; ++i) {
-	I[i] = A.ir[i] + 1 - shift;
-	J[i] = j + 1;
-      }
-    }
-    mm_write_mtx_crd(filename, mat_nrows(A), mat_ncols(A),
-		     nz, &I[0], &J[0], (const double *)A.pr, t);
-  }
-
-
-  template <typename MAT> void
-  MatrixMarket_IO::write(const char *filename, const MAT& A) {
-    gmm::csc_matrix<typename gmm::linalg_traits<MAT>::value_type> 
-      tmp(gmm::mat_nrows(A), gmm::mat_ncols(A));
-    gmm::copy(A,tmp); 
-    MatrixMarket_IO::write(filename, tmp);
-  }
-
-  template<typename VEC> static void vecsave(std::string fname, const VEC& V) {
-    std::ofstream f(fname.c_str()); f.precision(16);
-    for (size_type i=0; i < gmm::vect_size(V); ++i) f << V[i] << "\n"; 
-  } 
-
-  template<typename VEC> static void vecload(std::string fname,
-					     const VEC& V_) {
-    VEC &V(const_cast<VEC&>(V_));
-    std::ifstream f(fname.c_str());
-    for (size_type i=0; i < gmm::vect_size(V); ++i) f >> V[i]; 
-  }
-}
-
-
-#endif //  GMM_INOUTPUT_H
diff --git a/Contrib/gmm/gmm_interface.h b/Contrib/gmm/gmm_interface.h
deleted file mode 100755
index d7693d6..0000000
--- a/Contrib/gmm/gmm_interface.h
+++ /dev/null
@@ -1,1065 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-
-/**@file gmm_interface.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief gmm interface for STL vectors.
-*/
-
-#ifndef GMM_INTERFACE_H__
-#define GMM_INTERFACE_H__
-
-#include "gmm_blas.h"
-#include "gmm_sub_index.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*                                                                       */
-  /* What is needed for a Vector type :                                    */
-  /*   Vector v(n) defines a vector with n components.                     */
-  /*   v[i] allows to access to the ith component of v.                    */
-  /*   linalg_traits<Vector> should be filled with appropriate definitions */
-  /*                                                                       */
-  /*   for a dense vector : the minimum is two random iterators (begin and */
-  /*                        end) and a pointer to a valid origin.          */
-  /*   for a sparse vector : the minimum is two forward iterators, with    */
-  /*                         a method it.index() which gives the index of  */
-  /*                         a non zero element, an interface object       */
-  /*                         should describe the method to add new non     */
-  /*                         zero element, and  a pointer to a valid       */
-  /*                         origin.                                       */
-  /*                                                                       */
-  /* What is needed for a Matrix type :                                    */
-  /*   Matrix m(n, m) defines a matrix with n rows and m columns.          */
-  /*   m(i, j) allows to access to the element at row i and column j.      */
-  /*   linalg_traits<Matrix> should be filled with appropriate definitions */
-  /*                                                                       */
-  /* What is needed for an iterator on dense vector                        */
-  /*    to be standard random access iterator                              */
-  /*                                                                       */
-  /* What is needed for an iterator on a sparse vector                     */
-  /*    to be a standard bidirectional iterator                            */
-  /*    elt should be sorted with increasing indices.                      */
-  /*    it.index() gives the index of the non-zero element.                */
-  /*                                                                       */
-  /* Remark : If original iterators are not convenient, they could be      */
-  /*   redefined and interfaced in linalg_traits<Vector> without changing  */
-  /*   the original Vector type.                                           */
-  /*                                                                       */
-  /* ********************************************************************* */
-
-  /* ********************************************************************* */
-  /*		Simple references on vectors            		   */
-  /* ********************************************************************* */
-
-  template <typename PT> struct simple_vector_ref {
-    typedef simple_vector_ref<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef V * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_V;
-    typedef typename linalg_traits<this_type>::iterator iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    size_type size_;
-
-    simple_vector_ref(ref_V v) : begin_(vect_begin(const_cast<V&>(v))), 
-				 end_(vect_end(const_cast<V&>(v))), 
-				 origin(linalg_origin(const_cast<V&>(v))),
-				 size_(vect_size(v)) {}
-
-    simple_vector_ref(const simple_vector_ref<CPT> &cr)
-      : begin_(cr.begin_),end_(cr.end_),origin(cr.origin),size_(cr.size_) {}
-
-    simple_vector_ref(void) {}
-
-    reference operator[](size_type i) const
-    { return linalg_traits<V>::access(origin, begin_, end_, i); }
-  };
-
-  template <typename IT, typename ORG, typename PT> inline
-  void set_to_begin(IT &it, ORG o, simple_vector_ref<PT> *,linalg_modifiable) {
-    typedef typename linalg_traits<simple_vector_ref<PT> >::V_reference ref_t;
-    set_to_begin(it, o, PT(), ref_t());
-  }
-
-  template <typename IT, typename ORG, typename PT> inline
-  void set_to_begin(IT &it, ORG o, const simple_vector_ref<PT> *,
-		    linalg_modifiable) {
-    typedef typename linalg_traits<simple_vector_ref<PT> >::V_reference ref_t;
-    set_to_begin(it, o, PT(), ref_t());
-  }
-
-  template <typename IT, typename ORG, typename PT> inline
-  void set_to_end(IT &it, ORG o, simple_vector_ref<PT> *, linalg_modifiable) {
-    typedef typename linalg_traits<simple_vector_ref<PT> >::V_reference ref_t;
-    set_to_end(it, o, PT(), ref_t());
-  }
-
-  template <typename IT, typename ORG, typename PT> inline
-  void set_to_end(IT &it, ORG o, const simple_vector_ref<PT> *,
-		  linalg_modifiable) {
-    typedef typename linalg_traits<simple_vector_ref<PT> >::V_reference ref_t;
-    set_to_end(it, o, PT(), ref_t());
-  }
-
-
-  template <typename PT> struct linalg_traits<simple_vector_ref<PT> > {
-    typedef simple_vector_ref<PT> this_type;
-    typedef this_type *pthis_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef V *pV;
-    typedef typename linalg_traits<V>::is_reference V_reference;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename select_ref<value_type, typename
-            linalg_traits<V>::reference, PT>::ref_type reference;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename select_ref<typename linalg_traits<V>::const_iterator,
-	    typename linalg_traits<V>::iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<V>::const_iterator const_iterator;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size_; }
-    static inline iterator begin(this_type &v) {
-      iterator it = v.begin_;
-      set_to_begin(it, v.origin, pthis_type(), is_reference()); 
-      return it;
-    }
-    static inline const_iterator begin(const this_type &v) {
-      const_iterator it = v.begin_;
-      set_to_begin(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static inline iterator end(this_type &v) {
-      iterator it = v.end_;
-      set_to_end(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static inline const_iterator end(const this_type &v) {
-      const_iterator it = v.end_;
-      set_to_end(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void clear(origin_type* o, const iterator &it, const iterator &ite)
-    { linalg_traits<V>::clear(o, it, ite); }
-    static void do_clear(this_type &v) { clear(v.origin, v.begin_, v.end_); }
-    static value_type access(const origin_type *o, const const_iterator &it,
-			     const const_iterator &ite, size_type i)
-    { return linalg_traits<V>::access(o, it, ite, i); }
-    static reference access(origin_type *o, const iterator &it,
-			    const iterator &ite, size_type i)
-    { return linalg_traits<V>::access(o, it, ite, i); }
-  };
-
-  template <typename PT>
-  std::ostream &operator << (std::ostream &o, const simple_vector_ref<PT>& v)
-  { gmm::write(o,v); return o; }
-
-  /* ********************************************************************* */
-  /*		                                         		   */
-  /*		Traits for S.T.L. object                     		   */
-  /*		                                         		   */
-  /* ********************************************************************* */
-
-  template <typename T, typename alloc>
-  struct linalg_traits<std::vector<T, alloc> > {
-    typedef std::vector<T, alloc> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_vector linalg_type;
-    typedef T value_type;
-    typedef T& reference;
-    typedef typename this_type::iterator iterator;
-    typedef typename this_type::const_iterator const_iterator;
-    typedef abstract_dense storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static origin_type* origin(this_type &v) { return &v; }
-    static const origin_type* origin(const this_type &v) { return &v; }
-    static void clear(origin_type*, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static void do_clear(this_type &v) { std::fill(v.begin(), v.end(), T(0)); }
-    static value_type access(const origin_type *, const const_iterator &it,
-			     const const_iterator &, size_type i)
-    { return it[i]; }
-    static reference access(origin_type *, const iterator &it,
-			    const iterator &, size_type i)
-    { return it[i]; }
-    static void resize(this_type &v, size_type n) { v.resize(n); }
-  };
-}
-namespace std {
-  template <typename T> ostream &operator <<
-  (std::ostream &o, const vector<T>& m) { gmm::write(o,m); return o; }
-}
-namespace gmm {
-
-  template <typename T>
-  inline size_type nnz(const std::vector<T>& l) { return l.size(); }
-
-  /* ********************************************************************* */
-  /*		                                         		   */
-  /*		Traits for ref objects                     		   */
-  /*		                                         		   */
-  /* ********************************************************************* */
-
-  template <typename IT, typename V>
-  struct tab_ref_with_origin : public gmm::tab_ref<IT> {
-    typedef tab_ref_with_origin<IT, V> this_type;
-    // next line replaced by the 4 following lines in order to please aCC
-    //typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename std::iterator_traits<IT>::pointer PT;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-   
-
-    porigin_type origin;
-   
-    tab_ref_with_origin(void) {}
-    template <class PT> tab_ref_with_origin(const IT &b, const IT &e, PT p)
-      : gmm::tab_ref<IT>(b,e), origin(porigin_type(p)) {}
-    tab_ref_with_origin(const IT &b, const IT &e, porigin_type p)
-      : gmm::tab_ref<IT>(b,e), origin(p) {}
-   
-    tab_ref_with_origin(const V &v, const sub_interval &si)
-      : gmm::tab_ref<IT>(vect_begin(const_cast<V&>(v))+si.min,
-			 vect_begin(const_cast<V&>(v))+si.max),
-        origin(linalg_origin(const_cast<V&>(v))) {}
-    tab_ref_with_origin(V &v, const sub_interval &si)
-      : gmm::tab_ref<IT>(vect_begin(const_cast<V&>(v))+si.min,
-			 vect_begin(const_cast<V&>(v))+si.max),
-        origin(linalg_origin(const_cast<V&>(v))) {}
-  };
-
-  template <typename IT, typename V>
-  struct linalg_traits<tab_ref_with_origin<IT, V> > {
-    typedef typename std::iterator_traits<IT>::pointer PT;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef tab_ref_with_origin<IT, V> this_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-    typedef typename std::iterator_traits<IT>::value_type value_type;
-    typedef typename std::iterator_traits<IT>::reference reference;
-    typedef typename this_type::iterator iterator;
-    typedef typename this_type::iterator const_iterator;
-    typedef abstract_dense storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void clear(origin_type*, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static inline void do_clear(this_type &v)
-    { std::fill(v.begin(), v.end(), value_type(0)); }
-    static value_type access(const origin_type *, const const_iterator &it,
-			     const const_iterator &, size_type i)
-    { return it[i]; }
-    static reference access(origin_type *, const iterator &it, 
-			    const iterator &, size_type i)
-    { return it[i]; }
-  };
-
-  template <typename IT, typename V> std::ostream &operator <<
-  (std::ostream &o, const tab_ref_with_origin<IT, V>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template <typename IT, typename V>
-  struct tab_ref_reg_spaced_with_origin : public gmm::tab_ref_reg_spaced<IT> {
-    typedef  tab_ref_reg_spaced_with_origin<IT, V> this_type;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    porigin_type origin;
-    
-    tab_ref_reg_spaced_with_origin(void) {}
-    tab_ref_reg_spaced_with_origin(const IT &b, size_type n, size_type s,
-				   const porigin_type p)
-      : gmm::tab_ref_reg_spaced<IT>(b,n,s), origin(p) {}
-    tab_ref_reg_spaced_with_origin(const V &v, const sub_slice &si)
-      : gmm::tab_ref_reg_spaced<IT>(vect_begin(const_cast<V&>(v)) + si.min, 
-				    si.N, (si.max - si.min)/si.N),
-      origin(linalg_origin(const_cast<V&>(v))) {}
-    tab_ref_reg_spaced_with_origin(V &v, const sub_slice &si)
-      : gmm::tab_ref_reg_spaced<IT>(vect_begin(const_cast<V&>(v)) + si.min,
-				    si.N, (si.max - si.min)/si.N),
-	origin(linalg_origin(const_cast<V&>(v))) {}
-  };
-
-  template <typename IT, typename V> 
-  struct linalg_traits<tab_ref_reg_spaced_with_origin<IT, V> > {
-    typedef typename std::iterator_traits<IT>::pointer PT;
-    typedef tab_ref_reg_spaced_with_origin<IT, V> this_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename std::iterator_traits<IT>::value_type value_type;
-    typedef typename std::iterator_traits<IT>::reference reference;
-    typedef typename this_type::iterator iterator;
-    typedef typename this_type::iterator const_iterator;
-    typedef abstract_dense storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void clear(origin_type*, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static void do_clear(this_type &v)
-    { std::fill(v.begin(), v.end(), value_type(0)); }
-    static value_type access(const origin_type *, const const_iterator &it,
-			     const const_iterator &, size_type i)
-    { return it[i]; }
-    static reference access(origin_type *, const iterator &it, 
-			    const iterator &, size_type i)
-    { return it[i]; }
-  };
-  
-  template <typename IT, typename V> std::ostream &operator <<
-  (std::ostream &o, const tab_ref_reg_spaced_with_origin<IT, V>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template <typename IT, typename ITINDEX, typename V>
-  struct tab_ref_index_ref_with_origin 
-    : public gmm::tab_ref_index_ref<IT, ITINDEX> {
-    typedef tab_ref_index_ref_with_origin<IT, ITINDEX, V> this_type;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    porigin_type origin;
-
-    tab_ref_index_ref_with_origin(void) {}
-    tab_ref_index_ref_with_origin(const IT &b, const ITINDEX &bi,
-				  const ITINDEX &ei, porigin_type p)
-      : gmm::tab_ref_index_ref<IT, ITINDEX>(b, bi, ei), origin(p) {}
-
-    tab_ref_index_ref_with_origin(const V &v, const sub_index &si)
-      : gmm::tab_ref_index_ref<IT, ITINDEX>(vect_begin(const_cast<V&>(v)),
-					    si.begin(), si.end()),
-      origin(linalg_origin(const_cast<V&>(v))) {}
-    tab_ref_index_ref_with_origin(V &v, const sub_index &si)
-      : gmm::tab_ref_index_ref<IT, ITINDEX>(vect_begin(const_cast<V&>(v)),
-					    si.begin(), si.end()),
-	origin(linalg_origin(const_cast<V&>(v))) {}
-  };
-
-  template <typename IT, typename ITINDEX, typename V>
-  struct linalg_traits<tab_ref_index_ref_with_origin<IT, ITINDEX, V> > {
-    typedef typename std::iterator_traits<IT>::pointer PT;
-    typedef tab_ref_index_ref_with_origin<IT, ITINDEX, V> this_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename std::iterator_traits<IT>::value_type value_type;
-    typedef typename std::iterator_traits<IT>::reference reference;
-    typedef typename this_type::iterator iterator;
-    typedef typename this_type::iterator const_iterator;
-    typedef abstract_dense storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void clear(origin_type*, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static void do_clear(this_type &v)
-    { std::fill(v.begin(), v.end(), value_type(0)); }
-    static value_type access(const origin_type *, const const_iterator &it,
-			     const const_iterator &, size_type i)
-    { return it[i]; }
-    static reference access(origin_type *, const iterator &it,
-			    const iterator &, size_type i)
-    { return it[i]; }
-  };
-
-  template <typename IT, typename ITINDEX, typename V>
-  std::ostream &operator <<
-  (std::ostream &o, const tab_ref_index_ref_with_origin<IT, ITINDEX, V>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template<typename ITER, typename MIT, typename PT> 
-  struct dense_compressed_iterator {
-    typedef ITER value_type;
-    typedef ITER *pointer;
-    typedef ITER &reference;
-    typedef ptrdiff_t difference_type;
-    typedef std::random_access_iterator_tag iterator_category;
-    typedef size_t size_type;
-    typedef dense_compressed_iterator<ITER, MIT, PT> iterator;
-    typedef typename std::iterator_traits<PT>::value_type *MPT;
-
-    ITER it;
-    size_type N, nrows, ncols, i;
-    PT origin;
-    
-    iterator operator ++(int) { iterator tmp = *this; i++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; i--; return tmp; }
-    iterator &operator ++()   { ++i; return *this; }
-    iterator &operator --()   { --i; return *this; }
-    iterator &operator +=(difference_type ii) { i += ii; return *this; }
-    iterator &operator -=(difference_type ii) { i -= ii; return *this; }
-    iterator operator +(difference_type ii) const 
-    { iterator itt = *this; return (itt += ii); }
-    iterator operator -(difference_type ii) const
-    { iterator itt = *this; return (itt -= ii); }
-    difference_type operator -(const iterator &ii) const
-    { return (N ? (it - ii.it) / N : 0) + i - ii.i; }
-
-    ITER operator *() const { return it+i*N; }
-    ITER operator [](int ii) const { return it + (i+ii) * N; }
-
-    bool operator ==(const iterator &ii) const
-    { return (*this - ii) == difference_type(0); }
-    bool operator !=(const iterator &ii) const { return !(ii == *this); }
-    bool operator < (const iterator &ii) const
-    { return (*this - ii) < difference_type(0); }
-
-    dense_compressed_iterator(void) {}
-    dense_compressed_iterator(const dense_compressed_iterator<MIT,MIT,MPT> &ii)
-      : it(ii.it), N(ii.N), nrows(ii.nrows), ncols(ii.ncols), i(ii.i),
-	origin(ii.origin)  {}
-    dense_compressed_iterator(const ITER &iter, size_type n, size_type r,
-			      size_type c, size_type ii, PT o)
-      : it(iter), N(n), nrows(r), ncols(c), i(ii), origin(o) { }
-    
-  };
-
-  /* ******************************************************************** */
-  /*	    Read only reference on a compressed sparse vector             */
-  /* ******************************************************************** */
-
-  template <typename PT1, typename PT2, int shift = 0>
-  struct cs_vector_ref_iterator {
-    PT1 pr;
-    PT2 ir;
-
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    typedef PT1 pointer;
-    typedef typename std::iterator_traits<PT1>::reference  reference;
-    typedef size_t        size_type;
-    typedef ptrdiff_t     difference_type;
-    typedef std::bidirectional_iterator_tag iterator_category;
-    typedef cs_vector_ref_iterator<PT1, PT2, shift> iterator;
-    
-    cs_vector_ref_iterator(void) {}
-    cs_vector_ref_iterator(PT1 p1, PT2 p2) : pr(p1), ir(p2) {}
-
-    inline size_type index(void) const { return (*ir) - shift; }
-    iterator &operator ++() { ++pr; ++ir; return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator &operator --() { --pr; --ir; return *this; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-    
-    reference operator  *() const { return *pr; }
-    pointer   operator ->() const { return pr; }
-    
-    bool operator ==(const iterator &i) const { return (i.pr==pr);}
-    bool operator !=(const iterator &i) const { return (i.pr!=pr);}
-  };
-    
-  template <typename PT1, typename PT2, int shift = 0> struct cs_vector_ref {
-    PT1 pr;
-    PT2 ir;
-    size_type n, size_;
-
-    typedef cs_vector_ref<PT1, PT2, shift> this_type;
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    typedef typename linalg_traits<this_type>::const_iterator const_iterator;
-
-    cs_vector_ref(PT1 pt1, PT2 pt2, size_type nnz, size_type ns)
-      : pr(pt1), ir(pt2), n(nnz), size_(ns) {}
-    cs_vector_ref(void) {}
-
-    size_type size(void) const { return size_; }
-    
-    const_iterator begin(void) const { return const_iterator(pr, ir); }
-    const_iterator end(void) const { return const_iterator(pr+n, ir+n); }
-    
-    value_type operator[](size_type i) const
-    { return linalg_traits<this_type>::access(pr, begin(), end(),i); }
-  };
-
-  template <typename PT1, typename PT2, int shift>
-  struct linalg_traits<cs_vector_ref<PT1, PT2, shift> > {
-    typedef cs_vector_ref<PT1, PT2, shift> this_type;
-    typedef linalg_const is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    typedef value_type origin_type;
-    typedef typename std::iterator_traits<PT1>::value_type reference;
-    typedef cs_vector_ref_iterator<typename const_pointer<PT1>::pointer,
-	    typename const_pointer<PT2>::pointer, shift>  const_iterator;
-    typedef abstract_null_type iterator;
-    typedef abstract_sparse storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static const origin_type* origin(const this_type &v) { return v.pr; }
-    static value_type access(const origin_type *, const const_iterator &b,
-			     const const_iterator &e, size_type i) {
-      if (b.ir == e.ir) return value_type(0);
-      PT2 p = std::lower_bound(b.ir, e.ir, i+shift);
-      return (*p == i+shift && p != e.ir) ? b.pr[p-b.ir] : value_type(0);
-    }
-  };
-
-  template <typename PT1, typename PT2, int shift>
-  std::ostream &operator <<
-  (std::ostream &o, const cs_vector_ref<PT1, PT2, shift>& m)
-  { gmm::write(o,m); return o; }
-
-  template <typename PT1, typename PT2, int shift>
-  inline size_type nnz(const cs_vector_ref<PT1, PT2, shift>& l) { return l.n; }
-
-  /* ******************************************************************** */
-  /*	    Read only reference on a compressed sparse column matrix      */
-  /* ******************************************************************** */
-
-  template <typename PT1, typename PT2, typename PT3, int shift = 0>
-  struct sparse_compressed_iterator {
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    typedef const value_type *pointer;
-    typedef const value_type &reference;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-    typedef std::random_access_iterator_tag iterator_category;
-    typedef sparse_compressed_iterator<PT1, PT2, PT3, shift> iterator;
-
-    PT1 pr;
-    PT2 ir;
-    PT3 jc;
-    size_type n;
-    const value_type *origin;
-    
-    iterator operator ++(int) { iterator tmp = *this; jc++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; jc--; return tmp; }
-    iterator &operator ++()   { jc++; return *this; }
-    iterator &operator --()   { jc--; return *this; }
-    iterator &operator +=(difference_type i) { jc += i; return *this; }
-    iterator &operator -=(difference_type i) { jc -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const { return jc - i.jc; }
-
-    reference operator *() const { return pr + *jc - shift; }
-    reference operator [](int ii) { return pr + *(jc+ii) - shift; }
-
-    bool operator ==(const iterator &i) const { return (jc == i.jc); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (jc < i.jc); }
-
-    sparse_compressed_iterator(void) {}
-    sparse_compressed_iterator(PT1 p1, PT2 p2, PT3 p3, size_type nn,
-			       const value_type *o)
-      : pr(p1), ir(p2), jc(p3), n(nn), origin(o) { }
-    
-  };
-
-  template <typename PT1, typename PT2, typename PT3, int shift = 0>
-  struct csc_matrix_ref {
-    PT1 pr; // values.
-    PT2 ir; // row indexes.
-    PT3 jc; // column repartition on pr and ir.
-    size_type nc, nr;
-    
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    csc_matrix_ref(PT1 pt1, PT2 pt2, PT3 pt3, size_type nrr, size_type ncc)
-      : pr(pt1), ir(pt2), jc(pt3), nc(ncc), nr(nrr) {}
-    csc_matrix_ref(void) {}
-    
-    size_type nrows(void) const { return nr; }
-    size_type ncols(void) const { return nc; }
-   
-    value_type operator()(size_type i, size_type j) const
-      { return mat_col(*this, j)[i]; }
-  };
-
-  template <typename PT1, typename PT2, typename PT3, int shift>
-  struct linalg_traits<csc_matrix_ref<PT1, PT2, PT3, shift> > {
-    typedef csc_matrix_ref<PT1, PT2, PT3, shift> this_type;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    typedef typename std::iterator_traits<PT1>::value_type reference;
-    typedef value_type origin_type;
-    typedef abstract_sparse storage_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_row_iterator;
-    typedef abstract_null_type sub_col_type;
-    typedef cs_vector_ref<typename const_pointer<PT1>::pointer,
-            typename const_pointer<PT2>::pointer, shift> const_sub_col_type;
-    typedef sparse_compressed_iterator<typename const_pointer<PT1>::pointer,
-				       typename const_pointer<PT2>::pointer,
-				       typename const_pointer<PT3>::pointer,
-				       shift>  const_col_iterator;
-    typedef abstract_null_type col_iterator;
-    typedef col_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.pr, m.ir, m.jc, m.nr, m.pr); }
-    static const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m.pr, m.ir, m.jc + m.nc, m.nr, m.pr); }
-    static const_sub_col_type col(const const_col_iterator &it) {
-      return const_sub_col_type(it.pr + *(it.jc) - shift,
-	     it.ir + *(it.jc) - shift, *(it.jc + 1) - *(it.jc), it.n);
-    }
-    static const origin_type* origin(const this_type &m) { return m.pr; }
-    static value_type access(const const_col_iterator &itcol, size_type j)
-    { return col(itcol)[j]; }
-  };
-
-
-  template <typename PT1, typename PT2, typename PT3, int shift>
-  std::ostream &operator <<
-  (std::ostream &o, const csc_matrix_ref<PT1, PT2, PT3, shift>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*	   Read only reference on a compressed sparse row matrix          */
-  /* ******************************************************************** */
-
-  template <typename PT1, typename PT2, typename PT3, int shift = 0>
-  struct csr_matrix_ref {
-    PT1 pr; // values.
-    PT2 ir; // column indexes.
-    PT3 jc; // row repartition on pr and ir.
-    size_type nc, nr;
-    
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    csr_matrix_ref(PT1 pt1, PT2 pt2, PT3 pt3, size_type nrr, size_type ncc)
-      : pr(pt1), ir(pt2), jc(pt3), nc(ncc), nr(nrr) {}
-    csr_matrix_ref(void) {}
-    
-    size_type nrows(void) const { return nr; }
-    size_type ncols(void) const { return nc; }
-   
-    value_type operator()(size_type i, size_type j) const
-      { return mat_col(*this, i)[j]; }
-  };
-  
-  template <typename PT1, typename PT2, typename PT3, int shift>
-  struct linalg_traits<csr_matrix_ref<PT1, PT2, PT3, shift> > {
-    typedef csr_matrix_ref<PT1, PT2, PT3, shift> this_type;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename std::iterator_traits<PT1>::value_type value_type;
-    typedef typename std::iterator_traits<PT1>::value_type reference;
-    typedef value_type origin_type;
-    typedef abstract_sparse storage_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_col_iterator;
-    typedef abstract_null_type sub_row_type;
-    typedef cs_vector_ref<typename const_pointer<PT1>::pointer,
-			  typename const_pointer<PT2>::pointer, shift>
-            const_sub_row_type;
-    typedef sparse_compressed_iterator<typename const_pointer<PT1>::pointer,
-				       typename const_pointer<PT2>::pointer,
-				       typename const_pointer<PT3>::pointer,
-				       shift>  const_row_iterator;
-    typedef abstract_null_type row_iterator;
-    typedef row_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.pr, m.ir, m.jc, m.nc, m.pr); }
-    static const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m.pr, m.ir, m.jc + m.nr, m.nc, m.pr); }
-    static const_sub_row_type row(const const_row_iterator &it) {
-      return const_sub_row_type(it.pr + *(it.jc) - shift,
-	     it.ir + *(it.jc) - shift, *(it.jc + 1) - *(it.jc), it.n);
-    }
-    static const origin_type* origin(const this_type &m) { return m.pr; }
-    static value_type access(const const_row_iterator &itrow, size_type j)
-    { return row(itrow)[j]; }
-  };
-
-  template <typename PT1, typename PT2, typename PT3, int shift>
-  std::ostream &operator <<
-  (std::ostream &o, const csr_matrix_ref<PT1, PT2, PT3, shift>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ********************************************************************* */
-  /*		                                         		   */
-  /*		Simple interface for C arrays                     	   */
-  /*		                                         		   */
-  /* ********************************************************************* */
-
-  template <class PT> struct array1D_reference {
-
-    typedef typename std::iterator_traits<PT>::value_type value_type;
-
-    PT begin, end;
-    
-    const value_type &operator[](size_type i) const { return *(begin+i); }
-    value_type &operator[](size_type i) { return *(begin+i); }
-
-    array1D_reference(PT begin_, size_type s) : begin(begin_), end(begin_+s) {}
-  };
-
-  template <typename PT>
-  struct linalg_traits<array1D_reference<PT> > {
-    typedef array1D_reference<PT> this_type;
-    typedef this_type origin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename std::iterator_traits<PT>::value_type value_type;
-    typedef typename std::iterator_traits<PT>::reference reference;
-    typedef PT iterator;
-    typedef PT const_iterator;
-    typedef abstract_dense storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.end - v.begin; }
-    static iterator begin(this_type &v) { return v.begin; }
-    static const_iterator begin(const this_type &v) { return v.begin; }
-    static iterator end(this_type &v) { return v.end; }
-    static const_iterator end(const this_type &v) { return v.end; }
-    static origin_type* origin(this_type &v) { return &v; }
-    static const origin_type* origin(const this_type &v) { return &v; }
-    static void clear(origin_type*, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static void do_clear(this_type &v)
-    { std::fill(v.begin, v.end, value_type(0)); }
-    static value_type access(const origin_type *, const const_iterator &it,
-			     const const_iterator &, size_type i)
-    { return it[i]; }
-    static reference access(origin_type *, const iterator &it,
-			    const iterator &, size_type i)
-    { return it[i]; }
-    static void resize(this_type &, size_type )
-    { GMM_ASSERT1(false, "Not resizable vector"); }
-  };
-
-  template<typename PT> std::ostream &operator <<
-  (std::ostream &o, const array1D_reference<PT>& v)
-  { gmm::write(o,v); return o; }
-  
-  template <class PT> struct array2D_col_reference {
-
-    typedef typename std::iterator_traits<PT>::value_type T;
-    typedef typename std::iterator_traits<PT>::reference reference;
-    typedef typename const_reference<reference>::reference const_reference;
-    typedef PT iterator;
-    typedef typename const_pointer<PT>::pointer const_iterator;
-    
-    PT begin_;
-    size_type nbl, nbc;
-
-    inline const_reference operator ()(size_type l, size_type c) const {
-      GMM_ASSERT2(l < nbl && c < nbc, "out of range");
-      return *(begin_ + c*nbl+l);
-    }
-    inline reference operator ()(size_type l, size_type c) {
-      GMM_ASSERT2(l < nbl && c < nbc, "out of range");
-      return *(begin_ + c*nbl+l);
-    }
-    
-    void resize(size_type, size_type);
-    void reshape(size_type m, size_type n) {
-      GMM_ASSERT2(n*m == nbl*nbc, "dimensions mismatch");
-      nbl = m; nbc = n;
-    }
-    
-    void fill(T a, T b = T(0)) { 
-      std::fill(begin_, end+nbc*nbl, b);
-      iterator p = begin_, e = end+nbc*nbl;
-      while (p < e) { *p = a; p += nbl+1; }
-    }
-    inline size_type nrows(void) const { return nbl; }
-    inline size_type ncols(void) const { return nbc; }
-
-    iterator begin(void) { return begin_; }
-    const_iterator begin(void) const { return begin_; }
-    iterator end(void) { return begin_+nbl*nbc; }
-    const_iterator end(void) const { return begin_+nbl*nbc; }
-
-    array2D_col_reference(PT begin__, size_type nrows_, size_type ncols_)
-      : begin_(begin__), nbl(nrows_), nbc(ncols_) {}
-  };
-
-  template <typename PT> struct linalg_traits<array2D_col_reference<PT> > {
-    typedef array2D_col_reference<PT> this_type;
-    typedef this_type origin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename std::iterator_traits<PT>::value_type value_type;
-    typedef typename std::iterator_traits<PT>::reference reference;
-    typedef abstract_dense storage_type;
-    typedef tab_ref_reg_spaced_with_origin<typename this_type::iterator,
-					   this_type> sub_row_type;
-    typedef tab_ref_reg_spaced_with_origin<typename this_type::const_iterator,
-					   this_type> const_sub_row_type;
-    typedef dense_compressed_iterator<typename this_type::iterator,
-				      typename this_type::iterator,
-				      this_type *> row_iterator;
-    typedef dense_compressed_iterator<typename this_type::const_iterator,
-				      typename this_type::iterator,
-				      const this_type *> const_row_iterator;
-    typedef tab_ref_with_origin<typename this_type::iterator, 
-				this_type> sub_col_type;
-    typedef tab_ref_with_origin<typename this_type::const_iterator,
-				this_type> const_sub_col_type;
-    typedef dense_compressed_iterator<typename this_type::iterator,
-				      typename this_type::iterator,
-				      this_type *> col_iterator;
-    typedef dense_compressed_iterator<typename this_type::const_iterator,
-				      typename this_type::iterator,
-				      const this_type *> const_col_iterator;
-    typedef col_and_row sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return const_sub_row_type(*it, it.nrows, it.ncols, it.origin); }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return const_sub_col_type(*it, *it + it.nrows, it.origin); }
-    static sub_row_type row(const row_iterator &it)
-    { return sub_row_type(*it, it.nrows, it.ncols, it.origin); }
-    static sub_col_type col(const col_iterator &it)
-    { return sub_col_type(*it, *it + it.nrows, it.origin); }
-    static row_iterator row_begin(this_type &m)
-    { return row_iterator(m.begin(), 1, m.nrows(), m.ncols(), 0, &m); }
-    static row_iterator row_end(this_type &m)
-    { return row_iterator(m.begin(), 1, m.nrows(), m.ncols(), m.nrows(), &m); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.begin(), 1, m.nrows(), m.ncols(), 0, &m); }
-    static const_row_iterator row_end(const this_type &m) {
-      return const_row_iterator(m.begin(), 1, m.nrows(),
-				m.ncols(), m.nrows(), &m);
-    }
-    static col_iterator col_begin(this_type &m)
-    { return col_iterator(m.begin(), m.nrows(), m.nrows(), m.ncols(), 0, &m); }
-    static col_iterator col_end(this_type &m) {
-      return col_iterator(m.begin(), m.nrows(), m.nrows(), m.ncols(),
-			  m.ncols(), &m);
-    }
-    static const_col_iterator col_begin(const this_type &m) {
-      return const_col_iterator(m.begin(), m.nrows(), m.nrows(),
-				m.ncols(), 0, &m);
-    }
-    static const_col_iterator col_end(const this_type &m) {
-      return const_col_iterator(m.begin(), m.nrows(),m.nrows(),m.ncols(),
-				m.ncols(), &m);
-    }
-    static origin_type* origin(this_type &m) { return &m; }
-    static const origin_type* origin(const this_type &m) { return &m; }
-    static void do_clear(this_type &m) { m.fill(value_type(0)); }
-    static value_type access(const const_col_iterator &itcol, size_type j)
-    { return (*itcol)[j]; }
-    static reference access(const col_iterator &itcol, size_type j)
-    { return (*itcol)[j]; }
-    static void resize(this_type &v, size_type m, size_type n)
-    { v.resize(m,n); }
-    static void reshape(this_type &v, size_type m, size_type n)
-    { v.reshape(m, n); }
-  };
-
-  template<typename PT> std::ostream &operator <<
-    (std::ostream &o, const array2D_col_reference<PT>& m)
-  { gmm::write(o,m); return o; }
-
-
-
-  template <class PT> struct array2D_row_reference {
-    
-    typedef typename std::iterator_traits<PT>::value_type T;
-    typedef typename std::iterator_traits<PT>::reference reference;
-    typedef typename const_reference<reference>::reference const_reference;
-    typedef PT iterator;
-    typedef typename const_pointer<PT>::pointer const_iterator;
-    
-    PT begin_;
-    size_type nbl, nbc;
-
-    inline const_reference operator ()(size_type l, size_type c) const {
-      GMM_ASSERT2(l < nbl && c < nbc, "out of range");
-      return *(begin_ + l*nbc+c);
-    }
-    inline reference operator ()(size_type l, size_type c) {
-      GMM_ASSERT2(l < nbl && c < nbc, "out of range");
-      return *(begin_ + l*nbc+c);
-    }
-    
-    void resize(size_type, size_type);
-    void reshape(size_type m, size_type n) {
-      GMM_ASSERT2(n*m == nbl*nbc, "dimensions mismatch");
-      nbl = m; nbc = n;
-    }
-    
-    void fill(T a, T b = T(0)) { 
-      std::fill(begin_, end+nbc*nbl, b);
-      iterator p = begin_, e = end+nbc*nbl;
-      while (p < e) { *p = a; p += nbc+1; }
-    }
-    inline size_type nrows(void) const { return nbl; }
-    inline size_type ncols(void) const { return nbc; }
-
-    iterator begin(void) { return begin_; }
-    const_iterator begin(void) const { return begin_; }
-    iterator end(void) { return begin_+nbl*nbc; }
-    const_iterator end(void) const { return begin_+nbl*nbc; }
-
-    array2D_row_reference(PT begin__, size_type nrows_, size_type ncols_)
-      : begin_(begin__), nbl(nrows_), nbc(ncols_) {}
-  };
-
-  template <typename PT> struct linalg_traits<array2D_row_reference<PT> > {
-    typedef array2D_row_reference<PT> this_type;
-    typedef this_type origin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename std::iterator_traits<PT>::value_type value_type;
-    typedef typename std::iterator_traits<PT>::reference reference;
-    typedef abstract_dense storage_type;
-    typedef tab_ref_reg_spaced_with_origin<typename this_type::iterator,
-					   this_type> sub_col_type;
-    typedef tab_ref_reg_spaced_with_origin<typename this_type::const_iterator,
-					   this_type> const_sub_col_type;
-    typedef dense_compressed_iterator<typename this_type::iterator,
-				      typename this_type::iterator,
-				      this_type *> col_iterator;
-    typedef dense_compressed_iterator<typename this_type::const_iterator,
-				      typename this_type::iterator,
-				      const this_type *> const_col_iterator;
-    typedef tab_ref_with_origin<typename this_type::iterator, 
-				this_type> sub_row_type;
-    typedef tab_ref_with_origin<typename this_type::const_iterator,
-				this_type> const_sub_row_type;
-    typedef dense_compressed_iterator<typename this_type::iterator,
-				      typename this_type::iterator,
-				      this_type *> row_iterator;
-    typedef dense_compressed_iterator<typename this_type::const_iterator,
-				      typename this_type::iterator,
-				      const this_type *> const_row_iterator;
-    typedef col_and_row sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return const_sub_col_type(*it, it.ncols, it.nrows, it.origin); }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return const_sub_row_type(*it, *it + it.ncols, it.origin); }
-    static sub_col_type col(const col_iterator &it)
-    { return sub_col_type(*it, *it, it.ncols, it.nrows, it.origin); }
-    static sub_row_type row(const row_iterator &it)
-    { return sub_row_type(*it, *it + it.ncols, it.origin); }
-    static col_iterator col_begin(this_type &m)
-    { return col_iterator(m.begin(), 1, m.ncols(), m.nrows(), 0, &m); }
-    static col_iterator col_end(this_type &m)
-    { return col_iterator(m.begin(), 1, m.ncols(), m.nrows(), m.ncols(), &m); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.begin(), 1, m.ncols(), m.nrows(), 0, &m); }
-    static const_col_iterator col_end(const this_type &m) {
-      return const_col_iterator(m.begin(), 1, m.ncols(),
-				m.nrows(), m.ncols(), &m);
-    }
-    static row_iterator row_begin(this_type &m)
-    { return row_iterator(m.begin(), m.ncols(), m.ncols(), m.nrows(), 0, &m); }
-    static row_iterator row_end(this_type &m) {
-      return row_iterator(m.begin(), m.ncols(), m.ncols(), m.nrows(),
-			  m.nrows(), &m);
-    }
-    static const_row_iterator row_begin(const this_type &m) {
-      return const_row_iterator(m.begin(), m.ncols(), m.ncols(), m.nrows(),
-				0, &m);
-    }
-    static const_row_iterator row_end(const this_type &m) {
-      return const_row_iterator(m.begin(), m.ncols(), m.ncols(), m.nrows(),
-				m.nrows(), &m);
-    }
-    static origin_type* origin(this_type &m) { return &m; }
-    static const origin_type* origin(const this_type &m) { return &m; }
-    static void do_clear(this_type &m) { m.fill(value_type(0)); }
-    static value_type access(const const_row_iterator &itrow, size_type j)
-    { return (*itrow)[j]; }
-    static reference access(const row_iterator &itrow, size_type j)
-    { return (*itrow)[j]; }
-    static void resize(this_type &v, size_type m, size_type n)
-    { v.resize(m,n); }
-    static void reshape(this_type &v, size_type m, size_type n)
-    { v.reshape(m, n); }
-  };
-
-  template<typename PT> std::ostream &operator <<
-    (std::ostream &o, const array2D_row_reference<PT>& m)
-  { gmm::write(o,m); return o; }
-
-
-
-
-
-
-}
-
-
-#endif //  GMM_INTERFACE_H__
diff --git a/Contrib/gmm/gmm_interface_bgeot.h b/Contrib/gmm/gmm_interface_bgeot.h
deleted file mode 100755
index baa8e77..0000000
--- a/Contrib/gmm/gmm_interface_bgeot.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_interface_bgeot.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief interface for bgeot::small_vector
-*/
-#ifndef GMM_INTERFACE_BGEOT_H__
-#define GMM_INTERFACE_BGEOT_H__
-
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*		                                         	 	   */
-  /*		Traits for bgeot objects                     		   */
-  /*		                                         		   */
-  /* ********************************************************************* */
-
-  template <typename T> struct linalg_traits<bgeot::small_vector<T> > {
-    typedef bgeot::small_vector<T> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_vector linalg_type;
-    typedef T value_type;
-    typedef T& reference;
-    typedef typename this_type::iterator iterator;
-    typedef typename this_type::const_iterator const_iterator;
-    typedef abstract_dense storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static origin_type* origin(this_type &v) { return &v; }
-    static const origin_type* origin(const this_type &v) { return &v; }
-    static void clear(origin_type* o, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static void do_clear(this_type &v)
-    { std::fill(v.begin(), v.end(), value_type(0)); }
-    static value_type access(const origin_type *, const const_iterator &it,
-			     const const_iterator &, size_type i)
-    { return it[i]; }
-    static reference access(origin_type *, const iterator &it,
-			    const iterator &, size_type i)
-    { return it[i]; }
-    static void resize(this_type &v, size_type n) { v.resize(n); }
-  };
-
-}
-
-
-#endif //  GMM_INTERFACE_BGEOT_H__
diff --git a/Contrib/gmm/gmm_iter.h b/Contrib/gmm/gmm_iter.h
deleted file mode 100755
index 3a593db..0000000
--- a/Contrib/gmm/gmm_iter.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_iter.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date February 10, 2003.
-   @brief Iteration object.
-*/
-
-#ifndef GMM_ITER_H__
-#define GMM_ITER_H__
-
-#include "gmm_kernel.h"
-
-namespace gmm {
-
-  /**  The Iteration object calculates whether the solution has reached the
-       desired accuracy, or whether the maximum number of iterations has
-       been reached. 
-
-       The method finished() checks the convergence.  The first()
-       method is used to determine the first iteration of the loop.
-  */
-  class iteration {
-  protected :
-    double rhsn;       /* Right hand side norm.                            */
-    size_type maxiter; /* Max. number of iterations.                       */
-    int noise;         /* if noise > 0 iterations are printed.             */
-    double resmax;     /* maximum residu.                                  */
-    double resminreach, resadd;
-    size_type nit;     /* iteration number.                                */
-    double res;        /* last computed residu.                            */
-    std::string name;  /* eventually, name of the method.                  */
-    bool written;
-    void (*callback)(const gmm::iteration&);
-  public :
-
-    void init(void) { 
-      nit = 0; res = 0.0; written = false; 
-      resminreach = 1E50; resadd = 0.0; 
-      callback = 0;
-    }
-
-    iteration(double r = 1.0E-8, int noi = 0, size_type mit = size_type(-1))
-      : rhsn(1.0), maxiter(mit), noise(noi), resmax(r) { init(); }
-
-    void  operator ++(int) {  nit++; written = false; resadd += res; }
-    void  operator ++() { (*this)++; }
-
-    bool first(void) { return nit == 0; }
-
-    /* get/set the "noisyness" (verbosity) of the solvers */
-    int get_noisy(void) const { return noise; }
-    void set_noisy(int n) { noise = n; }
-    void reduce_noisy(void) { if (noise > 0) noise--; }
-
-    double get_resmax(void) const { return resmax; }
-    void set_resmax(double r) { resmax = r; }
-
-    double get_res() const { return res; }
-
-    /* change the user-definable callback, called after each iteration */
-    void set_callback(void (*t)(const gmm::iteration&)) {
-      callback = t;
-    }
-
-    size_type get_iteration(void) const { return nit; }
-    void set_iteration(size_type i) { nit = i; }
-    
-    size_type get_maxiter(void) const { return maxiter; }
-    void set_maxiter(size_type i) { maxiter = i; }
-
-    double get_rhsnorm(void) const { return rhsn; }
-    void set_rhsnorm(double r) { rhsn = r; }
-    
-    bool converged(void) { return res <= rhsn * resmax; }
-    bool converged(double nr) { 
-      res = gmm::abs(nr); resminreach = std::min(resminreach, res);
-      return converged();
-    }
-    template <typename VECT> bool converged(const VECT &v)
-    { return converged(gmm::vect_norm2(v)); }
-
-    bool finished(double nr) {
-      if (callback) callback(*this);
-      if (noise > 0 && !written) {
-	double a = (rhsn == 0) ? 1.0 : rhsn;
-	converged(nr);
-	cout << name << " iter " << nit << " residual "
-	     << gmm::abs(nr) / a;
-// 	if (nit % 100 == 0 && nit > 0) {
-// 	  cout << " (residual min " << resminreach / a << " mean val "
-// 	       << resadd / (100.0 * a) << " )";
-// 	  resadd = 0.0;
-// 	}
-	cout <<  endl;
-	written = true;
-      }
-      return (nit >= maxiter || converged(nr));
-    }
-    template <typename VECT> bool finished_vect(const VECT &v)
-    { return finished(double(gmm::vect_norm2(v))); }
-
-
-    void set_name(const std::string &n) { name = n; }
-    const std::string &get_name(void) const { return name; }
-
-  };
-
-}
-
-#endif /* GMM_ITER_H__ */
diff --git a/Contrib/gmm/gmm_iter_solvers.h b/Contrib/gmm/gmm_iter_solvers.h
deleted file mode 100755
index 4e782c7..0000000
--- a/Contrib/gmm/gmm_iter_solvers.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_iter_solvers.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Include standard gmm iterative solvers (cg, gmres, ...)
-*/
-#ifndef GMM_ITER_SOLVERS_H__
-#define GMM_ITER_SOLVERS_H__
-
-#include "gmm_iter.h"
-
-
-namespace gmm {
-
-  /** mixed method to find a zero of a real function G, a priori 
-   * between a and b. If the zero is not between a and b, iterations
-   * of secant are applied. When a convenient interval is found,
-   * iterations of dichotomie and regula falsi are applied.
-   */
-  template <typename FUNC, typename T>
-  T find_root(const FUNC &G, T a = T(0), T b = T(1),
-	      T tol = gmm::default_tol(T())) {
-    T c, Ga = G(a), Gb = G(b), Gc, d;
-    d = gmm::abs(b - a);
-#if 0
-    for (int i = 0; i < 4; i++) { /* secant iterations.                   */
-      if (d < tol) return (b + a) / 2.0;
-      c = b - Gb * (b - a) / (Gb - Ga); Gc = G(c);
-      a = b; b = c; Ga = Gb; Gb = Gc;
-      d = gmm::abs(b - a);
-    }
-#endif
-    while (Ga * Gb > 0.0) { /* secant iterations.                         */
-      if (d < tol) return (b + a) / 2.0;
-      c = b - Gb * (b - a) / (Gb - Ga); Gc = G(c);
-      a = b; b = c; Ga = Gb; Gb = Gc;
-      d = gmm::abs(b - a);
-    }
-    
-    c = std::max(a, b); a = std::min(a, b); b = c;
-    while (d > tol) {
-      c = b - (b - a) * (Gb / (Gb - Ga)); /* regula falsi.     */
-      if (c > b) c = b; if (c < a) c = a; 
-      Gc = G(c);
-      if (Gc*Gb > 0) { b = c; Gb = Gc; } else { a = c; Ga = Gc; }
-      c = (b + a) / 2.0 ; Gc = G(c); /* Dichotomie.                       */
-      if (Gc*Gb > 0) { b = c; Gb = Gc; } else { a = c; Ga = Gc; }
-      d = gmm::abs(b - a); c = (b + a) / 2.0; if ((c == a) || (c == b)) d = 0.0;
-    }
-    return (b + a) / 2.0;
-  }
-  
-}
-
-#include "gmm_precond_diagonal.h"
-#include "gmm_precond_ildlt.h"
-#include "gmm_precond_ildltt.h"
-#include "gmm_precond_mr_approx_inverse.h"
-#include "gmm_precond_ilu.h"
-#include "gmm_precond_ilut.h"
-#include "gmm_precond_ilutp.h"
-
-
-
-#include "gmm_solver_cg.h"
-#include "gmm_solver_bicgstab.h"
-#include "gmm_solver_qmr.h"
-#include "gmm_solver_constrained_cg.h"
-#include "gmm_solver_Schwarz_additive.h"
-#include "gmm_modified_gram_schmidt.h"
-#include "gmm_tri_solve.h"
-#include "gmm_solver_gmres.h"
-#include "gmm_solver_bfgs.h"
-#include "gmm_least_squares_cg.h"
-
-// #include "gmm_solver_idgmres.h"
-
-
-
-#endif //  GMM_ITER_SOLVERS_H__
diff --git a/Contrib/gmm/gmm_kernel.h b/Contrib/gmm/gmm_kernel.h
deleted file mode 100755
index e8fd9a4..0000000
--- a/Contrib/gmm/gmm_kernel.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_kernel.h 
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date November 15, 2003.
-   @brief Include the base gmm files.
- */
-
-#ifndef GMM_KERNEL_H__
-#define GMM_KERNEL_H__
-
-#include "gmm_def.h"
-#include "gmm_blas.h"
-#include "gmm_real_part.h"
-#include "gmm_interface.h"
-#include "gmm_sub_vector.h"
-#include "gmm_sub_matrix.h"
-#include "gmm_vector_to_matrix.h"
-#include "gmm_vector.h"
-#include "gmm_matrix.h"
-#include "gmm_tri_solve.h"
-#include "gmm_blas_interface.h"
-
-
-#endif //  GMM_KERNEL_H__
diff --git a/Contrib/gmm/gmm_lapack_interface.h b/Contrib/gmm/gmm_lapack_interface.h
deleted file mode 100755
index ea5edb4..0000000
--- a/Contrib/gmm/gmm_lapack_interface.h
+++ /dev/null
@@ -1,362 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_lapack_interface.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 7, 2003.
-   @brief gmm interface for LAPACK
-*/
-
-#if defined(GMM_USES_LAPACK) || defined(GMM_USES_ATLAS)
-
-#ifndef GMM_LAPACK_INTERFACE_H
-#define GMM_LAPACK_INTERFACE_H
-
-#include "gmm_blas_interface.h"
-#include "gmm_dense_lu.h"
-#include "gmm_dense_qr.h"
-
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /* Operations interfaced for T = float, double, std::complex<float>      */
-  /*    or std::complex<double> :                                          */
-  /*                                                                       */
-  /* lu_factor(dense_matrix<T>, std::vector<int>)                          */
-  /* lu_solve(dense_matrix<T>, std::vector<T>, std::vector<T>)             */
-  /* lu_solve(dense_matrix<T>, std::vector<int>, std::vector<T>,           */
-  /*          std::vector<T>)                                              */
-  /* lu_solve_transposed(dense_matrix<T>, std::vector<int>, std::vector<T>,*/
-  /*          std::vector<T>)                                              */
-  /* lu_inverse(dense_matrix<T>)                                           */
-  /* lu_inverse(dense_matrix<T>, std::vector<int>, dense_matrix<T>)        */
-  /*                                                                       */
-  /* qr_factor(dense_matrix<T>, dense_matrix<T>, dense_matrix<T>)          */
-  /*                                                                       */
-  /* implicit_qr_algorithm(dense_matrix<T>, std::vector<T>)                */
-  /* implicit_qr_algorithm(dense_matrix<T>, std::vector<T>,                */
-  /*                       dense_matrix<T>)                                */
-  /* implicit_qr_algorithm(dense_matrix<T>, std::vector<std::complex<T> >) */
-  /* implicit_qr_algorithm(dense_matrix<T>, std::vector<std::complex<T> >, */
-  /*                       dense_matrix<T>)                                */
-  /*                                                                       */
-  /* ********************************************************************* */
-
-  /* ********************************************************************* */
-  /* LAPACK functions used.                                                */
-  /* ********************************************************************* */
-
-  extern "C" {
-    void sgetrf_(...); void dgetrf_(...); void cgetrf_(...); void zgetrf_(...);
-    void sgetrs_(...); void dgetrs_(...); void cgetrs_(...); void zgetrs_(...);
-    void sgetri_(...); void dgetri_(...); void cgetri_(...); void zgetri_(...);
-    void sgeqrf_(...); void dgeqrf_(...); void cgeqrf_(...); void zgeqrf_(...);
-    void sorgqr_(...); void dorgqr_(...); void cungqr_(...); void zungqr_(...);
-    void sormqr_(...); void dormqr_(...); void cunmqr_(...); void zunmqr_(...);
-    void sgees_ (...); void dgees_ (...); void cgees_ (...); void zgees_ (...);
-    void sgeev_ (...); void dgeev_ (...); void cgeev_ (...); void zgeev_ (...);
-  }
-
-  /* ********************************************************************* */
-  /* LU decomposition.                                                     */
-  /* ********************************************************************* */
-
-# define getrf_interface(lapack_name, base_type) inline                    \
-  size_type lu_factor(dense_matrix<base_type > &A, std::vector<int> &ipvt){\
-    GMMLAPACK_TRACE("getrf_interface");                                    \
-    int m(mat_nrows(A)), n(mat_ncols(A)), lda(m), info(0);                 \
-    if (m && n) lapack_name(&m, &n, &A(0,0), &lda, &ipvt[0], &info);       \
-    return size_type(info);                                                \
-  }
-
-  getrf_interface(sgetrf_, BLAS_S)
-  getrf_interface(dgetrf_, BLAS_D)
-  getrf_interface(cgetrf_, BLAS_C)
-  getrf_interface(zgetrf_, BLAS_Z)
-
-  /* ********************************************************************* */
-  /* LU solve.                                                             */
-  /* ********************************************************************* */
-
-# define getrs_interface(f_name, trans1, lapack_name, base_type) inline    \
-  void f_name(const dense_matrix<base_type > &A,                           \
-	      const std::vector<int> &ipvt, std::vector<base_type > &x,    \
-	      const std::vector<base_type > &b) {                          \
-    GMMLAPACK_TRACE("getrs_interface");                                    \
-    int n(mat_nrows(A)), info, nrhs(1);                                    \
-    gmm::copy(b, x); trans1;                                               \
-    if (n)                                                                 \
-      lapack_name(&t, &n, &nrhs, &(A(0,0)),&n,&ipvt[0], &x[0], &n, &info); \
-  }
-  
-# define getrs_trans_n const char t = 'N'
-# define getrs_trans_t const char t = 'T'
-
-  getrs_interface(lu_solve, getrs_trans_n, sgetrs_, BLAS_S)
-  getrs_interface(lu_solve, getrs_trans_n, dgetrs_, BLAS_D)
-  getrs_interface(lu_solve, getrs_trans_n, cgetrs_, BLAS_C)
-  getrs_interface(lu_solve, getrs_trans_n, zgetrs_, BLAS_Z)
-  getrs_interface(lu_solve_transposed, getrs_trans_t, sgetrs_, BLAS_S)
-  getrs_interface(lu_solve_transposed, getrs_trans_t, dgetrs_, BLAS_D)
-  getrs_interface(lu_solve_transposed, getrs_trans_t, cgetrs_, BLAS_C)
-  getrs_interface(lu_solve_transposed, getrs_trans_t, zgetrs_, BLAS_Z)
-
-  /* ********************************************************************* */
-  /* LU inverse.                                                           */
-  /* ********************************************************************* */
-
-# define getri_interface(lapack_name, base_type) inline                    \
-  void lu_inverse(const dense_matrix<base_type > &LU,                      \
-       std::vector<int> &ipvt, const dense_matrix<base_type > &A_) {       \
-    GMMLAPACK_TRACE("getri_interface");                                    \
-    dense_matrix<base_type >&                                              \
-    A = const_cast<dense_matrix<base_type > &>(A_);                        \
-    int n(mat_nrows(A)), info, lwork(-1); base_type work1;                 \
-    if (n) {                                                               \
-      gmm::copy(LU, A);                                                    \
-      lapack_name(&n, &A(0,0), &n, &ipvt[0], &work1, &lwork, &info);       \
-      lwork = int(gmm::real(work1));                                       \
-      std::vector<base_type > work(lwork);                                 \
-      lapack_name(&n, &A(0,0), &n, &ipvt[0], &work[0], &lwork, &info);     \
-    }                                                                      \
-  }
-
-  getri_interface(sgetri_, BLAS_S)
-  getri_interface(dgetri_, BLAS_D)
-  getri_interface(cgetri_, BLAS_C)
-  getri_interface(zgetri_, BLAS_Z)
-
-
-  /* ********************************************************************* */
-  /* QR factorization.                                                     */
-  /* ********************************************************************* */
-
-# define geqrf_interface(lapack_name1, base_type) inline		   \
-  void qr_factor(dense_matrix<base_type > &A){			           \
-    GMMLAPACK_TRACE("geqrf_interface");				           \
-    int m(mat_nrows(A)), n(mat_ncols(A)), info, lwork(-1); base_type work1;\
-    if (m && n) {							   \
-      std::vector<base_type > tau(n);					   \
-      lapack_name1(&m, &n, &A(0,0), &m, &tau[0], &work1  , &lwork, &info); \
-      lwork = int(gmm::real(work1));					   \
-      std::vector<base_type > work(lwork);				   \
-      lapack_name1(&m, &n, &A(0,0), &m, &tau[0], &work[0], &lwork, &info); \
-      GMM_ASSERT1(!info, "QR factorization failed");			   \
-    }									   \
-  }
-    
-  geqrf_interface(sgeqrf_, BLAS_S)
-  geqrf_interface(dgeqrf_, BLAS_D)
-    // For complex values, housholder vectors are not the same as in
-    // gmm::lu_factor. Impossible to interface for the moment.
-    //  geqrf_interface(cgeqrf_, BLAS_C)
-    //  geqrf_interface(zgeqrf_, BLAS_Z)
-
-# define geqrf_interface2(lapack_name1, lapack_name2, base_type) inline    \
-  void qr_factor(const dense_matrix<base_type > &A,                        \
-       dense_matrix<base_type > &Q, dense_matrix<base_type > &R) {         \
-    GMMLAPACK_TRACE("geqrf_interface2");                                   \
-    int m(mat_nrows(A)), n(mat_ncols(A)), info, lwork(-1); base_type work1;\
-    if (m && n) {                                                          \
-      gmm::copy(A, Q);                                                     \
-      std::vector<base_type > tau(n);                                      \
-      lapack_name1(&m, &n, &Q(0,0), &m, &tau[0], &work1  , &lwork, &info); \
-      lwork = int(gmm::real(work1));                                       \
-      std::vector<base_type > work(lwork);                                 \
-      lapack_name1(&m, &n, &Q(0,0), &m, &tau[0], &work[0], &lwork, &info); \
-      GMM_ASSERT1(!info, "QR factorization failed");                       \
-      base_type *p = &R(0,0), *q = &Q(0,0);                                \
-      for (int j = 0; j < n; ++j, q += m-n)                                \
-        for (int i = 0; i < n; ++i, ++p, ++q)                              \
-          *p = (j < i) ? base_type(0) : *q;                                \
-      lapack_name2(&m, &n, &n, &Q(0,0), &m,&tau[0],&work[0],&lwork,&info); \
-    }                                                                      \
-    else gmm::clear(Q);                                                    \
-  }
-
-  geqrf_interface2(sgeqrf_, sorgqr_, BLAS_S)
-  geqrf_interface2(dgeqrf_, dorgqr_, BLAS_D)
-  geqrf_interface2(cgeqrf_, cungqr_, BLAS_C)
-  geqrf_interface2(zgeqrf_, zungqr_, BLAS_Z)
-  
-  /* ********************************************************************* */
-  /* QR algorithm for eigenvalues search.                                  */
-  /* ********************************************************************* */
-
-# define gees_interface(lapack_name, base_type)                            \
-  template <typename VECT> inline void implicit_qr_algorithm(              \
-         const dense_matrix<base_type > &A,  const VECT &eigval_,          \
-         dense_matrix<base_type > &Q,                                      \
-         double tol=gmm::default_tol(base_type()), bool compvect = true) { \
-    GMMLAPACK_TRACE("gees_interface");                                     \
-    typedef bool (*L_fp)(...);  L_fp p = 0;                                \
-    int n(mat_nrows(A)), info, lwork(-1), sdim; base_type work1;           \
-    if (!n) return;                                                        \
-    dense_matrix<base_type > H(n,n); gmm::copy(A, H);                      \
-    char jobvs = (compvect ? 'V' : 'N'), sort = 'N';                       \
-    std::vector<double> rwork(n), eigv1(n), eigv2(n);                      \
-    lapack_name(&jobvs, &sort, p, &n, &H(0,0), &n, &sdim, &eigv1[0],       \
-                &eigv2[0], &Q(0,0), &n, &work1, &lwork, &rwork[0], &info); \
-    lwork = int(gmm::real(work1));                                         \
-    std::vector<base_type > work(lwork);                                   \
-    lapack_name(&jobvs, &sort, p, &n, &H(0,0), &n, &sdim, &eigv1[0],       \
-		&eigv2[0], &Q(0,0), &n, &work[0], &lwork, &rwork[0],&info);\
-    GMM_ASSERT1(!info, "QR algorithm failed");                             \
-    extract_eig(H, const_cast<VECT &>(eigval_), tol);                      \
-  }
-
-# define gees_interface2(lapack_name, base_type)                           \
-  template <typename VECT> inline void implicit_qr_algorithm(              \
-         const dense_matrix<base_type > &A,  const VECT &eigval_,          \
-         dense_matrix<base_type > &Q,                                      \
-         double tol=gmm::default_tol(base_type()), bool compvect = true) { \
-    GMMLAPACK_TRACE("gees_interface2");                                    \
-    typedef bool (*L_fp)(...);  L_fp p = 0;                                \
-    int n(mat_nrows(A)), info, lwork(-1), sdim; base_type work1;           \
-    if (!n) return;                                                        \
-    dense_matrix<base_type > H(n,n); gmm::copy(A, H);                      \
-    char jobvs = (compvect ? 'V' : 'N'), sort = 'N';                       \
-    std::vector<double> rwork(n), eigvv(n*2);                              \
-    lapack_name(&jobvs, &sort, p, &n, &H(0,0), &n, &sdim, &eigvv[0],       \
-                &Q(0,0), &n, &work1, &lwork, &rwork[0], &rwork[0], &info); \
-    lwork = int(gmm::real(work1));                                         \
-    std::vector<base_type > work(lwork);                                   \
-    lapack_name(&jobvs, &sort, p, &n, &H(0,0), &n, &sdim, &eigvv[0],       \
-                &Q(0,0), &n, &work[0], &lwork, &rwork[0], &rwork[0],&info);\
-    GMM_ASSERT1(!info, "QR algorithm failed");                             \
-    extract_eig(H, const_cast<VECT &>(eigval_), tol);                      \
-  }
-
-  gees_interface(sgees_, BLAS_S)
-  gees_interface(dgees_, BLAS_D)
-  gees_interface2(cgees_, BLAS_C)
-  gees_interface2(zgees_, BLAS_Z)
-
-# define geev_int_right(lapack_name, base_type)			           \
-  template <typename VECT> inline void geev_interface_right(               \
-         const dense_matrix<base_type > &A,  const VECT &eigval_,          \
-         dense_matrix<base_type > &Q) {		                           \
-    GMMLAPACK_TRACE("geev_interface");                                     \
-    int n(mat_nrows(A)), info, lwork(-1); base_type work1;                 \
-    if (!n) return;                                                        \
-    dense_matrix<base_type > H(n,n); gmm::copy(A, H);                      \
-    char jobvl = 'N', jobvr = 'V';                                         \
-    std::vector<base_type > eigvr(n), eigvi(n);                            \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0],     \
-		&Q(0,0), &n, &Q(0,0), &n, &work1, &lwork, &info);   	   \
-    lwork = int(gmm::real(work1));                                         \
-    std::vector<base_type > work(lwork);                                   \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0],     \
-		&Q(0,0), &n, &Q(0,0), &n, &work[0], &lwork, &info);    	   \
-    GMM_ASSERT1(!info, "QR algorithm failed");                             \
-    gmm::copy(eigvr, gmm::real_part(const_cast<VECT &>(eigval_)));	   \
-    gmm::copy(eigvi, gmm::imag_part(const_cast<VECT &>(eigval_)));	   \
-  }
-
-# define geev_int_rightc(lapack_name, base_type)			   \
-  template <typename VECT> inline void geev_interface_right(               \
-         const dense_matrix<base_type > &A,  const VECT &eigval_,          \
-         dense_matrix<base_type > &Q) {		                           \
-    GMMLAPACK_TRACE("geev_interface");                                     \
-    int n(mat_nrows(A)), info, lwork(-1); base_type work1;                 \
-    if (!n) return;                                                        \
-    dense_matrix<base_type > H(n,n); gmm::copy(A, H);                      \
-    char jobvl = 'N', jobvr = 'V';                                         \
-    std::vector<double> rwork(2*n);                                        \
-    std::vector<base_type> eigv(n);                                        \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n,    \
-		&Q(0,0), &n, &work1, &lwork, &rwork[0], &info);	   	   \
-    lwork = int(gmm::real(work1));                                         \
-    std::vector<base_type > work(lwork);                                   \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n,    \
-		&Q(0,0), &n, &work[0], &lwork,  &rwork[0],  &info);	   \
-    GMM_ASSERT1(!info, "QR algorithm failed");                             \
-    gmm::copy(eigv, const_cast<VECT &>(eigval_));			   \
-  }
-
-  geev_int_right(sgeev_, BLAS_S)
-  geev_int_right(dgeev_, BLAS_D)
-  geev_int_rightc(cgeev_, BLAS_C)
-  geev_int_rightc(zgeev_, BLAS_Z)
-
-# define geev_int_left(lapack_name, base_type)                             \
-  template <typename VECT> inline void geev_interface_left(                \
-         const dense_matrix<base_type > &A,  const VECT &eigval_,          \
-         dense_matrix<base_type > &Q) {	 	                           \
-    GMMLAPACK_TRACE("geev_interface");                                     \
-    int n(mat_nrows(A)), info, lwork(-1); base_type work1;                 \
-    if (!n) return;                                                        \
-    dense_matrix<base_type > H(n,n); gmm::copy(A, H);                      \
-    char jobvl = 'V', jobvr = 'N';                                         \
-    std::vector<base_type > eigvr(n), eigvi(n);                            \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0],     \
-		&Q(0,0), &n, &Q(0,0), &n, &work1, &lwork, &info);   	   \
-    lwork = int(gmm::real(work1));                                         \
-    std::vector<base_type > work(lwork);                                   \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigvr[0], &eigvi[0],     \
-		&Q(0,0), &n, &Q(0,0), &n, &work[0], &lwork, &info);    	   \
-    GMM_ASSERT1(!info, "QR algorithm failed");                             \
-    gmm::copy(eigvr, gmm::real_part(const_cast<VECT &>(eigval_)));	   \
-    gmm::copy(eigvi, gmm::imag_part(const_cast<VECT &>(eigval_)));	   \
-  }
-
-# define geev_int_leftc(lapack_name, base_type)	  		           \
-  template <typename VECT> inline void geev_interface_left(                \
-         const dense_matrix<base_type > &A,  const VECT &eigval_,          \
-         dense_matrix<base_type > &Q) {		                           \
-    GMMLAPACK_TRACE("geev_interface");                                     \
-    int n(mat_nrows(A)), info, lwork(-1); base_type work1;                 \
-    if (!n) return;                                                        \
-    dense_matrix<base_type > H(n,n); gmm::copy(A, H);                      \
-    char jobvl = 'V', jobvr = 'N';                                         \
-    std::vector<double> rwork(2*n);                                        \
-    std::vector<base_type> eigv(n);                                        \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n,    \
-		&Q(0,0), &n, &work1, &lwork, &rwork[0], &info);	   	   \
-    lwork = int(gmm::real(work1));                                         \
-    std::vector<base_type > work(lwork);                                   \
-    lapack_name(&jobvl, &jobvr, &n, &H(0,0), &n, &eigv[0], &Q(0,0), &n,    \
-		&Q(0,0), &n, &work[0], &lwork,  &rwork[0],  &info);	   \
-    GMM_ASSERT1(!info, "QR algorithm failed");                             \
-    gmm::copy(eigv, const_cast<VECT &>(eigval_));			   \
-  }
-
-  geev_int_left(sgeev_, BLAS_S)
-  geev_int_left(dgeev_, BLAS_D)
-  geev_int_leftc(cgeev_, BLAS_C)
-  geev_int_leftc(zgeev_, BLAS_Z) 
-    
-
-}
-
-#endif // GMM_LAPACK_INTERFACE_H
-
-#endif // GMM_USES_LAPACK || GMM_USES_ATLAS
diff --git a/Contrib/gmm/gmm_least_squares_cg.h b/Contrib/gmm/gmm_least_squares_cg.h
deleted file mode 100755
index 711d334..0000000
--- a/Contrib/gmm/gmm_least_squares_cg.h
+++ /dev/null
@@ -1,95 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_leastsquares_cg.h
-   @author Benjamin Schleimer <bensch128  (at) yahoo (dot) com>
-   @date January 23, 2007.
-   @brief Conjugate gradient least squares algorithm. 
-   Algorithm taken from http://www.stat.washington.edu/wxs/Stat538-w05/Notes/conjugate-gradients.pdf page 6
-*/
-#ifndef GMM_LEAST_SQUARES_CG_H__
-#define GMM_LEAST_SQUARES_CG_H__
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-#include "gmm_conjugated.h"
-
-namespace gmm {
-
-  template <typename Matrix, typename Vector1, typename Vector2>
-  void least_squares_cg(const Matrix& C, Vector1& x, const Vector2& y,
-			iteration &iter) {
-
-    typedef typename temporary_dense_vector<Vector1>::vector_type temp_vector;
-    typedef typename linalg_traits<Vector1>::value_type T;
-
-    T rho, rho_1(0), a;
-    temp_vector p(vect_size(x)), q(vect_size(y)), g(vect_size(x));
-    temp_vector r(vect_size(y));
-    iter.set_rhsnorm(gmm::sqrt(gmm::abs(vect_hp(y, y))));
-
-    if (iter.get_rhsnorm() == 0.0)
-      clear(x);
-    else {
-      mult(C, scaled(x, T(-1)), y, r);
-      mult(conjugated(C), r, g);
-      rho = vect_hp(g, g);
-      copy(g, p);
-
-      while (!iter.finished_vect(g)) {
-
-	if (!iter.first()) { 
-	  rho = vect_hp(g, g);
-	  add(g, scaled(p, rho / rho_1), p);
-	}
-
-	mult(C, p, q);
-
-	a = rho / vect_hp(q, q);	
-	add(scaled(p, a), x);
-	add(scaled(q, -a), r);
-	// NOTE: how do we minimize the impact to the transpose?
-	mult(conjugated(C), r, g);
-	rho_1 = rho;
-
-	++iter;
-      }
-    }
-  }
-
-  template <typename Matrix, typename Precond, 
-            typename Vector1, typename Vector2> inline 
-  void least_squares_cg(const Matrix& C, const Vector1& x, const Vector2& y,
-			iteration &iter)
-  { least_squares_cg(C, linalg_const_cast(x), y, iter); }
-}
-
-
-#endif //  GMM_SOLVER_CG_H__
diff --git a/Contrib/gmm/gmm_matrix.h b/Contrib/gmm/gmm_matrix.h
deleted file mode 100755
index e6cb2a7..0000000
--- a/Contrib/gmm/gmm_matrix.h
+++ /dev/null
@@ -1,1188 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/** @file gmm_matrix.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-    @brief Declaration of some matrix types (gmm::dense_matrix,
-    gmm::row_matrix, gmm::col_matrix, gmm::csc_matrix, etc.)
-*/
-
-#ifndef GMM_MATRIX_H__
-#define GMM_MATRIX_H__
-
-#include "gmm_vector.h"
-#include "gmm_sub_vector.h"
-#include "gmm_sub_matrix.h"
-#include "gmm_transposed.h"
-
-namespace gmm
-{
-
-  /* ******************************************************************** */
-  /*		                                            		  */
-  /*		Identity matrix                         		  */
-  /*		                                            		  */
-  /* ******************************************************************** */
-
-  struct identity_matrix {
-    template <class MAT> void build_with(const MAT &) {}
-  };
-
-  template <typename M> inline
-  void add(const identity_matrix&, M &v1) {
-    size_type n = std::min(gmm::mat_nrows(v1), gmm::mat_ncols(v1));
-    for (size_type i = 0; i < n; ++i)
-      v1(i,i) += typename linalg_traits<M>::value_type(1);
-  }
-  template <typename M> inline
-  void add(const identity_matrix &I, const M &v1)
-  { add(I, linalg_const_cast(v1)); }
-
-  template <typename V1, typename V2> inline
-  void mult(const identity_matrix&, const V1 &v1, V2 &v2)
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void mult(const identity_matrix&, const V1 &v1, const V2 &v2) 
-  { copy(v1, v2); }
-  template <typename V1, typename V2, typename V3> inline
-  void mult(const identity_matrix&, const V1 &v1, const V2 &v2, V3 &v3)
-  { add(v1, v2, v3); }
-  template <typename V1, typename V2, typename V3> inline
-  void mult(const identity_matrix&, const V1 &v1, const V2 &v2, const V3 &v3)
-  { add(v1, v2, v3); }
-  template <typename V1, typename V2> inline
-  void left_mult(const identity_matrix&, const V1 &v1, V2 &v2)
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void left_mult(const identity_matrix&, const V1 &v1, const V2 &v2) 
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void right_mult(const identity_matrix&, const V1 &v1, V2 &v2)
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void right_mult(const identity_matrix&, const V1 &v1, const V2 &v2) 
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void transposed_left_mult(const identity_matrix&, const V1 &v1, V2 &v2)
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void transposed_left_mult(const identity_matrix&, const V1 &v1,const V2 &v2) 
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void transposed_right_mult(const identity_matrix&, const V1 &v1, V2 &v2)
-  { copy(v1, v2); }
-  template <typename V1, typename V2> inline
-  void transposed_right_mult(const identity_matrix&,const V1 &v1,const V2 &v2) 
-  { copy(v1, v2); }
-  template <typename M> void copy_ident(const identity_matrix&, M &m) {
-    size_type i = 0, n = std::min(mat_nrows(m), mat_ncols(m));
-    clear(m);
-    for (; i < n; ++i) m(i,i) = typename linalg_traits<M>::value_type(1);
-  }
-  template <typename M> inline void copy(const identity_matrix&, M &m)
-  { copy_ident(identity_matrix(), m); } 
-  template <typename M> inline void copy(const identity_matrix &, const M &m)
-  { copy_ident(identity_matrix(), linalg_const_cast(m)); }
-  template <typename V1, typename V2> inline
-  typename linalg_traits<V1>::value_type
-  vect_sp(const identity_matrix &, const V1 &v1, const V2 &v2)
-  { return vect_sp(v1, v2); }
-  template <typename V1, typename V2> inline
-  typename linalg_traits<V1>::value_type
-  vect_hp(const identity_matrix &, const V1 &v1, const V2 &v2)
-  { return vect_hp(v1, v2); }
-  template<typename M> inline bool is_identity(const M&) { return false; }
-  inline bool is_identity(const identity_matrix&) { return true; }
-
-  /* ******************************************************************** */
-  /*		                                            		  */
-  /*		Row matrix                                   		  */
-  /*		                                            		  */
-  /* ******************************************************************** */
-
-  template<typename V> class row_matrix {
-  protected :
-    std::vector<V> li; /* array of rows.                                  */
-    size_type nc;
-    
-  public :
-    
-    typedef typename linalg_traits<V>::reference reference;
-    typedef typename linalg_traits<V>::value_type value_type;
-    
-    row_matrix(size_type r, size_type c) : li(r, V(c)), nc(c) {}
-    row_matrix(void) : nc(0) {}
-    reference operator ()(size_type l, size_type c) 
-    { return li[l][c]; }
-    value_type operator ()(size_type l, size_type c) const
-    { return li[l][c]; }
-
-    void clear_mat();
-    void resize(size_type m, size_type n);
-
-    typename std::vector<V>::iterator begin(void)
-    { return li.begin(); }
-    typename std::vector<V>::iterator end(void)  
-    { return li.end(); }
-    typename std::vector<V>::const_iterator begin(void) const
-    { return li.begin(); }
-    typename std::vector<V>::const_iterator end(void) const
-    { return li.end(); }
-    
-    
-    V& row(size_type i) { return li[i]; }
-    const V& row(size_type i) const { return li[i]; }
-    V& operator[](size_type i) { return li[i]; }
-    const V& operator[](size_type i) const { return li[i]; }
-    
-    inline size_type nrows(void) const { return li.size(); }
-    inline size_type ncols(void) const { return nc;        }
-
-    void swap(row_matrix<V> &m) { std::swap(li, m.li); std::swap(nc, m.nc); }
-    void swap_row(size_type i, size_type j) { std::swap(li[i], li[j]); }
-  };
-
-  template<typename V> void row_matrix<V>::resize(size_type m, size_type n) {
-    li.resize(m);
-    for (size_type i=0; i < m; ++i) gmm::resize(li[i], n);
-    nc = n;
-  }
-
-
-  template<typename V> void row_matrix<V>::clear_mat()
-  { for (size_type i=0; i < nrows(); ++i) clear(li[i]); }
-
-  template <typename V> struct linalg_traits<row_matrix<V> > {
-    typedef row_matrix<V> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename linalg_traits<V>::reference reference;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef simple_vector_ref<V *> sub_row_type;
-    typedef simple_vector_ref<const V *> const_sub_row_type;
-    typedef typename std::vector<V>::iterator row_iterator;
-    typedef typename std::vector<V>::const_iterator const_row_iterator;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_col_iterator;
-    typedef row_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static row_iterator row_begin(this_type &m) { return m.begin(); }
-    static row_iterator row_end(this_type &m) { return m.end(); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return m.begin(); }
-    static const_row_iterator row_end(const this_type &m)
-    { return m.end(); }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return const_sub_row_type(*it); }
-    static sub_row_type row(const row_iterator &it) 
-    { return sub_row_type(*it); }
-    static origin_type* origin(this_type &m) { return &m; }
-    static const origin_type* origin(const this_type &m) { return &m; }
-    static void do_clear(this_type &m) { m.clear_mat(); }
-    static value_type access(const const_row_iterator &itrow, size_type j)
-    { return (*itrow)[j]; }
-    static reference access(const row_iterator &itrow, size_type j)
-    { return (*itrow)[j]; }
-    static void resize(this_type &v, size_type m, size_type n)
-    { v.resize(m, n); }
-    static void reshape(this_type &, size_type, size_type)
-    { GMM_ASSERT1(false, "Sorry, to be done"); }
-  };
-
-  template<typename V> std::ostream &operator <<
-    (std::ostream &o, const row_matrix<V>& m) { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*		                                            		  */
-  /*		Column matrix                                		  */
-  /*		                                            		  */
-  /* ******************************************************************** */
-
-  template<typename V> class col_matrix {
-  protected :
-    std::vector<V> li; /* array of columns.                               */
-    size_type nr;
-    
-  public :
-    
-    typedef typename linalg_traits<V>::reference reference;
-    typedef typename linalg_traits<V>::value_type value_type;
-    
-    col_matrix(size_type r, size_type c) : li(c, V(r)), nr(r) { }
-    col_matrix(void) : nr(0) {}
-    reference operator ()(size_type l, size_type c)
-    { return li[c][l]; }
-    value_type operator ()(size_type l, size_type c) const
-    { return li[c][l]; }
-
-    void clear_mat();
-    void resize(size_type, size_type);
-
-    V& col(size_type i) { return li[i]; }
-    const V& col(size_type i) const { return li[i]; }
-    V& operator[](size_type i) { return li[i]; }
-    const V& operator[](size_type i) const { return li[i]; }
-
-    typename std::vector<V>::iterator begin(void)
-    { return li.begin(); }
-    typename std::vector<V>::iterator end(void)  
-    { return li.end(); }
-    typename std::vector<V>::const_iterator begin(void) const
-    { return li.begin(); }
-    typename std::vector<V>::const_iterator end(void) const
-    { return li.end(); }
-    
-    inline size_type ncols(void) const { return li.size(); }
-    inline size_type nrows(void) const { return nr; }
-
-    void swap(col_matrix<V> &m) { std::swap(li, m.li); std::swap(nr, m.nr); }
-    void swap_col(size_type i, size_type j) { std::swap(li[i], li[j]); }
-  };
-
-  template<typename V> void col_matrix<V>::resize(size_type m, size_type n) {
-    li.resize(n);
-    for (size_type i=0; i < n; ++i) gmm::resize(li[i], m);
-    nr = m;
-  }
-
-  template<typename V> void col_matrix<V>::clear_mat()
-  { for (size_type i=0; i < ncols(); ++i)  clear(li[i]); }
-
-  template <typename V> struct linalg_traits<col_matrix<V> > {
-    typedef col_matrix<V> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename linalg_traits<V>::reference reference;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef simple_vector_ref<V *> sub_col_type;
-    typedef simple_vector_ref<const V *> const_sub_col_type;
-    typedef typename std::vector<V>::iterator col_iterator;
-    typedef typename std::vector<V>::const_iterator const_col_iterator;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_row_iterator;
-    typedef col_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static col_iterator col_begin(this_type &m) { return m.begin(); }
-    static col_iterator col_end(this_type &m) { return m.end(); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return m.begin(); }
-    static const_col_iterator col_end(const this_type &m)
-    { return m.end(); }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return const_sub_col_type(*it); }
-    static sub_col_type col(const col_iterator &it) 
-    { return sub_col_type(*it); }
-    static origin_type* origin(this_type &m) { return &m; }
-    static const origin_type* origin(const this_type &m) { return &m; }
-    static void do_clear(this_type &m) { m.clear_mat(); }
-    static value_type access(const const_col_iterator &itcol, size_type j)
-    { return (*itcol)[j]; }
-    static reference access(const col_iterator &itcol, size_type j)
-    { return (*itcol)[j]; }
-    static void resize(this_type &v, size_type m, size_type n)
-    { v.resize(m,n); }
-    static void reshape(this_type &, size_type, size_type)
-    { GMM_ASSERT1(false, "Sorry, to be done"); }
-  };
-
-  template<typename V> std::ostream &operator <<
-    (std::ostream &o, const col_matrix<V>& m) { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*		                                            		  */
-  /*		Dense matrix                                		  */
-  /*		                                            		  */
-  /* ******************************************************************** */
-
-  template<typename T> class dense_matrix : public std::vector<T> {
-  public:
-    typedef typename std::vector<T>::size_type size_type;
-    typedef typename std::vector<T>::iterator iterator;
-    typedef typename std::vector<T>::const_iterator const_iterator;
-    
-  protected:
-    size_type nbc, nbl;
-    
-  public:
-    
-    inline const T& operator ()(size_type l, size_type c) const {
-      GMM_ASSERT2(l < nbl && c < nbc, "out of range");
-      return *(this->begin() + c*nbl+l);
-    }
-    inline T& operator ()(size_type l, size_type c) {
-      GMM_ASSERT2(l < nbl && c < nbc, "out of range");
-      return *(this->begin() + c*nbl+l);
-    }
-
-    void resize(size_type, size_type);
-    void reshape(size_type, size_type);
-    
-    void fill(T a, T b = T(0));
-    inline size_type nrows(void) const { return nbl; }
-    inline size_type ncols(void) const { return nbc; }
-    void swap(dense_matrix<T> &m)
-    { std::vector<T>::swap(m); std::swap(nbc, m.nbc); std::swap(nbl, m.nbl); }
-    
-    dense_matrix(size_type l, size_type c)
-      : std::vector<T>(c*l), nbc(c), nbl(l)  {}
-    dense_matrix(void) { nbl = nbc = 0; }
-  };
-
-  template<typename T> void dense_matrix<T>::reshape(size_type m,size_type n) {
-    GMM_ASSERT2(n*m == nbl*nbc, "dimensions mismatch");
-    nbl = m; nbc = n;
-  }
-
-  template<typename T> void dense_matrix<T>::resize(size_type m, size_type n) {
-    if (n*m > nbc*nbl) std::vector<T>::resize(n*m);
-    if (m < nbl) {
-      for (size_type i = 1; i < std::min(nbc, n); ++i)
-	std::copy(this->begin()+i*nbl, this->begin()+(i*nbl+m),
-		  this->begin()+i*m);
-      for (size_type i = std::min(nbc, n); i < n; ++i)
-	std::fill(this->begin()+(i*m), this->begin()+(i+1)*m, T(0));
-      }
-    else if (m > nbl) { /* do nothing when the nb of rows does not change */
-      for (size_type i = std::min(nbc, n); i > 1; --i)
-	std::copy(this->begin()+(i-1)*nbl, this->begin()+i*nbl,
-		  this->begin()+(i-1)*m);
-      for (size_type i = 0; i < std::min(nbc, n); ++i)
-	std::fill(this->begin()+(i*m+nbl), this->begin()+(i+1)*m, T(0));
-    }
-    if (n*m < nbc*nbl) std::vector<T>::resize(n*m);
-    nbl = m; nbc = n;
-  }
-  
-  template<typename T> void dense_matrix<T>::fill(T a, T b) {
-    std::fill(this->begin(), this->end(), b);
-    size_type n = std::min(nbl, nbc);
-    if (a != b) for (size_type i = 0; i < n; ++i) (*this)(i,i) = a; 
-  }
-
-  template <typename T> struct linalg_traits<dense_matrix<T> > {
-    typedef dense_matrix<T> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef T value_type;
-    typedef T& reference;
-    typedef abstract_dense storage_type;
-    typedef tab_ref_reg_spaced_with_origin<typename this_type::iterator,
-					   this_type> sub_row_type;
-    typedef tab_ref_reg_spaced_with_origin<typename this_type::const_iterator,
-					   this_type> const_sub_row_type;
-    typedef dense_compressed_iterator<typename this_type::iterator,
-				      typename this_type::iterator,
-				      this_type *> row_iterator;
-    typedef dense_compressed_iterator<typename this_type::const_iterator,
-				      typename this_type::iterator,
-				      const this_type *> const_row_iterator;
-    typedef tab_ref_with_origin<typename this_type::iterator, 
-				this_type> sub_col_type;
-    typedef tab_ref_with_origin<typename this_type::const_iterator,
-				this_type> const_sub_col_type;
-    typedef dense_compressed_iterator<typename this_type::iterator,
-				      typename this_type::iterator,
-				      this_type *> col_iterator;
-    typedef dense_compressed_iterator<typename this_type::const_iterator,
-				      typename this_type::iterator,
-				      const this_type *> const_col_iterator;
-    typedef col_and_row sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return const_sub_row_type(*it, it.nrows, it.ncols, it.origin); }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return const_sub_col_type(*it, *it + it.nrows, it.origin); }
-    static sub_row_type row(const row_iterator &it)
-    { return sub_row_type(*it, it.nrows, it.ncols, it.origin); }
-    static sub_col_type col(const col_iterator &it)
-    { return sub_col_type(*it, *it + it.nrows, it.origin); }
-    static row_iterator row_begin(this_type &m)
-    { return row_iterator(m.begin(), m.size() ? 1 : 0, m.nrows(), m.ncols(), 0, &m); }
-    static row_iterator row_end(this_type &m)
-    { return row_iterator(m.begin(), m.size() ? 1 : 0, m.nrows(), m.ncols(), m.nrows(), &m); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.begin(), m.size() ? 1 : 0, m.nrows(), m.ncols(), 0, &m); }
-    static const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m.begin(),  m.size() ? 1 : 0, m.nrows(), m.ncols(), m.nrows(), &m); }
-    static col_iterator col_begin(this_type &m)
-    { return col_iterator(m.begin(), m.nrows(), m.nrows(), m.ncols(), 0, &m); }
-    static col_iterator col_end(this_type &m)
-    { return col_iterator(m.begin(), m.nrows(), m.nrows(), m.ncols(), m.ncols(), &m); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.begin(), m.nrows(), m.nrows(), m.ncols(), 0, &m); }
-    static const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m.begin(),m.nrows(),m.nrows(),m.ncols(),m.ncols(), &m); }
-    static origin_type* origin(this_type &m) { return &m; }
-    static const origin_type* origin(const this_type &m) { return &m; }
-    static void do_clear(this_type &m) { m.fill(value_type(0)); }
-    static value_type access(const const_col_iterator &itcol, size_type j)
-    { return (*itcol)[j]; }
-    static reference access(const col_iterator &itcol, size_type j)
-    { return (*itcol)[j]; }
-    static void resize(this_type &v, size_type m, size_type n)
-    { v.resize(m,n); }
-    static void reshape(this_type &v, size_type m, size_type n)
-    { v.reshape(m, n); }
-  };
-
-  template<typename T> std::ostream &operator <<
-    (std::ostream &o, const dense_matrix<T>& m) { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*                                                                      */
-  /*	        Read only compressed sparse column matrix                 */
-  /*                                                                      */
-  /* ******************************************************************** */
-
-  template <typename T, int shift = 0>
-  struct csc_matrix {
-    typedef unsigned int IND_TYPE;
-
-    T *pr;        // values.
-    IND_TYPE *ir; // row indices.
-    IND_TYPE *jc; // column repartition on pr and ir.
-    size_type nc, nr;
-
-    typedef T value_type;
-    typedef T& access_type;
-
-    template <typename Matrix> void init_with_good_format(const Matrix &B);
-    template <typename Matrix> void init_with(const Matrix &A);
-    void init_with(const col_matrix<gmm::rsvector<T> > &B)
-    { init_with_good_format(B); }
-    void init_with(const col_matrix<wsvector<T> > &B)
-    { init_with_good_format(B); }
-    template <typename PT1, typename PT2, typename PT3, int cshift>
-    void init_with(const csc_matrix_ref<PT1,PT2,PT3,cshift>& B)
-    { init_with_good_format(B); }
-    template <typename U, int cshift>    
-    void init_with(const csc_matrix<U, cshift>& B)
-    { init_with_good_format(B); }
-
-    void init_with_identity(size_type n);
-
-    csc_matrix(void) : pr(0), ir(0), jc(0), nc(0), nr(0) {}
-    csc_matrix(size_type nnr, size_type nnc);
-    ~csc_matrix() { if (pr) { delete[] pr; delete[] ir; delete[] jc; } }
-
-    size_type nrows(void) const { return nr; }
-    size_type ncols(void) const { return nc; }
-    void swap(csc_matrix<T, shift> &m) { 
-      std::swap(pr, m.pr); 
-      std::swap(ir,m.ir); std::swap(jc, m.jc); 
-      std::swap(nc, m.nc); std::swap(nr,m.nr);
-    }
-    value_type operator()(size_type i, size_type j) const
-    { return mat_col(*this, j)[i]; }
-  };
-
-  template <typename T, int shift> template<typename Matrix>
-  void csc_matrix<T, shift>::init_with_good_format(const Matrix &B) {
-    typedef typename linalg_traits<Matrix>::const_sub_col_type col_type;
-    if (pr) { delete[] pr; delete[] ir; delete[] jc; }
-    nc = mat_ncols(B); nr = mat_nrows(B);
-    jc = new IND_TYPE[nc+1];
-    jc[0] = shift;
-    for (size_type j = 0; j < nc; ++j) {
-      jc[j+1] = jc[j] + nnz(mat_const_col(B, j));
-    }
-    pr = new T[jc[nc]];
-    ir = new IND_TYPE[jc[nc]];
-    for (size_type j = 0; j < nc; ++j) {
-      col_type col = mat_const_col(B, j);
-      typename linalg_traits<col_type>::const_iterator
-	it = vect_const_begin(col), ite = vect_const_end(col);
-      for (size_type k = 0; it != ite; ++it, ++k)
-	{ pr[jc[j]-shift+k] = *it; ir[jc[j]-shift+k] = it.index() + shift; }
-    }
-  }
-  
-  template <typename T, int shift> template <typename Matrix>
-  void csc_matrix<T, shift>::init_with(const Matrix &A) {
-    col_matrix<wsvector<T> > B(mat_nrows(A), mat_ncols(A));
-    copy(A, B);
-    init_with_good_format(B);
-  }
-  
-  template <typename T, int shift>
-  void csc_matrix<T, shift>::init_with_identity(size_type n) {
-    if (pr) { delete[] pr; delete[] ir; delete[] jc; }
-    nc = nr = n; 
-    pr = new T[nc];
-    ir = new IND_TYPE[nc];
-    jc = new IND_TYPE[nc+1];
-    for (size_type j = 0; j < nc; ++j)
-      { ir[j] = jc[j] = shift + j; pr[j] = T(1); }
-    jc[nc] = shift + nc;
-  }
-  
-  template <typename T, int shift>
-  csc_matrix<T, shift>::csc_matrix(size_type nnr, size_type nnc)
-    : nc(nnc), nr(nnr) {
-    pr = new T[1];  ir = new IND_TYPE[1];
-    jc = new IND_TYPE[nc+1];
-    for (size_type j = 0; j <= nc; ++j) jc[j] = shift;
-  }
-
-  template <typename T, int shift>
-  struct linalg_traits<csc_matrix<T, shift> > {
-    typedef csc_matrix<T, shift> this_type;
-    typedef typename this_type::IND_TYPE IND_TYPE;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef T value_type;
-    typedef T origin_type;
-    typedef T reference;
-    typedef abstract_sparse storage_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_row_iterator;
-    typedef abstract_null_type sub_col_type;
-    typedef cs_vector_ref<const T *, const IND_TYPE *, shift>
-    const_sub_col_type;
-    typedef sparse_compressed_iterator<const T *, const IND_TYPE *,
-				       const IND_TYPE *, shift>
-    const_col_iterator;
-    typedef abstract_null_type col_iterator;
-    typedef col_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.pr, m.ir, m.jc, m.nr, m.pr); }
-    static const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m.pr, m.ir, m.jc + m.nc, m.nr, m.pr); }
-    static const_sub_col_type col(const const_col_iterator &it) {
-      return const_sub_col_type(it.pr + *(it.jc) - shift,
-				it.ir + *(it.jc) - shift,
-				*(it.jc + 1) - *(it.jc), it.n);
-    }
-    static const origin_type* origin(const this_type &m) { return m.pr; }
-    static void do_clear(this_type &m) { m.do_clear(); }
-    static value_type access(const const_col_iterator &itcol, size_type j)
-    { return col(itcol)[j]; }
-  };
-
-  template <typename T, int shift>
-  std::ostream &operator <<
-    (std::ostream &o, const csc_matrix<T, shift>& m)
-  { gmm::write(o,m); return o; }
-  
-  template <typename T, int shift>
-  inline void copy(const identity_matrix &, csc_matrix<T, shift>& M)
-  { M.init_with_identity(mat_nrows(M)); }
-
-  template <typename Matrix, typename T, int shift>
-  inline void copy(const Matrix &A, csc_matrix<T, shift>& M)
-  { M.init_with(A); }
-
-  /* ******************************************************************** */
-  /*                                                                      */
-  /*	        Read only compressed sparse row matrix                    */
-  /*                                                                      */
-  /* ******************************************************************** */
-
-  template <typename T, int shift = 0>
-  struct csr_matrix {
-
-    typedef unsigned int IND_TYPE;
-
-    T *pr;        // values.
-    IND_TYPE *ir; // col indices.
-    IND_TYPE *jc; // row repartition on pr and ir.
-    size_type nc, nr;
-
-    typedef T value_type;
-    typedef T& access_type;
-
-
-    template <typename Matrix> void init_with_good_format(const Matrix &B);
-    void init_with(const row_matrix<wsvector<T> > &B)
-    { init_with_good_format(B); }
-    void init_with(const row_matrix<rsvector<T> > &B)
-    { init_with_good_format(B); }
-    template <typename PT1, typename PT2, typename PT3, int cshift>
-    void init_with(const csr_matrix_ref<PT1,PT2,PT3,cshift>& B)
-    { init_with_good_format(B); }
-    template <typename U, int cshift>
-    void init_with(const csr_matrix<U, cshift>& B)
-    { init_with_good_format(B); }
-
-    template <typename Matrix> void init_with(const Matrix &A);
-    void init_with_identity(size_type n);
-
-    csr_matrix(void) : pr(0), ir(0), jc(0), nc(0), nr(0) {}
-    csr_matrix(size_type nnr, size_type nnc);
-    ~csr_matrix() { if (pr) { delete[] pr; delete[] ir; delete[] jc; } }
-
-    size_type nrows(void) const { return nr; }
-    size_type ncols(void) const { return nc; }
-    void swap(csr_matrix<T, shift> &m) { 
-      std::swap(pr, m.pr); 
-      std::swap(ir,m.ir); std::swap(jc, m.jc); 
-      std::swap(nc, m.nc); std::swap(nr,m.nr);
-    }
-   
-    value_type operator()(size_type i, size_type j) const
-    { return mat_row(*this, i)[j]; }
-  };
-  
-  template <typename T, int shift> template <typename Matrix>
-  void csr_matrix<T, shift>::init_with_good_format(const Matrix &B) {
-    typedef typename linalg_traits<Matrix>::const_sub_row_type row_type;
-    if (pr) { delete[] pr; delete[] ir; delete[] jc; }
-    nc = mat_ncols(B); nr = mat_nrows(B);
-    jc = new IND_TYPE[nr+1];
-    jc[0] = shift;
-    for (size_type j = 0; j < nr; ++j) {
-      jc[j+1] = jc[j] + nnz(mat_const_row(B, j));
-    }
-    pr = new T[jc[nr]];
-    ir = new IND_TYPE[jc[nr]];
-    for (size_type j = 0; j < nr; ++j) {
-      row_type row = mat_const_row(B, j);
-      typename linalg_traits<row_type>::const_iterator
-	it = vect_const_begin(row), ite = vect_const_end(row);
-      for (size_type k = 0; it != ite; ++it, ++k)
-	{ pr[jc[j]-shift+k] = *it; ir[jc[j]-shift+k] = it.index()+shift; }
-    }
-  }
-
-  template <typename T, int shift> template <typename Matrix> 
-  void csr_matrix<T, shift>::init_with(const Matrix &A) { 
-    row_matrix<wsvector<T> > B(mat_nrows(A), mat_ncols(A)); 
-    copy(A, B); 
-    init_with_good_format(B);
-  }
-
-  template <typename T, int shift> 
-  void csr_matrix<T, shift>::init_with_identity(size_type n) {
-    if (pr) { delete[] pr; delete[] ir; delete[] jc; }
-    nc = nr = n; 
-    pr = new T[nr];
-    ir = new IND_TYPE[nr];
-    jc = new IND_TYPE[nr+1];
-    for (size_type j = 0; j < nr; ++j)
-      { ir[j] = jc[j] = shift + j; pr[j] = T(1); }
-    jc[nr] = shift + nr;
-  }
-
-  template <typename T, int shift>
-  csr_matrix<T, shift>::csr_matrix(size_type nnr, size_type nnc)
-    : nc(nnc), nr(nnr) {
-    pr = new T[1];  ir = new IND_TYPE[1];
-    jc = new IND_TYPE[nr+1];
-    for (size_type j = 0; j < nr; ++j) jc[j] = shift;
-    jc[nr] = shift;
-  }
-
-
-  template <typename T, int shift>
-  struct linalg_traits<csr_matrix<T, shift> > {
-    typedef csr_matrix<T, shift> this_type;
-    typedef typename this_type::IND_TYPE IND_TYPE;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef T value_type;
-    typedef T origin_type;
-    typedef T reference;
-    typedef abstract_sparse storage_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_col_iterator;
-    typedef abstract_null_type sub_row_type;
-    typedef cs_vector_ref<const T *, const IND_TYPE *, shift>
-    const_sub_row_type;
-    typedef sparse_compressed_iterator<const T *, const IND_TYPE *,
-				       const IND_TYPE *, shift>
-    const_row_iterator;
-    typedef abstract_null_type row_iterator;
-    typedef row_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.pr, m.ir, m.jc, m.nc, m.pr); }
-    static const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m.pr, m.ir, m.jc + m.nr, m.nc, m.pr); }
-    static const_sub_row_type row(const const_row_iterator &it) {
-      return const_sub_row_type(it.pr + *(it.jc) - shift,
-				it.ir + *(it.jc) - shift,
-				*(it.jc + 1) - *(it.jc), it.n);
-    }
-    static const origin_type* origin(const this_type &m) { return m.pr; }
-    static void do_clear(this_type &m) { m.do_clear(); }
-    static value_type access(const const_row_iterator &itrow, size_type j)
-    { return row(itrow)[j]; }
-  };
-
-  template <typename T, int shift>
-  std::ostream &operator <<
-    (std::ostream &o, const csr_matrix<T, shift>& m)
-  { gmm::write(o,m); return o; }
-  
-  template <typename T, int shift>
-  inline void copy(const identity_matrix &, csr_matrix<T, shift>& M)
-  { M.init_with_identity(mat_nrows(M)); }
-
-  template <typename Matrix, typename T, int shift>
-  inline void copy(const Matrix &A, csr_matrix<T, shift>& M)
-  { M.init_with(A); }
-
-  /* ******************************************************************** */
-  /*		                                            		  */
-  /*		Block matrix                                		  */
-  /*		                                            		  */
-  /* ******************************************************************** */
-
-  template <typename MAT> class block_matrix {
-  protected :
-    std::vector<MAT> blocks;
-    size_type nrowblocks_;
-    size_type ncolblocks_;
-    std::vector<sub_interval> introw, intcol;
-
-  public :
-    typedef typename linalg_traits<MAT>::value_type value_type;
-    typedef typename linalg_traits<MAT>::reference reference;
-
-    size_type nrows(void) const { return introw[nrowblocks_-1].max; }
-    size_type ncols(void) const { return intcol[ncolblocks_-1].max; }
-    size_type nrowblocks(void) const { return nrowblocks_; }
-    size_type ncolblocks(void) const { return ncolblocks_; }
-    const sub_interval &subrowinterval(size_type i) const { return introw[i]; }
-    const sub_interval &subcolinterval(size_type i) const { return intcol[i]; }
-    const MAT &block(size_type i, size_type j) const 
-    { return blocks[j*ncolblocks_+i]; }
-    MAT &block(size_type i, size_type j)
-    { return blocks[j*ncolblocks_+i]; }
-    void do_clear(void);
-    // to be done : read and write access to a component
-    value_type operator() (size_type i, size_type j) const {
-      size_type k, l;
-      for (k = 0; k < nrowblocks_; ++k)
-	if (i >= introw[k].min && i <  introw[k].max) break;
-      for (l = 0; l < nrowblocks_; ++l)
-	if (j >= introw[l].min && j <  introw[l].max) break;
-      return (block(k, l))(i - introw[k].min, j - introw[l].min);
-    }
-    reference operator() (size_type i, size_type j) {
-      size_type k, l;
-      for (k = 0; k < nrowblocks_; ++k)
-	if (i >= introw[k].min && i <  introw[k].max) break;
-      for (l = 0; l < nrowblocks_; ++l)
-	if (j >= introw[l].min && j <  introw[l].max) break;
-      return (block(k, l))(i - introw[k].min, j - introw[l].min);
-    }
-    
-    template <typename CONT> void resize(const CONT &c1, const CONT &c2);
-    template <typename CONT> block_matrix(const CONT &c1, const CONT &c2)
-    { resize(c1, c2); }
-    block_matrix(void) {}
-
-  };
-
-  template <typename MAT> struct linalg_traits<block_matrix<MAT> > {
-    typedef block_matrix<MAT> this_type;
-    typedef linalg_false is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef this_type origin_type;
-    typedef typename linalg_traits<MAT>::value_type value_type;
-    typedef typename linalg_traits<MAT>::reference reference;
-    typedef typename linalg_traits<MAT>::storage_type storage_type;
-    typedef abstract_null_type sub_row_type;       // to be done ...
-    typedef abstract_null_type const_sub_row_type; // to be done ...
-    typedef abstract_null_type row_iterator;       // to be done ...
-    typedef abstract_null_type const_row_iterator; // to be done ...
-    typedef abstract_null_type sub_col_type;       // to be done ...
-    typedef abstract_null_type const_sub_col_type; // to be done ...
-    typedef abstract_null_type col_iterator;       // to be done ...
-    typedef abstract_null_type const_col_iterator; // to be done ...
-    typedef abstract_null_type sub_orientation;    // to be done ...
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static origin_type* origin(this_type &m) { return &m; }
-    static const origin_type* origin(const this_type &m) { return &m; }
-    static void do_clear(this_type &m) { m.do_clear(); }
-    // access to be done ...    
-    static void resize(this_type &, size_type , size_type)
-    { GMM_ASSERT1(false, "Sorry, to be done"); }
-    static void reshape(this_type &, size_type , size_type)
-    { GMM_ASSERT1(false, "Sorry, to be done"); }
-  };
-
-  template <typename MAT> void block_matrix<MAT>::do_clear(void) { 
-    for (size_type j = 0, l = 0; j < ncolblocks_; ++j)
-      for (size_type i = 0, k = 0; i < nrowblocks_; ++i)
-	clear(block(i,j));
-  }
-
-  template <typename MAT> template <typename CONT>
-  void block_matrix<MAT>::resize(const CONT &c1, const CONT &c2) {
-    nrowblocks_ = c1.size(); ncolblocks_ = c2.size();
-    blocks.resize(nrowblocks_ * ncolblocks_);
-    intcol.resize(ncolblocks_);
-    introw.resize(nrowblocks_);
-    for (size_type j = 0, l = 0; j < ncolblocks_; ++j) {
-      intcol[j] = sub_interval(l, c2[j]); l += c2[j];
-      for (size_type i = 0, k = 0; i < nrowblocks_; ++i) {
-	if (j == 0) { introw[i] = sub_interval(k, c1[i]); k += c1[i]; }
-	block(i, j) = MAT(c1[i], c2[j]);
-      }
-    }
-  }
-
-  template <typename M1, typename M2>
-  void copy(const block_matrix<M1> &m1, M2 &m2) {
-    for (size_type j = 0; j < m1.ncolblocks(); ++j)
-      for (size_type i = 0; i < m1.nrowblocks(); ++i)
-	copy(m1.block(i,j), sub_matrix(m2, m1.subrowinterval(i), 
-				       m1.subcolinterval(j)));
-  }
-
-  template <typename M1, typename M2>
-  void copy(const block_matrix<M1> &m1, const M2 &m2)
-  { copy(m1, linalg_const_cast(m2)); }
-  
-
-  template <typename MAT, typename V1, typename V2>
-  void mult(const block_matrix<MAT> &m, const V1 &v1, V2 &v2) {
-    clear(v2);
-    typename sub_vector_type<V2 *, sub_interval>::vector_type sv;
-    for (size_type i = 0; i < m.nrowblocks() ; ++i)
-      for (size_type j = 0; j < m.ncolblocks() ; ++j) {
-	sv = sub_vector(v2, m.subrowinterval(i));
-	mult(m.block(i,j),
-	     sub_vector(v1, m.subcolinterval(j)), sv, sv);
-      }
-  }
-
-  template <typename MAT, typename V1, typename V2, typename V3>
-  void mult(const block_matrix<MAT> &m, const V1 &v1, const V2 &v2, V3 &v3) {
-    typename sub_vector_type<V3 *, sub_interval>::vector_type sv;
-    for (size_type i = 0; i < m.nrowblocks() ; ++i)
-      for (size_type j = 0; j < m.ncolblocks() ; ++j) {
-	sv = sub_vector(v3, m.subrowinterval(i));
-	if (j == 0)
-	  mult(m.block(i,j),
-	       sub_vector(v1, m.subcolinterval(j)),
-	       sub_vector(v2, m.subrowinterval(i)), sv);
-	else
-	  mult(m.block(i,j),
-	       sub_vector(v1, m.subcolinterval(j)), sv, sv);
-      }
-    
-  }
-
-  template <typename MAT, typename V1, typename V2>
-  void mult(const block_matrix<MAT> &m, const V1 &v1, const V2 &v2)
-  { mult(m, v1, linalg_const_cast(v2)); }
-
-  template <typename MAT, typename V1, typename V2, typename V3>
-  void mult(const block_matrix<MAT> &m, const V1 &v1, const V2 &v2, 
-	    const V3 &v3)
-  { mult_const(m, v1, v2, linalg_const_cast(v3)); }
-
-}
-  /* ******************************************************************** */
-  /*		                                            		  */
-  /*		Distributed matrices                                	  */
-  /*		                                            		  */
-  /* ******************************************************************** */
-
-#ifdef GMM_USES_MPI
-#include <mpi.h>
- 
-namespace gmm { 
-  
-  template <typename T> inline MPI_Datatype mpi_type(T)
-  { GMM_ASSERT1(false, "Sorry unsupported type"); return MPI_FLOAT; }
-  inline MPI_Datatype mpi_type(double) { return MPI_DOUBLE; }
-  inline MPI_Datatype mpi_type(float) { return MPI_FLOAT; }
-  inline MPI_Datatype mpi_type(long double) { return MPI_LONG_DOUBLE; }
-#ifndef LAM_MPI
-  inline MPI_Datatype mpi_type(std::complex<float>) { return MPI_COMPLEX; }
-  inline MPI_Datatype mpi_type(std::complex<double>) { return MPI_DOUBLE_COMPLEX; }
-#endif
-  inline MPI_Datatype mpi_type(int) { return MPI_INT; }
-  inline MPI_Datatype mpi_type(unsigned int) { return MPI_UNSIGNED; }
-  inline MPI_Datatype mpi_type(size_t) {
-    if (sizeof(int) == sizeof(size_t)) return MPI_UNSIGNED;
-    if (sizeof(long) == sizeof(size_t)) return MPI_UNSIGNED_LONG;
-    return MPI_LONG_LONG;
-  }
-
-
-
-  template <typename MAT> struct mpi_distributed_matrix {
-    MAT M;
-
-    mpi_distributed_matrix(size_type n, size_type m) : M(n, m) {}
-    mpi_distributed_matrix() {}
-
-    const MAT &local_matrix(void) const { return M; }
-    MAT &local_matrix(void) { return M; }
-  };
-  
-  template <typename MAT> inline MAT &eff_matrix(MAT &m) { return m; }
-  template <typename MAT> inline
-  const MAT &eff_matrix(const MAT &m) { return m; }
-  template <typename MAT> inline
-  MAT &eff_matrix(mpi_distributed_matrix<MAT> &m) { return m.M; }
-  template <typename MAT> inline
-  const MAT &eff_matrix(const mpi_distributed_matrix<MAT> &m) { return m.M; }
-  
-
-  template <typename MAT1, typename MAT2>
-  inline void copy(const mpi_distributed_matrix<MAT1> &m1,
-		   mpi_distributed_matrix<MAT2> &m2)
-  { copy(eff_matrix(m1), eff_matrix(m2)); }
-  template <typename MAT1, typename MAT2>
-  inline void copy(const mpi_distributed_matrix<MAT1> &m1,
-		   const mpi_distributed_matrix<MAT2> &m2)
-  { copy(m1.M, m2.M); }
-  
-  template <typename MAT1, typename MAT2>
-  inline void copy(const mpi_distributed_matrix<MAT1> &m1, MAT2 &m2)
-  { copy(m1.M, m2); }
-  template <typename MAT1, typename MAT2>
-  inline void copy(const mpi_distributed_matrix<MAT1> &m1, const MAT2 &m2)
-  { copy(m1.M, m2); }
-  
-
-  template <typename MATSP, typename V1, typename V2> inline
-  typename strongest_value_type3<V1,V2,MATSP>::value_type
-  vect_sp(const mpi_distributed_matrix<MATSP> &ps, const V1 &v1,
-	  const V2 &v2) {
-    typedef typename strongest_value_type3<V1,V2,MATSP>::value_type T;
-    T res = vect_sp(ps.M, v1, v2), rest;
-    MPI_Allreduce(&res, &rest, 1, mpi_type(T()), MPI_SUM,MPI_COMM_WORLD);
-    return rest;
-  }
-
-  template <typename MAT, typename V1, typename V2>
-  inline void mult_add(const mpi_distributed_matrix<MAT> &m, const V1 &v1,
-		       V2 &v2) {
-    typedef typename linalg_traits<V2>::value_type T;
-    std::vector<T> v3(vect_size(v2)), v4(vect_size(v2));
-    static double tmult_tot = 0.0;
-    static double tmult_tot2 = 0.0;
-    double t_ref = MPI_Wtime();
-    gmm::mult(m.M, v1, v3);
-    if (is_sparse(v2)) GMM_WARNING2("Using a plain temporary, here.");
-    double t_ref2 = MPI_Wtime();
-    MPI_Allreduce(&(v3[0]), &(v4[0]),gmm::vect_size(v2), mpi_type(T()),
-		  MPI_SUM,MPI_COMM_WORLD);
-    tmult_tot2 = MPI_Wtime()-t_ref2;
-    cout << "reduce mult mpi = " << tmult_tot2 << endl;
-    gmm::add(v4, v2);
-    tmult_tot = MPI_Wtime()-t_ref;
-    cout << "tmult mpi = " << tmult_tot << endl;
-  }
-
-  template <typename MAT, typename V1, typename V2>
-  void mult_add(const mpi_distributed_matrix<MAT> &m, const V1 &v1,
-		const V2 &v2_)
-  { mult_add(m, v1, const_cast<V2 &>(v2_)); }
-
-  template <typename MAT, typename V1, typename V2>
-  inline void mult(const mpi_distributed_matrix<MAT> &m, const V1 &v1,
-		   const V2 &v2_)
-  { V2 &v2 = const_cast<V2 &>(v2_); clear(v2); mult_add(m, v1, v2); }
-
-  template <typename MAT, typename V1, typename V2>
-  inline void mult(const mpi_distributed_matrix<MAT> &m, const V1 &v1,
-		   V2 &v2)
-  { clear(v2); mult_add(m, v1, v2); }
-
-  template <typename MAT, typename V1, typename V2, typename V3>
-  inline void mult(const mpi_distributed_matrix<MAT> &m, const V1 &v1,
-		   const V2 &v2, const V3 &v3_)
-  { V3 &v3 = const_cast<V3 &>(v3_); gmm::copy(v2, v3); mult_add(m, v1, v3); }
-
-  template <typename MAT, typename V1, typename V2, typename V3>
-  inline void mult(const mpi_distributed_matrix<MAT> &m, const V1 &v1,
-		   const V2 &v2, V3 &v3)
-  { gmm::copy(v2, v3); mult_add(m, v1, v3); }
-  
-
-  template <typename MAT> inline
-  size_type mat_nrows(const mpi_distributed_matrix<MAT> &M) 
-  { return mat_nrows(M.M); }
-  template <typename MAT> inline
-  size_type mat_ncols(const mpi_distributed_matrix<MAT> &M) 
-  { return mat_nrows(M.M); }
-  template <typename MAT> inline
-  void resize(mpi_distributed_matrix<MAT> &M, size_type m, size_type n)
-  { resize(M.M, m, n); }
-  template <typename MAT> inline void clear(mpi_distributed_matrix<MAT> &M)
-  { clear(M.M); }
-  
-
-  // For compute reduced system
-  template <typename MAT1, typename MAT2> inline
-  void mult(const MAT1 &M1, const mpi_distributed_matrix<MAT2> &M2,
-	    mpi_distributed_matrix<MAT2> &M3)
-  { mult(M1, M2.M, M3.M); }
-  template <typename MAT1, typename MAT2> inline
-  void mult(const mpi_distributed_matrix<MAT2> &M2,
-	    const MAT1 &M1, mpi_distributed_matrix<MAT2> &M3)
-  { mult(M2.M, M1, M3.M); }
-  template <typename MAT1, typename MAT2, typename MAT3> inline
-  void mult(const MAT1 &M1, const mpi_distributed_matrix<MAT2> &M2,
-		   MAT3 &M3)
-  { mult(M1, M2.M, M3); }
-  template <typename MAT1, typename MAT2, typename MAT3> inline
-  void mult(const MAT1 &M1, const mpi_distributed_matrix<MAT2> &M2,
-		   const MAT3 &M3)
-  { mult(M1, M2.M, M3); }
-
-  template <typename M, typename SUBI1, typename SUBI2>
-  struct sub_matrix_type<const mpi_distributed_matrix<M> *, SUBI1, SUBI2>
-  { typedef abstract_null_type matrix_type; };
-
-  template <typename M, typename SUBI1, typename SUBI2>
-  struct sub_matrix_type<mpi_distributed_matrix<M> *, SUBI1, SUBI2>
-  { typedef abstract_null_type matrix_type; };
-
-  template <typename M, typename SUBI1, typename SUBI2>  inline
-  typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI2>
-  ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI2>::matrix_type,
-   M *>::return_type
-   sub_matrix(mpi_distributed_matrix<M> &m, const SUBI1 &si1, const SUBI2 &si2)
-  { return sub_matrix(m.M, si1, si2); }
-
-  template <typename MAT, typename SUBI1, typename SUBI2>  inline
-  typename select_return<typename sub_matrix_type<const MAT *, SUBI1, SUBI2>
-  ::matrix_type, typename sub_matrix_type<MAT *, SUBI1, SUBI2>::matrix_type,
-			 const MAT *>::return_type
-  sub_matrix(const mpi_distributed_matrix<MAT> &m, const SUBI1 &si1,
-	     const SUBI2 &si2)
-  { return sub_matrix(m.M, si1, si2);  }
-
-  template <typename M, typename SUBI1>  inline
-    typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI1>
-    ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI1>::matrix_type,
-    M *>::return_type
-  sub_matrix(mpi_distributed_matrix<M> &m, const SUBI1 &si1) 
-  { return sub_matrix(m.M, si1, si1); }
-
-  template <typename M, typename SUBI1>  inline
-    typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI1>
-    ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI1>::matrix_type,
-    const M *>::return_type
-  sub_matrix(const mpi_distributed_matrix<M> &m, const SUBI1 &si1)
-  { return sub_matrix(m.M, si1, si1); }
-
-
-  template <typename L> struct transposed_return<const mpi_distributed_matrix<L> *> 
-  { typedef abstract_null_type return_type; };
-  template <typename L> struct transposed_return<mpi_distributed_matrix<L> *> 
-  { typedef abstract_null_type return_type; };
-  
-  template <typename L> inline typename transposed_return<const L *>::return_type
-  transposed(const mpi_distributed_matrix<L> &l)
-  { return transposed(l.M); }
-
-  template <typename L> inline typename transposed_return<L *>::return_type
-  transposed(mpi_distributed_matrix<L> &l)
-  { return transposed(l.M); }
-
-
-  template <typename MAT>
-  struct linalg_traits<mpi_distributed_matrix<MAT> > {
-    typedef mpi_distributed_matrix<MAT> this_type;
-    typedef MAT origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<MAT>::value_type value_type;
-    typedef typename linalg_traits<MAT>::reference reference;
-    typedef typename linalg_traits<MAT>::storage_type storage_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_row_iterator;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_col_iterator;
-    typedef abstract_null_type sub_orientation;
-    typedef abstract_null_type index_sorted;
-    static size_type nrows(const this_type &m) { return nrows(m.M); }
-    static size_type ncols(const this_type &m) { return ncols(m.M); }
-    static void do_clear(this_type &m) { clear(m.M); }
-  };
-
-}
-
-
-#endif // GMM_USES_MPI
-
-namespace std {
-  template <typename V>
-  void swap(gmm::row_matrix<V> &m1, gmm::row_matrix<V> &m2)
-  { m1.swap(m2); }
-  template <typename V>
-  void swap(gmm::col_matrix<V> &m1, gmm::col_matrix<V> &m2)
-  { m1.swap(m2); }
-  template <typename T>
-  void swap(gmm::dense_matrix<T> &m1, gmm::dense_matrix<T> &m2)
-  { m1.swap(m2); }
-  template <typename T, int shift> void 
-  swap(gmm::csc_matrix<T,shift> &m1, gmm::csc_matrix<T,shift> &m2)
-  { m1.swap(m2); }
-  template <typename T, int shift> void 
-  swap(gmm::csr_matrix<T,shift> &m1, gmm::csr_matrix<T,shift> &m2)
-  { m1.swap(m2); }
-}
-
-
-
-
-#endif /* GMM_MATRIX_H__ */
diff --git a/Contrib/gmm/gmm_modified_gram_schmidt.h b/Contrib/gmm/gmm_modified_gram_schmidt.h
deleted file mode 100755
index 213cf7a..0000000
--- a/Contrib/gmm/gmm_modified_gram_schmidt.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1997-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_modified_gram_schmidt.h
-   @author  Andrew Lumsdaine <lums at osl.iu.edu>, Lie-Quan Lee     <llee at osl.iu.edu>
-   @date October 13, 2002.
-   @brief Modified Gram-Schmidt orthogonalization
-*/
-
-#ifndef GMM_MODIFIED_GRAM_SCHMIDT_H
-#define GMM_MODIFIED_GRAM_SCHMIDT_H
-
-#include "gmm_kernel.h"
-
-namespace gmm {
-
-  template <typename T>
-  class modified_gram_schmidt {
-  protected:
-    typedef dense_matrix<T> MAT;
-    MAT M;
-
-  public:
-
-    modified_gram_schmidt(int restart, size_t s) : M(s, restart+1) {}
-
-    typename linalg_traits<MAT>::const_sub_col_type
-      operator[](size_t i) const { return mat_const_col(M, i); }
-
-    typename linalg_traits<MAT>::sub_col_type
-      operator[](size_t i) { return mat_col(M, i); }
-
-    inline size_type nrows(void) const { return M.nrows(); }
-    inline size_type ncols(void) const { return M.ncols(); }
-    MAT &mat(void) { return M; }
-    const MAT &mat(void) const { return M; }
-    
-  };
-
-  template <typename T, typename VecHi> inline
-  void orthogonalize(modified_gram_schmidt<T>& V, const VecHi& Hi_, size_t i) {
-    VecHi& Hi = const_cast<VecHi&>(Hi_);
-    
-    for (size_t k = 0; k <= i; k++) {
-      Hi[k] = gmm::vect_hp(V[i+1], V[k]);
-      gmm::add(gmm::scaled(V[k], -Hi[k]), V[i+1]);
-    }
-  }
-
-  template <typename T, typename VecHi>
-  void orthogonalize_with_refinment(modified_gram_schmidt<T>& V,
-				    const VecHi& Hi_, size_t i) {
-    VecHi& Hi = const_cast<VecHi&>(Hi_);
-    orthogonalize(V, Hi_, i);
-    
-    sub_interval SUBI(0, V.nrows()), SUBJ(0, i+1);
-    std::vector<T> corr(i+1);
-    gmm::mult(conjugated(sub_matrix(V.mat(), SUBI, SUBJ)),
-	      V[i+1], corr);
-    gmm::mult(sub_matrix(V.mat(), SUBI, SUBJ),
-	      scaled(corr, T(-1)), V[i+1],V[i+1]);
-    gmm::add(corr, sub_vector(Hi, SUBJ));
-  }
-  
-  template <typename T, typename VecS, typename VecX>
-  void combine(modified_gram_schmidt<T>& V, const VecS& s, VecX& x, size_t i)
-  { for (size_t j = 0; j < i; ++j) gmm::add(gmm::scaled(V[j], s[j]), x); }
-}
-
-#endif
diff --git a/Contrib/gmm/gmm_opt.h b/Contrib/gmm/gmm_opt.h
deleted file mode 100755
index 2dfd9f8..0000000
--- a/Contrib/gmm/gmm_opt.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_opt.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date July 9, 2003.
-   @brief Optimization for some small cases (inversion of 2x2 matrices etc.)
-*/
-#ifndef GMM_OPT_H__
-#define GMM_OPT_H__
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*    Optimized determinant and inverse for small matrices (2x2 and 3x3) */
-  /*    with dense_matrix<T>.                                              */
-  /* ********************************************************************* */
-
-  template <typename T>  T lu_det(const dense_matrix<T> &A) {
-    size_type n(mat_nrows(A));
-    if (n) {
-      const T *p = &(A(0,0));
-      switch (n) {
-      case 1 : return (*p);
-      case 2 : return (*p) * (*(p+3)) - (*(p+1)) * (*(p+2));
-      case 3 : return (*p) * ((*(p+4)) * (*(p+8)) - (*(p+5)) * (*(p+7)))
-		 - (*(p+1)) * ((*(p+3)) * (*(p+8)) - (*(p+5)) * (*(p+6)))
-		 + (*(p+2)) * ((*(p+3)) * (*(p+7)) - (*(p+4)) * (*(p+6)));
-      default :
-	{
-	  dense_matrix<T> B(mat_nrows(A), mat_ncols(A));
-	  std::vector<size_type> ipvt(mat_nrows(A));
-	  gmm::copy(A, B);
-	  lu_factor(B, ipvt);
-	  return lu_det(B, ipvt);	
-	}
-      }
-    }
-    return T(1);
-  }
-
-  template <typename T> T lu_inverse(const dense_matrix<T> &A_) {
-    dense_matrix<T>& A = const_cast<dense_matrix<T> &>(A_);
-    size_type N = mat_nrows(A);
-    T det(1);
-    if (N) {
-      T *p = &(A(0,0));
-      if (N <= 3) {
-	switch (N) {
-	  case 1 : {
-	    det = *p;
-	    GMM_ASSERT1(det!=T(0), "non invertible matrix");
-	    *p = T(1) / det; 
-	  } break;
-	  case 2 : {
-	    det = (*p) * (*(p+3)) - (*(p+1)) * (*(p+2));
-	    GMM_ASSERT1(det!=T(0), "non invertible matrix");
-	    std::swap(*p, *(p+3));
-	    *p++ /= det; *p++ /= -det; *p++ /= -det; *p++ /= det; 
-	  } break;
-	  case 3 : {
-	    T a, b, c, d, e, f, g, h, i;
-	    a =   (*(p+4)) * (*(p+8)) - (*(p+5)) * (*(p+7));
-	    b = - (*(p+1)) * (*(p+8)) + (*(p+2)) * (*(p+7));
-	    c =   (*(p+1)) * (*(p+5)) - (*(p+2)) * (*(p+4));
-	    d = - (*(p+3)) * (*(p+8)) + (*(p+5)) * (*(p+6));
-	    e =   (*(p+0)) * (*(p+8)) - (*(p+2)) * (*(p+6));
-	    f = - (*(p+0)) * (*(p+5)) + (*(p+2)) * (*(p+3));
-	    g =   (*(p+3)) * (*(p+7)) - (*(p+4)) * (*(p+6));
-	    h = - (*(p+0)) * (*(p+7)) + (*(p+1)) * (*(p+6));
-	    i =   (*(p+0)) * (*(p+4)) - (*(p+1)) * (*(p+3));
-	    det = (*p) * a + (*(p+1)) * d + (*(p+2)) * g;
-	    GMM_ASSERT1(det!=T(0), "non invertible matrix");
-	    *p++ = a / det; *p++ = b / det; *p++ = c / det; 
-	    *p++ = d / det; *p++ = e / det; *p++ = f / det; 
-	    *p++ = g / det; *p++ = h / det; *p++ = i / det; 
-	  } break;
-	}
-      }
-      else {
-	dense_matrix<T> B(mat_nrows(A), mat_ncols(A));
-	std::vector<int> ipvt(mat_nrows(A));
-	gmm::copy(A, B);
-	size_type info = lu_factor(B, ipvt);
-	GMM_ASSERT1(!info, "non invertible matrix");
-	lu_inverse(B, ipvt, A);
-	return lu_det(B, ipvt);
-      }
-    }
-    return det;
-  }
-  
-}
-
-#endif //  GMM_OPT_H__
diff --git a/Contrib/gmm/gmm_precond.h b/Contrib/gmm/gmm_precond.h
deleted file mode 100755
index 7e95dc8..0000000
--- a/Contrib/gmm/gmm_precond.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2004-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-#ifndef GMM_PRECOND_H
-#define GMM_PRECOND_H
-
-#include "gmm_kernel.h"
-
-/** @file gmm_precond.h
-    @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-    @date March 29, 2004.
-    @brief gmm preconditioners.
- */
-
-/* Preconditioner concept :                                                */
-/*                                                                         */
-/* A the matrix, P the preconditioner PA well conditioned.                 */
-/* PRECOND precontioner type.                                              */
-/* mult(P, v, w) :  w <- P v                                               */
-/* transposed_mult(P, v, w)       : w <- transposed(P) v                   */
-/* left_mult(P, v, w)             : see qmr solver                         */
-/* right_mult(P, v, w)            : see qmr solver                         */
-/* transposed_left_mult(P, v, w)  : see qmr solver                         */
-/* transposed_right_mult(P, v, w) : see qmr solver                         */
-/*                                                                         */
-/* PRECOND P() : empty preconditioner.                                     */
-/* PRECOND P(A, ...) : preconditioner for the matrix A, with optional      */
-/*                     parameters                                          */
-/* PRECOND(...)  : empty precondtioner with parameters set.                */
-/* P.build_with(A) : build a precondtioner for A.                          */
-/*                                                                         */
-/* *********************************************************************** */
-
-
-
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_diagonal.h b/Contrib/gmm/gmm_precond_diagonal.h
deleted file mode 100755
index e3f74c6..0000000
--- a/Contrib/gmm/gmm_precond_diagonal.h
+++ /dev/null
@@ -1,131 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_precond_diagonal.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date June 5, 2003.
-   @brief Diagonal matrix preconditoner.
-*/
-
-#ifndef GMM_PRECOND_DIAGONAL_H
-#define GMM_PRECOND_DIAGONAL_H
-
-#include "gmm_precond.h"
-
-namespace gmm {
-
-  /** Diagonal preconditioner. */
-  template<typename Matrix> struct diagonal_precond {
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type magnitude_type;
-
-    std::vector<magnitude_type> diag;
-
-    void build_with(const Matrix &M) {
-      diag.resize(mat_nrows(M));
-      for (size_type i = 0; i < mat_nrows(M); ++i) {
-	magnitude_type x = gmm::abs(M(i, i));
-	if (x == magnitude_type(0)) {
-	  x = magnitude_type(1);
-	  GMM_WARNING2("The matrix has a zero on its diagonal");
-	}
-	diag[i] = magnitude_type(1) / x;
-      }
-    }
-    size_type memsize() const { return sizeof(*this) + diag.size() * sizeof(value_type); }
-    diagonal_precond(const Matrix &M) { build_with(M); }
-    diagonal_precond(void) {}
-  };
-
-  template <typename Matrix, typename V2> inline
-  void mult_diag_p(const diagonal_precond<Matrix>& P, V2 &v2, abstract_sparse){
-    typename linalg_traits<V2>::iterator it = vect_begin(v2),
-      ite = vect_end(v2);
-    for (; it != ite; ++it) *it *= P.diag[it.index()];
-  }
-
-  template <typename Matrix, typename V2> inline
-  void mult_diag_p(const diagonal_precond<Matrix>& P,V2 &v2, abstract_skyline)
-    { mult_diag_p(P, v2, abstract_sparse()); }
-
-  template <typename Matrix, typename V2> inline
-  void mult_diag_p(const diagonal_precond<Matrix>& P, V2 &v2, abstract_dense){
-    for (size_type i = 0; i < P.diag.size(); ++i) v2[i] *= P.diag[i];
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const diagonal_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    GMM_ASSERT2(P.diag.size() == vect_size(v2),"dimensions mismatch");
-    copy(v1, v2);
-    mult_diag_p(P, v2, typename linalg_traits<V2>::storage_type());
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const diagonal_precond<Matrix>& P,const V1 &v1,V2 &v2) {
-    mult(P, v1, v2);
-  }
-  
-  // # define DIAG_LEFT_MULT_SQRT
-  
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const diagonal_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    GMM_ASSERT2(P.diag.size() == vect_size(v2), "dimensions mismatch");
-    copy(v1, v2);
-#   ifdef DIAG_LEFT_MULT_SQRT
-    for (size_type i= 0; i < P.diag.size(); ++i) v2[i] *= gmm::sqrt(P.diag[i]);
-#   else
-    for (size_type i= 0; i < P.diag.size(); ++i) v2[i] *= P.diag[i];
-#   endif
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const diagonal_precond<Matrix>& P,
-			    const V1 &v1, V2 &v2)
-    { left_mult(P, v1, v2); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const diagonal_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    typedef typename linalg_traits<Matrix>::value_type T;
-    GMM_ASSERT2(P.diag.size() == vect_size(v2), "dimensions mismatch");
-    copy(v1, v2);
-#   ifdef DIAG_LEFT_MULT_SQRT    
-    for (size_type i= 0; i < P.diag.size(); ++i) v2[i] *= gmm::sqrt(P.diag[i]);
-#   endif
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const diagonal_precond<Matrix>& P,
-			    const V1 &v1, V2 &v2)
-    { right_mult(P, v1, v2); }
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_ildlt.h b/Contrib/gmm/gmm_precond_ildlt.h
deleted file mode 100755
index 5c4eece..0000000
--- a/Contrib/gmm/gmm_precond_ildlt.h
+++ /dev/null
@@ -1,286 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of cholesky.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-#ifndef GMM_PRECOND_ILDLT_H
-#define GMM_PRECOND_ILDLT_H
-
-/**@file gmm_precond_ildlt.h
-   @author Andrew Lumsdaine <lums at osl.iu.edu>
-   @author Lie-Quan Lee <llee at osl.iu.edu>
-   @author Yves Renard <yves.renard at insa-lyon.fr>
-   @date June 5, 2003.
-   @brief Incomplete Level 0 ILDLT Preconditioner.
-*/
-
-#include "gmm_precond.h"
-
-namespace gmm {
-
-  /** Incomplete Level 0 LDLT Preconditioner.
-      
-  For use with symmetric real or hermitian complex sparse matrices.
-
-  Notes: The idea under a concrete Preconditioner such as Incomplete
-  Cholesky is to create a Preconditioner object to use in iterative
-  methods.
-
-
-  Y. Renard : Transformed in LDLT for stability reason.
-  
-  U=LT is stored in csr format. D is stored on the diagonal of U.
-  */
-  template <typename Matrix>
-  class ildlt_precond {
-
-  public :
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type magnitude_type;
-    typedef csr_matrix_ref<value_type *, size_type *, size_type *, 0> tm_type;
-
-    tm_type U;
-
-  protected :
-    std::vector<value_type> Tri_val;
-    std::vector<size_type> Tri_ind, Tri_ptr;
- 
-    template<typename M> void do_ildlt(const M& A, row_major);
-    void do_ildlt(const Matrix& A, col_major);
-
-  public:
-
-    size_type nrows(void) const { return mat_nrows(U); }
-    size_type ncols(void) const { return mat_ncols(U); }
-    value_type &D(size_type i) { return Tri_val[Tri_ptr[i]]; }
-    const value_type &D(size_type i) const { return Tri_val[Tri_ptr[i]]; }
-    ildlt_precond(void) {}
-    void build_with(const Matrix& A) {
-      Tri_ptr.resize(mat_nrows(A)+1);
-      do_ildlt(A, typename principal_orientation_type<typename
-		  linalg_traits<Matrix>::sub_orientation>::potype());
-    }
-    ildlt_precond(const Matrix& A)  { build_with(A); }
-    size_type memsize() const { 
-      return sizeof(*this) + 
-	Tri_val.size() * sizeof(value_type) + 
-	(Tri_ind.size()+Tri_ptr.size()) * sizeof(size_type); 
-    }
-  };
-
-  template <typename Matrix> template<typename M>
-  void ildlt_precond<Matrix>::do_ildlt(const M& A, row_major) {
-    typedef typename linalg_traits<Matrix>::storage_type store_type;
-    typedef value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    
-    size_type Tri_loc = 0, n = mat_nrows(A), d, g, h, i, j, k;
-    if (n == 0) return;
-    T z, zz;
-    Tri_ptr[0] = 0;
-    R prec = default_tol(R());
-    R max_pivot = gmm::abs(A(0,0)) * prec;
-    
-    for (int count = 0; count < 2; ++count) {
-      if (count) { Tri_val.resize(Tri_loc); Tri_ind.resize(Tri_loc); }
-      for (Tri_loc = 0, i = 0; i < n; ++i) {
-	typedef typename linalg_traits<M>::const_sub_row_type row_type;
-	row_type row = mat_const_row(A, i);
-        typename linalg_traits<row_type>::const_iterator
-	  it = vect_const_begin(row), ite = vect_const_end(row);
-
-	if (count) { Tri_val[Tri_loc] = T(0); Tri_ind[Tri_loc] = i; }
-	++Tri_loc; // diagonal element
-
-	for (k = 0; it != ite; ++it, ++k) {
-	  j = index_of_it(it, k, store_type());
-	  if (i == j) {
-	    if (count) Tri_val[Tri_loc-1] = *it; 
-	  }
-	  else if (j > i) {
-	    if (count) { Tri_val[Tri_loc] = *it; Tri_ind[Tri_loc]=j; }
-	    ++Tri_loc;
-	  }
-	}
-	Tri_ptr[i+1] = Tri_loc;
-      }
-    }
-    
-    if (A(0,0) == T(0)) {
-      Tri_val[Tri_ptr[0]] = T(1);
-      GMM_WARNING2("pivot 0 is too small");
-    }
-    
-    for (k = 0; k < n; k++) {
-      d = Tri_ptr[k];
-      z = T(gmm::real(Tri_val[d])); Tri_val[d] = z;
-      if (gmm::abs(z) <= max_pivot) {
-	Tri_val[d] = z = T(1);
-	GMM_WARNING2("pivot " << k << " is too small [" << gmm::abs(z) << "]");
-      }
-      max_pivot = std::max(max_pivot, std::min(gmm::abs(z) * prec, R(1)));
-      
-      for (i = d + 1; i < Tri_ptr[k+1]; ++i) Tri_val[i] /= z;
-      for (i = d + 1; i < Tri_ptr[k+1]; ++i) {
-	zz = gmm::conj(Tri_val[i] * z);
-	h = Tri_ind[i];
-	g = i;
-	
-	for (j = Tri_ptr[h] ; j < Tri_ptr[h+1]; ++j)
-	  for ( ; g < Tri_ptr[k+1] && Tri_ind[g] <= Tri_ind[j]; ++g)
-	    if (Tri_ind[g] == Tri_ind[j])
-	      Tri_val[j] -= zz * Tri_val[g];
-      }
-    }
-    U = tm_type(&(Tri_val[0]), &(Tri_ind[0]), &(Tri_ptr[0]),
-			n, mat_ncols(A));
-  }
-  
-  template <typename Matrix>
-  void ildlt_precond<Matrix>::do_ildlt(const Matrix& A, col_major)
-  { do_ildlt(gmm::conjugated(A), row_major()); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const ildlt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    gmm::copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
-    gmm::upper_tri_solve(P.U, v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const ildlt_precond<Matrix>& P,const V1 &v1,V2 &v2)
-  { mult(P, v1, v2); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const ildlt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const ildlt_precond<Matrix>& P, const V1 &v1, V2 &v2)
-  { copy(v1, v2); gmm::upper_tri_solve(P.U, v2, true);  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const ildlt_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    copy(v1, v2);
-    gmm::upper_tri_solve(P.U, v2, true);
-    for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const ildlt_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2)
-  { copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
-
-
-  // for compatibility with old versions
-
-  template <typename Matrix>
-  struct cholesky_precond : public ildlt_precond<Matrix> {
-    cholesky_precond(const Matrix& A) : ildlt_precond<Matrix>(A) {}
-    cholesky_precond(void) {}
-  } IS_DEPRECATED;
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const cholesky_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    gmm::copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
-    gmm::upper_tri_solve(P.U, v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const cholesky_precond<Matrix>& P,const V1 &v1,V2 &v2)
-  { mult(P, v1, v2); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const cholesky_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const cholesky_precond<Matrix>& P, const V1 &v1, V2 &v2)
-  { copy(v1, v2); gmm::upper_tri_solve(P.U, v2, true);  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const cholesky_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    copy(v1, v2);
-    gmm::upper_tri_solve(P.U, v2, true);
-    for (size_type i = 0; i < mat_nrows(P.U); ++i) v2[i] /= P.D(i);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const cholesky_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2)
-  { copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-  
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_ildltt.h b/Contrib/gmm/gmm_precond_ildltt.h
deleted file mode 100755
index 8afa9e7..0000000
--- a/Contrib/gmm/gmm_precond_ildltt.h
+++ /dev/null
@@ -1,217 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_precond_ildltt.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date June 30, 2003.
-   @brief incomplete LDL^t (cholesky) preconditioner with fill-in and threshold.
-*/
-
-#ifndef GMM_PRECOND_ILDLTT_H
-#define GMM_PRECOND_ILDLTT_H
-
-// Store U = LT and D in indiag. On each line, the fill-in is the number
-// of non-zero elements on the line of the original matrix plus K, except if
-// the matrix is dense. In this case the fill-in is K on each line.
-
-#include "gmm_precond_ilut.h"
-
-namespace gmm {
-  /** incomplete LDL^t (cholesky) preconditioner with fill-in and
-      threshold. */
-  template <typename Matrix>
-  class ildltt_precond  {
-  public :
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type magnitude_type;
-    
-    typedef rsvector<value_type> svector;
-
-    row_matrix<svector> U;
-    std::vector<magnitude_type> indiag;
-
-  protected:
-    size_type K;
-    double eps;    
-
-    template<typename M> void do_ildltt(const M&, row_major);
-    void do_ildltt(const Matrix&, col_major);
-
-  public:
-    void build_with(const Matrix& A) {
-      gmm::resize(U, mat_nrows(A), mat_ncols(A));
-      indiag.resize(std::min(mat_nrows(A), mat_ncols(A)));
-      do_ildltt(A, typename principal_orientation_type<typename
-		linalg_traits<Matrix>::sub_orientation>::potype());
-    }
-    ildltt_precond(const Matrix& A, int k_, double eps_) 
-      : U(mat_nrows(A),mat_ncols(A)), K(k_), eps(eps_) { build_with(A); }
-    ildltt_precond(void) { K=10; eps = 1E-7; }
-    ildltt_precond(size_type k_, double eps_) :  K(k_), eps(eps_) {}
-    size_type memsize() const { 
-      return sizeof(*this) + nnz(U)*sizeof(value_type) + indiag.size() * sizeof(magnitude_type);
-    }    
-  };
-
-  template<typename Matrix> template<typename M> 
-  void ildltt_precond<Matrix>::do_ildltt(const M& A,row_major) {
-    typedef value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = mat_nrows(A);
-    if (n == 0) return;
-    svector w(n);
-    T tmp;
-    R prec = default_tol(R()), max_pivot = gmm::abs(A(0,0)) * prec;
-
-    gmm::clear(U);
-    for (size_type i = 0; i < n; ++i) {
-      gmm::copy(mat_const_row(A, i), w);
-      double norm_row = gmm::vect_norm2(w);
-
-      for (size_type krow = 0, k; krow < w.nb_stored(); ++krow) {
-	typename svector::iterator wk = w.begin() + krow;
-	if ((k = wk->c) >= i) break;
- 	if (gmm::is_complex(wk->e)) {
- 	  tmp = gmm::conj(U(k, i))/indiag[k]; // not completely satisfactory ..
- 	  gmm::add(scaled(mat_row(U, k), -tmp), w);
- 	}
- 	else {
-	  tmp = wk->e;
-	  if (gmm::abs(tmp) < eps * norm_row) { w.sup(k); --krow; } 
-	  else { wk->e += tmp; gmm::add(scaled(mat_row(U, k), -tmp), w); }
-	}
-      }
-      tmp = w[i];
-
-      if (gmm::abs(gmm::real(tmp)) <= max_pivot)
-	{ GMM_WARNING2("pivot " << i << " is too small"); tmp = T(1); }
-
-      max_pivot = std::max(max_pivot, std::min(gmm::abs(tmp) * prec, R(1)));
-      indiag[i] = R(1) / gmm::real(tmp);
-      gmm::clean(w, eps * norm_row);
-      gmm::scale(w, T(indiag[i]));
-      std::sort(w.begin(), w.end(), elt_rsvector_value_less_<T>());
-      typename svector::const_iterator wit = w.begin(), wite = w.end();
-      for (size_type nnu = 0; wit != wite; ++wit)  // copy to be optimized ...
-	if (wit->c > i) { if (nnu < K) { U(i, wit->c) = wit->e; ++nnu; } }
-    }
-  }
-
-  template<typename Matrix> 
-  void ildltt_precond<Matrix>::do_ildltt(const Matrix& A, col_major)
-  { do_ildltt(gmm::conjugated(A), row_major()); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const ildltt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    gmm::copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
-    gmm::upper_tri_solve(P.U, v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const ildltt_precond<Matrix>& P,const V1 &v1, V2 &v2)
-  { mult(P, v1, v2); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const ildltt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const ildltt_precond<Matrix>& P, const V1 &v1, V2 &v2)
-  { copy(v1, v2); gmm::upper_tri_solve(P.U, v2, true); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const ildltt_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    copy(v1, v2);
-    gmm::upper_tri_solve(P.U, v2, true);
-    for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const ildltt_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2)
-  { copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
-
-  // for compatibility with old versions
-
-  template <typename Matrix>
-  struct choleskyt_precond : public ildltt_precond<Matrix>{
-    choleskyt_precond(const Matrix& A, int k_, double eps_)
-      : ildltt_precond<Matrix>(A, k_, eps_) {}
-    choleskyt_precond(void) {}
-  } IS_DEPRECATED;
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const choleskyt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    gmm::copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
-    gmm::upper_tri_solve(P.U, v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const choleskyt_precond<Matrix>& P,const V1 &v1, V2 &v2)
-  { mult(P, v1, v2); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const choleskyt_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true);
-    for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const choleskyt_precond<Matrix>& P, const V1 &v1, V2 &v2)
-  { copy(v1, v2); gmm::upper_tri_solve(P.U, v2, true); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const choleskyt_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    copy(v1, v2);
-    gmm::upper_tri_solve(P.U, v2, true);
-    for (size_type i = 0; i < P.indiag.size(); ++i) v2[i] *= P.indiag[i];
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const choleskyt_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2)
-  { copy(v1, v2); gmm::lower_tri_solve(gmm::conjugated(P.U), v2, true); }
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_ilu.h b/Contrib/gmm/gmm_precond_ilu.h
deleted file mode 100755
index 4d5f5fa..0000000
--- a/Contrib/gmm/gmm_precond_ilu.h
+++ /dev/null
@@ -1,280 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1997-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of ilu.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-/**@file gmm_precond_ilu.h
-   @author Andrew Lumsdaine <lums at osl.iu.edu>
-   @author Lie-Quan Lee <llee at osl.iu.edu>
-   @author Yves Renard <yves.renard at insa-lyon.fr>
-   @date June 5, 2003.
-   @brief Incomplete LU without fill-in Preconditioner.
-*/
-
-#ifndef GMM_PRECOND_ILU_H
-#define GMM_PRECOND_ILU_H
-
-//
-// Notes: The idea under a concrete Preconditioner such 
-//        as Incomplete LU is to create a Preconditioner
-//        object to use in iterative methods. 
-//
-
-#include "gmm_precond.h"
-
-namespace gmm {
-  /** Incomplete LU without fill-in Preconditioner. */
-  template <typename Matrix>
-  class ilu_precond {
-
-  public :
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef csr_matrix_ref<value_type *, size_type *, size_type *, 0> tm_type;
-
-    tm_type U, L;
-    bool invert;
-  protected :
-    std::vector<value_type> L_val, U_val;
-    std::vector<size_type> L_ind, U_ind, L_ptr, U_ptr;
- 
-    template<typename M> void do_ilu(const M& A, row_major);
-    void do_ilu(const Matrix& A, col_major);
-
-  public:
-    
-    size_type nrows(void) const { return mat_nrows(L); }
-    size_type ncols(void) const { return mat_ncols(U); }
-    
-    void build_with(const Matrix& A) {
-      invert = false;
-       L_ptr.resize(mat_nrows(A)+1);
-       U_ptr.resize(mat_nrows(A)+1);
-       do_ilu(A, typename principal_orientation_type<typename
-	      linalg_traits<Matrix>::sub_orientation>::potype());
-    }
-    ilu_precond(const Matrix& A) { build_with(A); }
-    ilu_precond(void) {}
-    size_type memsize() const { 
-      return sizeof(*this) + 
-	(L_val.size()+U_val.size()) * sizeof(value_type) + 
-	(L_ind.size()+L_ptr.size()) * sizeof(size_type) +
-	(U_ind.size()+U_ptr.size()) * sizeof(size_type); 
-    }
-  };
-
-  template <typename Matrix> template <typename M>
-  void ilu_precond<Matrix>::do_ilu(const M& A, row_major) {
-    typedef typename linalg_traits<Matrix>::storage_type store_type;
-    typedef value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type L_loc = 0, U_loc = 0, n = mat_nrows(A), i, j, k;
-    if (n == 0) return;
-    L_ptr[0] = 0; U_ptr[0] = 0;
-    R prec = default_tol(R());
-    R max_pivot = gmm::abs(A(0,0)) * prec;
-
-
-    for (int count = 0; count < 2; ++count) {
-      if (count) { 
-	L_val.resize(L_loc); L_ind.resize(L_loc);
-	U_val.resize(U_loc); U_ind.resize(U_loc);
-      }
-      L_loc = U_loc = 0;
-      for (i = 0; i < n; ++i) {
-	typedef typename linalg_traits<M>::const_sub_row_type row_type;
-	row_type row = mat_const_row(A, i);
-	typename linalg_traits<row_type>::const_iterator
-	  it = vect_const_begin(row), ite = vect_const_end(row);
-	
-	if (count) { U_val[U_loc] = T(0); U_ind[U_loc] = i; }
-	++U_loc; // diagonal element
-	
-	for (k = 0; it != ite && k < 1000; ++it, ++k) {
-	  // if a plain row is present, retains only the 1000 firsts
-	  // nonzero elements. ---> a sort should be done.
-	  j = index_of_it(it, k, store_type());
-	  if (j < i) {
-	    if (count) { L_val[L_loc] = *it; L_ind[L_loc] = j; }
-	    L_loc++;
-	  }
-	  else if (i == j) {
-	    if (count) U_val[U_loc-1] = *it;
-	  }
-	  else {
-	    if (count) { U_val[U_loc] = *it; U_ind[U_loc] = j; }
-	    U_loc++;
-	  }
-	}
-        L_ptr[i+1] = L_loc; U_ptr[i+1] = U_loc;
-      }
-    }
-    
-    if (A(0,0) == T(0)) {
-      U_val[U_ptr[0]] = T(1);
-      GMM_WARNING2("pivot 0 is too small");
-    }
-
-    size_type qn, pn, rn;
-    for (i = 1; i < n; i++) {
-
-      pn = U_ptr[i];
-      if (gmm::abs(U_val[pn]) <= max_pivot) {
-	U_val[pn] = T(1);
-	GMM_WARNING2("pivot " << i << " is too small");
-      }
-      max_pivot = std::max(max_pivot,
-			   std::min(gmm::abs(U_val[pn]) * prec, R(1)));
-
-      for (j = L_ptr[i]; j < L_ptr[i+1]; j++) {
-	pn = U_ptr[L_ind[j]];
-	
-	T multiplier = (L_val[j] /= U_val[pn]);
-	
-	qn = j + 1;
-	rn = U_ptr[i];
-	
-	for (pn++; U_ind[pn] < i && pn < U_ptr[L_ind[j]+1]; pn++) {
-	  while (L_ind[qn] < U_ind[pn] && qn < L_ptr[i+1])
-	    qn++;
-	  if (U_ind[pn] == L_ind[qn] && qn < L_ptr[i+1])
-	    L_val[qn] -= multiplier * U_val[pn];
-	}
-	for (; pn < U_ptr[L_ind[j]+1]; pn++) {
-	  while (U_ind[rn] < U_ind[pn] && rn < U_ptr[i+1])
-	    rn++;
-	  if (U_ind[pn] == U_ind[rn] && rn < U_ptr[i+1])
-	    U_val[rn] -= multiplier * U_val[pn];
-	}
-      }
-    }
-
-    L = tm_type(&(L_val[0]), &(L_ind[0]), &(L_ptr[0]), n, mat_ncols(A));
-    U = tm_type(&(U_val[0]), &(U_ind[0]), &(U_ptr[0]), n, mat_ncols(A));
-  }
-  
-  template <typename Matrix>
-  void ilu_precond<Matrix>::do_ilu(const Matrix& A, col_major) {
-    do_ilu(gmm::transposed(A), row_major());
-    invert = true;
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const ilu_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    gmm::copy(v1, v2);
-    if (P.invert) {
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-    else {
-      gmm::lower_tri_solve(P.L, v2, true);
-      gmm::upper_tri_solve(P.U, v2, false);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const ilu_precond<Matrix>& P,const V1 &v1,V2 &v2) {
-    gmm::copy(v1, v2);
-    if (P.invert) {
-      gmm::lower_tri_solve(P.L, v2, true);
-      gmm::upper_tri_solve(P.U, v2, false);
-    }
-    else {
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const ilu_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-    else gmm::lower_tri_solve(P.L, v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const ilu_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    else gmm::upper_tri_solve(P.U, v2, false);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const ilu_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::upper_tri_solve(P.U, v2, false);
-    else gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const ilu_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::lower_tri_solve(P.L, v2, true);
-    else gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-  }
-
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_ilut.h b/Contrib/gmm/gmm_precond_ilut.h
deleted file mode 100755
index b0c3045..0000000
--- a/Contrib/gmm/gmm_precond_ilut.h
+++ /dev/null
@@ -1,227 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1997-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-#ifndef GMM_PRECOND_ILUT_H
-#define GMM_PRECOND_ILUT_H
-
-/**@file gmm_precond_ilut.h
-   @author  Andrew Lumsdaine <lums at osl.iu.edu>, Lie-Quan Lee <llee at osl.iu.edu>
-   @date June 5, 2003.
-   @brief ILUT:  Incomplete LU with threshold and K fill-in Preconditioner.
-*/
-
-/*
-  Performane comparing for SSOR, ILU and ILUT based on sherman 5 matrix 
-  in Harwell-Boeing collection on Sun Ultra 30 UPA/PCI (UltraSPARC-II 296MHz)
-  Preconditioner & Factorization time  &  Number of Iteration \\ \hline
-  SSOR        &   0.010577  & 41 \\
-  ILU         &   0.019336  & 32 \\
-  ILUT with 0 fill-in and threshold of 1.0e-6 & 0.343612 &  23 \\
-  ILUT with 5 fill-in and threshold of 1.0e-6 & 0.343612 &  18 \\ \hline
-*/
-
-#include "gmm_precond.h"
-
-namespace gmm {
-
-  template<typename T> struct elt_rsvector_value_less_ {
-    inline bool operator()(const elt_rsvector_<T>& a, 
-			   const elt_rsvector_<T>& b) const
-    { return (gmm::abs(a.e) > gmm::abs(b.e)); }
-  };
-
-  /** Incomplete LU with threshold and K fill-in Preconditioner.
-
-  The algorithm of ILUT(A, 0, 1.0e-6) is slower than ILU(A). If No
-  fill-in is arrowed, you can use ILU instead of ILUT.
-
-  Notes: The idea under a concrete Preconditioner such as ilut is to
-  create a Preconditioner object to use in iterative methods.
-  */
-  template <typename Matrix>
-  class ilut_precond  {
-  public :
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef wsvector<value_type> _wsvector;
-    typedef rsvector<value_type> _rsvector;
-    typedef row_matrix<_rsvector> LU_Matrix;
-
-    bool invert;
-    LU_Matrix L, U;
-
-  protected:
-    size_type K;
-    double eps;    
-
-    template<typename M> void do_ilut(const M&, row_major);
-    void do_ilut(const Matrix&, col_major);
-
-  public:
-    void build_with(const Matrix& A) {
-      invert = false;
-      gmm::resize(L, mat_nrows(A), mat_ncols(A));
-      gmm::resize(U, mat_nrows(A), mat_ncols(A));
-      do_ilut(A, typename principal_orientation_type<typename
-	      linalg_traits<Matrix>::sub_orientation>::potype());
-    }
-    ilut_precond(const Matrix& A, int k_, double eps_) 
-      : L(mat_nrows(A), mat_ncols(A)), U(mat_nrows(A), mat_ncols(A)),
-	K(k_), eps(eps_) { build_with(A); }
-    ilut_precond(size_type k_, double eps_) :  K(k_), eps(eps_) {}
-    ilut_precond(void) { K = 10; eps = 1E-7; }
-    size_type memsize() const { 
-      return sizeof(*this) + (nnz(U)+nnz(L))*sizeof(value_type);
-    }
-  };
-
-  template<typename Matrix> template<typename M> 
-  void ilut_precond<Matrix>::do_ilut(const M& A, row_major) {
-    typedef value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    
-    size_type n = mat_nrows(A);
-    if (n == 0) return;
-    std::vector<T> indiag(n);
-    _wsvector w(mat_ncols(A));
-    _rsvector ww(mat_ncols(A)), wL(mat_ncols(A)), wU(mat_ncols(A));
-    T tmp;
-    gmm::clear(U); gmm::clear(L);
-    R prec = default_tol(R()); 
-    R max_pivot = gmm::abs(A(0,0)) * prec;
-
-    for (size_type i = 0; i < n; ++i) {
-      gmm::copy(mat_const_row(A, i), w);
-      double norm_row = gmm::vect_norm2(w);
-
-      typename _wsvector::iterator wkold = w.begin();
-      bool itfirst = true;
-      for (typename _wsvector::iterator wk = w.begin();
-	   wk != w.end() && wk->first < i; ) {
-	size_type k = wk->first;
-	tmp = (wk->second) * indiag[k];
-	if (gmm::abs(tmp) < eps * norm_row) w.erase(k); 
-	else { wk->second += tmp; gmm::add(scaled(mat_row(U, k), -tmp), w); }
-	if (itfirst) wk = w.begin(); else wk = ++wkold;
-	if (wk != w.end() && wk->first == k) { ++wk; itfirst = false; }
-      }
-      tmp = w[i];
-
-      if (gmm::abs(tmp) <= max_pivot) {
-	GMM_WARNING2("pivot " << i << " too small. try with ilutp ?");
-	w[i] = tmp = T(1);
-      }
-
-      max_pivot = std::max(max_pivot, std::min(gmm::abs(tmp) * prec, R(1)));
-      indiag[i] = T(1) / tmp;
-      gmm::clean(w, eps * norm_row);
-      gmm::copy(w, ww);
-      std::sort(ww.begin(), ww.end(), elt_rsvector_value_less_<T>());
-      typename _rsvector::const_iterator wit = ww.begin(), wite = ww.end();
-
-      size_type nnl = 0, nnu = 0;    
-      wL.base_resize(K); wU.base_resize(K+1);
-      typename _rsvector::iterator witL = wL.begin(), witU = wU.begin();
-      for (; wit != wite; ++wit) 
-	if (wit->c < i) { if (nnl < K) { *witL++ = *wit; ++nnl; } }
-	else { if (nnu < K  || wit->c == i) { *witU++ = *wit; ++nnu; } }
-      wL.base_resize(nnl); wU.base_resize(nnu);
-      std::sort(wL.begin(), wL.end());
-      std::sort(wU.begin(), wU.end());
-      gmm::copy(wL, L.row(i));
-      gmm::copy(wU, U.row(i));
-    }
-
-  }
-
-  template<typename Matrix> 
-  void ilut_precond<Matrix>::do_ilut(const Matrix& A, col_major) {
-    do_ilut(gmm::transposed(A), row_major());
-    invert = true;
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const ilut_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    gmm::copy(v1, v2);
-    if (P.invert) {
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-    else {
-      gmm::lower_tri_solve(P.L, v2, true);
-      gmm::upper_tri_solve(P.U, v2, false);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const ilut_precond<Matrix>& P,const V1 &v1,V2 &v2) {
-    gmm::copy(v1, v2);
-    if (P.invert) {
-      gmm::lower_tri_solve(P.L, v2, true);
-      gmm::upper_tri_solve(P.U, v2, false);
-    }
-    else {
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const ilut_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-    else gmm::lower_tri_solve(P.L, v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const ilut_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    else gmm::upper_tri_solve(P.U, v2, false);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const ilut_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::upper_tri_solve(P.U, v2, false);
-    else gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const ilut_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2) {
-    copy(v1, v2);
-    if (P.invert) gmm::lower_tri_solve(P.L, v2, true);
-    else gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-  }
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_ilutp.h b/Contrib/gmm/gmm_precond_ilutp.h
deleted file mode 100755
index 68bce2e..0000000
--- a/Contrib/gmm/gmm_precond_ilutp.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2004-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_precond_ilutp.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 14, 2004.
-   @brief ILUTP: Incomplete LU with threshold and K fill-in Preconditioner and
-   column pivoting.
-
-   
-*/
-#ifndef GMM_PRECOND_ILUTP_H
-#define GMM_PRECOND_ILUTP_H
-
-#include "gmm_precond_ilut.h"
-
-namespace gmm {
-
-  /**
-     ILUTP: Incomplete LU with threshold and K fill-in Preconditioner and
-     column pivoting.
-   
-     See Yousef Saad, Iterative Methods for
-     sparse linear systems, PWS Publishing Company, section 10.4.4
-
-      TODO : store the permutation by cycles to avoid the temporary vector
-  */
-  template <typename Matrix>
-  class ilutp_precond  {
-  public :
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef wsvector<value_type> _wsvector;
-    typedef rsvector<value_type> _rsvector;
-    typedef row_matrix<_rsvector> LU_Matrix;
-    typedef col_matrix<_wsvector> CLU_Matrix;
-
-    bool invert;
-    LU_Matrix L, U;
-    gmm::unsorted_sub_index indperm;
-    gmm::unsorted_sub_index indperminv;
-    mutable std::vector<value_type> temporary;
-
-  protected:
-    size_type K;
-    double eps;
-
-    template<typename M> void do_ilutp(const M&, row_major);
-    void do_ilutp(const Matrix&, col_major);
-
-  public:
-    void build_with(const Matrix& A) {
-      invert = false;
-      gmm::resize(L, mat_nrows(A), mat_ncols(A));
-      gmm::resize(U, mat_nrows(A), mat_ncols(A));
-      do_ilutp(A, typename principal_orientation_type<typename
-	      linalg_traits<Matrix>::sub_orientation>::potype());
-    }
-    ilutp_precond(const Matrix& A, size_type k_, double eps_) 
-      : L(mat_nrows(A), mat_ncols(A)), U(mat_nrows(A), mat_ncols(A)),
-	K(k_), eps(eps_) { build_with(A); }
-    ilutp_precond(int k_, double eps_) :  K(k_), eps(eps_) {}
-    ilutp_precond(void) { K = 10; eps = 1E-7; }
-    size_type memsize() const { 
-      return sizeof(*this) + (nnz(U)+nnz(L))*sizeof(value_type);
-    }
-  };
-
-
-  template<typename Matrix> template<typename M> 
-  void ilutp_precond<Matrix>::do_ilutp(const M& A, row_major) {
-    typedef value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    size_type n = mat_nrows(A);
-    CLU_Matrix CU(n,n);
-    if (n == 0) return;
-    std::vector<T> indiag(n);
-    temporary.resize(n);
-    std::vector<size_type> ipvt(n), ipvtinv(n);
-    for (size_type i = 0; i < n; ++i) ipvt[i] = ipvtinv[i] = i;
-    indperm = unsorted_sub_index(ipvt);
-    indperminv = unsorted_sub_index(ipvtinv);
-    _wsvector w(mat_ncols(A));
-    _rsvector ww(mat_ncols(A));
-    
-    T tmp = T(0);
-    gmm::clear(L); gmm::clear(U);
-    R prec = default_tol(R()); 
-    R max_pivot = gmm::abs(A(0,0)) * prec;
-
-    for (size_type i = 0; i < n; ++i) {
-
-      copy(sub_vector(mat_const_row(A, i), indperm), w);
-      double norm_row = gmm::vect_norm2(mat_const_row(A, i)); 
-
-      typename _wsvector::iterator wkold = w.begin();
-      bool itfirst = true;
-      for (typename _wsvector::iterator wk = w.begin();
-	   wk != w.end() && wk->first < i; )  {
-	size_type k = wk->first;
-	tmp = (wk->second) * indiag[k];
-	if (gmm::abs(tmp) < eps * norm_row) w.erase(k); 
-	else { wk->second += tmp; gmm::add(scaled(mat_row(U, k), -tmp), w); }
-	if (itfirst) wk = w.begin(); else wk = ++wkold;
-	if (wk != w.end() && wk->first == k) { ++wk; itfirst = false; }
-      }
-
-      gmm::clean(w, eps * norm_row);
-      gmm::copy(w, ww);
-
-      std::sort(ww.begin(), ww.end(), elt_rsvector_value_less_<T>());
-      typename _rsvector::const_iterator wit = ww.begin(), wite = ww.end();
-      size_type ip = size_type(-1);
-
-      for (; wit != wite; ++wit)
-	if (wit->c >= i) { ip = wit->c; tmp = wit->e; break; }
-      if (ip == size_type(-1) || gmm::abs(tmp) <= max_pivot)
-	{ GMM_WARNING2("pivot " << i << " too small"); ip=i; ww[i]=tmp=T(1); }
-      max_pivot = std::max(max_pivot, std::min(gmm::abs(tmp) * prec, R(1)));
-      indiag[i] = T(1) / tmp;
-      wit = ww.begin();
-
-      size_type nnl = 0, nnu = 0;
-      L[i].base_resize(K); U[i].base_resize(K+1);
-      typename _rsvector::iterator witL = L[i].begin(), witU = U[i].begin();
-      for (; wit != wite; ++wit) {
-	if (wit->c < i) { if (nnl < K) { *witL++ = *wit; ++nnl; } }
-	else if (nnu < K || wit->c == i)
-	  { CU(i, wit->c) = wit->e; *witU++ = *wit; ++nnu; }
-      }
-      L[i].base_resize(nnl); U[i].base_resize(nnu);
-      std::sort(L[i].begin(), L[i].end());
-      std::sort(U[i].begin(), U[i].end());
-
-      if (ip != i) {
-	typename _wsvector::const_iterator iti = CU.col(i).begin();
-	typename _wsvector::const_iterator itie = CU.col(i).end();
-	typename _wsvector::const_iterator itp = CU.col(ip).begin();
-	typename _wsvector::const_iterator itpe = CU.col(ip).end();
-	
-	while (iti != itie && itp != itpe) {
-	  if (iti->first < itp->first)
-	    { U.row(iti->first).swap_indices(i, ip); ++iti; }
-	  else if (iti->first > itp->first)
-	    { U.row(itp->first).swap_indices(i,ip);++itp; }
-	  else
-	    { U.row(iti->first).swap_indices(i, ip); ++iti; ++itp; }
-	}
-	
-	for( ; iti != itie; ++iti) U.row(iti->first).swap_indices(i, ip);
-	for( ; itp != itpe; ++itp) U.row(itp->first).swap_indices(i, ip);
-
-	CU.swap_col(i, ip);
-	
-	indperm.swap(i, ip);
-	indperminv.swap(ipvt[i], ipvt[ip]);
-	std::swap(ipvtinv[ipvt[i]], ipvtinv[ipvt[ip]]);
-	std::swap(ipvt[i], ipvt[ip]);
-      }
-    }
-  }
-
-  template<typename Matrix> 
-  void ilutp_precond<Matrix>::do_ilutp(const Matrix& A, col_major) {
-    do_ilutp(gmm::transposed(A), row_major());
-    invert = true;
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const ilutp_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    if (P.invert) {
-      gmm::copy(gmm::sub_vector(v1, P.indperm), v2);
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-    else {
-      gmm::copy(v1, P.temporary);
-      gmm::lower_tri_solve(P.L, P.temporary, true);
-      gmm::upper_tri_solve(P.U, P.temporary, false);
-      gmm::copy(gmm::sub_vector(P.temporary, P.indperminv), v2);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const ilutp_precond<Matrix>& P,const V1 &v1,V2 &v2) {
-    if (P.invert) {
-      gmm::copy(v1, P.temporary);
-      gmm::lower_tri_solve(P.L, P.temporary, true);
-      gmm::upper_tri_solve(P.U, P.temporary, false);
-      gmm::copy(gmm::sub_vector(P.temporary, P.indperminv), v2);
-    }
-    else {
-      gmm::copy(gmm::sub_vector(v1, P.indperm), v2);
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void left_mult(const ilutp_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    if (P.invert) {
-      gmm::copy(gmm::sub_vector(v1, P.indperm), v2);
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-    }
-    else {
-      copy(v1, v2);
-      gmm::lower_tri_solve(P.L, v2, true);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void right_mult(const ilutp_precond<Matrix>& P, const V1 &v1, V2 &v2) {
-    if (P.invert) {
-      copy(v1, v2);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-    else {
-      copy(v1, P.temporary);
-      gmm::upper_tri_solve(P.U, P.temporary, false);
-      gmm::copy(gmm::sub_vector(P.temporary, P.indperminv), v2);
-    }
-  }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_left_mult(const ilutp_precond<Matrix>& P, const V1 &v1,
-			    V2 &v2) {
-    if (P.invert) {
-      copy(v1, P.temporary);
-      gmm::upper_tri_solve(P.U, P.temporary, false);
-      gmm::copy(gmm::sub_vector(P.temporary, P.indperminv), v2);
-    }
-    else {
-      copy(v1, v2);
-      gmm::upper_tri_solve(gmm::transposed(P.L), v2, true);
-    }
-  }
-  
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_right_mult(const ilutp_precond<Matrix>& P, const V1 &v1,
-			     V2 &v2) {
-    if (P.invert) {
-      copy(v1, v2);
-      gmm::lower_tri_solve(P.L, v2, true);
-    }
-    else {
-      gmm::copy(gmm::sub_vector(v1, P.indperm), v2);
-      gmm::lower_tri_solve(gmm::transposed(P.U), v2, false);
-    }
-  }
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_precond_mr_approx_inverse.h b/Contrib/gmm/gmm_precond_mr_approx_inverse.h
deleted file mode 100755
index cb54822..0000000
--- a/Contrib/gmm/gmm_precond_mr_approx_inverse.h
+++ /dev/null
@@ -1,148 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1997-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of approximate_inverse.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-/**@file gmm_precond_mr_approx_inverse.h
-   @author Andrew Lumsdaine <lums at osl.iu.edu>
-   @author Lie-Quan Lee     <llee at osl.iu.edu>
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date June 5, 2003.
-   @brief Approximate inverse via MR iteration.
-*/
-
-#ifndef GMM_PRECOND_MR_APPROX_INVERSE_H
-#define GMM_PRECOND_MR_APPROX_INVERSE_H
-
-
-#include "gmm_precond.h"
-
-namespace gmm {
-
-  /** Approximate inverse via MR iteration (see P301 of Saad book).
-   */
-  template <typename Matrix>
-  struct mr_approx_inverse_precond {
-
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type magnitude_type;
-    typedef typename principal_orientation_type<typename
-      linalg_traits<Matrix>::sub_orientation>::potype sub_orientation;
-    typedef wsvector<value_type> VVector;
-    typedef col_matrix<VVector> MMatrix;
-
-    MMatrix M;
-    size_type nb_it;
-    magnitude_type threshold;
-
-    void build_with(const Matrix& A);
-    mr_approx_inverse_precond(const Matrix& A, size_type nb_it_,
-			      magnitude_type threshold_)
-      : M(mat_nrows(A), mat_ncols(A))
-    { threshold = threshold_; nb_it = nb_it_; build_with(A); }
-    mr_approx_inverse_precond(void)
-    { threshold = magnitude_type(1E-7); nb_it = 5; }
-    mr_approx_inverse_precond(size_type nb_it_, magnitude_type threshold_)
-    { threshold = threshold_; nb_it = nb_it_; } 
-    const MMatrix &approx_inverse(void) const { return M; }
-  };
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void mult(const mr_approx_inverse_precond<Matrix>& P, const V1 &v1, V2 &v2)
-  { mult(P.M, v1, v2); }
-
-  template <typename Matrix, typename V1, typename V2> inline
-  void transposed_mult(const mr_approx_inverse_precond<Matrix>& P,
-		       const V1 &v1,V2 &v2)
-  { mult(gmm::conjugated(P.M), v1, v2); }
-
-  template <typename Matrix>
-  void mr_approx_inverse_precond<Matrix>::build_with(const Matrix& A) {
-    gmm::resize(M, mat_nrows(A), mat_ncols(A));
-    typedef value_type T;
-    typedef magnitude_type R;
-    VVector m(mat_ncols(A)),r(mat_ncols(A)),ei(mat_ncols(A)),Ar(mat_ncols(A)); 
-    T alpha = mat_trace(A)/ mat_euclidean_norm_sqr(A);
-    if (alpha == T(0)) alpha = T(1);
-    
-    for (size_type i = 0; i < mat_nrows(A); ++i) {
-      gmm::clear(m); gmm::clear(ei); 
-      m[i] = alpha;
-      ei[i] = T(1);
-      
-      for (size_type j = 0; j < nb_it; ++j) {
-	gmm::mult(A, gmm::scaled(m, T(-1)), r);
-	gmm::add(ei, r);
-	gmm::mult(A, r, Ar);
-	T nAr = vect_sp(Ar,Ar);
-	if (gmm::abs(nAr) > R(0)) {
-	  gmm::add(gmm::scaled(r, gmm::safe_divide(vect_sp(r, Ar), vect_sp(Ar, Ar))), m);
-	  gmm::clean(m, threshold * gmm::vect_norm2(m));
-	} else gmm::clear(m);
-      }
-      if (gmm::vect_norm2(m) == R(0)) m[i] = alpha;
-      gmm::copy(m, M.col(i));
-    }
-  }
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_real_part.h b/Contrib/gmm/gmm_real_part.h
deleted file mode 100755
index b023986..0000000
--- a/Contrib/gmm/gmm_real_part.h
+++ /dev/null
@@ -1,604 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_real_part.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date September 18, 2003.
-   @brief extract the real/imaginary part of vectors/matrices 
-*/
-#ifndef GMM_REAL_PART_H
-#define GMM_REAL_PART_H
-
-#include "gmm_def.h"
-#include "gmm_vector.h"
-
-namespace gmm {
-
-  struct linalg_real_part {};
-  struct linalg_imag_part {};
-  template <typename R, typename PART> struct which_part {};
-  
-  template <typename C> typename number_traits<C>::magnitude_type 
-  real_or_imag_part(C x, linalg_real_part) { return gmm::real(x); }
-  template <typename C> typename number_traits<C>::magnitude_type 
-  real_or_imag_part(C x, linalg_imag_part) { return gmm::imag(x); }
-  template <typename T, typename C, typename OP> C
-  complex_from(T x, C y, OP op, linalg_real_part) { return std::complex<T>(op(std::real(y), x), std::imag(y)); }
-  template <typename T, typename C, typename OP> C
-  complex_from(T x, C y, OP op,linalg_imag_part) { return std::complex<T>(std::real(y), op(std::imag(y), x)); }
-  
-  template<typename T> struct project2nd {
-    T operator()(T , T b) const { return b; }
-  };
-  
-  template<typename T, typename R, typename PART> class ref_elt_vector<T, which_part<R, PART> > {
-
-    R r;
-    
-    public :
-
-    operator T() const { return real_or_imag_part(std::complex<T>(r), PART()); }
-    ref_elt_vector(R r_) : r(r_) {}
-    inline ref_elt_vector &operator =(T v)
-    { r = complex_from(v, std::complex<T>(r), gmm::project2nd<T>(), PART()); return *this; }
-    inline bool operator ==(T v) const { return (r == v); }
-    inline bool operator !=(T v) const { return (r != v); }
-    inline ref_elt_vector &operator +=(T v)
-    { r = complex_from(v, std::complex<T>(r), std::plus<T>(), PART()); return *this; }
-    inline ref_elt_vector &operator -=(T v)
-      { r = complex_from(v, std::complex<T>(r), std::minus<T>(), PART()); return *this; }
-    inline ref_elt_vector &operator /=(T v)
-      { r = complex_from(v, std::complex<T>(r), std::divides<T>(), PART()); return *this; }
-    inline ref_elt_vector &operator *=(T v)
-      { r = complex_from(v, std::complex<T>(r), std::multiplies<T>(), PART()); return *this; }
-    inline ref_elt_vector &operator =(const ref_elt_vector &re)
-      { *this = T(re); return *this; }
-    T operator +()    { return  T(*this);   } // necessary for unknow reason
-    T operator -()    { return -T(*this);   } // necessary for unknow reason
-    T operator +(T v) { return T(*this)+ v; } // necessary for unknow reason
-    T operator -(T v) { return T(*this)- v; } // necessary for unknow reason
-    T operator *(T v) { return T(*this)* v; } // necessary for unknow reason
-    T operator /(T v) { return T(*this)/ v; } // necessary for unknow reason
-  };
-
-  template<typename reference> struct ref_or_value_type {
-    template <typename T, typename W>
-    static W r(const T &x, linalg_real_part, W) {
-      return gmm::real(x);
-    }
-    template <typename T, typename W>
-    static W r(const T &x, linalg_imag_part, W) {
-      return gmm::imag(x);
-    }
-  };
-  
-  template<typename U, typename R, typename PART> 
-  struct ref_or_value_type<ref_elt_vector<U, which_part<R, PART> > > {
-    template<typename T , typename W> 
-    static const T &r(const T &x, linalg_real_part, W)
-    { return x; }
-    template<typename T, typename W> 
-    static const T &r(const T &x, linalg_imag_part, W) {
-      return x; 
-    }
-    template<typename T , typename W> 
-    static T &r(T &x, linalg_real_part, W)
-    { return x; }
-    template<typename T, typename W> 
-    static T &r(T &x, linalg_imag_part, W) {
-      return x; 
-    }
-  };
-
-  
-  /* ********************************************************************* */
-  /*	Reference to the real part of (complex) vectors            	   */
-  /* ********************************************************************* */
-
-  template <typename IT, typename MIT, typename PART>
-  struct part_vector_iterator {
-    typedef typename std::iterator_traits<IT>::value_type      vtype;
-    typedef typename gmm::number_traits<vtype>::magnitude_type value_type;
-    typedef value_type                                        *pointer;
-    typedef ref_elt_vector<value_type, which_part<typename std::iterator_traits<IT>::reference, PART> > reference;
-    typedef typename std::iterator_traits<IT>::difference_type difference_type;
-    typedef typename std::iterator_traits<IT>::iterator_category
-    iterator_category;
-
-    IT it;
-    
-    part_vector_iterator(void) {}
-    explicit part_vector_iterator(const IT &i) : it(i) {}
-    part_vector_iterator(const part_vector_iterator<MIT, MIT, PART> &i) : it(i.it) {}
-    
-
-    size_type index(void) const { return it.index(); }
-    part_vector_iterator operator ++(int)
-    { part_vector_iterator tmp = *this; ++it; return tmp; }
-    part_vector_iterator operator --(int) 
-    { part_vector_iterator tmp = *this; --it; return tmp; }
-    part_vector_iterator &operator ++() { ++it; return *this; }
-    part_vector_iterator &operator --() { --it; return *this; }
-    part_vector_iterator &operator +=(difference_type i)
-      { it += i; return *this; }
-    part_vector_iterator &operator -=(difference_type i)
-      { it -= i; return *this; }
-    part_vector_iterator operator +(difference_type i) const
-      { part_vector_iterator itb = *this; return (itb += i); }
-    part_vector_iterator operator -(difference_type i) const
-      { part_vector_iterator itb = *this; return (itb -= i); }
-    difference_type operator -(const part_vector_iterator &i) const
-      { return difference_type(it - i.it); }
-    
-    reference operator  *() const { return reference(*it); }
-    reference operator [](size_type ii) const { return reference(it[ii]); }
-    
-    bool operator ==(const part_vector_iterator &i) const
-      { return (i.it == it); }
-    bool operator !=(const part_vector_iterator &i) const
-      { return (i.it != it); }
-    bool operator < (const part_vector_iterator &i) const
-      { return (it < i.it); }
-  };
-
-
-  template <typename PT, typename PART> struct part_vector {
-    typedef part_vector<PT, PART> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef V * CPT;
-    typedef typename select_ref<typename linalg_traits<V>::const_iterator,
-            typename linalg_traits<V>::iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::value_type value_type;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    size_type size_;
-
-    size_type size(void) const { return size_; }
-   
-    reference operator[](size_type i) const { 
-      return reference(ref_or_value_type<reference>::r(
-	     linalg_traits<V>::access(origin, begin_, end_, i),
-	     PART(), value_type()));
-    }
-
-    part_vector(V &v)
-      : begin_(vect_begin(v)),  end_(vect_end(v)),
-	origin(linalg_origin(v)), size_(gmm::vect_size(v)) {}
-    part_vector(const V &v) 
-      : begin_(vect_begin(const_cast<V &>(v))),
-       end_(vect_end(const_cast<V &>(v))),
-	origin(linalg_origin(const_cast<V &>(v))), size_(gmm::vect_size(v)) {}
-    part_vector() {}
-    part_vector(const part_vector<CPT, PART> &cr)
-      : begin_(cr.begin_),end_(cr.end_),origin(cr.origin), size_(cr.size_) {} 
-  };
-
-  template <typename IT, typename MIT, typename ORG, typename PT,
-	    typename PART> inline
-  void set_to_begin(part_vector_iterator<IT, MIT, PART> &it,
-		    ORG o, part_vector<PT, PART> *, linalg_modifiable) {
-    typedef part_vector<PT, PART> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_begin(it.it, o, typename linalg_traits<VECT>::pV(), ref_t());
-  }
-  template <typename IT, typename MIT, typename ORG, typename PT,
-	    typename PART> inline
-  void set_to_begin(part_vector_iterator<IT, MIT, PART> &it,
-		    ORG o, const part_vector<PT, PART> *, linalg_modifiable) {
-    typedef part_vector<PT, PART> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_begin(it.it, o, typename linalg_traits<VECT>::pV(), ref_t());
-  }
-  template <typename IT, typename MIT, typename ORG, typename PT,
-	    typename PART> inline
-  void set_to_end(part_vector_iterator<IT, MIT, PART> &it,
-		    ORG o, part_vector<PT, PART> *, linalg_modifiable) {
-    typedef part_vector<PT, PART> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_end(it.it, o, typename linalg_traits<VECT>::pV(), ref_t());
-  }
-  template <typename IT, typename MIT, typename ORG,
-	    typename PT, typename PART> inline
-  void set_to_end(part_vector_iterator<IT, MIT, PART> &it,
-		  ORG o, const part_vector<PT, PART> *,
-		  linalg_modifiable) {
-    typedef part_vector<PT, PART> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_end(it.it, o, typename linalg_traits<VECT>::pV(), ref_t());
-  }
-  
-  template <typename PT, typename PART>
-  struct linalg_traits<part_vector<PT, PART> > {
-    typedef part_vector<PT, PART> this_type;
-    typedef this_type * pthis_type;
-    typedef PT pV;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename linalg_traits<V>::index_sorted index_sorted;
-    typedef typename linalg_traits<V>::is_reference V_reference;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename linalg_traits<V>::value_type vtype;
-    typedef typename number_traits<vtype>::magnitude_type value_type;
-    typedef typename select_ref<value_type, ref_elt_vector<value_type,
-		     which_part<typename linalg_traits<V>::reference,
-				PART> >, PT>::ref_type reference;
-    typedef typename select_ref<typename linalg_traits<V>::const_iterator,
-	    typename linalg_traits<V>::iterator, PT>::ref_type pre_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    part_vector_iterator<pre_iterator, pre_iterator, PART>,
-	    PT>::ref_type iterator;
-    typedef part_vector_iterator<typename linalg_traits<V>::const_iterator,
-				 pre_iterator, PART> const_iterator;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) {
-      iterator it; it.it = v.begin_;
-      if (!is_const_reference(is_reference()) && is_sparse(storage_type()))
-	set_to_begin(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static const_iterator begin(const this_type &v) {
-      const_iterator it(v.begin_);
-      if (!is_const_reference(is_reference()) && is_sparse(storage_type()))
-	{ set_to_begin(it, v.origin, pthis_type(), is_reference()); }
-      return it;
-    }
-    static iterator end(this_type &v) {
-      iterator it(v.end_);
-      if (!is_const_reference(is_reference()) && is_sparse(storage_type()))
-	set_to_end(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static const_iterator end(const this_type &v) {
-      const_iterator it(v.end_);
-      if (!is_const_reference(is_reference()) && is_sparse(storage_type()))
-	set_to_end(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-
-    static void clear(origin_type* o, const iterator &begin_,
-		      const iterator &end_, abstract_sparse) {
-      std::deque<size_type> ind;
-      iterator it = begin_;
-      for (; it != end_; ++it) ind.push_front(it.index());
-      for (; !(ind.empty()); ind.pop_back())
-	access(o, begin_, end_, ind.back()) = value_type(0);
-    }
-    static void clear(origin_type* o, const iterator &begin_,
-		      const iterator &end_, abstract_skyline) {
-      clear(o, begin_, end_, abstract_sparse());
-    }
-    static void clear(origin_type* o, const iterator &begin_,
-		      const iterator &end_, abstract_dense) {
-      for (iterator it = begin_; it != end_; ++it) *it = value_type(0);
-    }
-
-   static void clear(origin_type* o, const iterator &begin_,
-		      const iterator &end_) 
-    { clear(o, begin_, end_, storage_type()); }
-    static void do_clear(this_type &v) { clear(v.origin, begin(v), end(v)); }
-    static value_type access(const origin_type *o, const const_iterator &it,
-			     const const_iterator &ite, size_type i) { 
-      return  real_or_imag_part(linalg_traits<V>::access(o, it.it, ite.it,i),
-				PART());
-    }
-    static reference access(origin_type *o, const iterator &it,
-			    const iterator &ite, size_type i)
-    { return reference(linalg_traits<V>::access(o, it.it, ite.it,i)); }
-  };
-
-  template <typename PT, typename PART> std::ostream &operator <<
-    (std::ostream &o, const part_vector<PT, PART>& m)
-  { gmm::write(o,m); return o; }
-
-
-  /* ********************************************************************* */
-  /*	Reference to the real or imaginary part of (complex) matrices      */
-  /* ********************************************************************* */
-
-
-  template <typename PT, typename PART> struct  part_row_ref {
-    
-    typedef part_row_ref<PT, PART> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef M * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_M;
-    typedef typename select_ref<typename linalg_traits<this_type>
-            ::const_row_iterator, typename linalg_traits<this_type>
-            ::row_iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::value_type value_type;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    size_type nr, nc;
-
-    part_row_ref(ref_M m)
-      : begin_(mat_row_begin(m)), end_(mat_row_end(m)),
-	origin(linalg_origin(m)), nr(mat_nrows(m)), nc(mat_ncols(m)) {}
-
-    part_row_ref(const part_row_ref<CPT, PART> &cr) :
-      begin_(cr.begin_),end_(cr.end_), origin(cr.origin),nr(cr.nr),nc(cr.nc) {}
-
-    reference operator()(size_type i, size_type j) const {
-      return reference(ref_or_value_type<reference>::r(
-					 linalg_traits<M>::access(begin_+j, i),
-					 PART(), value_type()));
-    }
-  };
-
-  template <typename PT, typename PART>
-  struct linalg_traits<part_row_ref<PT, PART> > {
-    typedef part_row_ref<PT, PART> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type vtype;
-    typedef typename number_traits<vtype>::magnitude_type value_type;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_col_iterator;
-    typedef typename linalg_traits<M>::const_sub_row_type
-            pre_const_sub_row_type;
-    typedef typename linalg_traits<M>::sub_row_type pre_sub_row_type;
-    typedef part_vector<const pre_const_sub_row_type *, PART>
-            const_sub_row_type;
-    typedef typename select_ref<abstract_null_type,
-	    part_vector<pre_sub_row_type *, PART>, PT>::ref_type sub_row_type;
-    typedef typename linalg_traits<M>::const_row_iterator const_row_iterator;
-    typedef typename select_ref<abstract_null_type, typename
-            linalg_traits<M>::row_iterator, PT>::ref_type row_iterator;
-    typedef typename select_ref<
-            typename linalg_traits<const_sub_row_type>::reference,
-	    typename linalg_traits<sub_row_type>::reference,
-				PT>::ref_type reference;
-    typedef row_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static size_type ncols(const this_type &v) { return v.nc; }
-    static size_type nrows(const this_type &v) { return v.nr; }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return const_sub_row_type(linalg_traits<M>::row(it)); }
-    static sub_row_type row(const row_iterator &it)
-    { return sub_row_type(linalg_traits<M>::row(it)); }
-    static row_iterator row_begin(this_type &m) { return m.begin_; }
-    static row_iterator row_end(this_type &m) { return m.end_; }
-    static const_row_iterator row_begin(const this_type &m)
-    { return m.begin_; }
-    static const_row_iterator row_end(const this_type &m) { return m.end_; }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void do_clear(this_type &v);
-    static value_type access(const const_row_iterator &itrow, size_type i)
-    { return real_or_imag_part(linalg_traits<M>::access(itrow, i), PART()); }
-    static reference access(const row_iterator &itrow, size_type i) {
-      return reference(ref_or_value_type<reference>::r(
-					 linalg_traits<M>::access(itrow, i),
-					 PART(), value_type()));
-    }
-  };
-   
-  template <typename PT, typename PART> 
-  void linalg_traits<part_row_ref<PT, PART> >::do_clear(this_type &v) { 
-    row_iterator it = mat_row_begin(v), ite = mat_row_end(v);
-    for (; it != ite; ++it) clear(row(it));
-  }
-  
-  template<typename PT, typename PART> std::ostream &operator <<
-    (std::ostream &o, const part_row_ref<PT, PART>& m)
-  { gmm::write(o,m); return o; }
-
-  template <typename PT, typename PART> struct  part_col_ref {
-    
-    typedef part_col_ref<PT, PART> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef M * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_M;
-    typedef typename select_ref<typename linalg_traits<this_type>
-            ::const_col_iterator, typename linalg_traits<this_type>
-            ::col_iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::value_type value_type;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    size_type nr, nc;
-
-    part_col_ref(ref_M m)
-      : begin_(mat_col_begin(m)), end_(mat_col_end(m)),
-	origin(linalg_origin(m)), nr(mat_nrows(m)), nc(mat_ncols(m)) {}
-
-    part_col_ref(const part_col_ref<CPT, PART> &cr) :
-      begin_(cr.begin_),end_(cr.end_), origin(cr.origin),nr(cr.nr),nc(cr.nc) {}
-
-    reference operator()(size_type i, size_type j) const {
-      return reference(ref_or_value_type<reference>::r(
-					 linalg_traits<M>::access(begin_+j, i),
-					 PART(), value_type()));
-    }
-  };
-
-  template <typename PT, typename PART>
-  struct linalg_traits<part_col_ref<PT, PART> > {
-    typedef part_col_ref<PT, PART> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type vtype;
-    typedef typename number_traits<vtype>::magnitude_type value_type;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_row_iterator;
-    typedef typename linalg_traits<M>::const_sub_col_type
-            pre_const_sub_col_type;
-    typedef typename linalg_traits<M>::sub_col_type pre_sub_col_type;
-    typedef part_vector<const pre_const_sub_col_type *, PART>
-            const_sub_col_type;
-    typedef typename select_ref<abstract_null_type,
-	    part_vector<pre_sub_col_type *, PART>, PT>::ref_type sub_col_type;
-    typedef typename linalg_traits<M>::const_col_iterator const_col_iterator;
-    typedef typename select_ref<abstract_null_type, typename
-            linalg_traits<M>::col_iterator, PT>::ref_type col_iterator;
-    typedef typename select_ref<
-            typename linalg_traits<const_sub_col_type>::reference,
-	    typename linalg_traits<sub_col_type>::reference,
-				PT>::ref_type reference;
-    typedef col_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static size_type nrows(const this_type &v) { return v.nr; }
-    static size_type ncols(const this_type &v) { return v.nc; }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return const_sub_col_type(linalg_traits<M>::col(it)); }
-    static sub_col_type col(const col_iterator &it)
-    { return sub_col_type(linalg_traits<M>::col(it)); }
-    static col_iterator col_begin(this_type &m) { return m.begin_; }
-    static col_iterator col_end(this_type &m) { return m.end_; }
-    static const_col_iterator col_begin(const this_type &m)
-    { return m.begin_; }
-    static const_col_iterator col_end(const this_type &m) { return m.end_; }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void do_clear(this_type &v);
-    static value_type access(const const_col_iterator &itcol, size_type i)
-    { return real_or_imag_part(linalg_traits<M>::access(itcol, i), PART()); }
-    static reference access(const col_iterator &itcol, size_type i) {
-      return reference(ref_or_value_type<reference>::r(
-					 linalg_traits<M>::access(itcol, i),
-					 PART(), value_type()));
-    }
-  };
-   
-  template <typename PT, typename PART> 
-  void linalg_traits<part_col_ref<PT, PART> >::do_clear(this_type &v) { 
-    col_iterator it = mat_col_begin(v), ite = mat_col_end(v);
-    for (; it != ite; ++it) clear(col(it));
-  }
-  
-  template<typename PT, typename PART> std::ostream &operator <<
-    (std::ostream &o, const part_col_ref<PT, PART>& m)
-  { gmm::write(o,m); return o; }
-
-  
-
-
-
-
-template <typename TYPE, typename PART, typename PT>
-  struct part_return_ {
-    typedef abstract_null_type return_type;
-  };
-  template <typename PT, typename PART>
-  struct part_return_<row_major, PART, PT> {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_return<part_row_ref<const L *, PART>,
-		     part_row_ref< L *, PART>, PT>::return_type return_type;
-  };
-  template <typename PT, typename PART>
-  struct part_return_<col_major, PART, PT> {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_return<part_col_ref<const L *, PART>,
-		     part_col_ref<L *, PART>, PT>::return_type return_type;
-  };
-
-  template <typename PT, typename PART, typename LT> struct part_return__{
-    typedef abstract_null_type return_type;
-  };
-
-  template <typename PT, typename PART>
-  struct part_return__<PT, PART, abstract_matrix> {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename part_return_<typename principal_orientation_type<
-      typename linalg_traits<L>::sub_orientation>::potype, PART,
-      PT>::return_type return_type;
-  };
-
-  template <typename PT, typename PART>
-  struct part_return__<PT, PART, abstract_vector> {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_return<part_vector<const L *, PART>,
-      part_vector<L *, PART>, PT>::return_type return_type;
-  };
-
-  template <typename PT, typename PART> struct part_return {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename part_return__<PT, PART,
-      typename linalg_traits<L>::linalg_type>::return_type return_type;
-  };
-
-  template <typename L> inline 
-  typename part_return<const L *, linalg_real_part>::return_type
-  real_part(const L &l) {
-    return typename part_return<const L *, linalg_real_part>::return_type
-      (linalg_cast(const_cast<L &>(l)));
-  }
-
-  template <typename L> inline 
-  typename part_return<L *, linalg_real_part>::return_type
-  real_part(L &l) {
-    return typename part_return<L *, linalg_real_part>::return_type(linalg_cast(l));
-  }
-
-  template <typename L> inline 
-  typename part_return<const L *, linalg_imag_part>::return_type
-  imag_part(const L &l) {
-    return typename part_return<const L *, linalg_imag_part>::return_type
-      (linalg_cast(const_cast<L &>(l)));
-  }
-
-  template <typename L> inline 
-  typename part_return<L *, linalg_imag_part>::return_type
-  imag_part(L &l) {
-    return typename part_return<L *, linalg_imag_part>::return_type(linalg_cast(l));
-  }
-
-
-
-}
-
-#endif //  GMM_REAL_PART_H
diff --git a/Contrib/gmm/gmm_ref.h b/Contrib/gmm/gmm_ref.h
deleted file mode 100755
index 0f6c745..0000000
--- a/Contrib/gmm/gmm_ref.h
+++ /dev/null
@@ -1,525 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2000-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-
-#ifndef GMM_REF_H__
-#define GMM_REF_H__
-
-/** @file gmm_ref.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date August 26, 2000.
- *  @brief Provide some simple pseudo-containers.
- *  
- *  WARNING : modifiying the container infirm the validity of references.
- */
-
-
-#include <iterator>
-#include "gmm_except.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /* Simple reference.                                                     */
-  /* ********************************************************************* */
-
-  template<typename ITER> class tab_ref {
-
-    protected :
-
-      ITER begin_, end_;
-
-    public :
-
-      typedef typename std::iterator_traits<ITER>::value_type  value_type;
-      typedef typename std::iterator_traits<ITER>::pointer     pointer;
-      typedef typename std::iterator_traits<ITER>::pointer     const_pointer;
-      typedef typename std::iterator_traits<ITER>::reference   reference;
-      typedef typename std::iterator_traits<ITER>::reference   const_reference;
-      typedef typename std::iterator_traits<ITER>::difference_type
-	                                                       difference_type;
-      typedef ITER                            iterator;
-      typedef ITER                            const_iterator;
-      typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-      typedef std::reverse_iterator<iterator> reverse_iterator;
-      typedef size_t size_type;
-    
-      bool empty(void) const { return begin_ == end_; }
-      size_type size(void) const { return end_ - begin_; }
-
-      const iterator &begin(void) { return begin_; }
-      const const_iterator &begin(void) const { return begin_; }
-      const iterator &end(void) { return end_; }
-      const const_iterator &end(void) const { return end_; }
-      reverse_iterator rbegin(void) { return reverse_iterator(end()); }
-      const_reverse_iterator rbegin(void) const
-      { return const_reverse_iterator(end()); }
-      reverse_iterator rend(void) { return reverse_iterator(begin()); }
-      const_reverse_iterator rend(void) const
-      { return const_reverse_iterator(begin()); }
-
-      reference front(void) { return *begin(); }
-      const_reference front(void) const { return *begin(); }
-      reference back(void) { return *(--(end())); }
-      const_reference back(void) const { return *(--(end())); }
-      void pop_front(void) { ++begin_; }
-
-      const_reference operator [](size_type ii) const { return *(begin_ + ii);}
-      reference operator [](size_type ii) { return *(begin_ + ii); }
-
-      tab_ref(void) {}
-      tab_ref(const ITER &b, const ITER &e) : begin_(b), end_(e) {}
-  };
-
-
-  /* ********************************************************************* */
-  /* Reference with index.                                                 */
-  /* ********************************************************************* */
-
-//   template<typename ITER> struct tab_ref_index_iterator_
-//     : public dynamic_array<size_t>::const_iterator
-//   {
-//     typedef typename std::iterator_traits<ITER>::value_type  value_type;
-//     typedef typename std::iterator_traits<ITER>::pointer     pointer;
-//     typedef typename std::iterator_traits<ITER>::reference   reference;
-//     typedef typename std::iterator_traits<ITER>::difference_type  
-//     difference_type;
-//     typedef std::random_access_iterator_tag iterator_category;
-//     typedef size_t size_type;
-//     typedef dynamic_array<size_type>::const_iterator dnas_iterator_;
-//     typedef tab_ref_index_iterator_<ITER> iterator;
-    
-
-//     ITER piter;
-    
-//     iterator operator ++(int)
-//     { iterator tmp = *this; ++(*((dnas_iterator_ *)(this))); return tmp; }
-//     iterator operator --(int)
-//     { iterator tmp = *this; --(*((dnas_iterator_ *)(this))); return tmp; }
-//     iterator &operator ++()
-//     { ++(*((dnas_iterator_ *)(this))); return *this; }
-//     iterator &operator --()
-//     { --(*((dnas_iterator_ *)(this))); return *this; }
-//     iterator &operator +=(difference_type i)
-//     { (*((dnas_iterator_ *)(this))) += i; return *this; }
-//     iterator &operator -=(difference_type i)
-//     { (*((dnas_iterator_ *)(this))) -= i; return *this; }
-//     iterator operator +(difference_type i) const
-//     { iterator it = *this; return (it += i); }
-//     iterator operator -(difference_type i) const
-//     { iterator it = *this; return (it -= i); }
-//     difference_type operator -(const iterator &i) const
-//     { return *((dnas_iterator_ *)(this)) - *((dnas_iterator_ *)(&i)); }
-	
-//     reference operator *() const
-//     { return *(piter + *((*((dnas_iterator_ *)(this))))); }
-//     reference operator [](int ii)
-//     { return *(piter + *((*((dnas_iterator_ *)(this+ii))))); }
-    
-//     bool operator ==(const iterator &i) const
-//     { 
-//       return ((piter) == ((i.piter))
-//        && *((dnas_iterator_ *)(this)) == *((*((dnas_iterator_ *)(this)))));
-//     }
-//     bool operator !=(const iterator &i) const
-//     { return !(i == *this); }
-//     bool operator < (const iterator &i) const
-//     { 
-//       return ((piter) == ((i.piter))
-// 	 && *((dnas_iterator_ *)(this)) < *((*((dnas_iterator_ *)(this)))));
-//     }
-
-//     tab_ref_index_iterator_(void) {}
-//     tab_ref_index_iterator_(const ITER &iter, const dnas_iterator_ &dnas_iter)
-//       : dnas_iterator_(dnas_iter), piter(iter) {}
-//   };
-
-
-//   template<typename ITER> class tab_ref_index
-//   {
-//     public :
-
-//       typedef typename std::iterator_traits<ITER>::value_type value_type;
-//       typedef typename std::iterator_traits<ITER>::pointer    pointer;
-//       typedef typename std::iterator_traits<ITER>::pointer    const_pointer;
-//       typedef typename std::iterator_traits<ITER>::reference  reference;
-//       typedef typename std::iterator_traits<ITER>::reference  const_reference;
-//       typedef typename std::iterator_traits<ITER>::difference_type
-// 	                                                       difference_type;
-//       typedef size_t size_type; 
-//       typedef tab_ref_index_iterator_<ITER> iterator;
-//       typedef iterator                          const_iterator;
-//       typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-//       typedef std::reverse_iterator<iterator> reverse_iterator;
-    
-//     protected :
-
-//       ITER begin_;
-//       dynamic_array<size_type> index_;
-
-//     public :
-
-//       bool empty(void) const { return index_.empty(); }
-//       size_type size(void) const { return index_.size(); }
-
-
-//       iterator begin(void) { return iterator(begin_, index_.begin()); }
-//       const_iterator begin(void) const
-//       { return iterator(begin_, index_.begin()); }
-//       iterator end(void) { return iterator(begin_, index_.end()); }
-//       const_iterator end(void) const { return iterator(begin_, index_.end()); }
-//       reverse_iterator rbegin(void) { return reverse_iterator(end()); }
-//       const_reverse_iterator rbegin(void) const
-//       { return const_reverse_iterator(end()); }
-//       reverse_iterator rend(void) { return reverse_iterator(begin()); }
-//       const_reverse_iterator rend(void) const
-//       { return const_reverse_iterator(begin()); }
-
-
-//       reference front(void) { return *(begin_ +index_[0]); }
-//       const_reference front(void) const { return *(begin_ +index_[0]); }
-//       reference back(void) { return *(--(end())); }
-//       const_reference back(void) const { return *(--(end())); }
-   
-//       tab_ref_index(void) {}
-//       tab_ref_index(const ITER &b, const dynamic_array<size_type> &ind)
-//       { begin_ = b; index_ = ind; }
-
-//     // to be changed in a const_reference ?
-//       value_type operator [](size_type ii) const
-//       { return *(begin_ + index_[ii]);}
-//       reference operator [](size_type ii) { return *(begin_ + index_[ii]); }
-
-//   };
-
-
-  /// iterator over a gmm::tab_ref_index_ref<ITER,ITER_INDEX>
-  template<typename ITER, typename ITER_INDEX>
-    struct tab_ref_index_ref_iterator_
-    {
-      typedef typename std::iterator_traits<ITER>::value_type value_type;
-      typedef typename std::iterator_traits<ITER>::pointer    pointer;
-      typedef typename std::iterator_traits<ITER>::reference  reference;
-      typedef typename std::iterator_traits<ITER>::difference_type
-                                                              difference_type;
-      typedef std::random_access_iterator_tag iterator_category;
-      typedef tab_ref_index_ref_iterator_<ITER, ITER_INDEX> iterator;
-      typedef size_t size_type;
-
-      ITER piter;
-      ITER_INDEX iter_index;
-      
-      iterator operator ++(int)
-      { iterator tmp = *this; ++iter_index; return tmp; }
-      iterator operator --(int)
-      { iterator tmp = *this; --iter_index; return tmp; }
-      iterator &operator ++() { ++iter_index; return *this; }
-      iterator &operator --() { --iter_index; return *this; }
-      iterator &operator +=(difference_type i)
-      { iter_index += i; return *this; }
-      iterator &operator -=(difference_type i)
-      { iter_index -= i; return *this; }
-      iterator operator +(difference_type i) const
-      { iterator it = *this; return (it += i); }
-      iterator operator -(difference_type i) const
-      { iterator it = *this; return (it -= i); }
-      difference_type operator -(const iterator &i) const
-      { return iter_index - i.iter_index; }
-	
-      reference operator *() const
-      { return *(piter + *iter_index); }
-      reference operator [](int ii) const
-      { return *(piter + *(iter_index+ii)); }
-      
-      bool operator ==(const iterator &i) const
-      { return ((piter) == ((i.piter)) && iter_index == i.iter_index); }
-      bool operator !=(const iterator &i) const { return !(i == *this); }
-      bool operator < (const iterator &i) const
-      { return ((piter) == ((i.piter)) && iter_index < i.iter_index); }
-
-      tab_ref_index_ref_iterator_(void) {}
-      tab_ref_index_ref_iterator_(const ITER &iter, 
-				  const ITER_INDEX &dnas_iter)
-	: piter(iter), iter_index(dnas_iter) {}
-      
-    };
-
-  /** 
-      convenience template function for quick obtention of a indexed iterator
-      without having to specify its (long) typename
-  */
-  template<typename ITER, typename ITER_INDEX>
-  tab_ref_index_ref_iterator_<ITER,ITER_INDEX>
-  index_ref_iterator(ITER it, ITER_INDEX it_i) {
-    return tab_ref_index_ref_iterator_<ITER,ITER_INDEX>(it, it_i);
-  }
-
-  /** indexed array reference (given a container X, and a set of indexes I, 
-      this class provides a pseudo-container Y such that
-      @code Y[i] = X[I[i]] @endcode
-  */
-  template<typename ITER, typename ITER_INDEX> class tab_ref_index_ref {
-  public :
-    
-    typedef std::iterator_traits<ITER>            traits_type;
-    typedef typename traits_type::value_type      value_type;
-    typedef typename traits_type::pointer         pointer;
-    typedef typename traits_type::pointer         const_pointer;
-    typedef typename traits_type::reference       reference;
-    typedef typename traits_type::reference       const_reference;
-    typedef typename traits_type::difference_type difference_type;
-    typedef size_t                                size_type;
-    typedef tab_ref_index_ref_iterator_<ITER, ITER_INDEX>   iterator;
-    typedef iterator                              const_iterator;
-    typedef std::reverse_iterator<const_iterator>     const_reverse_iterator;
-    typedef std::reverse_iterator<iterator>           reverse_iterator;
-    
-  protected :
-
-    ITER begin_;
-    ITER_INDEX index_begin_, index_end_;
-
-  public :
-    
-    bool empty(void) const { return index_begin_ == index_end_; }
-    size_type size(void) const { return index_end_ - index_begin_; }
-    
-    iterator begin(void) { return iterator(begin_, index_begin_); }
-    const_iterator begin(void) const
-    { return iterator(begin_, index_begin_); }
-    iterator end(void) { return iterator(begin_, index_end_); }
-    const_iterator end(void) const { return iterator(begin_, index_end_); }
-    reverse_iterator rbegin(void) { return reverse_iterator(end()); }
-    const_reverse_iterator rbegin(void) const
-    { return const_reverse_iterator(end()); }
-    reverse_iterator rend(void) { return reverse_iterator(begin()); }
-    const_reverse_iterator rend(void) const
-    { return const_reverse_iterator(begin()); }
-    
-    reference front(void) { return *(begin_ + *index_begin_); }
-    const_reference front(void) const { return *(begin_ + *index_begin_); }
-    reference back(void) { return *(--(end())); }
-    const_reference back(void) const { return *(--(end())); }
-    void pop_front(void) { ++index_begin_; }
-    
-    tab_ref_index_ref(void) {}
-    tab_ref_index_ref(const ITER &b, const ITER_INDEX &bi,
-		      const ITER_INDEX &ei)
-      : begin_(b), index_begin_(bi), index_end_(ei) {}
-    
-    // to be changed in a const_reference ?
-    const_reference operator [](size_type ii) const
-    { return *(begin_ + index_begin_[ii]);}
-    reference operator [](size_type ii)
-    { return *(begin_ + index_begin_[ii]); }
-
-  };
-
-
-  /* ********************************************************************* */
-  /* Reference on regularly spaced elements.                               */
-  /* ********************************************************************* */
-
-  template<typename ITER> struct tab_ref_reg_spaced_iterator_ {
-    
-    typedef typename std::iterator_traits<ITER>::value_type value_type;
-    typedef typename std::iterator_traits<ITER>::pointer    pointer;
-    typedef typename std::iterator_traits<ITER>::reference  reference;
-    typedef typename std::iterator_traits<ITER>::difference_type
-                                                            difference_type;
-    typedef typename std::iterator_traits<ITER>::iterator_category
-                                                            iterator_category;
-    typedef size_t size_type;
-    typedef tab_ref_reg_spaced_iterator_<ITER> iterator;
-    
-    ITER it;
-    size_type N, i;
-    
-    iterator operator ++(int) { iterator tmp = *this; i++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; i--; return tmp; }
-    iterator &operator ++()   { i++; return *this; }
-    iterator &operator --()   { i--; return *this; }
-    iterator &operator +=(difference_type ii) { i+=ii; return *this; }
-    iterator &operator -=(difference_type ii) { i-=ii; return *this; }
-    iterator operator +(difference_type ii) const 
-    { iterator itt = *this; return (itt += ii); }
-    iterator operator -(difference_type ii) const
-    { iterator itt = *this; return (itt -= ii); }
-    difference_type operator -(const iterator &ii) const
-    { return (N ? (it - ii.it) / N : 0) + i - ii.i; }
-
-    reference operator *() const { return *(it + i*N); }
-    reference operator [](int ii) const { return *(it + (i+ii)*N); }
-
-    bool operator ==(const iterator &ii) const
-    { return (*this - ii) == difference_type(0); }
-    bool operator !=(const iterator &ii) const
-    { return  (*this - ii) != difference_type(0); }
-    bool operator < (const iterator &ii) const
-    { return (*this - ii) < difference_type(0); }
-
-    tab_ref_reg_spaced_iterator_(void) {}
-    tab_ref_reg_spaced_iterator_(const ITER &iter, size_type n, size_type ii)
-      : it(iter), N(n), i(ii) { }
-    
-  };
-
-  /** 
-      convenience template function for quick obtention of a strided iterator
-      without having to specify its (long) typename
-  */
-  template<typename ITER> tab_ref_reg_spaced_iterator_<ITER> 
-  reg_spaced_iterator(ITER it, size_t stride) {
-    return tab_ref_reg_spaced_iterator_<ITER>(it, stride);
-  }
-
-  /**
-     provide a "strided" view a of container
-  */
-  template<typename ITER> class tab_ref_reg_spaced {
-  public :
-
-    typedef typename std::iterator_traits<ITER>::value_type value_type;
-    typedef typename std::iterator_traits<ITER>::pointer    pointer;
-    typedef typename std::iterator_traits<ITER>::pointer    const_pointer;
-    typedef typename std::iterator_traits<ITER>::reference  reference;
-    typedef typename std::iterator_traits<ITER>::reference  const_reference;
-    typedef typename std::iterator_traits<ITER>::difference_type
-            difference_type;
-    typedef size_t size_type;
-    typedef tab_ref_reg_spaced_iterator_<ITER> iterator;
-    typedef iterator                          const_iterator;
-    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-    typedef std::reverse_iterator<iterator> reverse_iterator;
-    
-  protected :
-
-    ITER begin_;
-    size_type N, size_;
-    
-  public :
-    
-    bool empty(void) const { return size_ == 0; }
-    size_type size(void) const { return size_; }
-    
-    iterator begin(void) { return iterator(begin_, N, 0); }
-    const_iterator begin(void) const { return iterator(begin_, N, 0); }
-    iterator end(void) { return iterator(begin_, N, size_); }
-    const_iterator end(void) const { return iterator(begin_, N, size_); }
-    reverse_iterator rbegin(void) { return reverse_iterator(end()); }
-    const_reverse_iterator rbegin(void) const
-    { return const_reverse_iterator(end()); }
-    reverse_iterator rend(void) { return reverse_iterator(begin()); }
-    const_reverse_iterator rend(void) const
-    { return const_reverse_iterator(begin()); }
-    
-    reference front(void) { return *begin_; }
-    const_reference front(void) const { return *begin_; }
-    reference back(void) { return *(begin_ + N * (size_-1)); }
-    const_reference back(void) const { return *(begin_ + N * (size_-1)); }
-    void pop_front(void) { begin_ += N; }
-    
-    tab_ref_reg_spaced(void) {}
-    tab_ref_reg_spaced(const ITER &b, size_type n, size_type s)
-      : begin_(b), N(n), size_(s) {}
-    
-    
-    const_reference operator [](size_type ii) const
-    { return *(begin_ + ii * N);}
-    reference operator [](size_type ii) { return *(begin_ + ii * N); }
-    
-  };
-
-  /// iterator over a tab_ref_with_selection
-  template<typename ITER, typename COND> 
-  struct tab_ref_with_selection_iterator_ : public ITER {
-    typedef typename std::iterator_traits<ITER>::value_type value_type;
-    typedef typename std::iterator_traits<ITER>::pointer    pointer;
-    typedef typename std::iterator_traits<ITER>::reference  reference;
-    typedef typename std::iterator_traits<ITER>::difference_type
-                                                              difference_type;
-    typedef std::forward_iterator_tag iterator_category;
-    typedef tab_ref_with_selection_iterator_<ITER, COND> iterator;
-    const COND cond;
-    
-    void forward(void) { while (!(cond)(*this)) ITER::operator ++(); }
-    iterator &operator ++()
-    { ITER::operator ++(); forward(); return *this; }
-    iterator operator ++(int)
-    { iterator tmp = *this; ++(*this); return tmp; }
-    
-    tab_ref_with_selection_iterator_(void) {}
-    tab_ref_with_selection_iterator_(const ITER &iter, const COND c)
-      : ITER(iter), cond(c) {}
-    
-  };
-
-  /**
-     given a container X and a predicate P, provide pseudo-container Y
-     of all elements of X such that P(X[i]).
-  */
-  template<typename ITER, typename COND> class tab_ref_with_selection {
-    
-  protected :
-    
-    ITER begin_, end_;
-    COND cond;
-    
-  public :
-    
-    typedef typename std::iterator_traits<ITER>::value_type value_type;
-    typedef typename std::iterator_traits<ITER>::pointer    pointer;
-    typedef typename std::iterator_traits<ITER>::pointer    const_pointer;
-    typedef typename std::iterator_traits<ITER>::reference  reference;
-    typedef typename std::iterator_traits<ITER>::reference  const_reference;
-    typedef size_t  size_type;
-    typedef tab_ref_with_selection_iterator_<ITER, COND> iterator;
-    typedef iterator   const_iterator;
-    
-    iterator begin(void) const
-    { iterator it(begin_, cond); it.forward(); return it; }
-    iterator end(void) const { return iterator(end_, cond); }
-    bool empty(void) const { return begin_ == end_; }
-    
-    value_type front(void) const { return *begin(); }
-    void pop_front(void) { ++begin_; begin_ = begin(); }
-    
-    COND &condition(void) { return cond; }
-    const COND &condition(void) const { return cond; }
-    
-    tab_ref_with_selection(void) {}
-    tab_ref_with_selection(const ITER &b, const ITER &e, const COND &c)
-      : begin_(b), end_(e), cond(c) { begin_ = begin(); }
-    
-  };
-
-}
-
-#endif /* GMM_REF_H__  */
diff --git a/Contrib/gmm/gmm_scaled.h b/Contrib/gmm/gmm_scaled.h
deleted file mode 100755
index 281ef59..0000000
--- a/Contrib/gmm/gmm_scaled.h
+++ /dev/null
@@ -1,427 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_scaled.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date November 10, 2002.
-   @brief get a scaled view of a vector/matrix.
-*/
-#ifndef GMM_SCALED_H__
-#define GMM_SCALED_H__
-
-#include "gmm_def.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*		Scaled references on vectors            		   */
-  /* ********************************************************************* */
-
-  template <typename IT, typename S> struct scaled_const_iterator {
-    typedef typename strongest_numeric_type<typename std::iterator_traits<IT>::value_type,
-					    S>::T value_type;
-
-    typedef typename std::iterator_traits<IT>::pointer         pointer;
-    typedef typename std::iterator_traits<IT>::reference       reference;
-    typedef typename std::iterator_traits<IT>::difference_type difference_type;
-    typedef typename std::iterator_traits<IT>::iterator_category
-    iterator_category;
-
-    IT it;
-    S r;
-    
-    scaled_const_iterator(void) {}
-    scaled_const_iterator(const IT &i, S x) : it(i), r(x) {}
-    
-    inline size_type index(void) const { return it.index(); }
-    inline scaled_const_iterator operator ++(int)
-    { scaled_const_iterator tmp = *this; ++it; return tmp; }
-    inline scaled_const_iterator operator --(int) 
-    { scaled_const_iterator tmp = *this; --it; return tmp; }
-    inline scaled_const_iterator &operator ++() { ++it; return *this; }
-    inline scaled_const_iterator &operator --() { --it; return *this; }
-    inline scaled_const_iterator &operator +=(difference_type i)
-      { it += i; return *this; }
-    inline scaled_const_iterator &operator -=(difference_type i)
-      { it -= i; return *this; }
-    inline scaled_const_iterator operator +(difference_type i) const
-      { scaled_const_iterator itb = *this; return (itb += i); }
-    inline scaled_const_iterator operator -(difference_type i) const
-      { scaled_const_iterator itb = *this; return (itb -= i); }
-    inline difference_type operator -(const scaled_const_iterator &i) const
-      { return difference_type(it - i.it); }
-    
-    inline value_type operator  *() const { return (*it) * r; }
-    inline value_type operator [](size_type ii) const { return it[ii] * r; }
-    
-    inline bool operator ==(const scaled_const_iterator &i) const
-      { return (i.it == it); }
-    inline bool operator !=(const scaled_const_iterator &i) const
-      { return (i.it != it); }
-    inline bool operator < (const scaled_const_iterator &i) const
-      { return (it < i.it); }
-  };
-
-  template <typename V, typename S> struct scaled_vector_const_ref {
-    typedef scaled_vector_const_ref<V,S> this_type;
-    typedef typename linalg_traits<this_type>::value_type value_type;
-    typedef typename linalg_traits<V>::const_iterator iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::origin_type origin_type;
-
-    iterator begin_, end_;
-    const origin_type *origin;
-    size_type size_;
-    S r;
-
-    scaled_vector_const_ref(const V &v, S rr)
-      : begin_(vect_const_begin(v)), end_(vect_const_end(v)),
-	origin(linalg_origin(v)), size_(vect_size(v)), r(rr) {}
-
-    reference operator[](size_type i) const
-    { return r * linalg_traits<V>::access(origin, begin_, end_, i); }
-  };
-
-  template <typename V, typename S> struct linalg_traits<scaled_vector_const_ref<V,S> > {
-    typedef scaled_vector_const_ref<V,S> this_type;
-    typedef linalg_const is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename strongest_numeric_type<S, typename linalg_traits<V>::value_type>::T value_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef value_type reference;
-    typedef abstract_null_type iterator;
-    typedef scaled_const_iterator<typename linalg_traits<V>::const_iterator, S>
-      const_iterator;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef typename linalg_traits<V>::index_sorted index_sorted;
-    static size_type size(const this_type &v) { return v.size_; }
-    static const_iterator begin(const this_type &v)
-    { return const_iterator(v.begin_, v.r); }
-    static const_iterator end(const this_type &v)
-    { return const_iterator(v.end_, v.r); }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static value_type access(const origin_type *o, const const_iterator &it,
-			     const const_iterator &ite, size_type i)
-    { return it.r * (linalg_traits<V>::access(o, it.it, ite.it, i)); }
-
-  };
-
-   template<typename V, typename S> std::ostream &operator <<
-     (std::ostream &o, const scaled_vector_const_ref<V,S>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ********************************************************************* */
-  /*		Scaled references on matrices            		   */
-  /* ********************************************************************* */
-
-  template <typename M, typename S> struct scaled_row_const_iterator {
-    typedef scaled_row_const_iterator<M,S> iterator;
-    typedef typename linalg_traits<M>::const_row_iterator ITER;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-
-    ITER it;
-    S r;
-
-    inline iterator operator ++(int) { iterator tmp=*this; it++; return tmp; }
-    inline iterator operator --(int) { iterator tmp=*this; it--; return tmp; }
-    inline iterator &operator ++()   { it++; return *this; }
-    inline iterator &operator --()   { it--; return *this; }
-    iterator &operator +=(difference_type i) { it += i; return *this; }
-    iterator &operator -=(difference_type i) { it -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const
-    { return it - i.it; }
-
-    inline ITER operator *() const { return it; }
-    inline ITER operator [](int i) { return it + i; }
-
-    inline bool operator ==(const iterator &i) const { return (it == i.it); }
-    inline bool operator !=(const iterator &i) const { return !(i == *this); }
-    inline bool operator < (const iterator &i) const { return (it < i.it); }
-
-    scaled_row_const_iterator(void) {}
-    scaled_row_const_iterator(const ITER &i, S rr)
-      : it(i), r(rr) { }
-
-  };
-
-  template <typename M, typename S> struct  scaled_row_matrix_const_ref {
-    
-    typedef scaled_row_matrix_const_ref<M,S> this_type;
-    typedef typename linalg_traits<M>::const_row_iterator iterator;
-    typedef typename linalg_traits<this_type>::value_type value_type;
-    typedef typename linalg_traits<this_type>::origin_type origin_type;
-
-    iterator begin_, end_;
-    const origin_type *origin;
-    S r;
-    size_type nr, nc;
-
-    scaled_row_matrix_const_ref(const M &m, S rr)
-      : begin_(mat_row_begin(m)), end_(mat_row_end(m)),
-	origin(linalg_origin(m)), r(rr), nr(mat_nrows(m)), nc(mat_ncols(m)) {}
-
-    value_type operator()(size_type i, size_type j) const
-    { return r * linalg_traits<M>::access(begin_+i, j); }
-  };
-
-  template <typename M, typename S> struct linalg_traits<scaled_row_matrix_const_ref<M,S> > {
-    typedef scaled_row_matrix_const_ref<M,S> this_type;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename strongest_numeric_type<S, typename linalg_traits<M>::value_type>::T value_type;
-    typedef value_type reference;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef typename linalg_traits<M>::const_sub_row_type vector_type;
-    typedef scaled_vector_const_ref<vector_type,S> sub_row_type;
-    typedef scaled_vector_const_ref<vector_type,S> const_sub_row_type;
-    typedef scaled_row_const_iterator<M,S> row_iterator;
-    typedef scaled_row_const_iterator<M,S> const_row_iterator;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_col_iterator;
-    typedef abstract_null_type col_iterator;
-    typedef row_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static size_type nrows(const this_type &m)
-    { return m.nr; }
-    static size_type ncols(const this_type &m)
-    { return m.nc; }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return scaled(linalg_traits<M>::row(it.it), it.r); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.begin_, m.r); }
-    static const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m.end_, m.r); }
-    static const origin_type* origin(const this_type &m) { return m.origin; }
-    static value_type access(const const_row_iterator &it, size_type i)
-    { return it.r * (linalg_traits<M>::access(it.it, i)); }
-  };
-
-  template<typename M, typename S> std::ostream &operator <<
-    (std::ostream &o, const scaled_row_matrix_const_ref<M,S>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template <typename M, typename S> struct scaled_col_const_iterator {
-    typedef scaled_col_const_iterator<M,S> iterator;
-    typedef typename linalg_traits<M>::const_col_iterator ITER;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-
-    ITER it;
-    S r;
-
-    iterator operator ++(int) { iterator tmp = *this; it++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; it--; return tmp; }
-    iterator &operator ++()   { it++; return *this; }
-    iterator &operator --()   { it--; return *this; }
-    iterator &operator +=(difference_type i) { it += i; return *this; }
-    iterator &operator -=(difference_type i) { it -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const
-    { return it - i.it; }
-
-    ITER operator *() const { return it; }
-    ITER operator [](int i) { return it + i; }
-
-    bool operator ==(const iterator &i) const { return (it == i.it); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (it < i.it); }
-
-    scaled_col_const_iterator(void) {}
-    scaled_col_const_iterator(const ITER &i, S rr)
-      : it(i), r(rr) { }
-
-  };
-
-  template <typename M, typename S> struct  scaled_col_matrix_const_ref {
-    
-    typedef scaled_col_matrix_const_ref<M,S> this_type;
-    typedef typename linalg_traits<M>::const_col_iterator iterator;
-    typedef typename linalg_traits<this_type>::value_type value_type;
-    typedef typename linalg_traits<this_type>::origin_type origin_type;
-
-    iterator begin_, end_;
-    const origin_type *origin;
-    S r;
-    size_type nr, nc;
-
-    scaled_col_matrix_const_ref(const M &m, S rr)
-      : begin_(mat_col_begin(m)), end_(mat_col_end(m)),
-	origin(linalg_origin(m)), r(rr), nr(mat_nrows(m)), nc(mat_ncols(m)) {}
-
-    value_type operator()(size_type i, size_type j) const
-    { return r * linalg_traits<M>::access(begin_+j, i); }
-  };
-
-  template <typename M, typename S> struct linalg_traits<scaled_col_matrix_const_ref<M,S> > {
-    typedef scaled_col_matrix_const_ref<M,S> this_type;
-    typedef linalg_const is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename strongest_numeric_type<S, typename linalg_traits<M>::value_type>::T value_type;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef value_type reference;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef typename linalg_traits<M>::const_sub_col_type vector_type;
-    typedef abstract_null_type sub_col_type;
-    typedef scaled_vector_const_ref<vector_type,S> const_sub_col_type;
-    typedef abstract_null_type  col_iterator;
-    typedef scaled_col_const_iterator<M,S> const_col_iterator;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_row_iterator;
-    typedef abstract_null_type row_iterator;
-    typedef col_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static size_type ncols(const this_type &m)
-    { return m.nc; }
-    static size_type nrows(const this_type &m)
-    { return m.nr; }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return scaled(linalg_traits<M>::col(it.it), it.r); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.begin_, m.r); }
-    static const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m.end_, m.r); }
-    static const origin_type* origin(const this_type &m) { return m.origin; }
-    static value_type access(const const_col_iterator &it, size_type i)
-    { return it.r * (linalg_traits<M>::access(it.it, i)); }
-  };
-
-  template<typename M, typename S> std::ostream &operator <<
-    (std::ostream &o, const scaled_col_matrix_const_ref<M,S>& m)
-  { gmm::write(o,m); return o; }
-
-
-  template <typename L, typename S, typename R> struct scaled_return__ {
-    typedef abstract_null_type return_type;
-  };
-  template <typename L, typename S> struct scaled_return__<L, S, row_major> 
-  { typedef scaled_row_matrix_const_ref<L,S> return_type; };
-  template <typename L, typename S> struct scaled_return__<L, S, col_major> 
-  { typedef scaled_col_matrix_const_ref<L,S> return_type; };
-  
-
-  template <typename L, typename S, typename LT> struct scaled_return_ {
-    typedef abstract_null_type return_type;
-  };
-  template <typename L, typename S> struct scaled_return_<L, S, abstract_vector> 
-  { typedef scaled_vector_const_ref<L,S> return_type; };
-  template <typename L, typename S> struct scaled_return_<L, S, abstract_matrix> {
-    typedef typename scaled_return__<L, S, 
-      typename principal_orientation_type<typename
-      linalg_traits<L>::sub_orientation>::potype>::return_type return_type;
-  };
-
-  template <typename L, typename S> struct scaled_return {
-    typedef typename scaled_return_<L, S, typename
-      linalg_traits<L>::linalg_type>::return_type return_type;
-  };
-
-  template <typename L, typename S> inline
-  typename scaled_return<L,S>::return_type
-  scaled(const L &v, S x)
-  { return scaled(v, x, typename linalg_traits<L>::linalg_type()); }
-
-  template <typename V, typename S> inline
-  typename scaled_return<V,S>::return_type
-  scaled(const V &v, S x, abstract_vector)
-  { return scaled_vector_const_ref<V,S>(v, x); }
-
-  template <typename M, typename S> inline
-  typename scaled_return<M,S>::return_type
-  scaled(const M &m, S x,abstract_matrix) {
-    return scaled(m, x,  typename principal_orientation_type<typename
-		  linalg_traits<M>::sub_orientation>::potype());
-  }
-
-  template <typename M, typename S> inline
-  typename scaled_return<M,S>::return_type
-  scaled(const M &m, S x, row_major) {
-    return scaled_row_matrix_const_ref<M,S>(m, x);
-  }
-
-  template <typename M, typename S> inline
-  typename scaled_return<M,S>::return_type
-  scaled(const M &m, S x, col_major) {
-    return scaled_col_matrix_const_ref<M,S>(m, x);
-  }
-
-  
-  /* ******************************************************************** */
-  /*	matrix or vector scale                                	          */
-  /* ******************************************************************** */
-
-  template <typename L> inline
-  void scale(L& l, typename linalg_traits<L>::value_type a)
-  { scale(l, a, typename linalg_traits<L>::linalg_type()); }
-
-  template <typename L> inline
-  void scale(const L& l, typename linalg_traits<L>::value_type a)
-  { scale(linalg_const_cast(l), a); }
-
-  template <typename L> inline
-  void scale(L& l, typename linalg_traits<L>::value_type a, abstract_vector) {
-    typename linalg_traits<L>::iterator it = vect_begin(l), ite = vect_end(l);
-    for ( ; it != ite; ++it) *it *= a;
-  }
-
-  template <typename L> 
-  void scale(L& l, typename linalg_traits<L>::value_type a, abstract_matrix) {
-    scale(l, a, typename principal_orientation_type<typename
-	  linalg_traits<L>::sub_orientation>::potype());
-  }
-
-  template <typename L> 
-  void scale(L& l, typename linalg_traits<L>::value_type a, row_major) {
-    typename linalg_traits<L>::row_iterator it = mat_row_begin(l),
-      ite = mat_row_end(l);
-    for ( ; it != ite; ++it) scale(linalg_traits<L>::row(it), a);
-  }
-
-  template <typename L> 
-  void scale(L& l, typename linalg_traits<L>::value_type a, col_major) {
-    typename linalg_traits<L>::col_iterator it = mat_col_begin(l),
-      ite = mat_col_end(l);
-    for ( ; it != ite; ++it) scale(linalg_traits<L>::col(it), a);
-  }
-
-}
-
-#endif //  GMM_SCALED_H__
diff --git a/Contrib/gmm/gmm_solver_Newton.h b/Contrib/gmm/gmm_solver_Newton.h
deleted file mode 100755
index 34c95dd..0000000
--- a/Contrib/gmm/gmm_solver_Newton.h
+++ /dev/null
@@ -1,137 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2006-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_solver_Newton.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @author  Michel Fournie <fournie at mip.ups-tlse.fr>
-   @date January 24, 2006.
-*/
-#ifndef GMM_SOLVERS_NEWTON_H__
-#define GMM_SOLVERS_NEWTON_H__ 
-
-namespace gmm {
-
-#include "gmm_kernel.h"
-
-  /* ***************************************************************** */
-  /*     Line search definition                                        */
-  /* ***************************************************************** */
-
-  struct abstract_newton_line_search {
-    double conv_alpha, conv_r;
-    size_t it, itmax, glob_it;
-    virtual void init_search(double r, size_t git) = 0;
-    virtual double next_try(void) = 0;
-    virtual bool is_converged(double) = 0;
-    virtual double converged_value(void) { return conv_alpha; };
-    virtual double converged_residual(void) { return conv_r; };
-    virtual ~abstract_newton_line_search() {}
-  };
-
-
-  struct simplest_newton_line_search : public abstract_newton_line_search {
-    double alpha, alpha_mult, first_res, alpha_max_ratio, alpha_min;
-    virtual void init_search(double r, size_t git) {
-      glob_it = git;
-      conv_alpha = alpha = double(1); conv_r = first_res = r; it = 0;
-    }
-    virtual double next_try(void)
-    { conv_alpha = alpha; alpha *= alpha_mult; ++it; return conv_alpha; }
-    virtual bool is_converged(double r) {
-      conv_r = r;
-      return ((it <= 1 && r < first_res)
-	      || (r <= first_res * alpha_max_ratio)
-	      || (conv_alpha <= alpha_min)
-	      || it >= itmax);
-    }
-    simplest_newton_line_search
-    (size_t imax = size_t(-1), double a_max_ratio = 6.0/5.0,
-     double a_min = 1.0/1000.0, double a_mult = 3.0/5.0)
-      : alpha_mult(a_mult), alpha_max_ratio(a_max_ratio), alpha_min(a_min)
-      { itmax = imax; }
-  };
-
-  struct default_newton_line_search : public abstract_newton_line_search {
-    double alpha, alpha_mult, first_res, alpha_max_ratio;
-    double alpha_min, prev_res, alpha_max_augment;
-    virtual void init_search(double r, size_t git) {
-      glob_it = git;
-      conv_alpha = alpha = double(1);
-      prev_res = conv_r = first_res = r; it = 0;
-    }
-    virtual double next_try(void)
-    { conv_alpha = alpha; alpha *= alpha_mult; ++it; return conv_alpha; }
-    virtual bool is_converged(double r) {
-      if (glob_it == 0 || (r < first_res / double(2))
-	  || (conv_alpha <= alpha_min && r < first_res * alpha_max_augment)
-	  || it >= itmax)
-	{ conv_r = r; return true; }
-      if (it > 1 && r > prev_res && prev_res < alpha_max_ratio * first_res)
-	return true;
-      prev_res = conv_r = r;
-      return false;
-    }
-    default_newton_line_search
-    (size_t imax = size_t(-1),
-     double a_max_ratio = 5.0/3.0,
-     double a_min = 1.0/1000.0, double a_mult = 3.0/5.0, double a_augm = 2.0)
-      : alpha_mult(a_mult), alpha_max_ratio(a_max_ratio),
-	alpha_min(a_min), alpha_max_augment(a_augm) { itmax = imax; }
-  };
-
-
-  struct systematic_newton_line_search : public abstract_newton_line_search {
-    double alpha, alpha_mult, first_res;
-    double alpha_min, prev_res;
-    bool first;
-    virtual void init_search(double r, size_t git) {
-      glob_it = git;
-      conv_alpha = alpha = double(1);
-      prev_res = conv_r = first_res = r; it = 0; first = true;
-    }
-    virtual double next_try(void)
-    { double a = alpha; alpha *= alpha_mult; ++it; return a; }
-    virtual bool is_converged(double r) {
-      // cout << "a = " << alpha / alpha_mult << " r = " << r << endl;
-      if (r < conv_r || first)
-	{ conv_r = r; conv_alpha = alpha / alpha_mult; first = false; }
-      if ((alpha <= alpha_min*alpha_mult) || it >= itmax) return true;
-      return false;
-    }
-    systematic_newton_line_search
-    (size_t imax = size_t(-1),
-     double a_min = 1.0/10000.0, double a_mult = 3.0/5.0)
-      : alpha_mult(a_mult), alpha_min(a_min)  { itmax = imax; }
-  };
-
-}
-
-
-#endif
diff --git a/Contrib/gmm/gmm_solver_Schwarz_additive.h b/Contrib/gmm/gmm_solver_Schwarz_additive.h
deleted file mode 100755
index 7f4c958..0000000
--- a/Contrib/gmm/gmm_solver_Schwarz_additive.h
+++ /dev/null
@@ -1,746 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_solver_Schwarz_additive.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @author  Michel Fournie <fournie at mip.ups-tlse.fr>
-   @date October 13, 2002.
-*/
-
-#ifndef GMM_SOLVERS_SCHWARZ_ADDITIVE_H__
-#define GMM_SOLVERS_SCHWARZ_ADDITIVE_H__ 
-
-#include "gmm_kernel.h"
-#include "gmm_superlu_interface.h"
-#include "gmm_solver_cg.h"
-#include "gmm_solver_gmres.h"
-#include "gmm_solver_bicgstab.h"
-#include "gmm_solver_qmr.h"
-#include "gmm_solver_Newton.h"
-
-namespace gmm {
-      
-  /* ******************************************************************** */
-  /*		Additive Schwarz interfaced local solvers                 */
-  /* ******************************************************************** */
-
-  struct using_cg {};
-  struct using_gmres {};
-  struct using_bicgstab {};
-  struct using_qmr {};
-
-  template <typename P, typename local_solver, typename Matrix>
-  struct actual_precond {
-    typedef P APrecond;
-    static const APrecond &transform(const P &PP) { return PP; }
-  };
-
-  template <typename Matrix1, typename Precond, typename Vector> 
-  void AS_local_solve(using_cg, const Matrix1 &A, Vector &x, const Vector &b,
-		 const Precond &P, iteration &iter)
-  { cg(A, x, b, P, iter); }
-
-  template <typename Matrix1, typename Precond, typename Vector> 
-  void AS_local_solve(using_gmres, const Matrix1 &A, Vector &x,
-		      const Vector &b, const Precond &P, iteration &iter)
-  { gmres(A, x, b, P, 100, iter); }
-  
-  template <typename Matrix1, typename Precond, typename Vector> 
-  void AS_local_solve(using_bicgstab, const Matrix1 &A, Vector &x,
-		      const Vector &b, const Precond &P, iteration &iter)
-  { bicgstab(A, x, b, P, iter); }
-
-  template <typename Matrix1, typename Precond, typename Vector> 
-  void AS_local_solve(using_qmr, const Matrix1 &A, Vector &x,
-		      const Vector &b, const Precond &P, iteration &iter)
-  { qmr(A, x, b, P, iter); }
-
-#if defined(GMM_USES_SUPERLU)
-  struct using_superlu {};
-
-  template <typename P, typename Matrix>
-  struct actual_precond<P, using_superlu, Matrix> {
-    typedef typename linalg_traits<Matrix>::value_type value_type;
-    typedef SuperLU_factor<value_type> APrecond;
-    template <typename PR>
-    static APrecond transform(const PR &) { return APrecond(); }
-    static const APrecond &transform(const APrecond &PP) { return PP; }
-  };
-
-  template <typename Matrix1, typename Precond, typename Vector> 
-  void AS_local_solve(using_superlu, const Matrix1 &, Vector &x,
-		      const Vector &b, const Precond &P, iteration &iter)
-  { P.solve(x, b); iter.set_iteration(1); }
-#endif
-
-  /* ******************************************************************** */
-  /*		Additive Schwarz Linear system                            */
-  /* ******************************************************************** */
-
-  template <typename Matrix1, typename Matrix2, typename Precond,
-	    typename local_solver>
-  struct add_schwarz_mat{
-    typedef typename linalg_traits<Matrix1>::value_type value_type;
-
-    const Matrix1 *A;
-    const std::vector<Matrix2> *vB;
-    std::vector<Matrix2> vAloc;
-    mutable iteration iter;
-    double residual;
-    mutable size_type itebilan;
-    mutable std::vector<std::vector<value_type> > gi, fi;
-    std::vector<typename actual_precond<Precond, local_solver,
-					Matrix1>::APrecond> precond1;
-
-    void init(const Matrix1 &A_, const std::vector<Matrix2> &vB_,
-	      iteration iter_, const Precond &P, double residual_);
-
-    add_schwarz_mat(void) {}
-    add_schwarz_mat(const Matrix1 &A_, const std::vector<Matrix2> &vB_,
-		iteration iter_, const Precond &P, double residual_)
-    { init(A_, vB_, iter_, P, residual_); }
-  };
-
-  template <typename Matrix1, typename Matrix2, typename Precond,
-	    typename local_solver>
-  void add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver>::init(
-       const Matrix1 &A_, const std::vector<Matrix2> &vB_,
-       iteration iter_, const Precond &P, double residual_) {
-
-    vB = &vB_; A = &A_; iter = iter_;
-    residual = residual_;
-    
-    size_type nb_sub = vB->size();
-    vAloc.resize(nb_sub);
-    gi.resize(nb_sub); fi.resize(nb_sub);
-    precond1.resize(nb_sub);
-    std::fill(precond1.begin(), precond1.end(),
-	      actual_precond<Precond, local_solver, Matrix1>::transform(P));
-    itebilan = 0;
-    
-    if (iter.get_noisy()) cout << "Init pour sub dom ";
-#ifdef GMM_USES_MPI
-    int size,tranche,borne_sup,borne_inf,rank,tag1=11,tag2=12,tag3=13,sizepr = 0;
-    //    int tab[4];
-    double t_ref,t_final;
-    MPI_Status status;
-    t_ref=MPI_Wtime();
-    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-    MPI_Comm_size(MPI_COMM_WORLD, &size);
-    tranche=nb_sub/size;
-    borne_inf=rank*tranche;
-    borne_sup=(rank+1)*tranche;
-    // if (rank==size-1) borne_sup = nb_sub;
-
-    cout << "Nombre de sous domaines " << borne_sup - borne_inf << endl;
-
-    int sizeA = mat_nrows(*A);
-    gmm::csr_matrix<value_type> Acsr(sizeA, sizeA), Acsrtemp(sizeA, sizeA);
-    gmm::copy(gmm::eff_matrix(*A), Acsr);
-    int next = (rank + 1) % size;
-    int previous = (rank + size - 1) % size;
-    //communication of local information on ring pattern
-    //Each process receive  Nproc-1 contributions 
-
-    for (int nproc = 0; nproc < size; ++nproc) {
-       for (size_type i = size_type(borne_inf); i < size_type(borne_sup); ++i) {
-// 	for (size_type i = 0; i < nb_sub/size; ++i) {
-// 	for (size_type i = 0; i < nb_sub; ++i) {
-	// size_type i=(rank+size*(j-1)+nb_sub)%nb_sub;
-
-	cout << "Sous domaines " << i << " : " << mat_ncols((*vB)[i]) << endl;
-#else
-	for (size_type i = 0; i < nb_sub; ++i) {
-#endif
-	  
-	  if (iter.get_noisy()) cout << i << " " << std::flush;
-	  Matrix2 Maux(mat_ncols((*vB)[i]), mat_nrows((*vB)[i]));
-	  
-#ifdef GMM_USES_MPI
-	  Matrix2 Maux2(mat_ncols((*vB)[i]), mat_ncols((*vB)[i]));
-	  if (nproc == 0) {
-	    gmm::resize(vAloc[i], mat_ncols((*vB)[i]), mat_ncols((*vB)[i]));
-	    gmm::clear(vAloc[i]);
-	  }
-	  gmm::mult(gmm::transposed((*vB)[i]), Acsr, Maux);
-	  gmm::mult(Maux, (*vB)[i], Maux2);
-	  gmm::add(Maux2, vAloc[i]);
-#else
-	  gmm::resize(vAloc[i], mat_ncols((*vB)[i]), mat_ncols((*vB)[i]));
-	  gmm::mult(gmm::transposed((*vB)[i]), *A, Maux);
-	  gmm::mult(Maux, (*vB)[i], vAloc[i]);
-#endif
-
-#ifdef GMM_USES_MPI
-	  if (nproc == size - 1 ) {
-#endif
-	    precond1[i].build_with(vAloc[i]);
-	    gmm::resize(fi[i], mat_ncols((*vB)[i]));
-	    gmm::resize(gi[i], mat_ncols((*vB)[i]));
-#ifdef GMM_USES_MPI
-	  }
-#else
-	}
-#endif
-#ifdef GMM_USES_MPI
-     }
-      if (nproc != size - 1) {
-	MPI_Sendrecv(Acsr.jc, sizeA+1, MPI_INT, next, tag2,
-		     Acsrtemp.jc, sizeA+1,MPI_INT,previous,tag2,
-		     MPI_COMM_WORLD,&status);
-	if (Acsrtemp.jc[sizeA] > size_type(sizepr)) {
-	  sizepr = Acsrtemp.jc[sizeA];
-	  delete[] Acsrtemp.pr; delete[] Acsrtemp.ir;
-	  Acsrtemp.pr = new value_type[sizepr];
-	  Acsrtemp.ir = new unsigned int[sizepr];
-	}
-	MPI_Sendrecv(Acsr.ir, Acsr.jc[sizeA], MPI_INT, next, tag1,
-		     Acsrtemp.ir, Acsrtemp.jc[sizeA],MPI_INT,previous,tag1,
-		     MPI_COMM_WORLD,&status);
-	
-	MPI_Sendrecv(Acsr.pr, Acsr.jc[sizeA], mpi_type(value_type()), next, tag3, 
-		     Acsrtemp.pr, Acsrtemp.jc[sizeA],mpi_type(value_type()),previous,tag3,
-		     MPI_COMM_WORLD,&status);
-	gmm::copy(Acsrtemp, Acsr);
-      }
-    }
-      t_final=MPI_Wtime();
-    cout<<"temps boucle precond "<< t_final-t_ref<<endl;
-#endif
-    if (iter.get_noisy()) cout << "\n";
-  }
-  
-  template <typename Matrix1, typename Matrix2, typename Precond,
-	    typename Vector2, typename Vector3, typename local_solver>
-  void mult(const add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver> &M,
-	    const Vector2 &p, Vector3 &q) {
-    size_type itebilan = 0;
-#ifdef GMM_USES_MPI
-    static double tmult_tot = 0.0;
-    double t_ref = MPI_Wtime();
-#endif
-    // cout << "tmult AS begin " << endl;
-    mult(*(M.A), p, q);
-#ifdef GMM_USES_MPI
-    tmult_tot += MPI_Wtime()-t_ref;
-    cout << "tmult_tot = " << tmult_tot << endl;
-#endif
-    std::vector<double> qbis(gmm::vect_size(q));
-    std::vector<double> qter(gmm::vect_size(q));
-#ifdef GMM_USES_MPI
-    //    MPI_Status status;
-    //    MPI_Request request,request1;
-    //    int tag=111;
-    int size,tranche,borne_sup,borne_inf,rank;
-    size_type nb_sub=M.fi.size();
-    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-    MPI_Comm_size(MPI_COMM_WORLD, &size);
-    tranche=nb_sub/size;
-    borne_inf=rank*tranche;
-    borne_sup=(rank+1)*tranche;
-    // if (rank==size-1) borne_sup=nb_sub;
-    //    int next = (rank + 1) % size;
-    //    int previous = (rank + size - 1) % size;
-    t_ref = MPI_Wtime();
-     for (size_type i = size_type(borne_inf); i < size_type(borne_sup); ++i)
-//        for (size_type i = 0; i < nb_sub/size; ++i)
-      // for (size_type j = 0; j < nb_sub; ++j)
-#else
-    for (size_type i = 0; i < M.fi.size(); ++i)
-#endif
-      {
-#ifdef GMM_USES_MPI
-	// size_type i=j; // (rank+size*(j-1)+nb_sub)%nb_sub;
-#endif
-	gmm::mult(gmm::transposed((*(M.vB))[i]), q, M.fi[i]);
-       M.iter.init();
-       AS_local_solve(local_solver(), (M.vAloc)[i], (M.gi)[i],
-		      (M.fi)[i],(M.precond1)[i],M.iter);
-       itebilan = std::max(itebilan, M.iter.get_iteration());
-       }
-
-#ifdef GMM_USES_MPI
-    cout << "First  AS loop time " <<  MPI_Wtime() - t_ref << endl;
-#endif
-
-    gmm::clear(q);
-#ifdef GMM_USES_MPI
-    t_ref = MPI_Wtime();
-    // for (size_type j = 0; j < nb_sub; ++j)
-    for (size_type i = size_type(borne_inf); i < size_type(borne_sup); ++i)
-
-#else
-      for (size_type i = 0; i < M.gi.size(); ++i)
-#endif
-	{
-
-#ifdef GMM_USES_MPI
-	  // size_type i=j; // (rank+size*(j-1)+nb_sub)%nb_sub;
-// 	  gmm::mult((*(M.vB))[i], M.gi[i], qbis,qbis);
-	  gmm::mult((*(M.vB))[i], M.gi[i], qter);
-	  add(qter,qbis,qbis);
-#else
-	  gmm::mult((*(M.vB))[i], M.gi[i], q, q);
-#endif
-	}
-#ifdef GMM_USES_MPI
-     //WARNING this add only if you use the ring pattern below
-  // need to do this below if using a n explicit ring pattern communication
-
-//      add(qbis,q,q);
-    cout << "Second AS loop time " <<  MPI_Wtime() - t_ref << endl;
-#endif
-
-
-#ifdef GMM_USES_MPI
-    //    int tag1=11;
-    static double t_tot = 0.0;
-    double t_final;
-    t_ref=MPI_Wtime();
-//     int next = (rank + 1) % size;
-//     int previous = (rank + size - 1) % size;
-    //communication of local information on ring pattern
-    //Each process receive  Nproc-1 contributions 
-
-//     if (size > 1) {
-//     for (int nproc = 0; nproc < size-1; ++nproc) 
-//       {
-
-// 	MPI_Sendrecv(&(qbis[0]), gmm::vect_size(q), MPI_DOUBLE, next, tag1,
-// 		   &(qter[0]), gmm::vect_size(q),MPI_DOUBLE,previous,tag1,
-// 		   MPI_COMM_WORLD,&status);
-// 	gmm::copy(qter, qbis);
-// 	add(qbis,q,q);
-//       }
-//     }
-    MPI_Allreduce(&(qbis[0]), &(q[0]),gmm::vect_size(q), MPI_DOUBLE,
-		  MPI_SUM,MPI_COMM_WORLD);
-    t_final=MPI_Wtime();
-    t_tot += t_final-t_ref;
-     cout<<"["<< rank<<"] temps reduce Resol "<< t_final-t_ref << " t_tot = " << t_tot << endl;
-#endif 
-
-    if (M.iter.get_noisy() > 0) cout << "itebloc = " << itebilan << endl;
-    M.itebilan += itebilan;
-    M.iter.set_resmax((M.iter.get_resmax() + M.residual) * 0.5);
-  }
-
-  template <typename Matrix1, typename Matrix2, typename Precond,
-	    typename Vector2, typename Vector3, typename local_solver>
-  void mult(const add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver> &M,
-	    const Vector2 &p, const Vector3 &q) {
-    mult(M, p, const_cast<Vector3 &>(q));
-  }
-
-  template <typename Matrix1, typename Matrix2, typename Precond,
-	    typename Vector2, typename Vector3, typename Vector4,
-	    typename local_solver>
-  void mult(const add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver> &M,
-	    const Vector2 &p, const Vector3 &p2, Vector4 &q)
-  { mult(M, p, q); add(p2, q); }
-
-  template <typename Matrix1, typename Matrix2, typename Precond,
-	    typename Vector2, typename Vector3, typename Vector4,
-	    typename local_solver>
-  void mult(const add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver> &M,
-	    const Vector2 &p, const Vector3 &p2, const Vector4 &q)
-  { mult(M, p, const_cast<Vector4 &>(q)); add(p2, q); }
-
-  /* ******************************************************************** */
-  /*		Additive Schwarz interfaced global solvers                */
-  /* ******************************************************************** */
-
-  template <typename ASM_type, typename Vect>
-  void AS_global_solve(using_cg, const ASM_type &ASM, Vect &x,
-		       const Vect &b, iteration &iter)
-  { cg(ASM, x, b, *(ASM.A), identity_matrix(), iter); }
-
-  template <typename ASM_type, typename Vect>
-  void AS_global_solve(using_gmres, const ASM_type &ASM, Vect &x,
-		       const Vect &b, iteration &iter)
-  { gmres(ASM, x, b, identity_matrix(), 100, iter); }
-
-  template <typename ASM_type, typename Vect>
-  void AS_global_solve(using_bicgstab, const ASM_type &ASM, Vect &x,
-		       const Vect &b, iteration &iter)
-  { bicgstab(ASM, x, b, identity_matrix(), iter); }
-
-  template <typename ASM_type, typename Vect>
-  void AS_global_solve(using_qmr,const ASM_type &ASM, Vect &x,
-		       const Vect &b, iteration &iter)
-  { qmr(ASM, x, b, identity_matrix(), iter); }
-
-#if defined(GMM_USES_SUPERLU)
-  template <typename ASM_type, typename Vect>
-  void AS_global_solve(using_superlu, const ASM_type &, Vect &,
-		       const Vect &, iteration &) {
-    GMM_ASSERT1(false, "You cannot use SuperLU as "
-		"global solver in additive Schwarz meethod");
-  }
-#endif
-  
-  /* ******************************************************************** */
-  /*	            Linear Additive Schwarz method                        */
-  /* ******************************************************************** */
-  /* ref : Domain decomposition algorithms for the p-version finite       */
-  /*       element method for elliptic problems, Luca F. Pavarino,        */
-  /*       PhD thesis, Courant Institute of Mathematical Sciences, 1992.  */
-  /* ******************************************************************** */
-
-  /** Function to call if the ASM matrix is precomputed for successive solve
-   * with the same system.
-   */
-  template <typename Matrix1, typename Matrix2,
-	    typename Vector2, typename Vector3, typename Precond,
-	    typename local_solver, typename global_solver>
-  void additive_schwarz(
-    add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver> &ASM, Vector3 &u,
-    const Vector2 &f, iteration &iter, const global_solver&) {
-
-    typedef typename linalg_traits<Matrix1>::value_type value_type;
-
-    size_type nb_sub = ASM.vB->size(), nb_dof = gmm::vect_size(f);
-    ASM.itebilan = 0;
-    std::vector<value_type> g(nb_dof);
-    std::vector<value_type> gbis(nb_dof);
-#ifdef GMM_USES_MPI
-    double t_init=MPI_Wtime();
-    int size,tranche,borne_sup,borne_inf,rank;
-    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-    MPI_Comm_size(MPI_COMM_WORLD, &size);
-    tranche=nb_sub/size;
-    borne_inf=rank*tranche;
-    borne_sup=(rank+1)*tranche;
-    // if (rank==size-1) borne_sup=nb_sub*size;
-    for (size_type i = size_type(borne_inf); i < size_type(borne_sup); ++i)
-//     for (size_type i = 0; i < nb_sub/size; ++i)
-      // for (size_type j = 0; j < nb_sub; ++j)
-      // for (size_type i = rank; i < nb_sub; i+=size)
-#else
-    for (size_type i = 0; i < nb_sub; ++i)
-#endif
-    {
-
-#ifdef GMM_USES_MPI
-      // size_type i=j; // (rank+size*(j-1)+nb_sub)%nb_sub;
-#endif
-      gmm::mult(gmm::transposed((*(ASM.vB))[i]), f, ASM.fi[i]);
-      ASM.iter.init();
-      AS_local_solve(local_solver(), ASM.vAloc[i], ASM.gi[i], ASM.fi[i],
-		     ASM.precond1[i], ASM.iter);
-      ASM.itebilan = std::max(ASM.itebilan, ASM.iter.get_iteration());
-#ifdef GMM_USES_MPI
-    gmm::mult((*(ASM.vB))[i], ASM.gi[i], gbis,gbis);
-#else   
-    gmm::mult((*(ASM.vB))[i], ASM.gi[i], g, g);
-#endif
-    }
-#ifdef GMM_USES_MPI
-    cout<<"temps boucle init "<< MPI_Wtime()-t_init<<endl;
-    double t_ref,t_final;
-    t_ref=MPI_Wtime();
-    MPI_Allreduce(&(gbis[0]), &(g[0]),gmm::vect_size(g), MPI_DOUBLE,
-		  MPI_SUM,MPI_COMM_WORLD);
-    t_final=MPI_Wtime();
-    cout<<"temps reduce init "<< t_final-t_ref<<endl;
-#endif
-#ifdef GMM_USES_MPI
-    t_ref=MPI_Wtime();
-    cout<<"begin global AS"<<endl;
-#endif
-    AS_global_solve(global_solver(), ASM, u, g, iter);
-#ifdef GMM_USES_MPI
-    t_final=MPI_Wtime();
-    cout<<"temps AS Global Solve "<< t_final-t_ref<<endl;
-#endif
-    if (iter.get_noisy())
-      cout << "Total number of internal iterations : " << ASM.itebilan << endl;
-  }
-
-  /** Global function. Compute the ASM matrix and call the previous function.
-   *  The ASM matrix represent the preconditionned linear system.
-   */
-  template <typename Matrix1, typename Matrix2,
-	    typename Vector2, typename Vector3, typename Precond,
-	    typename local_solver, typename global_solver>
-  void additive_schwarz(const Matrix1 &A, Vector3 &u,
-				  const Vector2 &f, const Precond &P,
-				  const std::vector<Matrix2> &vB,
-				  iteration &iter, local_solver,
-				  global_solver) {
-    iter.set_rhsnorm(vect_norm2(f));
-    if (iter.get_rhsnorm() == 0.0) { gmm::clear(u); return; }
-    iteration iter2 = iter; iter2.reduce_noisy();
-    iter2.set_maxiter(size_type(-1));
-    add_schwarz_mat<Matrix1, Matrix2, Precond, local_solver>
-      ASM(A, vB, iter2, P, iter.get_resmax());
-    additive_schwarz(ASM, u, f, iter, global_solver());
-  }
-
-  /* ******************************************************************** */
-  /*		Sequential Non-Linear Additive Schwarz method             */
-  /* ******************************************************************** */
-  /* ref : Nonlinearly Preconditionned Inexact Newton Algorithms,         */
-  /*       Xiao-Chuan Cai, David E. Keyes,                                */
-  /*       SIAM J. Sci. Comp. 24: p183-200.  l                             */
-  /* ******************************************************************** */
-
-  template <typename Matrixt, typename MatrixBi> 
-  class NewtonAS_struct {
-    
-  public :
-    typedef Matrixt tangent_matrix_type;
-    typedef MatrixBi B_matrix_type;
-    typedef typename linalg_traits<Matrixt>::value_type value_type;
-    typedef std::vector<value_type> Vector;
-    
-    virtual size_type size(void) = 0;
-    virtual const std::vector<MatrixBi> &get_vB() = 0;
-    
-    virtual void compute_F(Vector &f, Vector &x) = 0;
-    virtual void compute_tangent_matrix(Matrixt &M, Vector &x) = 0;
-    // compute Bi^T grad(F(X)) Bi
-    virtual void compute_sub_tangent_matrix(Matrixt &Mloc, Vector &x,
-					    size_type i) = 0;
-    // compute Bi^T F(X)
-    virtual void compute_sub_F(Vector &fi, Vector &x, size_type i) = 0;
-
-    virtual ~NewtonAS_struct() {}
-  };
-
-  template <typename Matrixt, typename MatrixBi> 
-  struct AS_exact_gradient {
-    const std::vector<MatrixBi> &vB;
-    std::vector<Matrixt> vM;
-    std::vector<Matrixt> vMloc;
-
-    void init(void) {
-      for (size_type i = 0; i < vB.size(); ++i) {
-	Matrixt aux(gmm::mat_ncols(vB[i]), gmm::mat_ncols(vM[i]));
-	gmm::resize(vMloc[i], gmm::mat_ncols(vB[i]), gmm::mat_ncols(vB[i]));
-	gmm::mult(gmm::transposed(vB[i]), vM[i], aux);
-	gmm::mult(aux, vB[i], vMloc[i]);
-      }
-    }
-    AS_exact_gradient(const std::vector<MatrixBi> &vB_) : vB(vB_) {
-      vM.resize(vB.size()); vMloc.resize(vB.size());
-      for (size_type i = 0; i < vB.size(); ++i) {
-	gmm::resize(vM[i], gmm::mat_nrows(vB[i]), gmm::mat_nrows(vB[i]));
-      }
-    }
-  };
-
-  template <typename Matrixt, typename MatrixBi,
-	    typename Vector2, typename Vector3>
-  void mult(const AS_exact_gradient<Matrixt, MatrixBi> &M,
-	    const Vector2 &p, Vector3 &q) {
-    gmm::clear(q);
-    typedef typename gmm::linalg_traits<Vector3>::value_type T;
-    std::vector<T> v(gmm::vect_size(p)), w, x;
-    for (size_type i = 0; i < M.vB.size(); ++i) {
-      w.resize(gmm::mat_ncols(M.vB[i]));
-      x.resize(gmm::mat_ncols(M.vB[i]));
-      gmm::mult(M.vM[i], p, v);
-      gmm::mult(gmm::transposed(M.vB[i]), v, w);
-      double rcond;
-      SuperLU_solve(M.vMloc[i], x, w, rcond);
-      // gmm::iteration iter(1E-10, 0, 100000);
-      //gmm::gmres(M.vMloc[i], x, w, gmm::identity_matrix(), 50, iter);
-      gmm::mult_add(M.vB[i], x, q);
-    }
-  }
-
-  template <typename Matrixt, typename MatrixBi,
-	    typename Vector2, typename Vector3>
-  void mult(const AS_exact_gradient<Matrixt, MatrixBi> &M,
-	    const Vector2 &p, const Vector3 &q) {
-    mult(M, p, const_cast<Vector3 &>(q));
-  }
-
-  template <typename Matrixt, typename MatrixBi,
-	    typename Vector2, typename Vector3, typename Vector4>
-  void mult(const AS_exact_gradient<Matrixt, MatrixBi> &M,
-	    const Vector2 &p, const Vector3 &p2, Vector4 &q)
-  { mult(M, p, q); add(p2, q); }
-
-  template <typename Matrixt, typename MatrixBi,
-	    typename Vector2, typename Vector3, typename Vector4>
-  void mult(const AS_exact_gradient<Matrixt, MatrixBi> &M,
-	    const Vector2 &p, const Vector3 &p2, const Vector4 &q)
-  { mult(M, p, const_cast<Vector4 &>(q)); add(p2, q); }
-  
-
-  
-  template <typename Matrixt, typename MatrixBi, typename Vector,
-	    typename Precond, typename local_solver, typename global_solver>
-  void Newton_additive_Schwarz(NewtonAS_struct<Matrixt, MatrixBi> &NS,
-			       const Vector &u_,
-			       iteration &iter, const Precond &P,
-			       local_solver, global_solver) {
-    Vector &u = const_cast<Vector &>(u_);
-    typedef typename linalg_traits<Vector>::value_type value_type;
-    typedef typename number_traits<value_type>::magnitude_type mtype;
-    typedef actual_precond<Precond, local_solver, Matrixt> chgt_precond;
-    
-    double residual = iter.get_resmax();
-
-    default_newton_line_search internal_ls;
-    default_newton_line_search external_ls(size_t(-1), 5.0/3, 1.0/1000, 3.0/5);
-
-    // systematic_newton_line_search external_ls(size_t(-1), 1.0/10000.0, 3.0/100.0);
-
-    typename chgt_precond::APrecond PP = chgt_precond::transform(P);
-    iter.set_rhsnorm(mtype(1));
-    iteration iternc(iter);
-    iternc.reduce_noisy(); iternc.set_maxiter(size_type(-1));
-    iteration iter2(iternc);
-    iteration iter3(iter2); iter3.reduce_noisy();
-    iteration iter4(iter3);
-    iternc.set_name("Local Newton");
-    iter2.set_name("Linear System for Global Newton");
-    iternc.set_resmax(residual/100.0);
-    iter3.set_resmax(residual/10000.0);
-    iter2.set_resmax(residual/1000.0);
-    iter4.set_resmax(residual/1000.0);
-    std::vector<value_type> rhs(NS.size()), x(NS.size()), d(NS.size());
-    std::vector<value_type> xi, xii, fi, di;
-
-    std::vector< std::vector<value_type> > vx(NS.get_vB().size());
-    for (size_type i = 0; i < NS.get_vB().size(); ++i) // for exact gradient
-      vx[i].resize(NS.size()); // for exact gradient
-
-    Matrixt Mloc, M(NS.size(), NS.size());
-    NS.compute_F(rhs, u);
-    mtype act_res=gmm::vect_norm2(rhs), act_res_new(0), precond_res = act_res;
-    mtype alpha;
-    
-    while(!iter.finished(std::min(act_res, precond_res))) {
-      for (int SOR_step = 0;  SOR_step >= 0; --SOR_step) {
-	gmm::clear(rhs);
-	for (size_type isd = 0; isd < NS.get_vB().size(); ++isd) {
-	  const MatrixBi &Bi = (NS.get_vB())[isd];
-	  size_type si = mat_ncols(Bi);
-	  gmm::resize(Mloc, si, si);
-	  xi.resize(si); xii.resize(si); fi.resize(si); di.resize(si);
-	  
-	  iternc.init();
-	  iternc.set_maxiter(30); // ?
-	  if (iternc.get_noisy())
-	    cout << "Non-linear local problem " << isd << endl;
-	  gmm::clear(xi);
-	  gmm::copy(u, x);
-	  NS.compute_sub_F(fi, x, isd); gmm::scale(fi, value_type(-1));
-	  mtype r = gmm::vect_norm2(fi), r_t(r);
-	  if (r > value_type(0)) {
-	    iternc.set_rhsnorm(std::max(r, mtype(1)));
-	    while(!iternc.finished(r)) {
-	      NS.compute_sub_tangent_matrix(Mloc, x, isd);
-
-	      PP.build_with(Mloc);
-	      iter3.init();
-	      AS_local_solve(local_solver(), Mloc, di, fi, PP, iter3);
-	      
-	      internal_ls.init_search(r, iternc.get_iteration());
-	      do {
-		alpha = internal_ls.next_try();
-		gmm::add(xi, gmm::scaled(di, -alpha), xii);
-		gmm::mult(Bi, gmm::scaled(xii, -1.0), u, x);
-		NS.compute_sub_F(fi, x, isd); gmm::scale(fi, value_type(-1));
-		r_t = gmm::vect_norm2(fi);
-	      } while (!internal_ls.is_converged(r_t));
-	      
-	      if (alpha != internal_ls.converged_value()) {
-		alpha = internal_ls.converged_value();
-		gmm::add(xi, gmm::scaled(di, -alpha), xii);
-		gmm::mult(Bi, gmm::scaled(xii, -1.0), u, x);
-		NS.compute_sub_F(fi, x, isd); gmm::scale(fi, value_type(-1));
-		r_t = gmm::vect_norm2(fi);
-	      }
-	      gmm::copy(x, vx[isd]); // for exact gradient
-
-	      if (iternc.get_noisy()) cout << "(step=" << alpha << ")\t";
-	      ++iternc; r = r_t; gmm::copy(xii, xi); 
-	    }
-	    if (SOR_step) gmm::mult(Bi, gmm::scaled(xii, -1.0), u, u);
-	    gmm::mult(Bi, gmm::scaled(xii, -1.0), rhs, rhs);
-	  }
-	}
-	precond_res = gmm::vect_norm2(rhs);
-	if (SOR_step) cout << "SOR step residual = " << precond_res << endl;
-	if (precond_res < residual) break;
-	cout << "Precond residual = " << precond_res << endl;
-      }
-
-      iter2.init();
-      // solving linear system for the global Newton method
-      if (0) {
-	NS.compute_tangent_matrix(M, u);
-	add_schwarz_mat<Matrixt, MatrixBi, Precond, local_solver>
-	  ASM(M, NS.get_vB(), iter4, P, iter.get_resmax());
-	AS_global_solve(global_solver(), ASM, d, rhs, iter2);
-      }
-      else {  // for exact gradient
-	AS_exact_gradient<Matrixt, MatrixBi> eg(NS.get_vB());
-	for (size_type i = 0; i < NS.get_vB().size(); ++i) {
-	  NS.compute_tangent_matrix(eg.vM[i], vx[i]);
-	}
-	eg.init();
-	gmres(eg, d, rhs, gmm::identity_matrix(), 50, iter2);
-      }
-
-      //      gmm::add(gmm::scaled(rhs, 0.1), u); ++iter;
-      external_ls.init_search(act_res, iter.get_iteration());
-      do {
-	alpha = external_ls.next_try();
-	gmm::add(gmm::scaled(d, alpha), u, x);
-	NS.compute_F(rhs, x);
-	act_res_new = gmm::vect_norm2(rhs);
-      } while (!external_ls.is_converged(act_res_new));
-      
-      if (alpha != external_ls.converged_value()) {
-	alpha = external_ls.converged_value();
-	gmm::add(gmm::scaled(d, alpha), u, x);
-	NS.compute_F(rhs, x);
-	act_res_new = gmm::vect_norm2(rhs);
-      }
-
-      if (iter.get_noisy() > 1) cout << endl;
-      act_res = act_res_new; 
-      if (iter.get_noisy()) cout << "(step=" << alpha << ")\t unprecond res = " << act_res << " ";
-      
-      
-      ++iter; gmm::copy(x, u);
-    }
-  }
-
-}
-
-
-#endif //  GMM_SOLVERS_SCHWARZ_ADDITIVE_H__
diff --git a/Contrib/gmm/gmm_solver_bfgs.h b/Contrib/gmm/gmm_solver_bfgs.h
deleted file mode 100755
index 297b802..0000000
--- a/Contrib/gmm/gmm_solver_bfgs.h
+++ /dev/null
@@ -1,207 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2004-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_solver_bfgs.h 
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 14 2004.
-   @brief Implements BFGS (Broyden, Fletcher, Goldfarb, Shanno) algorithm.
- */
-#ifndef GMM_BFGS_H
-#define GMM_BFGS_H
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-
-namespace gmm {
-
-  // BFGS algorithm (Broyden, Fletcher, Goldfarb, Shanno)
-  // Quasi Newton method for optimization problems.
-  // with Wolfe Line search.
-
-
-  // delta[k] = x[k+1] - x[k]
-  // gamma[k] = grad f(x[k+1]) - grad f(x[k])
-  // H[0] = I
-  // BFGS : zeta[k] = delta[k] - H[k] gamma[k]
-  // DFP  : zeta[k] = H[k] gamma[k]
-  // tau[k] = gamma[k]^T zeta[k]
-  // rho[k] = 1 / gamma[k]^T delta[k]
-  // BFGS : H[k+1] = H[k] + rho[k](zeta[k] delta[k]^T + delta[k] zeta[k]^T)
-  //                 - rho[k]^2 tau[k] delta[k] delta[k]^T
-  // DFP  : H[k+1] = H[k] + rho[k] delta[k] delta[k]^T 
-  //                 - (1/tau[k])zeta[k] zeta[k]^T 
-
-  // Object representing the inverse of the Hessian
-  template <typename VECTOR> struct bfgs_invhessian {
-    
-    typedef typename linalg_traits<VECTOR>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    std::vector<VECTOR> delta, gamma, zeta;
-    std::vector<T> tau, rho;
-    int version;
-
-    template<typename VEC1, typename VEC2> void hmult(const VEC1 &X, VEC2 &Y) {
-      copy(X, Y);
-      for (size_type k = 0 ; k < delta.size(); ++k) {
-	T xdelta = vect_sp(X, delta[k]), xzeta = vect_sp(X, zeta[k]);
-	switch (version) {
-	case 0 : // BFGS
-	  add(scaled(zeta[k], rho[k]*xdelta), Y);
-	  add(scaled(delta[k], rho[k]*(xzeta-rho[k]*tau[k]*xdelta)), Y);
-	  break;
-	case 1 : // DFP
-	  add(scaled(delta[k], rho[k]*xdelta), Y);
-	  add(scaled(zeta[k], -xzeta/tau[k]), Y);
-	  break;
-	}
-      }
-    }
-    
-    void restart(void) {
-      delta.resize(0); gamma.resize(0); zeta.resize(0); 
-      tau.resize(0); rho.resize(0);
-    }
-    
-    template<typename VECT1, typename VECT2>
-    void update(const VECT1 &deltak, const VECT2 &gammak) {
-      size_type N = vect_size(deltak), k = delta.size();
-      VECTOR Y(N);
-      hmult(gammak, Y);
-      delta.resize(k+1); gamma.resize(k+1); zeta.resize(k+1);
-      tau.resize(k+1); rho.resize(k+1);
-      resize(delta[k], N); resize(gamma[k], N); resize(zeta[k], N); 
-      gmm::copy(deltak, delta[k]);
-      gmm::copy(gammak, gamma[k]);
-      rho[k] = R(1) / vect_sp(deltak, gammak);
-      if (version == 0)
-	add(delta[k], scaled(Y, -1), zeta[k]);
-      else
-	gmm::copy(Y, zeta[k]);
-      tau[k] = vect_sp(gammak,  zeta[k]);
-    }
-    
-    bfgs_invhessian(int v = 0) { version = v; }
-  };
-
-
-  template <typename FUNCTION, typename DERIVATIVE, typename VECTOR> 
-  void bfgs(FUNCTION f, DERIVATIVE grad, VECTOR &x,
-	    int restart, iteration& iter, int version = 0,
-	    float lambda_init=0.001, float print_norm=1.0) {
-
-    typedef typename linalg_traits<VECTOR>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    
-    bfgs_invhessian<VECTOR> invhessian(version);
-    VECTOR r(vect_size(x)), d(vect_size(x)), y(vect_size(x)), r2(vect_size(x));
-    grad(x, r);
-    R lambda = lambda_init, valx = f(x), valy;
-    int nb_restart(0);
-    
-    if (iter.get_noisy() >= 1) cout << "value " << valx / print_norm << " ";
-    while (! iter.finished_vect(r)) {
-
-      invhessian.hmult(r, d); gmm::scale(d, T(-1));
-      
-      // Wolfe Line search
-      R derivative = gmm::vect_sp(r, d);    
-      R lambda_min(0), lambda_max(0), m1 = 0.27, m2 = 0.57;
-      bool unbounded = true, blocked = false, grad_computed = false;
-      
-      for(;;) {
-	add(x, scaled(d, lambda), y);
-	valy = f(y);
-	if (iter.get_noisy() >= 2) {
-	  cout.precision(15);
-	  cout << "Wolfe line search, lambda = " << lambda 
- 	       << " value = " << valy /print_norm << endl;
-// 	       << " derivative = " << derivative
-// 	       << " lambda min = " << lambda_min << " lambda max = "
-// 	       << lambda_max << endl; getchar();
-	}
-	if (valy <= valx + m1 * lambda * derivative) {
-	  grad(y, r2); grad_computed = true;
-	  T derivative2 = gmm::vect_sp(r2, d);
-	  if (derivative2 >= m2*derivative) break;
-	  lambda_min = lambda;
-	}
-	else {
-	  lambda_max = lambda;
-	  unbounded = false;
-	}
-	if (unbounded) lambda *= R(10);
-	else  lambda = (lambda_max + lambda_min) / R(2);
-	if (lambda == lambda_max || lambda == lambda_min) break;
-	// valy <= R(2)*valx replaced by
-	// valy <= valx + gmm::abs(derivative)*lambda_init
-	// for compatibility with negative values (08.24.07).
-	if (valy <= valx + R(2)*gmm::abs(derivative)*lambda &&
-	    (lambda < R(lambda_init*1E-8) ||
-	     (!unbounded && lambda_max-lambda_min < R(lambda_init*1E-8))))
-	{ blocked = true; lambda = lambda_init; break; }
-      }
-
-      // Rank two update
-      ++iter;
-      if (!grad_computed) grad(y, r2);
-      gmm::add(scaled(r2, -1), r);
-      if (iter.get_iteration() % restart == 0 || blocked) { 
-	if (iter.get_noisy() >= 1) cout << "Restart\n";
-	invhessian.restart();
-	if (++nb_restart > 10) {
-	  if (iter.get_noisy() >= 1) cout << "BFGS is blocked, exiting\n";
-	  return;
-	}
-      }
-      else {
-	invhessian.update(gmm::scaled(d,lambda), gmm::scaled(r,-1));
-	nb_restart = 0;
-      }
-      copy(r2, r); copy(y, x); valx = valy;
-      if (iter.get_noisy() >= 1)
-	cout << "BFGS value " << valx/print_norm << "\t";
-    }
-
-  }
-
-
-  template <typename FUNCTION, typename DERIVATIVE, typename VECTOR> 
-  inline void dfp(FUNCTION f, DERIVATIVE grad, VECTOR &x,
-	    int restart, iteration& iter, int version = 1) {
-    bfgs(f, grad, x, restart, iter, version);
-
-  }
-
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_solver_bicgstab.h b/Contrib/gmm/gmm_solver_bicgstab.h
deleted file mode 100755
index 0fa6ab8..0000000
--- a/Contrib/gmm/gmm_solver_bicgstab.h
+++ /dev/null
@@ -1,160 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of bicgstab.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-/**@file gmm_solver_bicgstab.h
-   @author Andrew Lumsdaine <lums at osl.iu.edu>
-   @author Lie-Quan Lee <llee at osl.iu.edu>
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief BiCGStab iterative solver.
-*/
-
-#ifndef GMM_SOLVER_BICGSTAB_H__
-#define GMM_SOLVER_BICGSTAB_H__
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-
-namespace gmm {
-
-  /* ******************************************************************** */
-  /*		BiConjugate Gradient Stabilized               		  */
-  /* (preconditionned, with parametrable scalar product)        	  */
-  /* ******************************************************************** */
-
-  template <typename Matrix, typename Vector, typename VectorB,
-	    typename Preconditioner>
-  void bicgstab(const Matrix& A, Vector& x, const VectorB& b,
-	       const Preconditioner& M, iteration &iter) {
-
-    typedef typename linalg_traits<Vector>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    typedef typename temporary_dense_vector<Vector>::vector_type temp_vector;
-    
-    T rho_1, rho_2(0), alpha(0), beta, omega(0);
-    temp_vector p(vect_size(x)), phat(vect_size(x)), s(vect_size(x)),
-      shat(vect_size(x)), 
-      t(vect_size(x)), v(vect_size(x)), r(vect_size(x)), rtilde(vect_size(x));
-    
-    gmm::mult(A, gmm::scaled(x, -T(1)), b, r);	  
-    gmm::copy(r, rtilde);
-    R norm_r = gmm::vect_norm2(r);
-    iter.set_rhsnorm(gmm::vect_norm2(b));
-
-    if (iter.get_rhsnorm() == 0.0) { clear(x); return; }
-    
-    while (!iter.finished(norm_r)) {
-      
-      rho_1 = gmm::vect_sp(rtilde, r);
-      if (rho_1 == T(0)) {
-	if (iter.get_maxiter() == size_type(-1)) 
-	  { GMM_ASSERT1(false, "Bicgstab failed to converge"); }
-	else { GMM_WARNING1("Bicgstab failed to converge"); return; }
-      }
-      
-      if (iter.first())
-	gmm::copy(r, p);
-      else {
-	if (omega == T(0)) {
-	  if (iter.get_maxiter() == size_type(-1))
-	    { GMM_ASSERT1(false, "Bicgstab failed to converge"); }
-	  else { GMM_WARNING1("Bicgstab failed to converge"); return; }
-	}
-	
-	beta = (rho_1 / rho_2) * (alpha / omega);
-	
-	gmm::add(gmm::scaled(v, -omega), p);
-	gmm::add(r, gmm::scaled(p, beta), p);      
-      }
-      gmm::mult(M, p, phat);
-      gmm::mult(A, phat, v);	
-      alpha = rho_1 / gmm::vect_sp(v, rtilde);
-      gmm::add(r, gmm::scaled(v, -alpha), s);
-      
-      if (iter.finished_vect(s)) 
-	{ gmm::add(gmm::scaled(phat, alpha), x); break; }
-      
-      gmm::mult(M, s, shat);	
-      gmm::mult(A, shat, t);
-      omega = gmm::vect_sp(t, s) / gmm::vect_norm2_sqr(t);
-      
-      gmm::add(gmm::scaled(phat, alpha), x); 
-      gmm::add(gmm::scaled(shat, omega), x);
-      gmm::add(s, gmm::scaled(t, -omega), r); 
-      norm_r = gmm::vect_norm2(r);
-      rho_2 = rho_1;
-      
-      ++iter;
-    }
-  }
-  
-  template <typename Matrix, typename Vector, typename VectorB,
-	    typename Preconditioner>
-  void bicgstab(const Matrix& A, const Vector& x, const VectorB& b,
-	       const Preconditioner& M, iteration &iter)
-  { bicgstab(A, linalg_const_cast(x), b, M, iter); }
-  
-}
-
-
-#endif //  GMM_SOLVER_BICGSTAB_H__
diff --git a/Contrib/gmm/gmm_solver_cg.h b/Contrib/gmm/gmm_solver_cg.h
deleted file mode 100755
index a6d29ae..0000000
--- a/Contrib/gmm/gmm_solver_cg.h
+++ /dev/null
@@ -1,212 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of cg.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-/**@file gmm_solver_cg.h
-   @author  Andrew Lumsdaine <lums at osl.iu.edu>
-   @author  Lie-Quan Lee <llee at osl.iu.edu>
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Conjugate gradient iterative solver. 
-*/
-#ifndef GMM_SOLVER_CG_H__
-#define GMM_SOLVER_CG_H__
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-
-namespace gmm {
-
-  /* ******************************************************************** */
-  /*		conjugate gradient                           		  */
-  /* (preconditionned, with parametrable additional scalar product)       */
-  /* ******************************************************************** */
-
-  template <typename Matrix, typename Matps, typename Precond, 
-            typename Vector1, typename Vector2>
-  void cg(const Matrix& A, Vector1& x, const Vector2& b, const Matps& PS,
-	  const Precond &P, iteration &iter) {
-
-    typedef typename temporary_dense_vector<Vector1>::vector_type temp_vector;
-    typedef typename linalg_traits<Vector1>::value_type T;
-
-    T rho, rho_1(0), a;
-    temp_vector p(vect_size(x)), q(vect_size(x)), r(vect_size(x)),
-      z(vect_size(x));
-    iter.set_rhsnorm(gmm::sqrt(gmm::abs(vect_hp(PS, b, b))));
-
-    if (iter.get_rhsnorm() == 0.0)
-      clear(x);
-    else {
-      mult(A, scaled(x, T(-1)), b, r);
-      mult(P, r, z);
-      rho = vect_hp(PS, z, r);
-      copy(z, p);
-
-// #ifdef GMM_USES_MPI
-//       double t_ref, t_prec = MPI_Wtime(), t_tot = 0;
-//       static double tmult_tot = 0.0;
-// #endif
-      while (!iter.finished_vect(r)) {
-
-	if (!iter.first()) { 
-	  mult(P, r, z);
-	  rho = vect_hp(PS, z, r);
-	  add(z, scaled(p, rho / rho_1), p);
-	}
-// #ifdef GMM_USES_MPI
-// t_ref = MPI_Wtime();
-//     cout << "mult CG " << endl;
-// #endif	
-	mult(A, p, q);
-// #ifdef GMM_USES_MPI
-//     tmult_tot += MPI_Wtime()-t_ref;
-//     cout << "tmult_tot CG = " << tmult_tot << endl;
-// #endif
-	a = rho / vect_hp(PS, q, p);	
-	add(scaled(p, a), x);
-	add(scaled(q, -a), r);
-	rho_1 = rho;
-
-// #ifdef GMM_USES_MPI
-// 	t_tot = MPI_Wtime() - t_prec;
-// 	cout << "temps CG : " << t_tot << endl; 
-// #endif
-	++iter;
-      }
-    }
-  }
-
-  template <typename Matrix, typename Matps, typename Precond, 
-            typename Vector1, typename Vector2>
-  void cg(const Matrix& A, Vector1& x, const Vector2& b, const Matps& PS,
-	  const gmm::identity_matrix &, iteration &iter) {
-
-    typedef typename temporary_dense_vector<Vector1>::vector_type temp_vector;
-    typedef typename linalg_traits<Vector1>::value_type T;
-
-    T rho, rho_1(0), a;
-    temp_vector p(vect_size(x)), q(vect_size(x)), r(vect_size(x));
-    iter.set_rhsnorm(gmm::sqrt(gmm::abs(vect_hp(PS, b, b))));
-
-    if (iter.get_rhsnorm() == 0.0)
-      clear(x);
-    else {
-      mult(A, scaled(x, T(-1)), b, r);
-      rho = vect_hp(PS, r, r);
-      copy(r, p);
-
-// #ifdef GMM_USES_MPI
-//       double t_ref, t_prec = MPI_Wtime(), t_tot = 0;
-//       static double tmult_tot = 0.0;
-// #endif
-      while (!iter.finished_vect(r)) {
-
-	if (!iter.first()) { 
-	  rho = vect_hp(PS, r, r);
-	  add(r, scaled(p, rho / rho_1), p);
-	}
-// #ifdef GMM_USES_MPI
-// t_ref = MPI_Wtime();
-//     cout << "mult CG " << endl;
-// #endif	
-	mult(A, p, q);
-// #ifdef GMM_USES_MPI
-//     tmult_tot += MPI_Wtime()-t_ref;
-//     cout << "tmult_tot CG = " << tmult_tot << endl;
-// #endif
-	a = rho / vect_hp(PS, q, p);	
-	add(scaled(p, a), x);
-	add(scaled(q, -a), r);
-	rho_1 = rho;
-
-// #ifdef GMM_USES_MPI
-// 	t_tot = MPI_Wtime() - t_prec;
-// 	cout << "temps CG : " << t_tot << endl; 
-// #endif
-	++iter;
-      }
-    }
-  }
-
-  template <typename Matrix, typename Matps, typename Precond, 
-            typename Vector1, typename Vector2> inline 
-  void cg(const Matrix& A, const Vector1& x, const Vector2& b, const Matps& PS,
-	 const Precond &P, iteration &iter)
-  { cg(A, linalg_const_cast(x), b, PS, P, iter); }
-
-  template <typename Matrix, typename Precond, 
-            typename Vector1, typename Vector2> inline
-  void cg(const Matrix& A, Vector1& x, const Vector2& b,
-	 const Precond &P, iteration &iter)
-  { cg(A, x , b, identity_matrix(), P, iter); }
-
-  template <typename Matrix, typename Precond, 
-            typename Vector1, typename Vector2> inline
-  void cg(const Matrix& A, const Vector1& x, const Vector2& b,
-	 const Precond &P, iteration &iter)
-  { cg(A, x , b , identity_matrix(), P , iter); }
-  
-}
-
-
-#endif //  GMM_SOLVER_CG_H__
diff --git a/Contrib/gmm/gmm_solver_constrained_cg.h b/Contrib/gmm/gmm_solver_constrained_cg.h
deleted file mode 100755
index c7442c8..0000000
--- a/Contrib/gmm/gmm_solver_constrained_cg.h
+++ /dev/null
@@ -1,166 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_solver_constrained_cg.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Constrained conjugate gradient. */
-//  preconditionning does not work
-
-#ifndef GMM_SOLVER_CCG_H__
-#define GMM_SOLVER_CCG_H__
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-
-namespace gmm {
-
-  template <typename CMatrix, typename CINVMatrix, typename Matps,
-	    typename VectorX>
-  void pseudo_inverse(const CMatrix &C, CINVMatrix &CINV,
-		      const Matps& /* PS */, VectorX&) {
-    // compute the pseudo inverse of the non-square matrix C such
-    // CINV = inv(C * trans(C)) * C.
-    // based on a conjugate gradient method.
-    
-    // optimisable : copie de la ligne, precalcul de C * trans(C).
-    
-    typedef VectorX TmpVec;
-    typedef size_t size_type;
-    typedef typename linalg_traits<VectorX>::value_type value_type;
-    
-    size_type nr = mat_nrows(C), nc = mat_ncols(C);
-    
-    TmpVec d(nr), e(nr), l(nc), p(nr), q(nr), r(nr);
-    value_type rho, rho_1, alpha;
-    clear(d);
-    clear(CINV);
-    
-    for (size_type i = 0; i < nr; ++i) {
-      d[i] = 1.0; rho = 1.0;
-      clear(e);
-      copy(d, r);
-      copy(d, p);
-      
-      while (rho >= 1E-38) { /* conjugate gradient to compute e             */
-	                     /* which is the i nd row of inv(C * trans(C))  */
-	mult(gmm::transposed(C), p, l);
-	mult(C, l, q);	  
-	alpha = rho / vect_sp(p, q);
-	add(scaled(p, alpha), e);  
-	add(scaled(q, -alpha), r); 
-	rho_1 = rho;
-	rho = vect_sp(r, r);
-	add(r, scaled(p, rho / rho_1), p);
-      }
-      
-      mult(transposed(C), e, l); /* l is the i nd row of CINV     */
-      // cout << "l = " << l << endl;
-      clean(l, 1E-15);
-      copy(l, mat_row(CINV, i));
-      
-      d[i] = 0.0;
-    }
-  }
-  
-  /** Compute the minimum of @f$ 1/2((Ax).x) - bx @f$ under the contraint @f$ Cx <= f @f$ */
-  template < typename Matrix,  typename CMatrix, typename Matps,
-	     typename VectorX, typename VectorB, typename VectorF,
-	     typename Preconditioner >
-  void constrained_cg(const Matrix& A, const CMatrix& C, VectorX& x,
-		      const VectorB& b, const VectorF& f,const Matps& PS,
-		      const Preconditioner& M, iteration &iter) {
-    typedef typename temporary_dense_vector<VectorX>::vector_type TmpVec;
-    typedef typename temporary_vector<CMatrix>::vector_type TmpCVec;
-    typedef row_matrix<TmpCVec> TmpCmat;
-    
-    typedef size_t size_type;
-    typedef typename linalg_traits<VectorX>::value_type value_type;
-    value_type rho = 1.0, rho_1, lambda, gamma;
-    TmpVec p(vect_size(x)), q(vect_size(x)), q2(vect_size(x)),
-      r(vect_size(x)), old_z(vect_size(x)), z(vect_size(x)),
-      memox(vect_size(x));
-    std::vector<bool> satured(mat_nrows(C));
-    clear(p);
-    iter.set_rhsnorm(sqrt(vect_sp(PS, b, b)));
-    if (iter.get_rhsnorm() == 0.0) iter.set_rhsnorm(1.0);
-   
-    TmpCmat CINV(mat_nrows(C), mat_ncols(C));
-    pseudo_inverse(C, CINV, PS, x);
-    
-    while(true) {
-      // computation of residu
-      copy(z, old_z);
-      copy(x, memox);
-      mult(A, scaled(x, -1.0), b, r);
-      mult(M, r, z); // preconditionner not coherent
-      bool transition = false;
-      for (size_type i = 0; i < mat_nrows(C); ++i) {
-	value_type al = vect_sp(mat_row(C, i), x) - f[i];
-	if (al >= -1.0E-15) {
-	  if (!satured[i]) { satured[i] = true; transition = true; }
-	  value_type bb = vect_sp(mat_row(CINV, i), z);
-	  if (bb > 0.0) add(scaled(mat_row(C, i), -bb), z);
-	}
-	else
-	  satured[i] = false;
-      }
-    
-      // descent direction
-      rho_1 = rho; rho = vect_sp(PS, r, z); // ...
-      
-      if (iter.finished(rho)) break;
-      
-      if (iter.get_noisy() > 0 && transition) std::cout << "transition\n";
-      if (transition || iter.first()) gamma = 0.0;
-      else gamma = std::max(0.0, (rho - vect_sp(PS, old_z, z) ) / rho_1);
-      // std::cout << "gamma = " << gamma << endl;
-      // itl::add(r, itl::scaled(p, gamma), p);
-      add(z, scaled(p, gamma), p); // ...
-      
-      ++iter;
-      // one dimensionnal optimization
-      mult(A, p, q);
-      lambda = rho / vect_sp(PS, q, p);
-      for (size_type i = 0; i < mat_nrows(C); ++i)
-	if (!satured[i]) {
-	  value_type bb = vect_sp(mat_row(C, i), p) - f[i];
-	  if (bb > 0.0)
-	    lambda = std::min(lambda, (f[i]-vect_sp(mat_row(C, i), x)) / bb);
-	}
-      add(x, scaled(p, lambda), x);
-      add(memox, scaled(x, -1.0), memox);
-      
-    }
-  }
-  
-}
-
-#endif //  GMM_SOLVER_CCG_H__
diff --git a/Contrib/gmm/gmm_solver_gmres.h b/Contrib/gmm/gmm_solver_gmres.h
deleted file mode 100755
index fde56e4..0000000
--- a/Contrib/gmm/gmm_solver_gmres.h
+++ /dev/null
@@ -1,173 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1997-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of gmres.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-/**@file gmm_solver_gmres.h
-   @author  Andrew Lumsdaine <lums at osl.iu.edu>
-   @author  Lie-Quan Lee     <llee at osl.iu.edu>
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief GMRES (Generalized Minimum Residual) iterative solver.
-*/
-#ifndef GMM_KRYLOV_GMRES_H
-#define GMM_KRYLOV_GMRES_H
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-#include "gmm_modified_gram_schmidt.h"
-
-namespace gmm {
-
-  /** Generalized Minimum Residual
-   
-      This solve the unsymmetric linear system Ax = b using restarted GMRES.
-      
-      See: Y. Saad and M. Schulter. GMRES: A generalized minimum residual
-      algorithm for solving nonsysmmetric linear systems, SIAM
-      J. Sci. Statist. Comp.  7(1986), pp, 856-869
-  */
-  template <typename Mat, typename Vec, typename VecB, typename Precond,
-	    typename Basis >
-  void gmres(const Mat &A, Vec &x, const VecB &b, const Precond &M,
-	     int restart, iteration &outer, Basis& KS) {
-
-    typedef typename linalg_traits<Vec>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    std::vector<T> w(vect_size(x)), r(vect_size(x)), u(vect_size(x));
-    std::vector<T> c_rot(restart+1), s_rot(restart+1), s(restart+1);
-    gmm::dense_matrix<T> H(restart+1, restart);
-#ifdef GMM_USES_MPI
-      double t_ref, t_prec = MPI_Wtime(), t_tot = 0;
-      static double tmult_tot = 0.0;
-t_ref = MPI_Wtime();
-    cout << "GMRES " << endl;
-#endif
-    mult(M,b,r);
-    outer.set_rhsnorm(gmm::vect_norm2(r));
-    if (outer.get_rhsnorm() == 0.0) { clear(x); return; }
-    
-    mult(A, scaled(x, -1), b, w);
-    mult(M, w, r);
-    R beta = gmm::vect_norm2(r), beta_old = beta;
-    int blocked = 0;
-
-    iteration inner = outer;
-    inner.reduce_noisy();
-    inner.set_maxiter(restart);
-    inner.set_name("GMRes inner");
-
-    while (! outer.finished(beta)) {
-      
-      gmm::copy(gmm::scaled(r, R(1)/beta), KS[0]);
-      gmm::clear(s);
-      s[0] = beta;
-      
-      size_type i = 0; inner.init();
-      
-      do {
-	mult(A, KS[i], u);
-	mult(M, u, KS[i+1]);
-	orthogonalize(KS, mat_col(H, i), i);
-	R a = gmm::vect_norm2(KS[i+1]);
-	H(i+1, i) = T(a);
-	gmm::scale(KS[i+1], T(1) / a);
-	for (size_type k = 0; k < i; ++k)
-	  Apply_Givens_rotation_left(H(k,i), H(k+1,i), c_rot[k], s_rot[k]);
-	
-	Givens_rotation(H(i,i), H(i+1,i), c_rot[i], s_rot[i]);
-	Apply_Givens_rotation_left(H(i,i), H(i+1,i), c_rot[i], s_rot[i]);
-	Apply_Givens_rotation_left(s[i], s[i+1], c_rot[i], s_rot[i]);
-	
-	++inner, ++outer, ++i;
-      } while (! inner.finished(gmm::abs(s[i])));
-
-      upper_tri_solve(H, s, i, false);
-      combine(KS, s, x, i);
-      mult(A, gmm::scaled(x, -1), b, w);
-      mult(M, w, r);
-      beta_old = std::min(beta, beta_old); beta = gmm::vect_norm2(r);
-      if (int(inner.get_iteration()) < restart -1 || beta_old <= beta)
-	++blocked; else blocked = 0;
-      if (blocked > 10) {
-	if (outer.get_noisy()) cout << "Gmres is blocked, exiting\n";
-	break;
-      }
-#ifdef GMM_USES_MPI
-	t_tot = MPI_Wtime() - t_ref;
-	cout << "temps GMRES : " << t_tot << endl; 
-#endif
-    }
-  }
-
-
-  template <typename Mat, typename Vec, typename VecB, typename Precond >
-  void gmres(const Mat &A, Vec &x, const VecB &b,
-	     const Precond &M, int restart, iteration& outer) {
-    typedef typename linalg_traits<Vec>::value_type T;
-    modified_gram_schmidt<T> orth(restart, vect_size(x));
-    gmres(A, x, b, M, restart, outer, orth); 
-  }
-
-}
-
-#endif
diff --git a/Contrib/gmm/gmm_solver_idgmres.h b/Contrib/gmm/gmm_solver_idgmres.h
deleted file mode 100755
index 2a472ce..0000000
--- a/Contrib/gmm/gmm_solver_idgmres.h
+++ /dev/null
@@ -1,804 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_solver_idgmres.h
-   @author  Caroline Lecalvez <Caroline.Lecalvez at gmm.insa-tlse.fr>
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 6, 2003.
-   @brief Implicitly restarted and deflated Generalized Minimum Residual.
-*/
-#ifndef GMM_IDGMRES_H
-#define GMM_IDGMRES_H
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-#include "gmm_dense_sylvester.h"
-
-namespace gmm {
-
-  template <typename T> compare_vp {
-    bool operator()(const std::pair<T, size_type> &a,
-		    const std::pair<T, size_type> &b) const
-    { return (gmm::abs(a.first) > gmm::abs(b.first)); }
-  }
-
-  struct idgmres_state {
-    size_type m, tb_deb, tb_def, p, k, nb_want, nb_unwant;
-    size_type nb_nolong, tb_deftot, tb_defwant, conv, nb_un, fin;
-    bool ok;
-
-    idgmres_state(size_type mm, size_type pp, size_type kk)
-      : m(mm), tb_deb(1), tb_def(0), p(pp), k(kk), nb_want(0),
-	nb_unwant(0), nb_nolong(0), tb_deftot(0), tb_defwant(0),
-	conv(0), nb_un(0), fin(0), ok(false); {}
-  }
-
-    idgmres_state(size_type mm, size_type pp, size_type kk)
-      : m(mm), tb_deb(1), tb_def(0), p(pp), k(kk), nb_want(0),
-	nb_unwant(0), nb_nolong(0), tb_deftot(0), tb_defwant(0),
-	conv(0), nb_un(0), fin(0), ok(false); {}
-  
-
-  template <typename CONT, typename IND>
-  apply_permutation(CONT &cont, const IND &ind) {
-    size_type m = ind.end() - ind.begin();
-    std::vector<bool> sorted(m, false);
-    
-    for (size_type l = 0; l < m; ++l)
-      if (!sorted[l] && ind[l] != l) {
-
-	typeid(cont[0]) aux = cont[l];
-	k = ind[l];
-	cont[l] = cont[k];
-	sorted[l] = true;
-	
-	for(k2 = ind[k]; k2 != l; k2 = ind[k]) {
-	  cont[k] = cont[k2];
-	  sorted[k] = true;
-	  k = k2;
-	}
-	cont[k] = aux;
-      }
-  }
-
-
-  /** Implicitly restarted and deflated Generalized Minimum Residual
-
-      See: C. Le Calvez, B. Molina, Implicitly restarted and deflated
-      FOM and GMRES, numerical applied mathematics,
-      (30) 2-3 (1999) pp191-212.
-      
-      @param A Real or complex unsymmetric matrix.
-      @param x initial guess vector and final result.
-      @param b right hand side
-      @param M preconditionner
-      @param m size of the subspace between two restarts
-      @param p number of converged ritz values seeked
-      @param k size of the remaining Krylov subspace when the p ritz values
-      have not yet converged 0 <= p <= k < m.
-      @param tol_vp : tolerance on the ritz values.
-      @param outer
-      @param KS
-  */
-  template < typename Mat, typename Vec, typename VecB, typename Precond,
-	     typename Basis >
-  void idgmres(const Mat &A, Vec &x, const VecB &b, const Precond &M,
-	     size_type m, size_type p, size_type k, double tol_vp,
-	     iteration &outer, Basis& KS) {
-
-    typedef typename linalg_traits<Mat>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    
-    R a, beta;
-    idgmres_state st(m, p, k);
-
-    std::vector<T> w(vect_size(x)), r(vect_size(x)), u(vect_size(x));
-    std::vector<T> c_rot(m+1), s_rot(m+1), s(m+1);
-    std::vector<T> y(m+1), ztest(m+1), gam(m+1);
-    std::vector<T> gamma(m+1);
-    gmm::dense_matrix<T> H(m+1, m), Hess(m+1, m),
-      Hobl(m+1, m), W(vect_size(x), m+1);
-
-    gmm::clear(H);
-
-    outer.set_rhsnorm(gmm::vect_norm2(b));
-    if (outer.get_rhsnorm() == 0.0) { clear(x); return; }
-    
-    mult(A, scaled(x, -1.0), b, w);
-    mult(M, w, r);
-    beta = gmm::vect_norm2(r);
-
-    iteration inner = outer;
-    inner.reduce_noisy();
-    inner.set_maxiter(m);
-    inner.set_name("GMRes inner iter");
-    
-    while (! outer.finished(beta)) {
-      
-      gmm::copy(gmm::scaled(r, 1.0/beta), KS[0]);
-      gmm::clear(s);
-      s[0] = beta;
-      gmm::copy(s, gamma);
-
-      inner.set_maxiter(m - st.tb_deb + 1);
-      size_type i = st.tb_deb - 1; inner.init();
-      
-      do {
-	mult(A, KS[i], u);
-	mult(M, u, KS[i+1]);
-	orthogonalize_with_refinment(KS, mat_col(H, i), i);
-	H(i+1, i) = a = gmm::vect_norm2(KS[i+1]);
-	gmm::scale(KS[i+1], R(1) / a);
-
-	gmm::copy(mat_col(H, i), mat_col(Hess, i));
-	gmm::copy(mat_col(H, i), mat_col(Hobl, i));
-	
-
-	for (size_type l = 0; l < i; ++l)
-	  Apply_Givens_rotation_left(H(l,i), H(l+1,i), c_rot[l], s_rot[l]);
-	
-	Givens_rotation(H(i,i), H(i+1,i), c_rot[i], s_rot[i]);
-	Apply_Givens_rotation_left(H(i,i), H(i+1,i), c_rot[i], s_rot[i]);
-	H(i+1, i) = T(0); 
-	Apply_Givens_rotation_left(s[i], s[i+1], c_rot[i], s_rot[i]);
-	
-	++inner, ++outer, ++i;
-      } while (! inner.finished(gmm::abs(s[i])));
-
-      if (inner.converged()) {
-	gmm::copy(s, y);
-	upper_tri_solve(H, y, i, false);
-	combine(KS, y, x, i);
-	mult(A, gmm::scaled(x, T(-1)), b, w);
-	mult(M, w, r);
-	beta = gmm::vect_norm2(r); // + verif sur beta ... à faire
-	break;
-      }
-
-      gmm::clear(gam); gam[m] = s[i];
-      for (size_type l = m; l > 0; --l)
-	Apply_Givens_rotation_left(gam[l-1], gam[l], gmm::conj(c_rot[l-1]),
-				   -s_rot[l-1]);
-
-      mult(KS.mat(), gam, r);
-      beta = gmm::vect_norm2(r);
-      
-      mult(Hess, scaled(y, T(-1)), gamma, ztest);
-      // En fait, d'après Caroline qui s'y connait ztest et gam devrait
-      // être confondus
-      // Quand on aura vérifié que ça marche, il faudra utiliser gam à la 
-      // place de ztest.
-      if (st.tb_def < p) {
-        T nss = H(m,m-1) / ztest[m];
-	nss /= gmm::abs(nss); // ns à calculer plus tard aussi
-	gmm::copy(KS.mat(), W); gmm::copy(scaled(r, nss /beta), mat_col(W, m));
-	
-	// Computation of the oblique matrix
-	sub_interval SUBI(0, m);
-	add(scaled(sub_vector(ztest, SUBI), -Hobl(m, m-1) / ztest[m]),
-	    sub_vector(mat_col(Hobl, m-1), SUBI));
-	Hobl(m, m-1) *= nss * beta / ztest[m]; 
-
-	/* **************************************************************** */
-	/*  Locking                                                         */
-	/* **************************************************************** */
-
-	// Computation of the Ritz eigenpairs.
-	std::vector<std::complex<R> > eval(m);
-	dense_matrix<T> YB(m-st.tb_def, m-st.tb_def);
-	std::vector<char> pure(m-st.tb_def, 0);
-	gmm::clear(YB);
-
-	select_eval(Hobl, eval, YB, pure, st);
-
-	if (st.conv != 0) {
-	  // DEFLATION using the QR Factorization of YB
-	  
-	  T alpha = Lock(W, Hobl,
-			 sub_matrix(YB,  sub_interval(0, m-st.tb_def)),
-			 sub_interval(st.tb_def, m-st.tb_def), 
-			 (st.tb_defwant < p)); 
-	  // ns *= alpha; // à calculer plus tard ??
-	  //  V(:,m+1) = alpha*V(:, m+1); ça devait servir à qlq chose ...
-
-
-	  //       Clean the portions below the diagonal corresponding
-	  //       to the lock Schur vectors
-
-	  for (size_type j = st.tb_def; j < st.tb_deftot; ++j) {
-	    if ( pure[j-st.tb_def] == 0)
-	      gmm::clear(sub_vector(mat_col(Hobl,j), sub_interval(j+1,m-j)));
-	    else if (pure[j-st.tb_def] == 1) {
-	      gmm::clear(sub_matrix(Hobl, sub_interval(j+2,m-j-1),
-				    sub_interval(j, 2))); 
-	      ++j;
-	    }
-	    else GMM_ASSERT3(false, "internal error");
-	  }
-	  
-	  if (!st.ok) {
-
-	    // attention si m = 0;
-	    size_type mm = std::min(k+st.nb_unwant+st.nb_nolong, m-1);
-
-	    if (eval_sort[m-mm-1].second != R(0)
-		&& eval_sort[m-mm-1].second == -eval_sort[m-mm].second) ++mm;
-
-	    std::vector<complex<R> > shifts(m-mm);
-	    for (size_type i = 0; i < m-mm; ++i)
-	      shifts[i] = eval_sort[i].second;
-
-	    apply_shift_to_Arnoldi_factorization(W, Hobl, shifts, mm,
-						 m-mm, true);
-
-	    st.fin = mm;
-	  }
-	  else
-	    st.fin = st.tb_deftot;
-
-
-	  /* ************************************************************** */
-	  /*  Purge                                                         */
-	  /* ************************************************************** */
-
-	  if (st.nb_nolong + st.nb_unwant > 0) {
-
-	    std::vector<std::complex<R> > eval(m);
-	    dense_matrix<T> YB(st.fin, st.tb_deftot);
-	    std::vector<char> pure(st.tb_deftot, 0);
-	    gmm::clear(YB);
-	    st.nb_un = st.nb_nolong + st.nb_unwant;
-	    
-	    select_eval_for_purging(Hobl, eval, YB, pure, st);
-	    
-	    T alpha = Lock(W, Hobl, YB, sub_interval(0, st.fin), ok);
-
-	    //       Clean the portions below the diagonal corresponding
-	    //       to the unwanted lock Schur vectors
-	    
-	    for (size_type j = 0; j < st.tb_deftot; ++j) {
-	      if ( pure[j] == 0)
-		gmm::clear(sub_vector(mat_col(Hobl,j), sub_interval(j+1,m-j)));
-	      else if (pure[j] == 1) {
-		gmm::clear(sub_matrix(Hobl, sub_interval(j+2,m-j-1),
-				      sub_interval(j, 2))); 
-		++j;
-	      }
-	      else GMM_ASSERT3(false, "internal error");
-	    }
-
-	    gmm::dense_matrix<T> z(st.nb_un, st.fin - st.nb_un);
-	    sub_interval SUBI(0, st.nb_un), SUBJ(st.nb_un, st.fin - st.nb_un);
-	    sylvester(sub_matrix(Hobl, SUBI),
-		      sub_matrix(Hobl, SUBJ),
-		      sub_matrix(gmm::scaled(Hobl, -T(1)), SUBI, SUBJ), z);
-	    
-	  }
-
-	}
-	
-      }
-    }
-  }
-  
-
-  template < typename Mat, typename Vec, typename VecB, typename Precond >
-    void idgmres(const Mat &A, Vec &x, const VecB &b,
-		 const Precond &M, size_type m, iteration& outer) {
-    typedef typename linalg_traits<Mat>::value_type T;
-    modified_gram_schmidt<T> orth(m, vect_size(x));
-    gmres(A, x, b, M, m, outer, orth); 
-  }
-
-
-  // Lock stage of an implicit restarted Arnoldi process.
-  // 1- QR factorization of YB through Householder matrices
-  //    Q(Rl) = YB
-  //     (0 )
-  // 2- Update of the Arnoldi factorization.
-  //    H <- Q*HQ,  W <- WQ
-  // 3- Restore the Hessemberg form of H.
-
-  template <typename T, typename MATYB>
-    void Lock(gmm::dense_matrix<T> &W, gmm::dense_matrix<T> &H,
-	      const MATYB &YB, const sub_interval SUB,
-	      bool restore, T &ns) {
-
-    size_type n = mat_nrows(W), m = mat_ncols(W) - 1;
-    size_type ncols = mat_ncols(YB), nrows = mat_nrows(YB);
-    size_type begin = min(SUB); end = max(SUB) - 1;
-    sub_interval SUBR(0, nrows), SUBC(0, ncols);
-    T alpha(1);
-
-    GMM_ASSERT2(((end-begin) == ncols) && (m == mat_nrows(H)) 
-		&& (m+1 == mat_ncols(H)), "dimensions mismatch");
-    
-    // DEFLATION using the QR Factorization of YB
-	  
-    dense_matrix<T> QR(n_rows, n_rows);
-    gmmm::copy(YB, sub_matrix(QR, SUBR, SUBC));
-    gmm::clear(submatrix(QR, SUBR, sub_interval(ncols, nrows-ncols)));
-    qr_factor(QR); 
-
-
-    apply_house_left(QR, sub_matrix(H, SUB));
-    apply_house_right(QR, sub_matrix(H, SUBR, SUB));
-    apply_house_right(QR, sub_matrix(W, sub_interval(0, n), SUB));
-    
-    //       Restore to the initial block hessenberg form
-    
-    if (restore) {
-      
-      // verifier quand m = 0 ...
-      gmm::dense_matrix tab_p(end - st.tb_deftot, end - st.tb_deftot);
-      gmm::copy(identity_matrix(), tab_p);
-      
-      for (size_type j = end-1; j >= st.tb_deftot+2; --j) {
-	
-	size_type jm = j-1;
-	std::vector<T> v(jm - st.tb_deftot);
-	sub_interval SUBtot(st.tb_deftot, jm - st.tb_deftot);
-	sub_interval SUBtot2(st.tb_deftot, end - st.tb_deftot);
-	gmm::copy(sub_vector(mat_row(H, j), SUBtot), v);
-	house_vector_last(v);
-	w.resize(end);
-	col_house_update(sub_matrix(H, SUBI, SUBtot), v, w);
-	w.resize(end - st.tb_deftot);
-	row_house_update(sub_matrix(H, SUBtot, SUBtot2), v, w);
-	gmm::clear(sub_vector(mat_row(H, j),
-			      sub_interval(st.tb_deftot, j-1-st.tb_deftot)));
-	w.resize(end - st.tb_deftot);
-	col_house_update(sub_matrix(tab_p, sub_interval(0, end-st.tb_deftot),
-				    sub_interval(0, jm-st.tb_deftot)), v, w);
-	w.resize(n);
-	col_house_update(sub_matrix(W, sub_interval(0, n), SUBtot), v, w);
-      }
-      
-      //       restore positive subdiagonal elements
-      
-      std::vector<T> d(fin-st.tb_deftot); d[0] = T(1);
-      
-      // We compute d[i+1] in order 
-      // (d[i+1] * H(st.tb_deftot+i+1,st.tb_deftoti)) / d[i] 
-      // be equal to |H(st.tb_deftot+i+1,st.tb_deftot+i))|.
-      for (size_type j = 0; j+1 < end-st.tb_deftot; ++j) {
-	T e = H(st.tb_deftot+j, st.tb_deftot+j-1);
-	d[j+1] = (e == T(0)) ? T(1) :  d[j] * gmm::abs(e) / e;
-	scale(sub_vector(mat_row(H, st.tb_deftot+j+1),
-			 sub_interval(st.tb_deftot, m-st.tb_deftot)), d[j+1]);
-	scale(mat_col(H, st.tb_deftot+j+1), T(1) / d[j+1]);
-	scale(mat_col(W, st.tb_deftot+j+1), T(1) / d[j+1]);
-      }
-
-      alpha = tab_p(end-st.tb_deftot-1, end-st.tb_deftot-1) / d[end-st.tb_deftot-1];
-      alpha /= gmm::abs(alpha);
-      scale(mat_col(W, m), alpha);
-	    
-    }
-	 
-    return alpha;
-  }
-
-
-
-
-
-
-
-
-  // Apply p implicit shifts to the Arnoldi factorization
-  // AV = VH+H(k+p+1,k+p) V(:,k+p+1) e_{k+p}*
-  // and produces the following new Arnoldi factorization
-  // A(VQ) = (VQ)(Q*HQ)+H(k+p+1,k+p) V(:,k+p+1) e_{k+p}* Q
-  // where only the first k columns are relevant.
-  //
-  // Dan Sorensen and Richard J. Radke, 11/95
-  template<typename T, typename C>
-    apply_shift_to_Arnoldi_factorization(dense_matrix<T> V, dense_matrix<T> H,
-					 std::vector<C> Lambda, size_type &k,
-					 size_type p, bool true_shift = false) {
-
-
-    size_type k1 = 0, num = 0, kend = k+p, kp1 = k + 1;
-    bool mark = false;
-    T c, s, x, y, z;
-
-    dense_matrix<T> q(1, kend);
-    gmm::clear(q); q(0,kend-1) = T(1);
-    std::vector<T> hv(3), w(std::max(kend, mat_nrows(V)));
-
-    for(size_type jj = 0; jj < p; ++jj) {
-      //     compute and apply a bulge chase sweep initiated by the
-      //     implicit shift held in w(jj)
-   
-      if (abs(Lambda[jj].real()) == 0.0) {
-	//       apply a real shift using 2 by 2 Givens rotations
-
-	for (size_type k1 = 0, k2 = 0; k2 != kend-1; k1 = k2+1) {
-	  k2 = k1;
-	  while (h(k2+1, k2) != T(0) && k2 < kend-1) ++k2;
-
-	  Givens_rotation(H(k1, k1) - Lambda[jj], H(k1+1, k1), c, s);
-	  
-	  for (i = k1; i <= k2; ++i) {
-            if (i > k1) Givens_rotation(H(i, i-1), H(i+1, i-1), c, s);
-            
-	    // Ne pas oublier de nettoyer H(i+1,i-1) (le mettre à zéro).
-	    // Vérifier qu'au final H(i+1,i) est bien un réel positif.
-
-            // apply rotation from left to rows of H
-	    row_rot(sub_matrix(H, sub_interval(i,2), sub_interval(i, kend-i)),
-		    c, s, 0, 0);
-	    
-	    // apply rotation from right to columns of H
-            size_type ip2 = std::min(i+2, kend);
-            col_rot(sub_matrix(H, sub_interval(0, ip2), sub_interval(i, 2))
-		    c, s, 0, 0);
-            
-            // apply rotation from right to columns of V
-	    col_rot(V, c, s, i, i+1);
-            
-            // accumulate e'  Q so residual can be updated k+p
-	    Apply_Givens_rotation_left(q(0,i), q(0,i+1), c, s);
-	    // peut être que nous utilisons G au lieu de G* et que
-	    // nous allons trop loin en k2.
-	  }
-	}
-	
-	num = num + 1;
-      }
-      else {
-      
-	// Apply a double complex shift using 3 by 3 Householder 
-	// transformations
-      
-	if (jj == p || mark)
-	  mark = false;     // skip application of conjugate shift
-	else {
-	  num = num + 2;    // mark that a complex conjugate
-	  mark = true;      // pair has been applied
-
-	  // Indices de fin de boucle à surveiller... de près !
-	  for (size_type k1 = 0, k3 = 0; k3 != kend-2; k1 = k3+1) {
-	    k3 = k1;
-	    while (h(k3+1, k3) != T(0) && k3 < kend-2) ++k3;
-	    size_type k2 = k1+1;
-
-
-            x = H(k1,k1) * H(k1,k1) + H(k1,k2) * H(k2,k1)
-	      - 2.0*Lambda[jj].real() * H(k1,k1) + gmm::abs_sqr(Lambda[jj]);
-	    y = H(k2,k1) * (H(k1,k1) + H(k2,k2) - 2.0*Lambda[jj].real());
-	    z = H(k2+1,k2) * H(k2,k1);
-
-	    for (size_type i = k1; i <= k3; ++i) {
-	      if (i > k1) {
-		x = H(i, i-1);
-		y = H(i+1, i-1);
-		z = H(i+2, i-1);
-		// Ne pas oublier de nettoyer H(i+1,i-1) et H(i+2,i-1) 
-		// (les mettre à zéro).
-	      }
-
-	      hv[0] = x; hv[1] = y; hv[2] = z;
-	      house_vector(v);
-
-	      // Vérifier qu'au final H(i+1,i) est bien un réel positif
-
-	      // apply transformation from left to rows of H
-	      w.resize(kend-i);
-	      row_house_update(sub_matrix(H, sub_interval(i, 2),
-					  sub_interval(i, kend-i)), v, w);
-               
-	      // apply transformation from right to columns of H
-               
-	      size_type ip3 = std::min(kend, i + 3);
-	      w.resize(ip3);
-              col_house_update(sub_matrix(H, sub_interval(0, ip3),
-					  sub_interval(i, 2)), v, w);
-               
-	      // apply transformation from right to columns of V
-	      
-	      w.resize(mat_nrows(V));
-	      col_house_update(sub_matrix(V, sub_interval(0, mat_nrows(V)),
-					  sub_interval(i, 2)), v, w);
-               
-	      // accumulate e' Q so residual can be updated  k+p
-
-	      w.resize(1);
-	      col_house_update(sub_matrix(q, sub_interval(0,1),
-					  sub_interval(i,2)), v, w);
-               
-	    }
-	  }
-         
-	  //           clean up step with Givens rotation
-
-	  i = kend-2;
-	  c = x; s = y;
-	  if (i > k1) Givens_rotation(H(i, i-1), H(i+1, i-1), c, s);
-            
-	  // Ne pas oublier de nettoyer H(i+1,i-1) (le mettre à zéro).
-	  // Vérifier qu'au final H(i+1,i) est bien un réel positif.
-
-	  // apply rotation from left to rows of H
-	  row_rot(sub_matrix(H, sub_interval(i,2), sub_interval(i, kend-i)),
-		    c, s, 0, 0);
-	    
-	  // apply rotation from right to columns of H
-	  size_type ip2 = std::min(i+2, kend);
-	  col_rot(sub_matrix(H, sub_interval(0, ip2), sub_interval(i, 2))
-		  c, s, 0, 0);
-            
-	  // apply rotation from right to columns of V
-	  col_rot(V, c, s, i, i+1);
-            
-	  // accumulate e'  Q so residual can be updated k+p
-	  Apply_Givens_rotation_left(q(0,i), q(0,i+1), c, s);
-
-	}
-      }
-    }
-
-    //  update residual and store in the k+1 -st column of v
-
-    k = kend - num;
-    scale(mat_col(V, kend), q(0, k));
-    
-    if (k < mat_nrows(H)) {
-      if (true_shift)
-	gmm::copy(mat_col(V, kend), mat_col(V, k));
-      else
-	   //   v(:,k+1) = v(:,kend+1) + v(:,k+1)*h(k+1,k);
-	   //   v(:,k+1) = v(:,kend+1) ;
-	gmm::add(scaled(mat_col(V, kend), H(kend, kend-1)), 
-		 scaled(mat_col(V, k), H(k, k-1)), mat_col(V, k));
-    }
-
-    H(k, k-1) = vect_norm2(mat_col(V, k));
-    scale(mat_col(V, kend), T(1) / H(k, k-1));
-  }
-
-
-
-  template<typename MAT, typename EVAL, typename PURE>
-  void select_eval(const MAT &Hobl, EVAL &eval, MAT &YB, PURE &pure,
-		   idgmres_state &st) {
-
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    size_type m = st.m;
-
-    // Computation of the Ritz eigenpairs.
-    
-    col_matrix< std::vector<T> > evect(m-st.tb_def, m-st.tb_def);
-    // std::vector<std::complex<R> > eval(m);
-    std::vector<R> ritznew(m, T(-1));
-	
-    // dense_matrix<T> evect_lock(st.tb_def, st.tb_def);
-    
-    sub_interval SUB1(st.tb_def, m-st.tb_def);
-    implicit_qr_algorithm(sub_matrix(Hobl, SUB1),
-			  sub_vector(eval, SUB1), evect);
-    sub_interval SUB2(0, st.tb_def);
-    implicit_qr_algorithm(sub_matrix(Hobl, SUB2),
-			  sub_vector(eval, SUB2), /* evect_lock */);
-    
-    for (size_type l = st.tb_def; l < m; ++l)
-      ritznew[l] = gmm::abs(evect(m-st.tb_def-1, l-st.tb_def) * Hobl(m, m-1));
-    
-    std::vector< std::pair<T, size_type> > eval_sort(m);
-    for (size_type l = 0; l < m; ++l)
-      eval_sort[l] = std::pair<T, size_type>(eval[l], l);
-    std::sort(eval_sort.begin(), eval_sort.end(), compare_vp());
-    
-    std::vector<size_type> index(m);
-    for (size_type l = 0; l < m; ++l) index[l] = eval_sort[l].second;
-    
-    std::vector<bool> kept(m, false);
-    std::fill(kept.begin(), kept.begin()+st.tb_def, true);
-
-    apply_permutation(eval, index);
-    apply_permutation(evect, index);
-    apply_permutation(ritznew, index);
-    apply_permutation(kept, index);
-
-    //	Which are the eigenvalues that converged ?
-    //
-    //	nb_want is the number of eigenvalues of 
-    //	Hess(tb_def+1:n,tb_def+1:n) that converged and are WANTED
-    //
-    //	nb_unwant is the number of eigenvalues of 
-    //	Hess(tb_def+1:n,tb_def+1:n) that converged and are UNWANTED
-    //
-    //	nb_nolong is the number of eigenvalues of 
-    //	Hess(1:tb_def,1:tb_def) that are NO LONGER WANTED. 
-    //
-    //	tb_deftot is the number of the deflated eigenvalues
-    //	that is tb_def + nb_want + nb_unwant
-    //
-    //	tb_defwant is the number of the wanted deflated eigenvalues
-    //	that is tb_def + nb_want - nb_nolong
-    
-    st.nb_want = 0, st.nb_unwant = 0, st.nb_nolong = 0;
-    size_type j, ind;
-    
-    for (j = 0, ind = 0; j < m-p; ++j) {
-      if (ritznew[j] == R(-1)) {
-	if (std::imag(eval[j]) != R(0)) {
-	  st.nb_nolong += 2; ++j; //  à adapter dans le cas complexe ...
-	} 
-	else st.nb_nolong++;
-      }
-      else {
-	if (ritznew[j]
-	    < tol_vp * gmm::abs(eval[j])) {
-	  
-	  for (size_type l = 0, l < m-st.tb_def; ++l)
-	    YB(l, ind) = std::real(evect(l, j));
-	  kept[j] = true;
-	  ++j; ++st.nb_unwant; ind++;
-	  
-	  if (std::imag(eval[j]) != R(0)) {
-	    for (size_type l = 0, l < m-st.tb_def; ++l)
-	      YB(l, ind) = std::imag(evect(l, j));
-	    pure[ind-1] = 1;
-	    pure[ind] = 2;
-	    
-	    kept[j] = true;
-	    
-	    st.nb_unwant++;
-	    ++ind;
-	  }
-	}
-      }
-    }
-    
-    
-    for (; j < m; ++j) {
-      if (ritznew[j] != R(-1)) {
-
-	for (size_type l = 0, l < m-st.tb_def; ++l)
-	  YB(l, ind) = std::real(evect(l, j));
-	pure[ind] = 1;
-	++ind;
-	kept[j] = true;
-	++st.nb_want;
-	
-	if (ritznew[j]
-	    < tol_vp * gmm::abs(eval[j])) {
-	  for (size_type l = 0, l < m-st.tb_def; ++l)
-	    YB(l, ind) = std::imag(evect(l, j));
-	  pure[ind] = 2;
-	  
-	  j++;
-	  kept[j] = true;
-	  
-	  st.nb_want++;
-	  ++ind;	      
-	}
-      }
-    }
-    
-    std::vector<T> shift(m - st.tb_def - st.nb_want - st.nb_unwant);
-    for (size_type j = 0, i = 0; j < m; ++j)
-      if (!kept[j]) shift[i++] = eval[j];
-    
-    // st.conv (st.nb_want+st.nb_unwant) is the number of eigenpairs that
-    //   have just converged.
-    // st.tb_deftot is the total number of eigenpairs that have converged.
-    
-    size_type st.conv = ind;
-    size_type st.tb_deftot = st.tb_def + st.conv;
-    size_type st.tb_defwant = st.tb_def + st.nb_want - st.nb_nolong;
-    
-    sub_interval SUBYB(0, st.conv);
-    
-    if ( st.tb_defwant >= p ) { // An invariant subspace has been found.
-      
-      st.nb_unwant = 0;
-      st.nb_want = p + st.nb_nolong - st.tb_def;
-      st.tb_defwant = p;
-      
-      if ( pure[st.conv - st.nb_want + 1] == 2 ) {
-	++st.nb_want; st.tb_defwant = ++p;// il faudrait que ce soit un p local
-      }
-      
-      SUBYB = sub_interval(st.conv - st.nb_want, st.nb_want);
-      // YB = YB(:, st.conv-st.nb_want+1 : st.conv); // On laisse en suspend ..
-      // pure = pure(st.conv-st.nb_want+1 : st.conv,1); // On laisse suspend ..
-      st.conv = st.nb_want;
-      st.tb_deftot = st.tb_def + st.conv;
-      st.ok = true;
-    }
-    
-  }
-
-
-
-  template<typename MAT, typename EVAL, typename PURE>
-  void select_eval_for_purging(const MAT &Hobl, EVAL &eval, MAT &YB,
-			       PURE &pure, idgmres_state &st) {
-
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-    size_type m = st.m;
-
-    // Computation of the Ritz eigenpairs.
-    
-    col_matrix< std::vector<T> > evect(st.tb_deftot, st.tb_deftot);
-    
-    sub_interval SUB1(0, st.tb_deftot);
-    implicit_qr_algorithm(sub_matrix(Hobl, SUB1),
-			  sub_vector(eval, SUB1), evect);
-    std::fill(eval.begin() + st.tb_deftot, eval.end(), std::complex<R>(0));
-    
-    std::vector< std::pair<T, size_type> > eval_sort(m);
-    for (size_type l = 0; l < m; ++l)
-      eval_sort[l] = std::pair<T, size_type>(eval[l], l);
-    std::sort(eval_sort.begin(), eval_sort.end(), compare_vp());
-
-    std::vector<bool> sorted(m);
-    std::fill(sorted.begin(), sorted.end(), false);
-    
-    std::vector<size_type> ind(m);
-    for (size_type l = 0; l < m; ++l) ind[l] = eval_sort[l].second;
-    
-    std::vector<bool> kept(m, false);
-    std::fill(kept.begin(), kept.begin()+st.tb_def, true);
-
-    apply_permutation(eval, ind);
-    apply_permutation(evect, ind);
-    
-    size_type j;
-    for (j = 0; j < st.tb_deftot; ++j) {
-	  
-      for (size_type l = 0, l < st.tb_deftot; ++l)
-	YB(l, j) = std::real(evect(l, j));
-      
-      if (std::imag(eval[j]) != R(0)) {
-	for (size_type l = 0, l < m-st.tb_def; ++l)
-	  YB(l, j+1) = std::imag(evect(l, j));
-	pure[j] = 1;
-	pure[j+1] = 2;
-	
-	j += 2;
-      }
-      else ++j;
-    }
-  }
-  
-
-
-
-
-
-}
-
-#endif
diff --git a/Contrib/gmm/gmm_solver_qmr.h b/Contrib/gmm/gmm_solver_qmr.h
deleted file mode 100755
index a9a5582..0000000
--- a/Contrib/gmm/gmm_solver_qmr.h
+++ /dev/null
@@ -1,209 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1997-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-// This file is a modified version of qmr.h from ITL.
-// See http://osl.iu.edu/research/itl/
-// Following the corresponding Copyright notice.
-//===========================================================================
-//
-// Copyright (c) 1997-2001, The Trustees of Indiana University.
-// All rights reserved.
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    * Redistributions of source code must retain the above copyright
-//      notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above copyright
-//      notice, this list of conditions and the following disclaimer in the
-//      documentation and/or other materials provided with the distribution.
-//    * Neither the name of the University of California, Berkeley nor the
-//      names of its contributors may be used to endorse or promote products
-//      derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE  IS  PROVIDED  BY  THE TRUSTEES  OF  INDIANA UNIVERSITY  AND
-// CONTRIBUTORS  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,  INCLUDING,
-// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS
-// FOR  A PARTICULAR PURPOSE ARE DISCLAIMED. IN  NO  EVENT SHALL THE TRUSTEES
-// OF INDIANA UNIVERSITY AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-// INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT
-// NOT  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA,  OR PROFITS;  OR BUSINESS  INTERRUPTION)  HOWEVER  CAUSED AND ON ANY
-// THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT,  STRICT  LIABILITY, OR TORT
-// (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS  SOFTWARE,  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-//===========================================================================
-
-/**@file gmm_solver_qmr.h
-   @author Andrew Lumsdaine <lums at osl.iu.edu>
-   @author Lie-Quan Lee     <llee at osl.iu.edu>
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Quasi-Minimal Residual iterative solver.
-*/
-#ifndef GMM_QMR_H
-#define GMM_QMR_H
-
-#include "gmm_kernel.h"
-#include "gmm_iter.h"
-
-namespace gmm {
-
-  /** Quasi-Minimal Residual.
-     
-     This routine solves the unsymmetric linear system Ax = b using
-     the Quasi-Minimal Residual method.
-   
-     See: R. W. Freund and N. M. Nachtigal, A quasi-minimal residual
-     method for non-Hermitian linear systems, Numerical Math.,
-     60(1991), pp. 315-339
-  
-     Preconditioner -  Incomplete LU, Incomplete LU with threshold,
-                       SSOR or identity_preconditioner.
-  */
-  template <typename Matrix, typename Vector, typename VectorB,
-	    typename Precond1>
-  void qmr(const Matrix &A, Vector &x, const VectorB &b, const Precond1 &M1,
-	   iteration& iter) {
-
-    typedef typename linalg_traits<Vector>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    T delta(0), ep(0), beta(0), theta_1(0), gamma_1(0);
-    T theta(0), gamma(1), eta(-1);
-    R rho_1(0), rho, xi;
-
-    typedef typename temporary_vector<Vector>::vector_type TmpVec;
-    size_type nn = vect_size(x);
-    TmpVec r(nn), v_tld(nn), y(nn), w_tld(nn), z(nn), v(nn), w(nn);
-    TmpVec y_tld(nn), z_tld(nn), p(nn), q(nn), p_tld(nn), d(nn), s(nn);
-
-    iter.set_rhsnorm(double(gmm::vect_norm2(b)));
-    if (iter.get_rhsnorm() == 0.0) { clear(x); return; }
-
-    gmm::mult(A, gmm::scaled(x, T(-1)), b, r);
-    gmm::copy(r, v_tld);
-
-    gmm::left_mult(M1, v_tld, y);
-    rho = gmm::vect_norm2(y);
-
-    gmm::copy(r, w_tld);
-    gmm::transposed_right_mult(M1, w_tld, z);
-    xi = gmm::vect_norm2(z);
-  
-    while (! iter.finished_vect(r)) {
-    
-      if (rho == R(0) || xi == R(0))
-	if (iter.get_maxiter() == size_type(-1)) 
-	  { GMM_ASSERT1(false, "QMR failed to converge"); }
-	else { GMM_WARNING1("QMR failed to converge"); return; }
-
-      gmm::copy(gmm::scaled(v_tld, T(R(1)/rho)), v);
-      gmm::scale(y, T(R(1)/rho));
-
-      gmm::copy(gmm::scaled(w_tld, T(R(1)/xi)), w);
-      gmm::scale(z, T(R(1)/xi));
-
-      delta = gmm::vect_sp(z, y);
-      if (delta == T(0)) 
-	if (iter.get_maxiter() == size_type(-1)) 
-	  { GMM_ASSERT1(false, "QMR failed to converge"); }
-	else { GMM_WARNING1("QMR failed to converge"); return; }
-
-      gmm::right_mult(M1, y, y_tld);		
-      gmm::transposed_left_mult(M1, z, z_tld);
-
-      if (iter.first()) {
-	gmm::copy(y_tld, p);
-	gmm::copy(z_tld, q);
-      } else {
-	gmm::add(y_tld, gmm::scaled(p, -(T(xi  * delta) / ep)), p);
-	gmm::add(z_tld, gmm::scaled(q, -(T(rho * delta) / ep)), q);
-      }
-    
-      gmm::mult(A, p, p_tld);
-
-      ep = gmm::vect_sp(q, p_tld);
-      if (ep == T(0)) 
-	if (iter.get_maxiter() == size_type(-1)) 
-	  { GMM_ASSERT1(false, "QMR failed to converge"); }
-	else { GMM_WARNING1("QMR failed to converge"); return; }
-
-      beta = ep / delta;
-      if (beta == T(0))
-	if (iter.get_maxiter() == size_type(-1)) 
-	  { GMM_ASSERT1(false, "QMR failed to converge"); }
-	else { GMM_WARNING1("QMR failed to converge"); return; }
-
-      gmm::add(p_tld, gmm::scaled(v, -beta), v_tld);
-      gmm::left_mult(M1, v_tld, y);
-
-      rho_1 = rho;
-      rho = gmm::vect_norm2(y);
-
-      gmm::mult(gmm::transposed(A), q, w_tld);
-      gmm::add(w_tld, gmm::scaled(w, -beta), w_tld);
-      gmm::transposed_right_mult(M1, w_tld, z);
-
-      xi = gmm::vect_norm2(z);
-
-      gamma_1 = gamma;
-      theta_1 = theta;
-
-      theta = rho / (gamma_1 * beta);
-      gamma = T(1) / gmm::sqrt(T(1) + gmm::sqr(theta));
-
-      if (gamma == T(0)) 
-	if (iter.get_maxiter() == size_type(-1)) 
-	  { GMM_ASSERT1(false, "QMR failed to converge"); }
-	else { GMM_WARNING1("QMR failed to converge"); return; }
-      
-      eta = -eta * T(rho_1) * gmm::sqr(gamma) / (beta * gmm::sqr(gamma_1));
-
-      if (iter.first()) {
-	gmm::copy(gmm::scaled(p, eta), d);
-	gmm::copy(gmm::scaled(p_tld, eta), s);
-      } else {
-	T tmp = gmm::sqr(theta_1 * gamma);
-	gmm::add(gmm::scaled(p, eta), gmm::scaled(d, tmp), d);
-	gmm::add(gmm::scaled(p_tld, eta), gmm::scaled(s, tmp), s);
-      }
-      gmm::add(d, x);
-      gmm::add(gmm::scaled(s, T(-1)), r);
-
-      ++iter;
-    }
-  }
-
-
-}
-
-#endif 
-
diff --git a/Contrib/gmm/gmm_std.h b/Contrib/gmm/gmm_std.h
deleted file mode 100755
index 4e476d5..0000000
--- a/Contrib/gmm/gmm_std.h
+++ /dev/null
@@ -1,255 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 1995-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_std.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>,
-   @author  Julien Pommier <Julien.Pommier at insa-toulouse.fr>
-   @date June 01, 1995.
-   @brief basic setup for gmm (includes, typedefs etc.)
-*/
-#ifndef GMM_STD_H__
-#define GMM_STD_H__
-
-#ifndef __USE_STD_IOSTREAM
-# define __USE_STD_IOSTREAM
-#endif
-
-#ifndef __USE_BSD
-# define __USE_BSD
-#endif
-
-#ifndef __USE_ISOC99
-# define __USE_ISOC99
-#endif
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400 // Secure versions for VC++
-# define GMM_SECURE_CRT
-# define SECURE_NONCHAR_SSCANF sscanf_s
-# define SECURE_NONCHAR_FSCANF fscanf_s
-# define SECURE_STRNCPY(a, la, b, lb) strncpy_s(a, la, b, lb)
-# define SECURE_FOPEN(F, filename, mode) (*(F) = 0,  fopen_s(F, filename, mode))
-# define SECURE_SPRINTF1(S, l, st, p1) sprintf_s(S, l, st, p1) 
-# define SECURE_SPRINTF2(S, l, st, p1, p2) sprintf_s(S, l, st, p1, p2) 
-# define SECURE_SPRINTF4(S, l, st, p1, p2, p3, p4) sprintf_s(S, l, st, p1, p2, p3, p4)
-# define SECURE_STRDUP(s) _strdup(s)
-# ifndef _SCL_SECURE_NO_DEPRECATE
-#   error Add the option /D_SCL_SECURE_NO_DEPRECATE to the compilation command
-# endif
-#else
-# define SECURE_NONCHAR_SSCANF sscanf
-# define SECURE_NONCHAR_FSCANF fscanf
-# define SECURE_STRNCPY(a, la, b, lb) strncpy(a, b, lb)
-# define SECURE_FOPEN(F, filename, mode) ((*(F)) = fopen(filename, mode))
-# define SECURE_SPRINTF1(S, l, st, p1) sprintf(S, st, p1)
-# define SECURE_SPRINTF2(S, l, st, p1, p2) sprintf(S, st, p1, p2)
-# define SECURE_SPRINTF4(S, l, st, p1, p2, p3, p4) sprintf(S, st, p1, p2, p3, p4) 
-# define SECURE_STRDUP(s) strdup(s)
-#endif
-
-
-#if !defined(GMM_USES_MPI) && GETFEM_PARA_LEVEL > 0
-# define GMM_USES_MPI
-#endif
-
-/* ********************************************************************** */
-/*	Compilers detection.						  */
-/* ********************************************************************** */
-
-/* for sun CC 5.0 ...
-#if defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500
-# include <stdcomp.h>
-# undef _RWSTD_NO_CLASS_PARTIAL_SPEC
-# undef _RWSTD_NO_NAMESPACE
-#endif 
-*/
-/* for VISUAL C++ ...
-   #if defined(_MSC_VER) //  && !defined(__MWERKS__)
-   #define _GETFEM_MSVCPP_ _MSC_VER
-   #endif
-*/
-
-#if defined(__GNUC__)
-#  if (__GNUC__ < 3)
-#    error : PLEASE UPDATE g++ TO AT LEAST 3.0 VERSION
-#  endif
-#endif
-
-/* ********************************************************************** */
-/*	C++ Standard Headers.						  */
-/* ********************************************************************** */
-#include <cstdlib>
-#include <cstddef>
-#include <cmath>
-#include <cstring>
-#include <cctype>
-#include <cassert>
-#include <climits>
-#include <iostream>
-//#include <ios> 
-#include <fstream>
-#include <ctime>
-#include <exception>
-#include <typeinfo>
-#include <stdexcept>
-#include <iterator>
-#include <algorithm>
-#include <vector>
-#include <deque>
-#include <string>
-#include <complex>
-#include <limits>
-#include <sstream>
-#include <numeric>
-
-
-using std::endl; using std::cout; using std::cerr;
-using std::ends; using std::cin;
-
-namespace gmm {
-
-  /* ******************************************************************* */
-  /*       Clock functions.                                              */
-  /* ******************************************************************* */
-  
-# if  defined(HAVE_SYS_TIMES)
-  inline double uclock_sec(void) {
-    static double ttclk = 0.;
-    if (ttclk == 0.) ttclk = sysconf(_SC_CLK_TCK);
-    tms t; times(&t); return double(t.tms_utime) / ttclk;
-  }
-# else
-  inline double uclock_sec(void)
-  { return double(clock())/double(CLOCKS_PER_SEC); }
-# endif
-  
-  /* ******************************************************************** */
-  /*	Fixed size integer types.                     			  */
-  /* ******************************************************************** */
-  // Remark : the test program dynamic_array tests the lenght of
-  //          resulting integers
-
-  template <size_t s> struct fixed_size_integer_generator {
-    typedef void int_base_type;
-    typedef void uint_base_type;  
-  };
-
-  template <> struct fixed_size_integer_generator<sizeof(char)> {
-    typedef signed char int_base_type;
-    typedef unsigned char uint_base_type;
-  };
-
-  template <> struct fixed_size_integer_generator<sizeof(short int)
-    - ((sizeof(short int) == sizeof(char)) ? 78 : 0)> {
-    typedef signed short int int_base_type;
-    typedef unsigned short int uint_base_type;
-  };
-
-  template <> struct fixed_size_integer_generator<sizeof(int)
-    - ((sizeof(int) == sizeof(short int)) ? 59 : 0)> {
-    typedef signed int int_base_type;
-    typedef unsigned int uint_base_type;
-  };
- 
-  template <> struct fixed_size_integer_generator<sizeof(long)
-    - ((sizeof(int) == sizeof(long)) ? 93 : 0)> {
-    typedef signed long int_base_type;
-    typedef unsigned long uint_base_type;
-  };
-
-  template <> struct fixed_size_integer_generator<sizeof(long long)
-    - ((sizeof(long long) == sizeof(long)) ? 99 : 0)> {
-    typedef signed long long int_base_type;
-    typedef unsigned long long uint_base_type;
-  };
- 
-  typedef fixed_size_integer_generator<1>::int_base_type int8_type;
-  typedef fixed_size_integer_generator<1>::uint_base_type uint8_type;
-  typedef fixed_size_integer_generator<2>::int_base_type int16_type;
-  typedef fixed_size_integer_generator<2>::uint_base_type uint16_type;
-  typedef fixed_size_integer_generator<4>::int_base_type int32_type;
-  typedef fixed_size_integer_generator<4>::uint_base_type uint32_type;
-  typedef fixed_size_integer_generator<8>::int_base_type int64_type;
-  typedef fixed_size_integer_generator<8>::uint_base_type uint64_type;
-
-// #if INT_MAX == 32767
-//   typedef signed int    int16_type;
-//   typedef unsigned int uint16_type;
-// #elif  SHRT_MAX == 32767
-//   typedef signed short int    int16_type;
-//   typedef unsigned short int uint16_type;
-// #else
-// # error "impossible to build a 16 bits integer"
-// #endif
-
-// #if INT_MAX == 2147483647
-//   typedef signed int    int32_type;
-//   typedef unsigned int uint32_type;
-// #elif  SHRT_MAX == 2147483647
-//   typedef signed short int    int32_type;
-//   typedef unsigned short int uint32_type;
-// #elif LONG_MAX == 2147483647
-//   typedef signed long int    int32_type;
-//   typedef unsigned long int uint32_type;
-// #else
-// # error "impossible to build a 32 bits integer"
-// #endif
-
-// #if INT_MAX == 9223372036854775807L || INT_MAX == 9223372036854775807
-//   typedef signed int    int64_type;
-//   typedef unsigned int uint64_type;
-// #elif LONG_MAX == 9223372036854775807L || LONG_MAX == 9223372036854775807
-//   typedef signed long int    int64_type;
-//   typedef unsigned long int uint64_type;
-// #elif LLONG_MAX == 9223372036854775807LL || LLONG_MAX == 9223372036854775807L || LLONG_MAX == 9223372036854775807
-//   typedef signed long long int int64_type;
-//   typedef unsigned long long int uint64_type;
-// #else
-// # error "impossible to build a 64 bits integer"
-// #endif
-
-#if defined(__GNUC__) && !defined(__ICC)
-/* 
-   g++ can issue a warning at each usage of a function declared with this special attribute 
-   (also works with typedefs and variable declarations)
-*/
-# define IS_DEPRECATED __attribute__ ((__deprecated__))
-/*
-   the specified function is inlined at any optimization level 
-*/
-# define ALWAYS_INLINE __attribute__((always_inline))
-#else
-# define IS_DEPRECATED
-# define ALWAYS_INLINE
-#endif
-  
-}
-
-#endif /* GMM_STD_H__ */
-
diff --git a/Contrib/gmm/gmm_sub_index.h b/Contrib/gmm/gmm_sub_index.h
deleted file mode 100755
index 387c707..0000000
--- a/Contrib/gmm/gmm_sub_index.h
+++ /dev/null
@@ -1,217 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_sub_index.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief sub-indices.
-*/
-
-#ifndef GMM_SUB_INDEX_H__
-#define GMM_SUB_INDEX_H__
-
-#include "gmm_def.h"
-
-namespace gmm {
-
-  /* ******************************************************************** */
-  /*		sub indices                               		  */
-  /* ******************************************************************** */
-
-  struct basic_index : public std::vector<size_t> {
-    
-    mutable size_type nb_ref;
-    // size_type key1; faire la somme des composantes
-    // const basic_index *rind; rindex s'il existe
-    
-
-    size_t operator[](size_type i) const {
-      return (i < size()) ? std::vector<size_t>::operator[](i) : size_type(-1);
-    }
-    
-    basic_index() : nb_ref(1) {}
-    basic_index(size_type j) : std::vector<size_t>(j), nb_ref(1) {}
-    template <typename IT> basic_index(IT b, IT e)
-      : std::vector<size_t>(e-b), nb_ref(1) { std::copy(b, e, begin()); }
-    basic_index(const basic_index *pbi) : nb_ref(1) {
-      const_iterator it = pbi->begin(), ite = pbi->end();
-      size_type i = 0;
-      for ( ; it != ite; ++it) i = std::max(i, *it);
-      resize(i+1); std::fill(begin(), end(), size_type(-1));
-      for (it = pbi->begin(), i = 0; it != ite; ++it, ++i)
-	std::vector<size_t>::operator[](*it) = i;
-    }
-    void swap(size_type i, size_type j) {
-      std::swap(std::vector<size_t>::operator[](i),
-		std::vector<size_t>::operator[](j));
-    }
-    
-  };
-
-  typedef basic_index *pbasic_index;
-
-  struct index_generator {
-
-    template <typename IT> static pbasic_index create_index(IT begin, IT end)
-    { return new basic_index(begin, end); }
-    static pbasic_index create_rindex(pbasic_index pbi)
-    { return new basic_index(pbi); }
-    static void attach(pbasic_index pbi) { if (pbi) pbi->nb_ref++; }
-    static void unattach(pbasic_index pbi)
-      { if (pbi && --(pbi->nb_ref) == 0) delete pbi; }
-
-  };
-
-  struct sub_index {
-
-    size_type first_, last_;
-    typedef basic_index base_type;
-    typedef base_type::const_iterator const_iterator;
-
-    mutable pbasic_index ind;
-    mutable pbasic_index rind;
-
-    void comp_extr(void) {
-      std::vector<size_t>::const_iterator it = ind->begin(), ite = ind->end();
-      if (it != ite) { first_=last_= *it; ++it; } else { first_=last_= 0; }
-      for (; it != ite; ++it) 
-	{ first_ = std::min(first_, *it); last_ = std::max(last_, *it); }
-    }
-
-    // inline void test_rind(void) const
-    //  { if (!rind) rind = index_generator::create_rindex(ind); }
-    size_type size(void) const { return ind->size(); }
-    size_type first(void) const { return first_; }
-    size_type last(void) const { return last_; }
-    size_type index(size_type i) const { return (*ind)[i]; }
-    size_type rindex(size_type i) const {
-      // test_rind();
-      if (i < rind->size()) return (*rind)[i]; else return size_type(-1);
-    }
-   
-    const_iterator  begin(void) const { return  ind->begin(); }
-    const_iterator    end(void) const { return  ind->end();   }
-    const_iterator rbegin(void) const {/*test_rind();*/ return rind->begin(); }
-    const_iterator   rend(void) const {/*test_rind();*/ return rind->end();   }
-
-    sub_index() : ind(0), rind(0) {}
-    template <typename IT> sub_index(IT it, IT ite)
-      : ind(index_generator::create_index(it, ite)),
-	rind(index_generator::create_rindex(ind)) { comp_extr(); }
-    template <typename CONT> sub_index(const CONT &c)
-      : ind(index_generator::create_index(c.begin(), c.end())),
-	rind(index_generator::create_rindex(ind))
-        { comp_extr(); }
-    ~sub_index()
-      { index_generator::unattach(rind); index_generator::unattach(ind); }
-    sub_index(const sub_index &si) : first_(si.first_), last_(si.last_),
-				     ind(si.ind), rind(si.rind)
-      { index_generator::attach(rind); index_generator::attach(ind); }
-    sub_index &operator =(const sub_index &si) {
-      index_generator::unattach(rind); index_generator::unattach(ind);
-      ind = si.ind; rind = si.rind; index_generator::attach(rind);
-      index_generator::attach(ind);
-      first_ = si.first_; last_ = si.last_;
-      return *this;
-    }
-  };
-
-  struct unsorted_sub_index : public sub_index {
-    template <typename IT> unsorted_sub_index(IT it, IT ite)
-      : sub_index(it, ite) {}
-    template <typename CONT> unsorted_sub_index(const CONT &c)
-      : sub_index(c) {}
-    unsorted_sub_index() {}
-    unsorted_sub_index(const unsorted_sub_index &si) : sub_index(si) {}
-    unsorted_sub_index &operator =(const unsorted_sub_index &si)
-    { sub_index::operator =(si); return *this; }
-    void swap(size_type i, size_type j) {
-      GMM_ASSERT2(ind->nb_ref <= 1, "Operation not allowed on this index");
-      if (rind) rind->swap((*ind)[i], (*ind)[j]);
-      ind->swap(i, j);
-    }
-  };
-
-  inline std::ostream &operator << (std::ostream &o, const sub_index &si) { 
-    o << "sub_index(";
-    if (si.size() != 0) o << si.index(0);
-    for (size_type i = 1; i < si.size(); ++i) o << ", " << si.index(i);
-    o << ")";
-    return o;
-  }
-
-  struct sub_interval {
-    size_type min, max; 
-
-    size_type size(void) const { return max - min; }
-    size_type first(void) const { return min; }
-    size_type last(void) const { return max; }
-    size_type index(size_type i) const { return min + i; }
-    size_type step(void) const { return 1; }
-    size_type rindex(size_type i) const
-    { if (i >= min && i < max) return i - min; return size_type(-1); }
-    sub_interval(size_type mi, size_type l) : min(mi), max(mi+l) {}
-    sub_interval() {}
-  };
-
-  inline std::ostream &operator << (std::ostream &o, const sub_interval &si)
-  { o << "sub_interval(" << si.min << ", " << si.size() << ")"; return o; }
-
-  struct sub_slice {
-    size_type min, max, N;
-
-    size_type size(void) const { return (max - min) / N; }
-    size_type first(void) const { return min; }
-    size_type last(void) const { return (min == max) ? max : max+1-N; }
-    size_type step(void) const { return N; }
-    size_type index(size_type i) const { return min + N * i; }
-    size_type rindex(size_type i) const { 
-      if (i >= min && i < max)
-	{ size_type j = (i - min); if (j % N == 0) return j / N; }
-      return size_type(-1);
-    }
-    sub_slice(size_type mi, size_type l, size_type n)
-      : min(mi), max(mi+l*n), N(n) {}
-    sub_slice(void) {}
-  };
-
-  inline std::ostream &operator << (std::ostream &o, const sub_slice &si) {
-    o << "sub_slice(" << si.min << ", " << si.size() << ", " << si.step() 
-      << ")"; return o;
-  }
-
-  template<class SUBI> struct index_is_sorted
-  {  typedef linalg_true bool_type; };
-  template<> struct index_is_sorted<unsorted_sub_index>
-  {  typedef linalg_false bool_type; };
-
-}
-
-#endif //  GMM_SUB_INDEX_H__
diff --git a/Contrib/gmm/gmm_sub_matrix.h b/Contrib/gmm/gmm_sub_matrix.h
deleted file mode 100755
index efc36bc..0000000
--- a/Contrib/gmm/gmm_sub_matrix.h
+++ /dev/null
@@ -1,409 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_sub_matrix.h
-   @author Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Generic sub-matrices.
-*/
-
-#ifndef GMM_SUB_MATRIX_H__
-#define GMM_SUB_MATRIX_H__
-
-#include "gmm_sub_vector.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*		sub row matrices type                                      */
-  /* ********************************************************************* */
-
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct gen_sub_row_matrix {
-    typedef gen_sub_row_matrix<PT, SUBI1, SUBI2> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef M * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_M;
-    typedef typename select_ref<typename linalg_traits<M>
-            ::const_row_iterator, typename linalg_traits<M>::row_iterator,
-	    PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    SUBI1 si1;
-    SUBI2 si2;
-    iterator begin_;
-    porigin_type origin;
-    
-    reference operator()(size_type i, size_type j) const 
-    { return linalg_traits<M>::access(begin_ + si1.index(i), si2.index(j)); }
-   
-    size_type nrows(void) const { return si1.size(); }
-    size_type ncols(void) const { return si2.size(); }
-    
-    gen_sub_row_matrix(ref_M m, const SUBI1 &s1, const SUBI2 &s2)
-      : si1(s1), si2(s2), begin_(mat_row_begin(m)),
-	origin(linalg_origin(m)) {}
-    gen_sub_row_matrix() {}
-    gen_sub_row_matrix(const gen_sub_row_matrix<CPT, SUBI1, SUBI2> &cr) :
-      si1(cr.si1), si2(cr.si2), begin_(cr.begin_),origin(cr.origin) {}
-  };
-
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct gen_sub_row_matrix_iterator {
-    typedef gen_sub_row_matrix<PT, SUBI1, SUBI2> this_type;
-    typedef typename modifiable_pointer<PT>::pointer MPT;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename select_ref<typename linalg_traits<M>
-            ::const_row_iterator, typename linalg_traits<M>::row_iterator,
-	    PT>::ref_type ITER;
-    typedef ITER value_type;
-    typedef ITER *pointer;
-    typedef ITER &reference;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-    typedef std::random_access_iterator_tag  iterator_category;
-    typedef gen_sub_row_matrix_iterator<PT, SUBI1, SUBI2> iterator;
-
-    ITER it;
-    SUBI1 si1;
-    SUBI2 si2;
-    size_type ii;
-    
-    iterator operator ++(int) { iterator tmp = *this; ii++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; ii--; return tmp; }
-    iterator &operator ++()   { ii++; return *this; }
-    iterator &operator --()   { ii--; return *this; }
-    iterator &operator +=(difference_type i) { ii += i; return *this; }
-    iterator &operator -=(difference_type i) { ii -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const { return ii - i.ii; }
-
-    ITER operator *() const { return it + si1.index(ii); }
-    ITER operator [](int i) { return it + si1.index(ii+i); }
-
-    bool operator ==(const iterator &i) const { return (ii == i.ii); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (ii < i.ii); }
-
-    gen_sub_row_matrix_iterator(void) {}
-    gen_sub_row_matrix_iterator(const 
-	     gen_sub_row_matrix_iterator<MPT, SUBI1, SUBI2> &itm)
-      : it(itm.it), si1(itm.si1), si2(itm.si2), ii(itm.ii) {}
-    gen_sub_row_matrix_iterator(const ITER &iter, const SUBI1 &s1,
-				const SUBI2 &s2, size_type i)
-      : it(iter), si1(s1), si2(s2), ii(i) { }
-    
-  };
-
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct linalg_traits<gen_sub_row_matrix<PT, SUBI1, SUBI2> > {
-    typedef gen_sub_row_matrix<PT, SUBI1, SUBI2> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef typename select_ref<value_type,
-            typename linalg_traits<M>::reference, PT>::ref_type reference;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type const_col_iterator;
-    typedef typename sub_vector_type<const typename
-            linalg_traits<M>::const_sub_row_type *, SUBI2>::vector_type
-            const_sub_row_type;
-    typedef typename select_ref<abstract_null_type, 
-            typename sub_vector_type<typename linalg_traits<M>::sub_row_type *,
-	    SUBI2>::vector_type, PT>::ref_type sub_row_type;
-    typedef gen_sub_row_matrix_iterator<typename const_pointer<PT>::pointer,
-	    SUBI1, SUBI2> const_row_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    gen_sub_row_matrix_iterator<PT, SUBI1, SUBI2>, PT>::ref_type
-            row_iterator;
-    typedef typename linalg_traits<const_sub_row_type>::storage_type
-            storage_type;
-    typedef row_major sub_orientation;
-    typedef linalg_true index_sorted;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return const_sub_row_type(linalg_traits<M>::row(*it), it.si2); }
-    static sub_row_type row(const row_iterator &it)
-    { return sub_row_type(linalg_traits<M>::row(*it), it.si2); }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m.begin_, m.si1, m.si2, 0); }
-    static row_iterator row_begin(this_type &m)
-    { return row_iterator(m.begin_, m.si1, m.si2, 0); }
-    static const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m.begin_, m.si1, m.si2,  m.nrows()); }
-    static row_iterator row_end(this_type &m)
-    { return row_iterator(m.begin_, m.si1, m.si2, m.nrows()); }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void do_clear(this_type &m) {
-      row_iterator it = mat_row_begin(m), ite = mat_row_end(m);
-      for (; it != ite; ++it) clear(row(it));
-    }
-    static value_type access(const const_row_iterator &itrow, size_type i)
-    { return linalg_traits<M>::access(*itrow, itrow.si2.index(i)); }
-    static reference access(const row_iterator &itrow, size_type i)
-    { return linalg_traits<M>::access(*itrow, itrow.si2.index(i)); }
-  };
-  
-  template <typename PT, typename SUBI1, typename SUBI2>
-  std::ostream &operator <<(std::ostream &o,
-			    const gen_sub_row_matrix<PT, SUBI1, SUBI2>& m)
-  { gmm::write(o,m); return o; }
-
-
-  /* ********************************************************************* */
-  /*		sub column matrices type                                   */
-  /* ********************************************************************* */
-
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct gen_sub_col_matrix {
-    typedef gen_sub_col_matrix<PT, SUBI1, SUBI2> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef M * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_M;
-    typedef typename select_ref<typename linalg_traits<M>
-            ::const_col_iterator, typename linalg_traits<M>::col_iterator,
-	    PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    SUBI1 si1;
-    SUBI2 si2;
-    iterator begin_;
-    porigin_type origin;
-    
-    reference operator()(size_type i, size_type j) const
-    { return linalg_traits<M>::access(begin_ + si2.index(j), si1.index(i)); }
-
-    size_type nrows(void) const { return si1.size(); }
-    size_type ncols(void) const { return si2.size(); }
-    
-    gen_sub_col_matrix(ref_M m, const SUBI1 &s1, const SUBI2 &s2)
-      : si1(s1), si2(s2), begin_(mat_col_begin(m)),
-        origin(linalg_origin(m)) {}
-    gen_sub_col_matrix() {}
-    gen_sub_col_matrix(const gen_sub_col_matrix<CPT, SUBI1, SUBI2> &cr) :
-      si1(cr.si1), si2(cr.si2), begin_(cr.begin_),origin(cr.origin) {}
-  };
-
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct gen_sub_col_matrix_iterator {
-    typedef gen_sub_col_matrix<PT, SUBI1, SUBI2> this_type;
-    typedef typename modifiable_pointer<PT>::pointer MPT;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename select_ref<typename linalg_traits<M>::const_col_iterator,
-				typename linalg_traits<M>::col_iterator,
-				PT>::ref_type ITER;
-    typedef ITER value_type;
-    typedef ITER *pointer;
-    typedef ITER &reference;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-    typedef std::random_access_iterator_tag  iterator_category;
-    typedef gen_sub_col_matrix_iterator<PT, SUBI1, SUBI2> iterator;
-
-    ITER it;
-    SUBI1 si1;
-    SUBI2 si2;
-    size_type ii;
-    
-    iterator operator ++(int) { iterator tmp = *this; ii++; return tmp; }
-    iterator operator --(int) { iterator tmp = *this; ii--; return tmp; }
-    iterator &operator ++()   { ii++; return *this; }
-    iterator &operator --()   { ii--; return *this; }
-    iterator &operator +=(difference_type i) { ii += i; return *this; }
-    iterator &operator -=(difference_type i) { ii -= i; return *this; }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const { return ii - i.ii; }
-
-    ITER operator *() const { return it + si2.index(ii); }
-    ITER operator [](int i) { return it + si2.index(ii+i); }
-
-    bool operator ==(const iterator &i) const { return (ii == i.ii); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (ii < i.ii); }
-
-    gen_sub_col_matrix_iterator(void) {}
-    gen_sub_col_matrix_iterator(const 
-	gen_sub_col_matrix_iterator<MPT, SUBI1, SUBI2> &itm)
-      : it(itm.it), si1(itm.si1), si2(itm.si2), ii(itm.ii) {}
-    gen_sub_col_matrix_iterator(const ITER &iter, const SUBI1 &s1,
-				const SUBI2 &s2, size_type i)
-      : it(iter), si1(s1), si2(s2), ii(i) { }
-  };
-
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct linalg_traits<gen_sub_col_matrix<PT, SUBI1, SUBI2> > {
-    typedef gen_sub_col_matrix<PT, SUBI1, SUBI2> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef typename select_ref<value_type,
-            typename linalg_traits<M>::reference, PT>::ref_type reference;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type const_row_iterator;
-    typedef typename sub_vector_type<const typename
-            linalg_traits<M>::const_sub_col_type *, SUBI1>::vector_type
-            const_sub_col_type;
-    typedef typename select_ref<abstract_null_type, 
-            typename sub_vector_type<typename linalg_traits<M>::sub_col_type *,
-	    SUBI1>::vector_type, PT>::ref_type sub_col_type;
-    typedef gen_sub_col_matrix_iterator<typename const_pointer<PT>::pointer,
-	    SUBI1, SUBI2> const_col_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    gen_sub_col_matrix_iterator<PT, SUBI1, SUBI2>, PT>::ref_type
-            col_iterator;
-    typedef col_major sub_orientation;
-    typedef linalg_true index_sorted;
-    typedef typename linalg_traits<const_sub_col_type>::storage_type
-    storage_type;
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return const_sub_col_type(linalg_traits<M>::col(*it), it.si1); }
-    static sub_col_type col(const col_iterator &it)
-    { return sub_col_type(linalg_traits<M>::col(*it), it.si1); }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m.begin_, m.si1, m.si2, 0); }
-    static col_iterator col_begin(this_type &m)
-    { return col_iterator(m.begin_, m.si1, m.si2, 0); }
-    static const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m.begin_, m.si1, m.si2,  m.ncols()); }
-    static col_iterator col_end(this_type &m)
-    { return col_iterator(m.begin_, m.si1, m.si2, m.ncols()); } 
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void do_clear(this_type &m) {
-      col_iterator it = mat_col_begin(m), ite = mat_col_end(m);
-      for (; it != ite; ++it) clear(col(it));
-    }
-    static value_type access(const const_col_iterator &itcol, size_type i)
-    { return linalg_traits<M>::access(*itcol, itcol.si1.index(i)); }
-    static reference access(const col_iterator &itcol, size_type i)
-    { return linalg_traits<M>::access(*itcol, itcol.si1.index(i)); }
-  };
-
-  template <typename PT, typename SUBI1, typename SUBI2> std::ostream &operator <<
-  (std::ostream &o, const gen_sub_col_matrix<PT, SUBI1, SUBI2>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*		sub matrices                                              */
-  /* ******************************************************************** */
-  
-  template <typename PT, typename SUBI1, typename SUBI2, typename ST>
-  struct sub_matrix_type_ {
-    typedef abstract_null_type return_type;
-  };
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct sub_matrix_type_<PT, SUBI1, SUBI2, col_major>
-  { typedef gen_sub_col_matrix<PT, SUBI1, SUBI2> matrix_type; };
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct sub_matrix_type_<PT, SUBI1, SUBI2, row_major>
-  { typedef gen_sub_row_matrix<PT, SUBI1, SUBI2> matrix_type; };
-  template <typename PT, typename SUBI1, typename SUBI2>
-  struct sub_matrix_type {
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename sub_matrix_type_<PT, SUBI1, SUBI2,
-        typename principal_orientation_type<typename
-        linalg_traits<M>::sub_orientation>::potype>::matrix_type matrix_type;
-  };
-
-  template <typename M, typename SUBI1, typename SUBI2>  inline
-    typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI2>
-    ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI2>::matrix_type,
-    M *>::return_type
-  sub_matrix(M &m, const SUBI1 &si1, const SUBI2 &si2) {
-    GMM_ASSERT2(si1.last() <= mat_nrows(m) && si2.last() <= mat_ncols(m),
-		"sub matrix too large");
-    return typename select_return<typename sub_matrix_type<const M *, SUBI1,
-      SUBI2>::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI2>
-      ::matrix_type, M *>::return_type(linalg_cast(m), si1, si2);
-  }
-
-  template <typename M, typename SUBI1, typename SUBI2>  inline
-    typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI2>
-    ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI2>::matrix_type,
-    const M *>::return_type
-  sub_matrix(const M &m, const SUBI1 &si1, const SUBI2 &si2) {
-    GMM_ASSERT2(si1.last() <= mat_nrows(m) && si2.last() <= mat_ncols(m),
-		"sub matrix too large");
-    return typename select_return<typename sub_matrix_type<const M *, SUBI1,
-      SUBI2>::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI2>
-      ::matrix_type, const M *>::return_type(linalg_cast(m), si1, si2);
-  }
-
-  template <typename M, typename SUBI1>  inline
-    typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI1>
-    ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI1>::matrix_type,
-    M *>::return_type
-  sub_matrix(M &m, const SUBI1 &si1) {
-    GMM_ASSERT2(si1.last() <= mat_nrows(m) && si1.last() <= mat_ncols(m),
-		"sub matrix too large");
-    return typename select_return<typename sub_matrix_type<const M *, SUBI1,
-      SUBI1>::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI1>
-      ::matrix_type, M *>::return_type(linalg_cast(m), si1, si1);
-  }
-
-  template <typename M, typename SUBI1>  inline
-    typename select_return<typename sub_matrix_type<const M *, SUBI1, SUBI1>
-    ::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI1>::matrix_type,
-    const M *>::return_type
-  sub_matrix(const M &m, const SUBI1 &si1) {
-    GMM_ASSERT2(si1.last() <= mat_nrows(m) && si1.last() <= mat_ncols(m),
-		"sub matrix too large");
-    return typename select_return<typename sub_matrix_type<const M *, SUBI1,
-      SUBI1>::matrix_type, typename sub_matrix_type<M *, SUBI1, SUBI1>
-      ::matrix_type, const M *>::return_type(linalg_cast(m), si1, si1);
-  }
-
-}
-
-#endif //  GMM_SUB_MATRIX_H__
diff --git a/Contrib/gmm/gmm_sub_vector.h b/Contrib/gmm/gmm_sub_vector.h
deleted file mode 100755
index 4f3292d..0000000
--- a/Contrib/gmm/gmm_sub_vector.h
+++ /dev/null
@@ -1,557 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_sub_vector.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Generic sub-vectors.
-*/
-
-#ifndef GMM_SUB_VECTOR_H__
-#define GMM_SUB_VECTOR_H__
-
-#include "gmm_interface.h"
-#include "gmm_sub_index.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*		sparse sub-vectors                                         */
-  /* ********************************************************************* */
-
-  template <typename IT, typename MIT, typename SUBI>
-  struct sparse_sub_vector_iterator {
-
-    IT itb, itbe;
-    SUBI si;
-
-    typedef std::iterator_traits<IT>                traits_type;
-    typedef typename traits_type::value_type        value_type;
-    typedef typename traits_type::pointer           pointer;
-    typedef typename traits_type::reference         reference;
-    typedef typename traits_type::difference_type   difference_type;
-    typedef std::bidirectional_iterator_tag         iterator_category;
-    typedef size_t                                  size_type;
-    typedef sparse_sub_vector_iterator<IT, MIT, SUBI>    iterator;
-
-    size_type index(void) const { return si.rindex(itb.index()); }
-    void forward(void);
-    void backward(void);
-    iterator &operator ++()
-    { ++itb; forward(); return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator &operator --()
-    { --itb; backward(); return *this; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-    reference operator *() const { return *itb; }
-
-    bool operator ==(const iterator &i) const { return itb == i.itb; }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-
-    sparse_sub_vector_iterator(void) {}
-    sparse_sub_vector_iterator(const IT &it, const IT &ite, const SUBI &s)
-      : itb(it), itbe(ite), si(s) { forward(); }
-    sparse_sub_vector_iterator(const sparse_sub_vector_iterator<MIT, MIT,
-	 SUBI> &it) : itb(it.itb), itbe(it.itbe), si(it.si) {}
-  };
-
-  template <typename IT, typename MIT, typename SUBI>
-  void  sparse_sub_vector_iterator<IT, MIT, SUBI>::forward(void)
-  { while(itb!=itbe && index()==size_type(-1)) { ++itb; } }
-
-  template <typename IT, typename MIT, typename SUBI>
-  void  sparse_sub_vector_iterator<IT, MIT, SUBI>::backward(void)
-  { while(itb!=itbe && index()==size_type(-1)) --itb; }
-
-  template <typename PT, typename SUBI> struct sparse_sub_vector {
-    typedef sparse_sub_vector<PT, SUBI> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef V * CPT;
-    typedef typename select_ref<typename linalg_traits<V>::const_iterator,
-            typename linalg_traits<V>::iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    SUBI si;
-
-    size_type size(void) const { return si.size(); }
-   
-    reference operator[](size_type i) const
-    { return linalg_traits<V>::access(origin, begin_, end_, si.index(i)); }
-
-    sparse_sub_vector(V &v, const SUBI &s) : begin_(vect_begin(v)),
-       end_(vect_end(v)), origin(linalg_origin(v)), si(s) {}
-    sparse_sub_vector(const V &v, const SUBI &s) 
-      : begin_(vect_begin(const_cast<V &>(v))),
-       end_(vect_end(const_cast<V &>(v))),
-	origin(linalg_origin(const_cast<V &>(v))), si(s) {}
-    sparse_sub_vector() {}
-    sparse_sub_vector(const sparse_sub_vector<CPT, SUBI> &cr)
-      : begin_(cr.begin_),end_(cr.end_),origin(cr.origin), si(cr.si) {} 
-  };
-
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_begin(sparse_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, sparse_sub_vector<PT, SUBI> *,
-		    linalg_modifiable) {
-    typedef sparse_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_begin(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(it.itbe, o, typename linalg_traits<VECT>::pV(), ref_t());
-    it.forward();
-  }
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_begin(sparse_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, const sparse_sub_vector<PT, SUBI> *, 
-		    linalg_modifiable) {
-    typedef sparse_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_begin(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(it.itbe, o, typename linalg_traits<VECT>::pV(), ref_t());
-    it.forward();
-  }
-  
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_end(sparse_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, sparse_sub_vector<PT, SUBI> *, linalg_modifiable) {
-    typedef sparse_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_end(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(it.itbe, o, typename linalg_traits<VECT>::pV(), ref_t());
-    it.forward();
-  }
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_end(sparse_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, const sparse_sub_vector<PT, SUBI> *,
-		  linalg_modifiable) {
-    typedef sparse_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    set_to_end(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(it.itbe, o, typename linalg_traits<VECT>::pV(), ref_t());
-    it.forward();
-  }
-
-  template <typename PT, typename SUBI>
-  struct linalg_traits<sparse_sub_vector<PT, SUBI> > {
-    typedef sparse_sub_vector<PT, SUBI> this_type;
-    typedef this_type * pthis_type;
-    typedef PT pV;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename linalg_and<typename index_is_sorted<SUBI>::bool_type,
-	    typename linalg_traits<V>::index_sorted>::bool_type index_sorted;
-    typedef typename linalg_traits<V>::is_reference V_reference;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename select_ref<value_type, typename
-            linalg_traits<V>::reference, PT>::ref_type reference;
-    typedef typename select_ref<typename linalg_traits<V>::const_iterator,
-	    typename linalg_traits<V>::iterator, PT>::ref_type pre_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    sparse_sub_vector_iterator<pre_iterator, pre_iterator, SUBI>,
-	    PT>::ref_type iterator;
-    typedef sparse_sub_vector_iterator<typename linalg_traits<V>
-            ::const_iterator, pre_iterator, SUBI> const_iterator;
-    typedef abstract_sparse storage_type;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) {
-      iterator it;
-      it.itb = v.begin_; it.itbe = v.end_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	set_to_begin(it, v.origin, pthis_type(), is_reference());
-      else it.forward();
-      return it;
-    }
-    static const_iterator begin(const this_type &v) {
-      const_iterator it; it.itb = v.begin_; it.itbe = v.end_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	{ set_to_begin(it, v.origin, pthis_type(), is_reference()); }
-      else it.forward();
-      return it;
-    }
-    static iterator end(this_type &v) {
-      iterator it;
-      it.itb = v.end_; it.itbe = v.end_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	set_to_end(it, v.origin, pthis_type(), is_reference());
-      else it.forward();
-      return it;
-    }
-    static const_iterator end(const this_type &v) {
-      const_iterator it; it.itb = v.end_; it.itbe = v.end_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	set_to_end(it, v.origin, pthis_type(), is_reference());
-      else it.forward();
-      return it;
-    }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void clear(origin_type* o, const iterator &begin_,
-		      const iterator &end_) {
-      std::deque<size_type> ind;
-      iterator it = begin_;
-      for (; it != end_; ++it) ind.push_front(it.index());
-      for (; !(ind.empty()); ind.pop_back())
-	access(o, begin_, end_, ind.back()) = value_type(0);
-    }
-    static void do_clear(this_type &v) { clear(v.origin, begin(v), end(v)); }
-    static value_type access(const origin_type *o, const const_iterator &it,
-			     const const_iterator &ite, size_type i)
-    { return linalg_traits<V>::access(o, it.itb, ite.itb, it.si.index(i)); }
-    static reference access(origin_type *o, const iterator &it,
-			    const iterator &ite, size_type i)
-    { return linalg_traits<V>::access(o, it.itb, ite.itb, it.si.index(i)); }
-  };
-
-  template <typename PT, typename SUBI> std::ostream &operator <<
-  (std::ostream &o, const sparse_sub_vector<PT, SUBI>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ********************************************************************* */
-  /*		skyline sub-vectors                                        */
-  /* ********************************************************************* */
-
-    template <typename IT, typename MIT, typename SUBI>
-  struct skyline_sub_vector_iterator {
-
-    IT itb;
-    SUBI si;
-
-    typedef std::iterator_traits<IT>                traits_type;
-    typedef typename traits_type::value_type        value_type;
-    typedef typename traits_type::pointer           pointer;
-    typedef typename traits_type::reference         reference;
-    typedef typename traits_type::difference_type   difference_type;
-    typedef std::bidirectional_iterator_tag         iterator_category;
-    typedef size_t                                  size_type;
-    typedef skyline_sub_vector_iterator<IT, MIT, SUBI>    iterator;
-
-    size_type index(void) const
-    { return (itb.index() - si.min + si.step() - 1) / si.step(); }
-    void backward(void);
-    iterator &operator ++()
-    { itb += si.step(); return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator &operator --()
-    { itb -= si.step(); return *this; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-
-    iterator &operator +=(difference_type i)
-    { itb += si.step() * i; return *this; }
-    iterator &operator -=(difference_type i)
-    { itb -= si.step() * i; return *this; }
-    iterator operator +(difference_type i) const
-    { iterator ii = *this; return (ii += i); }
-    iterator operator -(difference_type i) const
-    { iterator ii = *this; return (ii -= i); }
-    difference_type operator -(const iterator &i) const
-    { return (itb - i.itb) / si.step(); }
-
-    reference operator *() const  { return *itb; }
-    reference operator [](int ii) { return *(itb + ii * si.step());  }
-
-    bool operator ==(const iterator &i) const { return index() == i.index();}
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return index()  < i.index();}
-
-    skyline_sub_vector_iterator(void) {}
-    skyline_sub_vector_iterator(const IT &it, const SUBI &s)
-      : itb(it), si(s) {}
-    skyline_sub_vector_iterator(const skyline_sub_vector_iterator<MIT, MIT,
-	 SUBI> &it) : itb(it.itb), si(it.si) {}
-  };
-
-  template <typename IT, typename SUBI>
-  void update_for_sub_skyline(IT &it, IT &ite, const SUBI &si) {
-    if (it.index() >= si.max || ite.index() <= si.min) { it = ite; return; }
-    ptrdiff_t dec1 = si.min - it.index(), dec2 = ite.index() - si.max;
-    it  += (dec1 < 0) ? ((si.step()-((-dec1) % si.step())) % si.step()) : dec1;
-    ite -= (dec2 < 0) ? -((-dec2) % si.step()) : dec2;
-  }
-
-  template <typename PT, typename SUBI> struct skyline_sub_vector {
-    typedef skyline_sub_vector<PT, SUBI> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef V * pV;
-    typedef typename select_ref<typename linalg_traits<V>::const_iterator,
-            typename linalg_traits<V>::iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    SUBI si;
-
-    size_type size(void) const { return si.size(); }
-   
-    reference operator[](size_type i) const
-    { return linalg_traits<V>::access(origin, begin_, end_, si.index(i)); }
-
-    skyline_sub_vector(V &v, const SUBI &s) : begin_(vect_begin(v)),
-       end_(vect_end(v)), origin(linalg_origin(v)), si(s) {
-      update_for_sub_skyline(begin_, end_, si);
-    }
-    skyline_sub_vector(const V &v, const SUBI &s)
-      : begin_(vect_begin(const_cast<V &>(v))),
-	end_(vect_end(const_cast<V &>(v))),
-	origin(linalg_origin(const_cast<V &>(v))), si(s) {
-      update_for_sub_skyline(begin_, end_, si);
-    }
-    skyline_sub_vector() {}
-    skyline_sub_vector(const skyline_sub_vector<pV, SUBI> &cr)
-      : begin_(cr.begin_),end_(cr.end_),origin(cr.origin), si(cr.si) {}
-  };
-
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_begin(skyline_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, skyline_sub_vector<PT, SUBI> *,
-		    linalg_modifiable) {
-    typedef skyline_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    IT itbe = it.itb;
-    set_to_begin(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(itbe, o, typename linalg_traits<VECT>::pV(), ref_t());
-    update_for_sub_skyline(it.itb, itbe, it.si);
-  }
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_begin(skyline_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, const skyline_sub_vector<PT, SUBI> *,
-		    linalg_modifiable) {
-    typedef skyline_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    IT itbe = it.itb;
-    set_to_begin(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(itbe, o, typename linalg_traits<VECT>::pV(), ref_t());
-    update_for_sub_skyline(it.itb, itbe, it.si);
-  }
-  
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_end(skyline_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, skyline_sub_vector<PT, SUBI> *,
-		  linalg_modifiable) {
-    typedef skyline_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    IT itb = it.itb;
-    set_to_begin(itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    update_for_sub_skyline(itb, it.itb, it.si);
-  }
-  template <typename IT, typename MIT, typename SUBI, typename ORG,
-	    typename PT> inline
-  void set_to_end(skyline_sub_vector_iterator<IT, MIT, SUBI> &it,
-		    ORG o, const skyline_sub_vector<PT, SUBI> *,
-		  linalg_modifiable) {
-    typedef skyline_sub_vector<PT, SUBI> VECT;
-    typedef typename linalg_traits<VECT>::V_reference ref_t;
-    IT itb = it.itb;
-    set_to_begin(itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    set_to_end(it.itb, o, typename linalg_traits<VECT>::pV(), ref_t());
-    update_for_sub_skyline(itb, it.itb, it.si);   
-  }
-
-
-  template <typename PT, typename SUBI>
-  struct linalg_traits<skyline_sub_vector<PT, SUBI> > {
-    typedef skyline_sub_vector<PT, SUBI> this_type;
-    typedef this_type *pthis_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename linalg_traits<V>::is_reference V_reference;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef V * pV;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_vector linalg_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename select_ref<value_type, typename
-            linalg_traits<V>::reference, PT>::ref_type reference;
-    typedef typename linalg_traits<V>::const_iterator const_V_iterator;
-    typedef typename linalg_traits<V>::iterator V_iterator;    
-    typedef typename select_ref<const_V_iterator, V_iterator, 
-				PT>::ref_type pre_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    skyline_sub_vector_iterator<pre_iterator, pre_iterator, SUBI>,
-	    PT>::ref_type iterator;
-    typedef skyline_sub_vector_iterator<const_V_iterator, pre_iterator, SUBI>
-            const_iterator;
-    typedef abstract_skyline storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) {
-      iterator it;
-      it.itb = v.begin_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	set_to_begin(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static const_iterator begin(const this_type &v) {
-      const_iterator it; it.itb = v.begin_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	{ set_to_begin(it, v.origin, pthis_type(), is_reference()); }
-      return it;
-    }
-    static iterator end(this_type &v) {
-      iterator it;
-      it.itb = v.end_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	set_to_end(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static const_iterator end(const this_type &v) {
-      const_iterator it; it.itb = v.end_; it.si = v.si;
-      if (!is_const_reference(is_reference()))
-	set_to_end(it, v.origin, pthis_type(), is_reference());
-      return it;
-    }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void clear(origin_type*, const iterator &it, const iterator &ite)
-    { std::fill(it, ite, value_type(0)); }
-    static void do_clear(this_type &v) { clear(v.origin, begin(v), end(v)); }
-    static value_type access(const origin_type *o, const const_iterator &it,
-			     const const_iterator &ite, size_type i)
-    { return linalg_traits<V>::access(o, it.itb, ite.itb, it.si.index(i)); }
-    static reference access(origin_type *o, const iterator &it,
-			    const iterator &ite, size_type i)
-    { return linalg_traits<V>::access(o, it.itb, ite.itb, it.si.index(i)); }
-  };
-
-  template <typename PT, typename SUBI> std::ostream &operator <<
-  (std::ostream &o, const skyline_sub_vector<PT, SUBI>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*		sub vector.                                               */
-  /* ******************************************************************** */
-  /* sub_vector_type<PT, SUBI>::vector_type is the sub vector type        */
-  /* returned by sub_vector(v, sub_index)                                 */
-  /************************************************************************/
-
-  template <typename PT, typename SUBI, typename st_type> struct svrt_ir {
-    typedef abstract_null_type vector_type;
-  };
-
-  template <typename PT>
-  struct svrt_ir<PT, sub_index, abstract_dense> {
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename vect_ref_type<PT,  V>::iterator iterator;
-    typedef tab_ref_index_ref_with_origin<iterator,
-      sub_index::const_iterator, V> vector_type;
-  }; 
-
-  template <typename PT>
-  struct svrt_ir<PT, unsorted_sub_index, abstract_dense> {
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename vect_ref_type<PT,  V>::iterator iterator;
-    typedef tab_ref_index_ref_with_origin<iterator,
-      unsorted_sub_index::const_iterator, V> vector_type;
-  }; 
-
-  template <typename PT>
-  struct svrt_ir<PT, sub_interval, abstract_dense> {
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename vect_ref_type<PT,  V>::iterator iterator;
-    typedef tab_ref_with_origin<iterator, V> vector_type;
-  }; 
-
-  template <typename PT>
-  struct svrt_ir<PT, sub_slice, abstract_dense> {
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename vect_ref_type<PT,  V>::iterator iterator;
-    typedef tab_ref_reg_spaced_with_origin<iterator, V> vector_type;
-  };
-
-  template <typename PT, typename SUBI>
-  struct svrt_ir<PT, SUBI, abstract_skyline> {
-    typedef skyline_sub_vector<PT, SUBI> vector_type;
-  };
-
-  template <typename PT>
-  struct svrt_ir<PT, sub_index, abstract_skyline> {
-    typedef sparse_sub_vector<PT, sub_index> vector_type;
-  };
-
-  template <typename PT>
-  struct svrt_ir<PT, unsorted_sub_index, abstract_skyline> {
-    typedef sparse_sub_vector<PT, unsorted_sub_index> vector_type;
-  };
-
-
-  template <typename PT, typename SUBI>
-  struct svrt_ir<PT, SUBI, abstract_sparse> {
-    typedef sparse_sub_vector<PT, SUBI> vector_type;
-  };
-
-  template <typename PT, typename SUBI>
-  struct sub_vector_type {
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename svrt_ir<PT, SUBI,
-      typename linalg_traits<V>::storage_type>::vector_type vector_type;
-  };
-
-  template <typename V, typename SUBI>
-  typename select_return<
-    typename sub_vector_type<const V *, SUBI>::vector_type,
-    typename sub_vector_type<V *, SUBI>::vector_type, const V *>::return_type
-  sub_vector(const V &v, const SUBI &si) {
-    GMM_ASSERT2(si.last() <= vect_size(v), "sub vector too large");
-    return typename select_return<
-      typename sub_vector_type<const V *, SUBI>::vector_type,
-      typename sub_vector_type<V *, SUBI>::vector_type, const V *>::return_type
-      (linalg_cast(v), si);
-  }
-
-  template <typename V, typename SUBI>
-  typename select_return<
-    typename sub_vector_type<const V *, SUBI>::vector_type,
-    typename sub_vector_type<V *, SUBI>::vector_type, V *>::return_type
-  sub_vector(V &v, const SUBI &si) {
-    GMM_ASSERT2(si.last() <= vect_size(v), "sub vector too large");
-    return  typename select_return<
-      typename sub_vector_type<const V *, SUBI>::vector_type,
-      typename sub_vector_type<V *, SUBI>::vector_type, V *>::return_type
-      (linalg_cast(v), si);
-  }
-
-}
-
-#endif //  GMM_SUB_VECTOR_H__
diff --git a/Contrib/gmm/gmm_superlu_interface.h b/Contrib/gmm/gmm_superlu_interface.h
deleted file mode 100755
index eb32435..0000000
--- a/Contrib/gmm/gmm_superlu_interface.h
+++ /dev/null
@@ -1,406 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_superlu_interface.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 17, 2003.
-   @brief Interface with SuperLU (LU direct solver for sparse matrices).
-*/
-#if defined(GMM_USES_SUPERLU) && !defined(GETFEM_VERSION)
-
-#ifndef GMM_SUPERLU_INTERFACE_H
-#define GMM_SUPERLU_INTERFACE_H
-
-#include "gmm_kernel.h"
-
-typedef int int_t;
-
-/* because SRC/util.h defines TRUE and FALSE ... */
-#ifdef TRUE
-# undef TRUE
-#endif
-#ifdef FALSE
-# undef FALSE
-#endif
-
-#include "SRC/slu_Cnames.h"
-#include "SRC/supermatrix.h"
-#include "SRC/slu_util.h"
-
-namespace SuperLU_S {
-#include "SRC/slu_sdefs.h"
-}
-namespace SuperLU_D {
-#include "SRC/slu_ddefs.h"
-}
-namespace SuperLU_C {
-#include "SRC/slu_cdefs.h"
-}
-namespace SuperLU_Z {
-#include "SRC/slu_zdefs.h" 
-}
-
-
-
-namespace gmm {
-
-  /*  interface for Create_CompCol_Matrix */
-
-  inline void Create_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
-			     float *a, int *ir, int *jc) {
-    SuperLU_S::sCreate_CompCol_Matrix(A, m, n, nnz, a, ir, jc,
-				      SLU_NC, SLU_S, SLU_GE);
-  }
-  
-  inline void Create_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
-			     double *a, int *ir, int *jc) {
-    SuperLU_D::dCreate_CompCol_Matrix(A, m, n, nnz, a, ir, jc,
-				      SLU_NC, SLU_D, SLU_GE);
-  }
-  
-  inline void Create_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
-			     std::complex<float> *a, int *ir, int *jc) {
-    SuperLU_C::cCreate_CompCol_Matrix(A, m, n, nnz, (SuperLU_C::complex *)(a),
-				      ir, jc, SLU_NC, SLU_C, SLU_GE);
-  }
-  
-  inline void Create_CompCol_Matrix(SuperMatrix *A, int m, int n, int nnz,
-			     std::complex<double> *a, int *ir, int *jc) {
-    SuperLU_Z::zCreate_CompCol_Matrix(A, m, n, nnz,
-				      (SuperLU_Z::doublecomplex *)(a), ir, jc,
-				      SLU_NC, SLU_Z, SLU_GE);
-  }
-
-  /*  interface for Create_Dense_Matrix */
-
-  inline void Create_Dense_Matrix(SuperMatrix *A, int m, int n, float *a, int k)
-  { SuperLU_S::sCreate_Dense_Matrix(A, m, n, a, k, SLU_DN, SLU_S, SLU_GE); }
-  inline void Create_Dense_Matrix(SuperMatrix *A, int m, int n, double *a, int k)
-  { SuperLU_D::dCreate_Dense_Matrix(A, m, n, a, k, SLU_DN, SLU_D, SLU_GE); }
-  inline void Create_Dense_Matrix(SuperMatrix *A, int m, int n,
-			   std::complex<float> *a, int k) {
-    SuperLU_C::cCreate_Dense_Matrix(A, m, n, (SuperLU_C::complex *)(a),
-				    k, SLU_DN, SLU_C, SLU_GE);
-  }
-  inline void Create_Dense_Matrix(SuperMatrix *A, int m, int n, 
-			   std::complex<double> *a, int k) {
-    SuperLU_Z::zCreate_Dense_Matrix(A, m, n, (SuperLU_Z::doublecomplex *)(a),
-				    k, SLU_DN, SLU_Z, SLU_GE);
-  }
-
-  /*  interface for gssv */
-
-#define DECL_GSSV(NAMESPACE,FNAME,FLOATTYPE,KEYTYPE) \
-  inline void SuperLU_gssv(superlu_options_t *options, SuperMatrix *A, int *p, \
-  int *q, SuperMatrix *L, SuperMatrix *U, SuperMatrix *B,               \
-  SuperLUStat_t *stats, int *info, KEYTYPE) {                           \
-  NAMESPACE::FNAME(options, A, p, q, L, U, B, stats, info);             \
-  }
-
-  DECL_GSSV(SuperLU_S,sgssv,float,float)
-  DECL_GSSV(SuperLU_C,cgssv,float,std::complex<float>)
-  DECL_GSSV(SuperLU_D,dgssv,double,double)
-  DECL_GSSV(SuperLU_Z,zgssv,double,std::complex<double>)
-
-  /*  interface for gssvx */
-
-#define DECL_GSSVX(NAMESPACE,FNAME,FLOATTYPE,KEYTYPE) \
-    inline float SuperLU_gssvx(superlu_options_t *options, SuperMatrix *A,	\
-		     int *perm_c, int *perm_r, int *etree, char *equed,  \
-		     FLOATTYPE *R, FLOATTYPE *C, SuperMatrix *L,         \
-		     SuperMatrix *U, void *work, int lwork,              \
-		     SuperMatrix *B, SuperMatrix *X,                     \
-		     FLOATTYPE *recip_pivot_growth,                      \
-		     FLOATTYPE *rcond, FLOATTYPE *ferr, FLOATTYPE *berr, \
-		     SuperLUStat_t *stats, int *info, KEYTYPE) {         \
-    NAMESPACE::mem_usage_t mem_usage;                                    \
-    NAMESPACE::FNAME(options, A, perm_c, perm_r, etree, equed, R, C, L,  \
-		     U, work, lwork, B, X, recip_pivot_growth, rcond,    \
-		     ferr, berr, &mem_usage, stats, info);               \
-    return mem_usage.for_lu; /* bytes used by the factor storage */     \
-  }
-
-  DECL_GSSVX(SuperLU_S,sgssvx,float,float)
-  DECL_GSSVX(SuperLU_C,cgssvx,float,std::complex<float>)
-  DECL_GSSVX(SuperLU_D,dgssvx,double,double)
-  DECL_GSSVX(SuperLU_Z,zgssvx,double,std::complex<double>)
-
-  /* ********************************************************************* */
-  /*   SuperLU solve interface                                             */
-  /* ********************************************************************* */
-
-  template <typename MAT, typename VECTX, typename VECTB>
-  void SuperLU_solve(const MAT &A, const VECTX &X_, const VECTB &B,
-		     double& rcond_, int permc_spec = 3) {
-    VECTX &X = const_cast<VECTX &>(X_);
-    /*
-     * Get column permutation vector perm_c[], according to permc_spec:
-     *   permc_spec = 0: use the natural ordering 
-     *   permc_spec = 1: use minimum degree ordering on structure of A'*A
-     *   permc_spec = 2: use minimum degree ordering on structure of A'+A
-     *   permc_spec = 3: use approximate minimum degree column ordering
-     */
-    typedef typename linalg_traits<MAT>::value_type T;
-    typedef typename number_traits<T>::magnitude_type R;
-
-    int m = mat_nrows(A), n = mat_ncols(A), nrhs = 1, info = 0;
-
-    csc_matrix<T> csc_A(m, n); gmm::copy(A, csc_A);
-    std::vector<T> rhs(m), sol(m);
-    gmm::copy(B, rhs);
-
-    int nz = nnz(csc_A);
-    if ((2 * nz / n) >= m)
-      GMM_WARNING2("CAUTION : it seems that SuperLU has a problem"
-		  " for nearly dense sparse matrices");
-
-    superlu_options_t options;
-    set_default_options(&options);
-    options.ColPerm = NATURAL;
-    options.PrintStat = NO;
-    options.ConditionNumber = YES;
-    switch (permc_spec) {
-    case 1 : options.ColPerm = MMD_ATA; break;
-    case 2 : options.ColPerm = MMD_AT_PLUS_A; break;
-    case 3 : options.ColPerm = COLAMD; break;
-    }
-    SuperLUStat_t stat;
-    StatInit(&stat);
-
-    SuperMatrix SA, SL, SU, SB, SX; // SuperLU format.
-    Create_CompCol_Matrix(&SA, m, n, nz, csc_A.pr,
-			  (int *)(csc_A.ir), (int *)(csc_A.jc));
-    Create_Dense_Matrix(&SB, m, nrhs, &rhs[0], m);
-    Create_Dense_Matrix(&SX, m, nrhs, &sol[0], m);
-    memset(&SL,0,sizeof SL);
-    memset(&SU,0,sizeof SU);
-
-    std::vector<int> etree(n);
-    char equed[] = "B";
-    std::vector<R> Rscale(m),Cscale(n); // row scale factors
-    std::vector<R> ferr(nrhs), berr(nrhs);
-    R recip_pivot_gross, rcond;
-    std::vector<int> perm_r(m), perm_c(n);
-
-    SuperLU_gssvx(&options, &SA, &perm_c[0], &perm_r[0], 
-		  &etree[0] /* output */, equed /* output         */, 
-		  &Rscale[0] /* row scale factors (output)        */, 
-		  &Cscale[0] /* col scale factors (output)        */,
-		  &SL /* fact L (output)*/, &SU /* fact U (output)*/, 
-		  NULL /* work                                    */, 
-		  0 /* lwork: superlu auto allocates (input)      */, 
-		  &SB /* rhs */, &SX /* solution                  */,
-		  &recip_pivot_gross /* reciprocal pivot growth   */
-		  /* factor max_j( norm(A_j)/norm(U_j) ).         */,  
-		  &rcond /*estimate of the reciprocal condition   */
-		  /* number of the matrix A after equilibration   */,
-		  &ferr[0] /* estimated forward error             */,
-		  &berr[0] /* relative backward error             */,
-		  &stat, &info, T());
-    rcond_ = rcond;
-    Destroy_SuperMatrix_Store(&SB);
-    Destroy_SuperMatrix_Store(&SX);
-    Destroy_SuperMatrix_Store(&SA);
-    Destroy_SuperNode_Matrix(&SL);
-    Destroy_CompCol_Matrix(&SU);
-    StatFree(&stat);
-    GMM_ASSERT1(info == 0, "SuperLU solve failed: info=" << info);
-    gmm::copy(sol, X);
-  }
-
-  template <class T> class SuperLU_factor {
-    typedef typename number_traits<T>::magnitude_type R;
-
-    csc_matrix<T> csc_A;
-    mutable SuperMatrix SA, SL, SB, SU, SX;
-    mutable SuperLUStat_t stat;
-    mutable superlu_options_t options;
-    float memory_used;
-    mutable std::vector<int> etree, perm_r, perm_c;
-    mutable std::vector<R> Rscale, Cscale;
-    mutable std::vector<R> ferr, berr;
-    mutable std::vector<T> rhs;
-    mutable std::vector<T> sol;
-    mutable bool is_init;
-    mutable char equed;
-
-  public :
-    enum { LU_NOTRANSP, LU_TRANSP, LU_CONJUGATED };
-    void free_supermatrix(void);
-    template <class MAT> void build_with(const MAT &A,  int permc_spec = 3);
-    template <typename VECTX, typename VECTB> 
-    /* transp = LU_NOTRANSP   -> solves Ax = B
-       transp = LU_TRANSP     -> solves A'x = B
-       transp = LU_CONJUGATED -> solves conj(A)X = B */
-    void solve(const VECTX &X_, const VECTB &B, int transp=LU_NOTRANSP) const;
-    SuperLU_factor(void) { is_init = false; }
-    SuperLU_factor(const SuperLU_factor& other) {
-      GMM_ASSERT2(!(other.is_init),
-		 "copy of initialized SuperLU_factor is forbidden");
-      is_init = false;
-    }
-    SuperLU_factor& operator=(const SuperLU_factor& other) {
-      GMM_ASSERT2(!(other.is_init) && !is_init,
-		  "assignment of initialized SuperLU_factor is forbidden");
-      return *this;
-    }
-    ~SuperLU_factor() { free_supermatrix(); }
-    float memsize() { return memory_used; }
-  };
-
-
-  template <class T> void SuperLU_factor<T>::free_supermatrix(void) {
-      if (is_init) {
-	if (SB.Store) Destroy_SuperMatrix_Store(&SB);
-	if (SX.Store) Destroy_SuperMatrix_Store(&SX);
-	if (SA.Store) Destroy_SuperMatrix_Store(&SA);
-	if (SL.Store) Destroy_SuperNode_Matrix(&SL);
-	if (SU.Store) Destroy_CompCol_Matrix(&SU);
-      }
-    }
-
-    
-    template <class T> template <class MAT>
-    void SuperLU_factor<T>::build_with(const MAT &A,  int permc_spec) {
-    /*
-     * Get column permutation vector perm_c[], according to permc_spec:
-     *   permc_spec = 0: use the natural ordering 
-     *   permc_spec = 1: use minimum degree ordering on structure of A'*A
-     *   permc_spec = 2: use minimum degree ordering on structure of A'+A
-     *   permc_spec = 3: use approximate minimum degree column ordering
-     */
-      free_supermatrix();
-      int n = mat_nrows(A), m = mat_ncols(A), info = 0;
-      csc_A.init_with(A);
-
-      rhs.resize(m); sol.resize(m);
-      gmm::clear(rhs);
-      int nz = nnz(csc_A);
-
-      set_default_options(&options);
-      options.ColPerm = NATURAL;
-      options.PrintStat = NO;
-      options.ConditionNumber = NO;
-      switch (permc_spec) {
-      case 1 : options.ColPerm = MMD_ATA; break;
-      case 2 : options.ColPerm = MMD_AT_PLUS_A; break;
-      case 3 : options.ColPerm = COLAMD; break;
-      }
-      StatInit(&stat);
-      
-      Create_CompCol_Matrix(&SA, m, n, nz, csc_A.pr,
-			    (int *)(csc_A.ir), (int *)(csc_A.jc));
-      Create_Dense_Matrix(&SB, m, 0, &rhs[0], m);
-      Create_Dense_Matrix(&SX, m, 0, &sol[0], m);
-      memset(&SL,0,sizeof SL);
-      memset(&SU,0,sizeof SU);
-      equed = 'B';
-      Rscale.resize(m); Cscale.resize(n); etree.resize(n);
-      ferr.resize(1); berr.resize(1);
-      R recip_pivot_gross, rcond;
-      perm_r.resize(m); perm_c.resize(n);
-      memory_used = SuperLU_gssvx(&options, &SA, &perm_c[0], &perm_r[0], 
-		    &etree[0] /* output */, &equed /* output        */, 
-		    &Rscale[0] /* row scale factors (output)        */, 
-		    &Cscale[0] /* col scale factors (output)        */,
-		    &SL /* fact L (output)*/, &SU /* fact U (output)*/, 
-		    NULL /* work                                    */, 
-		    0 /* lwork: superlu auto allocates (input)      */, 
-		    &SB /* rhs */, &SX /* solution                  */,
-		    &recip_pivot_gross /* reciprocal pivot growth   */
-		    /* factor max_j( norm(A_j)/norm(U_j) ).         */,  
-		    &rcond /*estimate of the reciprocal condition   */
-		    /* number of the matrix A after equilibration   */,
-		    &ferr[0] /* estimated forward error             */,
-		    &berr[0] /* relative backward error             */,
-		    &stat, &info, T());
-      
-      Destroy_SuperMatrix_Store(&SB);
-      Destroy_SuperMatrix_Store(&SX);
-      Create_Dense_Matrix(&SB, m, 1, &rhs[0], m);
-      Create_Dense_Matrix(&SX, m, 1, &sol[0], m);
-      StatFree(&stat);
-
-      GMM_ASSERT1(info == 0, "SuperLU solve failed: info=" << info);
-      is_init = true;
-    }
-    
-    template <class T> template <typename VECTX, typename VECTB> 
-    void SuperLU_factor<T>::solve(const VECTX &X_, const VECTB &B,
-				  int transp) const {
-      VECTX &X = const_cast<VECTX &>(X_);
-      gmm::copy(B, rhs);
-      options.Fact = FACTORED;
-      options.IterRefine = NOREFINE;
-      switch (transp) {
-      case LU_NOTRANSP: options.Trans = NOTRANS; break;
-      case LU_TRANSP: options.Trans = TRANS; break;
-      case LU_CONJUGATED: options.Trans = CONJ; break;
-      default: GMM_ASSERT1(false, "invalid value for transposition option");
-      }
-      StatInit(&stat);
-      int info = 0;
-      R recip_pivot_gross, rcond;
-      SuperLU_gssvx(&options, &SA, &perm_c[0], &perm_r[0], 
-		    &etree[0] /* output */, &equed /* output        */, 
-		    &Rscale[0] /* row scale factors (output)        */, 
-		    &Cscale[0] /* col scale factors (output)        */,
-		    &SL /* fact L (output)*/, &SU /* fact U (output)*/, 
-		    NULL /* work                                    */, 
-		    0 /* lwork: superlu auto allocates (input)      */, 
-		    &SB /* rhs */, &SX /* solution                  */,
-		    &recip_pivot_gross /* reciprocal pivot growth   */
-		    /* factor max_j( norm(A_j)/norm(U_j) ).         */,  
-		    &rcond /*estimate of the reciprocal condition   */
-		    /* number of the matrix A after equilibration   */,
-		    &ferr[0] /* estimated forward error             */,
-		    &berr[0] /* relative backward error             */,
-		    &stat, &info, T());
-     StatFree(&stat);
-     GMM_ASSERT1(info == 0, "SuperLU solve failed: info=" << info);
-     gmm::copy(sol, X);
-    }
-
-  template <typename T, typename V1, typename V2> inline
-  void mult(const SuperLU_factor<T>& P, const V1 &v1, const V2 &v2) {
-    P.solve(v2,v1);
-  }
-
-  template <typename T, typename V1, typename V2> inline
-  void transposed_mult(const SuperLU_factor<T>& P,const V1 &v1,const V2 &v2) {
-    P.solve(v2, v1, SuperLU_factor<T>::LU_TRANSP);
-  }
-
-}
-
-  
-#endif // GMM_SUPERLU_INTERFACE_H
-
-#endif // GMM_USES_SUPERLU
diff --git a/Contrib/gmm/gmm_transposed.h b/Contrib/gmm/gmm_transposed.h
deleted file mode 100755
index b5da665..0000000
--- a/Contrib/gmm/gmm_transposed.h
+++ /dev/null
@@ -1,243 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_transposed.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date November 10, 2002.
-   @brief Generic transposed matrices
-*/
-#ifndef GMM_TRANSPOSED_H__
-#define GMM_TRANSPOSED_H__
-
-#include "gmm_def.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*		transposed reference                    		   */
-  /* ********************************************************************* */
-  
-  template <typename PT> struct  transposed_row_ref {
-    
-    typedef transposed_row_ref<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef M * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_M;
-    typedef typename select_ref<typename linalg_traits<this_type>
-            ::const_col_iterator, typename linalg_traits<this_type>
-            ::col_iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-
-    iterator begin_, end_;
-    porigin_type origin;
-    size_type nr, nc;
-
-    transposed_row_ref(ref_M m)
-      : begin_(mat_row_begin(m)), end_(mat_row_end(m)),
-	origin(linalg_origin(m)), nr(mat_ncols(m)), nc(mat_nrows(m)) {}
-
-    transposed_row_ref(const transposed_row_ref<CPT> &cr) :
-      begin_(cr.begin_),end_(cr.end_), origin(cr.origin),nr(cr.nr),nc(cr.nc) {}
-
-    reference operator()(size_type i, size_type j) const
-    { return linalg_traits<M>::access(begin_+j, i); }
-  };
-
-  template <typename PT> struct linalg_traits<transposed_row_ref<PT> > {
-    typedef transposed_row_ref<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef typename select_ref<value_type,
-            typename linalg_traits<M>::reference, PT>::ref_type reference;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_row_iterator;
-    typedef typename linalg_traits<M>::const_sub_row_type const_sub_col_type;
-    typedef typename select_ref<abstract_null_type, typename
-            linalg_traits<M>::sub_row_type, PT>::ref_type sub_col_type;
-    typedef typename linalg_traits<M>::const_row_iterator const_col_iterator;
-    typedef typename select_ref<abstract_null_type, typename
-            linalg_traits<M>::row_iterator, PT>::ref_type col_iterator;
-    typedef col_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static size_type ncols(const this_type &v) { return v.nc; }
-    static size_type nrows(const this_type &v) { return v.nr; }
-    static const_sub_col_type col(const const_col_iterator &it)
-    { return linalg_traits<M>::row(it); }
-    static sub_col_type col(const col_iterator &it)
-    { return linalg_traits<M>::row(it); }
-    static col_iterator col_begin(this_type &m) { return m.begin_; }
-    static col_iterator col_end(this_type &m) { return m.end_; }
-    static const_col_iterator col_begin(const this_type &m)
-    { return m.begin_; }
-    static const_col_iterator col_end(const this_type &m) { return m.end_; }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void do_clear(this_type &v);
-    static value_type access(const const_col_iterator &itcol, size_type i)
-    { return linalg_traits<M>::access(itcol, i); }
-    static reference access(const col_iterator &itcol, size_type i)
-    { return linalg_traits<M>::access(itcol, i); }
-  };
-  
-  template <typename PT> 
-  void linalg_traits<transposed_row_ref<PT> >::do_clear(this_type &v) { 
-    col_iterator it = mat_col_begin(v), ite = mat_col_end(v);
-    for (; it != ite; ++it) clear(col(it));
-  }
-  
-  template<typename PT> std::ostream &operator <<
-  (std::ostream &o, const transposed_row_ref<PT>& m)
-  { gmm::write(o,m); return o; }
-
-  template <typename PT> struct  transposed_col_ref {
-    
-    typedef transposed_col_ref<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef M * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_M;
-    typedef typename select_ref<typename linalg_traits<this_type>
-            ::const_row_iterator, typename linalg_traits<this_type>
-            ::row_iterator, PT>::ref_type iterator;
-    typedef typename linalg_traits<this_type>::reference reference;
-    typedef typename linalg_traits<this_type>::porigin_type porigin_type;
-    
-    iterator begin_, end_;
-    porigin_type origin;
-    size_type nr, nc;
-
-    transposed_col_ref(ref_M m)
-      : begin_(mat_col_begin(m)), end_(mat_col_end(m)),
-	origin(linalg_origin(m)), nr(mat_ncols(m)), nc(mat_nrows(m)) {}
-
-    transposed_col_ref(const transposed_col_ref<CPT> &cr) :
-      begin_(cr.begin_),end_(cr.end_), origin(cr.origin),nr(cr.nr),nc(cr.nc) {}
-
-    reference operator()(size_type i, size_type j) const
-    { return linalg_traits<M>::access(begin_+i, j); }
-  };
-
-  template <typename PT> struct linalg_traits<transposed_col_ref<PT> > {
-    typedef transposed_col_ref<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type M;
-    typedef typename linalg_traits<M>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-			        PT>::ref_type porigin_type;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<M>::value_type value_type;
-    typedef typename select_ref<value_type,
-            typename linalg_traits<M>::reference, PT>::ref_type reference;
-    typedef typename linalg_traits<M>::storage_type storage_type;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_col_iterator;
-    typedef typename linalg_traits<M>::const_sub_col_type const_sub_row_type;
-    typedef typename select_ref<abstract_null_type, typename
-            linalg_traits<M>::sub_col_type, PT>::ref_type sub_row_type;
-    typedef typename linalg_traits<M>::const_col_iterator const_row_iterator;
-    typedef typename select_ref<abstract_null_type, typename
-            linalg_traits<M>::col_iterator, PT>::ref_type row_iterator;
-    typedef row_major sub_orientation;
-    typedef typename linalg_traits<M>::index_sorted index_sorted;
-    static size_type nrows(const this_type &v)
-    { return v.nr; }
-    static size_type ncols(const this_type &v)
-    { return v.nc; }
-    static const_sub_row_type row(const const_row_iterator &it)
-    { return linalg_traits<M>::col(it); }
-    static sub_row_type row(const row_iterator &it)
-    { return linalg_traits<M>::col(it); }
-    static row_iterator row_begin(this_type &m) { return m.begin_; }
-    static row_iterator row_end(this_type &m) { return m.end_; }
-    static const_row_iterator row_begin(const this_type &m)
-    { return m.begin_; }
-    static const_row_iterator row_end(const this_type &m) { return m.end_; }
-    static origin_type* origin(this_type &v) { return v.origin; }
-    static const origin_type* origin(const this_type &v) { return v.origin; }
-    static void do_clear(this_type &m);
-    static value_type access(const const_row_iterator &itrow, size_type i)
-    { return linalg_traits<M>::access(itrow, i); }
-    static reference access(const row_iterator &itrow, size_type i)
-    { return linalg_traits<M>::access(itrow, i); }
-  };
-
-  template <typename PT> 
-  void linalg_traits<transposed_col_ref<PT> >::do_clear(this_type &v) { 
-    row_iterator it = mat_row_begin(v), ite = mat_row_end(v);
-    for (; it != ite; ++it) clear(row(it));
-  }
-
-  template<typename PT> std::ostream &operator <<
-  (std::ostream &o, const transposed_col_ref<PT>& m)
-  { gmm::write(o,m); return o; }
-
-  template <typename TYPE, typename PT> struct transposed_return_ {
-    typedef abstract_null_type return_type;
-  };
-  template <typename PT> struct transposed_return_<row_major, PT> {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_return<transposed_row_ref<const L *>,
-            transposed_row_ref< L *>, PT>::return_type return_type;
-  };
-  template <typename PT> struct transposed_return_<col_major, PT> {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename select_return<transposed_col_ref<const L *>,
-            transposed_col_ref< L *>, PT>::return_type return_type;
-  };
-  template <typename PT> struct transposed_return {
-    typedef typename std::iterator_traits<PT>::value_type L;
-    typedef typename transposed_return_<typename principal_orientation_type<
-            typename linalg_traits<L>::sub_orientation>::potype,
-	    PT>::return_type return_type;
-  };
-
-  template <typename L> inline 
-  typename transposed_return<const L *>::return_type transposed(const L &l) {
-    return typename transposed_return<const L *>::return_type
-      (linalg_cast(const_cast<L &>(l)));
-  }
-
-  template <typename L> inline 
-  typename transposed_return<L *>::return_type transposed(L &l)
-  { return typename transposed_return<L *>::return_type(linalg_cast(l)); }
-
-}
-
-#endif //  GMM_TRANSPOSED_H__
diff --git a/Contrib/gmm/gmm_tri_solve.h b/Contrib/gmm/gmm_tri_solve.h
deleted file mode 100755
index 2f7acf2..0000000
--- a/Contrib/gmm/gmm_tri_solve.h
+++ /dev/null
@@ -1,221 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_tri_solve.h
-   @author Yves Renard
-   @date October 13, 2002.
-   @brief Solve triangular linear system for dense matrices.
-*/
-
-#ifndef GMM_TRI_SOLVE_H__
-#define GMM_TRI_SOLVE_H__
-
-#include "gmm_interface.h"
-
-namespace gmm {
-
-  template <typename TriMatrix, typename VecX>
-  void upper_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				col_major, abstract_sparse, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type x_j;
-    for (int j = int(k) - 1; j >= 0; --j) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_col_type COL;
-      COL c = mat_const_col(T, j);
-      typename linalg_traits<COL>::const_iterator 
-	it = vect_const_begin(c), ite = vect_const_end(c);
-      if (!is_unit) x[j] /= c[j];
-      for (x_j = x[j]; it != ite ; ++it)
-	if (int(it.index()) < j) x[it.index()] -= x_j * (*it);
-    }    
-  }
-
-  template <typename TriMatrix, typename VecX>
-  void upper_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				col_major, abstract_dense, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type x_j;
-    for (int j = int(k) - 1; j >= 0; --j) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_col_type COL;
-      COL c = mat_const_col(T, j);
-      typename linalg_traits<COL>::const_iterator
-	it = vect_const_begin(c), ite = it + j;
-      typename linalg_traits<VecX>::iterator itx = vect_begin(x);
-      if (!is_unit) x[j] /= c[j];
-      for (x_j = x[j]; it != ite ; ++it, ++itx) *itx -= x_j * (*it);
-    }
-  }
-
-  template <typename TriMatrix, typename VecX>
-  void lower_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				col_major, abstract_sparse, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type x_j;
-    // cout << "(lower col)The Tri Matrix = " << T << endl;
-    // cout << "k = " << endl;
-    for (int j = 0; j < int(k); ++j) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_col_type COL;
-      COL c = mat_const_col(T, j);
-      typename linalg_traits<COL>::const_iterator 
-	it = vect_const_begin(c), ite = vect_const_end(c);
-      if (!is_unit) x[j] /= c[j];
-      for (x_j = x[j]; it != ite ; ++it)
-	if (int(it.index()) > j && it.index() < k) x[it.index()] -= x_j*(*it);
-    }    
-  }
-  
-  template <typename TriMatrix, typename VecX>
-  void lower_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				col_major, abstract_dense, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type x_j;
-    for (int j = 0; j < int(k); ++j) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_col_type COL;
-      COL c = mat_const_col(T, j);
-      typename linalg_traits<COL>::const_iterator 
-	it = vect_const_begin(c) + (j+1), ite = vect_const_begin(c) + k;
-      typename linalg_traits<VecX>::iterator itx = vect_begin(x) + (j+1);
-      if (!is_unit) x[j] /= c[j];
-      for (x_j = x[j]; it != ite ; ++it, ++itx) *itx -= x_j * (*it);
-    }    
-  }
-  
-
-  template <typename TriMatrix, typename VecX>
-  void upper_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				row_major, abstract_sparse, bool is_unit) {
-    typedef typename linalg_traits<TriMatrix>::const_sub_row_type ROW;
-    typename linalg_traits<TriMatrix>::value_type t;
-    typename linalg_traits<TriMatrix>::const_row_iterator
-      itr = mat_row_const_end(T);
-    for (int i = int(k) - 1; i >= 0; --i) {
-      --itr;
-      ROW c = linalg_traits<TriMatrix>::row(itr);
-      typename linalg_traits<ROW>::const_iterator 
-	it = vect_const_begin(c), ite = vect_const_end(c);
-      for (t = x[i]; it != ite; ++it)
-	if (int(it.index()) > i && it.index() < k) t -= (*it) * x[it.index()];
-      if (!is_unit) x[i] = t / c[i]; else x[i] = t;    
-    }    
-  }
-
-  template <typename TriMatrix, typename VecX>
-  void upper_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				row_major, abstract_dense, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type t;
-   
-    for (int i = int(k) - 1; i >= 0; --i) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_row_type ROW;
-      ROW c = mat_const_row(T, i);
-      typename linalg_traits<ROW>::const_iterator 
-	it = vect_const_begin(c) + (i + 1), ite = vect_const_begin(c) + k;
-      typename linalg_traits<VecX>::iterator itx = vect_begin(x) + (i+1);
-      
-      for (t = x[i]; it != ite; ++it, ++itx) t -= (*it) * (*itx);
-      if (!is_unit) x[i] = t / c[i]; else x[i] = t;   
-    }    
-  }
-
-  template <typename TriMatrix, typename VecX>
-  void lower_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				row_major, abstract_sparse, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type t;
-   
-    for (int i = 0; i < int(k); ++i) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_row_type ROW;
-      ROW c = mat_const_row(T, i);
-      typename linalg_traits<ROW>::const_iterator 
-	it = vect_const_begin(c), ite = vect_const_end(c);
-
-      for (t = x[i]; it != ite; ++it)
-	if (int(it.index()) < i) t -= (*it) * x[it.index()];
-      if (!is_unit) x[i] = t / c[i]; else x[i] = t; 
-    }    
-  }
-
-  template <typename TriMatrix, typename VecX>
-  void lower_tri_solve__(const TriMatrix& T, VecX& x, size_t k,
-				row_major, abstract_dense, bool is_unit) {
-    typename linalg_traits<TriMatrix>::value_type t;
-   
-    for (int i = 0; i < int(k); ++i) {
-      typedef typename linalg_traits<TriMatrix>::const_sub_row_type ROW;
-      ROW c = mat_const_row(T, i);
-      typename linalg_traits<ROW>::const_iterator 
-	it = vect_const_begin(c), ite = it + i;
-      typename linalg_traits<VecX>::iterator itx = vect_begin(x);
-
-      for (t = x[i]; it != ite; ++it, ++itx) t -= (*it) * (*itx);
-      if (!is_unit) x[i] = t / c[i]; else x[i] = t;
-    }
-  }
-
-
-// Triangular Solve:  x <-- T^{-1} * x
-
-  template <typename TriMatrix, typename VecX> inline
-  void upper_tri_solve(const TriMatrix& T, VecX &x_, bool is_unit = false)
-  { upper_tri_solve(T, x_, mat_nrows(T), is_unit); }
-  
-  template <typename TriMatrix, typename VecX> inline
-  void lower_tri_solve(const TriMatrix& T, VecX &x_, bool is_unit = false)
-  { lower_tri_solve(T, x_, mat_nrows(T), is_unit); }
-
-  template <typename TriMatrix, typename VecX> inline
-  void upper_tri_solve(const TriMatrix& T, VecX &x_, size_t k,
-		       bool is_unit) {
-    VecX& x = const_cast<VecX&>(x_);
-    GMM_ASSERT2(mat_nrows(T) >= k && vect_size(x) >= k
-		&& mat_ncols(T) >= k && !is_sparse(x_), "dimensions mismatch");
-    upper_tri_solve__(T, x, k, 
-		      typename principal_orientation_type<typename
-		      linalg_traits<TriMatrix>::sub_orientation>::potype(),
-		      typename linalg_traits<TriMatrix>::storage_type(),
-		      is_unit);
-  }
-  
-  template <typename TriMatrix, typename VecX> inline
-  void lower_tri_solve(const TriMatrix& T, VecX &x_, size_t k,
-		       bool is_unit) {
-    VecX& x = const_cast<VecX&>(x_);
-    GMM_ASSERT2(mat_nrows(T) >= k && vect_size(x) >= k
-		&& mat_ncols(T) >= k && !is_sparse(x_), "dimensions mismatch");
-    lower_tri_solve__(T, x, k, 
-		      typename principal_orientation_type<typename
-		      linalg_traits<TriMatrix>::sub_orientation>::potype(),
-		      typename linalg_traits<TriMatrix>::storage_type(),
-		      is_unit);
-  }
-
-
- 
-
-
-
-}
-
-
-#endif //  GMM_TRI_SOLVE_H__
diff --git a/Contrib/gmm/gmm_vector.h b/Contrib/gmm/gmm_vector.h
deleted file mode 100755
index f114a32..0000000
--- a/Contrib/gmm/gmm_vector.h
+++ /dev/null
@@ -1,968 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2002-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-/**@file gmm_vector.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date October 13, 2002.
-   @brief Declaration of the vector types (gmm::rsvector, gmm::wsvector,
-     gmm::slvector ,..)
-*/
-#ifndef GMM_VECTOR_H__
-#define GMM_VECTOR_H__
-
-#include <map>
-#include "gmm_interface.h"
-
-namespace gmm {
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Class ref_elt_vector: reference on a vector component.                */
-  /*                                                                       */
-  /*************************************************************************/
-
-
-  template<typename T, typename V> class ref_elt_vector {
-
-    V *pm;
-    size_type l;
-    
-    public :
-
-    operator T() const { return pm->r(l); }
-    ref_elt_vector(V *p, size_type ll) : pm(p), l(ll) {}
-    inline ref_elt_vector &operator =(T v)
-      { (*pm).w(l,v); return *this; }
-    inline bool operator ==(T v) const { return ((*pm).r(l) == v); }
-    inline bool operator !=(T v) const { return ((*pm).r(l) != v); }
-    inline ref_elt_vector &operator +=(T v)
-      { (*pm).w(l,(*pm).r(l) + v); return *this; }
-    inline ref_elt_vector &operator -=(T v)
-      { (*pm).w(l,(*pm).r(l) - v); return *this; }
-    inline ref_elt_vector &operator /=(T v)
-      { (*pm).w(l,(*pm).r(l) / v); return *this; }
-    inline ref_elt_vector &operator *=(T v)
-      { (*pm).w(l,(*pm).r(l) * v); return *this; }
-    inline ref_elt_vector &operator =(const ref_elt_vector &re)
-      { *this = T(re); return *this; }
-    T operator +()    { return  T(*this);   } // necessary for unknow reason
-    T operator -()    { return -T(*this);   } // necessary for unknow reason
-    T operator +(T v) { return T(*this)+ v; } // necessary for unknow reason
-    T operator -(T v) { return T(*this)- v; } // necessary for unknow reason
-    T operator *(T v) { return T(*this)* v; } // necessary for unknow reason
-    T operator /(T v) { return T(*this)/ v; } // necessary for unknow reason
-  };  
-  
-  
-  template<typename T, typename V> inline
-  bool operator ==(T v, const ref_elt_vector<T, V> &re) { return (v==T(re)); }
-  template<typename T, typename V> inline
-  bool operator !=(T v, const ref_elt_vector<T, V> &re) { return (v!=T(re)); }
-  template<typename T, typename V> inline
-  T &operator +=(T &v, const ref_elt_vector<T, V> &re) 
-  { v += T(re); return v; }
-  template<typename T, typename V> inline
-  T &operator -=(T &v, const ref_elt_vector<T, V> &re)
-  { v -= T(re); return v; }
-  template<typename T, typename V> inline
-  T &operator *=(T &v, const ref_elt_vector<T, V> &re) 
-  { v *= T(re); return v; }
-  template<typename T, typename V> inline
-  T &operator /=(T &v, const ref_elt_vector<T, V> &re)
-  { v /= T(re); return v; }
-  template<typename T, typename V> inline
-  T operator +(const ref_elt_vector<T, V> &re) { return T(re); }
-  template<typename T, typename V> inline
-  T operator -(const ref_elt_vector<T, V> &re) { return -T(re); }
-  template<typename T, typename V> inline
-  T operator +(const ref_elt_vector<T, V> &re, T v) { return T(re)+ v; }
-  template<typename T, typename V> inline
-  T operator +(T v, const ref_elt_vector<T, V> &re) { return v+ T(re); }
-  template<typename T, typename V> inline
-  T operator -(const ref_elt_vector<T, V> &re, T v) { return T(re)- v; }
-  template<typename T, typename V> inline
-  T operator -(T v, const ref_elt_vector<T, V> &re) { return v- T(re); }
-  template<typename T, typename V>  inline
-  T operator *(const ref_elt_vector<T, V> &re, T v) { return T(re)* v; }
-  template<typename T, typename V> inline
-  T operator *(T v, const ref_elt_vector<T, V> &re) { return v* T(re); }
-  template<typename T, typename V> inline
-  T operator /(const ref_elt_vector<T, V> &re, T v) { return T(re)/ v; }
-  template<typename T, typename V> inline
-  T operator /(T v, const ref_elt_vector<T, V> &re) { return v/ T(re); }
-  template<typename T, typename V> inline
-  typename number_traits<T>::magnitude_type
-  abs(const ref_elt_vector<T, V> &re) { return gmm::abs(T(re)); }
-  template<typename T, typename V> inline
-  T sqr(const ref_elt_vector<T, V> &re) { return gmm::sqr(T(re)); }
-  template<typename T, typename V> inline
-  typename number_traits<T>::magnitude_type
-  abs_sqr(const ref_elt_vector<T, V> &re) { return gmm::abs_sqr(T(re)); }
-  template<typename T, typename V> inline
-  T conj(const ref_elt_vector<T, V> &re) { return gmm::conj(T(re)); }
-  template<typename T, typename V> std::ostream &operator <<
-  (std::ostream &o, const ref_elt_vector<T, V> &re) { o << T(re); return o; }
-  template<typename T, typename V> inline
-  typename number_traits<T>::magnitude_type
-  real(const ref_elt_vector<T, V> &re) { return gmm::real(T(re)); }
-  template<typename T, typename V> inline
-  typename number_traits<T>::magnitude_type
-  imag(const ref_elt_vector<T, V> &re) { return gmm::imag(T(re)); }
-
-  
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Class wsvector: sparse vector optimized for random write operations.  */
-  /*                                                                       */
-  /*************************************************************************/
-  
-  template<typename T> struct wsvector_iterator
-    : public std::map<size_type, T>::iterator {
-    typedef typename std::map<size_type, T>::iterator base_it_type;
-    typedef T                   value_type;
-    typedef value_type*         pointer;
-    typedef value_type&         reference;
-    // typedef size_t              size_type;
-    typedef ptrdiff_t           difference_type;
-    typedef std::bidirectional_iterator_tag iterator_category;
-    
-    reference operator *() const { return (base_it_type::operator*()).second; }
-    pointer operator->() const { return &(operator*()); }
-    size_type index(void) const { return (base_it_type::operator*()).first; }
-
-    wsvector_iterator(void) {}
-    wsvector_iterator(const base_it_type &it) : base_it_type(it) {}
-  };
-
-  template<typename T> struct wsvector_const_iterator
-    : public std::map<size_type, T>::const_iterator {
-    typedef typename std::map<size_type, T>::const_iterator base_it_type;
-    typedef T                   value_type;
-    typedef const value_type*   pointer;
-    typedef const value_type&   reference;
-    // typedef size_t              size_type;
-    typedef ptrdiff_t           difference_type;
-    typedef std::bidirectional_iterator_tag iterator_category;
-    
-    reference operator *() const { return (base_it_type::operator*()).second; }
-    pointer operator->() const { return &(operator*()); }
-    size_type index(void) const { return (base_it_type::operator*()).first; }
-
-    wsvector_const_iterator(void) {}
-    wsvector_const_iterator(const wsvector_iterator<T> &it)
-      : base_it_type(it) {}
-    wsvector_const_iterator(const base_it_type &it) : base_it_type(it) {}
-  };
-
-
-  /**
-     sparse vector built upon std::map.
-     Read and write access are quite fast (log n)
-  */
-  template<typename T> class wsvector : public std::map<size_type, T> {
-  public:
-    
-    typedef typename std::map<int, T>::size_type size_type;
-    typedef std::map<size_type, T> base_type;
-    typedef typename base_type::iterator iterator;
-    typedef typename base_type::const_iterator const_iterator;
-
-  protected:
-    size_type nbl;
-    
-  public:
-    void clean(double eps);
-    void resize(size_type);
-    
-    inline ref_elt_vector<T, wsvector<T> > operator [](size_type c)
-    { return ref_elt_vector<T, wsvector<T> >(this, c); }
-
-    inline void w(size_type c, const T &e) {
-      GMM_ASSERT2(c < nbl, "out of range");
-      if (e == T(0)) { base_type::erase(c); }
-      else base_type::operator [](c) = e;
-    }
-
-    inline T r(size_type c) const {
-      GMM_ASSERT2(c < nbl, "out of range");
-      const_iterator it = this->lower_bound(c);
-      if (it != this->end() && c == it->first) return it->second;
-      else return T(0);
-    }
-
-    inline T operator [](size_type c) const { return r(c); }
-    
-    size_type nb_stored(void) const { return base_type::size(); }
-    size_type size(void) const { return nbl; }
-
-    void swap(wsvector<T> &v)
-    { std::swap(nbl, v.nbl); std::map<size_type, T>::swap(v); }
-				       
-
-    /* Constructeurs */
-    void init(size_type l) { nbl = l; this->clear(); }
-    explicit wsvector(size_type l){ init(l); }
-    wsvector(void) { init(0); }
-  };
-
-  template<typename T>  void wsvector<T>::clean(double eps) {
-    iterator it = this->begin(), itf = it, ite = this->end();
-    while (it != ite) {
-      ++itf; if (gmm::abs(it->second) <= eps) erase(it); it = itf;
-    }
-  }
-
-  template<typename T>  void wsvector<T>::resize(size_type n) {
-    if (n < nbl) {
-      iterator it = this->begin(), itf = it, ite = this->end();
-      while (it != ite) { ++itf; if (it->first >= n) erase(it); it = itf; }
-    }
-    nbl = n;
-  }
-
-  template <typename T> struct linalg_traits<wsvector<T> > {
-    typedef wsvector<T> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_vector linalg_type;
-    typedef T value_type;
-    typedef ref_elt_vector<T, wsvector<T> > reference;
-    typedef wsvector_iterator<T>  iterator;
-    typedef wsvector_const_iterator<T> const_iterator;
-    typedef abstract_sparse storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return v.begin(); }
-    static const_iterator begin(const this_type &v) { return v.begin(); }
-    static iterator end(this_type &v) { return v.end(); }
-    static const_iterator end(const this_type &v) { return v.end(); }
-    static origin_type* origin(this_type &v) { return &v; }
-    static const origin_type* origin(const this_type &v) { return &v; }
-    static void clear(origin_type* o, const iterator &, const iterator &)
-    { o->clear(); }
-    static void do_clear(this_type &v) { v.clear(); }
-    static value_type access(const origin_type *o, const const_iterator &,
-			     const const_iterator &, size_type i)
-    { return (*o)[i]; }
-    static reference access(origin_type *o, const iterator &, const iterator &,
-			    size_type i)
-    { return (*o)[i]; }
-    static void resize(this_type &v, size_type n) { v.resize(n); }
-  };
-
-  template<typename T> std::ostream &operator <<
-  (std::ostream &o, const wsvector<T>& v) { gmm::write(o,v); return o; }
-
-  /******* Optimized BLAS for wsvector<T> **********************************/
-
-  template <typename T> inline void copy(const wsvector<T> &v1,
-					 wsvector<T> &v2) {
-    GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-    v2 = v1;
-  }
-  template <typename T> inline
-  void copy(const wsvector<T> &v1, const simple_vector_ref<wsvector<T> *> &v2){
-    simple_vector_ref<wsvector<T> *>
-      *svr = const_cast<simple_vector_ref<wsvector<T> *> *>(&v2);
-    wsvector<T>
-      *pv = const_cast<wsvector<T> *>(v2.origin);
-    GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-    *pv = v1; svr->begin_ = vect_begin(*pv); svr->end_ = vect_end(*pv);
-  }
-  template <typename T> inline
-  void copy(const simple_vector_ref<const wsvector<T> *> &v1,
-	    wsvector<T> &v2)
-  { copy(*(v1.origin), v2); }
-  template <typename T> inline
-  void copy(const simple_vector_ref<wsvector<T> *> &v1, wsvector<T> &v2)
-  { copy(*(v1.origin), v2); }
-
-  template <typename T> inline void clean(wsvector<T> &v, double eps) {
-    typedef typename number_traits<T>::magnitude_type R;
-    typename wsvector<T>::iterator it = v.begin(), ite = v.end(), itc;
-    while (it != ite) 
-      if (gmm::abs((*it).second) <= R(eps))
-	{ itc=it; ++it; v.erase(itc); } else ++it; 
-  }
-
-  template <typename T>
-  inline void clean(const simple_vector_ref<wsvector<T> *> &l, double eps) {
-    simple_vector_ref<wsvector<T> *>
-      *svr = const_cast<simple_vector_ref<wsvector<T> *> *>(&l);
-    wsvector<T>
-      *pv = const_cast<wsvector<T> *>((l.origin));
-    clean(*pv, eps);
-    svr->begin_ = vect_begin(*pv); svr->end_ = vect_end(*pv);
-  }
-
-  template <typename T>
-  inline size_type nnz(const wsvector<T>& l) { return l.nb_stored(); }
-
-  /*************************************************************************/
-  /*                                                                       */
-  /*    rsvector: sparse vector optimized for linear algebra operations.   */
-  /*                                                                       */
-  /*************************************************************************/
-
-  template<typename T> struct elt_rsvector_ {
-    size_type c; T e;
-    /* e is initialized by default to avoid some false warnings of valgrind..
-       (from http://valgrind.org/docs/manual/mc-manual.html:
-      
-       When memory is read into the CPU's floating point registers, the
-       relevant V bits are read from memory and they are immediately
-       checked. If any are invalid, an uninitialised value error is
-       emitted. This precludes using the floating-point registers to copy
-       possibly-uninitialised memory, but simplifies Valgrind in that it
-       does not have to track the validity status of the floating-point
-       registers.
-    */
-    elt_rsvector_(void) : e(0) {}
-    elt_rsvector_(size_type cc) : c(cc), e(0) {}
-    elt_rsvector_(size_type cc, const T &ee) : c(cc), e(ee) {}
-    bool operator < (const elt_rsvector_ &a) const { return c < a.c; }
-    bool operator == (const elt_rsvector_ &a) const { return c == a.c; }
-    bool operator != (const elt_rsvector_ &a) const { return c != a.c; }
-  };
-
-  template<typename T> struct rsvector_iterator {
-    typedef typename std::vector<elt_rsvector_<T> >::iterator IT;
-    typedef T                   value_type;
-    typedef value_type*         pointer;
-    typedef value_type&         reference;
-    typedef size_t              size_type;
-    typedef ptrdiff_t           difference_type;
-    typedef std::bidirectional_iterator_tag iterator_category;
-    typedef rsvector_iterator<T> iterator;
-
-    IT it;
-
-    reference operator *() const { return it->e; }
-    pointer operator->() const { return &(operator*()); }
-
-    iterator &operator ++() { ++it; return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator &operator --() { --it; return *this; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-
-    bool operator ==(const iterator &i) const { return it == i.it; }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-
-    size_type index(void) const { return it->c; }
-    rsvector_iterator(void) {}
-    rsvector_iterator(const IT &i) : it(i) {}
-  };
-
-  template<typename T> struct rsvector_const_iterator {
-    typedef typename std::vector<elt_rsvector_<T> >::const_iterator IT;
-    typedef T                   value_type;
-    typedef const value_type*   pointer;
-    typedef const value_type&   reference;
-    typedef size_t              size_type;
-    typedef ptrdiff_t           difference_type;
-    typedef std::forward_iterator_tag iterator_category;
-    typedef rsvector_const_iterator<T> iterator;
-
-    IT it;
-
-    reference operator *() const { return it->e; }
-    pointer operator->() const { return &(operator*()); }
-    size_type index(void) const { return it->c; }
-
-    iterator &operator ++() { ++it; return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator &operator --() { --it; return *this; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-
-    bool operator ==(const iterator &i) const { return it == i.it; }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-
-    rsvector_const_iterator(void) {}
-    rsvector_const_iterator(const rsvector_iterator<T> &i) : it(i.it) {}
-    rsvector_const_iterator(const IT &i) : it(i) {}
-  };
-
-  /**
-     sparse vector built upon std::vector. Read access is fast,
-     but insertion is O(n) 
-  */
-  template<typename T> class rsvector : public std::vector<elt_rsvector_<T> > {
-  public:
-    
-    typedef std::vector<elt_rsvector_<T> > base_type_;
-    typedef typename base_type_::iterator iterator;
-    typedef typename base_type_::const_iterator const_iterator;
-    typedef typename base_type_::size_type size_type;
-    typedef T value_type;
-
-  protected:
-    size_type nbl;    	/* size of the vector.	          	  */
-    
-  public:
-
-    void sup(size_type j);
-    void base_resize(size_type n) { base_type_::resize(n); }
-    void resize(size_type);
-    
-    ref_elt_vector<T, rsvector<T> > operator [](size_type c)
-    { return ref_elt_vector<T, rsvector<T> >(this, c); }
-
-    void w(size_type c, const T &e);
-    T r(size_type c) const;
-    void swap_indices(size_type i, size_type j);
-
-    inline T operator [](size_type c) const { return r(c); }
-    
-    size_type nb_stored(void) const { return base_type_::size(); }
-    size_type size(void) const { return nbl; }
-    void clear(void) { base_type_::resize(0); }
-    void swap(rsvector<T> &v)
-    { std::swap(nbl, v.nbl); std::vector<elt_rsvector_<T> >::swap(v); }
-
-    /* Constructeurs */
-    explicit rsvector(size_type l) : nbl(l) { }
-    rsvector(void) : nbl(0) { }
-  };
-
-  template <typename T>
-  void rsvector<T>::swap_indices(size_type i, size_type j) {
-    if (i > j) std::swap(i, j);
-    if (i != j) {
-      int situation = 0;
-      elt_rsvector_<T> ei(i), ej(j), a;
-      iterator it, ite, iti, itj;
-      iti = std::lower_bound(this->begin(), this->end(), ei);
-      if (iti != this->end() && iti->c == i) situation += 1;
-      itj = std::lower_bound(this->begin(), this->end(), ej);
-      if (itj != this->end() && itj->c == j) situation += 2;
-
-      switch (situation) {
-      case 1 : a = *iti; a.c = j; it = iti; ++it; ite = this->end();
-	       for (; it != ite && it->c <= j; ++it, ++iti) *iti = *it;
-	       *iti = a;
-	       break;
-      case 2 : a = *itj; a.c = i; it = itj; ite = this->begin();
-	if (it != ite) {
-	  --it;
-	  while (it->c >= i) { *itj = *it;  --itj; if (it==ite) break; --it; }
-	}
-	*itj = a;
-	break;
-      case 3 : std::swap(iti->e, itj->e);
-	       break;
-      }
-    }
-  }
-
-  template <typename T> void rsvector<T>::sup(size_type j) {
-    if (nb_stored() != 0) {
-      elt_rsvector_<T> ev(j);
-      iterator it = std::lower_bound(this->begin(), this->end(), ev);
-      if (it != this->end() && it->c == j) {
-	for (iterator ite = this->end() - 1; it != ite; ++it) *it = *(it+1);
-	base_type_::resize(nb_stored()-1);
-      }
-    }
-  }
-
-  template<typename T>  void rsvector<T>::resize(size_type n) {
-    if (n < nbl) {
-      for (size_type i = 0; i < nb_stored(); ++i)
-	if (base_type_::operator[](i).c >= n) { base_resize(i); break; }
-    }
-    nbl = n;
-  }
-
-  template <typename T> void rsvector<T>::w(size_type c, const T &e) {
-    GMM_ASSERT2(c < nbl, "out of range");
-    if (e == T(0)) sup(c);
-    else {
-      elt_rsvector_<T> ev(c, e);
-      if (nb_stored() == 0) {
-	base_type_::resize(1,ev);
-      }
-      else {
-	iterator it = std::lower_bound(this->begin(), this->end(), ev);
-	if (it != this->end() && it->c == c) it->e = e;
-	else {
-	  size_type ind = it - this->begin();
-	  base_type_::resize(nb_stored()+1, ev);
-	  if (ind != nb_stored() - 1) {
-	    it = this->begin() + ind;
-	    for (iterator ite = this->end() - 1; ite != it; --ite)
-	      *ite = *(ite-1);
-	    *it = ev;
-	  }
-	}
-      }
-    }
-  }
-  
-  template <typename T> T rsvector<T>::r(size_type c) const {
-    GMM_ASSERT2(c < nbl, "out of range");
-    if (nb_stored() != 0) {
-      elt_rsvector_<T> ev(c);
-      const_iterator it = std::lower_bound(this->begin(), this->end(), ev);
-      if (it != this->end() && it->c == c) return it->e;
-    }
-    return T(0);
-  }
-
-  template <typename T> struct linalg_traits<rsvector<T> > {
-    typedef rsvector<T> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_vector linalg_type;
-    typedef T value_type;
-    typedef ref_elt_vector<T, rsvector<T> > reference;
-    typedef rsvector_iterator<T>  iterator;
-    typedef rsvector_const_iterator<T> const_iterator;
-    typedef abstract_sparse storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v) { return iterator(v.begin()); }
-    static const_iterator begin(const this_type &v)
-    { return const_iterator(v.begin()); }
-    static iterator end(this_type &v) { return iterator(v.end()); }
-    static const_iterator end(const this_type &v)
-      { return const_iterator(v.end()); }
-    static origin_type* origin(this_type &v) { return &v; }
-    static const origin_type* origin(const this_type &v) { return &v; }
-    static void clear(origin_type* o, const iterator &, const iterator &)
-    { o->clear(); }
-    static void do_clear(this_type &v) { v.clear(); }
-    static value_type access(const origin_type *o, const const_iterator &,
-			     const const_iterator &, size_type i)
-    { return (*o)[i]; }
-    static reference access(origin_type *o, const iterator &, const iterator &,
-			    size_type i)
-    { return (*o)[i]; }
-    static void resize(this_type &v, size_type n) { v.resize(n); }
-  };
-
-  template<typename T> std::ostream &operator <<
-  (std::ostream &o, const rsvector<T>& v) { gmm::write(o,v); return o; }
-
-  /******* Optimized operations for rsvector<T> ****************************/
-
-  template <typename T> inline void copy(const rsvector<T> &v1,
- 					 rsvector<T> &v2) {
-    GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-    v2 = v1;
-  }
-  template <typename T> inline
-  void copy(const rsvector<T> &v1, const simple_vector_ref<rsvector<T> *> &v2){
-    simple_vector_ref<rsvector<T> *>
-      *svr = const_cast<simple_vector_ref<rsvector<T> *> *>(&v2);
-    rsvector<T>
-      *pv = const_cast<rsvector<T> *>((v2.origin));
-    GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-    *pv = v1; svr->begin_ = vect_begin(*pv); svr->end_ = vect_end(*pv);
-  }
-  template <typename T> inline
-  void copy(const simple_vector_ref<const rsvector<T> *> &v1,
-	    rsvector<T> &v2)
-  { copy(*(v1.origin), v2); }
-  template <typename T> inline
-  void copy(const simple_vector_ref<rsvector<T> *> &v1, rsvector<T> &v2)
-  { copy(*(v1.origin), v2); }
-
-  template <typename V, typename T> inline void add(const V &v1,
-						    rsvector<T> &v2) {
-    if ((const void *)(&v1) != (const void *)(&v2)) {
-      GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-	add_rsvector(v1, v2, typename linalg_traits<V>::storage_type());
-    }
-  }
-
-  template <typename V, typename T> 
-  inline void add_rsvector(const V &v1, rsvector<T> &v2, abstract_dense)
-  { add(v1, v2, abstract_dense(), abstract_sparse()); }
-
-  template <typename V, typename T> 
-  inline void add_rsvector(const V &v1, rsvector<T> &v2, abstract_skyline)
-  { add(v1, v2, abstract_skyline(), abstract_sparse()); }
-
-  template <typename V, typename T> 
-  void add_rsvector(const V &v1, rsvector<T> &v2, abstract_sparse) {
-    add_rsvector(v1, v2, typename linalg_traits<V>::index_sorted());
-  }
-
-  template <typename V, typename T> 
-  void add_rsvector(const V &v1, rsvector<T> &v2, linalg_false) {
-    add(v1, v2, abstract_sparse(), abstract_sparse());
-  }
-
-  template <typename V, typename T> 
-  void add_rsvector(const V &v1, rsvector<T> &v2, linalg_true) {
-    typename linalg_traits<V>::const_iterator it1 = vect_const_begin(v1),
-      ite1 = vect_const_end(v1);
-    typename rsvector<T>::iterator it2 = v2.begin(), ite2 = v2.end(), it3;
-    size_type nbc = 0, old_nbc = v2.nb_stored();
-    for (; it1 != ite1 && it2 != ite2 ; ++nbc)
-      if (it1.index() == it2->c) { ++it1; ++it2; }
-      else if (it1.index() < it2->c) ++it1; else ++it2;
-    for (; it1 != ite1; ++it1) ++nbc;
-    for (; it2 != ite2; ++it2) ++nbc;
-
-    v2.base_resize(nbc);
-    it3 = v2.begin() + old_nbc;
-    it2 = v2.end(); ite2 = v2.begin();
-    it1 = vect_end(v1); ite1 = vect_const_begin(v1);
-    while (it1 != ite1 && it3 != ite2) {
-      --it3; --it1; --it2;
-      if (it3->c > it1.index()) { *it2 = *it3; ++it1; }
-      else if (it3->c == it1.index()) { *it2=*it3; it2->e+=*it1; }
-      else { it2->c = it1.index(); it2->e = *it1; ++it3; }
-    }
-    while (it1 != ite1) { --it1; --it2; it2->c = it1.index(); it2->e = *it1; }
-  }
-
-  template <typename V, typename T> void copy(const V &v1, rsvector<T> &v2) {
-    if ((const void *)(&v1) != (const void *)(&v2)) {
-      GMM_ASSERT2(vect_size(v1) == vect_size(v2), "dimensions mismatch");
-      if (same_origin(v1, v2))
-	GMM_WARNING2("a conflict is possible in vector copy\n");
-      copy_rsvector(v1, v2, typename linalg_traits<V>::storage_type());
-    }
-  }
-
-  template <typename V, typename T> 
-  void copy_rsvector(const V &v1, rsvector<T> &v2, abstract_dense)
-  { copy_vect(v1, v2, abstract_dense(), abstract_sparse()); }
-
-  template <typename V, typename T> 
-  void copy_rsvector(const V &v1, rsvector<T> &v2, abstract_skyline)
-  { copy_vect(v1, v2, abstract_skyline(), abstract_sparse()); }
-
-  template <typename V, typename T>
-  void copy_rsvector(const V &v1, rsvector<T> &v2, abstract_sparse) {
-    copy_rsvector(v1, v2, typename linalg_traits<V>::index_sorted());
-  }
-  
-  template <typename V, typename T2>
-  void copy_rsvector(const V &v1, rsvector<T2> &v2, linalg_true) {
-    typedef typename linalg_traits<V>::value_type T1;
-    typename linalg_traits<V>::const_iterator it = vect_const_begin(v1),
-      ite = vect_const_end(v1);
-    v2.base_resize(nnz(v1));
-    typename rsvector<T2>::iterator it2 = v2.begin();
-    size_type nn = 0;
-    for (; it != ite; ++it)
-      if ((*it) != T1(0)) { it2->c = it.index(); it2->e = *it; ++it2; ++nn; }
-    v2.base_resize(nn);
-  }
-
-  template <typename V, typename T2>
-  void copy_rsvector(const V &v1, rsvector<T2> &v2, linalg_false) {
-    typedef typename linalg_traits<V>::value_type T1;
-    typename linalg_traits<V>::const_iterator it = vect_const_begin(v1),
-      ite = vect_const_end(v1);
-    v2.base_resize(nnz(v1));
-    typename rsvector<T2>::iterator it2 = v2.begin();
-    size_type nn = 0;
-    for (; it != ite; ++it)
-      if ((*it) != T1(0)) { it2->c = it.index(); it2->e = *it; ++it2; ++nn; }
-    v2.base_resize(nn);
-    std::sort(v2.begin(), v2.end());
-  }
-  
-  template <typename T> inline void clean(rsvector<T> &v, double eps) {
-    typedef typename number_traits<T>::magnitude_type R;
-    typename rsvector<T>::iterator it = v.begin(), ite = v.end();
-    for (; it != ite; ++it) if (gmm::abs((*it).e) <= eps) break;
-    if (it != ite) {
-      typename rsvector<T>::iterator itc = it;
-      size_type erased = 1;
-      for (++it; it != ite; ++it)
-	{ *itc = *it; if (gmm::abs((*it).e) <= R(eps)) ++erased; else ++itc; }
-      v.base_resize(v.nb_stored() - erased);
-    }
-  }
-
-  template <typename T>
-  inline void clean(const simple_vector_ref<rsvector<T> *> &l, double eps) {
-    simple_vector_ref<rsvector<T> *>
-      *svr = const_cast<simple_vector_ref<rsvector<T> *> *>(&l);
-    rsvector<T>
-      *pv = const_cast<rsvector<T> *>((l.origin));
-    clean(*pv, eps);
-    svr->begin_ = vect_begin(*pv); svr->end_ = vect_end(*pv);
-  }
-  
-  template <typename T>
-  inline size_type nnz(const rsvector<T>& l) { return l.nb_stored(); }
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Class slvector: 'sky-line' vector.                                    */
-  /*                                                                       */
-  /*************************************************************************/
-
-  template<typename T> struct slvector_iterator {
-    typedef T value_type;
-    typedef T *pointer;
-    typedef T &reference;
-    typedef ptrdiff_t difference_type;
-    typedef std::random_access_iterator_tag iterator_category;
-    typedef size_t size_type;
-    typedef slvector_iterator<T> iterator;
-    typedef typename std::vector<T>::iterator base_iterator;
-
-    base_iterator it;
-    size_type shift;
-    
-   
-    iterator &operator ++()
-    { ++it; ++shift; return *this; }
-    iterator &operator --()
-    { --it; --shift; return *this; }
-    iterator operator ++(int)
-    { iterator tmp = *this; ++(*(this)); return tmp; }
-    iterator operator --(int)
-    { iterator tmp = *this; --(*(this)); return tmp; }
-    iterator &operator +=(difference_type i)
-    { it += i; shift += i; return *this; }
-    iterator &operator -=(difference_type i)
-    { it -= i; shift -= i; return *this; }
-    iterator operator +(difference_type i) const
-    { iterator tmp = *this; return (tmp += i); }
-    iterator operator -(difference_type i) const
-    { iterator tmp = *this; return (tmp -= i); }
-    difference_type operator -(const iterator &i) const
-    { return it - i.it; }
-	
-    reference operator *() const
-    { return *it; }
-    reference operator [](int ii)
-    { return *(it + ii); }
-    
-    bool operator ==(const iterator &i) const
-    { return it == i.it; }
-    bool operator !=(const iterator &i) const
-    { return !(i == *this); }
-    bool operator < (const iterator &i) const
-    { return it < i.it; }
-    size_type index(void) const { return shift; }
-
-    slvector_iterator(void) {}
-    slvector_iterator(const base_iterator &iter, size_type s)
-      : it(iter), shift(s) {}
-  };
-
-  template<typename T> struct slvector_const_iterator {
-    typedef T value_type;
-    typedef const T *pointer;
-    typedef value_type reference;
-    typedef ptrdiff_t difference_type;
-    typedef std::random_access_iterator_tag iterator_category;
-    typedef size_t size_type;
-    typedef slvector_const_iterator<T> iterator;
-    typedef typename std::vector<T>::const_iterator base_iterator;
-
-    base_iterator it;
-    size_type shift;
-    
-   
-    iterator &operator ++()
-    { ++it; ++shift; return *this; }
-    iterator &operator --()
-    { --it; --shift; return *this; }
-    iterator operator ++(int)
-    { iterator tmp = *this; ++(*(this)); return tmp; }
-    iterator operator --(int)
-    { iterator tmp = *this; --(*(this)); return tmp; }
-    iterator &operator +=(difference_type i)
-    { it += i; shift += i; return *this; }
-    iterator &operator -=(difference_type i)
-    { it -= i; shift -= i; return *this; }
-    iterator operator +(difference_type i) const
-    { iterator tmp = *this; return (tmp += i); }
-    iterator operator -(difference_type i) const
-    { iterator tmp = *this; return (tmp -= i); }
-    difference_type operator -(const iterator &i) const
-    { return it - i.it; }
-	
-    value_type operator *() const
-    { return *it; }
-    value_type operator [](int ii)
-    { return *(it + ii); }
-    
-    bool operator ==(const iterator &i) const
-    { return it == i.it; }
-    bool operator !=(const iterator &i) const
-    { return !(i == *this); }
-    bool operator < (const iterator &i) const
-    { return it < i.it; }
-    size_type index(void) const { return shift; }
-
-    slvector_const_iterator(void) {}
-    slvector_const_iterator(const slvector_iterator<T>& iter)
-      : it(iter.it), shift(iter.shift) {}
-    slvector_const_iterator(const base_iterator &iter, size_type s)
-      : it(iter), shift(s) {}
-  };
-
-
-  /** skyline vector.
-   */
-  template <typename T> class slvector {
-    
-  public :
-    typedef slvector_iterator<T> iterators;
-    typedef slvector_const_iterator<T> const_iterators;
-    typedef typename std::vector<T>::size_type size_type;
-    typedef T value_type;
-
-  protected :
-    std::vector<T> data;
-    size_type shift;
-    size_type size_;
-
-
-  public :
-
-    size_type size(void) const { return size_; }
-    size_type first(void) const { return shift; }
-    size_type last(void) const { return shift + data.size(); }
-    ref_elt_vector<T, slvector<T> > operator [](size_type c)
-    { return ref_elt_vector<T, slvector<T> >(this, c); }
-
-    typename std::vector<T>::iterator data_begin(void) { return data.begin(); }
-    typename std::vector<T>::iterator data_end(void) { return data.end(); }
-    typename std::vector<T>::const_iterator data_begin(void) const
-      { return data.begin(); }
-    typename std::vector<T>::const_iterator data_end(void) const
-      { return data.end(); }
-
-    void w(size_type c, const T &e);
-    T r(size_type c) const {
-      GMM_ASSERT2(c < size_, "out of range");
-      if (c < shift || c >= shift + data.size()) return T(0);
-      return data[c - shift];
-    }
-
-    inline T operator [](size_type c) const { return r(c); }
-    void resize(size_type);
-    void clear(void) { data.resize(0); shift = 0; }
-    void swap(slvector<T> &v) {
-      std::swap(data, v.data);
-      std::swap(shift, v.shift);
-      std::swap(size_, v.size_);
-    }
-
-
-    slvector(void) : data(0), shift(0), size_(0) {}
-    explicit slvector(size_type l) : data(0), shift(0), size_(l) {}
-    slvector(size_type l, size_type d, size_type s)
-      : data(d), shift(s), size_(l) {}
-
-  };
-
-  template<typename T>  void slvector<T>::resize(size_type n) {
-    if (n < last()) {
-      if (shift >= n) clear(); else { data.resize(n-shift); }
-    }
-    size_ = n;
-  }
-
-  template<typename T>  void slvector<T>::w(size_type c, const T &e) {
-    GMM_ASSERT2(c < size_, "out of range");
-    size_type s = data.size();
-    if (!s) { data.resize(1); shift = c; }
-    else if (c < shift) {
-      data.resize(s + shift - c); 
-      typename std::vector<T>::iterator it = data.begin(),it2=data.end()-1;
-      typename std::vector<T>::iterator it3 = it2 - shift + c;
-      for (; it3 >= it; --it3, --it2) *it2 = *it3;
-      std::fill(it, it + shift - c, T(0));
-      shift = c;
-    }
-    else if (c >= shift + s) {
-      data.resize(c - shift + 1);
-      std::fill(data.begin() + s, data.end(), T(0));
-    }
-    data[c - shift] = e;
-  }
-  
-  template <typename T> struct linalg_traits<slvector<T> > {
-    typedef slvector<T> this_type;
-    typedef this_type origin_type;
-    typedef linalg_false is_reference;
-    typedef abstract_vector linalg_type;
-    typedef T value_type;
-    typedef ref_elt_vector<T, slvector<T> > reference;
-    typedef slvector_iterator<T>  iterator;
-    typedef slvector_const_iterator<T> const_iterator;
-    typedef abstract_skyline storage_type;
-    typedef linalg_true index_sorted;
-    static size_type size(const this_type &v) { return v.size(); }
-    static iterator begin(this_type &v)
-      { return iterator(v.data_begin(), v.first()); }
-    static const_iterator begin(const this_type &v)
-      { return const_iterator(v.data_begin(), v.first()); }
-    static iterator end(this_type &v)
-      { return iterator(v.data_end(), v.last()); }
-    static const_iterator end(const this_type &v)
-      { return const_iterator(v.data_end(), v.last()); }
-    static origin_type* origin(this_type &v) { return &v; }
-    static const origin_type* origin(const this_type &v) { return &v; }
-    static void clear(origin_type* o, const iterator &, const iterator &)
-    { o->clear(); }
-    static void do_clear(this_type &v) { v.clear(); }
-    static value_type access(const origin_type *o, const const_iterator &,
-			     const const_iterator &, size_type i)
-    { return (*o)[i]; }
-    static reference access(origin_type *o, const iterator &, const iterator &,
-			    size_type i)
-    { return (*o)[i]; }
-    static void resize(this_type &v, size_type n) { v.resize(n); }
-  };
-
-  template<typename T> std::ostream &operator <<
-  (std::ostream &o, const slvector<T>& v) { gmm::write(o,v); return o; }
-
-  template <typename T>
-  inline size_type nnz(const slvector<T>& l) { return l.last() - l.first(); }
-
-}
-
-namespace std {
-  template <typename T> void swap(gmm::wsvector<T> &v, gmm::wsvector<T> &w)
-  { v.swap(w);}
-  template <typename T> void swap(gmm::rsvector<T> &v, gmm::rsvector<T> &w)
-  { v.swap(w);}
-  template <typename T> void swap(gmm::slvector<T> &v, gmm::slvector<T> &w)
-  { v.swap(w);}
-}
-
-
-
-#endif /* GMM_VECTOR_H__ */
diff --git a/Contrib/gmm/gmm_vector_to_matrix.h b/Contrib/gmm/gmm_vector_to_matrix.h
deleted file mode 100755
index 50036fc..0000000
--- a/Contrib/gmm/gmm_vector_to_matrix.h
+++ /dev/null
@@ -1,339 +0,0 @@
-// -*- c++ -*- (enables emacs c++ mode)
-//===========================================================================
-//
-// Copyright (C) 2003-2008 Yves Renard
-//
-// This file is a part of GETFEM++
-//
-// Getfem++  is  free software;  you  can  redistribute  it  and/or modify it
-// under  the  terms  of the  GNU  Lesser General Public License as published
-// by  the  Free Software Foundation;  either version 2.1 of the License,  or
-// (at your option) any later version.
-// This program  is  distributed  in  the  hope  that it will be useful,  but
-// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or  FITNESS  FOR  A PARTICULAR PURPOSE.  See the GNU Lesser General Public
-// License for more details.
-// You  should  have received a copy of the GNU Lesser General Public License
-// along  with  this program;  if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
-//
-// As a special exception, you may use this file as part of a free software
-// library without restriction.  Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License.  This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-//
-//===========================================================================
-
-/**@file gmm_vector_to_matrix.h
-   @author  Yves Renard <Yves.Renard at insa-lyon.fr>
-   @date December 6, 2003.
-   @brief View vectors as row or column matrices. */
-#ifndef GMM_VECTOR_TO_MATRIX_H__
-#define GMM_VECTOR_TO_MATRIX_H__
-
-#include "gmm_interface.h"
-
-namespace gmm {
-
-  /* ********************************************************************* */
-  /*	     row vector -> transform a vector in a (1, n) matrix.          */
-  /* ********************************************************************* */
-
-  template <typename PT> struct gen_row_vector {
-    typedef gen_row_vector<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef V * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_V;
-    typedef typename linalg_traits<this_type>::reference reference;
-
-    simple_vector_ref<PT> vec;
-    
-    reference operator()(size_type, size_type j) const { return vec[j]; }
-   
-    size_type nrows(void) const { return 1; }
-    size_type ncols(void) const { return vect_size(vec); }
-    
-    gen_row_vector(ref_V v) : vec(v) {}
-    gen_row_vector() {}
-    gen_row_vector(const gen_row_vector<CPT> &cr) : vec(cr.vec) {}
-  };
-
-  template <typename PT>
-  struct gen_row_vector_iterator {
-    typedef gen_row_vector<PT> this_type;
-    typedef typename modifiable_pointer<PT>::pointer MPT;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef simple_vector_ref<PT> value_type;
-    typedef const simple_vector_ref<PT> *pointer;
-    typedef const simple_vector_ref<PT> &reference;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-    typedef std::random_access_iterator_tag  iterator_category;
-    typedef gen_row_vector_iterator<PT> iterator;
-
-    simple_vector_ref<PT> vec;
-    bool isend;
-    
-    iterator &operator ++()   { isend = true; return *this; }
-    iterator &operator --()   { isend = false; return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-    iterator &operator +=(difference_type i)
-    { if (i) isend = false; return *this; }
-    iterator &operator -=(difference_type i)
-    { if (i) isend = true; return *this;  }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const { 
-      return (isend == true) ? ((i.isend == true) ? 0 : 1)
-	                     : ((i.isend == true) ? -1 : 0);
-    }
-
-    const simple_vector_ref<PT>& operator *() const { return vec; }
-    const simple_vector_ref<PT>& operator [](int i) { return vec; }
-
-    bool operator ==(const iterator &i) const { return (isend == i.isend); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (*this - i < 0); }
-
-    gen_row_vector_iterator(void) {}
-    gen_row_vector_iterator(const gen_row_vector_iterator<MPT> &itm)
-      : vec(itm.vec), isend(itm.isend) {}
-    gen_row_vector_iterator(const gen_row_vector<PT> &m, bool iis_end)
-      : vec(m.vec), isend(iis_end) { }
-    
-  };
-
-  template <typename PT>
-  struct linalg_traits<gen_row_vector<PT> > {
-    typedef gen_row_vector<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename select_ref<value_type,
-            typename linalg_traits<V>::reference, PT>::ref_type reference;
-    typedef abstract_null_type sub_col_type;
-    typedef abstract_null_type col_iterator;
-    typedef abstract_null_type const_sub_col_type;
-    typedef abstract_null_type const_col_iterator;
-    typedef simple_vector_ref<const V *> const_sub_row_type;
-    typedef typename select_ref<abstract_null_type, 
-            simple_vector_ref<V *>, PT>::ref_type sub_row_type;
-    typedef gen_row_vector_iterator<typename const_pointer<PT>::pointer>
-            const_row_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    gen_row_vector_iterator<PT>, PT>::ref_type row_iterator;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef row_major sub_orientation;
-    typedef typename linalg_traits<V>::index_sorted index_sorted;
-    static size_type nrows(const this_type &) { return 1; }
-    static size_type ncols(const this_type &m) { return m.ncols(); }
-    static const_sub_row_type row(const const_row_iterator &it) { return *it; }
-    static sub_row_type row(const row_iterator &it) { return *it; }
-    static const_row_iterator row_begin(const this_type &m)
-    { return const_row_iterator(m, false); }
-    static row_iterator row_begin(this_type &m)
-    { return row_iterator(m, false); }
-    static const_row_iterator row_end(const this_type &m)
-    { return const_row_iterator(m, true); }
-    static row_iterator row_end(this_type &m)
-    { return row_iterator(m, true); }
-    static origin_type* origin(this_type &m) { return m.vec.origin; }
-    static const origin_type* origin(const this_type &m)
-    { return m.vec.origin; }
-    static void do_clear(this_type &m)
-    { clear(row(mat_row_begin(m))); }
-    static value_type access(const const_row_iterator &itrow, size_type i)
-    { return itrow.vec[i]; }
-    static reference access(const row_iterator &itrow, size_type i)
-    { return itrow.vec[i]; }
-  };
-  
-  template <typename PT>
-  std::ostream &operator <<(std::ostream &o, const gen_row_vector<PT>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ********************************************************************* */
-  /*	     col vector -> transform a vector in a (n, 1) matrix.          */
-  /* ********************************************************************* */
-
-  template <typename PT> struct gen_col_vector {
-    typedef gen_col_vector<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef V * CPT;
-    typedef typename std::iterator_traits<PT>::reference ref_V;
-    typedef typename linalg_traits<this_type>::reference reference;
-
-    simple_vector_ref<PT> vec;
-    
-    reference operator()(size_type i, size_type) const { return vec[i]; }
-   
-    size_type ncols(void) const { return 1; }
-    size_type nrows(void) const { return vect_size(vec); }
-    
-    gen_col_vector(ref_V v) : vec(v) {}
-    gen_col_vector() {}
-    gen_col_vector(const gen_col_vector<CPT> &cr) : vec(cr.vec) {}
-  };
-
-  template <typename PT>
-  struct gen_col_vector_iterator {
-    typedef gen_col_vector<PT> this_type;
-    typedef typename modifiable_pointer<PT>::pointer MPT;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef simple_vector_ref<PT> value_type;
-    typedef const simple_vector_ref<PT> *pointer;
-    typedef const simple_vector_ref<PT> &reference;
-    typedef ptrdiff_t difference_type;
-    typedef size_t size_type;
-    typedef std::random_access_iterator_tag  iterator_category;
-    typedef gen_col_vector_iterator<PT> iterator;
-
-    simple_vector_ref<PT> vec;
-    bool isend;
-    
-    iterator &operator ++()   { isend = true; return *this; }
-    iterator &operator --()   { isend = false; return *this; }
-    iterator operator ++(int) { iterator tmp = *this; ++(*this); return tmp; }
-    iterator operator --(int) { iterator tmp = *this; --(*this); return tmp; }
-    iterator &operator +=(difference_type i)
-    { if (i) isend = false; return *this; }
-    iterator &operator -=(difference_type i)
-    { if (i) isend = true; return *this;  }
-    iterator operator +(difference_type i) const 
-    { iterator itt = *this; return (itt += i); }
-    iterator operator -(difference_type i) const
-    { iterator itt = *this; return (itt -= i); }
-    difference_type operator -(const iterator &i) const { 
-      return (isend == true) ? ((i.isend == true) ? 0 : 1)
-	                     : ((i.isend == true) ? -1 : 0);
-    }
-
-    const simple_vector_ref<PT>& operator *() const { return vec; }
-    const simple_vector_ref<PT>& operator [](int i) { return vec; }
-
-    bool operator ==(const iterator &i) const { return (isend == i.isend); }
-    bool operator !=(const iterator &i) const { return !(i == *this); }
-    bool operator < (const iterator &i) const { return (*this - i < 0); }
-
-    gen_col_vector_iterator(void) {}
-    gen_col_vector_iterator(const gen_col_vector_iterator<MPT> &itm)
-      : vec(itm.vec), isend(itm.isend) {}
-    gen_col_vector_iterator(const gen_col_vector<PT> &m, bool iis_end)
-      : vec(m.vec), isend(iis_end) { }
-    
-  };
-
-  template <typename PT>
-  struct linalg_traits<gen_col_vector<PT> > {
-    typedef gen_col_vector<PT> this_type;
-    typedef typename std::iterator_traits<PT>::value_type V;
-    typedef typename which_reference<PT>::is_reference is_reference;
-    typedef abstract_matrix linalg_type;
-    typedef typename linalg_traits<V>::origin_type origin_type;
-    typedef typename select_ref<const origin_type *, origin_type *,
-				PT>::ref_type porigin_type;
-    typedef typename linalg_traits<V>::value_type value_type;
-    typedef typename select_ref<value_type,
-            typename linalg_traits<V>::reference, PT>::ref_type reference;
-    typedef abstract_null_type sub_row_type;
-    typedef abstract_null_type row_iterator;
-    typedef abstract_null_type const_sub_row_type;
-    typedef abstract_null_type const_row_iterator;
-    typedef simple_vector_ref<const V *> const_sub_col_type;
-    typedef typename select_ref<abstract_null_type, 
-            simple_vector_ref<V *>, PT>::ref_type sub_col_type;
-    typedef gen_col_vector_iterator<typename const_pointer<PT>::pointer>
-            const_col_iterator;
-    typedef typename select_ref<abstract_null_type, 
-	    gen_col_vector_iterator<PT>, PT>::ref_type col_iterator;
-    typedef typename linalg_traits<V>::storage_type storage_type;
-    typedef col_major sub_orientation;
-    typedef typename linalg_traits<V>::index_sorted index_sorted;
-    static size_type ncols(const this_type &) { return 1; }
-    static size_type nrows(const this_type &m) { return m.nrows(); }
-    static const_sub_col_type col(const const_col_iterator &it) { return *it; }
-    static sub_col_type col(const col_iterator &it) { return *it; }
-    static const_col_iterator col_begin(const this_type &m)
-    { return const_col_iterator(m, false); }
-    static col_iterator col_begin(this_type &m)
-    { return col_iterator(m, false); }
-    static const_col_iterator col_end(const this_type &m)
-    { return const_col_iterator(m, true); }
-    static col_iterator col_end(this_type &m)
-    { return col_iterator(m, true); }
-    static origin_type* origin(this_type &m) { return m.vec.origin; }
-    static const origin_type* origin(const this_type &m)
-    { return m.vec.origin; }
-    static void do_clear(this_type &m)
-    { clear(col(mat_col_begin(m))); }
-    static value_type access(const const_col_iterator &itcol, size_type i)
-    { return itcol.vec[i]; }
-    static reference access(const col_iterator &itcol, size_type i)
-    { return itcol.vec[i]; }
-  };
-  
-  template <typename PT>
-  std::ostream &operator <<(std::ostream &o, const gen_col_vector<PT>& m)
-  { gmm::write(o,m); return o; }
-
-  /* ******************************************************************** */
-  /*		col and row vectors                                       */
-  /* ******************************************************************** */
-
-  
-  template <class V> inline
-  typename select_return< gen_row_vector<const V *>, gen_row_vector<V *>,
-			  const V *>::return_type
-  row_vector(const V& v) {
-    return typename select_return< gen_row_vector<const V *>,
-      gen_row_vector<V *>, const V *>::return_type(linalg_cast(v));
-  }
-
-  template <class V> inline
-  typename select_return< gen_row_vector<const V *>, gen_row_vector<V *>,
-			  V *>::return_type
-  row_vector(V& v) {
-    return typename select_return< gen_row_vector<const V *>,
-      gen_row_vector<V *>, V *>::return_type(linalg_cast(v));
-  }
- 
-  template <class V> inline gen_row_vector<const V *>
-  const_row_vector(V& v)
-  { return gen_row_vector<const V *>(v); }
- 
-
-  template <class V> inline
-  typename select_return< gen_col_vector<const V *>, gen_col_vector<V *>,
-			  const V *>::return_type
-  col_vector(const V& v) {
-    return typename select_return< gen_col_vector<const V *>,
-      gen_col_vector<V *>, const V *>::return_type(linalg_cast(v));
-  }
-
-  template <class V> inline
-  typename select_return< gen_col_vector<const V *>, gen_col_vector<V *>,
-			  V *>::return_type
-  col_vector(V& v) {
-    return typename select_return< gen_col_vector<const V *>,
-      gen_col_vector<V *>, V *>::return_type(linalg_cast(v));
-  }
- 
-  template <class V> inline gen_col_vector<const V *>
-  const_col_vector(V& v)
-  { return gen_col_vector<const V *>(v); }
- 
-
-}
-
-#endif //  GMM_VECTOR_TO_MATRIX_H__
diff --git a/Contrib/mathex/lesser.txt b/Contrib/mathex/lesser.txt
deleted file mode 100644
index 3f50d04..0000000
--- a/Contrib/mathex/lesser.txt
+++ /dev/null
@@ -1,506 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
diff --git a/Contrib/mathex/license.txt b/Contrib/mathex/license.txt
deleted file mode 100644
index 1bc4194..0000000
--- a/Contrib/mathex/license.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-BMP libray License
-------------------
-
-The MathEx library and included programs are part of SSCILIB and provided under
-the terms of the GNU Library/Lesser General Public License (LGPL) 2.1 or latter,
-with following static linking exceptions:
-
-   1. The combined work statically linked with unmodified MathEx library will
-distributed under your own license.
-
-   2. The application or libraries statically linked with MathEx library must identify 
-their use of SSCILIB library. For example, text like
-"[application/library] is based in part on the work of the SSCILIB Library
- (http://sscilib.sourceforge.net/)" 
-will included in document or help to satisfy this requirement.
-
-   3. The folowing five modifications on MathEx library in way to fit your 
-requirement does not implies in modification of source code:
-    i. Modification of the MathEx config script, makefiles or instalation tools.
-   ii. change of name space definition
-using namespace smlib
-to other one (need if it conflict with other library)
-
-   4. The modifications of source code implies in the GNU Library/Lesser General Public License 2.1 or latter, without this static linking exceptions.
-
-End of license term
--------------------
-
-For GNU Library/lesser General Public License, see the lesser.txt or visit
-http://www.gnu.org/
-
-June of 2003.
-
-Sadao Massago
-http://www2.dm.ufscar.br/~sadao
diff --git a/Credits.txt b/Credits.txt
index 20fb364..c9ec4c6 100644
--- a/Credits.txt
+++ b/Credits.txt
@@ -24,8 +24,8 @@ Major code contributions have been provided by Cecile Dobrzynski
 Other code contributors include: Arnaud Francois (edge swap operator), 
 Olivier Pierard (DESC, edge split and face collapse operators), 
 Richard Comblen (PETSc interface), Josue Barboza (parallel adaptation 
-testing and debugging), Jonathan Lambrechts (bug fixes) and Paul-Emile 
-Bernard (bug fixes).
+testing and debugging), Jonathan Lambrechts (bug fixes), 
+Sebastien Blaise (bug fixes) and Paul-Emile Bernard (bug fixes).
 
 This version of MAdLib may contain code (in the Contrib/gmm
 subdirectory) copyright (C) 2002-2008 Yves Renard: check the
diff --git a/Geo/GmshEntities.cc b/Geo/GmshEntities.cc
new file mode 100644
index 0000000..bb1ef28
--- /dev/null
+++ b/Geo/GmshEntities.cc
@@ -0,0 +1,234 @@
+// -------------------------------------------------------------------
+// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+//
+// See the Copyright.txt and License.txt files for license information. 
+// You should have received a copy of these files along with MAdLib. 
+// If not, see <http://www.madlib.be/license/>
+//
+// Please report all bugs and problems to <contrib at madlib.be>
+//
+// Authors: Jean-Francois Remacle, Gaetan Compere
+// -------------------------------------------------------------------
+
+#ifdef _HAVE_GMSH_
+
+#include "GmshEntities.h"
+#include "GmshModel.h"
+
+namespace MAd {
+
+  // -------------------------------------------------------------------
+  // -------------------------------------------------------------------
+  void GmshGEntity::setPhysical(int d, int t)
+  {
+//     if ( phys ) phys.delGE(this);
+    phys = model->getPhysical(d,t);
+//     phys.addGE(this);
+  }
+
+  // -------------------------------------------------------------------
+  // -------------------------------------------------------------------
+  GmshGRegion::GmshGRegion(GmshModel& m, int tag, Physical *_p) : 
+    GmshGEntity(&m,_p) 
+  {
+    gr = model->getModel()->getRegionByTag(tag);
+    if ( !gr ) {
+      gr = new discreteRegion(model->getModel(),tag);
+      model->getModel()->add(gr);
+    }
+  }
+
+  // -------------------------------------------------------------------
+  GmshGRegion::GmshGRegion(const GmshGRegion& ggr) : 
+    GmshGEntity(ggr),gr(ggr.gr) {}
+
+  // -------------------------------------------------------------------
+   GmshGRegion::~GmshGRegion() {}
+
+  // -------------------------------------------------------------------
+  std::list<GmshGFace *> GmshGRegion::faces() const
+  {
+    std::list<GmshGFace*> res;
+    std::list<GFace*> lst = gr->faces();
+    std::list<GFace*>::const_iterator it = lst.begin();
+    for (; it != lst.end(); it++ ){
+      res.push_back( model->getFaceByTag( (*it)->tag() ) );
+    }
+    return res;
+  }
+
+  // -------------------------------------------------------------------
+  // -------------------------------------------------------------------
+  GmshGFace::GmshGFace(GmshModel& m, int tag, Physical *_p) : 
+    GmshGEntity(&m, _p)
+  {
+    gf = model->getModel()->getFaceByTag(tag);
+    if ( !gf ) {
+      gf = new discreteFace(model->getModel(),tag);
+      model->getModel()->add(gf);
+    }
+  }
+
+  // -------------------------------------------------------------------
+  GmshGFace::GmshGFace(const GmshGFace& ggf) : 
+    GmshGEntity(ggf),gf(ggf.gf) {}
+
+  // -------------------------------------------------------------------
+  GmshGFace::~GmshGFace() {}
+
+  // -------------------------------------------------------------------
+  std::list<GmshGEdge*> GmshGFace::edges() const
+  {
+    std::list<GmshGEdge*> res;
+    std::list<GEdge*> lst = gf->edges();
+    std::list<GEdge*>::const_iterator it = lst.begin();
+    for (; it != lst.end(); it++ ){
+      res.push_back( model->getEdgeByTag( (*it)->tag() ) );
+    }
+    return res;
+  }
+
+  // -------------------------------------------------------------------
+  GPoint GmshGFace::point(double par1, double par2) const
+  {
+    return gf->point(par1,par2);
+  }
+
+  // -------------------------------------------------------------------
+  double GmshGFace::curvatures(const SPoint2 &param, SVector3 *dirMax, 
+                               SVector3 *dirMin, double *curvMax, 
+                               double *curvMin) const
+  {
+    return gf->curvatures(param,dirMax,dirMin,curvMax,curvMin);
+  }
+
+  // -------------------------------------------------------------------
+  double GmshGFace::curvatureDiv(const SPoint2 &param) const
+  {
+    gf->curvatureDiv(param);
+  }
+
+  // -------------------------------------------------------------------
+  SPoint2 GmshGFace::geodesic(const SPoint2 &pt1, const SPoint2 &pt2, double t)
+  {
+    return gf->geodesic(pt1,pt2,t);
+  }
+
+  // -------------------------------------------------------------------
+  // -------------------------------------------------------------------
+  GmshGEdge::GmshGEdge(GmshModel& m, int tag, Physical *_p) : 
+    GmshGEntity(&m,_p) 
+  {
+    ge = model->getModel()->getEdgeByTag(tag);
+    if ( !ge ) {
+      ge = new discreteEdge(model->getModel(),tag,NULL,NULL);
+      model->getModel()->add(ge);
+    }
+  }
+
+  // -------------------------------------------------------------------
+  GmshGEdge::GmshGEdge(const GmshGEdge& gge) : 
+    GmshGEntity(gge),ge(gge.ge) {}
+
+  // -------------------------------------------------------------------
+  GmshGEdge::~GmshGEdge() {}
+
+  // -------------------------------------------------------------------
+  std::list<GmshGVertex *> GmshGEdge::vertices() const
+  {
+    std::list<GmshGVertex *> res;
+    res.push_back(getBeginVertex());
+    res.push_back(getEndVertex());
+    return res;
+  }
+
+  // -------------------------------------------------------------------
+  GmshGVertex *GmshGEdge::getBeginVertex() const
+  {
+    GVertex * v = ge->getBeginVertex();
+    return model->getVertexByTag(v->tag());
+  }
+
+  // -------------------------------------------------------------------
+  GmshGVertex *GmshGEdge::getEndVertex() const
+  {
+    GVertex * v = ge->getEndVertex();
+    return model->getVertexByTag(v->tag());
+  }
+
+  // -------------------------------------------------------------------
+  SPoint2 GmshGEdge::reparamOnFace(const GmshGFace *face, double epar, int dir) const
+  {
+    return ge->reparamOnFace(face->getGFace(),epar,dir);
+  }
+
+  // -------------------------------------------------------------------
+  Range<double> GmshGEdge::parBounds(int i) const
+  {
+    return ge->parBounds(i);
+  }
+
+  // -------------------------------------------------------------------
+  double GmshGEdge::curvature(double par) const
+  {
+    ge->curvature(par);
+  }
+
+  // -------------------------------------------------------------------
+  bool GmshGEdge::isSeam(const GmshGFace *face) const
+  {
+    return ge->isSeam(face->getGFace());
+  }
+
+  // -------------------------------------------------------------------
+  GPoint GmshGEdge::point(double p) const
+  {
+    return ge->point(p);
+  }
+
+  // -------------------------------------------------------------------
+  // -------------------------------------------------------------------
+  GmshGVertex::GmshGVertex(GmshModel& m, int tag, Physical *_p) : 
+    GmshGEntity(&m,_p) 
+  {
+    gv = model->getModel()->getVertexByTag(tag);
+    if ( !gv ) {
+      gv = new discreteVertex(model->getModel(),tag);
+      model->getModel()->add(gv);
+    }
+  }
+  // -------------------------------------------------------------------
+  GmshGVertex::GmshGVertex(const GmshGVertex& ggv) : 
+    GmshGEntity(ggv),gv(ggv.gv) {}
+
+  // -------------------------------------------------------------------
+  GmshGVertex::~GmshGVertex() {}
+
+  // -------------------------------------------------------------------
+  std::list<GmshGEdge*> GmshGVertex::edges() const
+  {
+    std::list<GmshGEdge*> res;
+    std::list<GEdge*> lst = gv->edges();
+    std::list<GEdge*>::const_iterator it = lst.begin();
+    for (; it != lst.end(); it++ ){
+      res.push_back( model->getEdgeByTag( (*it)->tag() ) );
+    }
+    return res;
+  }
+
+  // -------------------------------------------------------------------
+  SPoint2 GmshGVertex::reparamOnFace(const GmshGFace *gf, int i) const
+  {
+    return gv->reparamOnFace(gf->getGFace(),i);
+  }
+
+  // -------------------------------------------------------------------
+  bool GmshGVertex::isOnSeam(const GmshGFace *gf) const
+  {
+    return gv->isOnSeam(gf->getGFace());
+  }
+
+  // -------------------------------------------------------------------
+}
+
+#endif
diff --git a/Geo/GmshEntities.h b/Geo/GmshEntities.h
index 96c2ded..e9d9dea 100644
--- a/Geo/GmshEntities.h
+++ b/Geo/GmshEntities.h
@@ -16,17 +16,174 @@
 
 #ifdef _HAVE_GMSH_
 
+#include "Physical.h"
+
 #include "gmsh/GEntity.h"
+#include "gmsh/discreteRegion.h"
+#include "gmsh/discreteFace.h"
+#include "gmsh/discreteEdge.h"
+#include "gmsh/discreteVertex.h"
 
 namespace MAd {
 
-  typedef class GEntity MAdGEntity;
-  typedef class GEntityLessThan MAdGEntityLessThan;
-  typedef class GRegion MAdGRegion;
-  typedef class GFace   MAdGFace;
-  typedef class GEdge   MAdGEdge;
-  typedef class GVertex MAdGVertex;
+  class GmshModel;
+  class GmshGEntity;
+  class GmshGRegion;
+  class GmshGFace;
+  class GmshGEdge;
+  class GmshGVertex;
+
+  // -------------------------------------------------------------------
+  class GmshGEntity {
+
+  public:
+    GmshGEntity(GmshModel *m, Physical *p): model(m), phys(p)
+    {}
+    GmshGEntity(const GmshGEntity& ge): model(ge.model),phys(ge.phys)
+    {}
+    virtual ~GmshGEntity()
+    {}
+
+    void setPhysical(int d, int t);
+
+    virtual int dim() const=0; // to make it pure virtual (GC)
+    virtual int tag() const=0;
+    int pDim() const { if(phys) {return phys->dim();} else {return -1;} }
+    int pTag() const { if(phys) {return phys->tag();} else {return  0;} }
+
+  protected:
+    Physical * phys;
+    GmshModel * model;
+  };
+
+  // -------------------------------------------------------------------
+  class GmshGEntityLessThan {
+  public:
+    bool operator()(const GmshGEntity *ent1, const GmshGEntity *ent2) const
+    { return ent1->tag() < ent2->tag(); }
+  };
+
+  // -------------------------------------------------------------------
+  class GmshGRegion : public GmshGEntity {
+
+  private:
+    GRegion * gr;
+
+  public:
+    GmshGRegion(GmshModel& model, int tag, Physical *_p=NULL);
+    GmshGRegion(const GmshGRegion& ggr);
+    virtual ~GmshGRegion();
+    int dim() const { return 3; }
+    virtual int tag() const { return gr->tag(); }
+
+    std::list<GmshGFace *> faces() const;
+  };
+
+  // -------------------------------------------------------------------
+  class GmshGFace : public GmshGEntity {
+
+  private:
+    GFace * gf;
+
+  public:
+    GmshGFace(GmshModel& model, int tag, Physical *_p=NULL);
+    GmshGFace(const GmshGFace& ggf);
+    virtual ~GmshGFace();
+    int dim() const { return 2; }
+    virtual int tag() const { return gf->tag(); }
+    
+    GFace * getGFace() const { return gf; }
+
+    int numRegions() const { return gf->numRegions(); }
+    std::list<GmshGEdge*> edges() const; 
+
+    // compute the parameters UV from a point XYZ
+    void XYZtoUV(const double X, const double Y, const double Z,
+                 double &U, double &V, const double relax,
+                 const bool onSurface=true) const 
+    { gf->XYZtoUV(X,Y,Z,U,V,relax,onSurface); }
+
+    // return the point on the face corresponding to the given parameter
+    GPoint point(double par1, double par2) const;
+
+    // compute the min and max curvatures and the corresponding directions
+    // return the max curvature
+    // outputs have to be allocated before calling this function
+    double curvatures(const SPoint2 &param, SVector3 *dirMax, SVector3 *dirMin,
+                      double *curvMax, double *curvMin) const;
+
+  // return the curvature computed as the divergence of the normal
+    double curvatureDiv(const SPoint2 &param) const;
+    
+    // compute, in parametric space, the interpolation from pt1 to pt2
+    // along a geodesic of the surface
+    SPoint2 geodesic(const SPoint2 &pt1, const SPoint2 &pt2, double t);
+  };
+
+  // -------------------------------------------------------------------
+  class GmshGEdge : public GmshGEntity {
+
+  private:
+    GEdge * ge;
+
+  public:
+    GmshGEdge(GmshModel& model, int tag, Physical *_p=NULL);
+    GmshGEdge(const GmshGEdge& gge);
+    virtual ~GmshGEdge();
+    int dim() const { return 1; }
+    virtual int tag() const { return ge->tag(); }
+
+    std::list<GmshGVertex *> vertices() const;
+    GmshGVertex *getBeginVertex() const;
+    GmshGVertex *getEndVertex() const;
+
+    // reparamaterize the point onto the given face
+    SPoint2 reparamOnFace(const GmshGFace *face, double epar, int dir) const;
+
+    // get bounds of parametric coordinate 
+    Range<double> parBounds(int i) const;
+  
+    // get the curvature
+    double curvature(double par) const;
+
+    // true if the edge is a seam for the given face.
+    bool isSeam(const GmshGFace *face) const;
+
+    // get the point for the given parameter location
+    GPoint point(double p) const;
+  };
+
+  // -------------------------------------------------------------------
+  class GmshGVertex : public GmshGEntity {
+
+  private:
+    GVertex * gv;
+
+  public:
+    GmshGVertex(GmshModel& model, int tag, Physical *_p=NULL);
+    GmshGVertex(const GmshGVertex& ggv);
+    virtual ~GmshGVertex();
+    int dim() const { return 0; }
+    virtual int tag() const { return gv->tag(); }
+
+    // get the edges that this vertex bounds
+    std::list<GmshGEdge*> edges() const;
+
+    SPoint2 reparamOnFace(const GmshGFace *gf, int i) const;
+
+    // return true if this vertex is on a seam of the given face
+    bool isOnSeam(const GmshGFace *gf) const;
+  };
+
+  // -------------------------------------------------------------------
+  typedef class GmshGEntity MAdGEntity;
+  typedef class GmshGEntityLessThan MAdGEntityLessThan;
+  typedef class GmshGRegion MAdGRegion;
+  typedef class GmshGFace   MAdGFace;
+  typedef class GmshGEdge   MAdGEdge;
+  typedef class GmshGVertex MAdGVertex;
 
+  // -------------------------------------------------------------------
 }
 
 #endif
diff --git a/Geo/GmshModel.cc b/Geo/GmshModel.cc
index 74d754a..97b7796 100644
--- a/Geo/GmshModel.cc
+++ b/Geo/GmshModel.cc
@@ -13,16 +13,94 @@
 #ifdef _HAVE_GMSH_
 
 #include "GmshModel.h"
-
-#include "gmsh/discreteRegion.h"
-#include "gmsh/discreteFace.h"
-#include "gmsh/discreteEdge.h"
-#include "gmsh/discreteVertex.h"
+using std::set;
 
 namespace MAd {
 
   // -------------------------------------------------------------------
-  MAdGEntity * GmshModel::getEntityByTag(int dim, int tag)
+  GmshModel::~GmshModel()
+  {
+    if (model) delete model;
+    clean();
+  }
+
+  // -------------------------------------------------------------------
+  void GmshModel::clean()
+  {
+    riter itR = regions.begin();
+    for (; itR != regions.end(); itR++) delete (*itR);
+    regions.clear();
+    fiter itF = faces.begin();
+    for (; itF != faces.end(); itF++) delete (*itF);
+    faces.clear();
+    eiter itE = edges.begin();
+    for (; itE != edges.end(); itE++) delete (*itE);
+    edges.clear();
+    viter itV = vertices.begin();
+    for (; itV != vertices.end(); itV++) delete (*itV);
+    vertices.clear();
+  }
+
+  // -------------------------------------------------------------------
+  int GmshModel::readMSH(const std::string &filename)
+  {
+    clean();
+    int flag = model->readMSH(filename);
+    importFromModel();
+    return flag;
+  }
+  
+  // -------------------------------------------------------------------
+  int GmshModel::readGEO(const std::string &filename)
+  {
+    clean();
+    int flag = model->readGEO(filename);
+    importFromModel();
+    return flag;
+  }
+  
+  // -------------------------------------------------------------------
+  int GmshModel::readSTEP(const std::string &filename)
+  {
+    clean();
+    int flag = model->readOCCSTEP(filename);
+    importFromModel();
+    return flag;
+  }
+
+  // -------------------------------------------------------------------
+  int GmshModel::readBREP(const std::string &filename)
+  {
+    clean();
+    int flag =  model->readOCCBREP(filename);
+    importFromModel();
+    return flag;
+  }
+
+  // -------------------------------------------------------------------
+  int GmshModel::readIGES(const std::string &filename)
+  { 
+    clean();
+    int flag = model->readOCCIGES(filename);
+    importFromModel();
+    return flag;
+  }
+  
+  // -------------------------------------------------------------------
+  void GmshModel::importFromModel()
+  {
+    std::set<GRegion*, GEntityLessThan>::iterator rit = model->firstRegion();
+    for (; rit != model->lastRegion(); rit++) getRegionByTag((*rit)->tag());
+    std::set<GFace*, GEntityLessThan>::iterator fit = model->firstFace();
+    for (; fit != model->lastFace(); fit++) getFaceByTag((*fit)->tag());
+    std::set<GEdge*, GEntityLessThan>::iterator eit = model->firstEdge();
+    for (; eit != model->lastEdge(); eit++) getEdgeByTag((*eit)->tag());
+    std::set<GVertex*, GEntityLessThan>::iterator vit = model->firstVertex();
+    for (; vit != model->lastVertex(); vit++) getVertexByTag((*vit)->tag());
+  }
+
+  // -------------------------------------------------------------------
+  GmshGEntity * GmshModel::getEntityByTag(int dim, int tag)
   {
     switch(dim) {
     case 3: return getRegionByTag(tag);
@@ -33,47 +111,51 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
-  MAdGRegion * GmshModel::getRegionByTag(int tag)
+  GmshGRegion * GmshModel::getRegionByTag(int tag)
   {
-    GRegion * pGR = model->getRegionByTag(tag);
-    if ( !pGR ) {
-      pGR = new discreteRegion(model,tag);
-      model->add(pGR);
+    std::set<GmshGRegion *,GmshGEntityLessThan>::const_iterator it = regions.begin();
+    for (; it != regions.end(); it++) {
+      if ( (*it)->tag() == tag ) return *it;
     }
-    return pGR;
+    GmshGRegion * newRegion = new GmshGRegion(*this,tag);
+    regions.insert(newRegion);
+    return newRegion;
   }
 
   // -------------------------------------------------------------------
-  MAdGFace * GmshModel::getFaceByTag(int tag)
+  GmshGFace * GmshModel::getFaceByTag(int tag)
   {
-    GFace * pGF = model->getFaceByTag(tag);
-    if ( !pGF ) {
-      pGF = new discreteFace(model,tag);
-      model->add(pGF);
+    set<GmshGFace *,GmshGEntityLessThan>::const_iterator it = faces.begin();
+    for (; it != faces.end(); it++) {
+      if ( (*it)->tag() == tag ) return *it;
     }
-    return pGF;
+    GmshGFace * newFace = new GmshGFace(*this,tag);
+    faces.insert(newFace);
+    return newFace;
   }
 
   // -------------------------------------------------------------------
-  MAdGEdge * GmshModel::getEdgeByTag(int tag)
+  GmshGEdge * GmshModel::getEdgeByTag(int tag)
   {
-    GEdge * pGE = model->getEdgeByTag(tag);
-    if ( !pGE ) {
-      pGE = new discreteEdge(model,tag,NULL,NULL);
-      model->add(pGE);
+    set<GmshGEdge *,GmshGEntityLessThan>::const_iterator it = edges.begin();
+    for (; it != edges.end(); it++) {
+      if ( (*it)->tag() == tag ) return *it;
     }
-    return pGE;
+    GmshGEdge * newEdge = new GmshGEdge(*this,tag);
+    edges.insert(newEdge);
+    return newEdge;
   }
 
   // -------------------------------------------------------------------
-  MAdGVertex * GmshModel::getVertexByTag(int tag)
+  GmshGVertex * GmshModel::getVertexByTag(int tag)
   {
-    GVertex * pGV = model->getVertexByTag(tag);
-    if ( !pGV ) {
-      pGV = new discreteVertex(model,tag);
-      model->add(pGV);
+    set<GmshGVertex *,GmshGEntityLessThan>::const_iterator it = vertices.begin();
+    for (; it != vertices.end(); it++) {
+      if ( (*it)->tag() == tag ) return *it;
     }
-    return pGV;
+    GmshGVertex * newVertex = new GmshGVertex(*this,tag);
+    vertices.insert(newVertex);
+    return newVertex;
   }
 
   // -------------------------------------------------------------------
diff --git a/Geo/GmshModel.h b/Geo/GmshModel.h
index 63a6f40..e9110f2 100644
--- a/Geo/GmshModel.h
+++ b/Geo/GmshModel.h
@@ -17,16 +17,20 @@
 #ifdef _HAVE_GMSH_
 
 #include "MAdModel.h"
-#include "GmshEntities.h"
 
 #include "gmsh/GModel.h"
+#include "GmshEntities.h"
 #include <list>
+#include <set>
 
 namespace MAd {
 
   // -------------------------------------------------------------------
   class GmshModel : public MAdModel {
 
+  private:
+    GModel * model;
+
   public:
 
     GmshModel(std::string name=""): 
@@ -35,49 +39,56 @@ namespace MAd {
       model = new GModel(_name);
       GModel::current(GModel::list.size() - 1);
     }
-    ~GmshModel() { if (model) delete model; }
+    ~GmshModel();
 
     ModelType type() const { return GMSHMODEL; }
 
     // Gmsh mesh file format
-    int readMSH(const std::string &filename) { return model->readMSH(filename); }
+    int readMSH(const std::string &filename);
   
     // Gmsh native CAD format
-    int readGEO(const std::string &filename) { return model->readGEO(filename); }
-    int writeGEO(const std::string &filename) { return model->writeGEO(filename); }
+    int readGEO(const std::string &filename);
   
     // OCC formats
-    int readSTEP(const std::string &filename) { return model->readOCCSTEP(filename); }
-    int readBREP(const std::string &filename) { return model->readOCCBREP(filename); }
-    int readIGES(const std::string &filename) { return model->readOCCIGES(filename); }
+    int readSTEP(const std::string &filename);
+    int readBREP(const std::string &filename);
+    int readIGES(const std::string &filename);
 
     GModel * getModel() { return model; }
 
     // get the number of entities in this model
-    int getNumRegions()  const { return model->getNumRegions();  }
-    int getNumFaces()    const { return model->getNumFaces();    }
-    int getNumEdges()    const { return model->getNumEdges();    }
-    int getNumVertices() const { return model->getNumVertices(); }
+    int getNumRegions()  const { return regions.size();  }
+    int getNumFaces()    const { return faces.size();    }
+    int getNumEdges()    const { return edges.size();    }
+    int getNumVertices() const { return vertices.size(); }
 
     // find the entity with the given tag and create it if not found
-    MAdGEntity * getEntityByTag(int dim, int tag);
-    MAdGRegion * getRegionByTag(int);
-    MAdGFace   * getFaceByTag  (int);
-    MAdGEdge   * getEdgeByTag  (int);
-    MAdGVertex * getVertexByTag(int);
+    GmshGEntity * getEntityByTag(int dim, int tag);
+    GmshGRegion * getRegionByTag(int);
+    GmshGFace   * getFaceByTag  (int);
+    GmshGEdge   * getEdgeByTag  (int);
+    GmshGVertex * getVertexByTag(int);
 
     // get an iterator initialized to the first/last entity in this model.
-    riter firstRegion() { return model->firstRegion(); }
-    fiter firstFace()   { return model->firstFace(); }
-    eiter firstEdge()   { return model->firstEdge(); }
-    viter firstVertex() { return model->firstVertex(); }
-    riter lastRegion()  { return model->lastRegion(); }
-    fiter lastFace()    { return model->lastFace(); }
-    eiter lastEdge()    { return model->lastEdge(); }
-    viter lastVertex()  { return model->lastVertex(); }
+    riter firstRegion() { return regions.begin(); }
+    fiter firstFace()   { return faces.begin(); }
+    eiter firstEdge()   { return edges.begin(); }
+    viter firstVertex() { return vertices.begin(); }
+    riter lastRegion()  { return regions.end(); }
+    fiter lastFace()    { return faces.end(); }
+    eiter lastEdge()    { return edges.end(); }
+    viter lastVertex()  { return vertices.end(); }
 
   private:
-    GModel * model;
+
+    void importFromModel();
+
+    void clean();
+
+    std::set<GmshGRegion *,GmshGEntityLessThan> regions;
+    std::set<GmshGFace   *,GmshGEntityLessThan> faces;
+    std::set<GmshGEdge   *,GmshGEntityLessThan> edges;
+    std::set<GmshGVertex *,GmshGEntityLessThan> vertices;
 
   };
 
diff --git a/Geo/GmshEntities.h b/Geo/MAdModel.cc
similarity index 64%
copy from Geo/GmshEntities.h
copy to Geo/MAdModel.cc
index 96c2ded..c2528fc 100644
--- a/Geo/GmshEntities.h
+++ b/Geo/MAdModel.cc
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 // -------------------------------------------------------------------
 // MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
 //
@@ -11,24 +10,21 @@
 // Authors: Jean-Francois Remacle, Gaetan Compere
 // -------------------------------------------------------------------
 
-#ifndef _H_MAD_GMSHENTITIES
-#define _H_MAD_GMSHENTITIES
-
-#ifdef _HAVE_GMSH_
-
-#include "gmsh/GEntity.h"
+#include "MAdModel.h"
 
 namespace MAd {
 
-  typedef class GEntity MAdGEntity;
-  typedef class GEntityLessThan MAdGEntityLessThan;
-  typedef class GRegion MAdGRegion;
-  typedef class GFace   MAdGFace;
-  typedef class GEdge   MAdGEdge;
-  typedef class GVertex MAdGVertex;
+  Physical * MAdModel::getPhysical(int d, int t)
+  {
+    std::set<Physical *>::const_iterator it = physicals.begin();
+    for (; it != physicals.end(); it++)
+      {
+        if ( (*it)->dim() == d && (*it)->tag() == t ) return *it;
+      }
 
-}
+    Physical * newp = new Physical(d,t);
+    physicals.insert(newp);
+    return newp;
+  }
 
-#endif
-
-#endif
+}
diff --git a/Geo/MAdModel.h b/Geo/MAdModel.h
index 2027fd7..1cbdfac 100644
--- a/Geo/MAdModel.h
+++ b/Geo/MAdModel.h
@@ -14,11 +14,14 @@
 #ifndef _H_MADMODEL
 #define _H_MADMODEL
 
+#include "Physical.h"
+
 #ifdef _HAVE_GMSH_
 #include "GmshEntities.h"
 #else
 #include "NullEntities.h"
 #endif
+
 #include <string>
 #include <set>
 
@@ -45,7 +48,6 @@ namespace MAd {
   
     // Gmsh native CAD format
     virtual int readGEO(const std::string &name) = 0;
-    virtual int writeGEO(const std::string &name) = 0;
   
     // OCC formats
     virtual int readSTEP(const std::string &name) = 0;
@@ -80,8 +82,12 @@ namespace MAd {
     virtual eiter lastEdge() = 0;
     virtual viter lastVertex() = 0;
 
+    Physical * getPhysical(int d, int t);
+    bool physical() const { if (physicals.size()){return true;} return false; }
+
   protected:
     std::string _name;
+    std::set<Physical *> physicals;
   };
 
 }
diff --git a/Geo/Makefile b/Geo/Makefile
deleted file mode 100644
index 7cabadf..0000000
--- a/Geo/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../variables
-
-LIB = ../lib/libMAdGeo${LIBEXT}
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = GmshModel.cc\
-      ModelInterface.cc\
-      NullModel.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${LIB}: ${OBJ} 
-	${AR} ${ARFLAGS} ${LIB} ${OBJ}
-	${RANLIB} ${LIB}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} ${MAdLib_TMPDIR}/.
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} */*.o *.o *.obj
-
-purge:
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Geo/Makefile.am b/Geo/Makefile.am
new file mode 100644
index 0000000..424c758
--- /dev/null
+++ b/Geo/Makefile.am
@@ -0,0 +1,36 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+srcdir = @srcdir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+
+noinst_LTLIBRARIES = libMAdGeo.la
+
+CPPFLAGS += ${MAdLib_DEFS}
+
+AM_CPPFLAGS =  ${MAdLib_INCLUDES} -I.\
+  -I$(srcdir)/../Common\
+  -I$(srcdir)/../Mesh\
+  -I${srcdir}/../Contrib/mathex
+
+libMAdGeo_la_SOURCES = \
+  GmshModel.cc\
+  ModelInterface.cc\
+  NullModel.cc\
+  GmshEntities.cc\
+  NullEntities.cc\
+  MAdModel.cc
+
+purge:
diff --git a/Geo/Makefile.in b/Geo/Makefile.in
new file mode 100644
index 0000000..0f68703
--- /dev/null
+++ b/Geo/Makefile.in
@@ -0,0 +1,504 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = Geo
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libMAdGeo_la_LIBADD =
+am_libMAdGeo_la_OBJECTS = GmshModel.lo ModelInterface.lo NullModel.lo \
+	GmshEntities.lo NullEntities.lo MAdModel.lo
+libMAdGeo_la_OBJECTS = $(am_libMAdGeo_la_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libMAdGeo_la_SOURCES)
+DIST_SOURCES = $(libMAdGeo_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@ ${MAdLib_DEFS}
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libMAdGeo.la
+AM_CPPFLAGS = ${MAdLib_INCLUDES} -I.\
+  -I$(srcdir)/../Common\
+  -I$(srcdir)/../Mesh\
+  -I${srcdir}/../Contrib/mathex
+
+libMAdGeo_la_SOURCES = \
+  GmshModel.cc\
+  ModelInterface.cc\
+  NullModel.cc\
+  GmshEntities.cc\
+  NullEntities.cc\
+  MAdModel.cc
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Geo/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Geo/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libMAdGeo.la: $(libMAdGeo_la_OBJECTS) $(libMAdGeo_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libMAdGeo_la_OBJECTS) $(libMAdGeo_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/GmshEntities.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/GmshModel.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MAdModel.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ModelInterface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/NullEntities.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/NullModel.Plo at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+purge:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Geo/ModelInterface.cc b/Geo/ModelInterface.cc
index 6f13763..5dd075d 100644
--- a/Geo/ModelInterface.cc
+++ b/Geo/ModelInterface.cc
@@ -10,11 +10,20 @@
 // Authors: Jean-Francois Remacle, Gaetan Compere
 // -------------------------------------------------------------------
 
-#include "ModelInterface.h"
+// from Common/
 #include "MathUtils.h"
 #include "MAdMessage.h"
 #include "MAdDefines.h"
 
+#include "ModelInterface.h"
+#ifdef _HAVE_GMSH_
+#include "GmshModel.h"
+#else
+#include "NullModel.h"
+#endif
+#include "GM_Iterators.h"
+#include "PGList.h"
+
 #include <string.h>
 
 namespace MAd {
@@ -121,9 +130,9 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
-  int GM_writeGEO(pGModel model, const std::string &name)
+  bool GM_physical(const pGModel model)
   {
-    return (model->writeGEO(name));
+    return model->physical();
   }
 
   // -------------------------------------------------------------------
@@ -211,6 +220,24 @@ namespace MAd {
     return ent->dim();
   }
 
+  // -------------------------------------------------------------------
+  void GEN_setPhysical(pGEntity ent, int dim, int tag)
+  {
+    ent->setPhysical(dim,tag);
+  }
+
+  // -------------------------------------------------------------------
+  int GEN_physTag(const pGEntity ent)
+  {
+    return ent->pTag();
+  }
+
+  // -------------------------------------------------------------------
+  int GEN_physDim(const pGEntity ent)
+  {
+    return ent->pDim();
+  }
+
 #ifdef _HAVE_GMSH_
   // -------------------------------------------------------------------
   std::list<pGEntity> GEN_closure(const pGEntity pGE)
diff --git a/Geo/ModelInterface.h b/Geo/ModelInterface.h
index fb3b1e5..5e1b0a4 100644
--- a/Geo/ModelInterface.h
+++ b/Geo/ModelInterface.h
@@ -17,31 +17,39 @@
 #include <string>
 #include <list>
 
-#ifdef _HAVE_GMSH_
-#include "GmshModel.h"
-#else
-#include "NullModel.h"
-#endif
-
-#include "GM_Iterators.h"
-#include "PGList.h"
-
 namespace MAd {
 
   // -------------------------------------------------------------------
-  typedef MAdModel *   pGModel;
+#ifdef _HAVE_GMSH_
+  typedef class GmshGEntity MAdGEntity;
+  typedef class GmshGEntityLessThan MAdGEntityLessThan;
+  typedef class GmshGRegion MAdGRegion;
+  typedef class GmshGFace   MAdGFace;
+  typedef class GmshGEdge   MAdGEdge;
+  typedef class GmshGVertex MAdGVertex;
+#else
+  typedef class NullGEntity MAdGEntity;
+  typedef class NullGEntityLessThan MAdGEntityLessThan;
+  typedef class NullGRegion MAdGRegion;
+  typedef class NullGFace   MAdGFace;
+  typedef class NullGEdge   MAdGEdge;
+  typedef class NullGVertex MAdGVertex;
+#endif
+  
   typedef MAdGEntity * pGEntity;
   typedef MAdGRegion * pGRegion;
   typedef MAdGFace   * pGFace;
   typedef MAdGEdge   * pGEdge;
   typedef MAdGVertex * pGVertex;
 
-  typedef GM_RegionIterator * GRIter;
-  typedef GM_FaceIterator   * GFIter;
-  typedef GM_EdgeIterator   * GEIter;
-  typedef GM_VertexIterator * GVIter;
+  typedef class MAdModel * pGModel;
 
-  typedef PGList * pPGList;
+  typedef class GM_RegionIterator * GRIter;
+  typedef class GM_FaceIterator   * GFIter;
+  typedef class GM_EdgeIterator   * GEIter;
+  typedef class GM_VertexIterator * GVIter;
+
+  typedef class PGList * pPGList;
 
   // -------------------------------------------------------------------
 
@@ -63,10 +71,11 @@ namespace MAd {
   int  GM_readFromBREP(pGModel model, const std::string name);
   int  GM_readFromIGES(pGModel model, const std::string name);
 
-  // write geometry in a GEO format file (Gmsh native CAD format)
-  int  GM_writeGEO(pGModel model, const std::string &name);
   // void GM_diagnostics(const pGModel model);
 
+  // Returns true if physical tags are used in the model
+  bool GM_physical(const pGModel model);
+
   // Find the entity with the given tag. 
   // Create it if it doesn't exist.
   pGEntity GM_entityByTag(const pGModel model, int type, int tag);
@@ -106,6 +115,9 @@ namespace MAd {
 
   int GEN_tag(const pGEntity);
   int GEN_type(const pGEntity);
+  void GEN_setPhysical(pGEntity, int dim, int tag);
+  int GEN_physTag(const pGEntity);
+  int GEN_physDim(const pGEntity);
 
 #ifdef _HAVE_GMSH_
   std::list<pGEntity> GEN_closure(const pGEntity);
diff --git a/Geo/GmshEntities.h b/Geo/NullEntities.cc
similarity index 59%
copy from Geo/GmshEntities.h
copy to Geo/NullEntities.cc
index 96c2ded..4a09bf4 100644
--- a/Geo/GmshEntities.h
+++ b/Geo/NullEntities.cc
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 // -------------------------------------------------------------------
 // MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
 //
@@ -11,24 +10,21 @@
 // Authors: Jean-Francois Remacle, Gaetan Compere
 // -------------------------------------------------------------------
 
-#ifndef _H_MAD_GMSHENTITIES
-#define _H_MAD_GMSHENTITIES
 
-#ifdef _HAVE_GMSH_
+#ifndef _HAVE_GMSH_
 
-#include "gmsh/GEntity.h"
+#include "NullModel.h"
 
-namespace MAd {
-
-  typedef class GEntity MAdGEntity;
-  typedef class GEntityLessThan MAdGEntityLessThan;
-  typedef class GRegion MAdGRegion;
-  typedef class GFace   MAdGFace;
-  typedef class GEdge   MAdGEdge;
-  typedef class GVertex MAdGVertex;
+using namespace MAd;
 
+// -------------------------------------------------------------------
+void NullGEntity::setPhysical(int d, int t)
+{
+  //       if ( phys ) phys.delGE(this);
+  phys = model->getPhysical(d,t);
+  //       phys.addGE(this);
 }
 
-#endif
+// -------------------------------------------------------------------
 
 #endif
diff --git a/Geo/NullEntities.h b/Geo/NullEntities.h
index 9eaf244..f117125 100644
--- a/Geo/NullEntities.h
+++ b/Geo/NullEntities.h
@@ -16,22 +16,32 @@
 
 #ifndef _HAVE_GMSH_
 
+#include "Physical.h"
+#include <stdlib.h>
+
 namespace MAd {
 
+  class NullModel;
+
   // -------------------------------------------------------------------
   class NullGEntity {
 
   public:
-    NullGEntity(): _tag(-1) {}
-    NullGEntity(int tag): _tag(tag) {}
-    NullGEntity(const NullGEntity& ge): _tag(ge._tag) {}
+    NullGEntity(int tag, NullModel *m, Physical *_p=NULL): _tag(tag),model(m),phys(_p) {}
+    NullGEntity(const NullGEntity& ge): _tag(ge._tag),model(ge.model),phys(ge.phys) {}
     virtual ~NullGEntity() {}
 
-    virtual int dim() const { return -1; }
+    void setPhysical(int d, int t);
+
+    virtual int dim() const=0;
     virtual int tag() const { return _tag; }
+    int pDim() const { if(phys) {return phys->dim();} else {return -1;} }
+    int pTag() const { if(phys) {return phys->tag();} else {return  0;} }
 
   private:
     int _tag;
+    Physical * phys;
+    NullModel * model;
   };
 
   // -------------------------------------------------------------------
@@ -45,8 +55,7 @@ namespace MAd {
   class NullGRegion : public NullGEntity {
 
   public:
-    NullGRegion() : NullGEntity() {}
-    NullGRegion(int tag) : NullGEntity(tag) {}
+    NullGRegion(int tag, NullModel *m, Physical *_p=NULL) : NullGEntity(tag, m, _p) {}
     NullGRegion(const NullGRegion& gr) : NullGEntity(gr) {}
     virtual ~NullGRegion() {}
     int dim() const { return 3; }
@@ -56,8 +65,7 @@ namespace MAd {
   class NullGFace : public NullGEntity {
 
   public:
-    NullGFace() : NullGEntity() {}
-    NullGFace(int tag) : NullGEntity(tag) {}
+    NullGFace(int tag, NullModel *m, Physical *_p=NULL) : NullGEntity(tag, m, _p) {}
     NullGFace(const NullGFace& gf) : NullGEntity(gf) {}
     virtual ~NullGFace() {}
     int dim() const { return 2; }
@@ -67,8 +75,7 @@ namespace MAd {
   class NullGEdge : public NullGEntity {
 
   public:
-    NullGEdge() : NullGEntity() {}
-    NullGEdge(int tag) : NullGEntity(tag) {}
+    NullGEdge(int tag, NullModel *m, Physical *_p=NULL) : NullGEntity(tag, m, _p) {}
     NullGEdge(const NullGEdge& ge) : NullGEntity(ge) {}
     virtual ~NullGEdge() {}
     int dim() const { return 1; }
@@ -78,21 +85,18 @@ namespace MAd {
   class NullGVertex : public NullGEntity {
 
   public:
-    NullGVertex() : NullGEntity() {}
-    NullGVertex(int tag) : NullGEntity(tag) {}
+    NullGVertex(int tag, NullModel *m, Physical *_p=NULL) : NullGEntity(tag, m, _p) {}
     NullGVertex(const NullGVertex& gv) : NullGEntity(gv) {}
     virtual ~NullGVertex() {}
     int dim() const { return 0; }
   };
 
-  // -------------------------------------------------------------------
   typedef class NullGEntity MAdGEntity;
   typedef class NullGEntityLessThan MAdGEntityLessThan;
   typedef class NullGRegion MAdGRegion;
   typedef class NullGFace   MAdGFace;
   typedef class NullGEdge   MAdGEdge;
   typedef class NullGVertex MAdGVertex;
-
   // -------------------------------------------------------------------
 }
 
diff --git a/Geo/NullModel.cc b/Geo/NullModel.cc
index 9c8bd56..0ce77a1 100644
--- a/Geo/NullModel.cc
+++ b/Geo/NullModel.cc
@@ -66,7 +66,7 @@ namespace MAd {
     for (; it != regions.end(); it++) {
       if ( (*it)->tag() == tag ) return *it;
     }
-    MAdGRegion * newRegion = new MAdGRegion(tag);
+    MAdGRegion * newRegion = new MAdGRegion(tag,this);
     regions.insert(newRegion);
     return newRegion;
   }
@@ -78,7 +78,7 @@ namespace MAd {
     for (; it != faces.end(); it++) {
       if ( (*it)->tag() == tag ) return *it;
     }
-    MAdGFace * newFace = new MAdGFace(tag);
+    MAdGFace * newFace = new MAdGFace(tag,this);
     faces.insert(newFace);
     return newFace;
   }
@@ -90,7 +90,7 @@ namespace MAd {
     for (; it != edges.end(); it++) {
       if ( (*it)->tag() == tag ) return *it;
     }
-    MAdGEdge * newEdge = new MAdGEdge(tag);
+    MAdGEdge * newEdge = new MAdGEdge(tag,this);
     edges.insert(newEdge);
     return newEdge;
   }
@@ -102,7 +102,7 @@ namespace MAd {
     for (; it != vertices.end(); it++) {
       if ( (*it)->tag() == tag ) return *it;
     }
-    MAdGVertex * newVertex = new MAdGVertex(tag);
+    MAdGVertex * newVertex = new MAdGVertex(tag,this);
     vertices.insert(newVertex);
     return newVertex;
   }
@@ -253,13 +253,6 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
-  int NullModel::writeGEO(const std::string &filename)
-  {
-    MAdMsgSgl::instance().error(__LINE__,__FILE__,
-                                "Null model cannot write a GEO file");
-  }
-
-  // -------------------------------------------------------------------
   int NullModel::readSTEP(const std::string &filename)
   {
     MAdMsgSgl::instance().error(__LINE__,__FILE__,
diff --git a/Geo/NullModel.h b/Geo/NullModel.h
index 045d729..5dddd8f 100644
--- a/Geo/NullModel.h
+++ b/Geo/NullModel.h
@@ -37,7 +37,6 @@ namespace MAd {
   
     // Gmsh native CAD format
     int readGEO(const std::string &filename);
-    int writeGEO(const std::string &filename);
   
     // OCC formats
     int readSTEP(const std::string &filename);
diff --git a/Mesh/PList.h b/Geo/Physical.h
similarity index 53%
copy from Mesh/PList.h
copy to Geo/Physical.h
index 1df5bb2..52021d7 100644
--- a/Mesh/PList.h
+++ b/Geo/Physical.h
@@ -11,49 +11,46 @@
 // Authors: Jean-Francois Remacle, Gaetan Compere
 // -------------------------------------------------------------------
 
-/*
-  Store a list of pointers to entities
+#ifndef _H_PHYSICAL
+#define _H_PHYSICAL
 
-  The list is stored as a standart vector:
-    - allow fast random access
-    - allow fast iterating
-    - can be allocated to a particular size
-    - slow at randomly adding/removing elements but not useful here
-*/
+#include <set>
 
-#ifndef _H_PLIST
-#define _H_PLIST
-
-#include "MeshDataBase.h"
-
-#include <vector>
+// #ifdef _HAVE_GMSH_
+// #include "GmshEntities.h"
+// #else
+// #include "NullEntities.h"
+// #endif
 
 namespace MAd {
 
   // -------------------------------------------------------------------
-  class PList {
+  class Physical {
+    
+  private:
+    int _tag;
+    int _dim;
+//     std::set<MAdGEntity *> gents;
 
   public:
-
-    PList() {};
-    PList(const PList& ori)
-    {
-      entities = ori.entities;
-    };
-  
-    ~PList() {};
-
-  public:
-
-    void clear() { entities.clear(); };
-
-  public:
-
-    std::vector<MDB_MeshEntity *> entities;
-
+    
+    Physical(int d, int t) { _dim = d; _tag = t; }
+    ~Physical() {}
+    
+//     void addGE(MAdGEntity * newg) { gents.insert(newg); }
+//     void delGE(MAdGEntity * delg)
+//     {
+//       std::set<MAdGEntity *>::iterator it = gents.find(delg);
+//       if ( it != gents.end() ) gents.erase(it);
+//     }
+
+    int tag() const { return _tag; }
+    int dim() const { return _dim; }
+    
   };
 
   // -------------------------------------------------------------------
-
 }
+
 #endif
+
diff --git a/MAdConfig.h.in b/MAdConfig.h.in
index 28c7fff..c87bfb8 100644
--- a/MAdConfig.h.in
+++ b/MAdConfig.h.in
@@ -1,37 +1,122 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-#ifndef _H_MADCONFIG_MAD_
-#define _H_MADCONFIG_MAD_
+/* MAdConfig.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Whether we run the compilation on a 64 bits architecture or not */
 #undef HAVE_64BIT_SIZE_T
-#undef _HAVE_ANN_
+
+/* Whether we use BLAS or not */
 #undef HAVE_BLAS
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Whether we use Lapack or not */
+#undef HAVE_LAPACK
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <mpi.h> header file. */
+#undef HAVE_MPI_H
+
+/* Whether we use DLLs or not */
+#undef HAVE_NO_DLL
+
+/* Whether we use socklens or not */
+#undef HAVE_NO_SOCKLEN_T
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Whether we compile for parallel utilization or not */
+#undef PARALLEL
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Whether we use the ANN library or not */
+#undef _HAVE_ANN_
+
+/* Whether we use BLAS or not */
 #undef _HAVE_BLAS_
-#undef HAVE_CBLAS
-#undef _HAVE_CBLAS_
+
+/* Whether we use GMM or not */
 #undef _HAVE_GMM_
+
+/* Whether we use Gmsh or not */
 #undef _HAVE_GMSH_
-#undef _HAVE_GSL_
-#undef HAVE_LAPACK
-#undef _HAVE_LAPACK_
+
+/* Whether we use Mathex or not */
+#undef _HAVE_MATHEX_
+
+/* Whether we use Metis or not */
 #undef _HAVE_METIS_
+
+/* Whether we use MPI or not */
 #undef _HAVE_MPI_
-#undef HAVE_NO_DLL
-#undef HAVE_NO_SOCKLEN_T
+
+/* Whether we use OpenCascade or not */
 #undef _HAVE_OCC_
+
+/* Whether we use ParMetis or not */
 #undef _HAVE_PARMETIS_
+
+/* Whether we use the Cenaero parser or not */
 #undef _HAVE_PARSER_
-#undef _HAVE_PETSC_
-#undef PARALLEL
 
-#endif
+/* Whether we use PETSc or not */
+#undef _HAVE_PETSC_
diff --git a/Makefile b/Makefile
deleted file mode 100644
index e89a239..0000000
--- a/Makefile
+++ /dev/null
@@ -1,403 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include variables
-
-MADLIB_MAJOR_VERSION = 1
-MADLIB_MINOR_VERSION = 2
-MADLIB_PATCH_VERSION = 3
-MADLIB_EXTRA_VERSION =
-
-MADLIB_VERSION = ${MADLIB_MAJOR_VERSION}.${MADLIB_MINOR_VERSION}.${MADLIB_PATCH_VERSION}${MADLIB_EXTRA_VERSION}
-
-MADLIB_SHORT_LICENSE = "GNU Lesser General Public License"
-
-MADLIB_VERSION_FILE = Common/MAdLibVersion.h
-MADLIB_DATE = `date "+%Y%m%d"`
-MADLIB_PCFILE = MAdLib.pc
-
-MADLIB_API = \
-Adapt/AdaptInterface.h\
-Adapt/constraint/ModelConstraintManager.h\
-Adapt/constraint/Constraint.h\
-Adapt/MeshParametersManager.h\
-Adapt/operator/VertexMoveOp.h\
-Adapt/operator/SliverRegionHandler.h\
-Adapt/operator/FaceSwapOp.h\
-Adapt/operator/DESCOp.h\
-Adapt/operator/EdgeCollapseOp.h\
-Adapt/operator/EdgeSplitOp.h\
-Adapt/operator/EdgeSwapConfig.h\
-Adapt/operator/EdgeSwapOp.h\
-Adapt/operator/FaceCollapseOp.h\
-Adapt/operator/OperatorTools.h\
-Adapt/operator/SliverFaceHandler.h\
-Adapt/operator/RegionRemoveOp.h\
-Adapt/operator/MAdOperatorBase.h\
-Adapt/output/MAdOutput.h\
-Adapt/quality/ElementEvaluatorBase.h\
-Adapt/quality/ElementStatistics.h\
-Adapt/quality/MeshQualityManager.h\
-Adapt/quality/MeanRatioEvaluator.h\
-Adapt/quality/OrientedMeanRatioEvaluator.h\
-Adapt/repositioning/NodesRepositioningOp.h\
-Adapt/repositioning/GeoMatcher.h\
-Adapt/repositioning/MobileObject.h\
-Adapt/repositioning/LaplaceSmoothingOp.h\
-Adapt/repositioning/MAdElasticityOp.h\
-Adapt/sizeField/NullSField.h\
-Adapt/sizeField/MeshSizeBase.h\
-Adapt/sizeField/IsoMeshSize.h\
-Adapt/sizeField/LocalSizeField.h\
-Adapt/sizeField/AnalyticalSField.h\
-Adapt/sizeField/PWLinearSField.h\
-Adapt/sizeField/AnisoMeshSize.h\
-Adapt/sizeField/SizeFieldBase.h\
-Adapt/sizeField/SizeFieldManager.h\
-Adapt/sizeField/DiscreteSF.h\
-Adapt/utils/MAdStatistics.h\
-Adapt/utils/MAdLinearSystemSparskit.h\
-Adapt/utils/DistanceToPoints.h\
-Adapt/utils/DistanceFunction.h\
-Adapt/utils/MAdLinearSystemPETSc.h\
-Adapt/utils/MAdTimeManager.h\
-Adapt/utils/MAdLinearSystemGmm.h\
-Adapt/utils/NodalDataManager.h\
-Adapt/utils/CallBackManager.h\
-Adapt/utils/MAdLinearSystem.h\
-Adapt/utils/History.h\
-Geo/GM_Iterators.h\
-Geo/GmshEntities.h\
-Geo/GmshModel.h\
-Geo/MAdModel.h\
-Geo/ModelInterface.h\
-Geo/NullEntities.h\
-Geo/NullModel.h\
-Geo/PGList.h\
-Mesh/CheckMesh.h\
-Mesh/CheckOrientation.h\
-Mesh/Mark.h\
-Mesh/MeshDataBaseAttachable.h\
-Mesh/MeshDataBaseCommCheck.h\
-Mesh/MeshDataBaseComm.h\
-Mesh/MeshDataBaseCommPeriodic.h\
-Mesh/MeshDataBaseGEntity2Physical.h\
-Mesh/MeshDataBase.h\
-Mesh/MeshDataBaseInterface.h\
-Mesh/MeshDataBaseIO.h\
-Mesh/MeshDataBaseIterators.h\
-Mesh/MeshDataBaseLoadBalancing.h\
-Mesh/MeshDataBaseMessage.h\
-Mesh/MeshDataBaseMiniMesh.h\
-Mesh/MeshDataBaseParallelInterface.h\
-Mesh/MeshDataBaseParallelIO.h\
-Mesh/metisAdaptiveRepart.h\
-Mesh/MshTags.h\
-Mesh/MSops.h\
-Mesh/ParallelUtils.h\
-Mesh/PList.h\
-Common/MAdDefines.h\
-Common/MAdFieldEvaluator.h\
-Common/MAdMatrix.h\
-Common/MAdMessage.h\
-Common/MAdResourceManager.h\
-Common/MAdSingleton.h\
-Common/MAdStringFieldEvaluator.h\
-Common/MathUtils.h\
-Common/MAdLib.h\
-Common/MAdMetric.h\
-Common/MAdVector3.h\
-Common/MAdLibVersion.h\
-Contrib/mathex/mathex.h\
-Contrib/ANN/include/ANN/ANN.h
-
-docdir=${prefix}/doc
-
-# Main building rules
-
-#all: link
-
-#link: compile
-#	${LINKER} ${OPTIM} ${DASH}o bin/MAdLib${EXEEXT} ${MAdLib_LIBS}
-
-default: lib
-
-all: bench
-
-compile: variables initialtag dirs
-ifneq (${UNAME},WIN32MSVC)
-	@for i in ${MAdLib_DIRS}; do (cd $$i && ${MAKE}); done
-else
-	for %%i in (${MAdLib_DIRS}) do ${MAKE} -C %%i
-endif
-
-bench: lib
-ifneq (${UNAME},WIN32MSVC)
-	cd Benchmarks/moveIt; ln -s examples/tube/MyParams.h; cd -;
-	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE}); done
-else
-	for %%i in (${MAdLib_BENCHDIRS}) do ${MAKE} -C %%i
-endif
-
-tag:
-ifneq (${UNAME},WIN32MSVC)
-	echo "#define MADLIB_MAJOR_VERSION ${MADLIB_MAJOR_VERSION}" > ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_MINOR_VERSION ${MADLIB_MINOR_VERSION}" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_PATCH_VERSION ${MADLIB_PATCH_VERSION}" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_EXTRA_VERSION \"${MADLIB_EXTRA_VERSION}\"" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_VERSION       \"${MADLIB_VERSION}\"" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_DATE          \"`date`\"" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_HOST          \"${HOSTNAME}\"" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_PACKAGER      \"`whoami`\"" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_OS            \"${UNAME}\"" >> ${MADLIB_VERSION_FILE}
-	echo "#define MADLIB_SHORT_LICENSE \"${MADLIB_SHORT_LICENSE}\"" >> ${MADLIB_VERSION_FILE}
-else
-	echo #define MADLIB_MAJOR_VERSION ${MADLIB_MAJOR_VERSION} > ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_MINOR_VERSION ${MADLIB_MINOR_VERSION} >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_PATCH_VERSION ${MADLIB_PATCH_VERSION} >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_EXTRA_VERSION "${MADLIB_EXTRA_VERSION}" >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_VERSION       "${MADLIB_VERSION}" >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_DATE          "" >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_HOST          "${HOSTNAME}" >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_PACKAGER      "" >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_OS            "${UNAME}" >> ${MADLIB_VERSION_FILE}
-	echo #define MADLIB_SHORT_LICENSE ${MADLIB_SHORT_LICENSE} >> ${MADLIB_VERSION_FILE}
-endif
-
-# Rules to build the MAdLib library
-
-.PHONY: lib
-lib: variables initialtag compile
-ifneq (${UNAME},WIN32MSVC)
-	@for i in ${MAdLib_DIRS}; do (cd $$i && ${MAKE} cpobj); done
-	${AR} ${ARFLAGS}lib/libMAdLib${LIBEXT}  ${MAdLib_TMPDIR}/*${OBJEXT}
-	${RANLIB} lib/libMAdLib${LIBEXT}
-	rm -f lib/*${OBJEXT}
-else
-	for %%i in (${MAdLib_DIRS}); do ${MAKE} -C %%i
-	${AR} ${ARFLAGS}bin\libMAdLib${LIBEXT} lib\*${LIBEXT}
-	erase lib\*${LIBEXT}
-	move bin\libMAdLib${LIBEXT} "lib"
-endif
-
-install: lib pc doc
-ifneq (${UNAME},WIN32MSVC)
-	mkdir -p ${includedir}/MAdLib
-	rm -f ${includedir}/MAdLib/*
-	cp -f ${MADLIB_API} ${includedir}/MAdLib
-	mkdir -p ${libdir}
-	cp -f lib/* ${libdir}/.
-ifneq (${DOXYGEN},)
-	mkdir -p ${docdir}
-	cp -rf doc/html ${docdir}/.
-	@echo "*********************************************************************"
-	@echo "MAdLib has been installed to the following locations:"
-	@echo "   * Libraries:            ${libdir}"
-	@echo "   * Header files:         ${includedir}"
-	@echo "   * Documentation:        ${docdir}"
-	@echo "Note that the libraries location should be found by the LD process."
-	@echo "*********************************************************************"
-else
-	@echo "*********************************************************************"
-	@echo "MAdLib has been installed to the following locations:"
-	@echo "   * Libraries:            ${libdir}"
-	@echo "   * Header files:         ${includedir}"
-	@echo "Note that the libraries location should be found by the LD process."
-	@echo "*********************************************************************"
-endif
-else
-	if not exist ${includedir}\MAdLib mkdir ${includedir}\MAdLib
-	if not exist ${libdir} mkdir ${libdir}
-	erase /q ${includedir}\MAdLib\*.h
-	for %%i in (${subst /,\,${MADLIB_API}}) do copy %%i ${includedir}\MAdLib
-	copy /y lib\libMAdLib${LIBEXT} ${libdir}\libMAdLib${LIBSUFFIX}${LIBEXT}
-endif
-
-install-bench: bench pc doc
-ifneq (${UNAME},WIN32MSVC)
-	mkdir -p ${includedir}/MAdLib
-	rm -f ${includedir}/MAdLib/*
-	cp -f ${MADLIB_API} ${includedir}/MAdLib
-	mkdir -p ${libdir}
-	cp -f lib/* ${libdir}/.
-	mkdir -p ${bindir}
-	-cp -f bin/* ${bindir}/.
-ifneq (${DOXYGEN},)
-	mkdir -p ${docdir}
-	cp -rf doc/html ${docdir}/.
-	@echo "*********************************************************************"
-	@echo "MAdLib has been installed to the following locations:"
-	@echo "   * Libraries:            ${libdir}"
-	@echo "   * Header files:         ${includedir}"
-	@echo "   * Executables:          ${bindir}"
-	@echo "   * Documentation:        ${docdir}"
-	@echo "Note that the libraries location should be found by the LD process."
-	@echo "*********************************************************************"
-else
-	@echo "*********************************************************************"
-	@echo "MAdLib has been installed to the following locations:"
-	@echo "   * Libraries:            ${libdir}"
-	@echo "   * Header files:         ${includedir}"
-	@echo "   * Executables:          ${bindir}"
-	@echo "Note that the libraries location should be found by the LD process."
-	@echo "*********************************************************************"
-endif
-#	cp -f lib/libMAdLib${LIBEXT} ${libdir}/libMAdLib${LIBSUFFIX}${LIBEXT}
-else
-	if not exist ${includedir}\MAdLib mkdir ${includedir}\MAdLib
-	if not exist ${libdir} mkdir ${libdir}
-	erase /q ${includedir}\MAdLib\*.h
-	for %%i in (${subst /,\,${MADLIB_API}}) do copy %%i ${includedir}\MAdLib
-	copy /y lib\libMAdLib${LIBEXT} ${libdir}\libMAdLib${LIBSUFFIX}${LIBEXT}
-endif
-
-uninstall:
-	rm -rf ${includedir}/MAdLib
-	rm -rf ${libdir}/libMAdLib${LIBSUFFIX}${LIBEXT}
-	rm -rf ${docdir}
-	rm -rf ${bindir}
-	rm ${MADLIB_PCFILE}
-
-# Utilities
-
-variables: configure
-	@echo "********************************************************************"
-	@echo "Please configure MAdLib by running ./configure"
-	@echo "For help, type ./configure --help"
-	@echo "********************************************************************"
-	@exit 1
-
-dirs:
-	-mkdir -p bin lib ${MAdLib_TMPDIR}
-
-purge:
-ifneq (${UNAME},WIN32MSVC)
-	for i in ${MAdLib_DIRS}; do (cd $$i && ${MAKE} purge); done
-	for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} purge); done
-else
-	for %%i in (${MAdLib_DIRS}) do ${MAKE} -C %%i purge
-	for %%i in (${MAdLib_BENCHDIRS}) do ${MAKE} -C %%i purge
-endif
-
-clean:
-ifneq (${UNAME},WIN32MSVC)
-	for i in ${MAdLib_DIRS}; do (cd $$i && ${MAKE} clean); done
-	for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} clean); done
-	rm -f ${MADLIB_VERSION_FILE}
-	rm -rf bin lib ${MAdLib_TMPDIR} doc
-else
-	for %%i in (${MAdLib_DIRS}) do ${MAKE} -C %%i clean
-	for %%i in (${MAdLib_BENCHDIRS}) do ${MAKE} -C %%i clean
-	erase ${MADLIB_VERSION_FILE}
-	rm -rf bin lib ${MAdLib_TMPDIR} doc
-endif
-
-depend: initialtag
-	mv -f Common/MAdLibConfig.h .
-	cp -f MAdLibConfig.depend Common/MAdLibConfig.h
-	for i in ${MAdLib_DIRS}; do (cd $$i && ${MAKE} depend); done
-	mv -f MAdLibConfig.h Common/
-
-nodepend:
-	for i in ${MAdLib_DIRS} ; do \
-          (cd $$i && (sed '/^# DO NOT DELETE THIS LINE/q' Makefile) > Makefile.new \
-          && cp Makefile Makefile.bak \
-          && cp Makefile.new Makefile \
-          && rm -f Makefile.new); \
-        done 
-
-initialtag:
-ifneq (${UNAME},WIN32MSVC)
-	@if [ ! -r ${MADLIB_VERSION_FILE} ]; then ${MAKE} tag ; fi
-else
-	${MAKE} tag
-endif
-
-tags:
-	gtags
-	htags
-
-etags:
-	etags `find . \( -name "*.cpp" -o -name "*.c" -o -name "*.h"\
-                      -o -name "*.y" -o -name "*.l" \)`
-
-# Rules to package the sources
-
-source-tree: purge
-	rm -rf MAdLib-${MADLIB_VERSION}
-	tar zcf MAdLib.tgz --exclude "*.o" --exclude "*.a" --exclude "libMAdLib*"\
-          --exclude "variables" --exclude "config.log" --exclude "config.status"\
-          --exclude "autom4*" --exclude "Makefile.distrib" --exclude "*.bak"\
-          --exclude "HTML" --exclude "*TAGS*" --exclude ".svn" --exclude "*.pos"\
-          --exclude "*.msh" --exclude "toPort" --exclude "poubelle"\
-          --exclude "Makefile.buildconfig"\
-          Geo Mesh Adapt Common Copyright.txt License.txt Credits.txt\
-          README *.in Contrib Makefile configure Tutorial doxygen.config
-	mkdir MAdLib-${MADLIB_VERSION}
-	cd MAdLib-${MADLIB_VERSION} && tar zxf ../MAdLib.tgz
-	rm -f MAdLib.tgz
-	tar zcf MAdLib_Benchmarks.tgz\
-          --exclude "*.bak"\
-          --exclude "*.msh"\
-          --exclude "*.pos"\
-          --exclude ".svn"\
-          --exclude "cpu" --exclude "*tmp*" --exclude "statistics"\
-          --exclude "slivers" --exclude "cpuinfo" --exclude "journal" --exclude "meshSize"\
-          Benchmarks/meshInfo Benchmarks/optimize\
-          Benchmarks/moveIt/*.h Benchmarks/moveIt/*.cc Benchmarks/moveIt/Makefile\
-          Benchmarks/moveIt/README\
-          Benchmarks/moveIt/examples/tube
-	cd MAdLib-${MADLIB_VERSION} && tar zxf ../MAdLib_Benchmarks.tgz
-	rm -f MAdLib_Benchmarks.tgz
-
-source: source-tree
-	cd MAdLib-${MADLIB_VERSION} && rm -rf ${MADLIB_VERSION_FILE}\
-          Common/MAdLibConfig.h 
-	tar zcf MAdLib-${MADLIB_VERSION}-source.tgz MAdLib-${MADLIB_VERSION}
-
-# Configuration file to include MAdLib within a pkg-config compilation
-
-pc:
-ifneq (${UNAME},WIN32MSVC)
-	echo "prefix=${prefix}" > ${MADLIB_PCFILE}
-	echo "exec_prefix=${prefix}/bin" >> ${MADLIB_PCFILE}
-	echo "libdir=${libdir}" >> ${MADLIB_PCFILE}
-	echo "includedir=${includedir}" >> ${MADLIB_PCFILE}
-	echo "">> ${MADLIB_PCFILE}
-	echo "Name: MAdLib" >> ${MADLIB_PCFILE}
-	echo "Version: ${MADLIB_VERSION}" >> ${MADLIB_PCFILE}
-	echo "Description: Mesh adaptation library" >> ${MADLIB_PCFILE}
-	echo "Libs: -L${libdir} -lMAdLib" >> ${MADLIB_PCFILE}
-	echo "Cflags: -I${includedir}" >> ${MADLIB_PCFILE}
-else
-	echo prefix=${prefix} > ${MADLIB_PCFILE}
-	echo exec_prefix=${prefix}/bin >> ${MADLIB_PCFILE}
-	echo libdir=${libdir} >> ${MADLIB_PCFILE}
-	echo includedir=${includedir} >> ${MADLIB_PCFILE}
-	echo >> ${MADLIB_PCFILE}
-	echo Name: MAdLib >> ${MADLIB_PCFILE}
-	echo Version: ${MADLIB_VERSION} >> ${MADLIB_PCFILE}
-	echo Description: Mesh adaptation library >> ${MADLIB_PCFILE}
-	echo Libs: -L${libdir} -lMAdLib >> ${MADLIB_PCFILE}
-	echo Cflags: -I${includedir} >> ${MADLIB_PCFILE}
-endif
-
-doc:
-ifneq (${DOXYGEN},)
-	${DOXYGEN} doxygen.config
-else
-ifneq (${UNAME},WIN32MSVC)
-	echo "Doxygen not found during configure process: documentation will not be generated"
-else
-	echo Doxygen not found during configure process: documentation will not be generated
-endif
-endif
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..229150a
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,251 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+srcdir = @srcdir@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+VPATH = @srcdir@
+DOXYGEN = @DOXYGEN@
+docdir = @docdir@
+includedir = @includedir@
+allincludedir = @allincludedir@
+
+MADLIB_MAJOR_VERSION = 1
+MADLIB_MINOR_VERSION = 2
+MADLIB_PATCH_VERSION = 3
+
+MADLIB_VERSION = ${MADLIB_MAJOR_VERSION}.${MADLIB_MINOR_VERSION}.${MADLIB_PATCH_VERSION}
+
+SUBDIRS = ${MAdLib_DIRS}
+AUTOMAKE_OPTIONS = subdir-objects
+
+dist_doc_DATA = README License.txt Copyright.txt Credits.txt 
+
+lib_LTLIBRARIES = libMAdLib.la
+
+libMAdLib_la_LIBADD = ${MAdLib_LIBADD}
+
+libMAdLib_la_DEPENDENCIES = ${MAdLib_LIBADD}
+
+CPPFLAGS += ${MAdLib_DEFS}
+
+AM_CPPFLAGS =  ${MAdLib_INCLUDES}\
+       -I$(srcdir)/Geo\
+       -I$(srcdir)/Mesh\
+       -I$(srcdir)/Common\
+       -I$(srcdir)/Adapt\
+       -I$(srcdir)/Adapt/constraint\
+       -I$(srcdir)/Adapt/operator\
+       -I$(srcdir)/Adapt/output\
+       -I$(srcdir)/Adapt/quality\
+       -I$(srcdir)/Adapt/repositioning\
+       -I$(srcdir)/Adapt/sizeField\
+       -I$(srcdir)/Adapt/utils
+
+
+libMAdLib_la_SOURCES =
+
+include_HEADERS = \
+  Adapt/AdaptInterface.h\
+  Adapt/output/MAdOutput.h\
+  Adapt/repositioning/MobileObject.h\
+  Adapt/operator/MAdOperations.h\
+  Adapt/sizeField/LocalSizeField.h\
+  Adapt/sizeField/AnalyticalSField.h\
+  Adapt/sizeField/PWLinearSField.h\
+  Adapt/sizeField/SizeFieldBase.h\
+  Adapt/sizeField/DiscreteSF.h\
+  Adapt/sizeField/SizeField.h\
+  Adapt/sizeField/BackgroundSF.h\
+  Adapt/utils/DistanceToPoints.h\
+  Adapt/utils/DistanceFunction.h\
+  Adapt/utils/CallbackDefinition.h\
+  Geo/ModelInterface.h\
+  Mesh/CheckMesh.h\
+  Mesh/MshTags.h\
+  Mesh/MeshDataBaseInterface.h\
+  Mesh/MeshDataBaseParallelInterface.h\
+  Mesh/MeshDataBaseComm.h\
+  Mesh/MeshDataBaseCommPeriodic.h\
+  Common/MAdLib.h
+
+if Extended_API
+allinclude_HEADERS = \
+  Adapt/AdaptInterface.h\
+  Adapt/constraint/ModelConstraintManager.h\
+  Adapt/constraint/Constraint.h\
+  Adapt/MeshParametersManager.h\
+  Adapt/operator/MAdOperations.h\
+  Adapt/operator/VertexMoveOp.h\
+  Adapt/operator/SliverRegionHandler.h\
+  Adapt/operator/FaceSwapOp.h\
+  Adapt/operator/DESCOp.h\
+  Adapt/operator/EdgeCollapseOp.h\
+  Adapt/operator/EdgeSplitOp.h\
+  Adapt/operator/EdgeSwapConfig.h\
+  Adapt/operator/EdgeSwapOp.h\
+  Adapt/operator/FaceCollapseOp.h\
+  Adapt/operator/OperatorTools.h\
+  Adapt/operator/SliverFaceHandler.h\
+  Adapt/operator/RegionRemoveOp.h\
+  Adapt/operator/MAdOperatorBase.h\
+  Adapt/output/MAdOutput.h\
+  Adapt/quality/ElementEvaluatorBase.h\
+  Adapt/quality/ElementStatistics.h\
+  Adapt/quality/MeshQualityManager.h\
+  Adapt/quality/MeanRatioEvaluator.h\
+  Adapt/quality/OrientedMeanRatioEvaluator.h\
+  Adapt/repositioning/NodesRepositioningOp.h\
+  Adapt/repositioning/GeoMatcher.h\
+  Adapt/repositioning/MobileObject.h\
+  Adapt/repositioning/LaplaceSmoothingOp.h\
+  Adapt/repositioning/MAdElasticityOp.h\
+  Adapt/sizeField/NullSField.h\
+  Adapt/sizeField/MeshSizeBase.h\
+  Adapt/sizeField/IsoMeshSize.h\
+  Adapt/sizeField/LocalSizeField.h\
+  Adapt/sizeField/AnalyticalSField.h\
+  Adapt/sizeField/PWLinearSField.h\
+  Adapt/sizeField/AnisoMeshSize.h\
+  Adapt/sizeField/SizeField.h\
+  Adapt/sizeField/BackgroundSF.h\
+  Adapt/sizeField/SizeFieldBase.h\
+  Adapt/sizeField/SizeFieldManager.h\
+  Adapt/sizeField/DiscreteSF.h\
+  Adapt/utils/MAdStatistics.h\
+  Adapt/utils/MAdLinearSystemSparskit.h\
+  Adapt/utils/DistanceToPoints.h\
+  Adapt/utils/DistanceFunction.h\
+  Adapt/utils/MAdLinearSystemPETSc.h\
+  Adapt/utils/MAdTimeManager.h\
+  Adapt/utils/MAdLinearSystemGmm.h\
+  Adapt/utils/NodalDataManager.h\
+  Adapt/utils/CallbackManager.h\
+  Adapt/utils/CallbackDefinition.h\
+  Adapt/utils/MAdLinearSystem.h\
+  Adapt/utils/History.h\
+  Geo/GM_Iterators.h\
+  Geo/GmshEntities.h\
+  Geo/GmshModel.h\
+  Geo/MAdModel.h\
+  Geo/ModelInterface.h\
+  Geo/NullEntities.h\
+  Geo/NullModel.h\
+  Geo/PGList.h\
+  Geo/Physical.h\
+  Mesh/CheckMesh.h\
+  Mesh/CheckOrientation.h\
+  Mesh/Mark.h\
+  Mesh/MeshDataBaseAttachable.h\
+  Mesh/MeshDataBaseCommCheck.h\
+  Mesh/MeshDataBaseComm.h\
+  Mesh/MeshDataBaseCommPeriodic.h\
+  Mesh/MeshDataBaseGEntity2Physical.h\
+  Mesh/MeshDataBase.h\
+  Mesh/MeshDataBaseInterface.h\
+  Mesh/MeshDataBaseIO.h\
+  Mesh/MeshDataBaseIterators.h\
+  Mesh/MeshDataBaseLoadBalancing.h\
+  Mesh/MeshDataBaseMiniMesh.h\
+  Mesh/MeshDataBaseParallelInterface.h\
+  Mesh/MeshDataBaseParallelIO.h\
+  Mesh/metisAdaptiveRepart.h\
+  Mesh/MshTags.h\
+  Mesh/ParallelUtils.h\
+  Mesh/PList.h\
+  Common/MAdDefines.h\
+  Common/MAdFieldEvaluator.h\
+  Common/MAdMatrix.h\
+  Common/MAdMessage.h\
+  Common/MAdResourceManager.h\
+  Common/MAdSingleton.h\
+  Common/MAdStringFieldEvaluator.h\
+  Common/MathUtils.h\
+  Common/MAdLib.h\
+  Common/MAdMetric.h\
+  Common/MAdVector3.h\
+  Contrib/mathex/mathex.h
+endif
+
+ACLOCAL_AMFLAGS = -I m4
+
+
+bench: install
+	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE}); done
+
+install-bench: bench
+	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} install); done
+
+uninstall-bench:
+	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} uninstall); done
+
+doc:
+	cd ${srcdir} && ${DOXYGEN} && cd -
+
+install-doc: doc
+	cd ${srcdir} && cp -r doc/ ${prefix}/. && cd -
+
+##purge:
+##	for i in ${MAdLib_DIRS}; do (cd $$i && ${MAKE} purge); done
+##	for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} purge); done
+
+source-tree: ##purge
+	rm -rf MAdLib-${MADLIB_VERSION}
+	cd ${srcdir} && tar zcf MAdLib.tgz --exclude "*.o" --exclude "*.a" --exclude "libMAdLib*"\
+          --exclude "variables" --exclude "config.log" --exclude "config.status"\
+          --exclude "autom4*" --exclude "Makefile.distrib" --exclude "*.bak"\
+          --exclude "HTML" --exclude "*TAGS*" --exclude ".svn" --exclude "*.pos"\
+          --exclude "*.msh" --exclude "toPort" --exclude "poubelle"\
+          --exclude "Makefile.buildconfig"\
+          Geo Mesh Adapt Common Copyright.txt License.txt Credits.txt\
+          README *.in Contrib Makefile* configure Tutorial
+	mkdir MAdLib-${MADLIB_VERSION}
+	cd MAdLib-${MADLIB_VERSION} && tar zxf ${srcdir}/MAdLib.tgz
+	rm -f ${srcdir}/MAdLib.tgz
+	cd ${srcdir} && tar zcf MAdLib_Benchmarks.tgz\
+          --exclude "*.bak"\
+          --exclude "*.msh"\
+          --exclude "*.pos"\
+          --exclude ".svn"\
+          --exclude "cpu" --exclude "*tmp*" --exclude "statistics"\
+          --exclude "slivers" --exclude "cpuinfo" --exclude "journal" --exclude "meshSize"\
+          Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize\
+          Benchmarks/moveIt/*.h Benchmarks/moveIt/*.cc Benchmarks/moveIt/Makefile*\
+          Benchmarks/moveIt/README\
+          Benchmarks/moveIt/examples/tube
+	cd MAdLib-${MADLIB_VERSION} && tar zxf ${srcdir}/MAdLib_Benchmarks.tgz
+	rm -f ${srcdir}/MAdLib_Benchmarks.tgz
+
+source: source-tree
+	cd MAdLib-${MADLIB_VERSION} && rm -rf ${MADLIB_VERSION_FILE}\
+          Common/MAdLibConfig.h 
+	tar zcf MAdLib-${MADLIB_VERSION}-source.tgz MAdLib-${MADLIB_VERSION}
+
+MADLIB_PCFILE = MAdLib.pc
+pc:
+	echo "prefix=${prefix}" > ${MADLIB_PCFILE}
+	echo "exec_prefix=${prefix}/bin" >> ${MADLIB_PCFILE}
+	echo "libdir=${libdir}" >> ${MADLIB_PCFILE}
+	echo "includedir=${includedir}" >> ${MADLIB_PCFILE}
+	echo "">> ${MADLIB_PCFILE}
+	echo "Name: MAdLib" >> ${MADLIB_PCFILE}
+	echo "Version: ${MADLIB_VERSION}" >> ${MADLIB_PCFILE}
+	echo "Description: Mesh adaptation library" >> ${MADLIB_PCFILE}
+	echo "Libs: -L${libdir} -lMAdLib" >> ${MADLIB_PCFILE}
+	echo "Cflags: -I${includedir}" >> ${MADLIB_PCFILE}
+	mkdir ${libdir}/pkgconfig
+	cp ${MADLIB_PCFILE} ${libdir}/pkgconfig/.
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..282707c
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,1151 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__allinclude_HEADERS_DIST) \
+	$(am__configure_deps) $(dist_doc_DATA) $(include_HEADERS) \
+	$(srcdir)/MAdConfig.h.in $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(srcdir)/variables.in \
+	$(top_srcdir)/configure config.guess config.sub depcomp \
+	install-sh ltmain.sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = MAdConfig.h
+CONFIG_CLEAN_FILES = variables
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \
+	"$(DESTDIR)$(allincludedir)" "$(DESTDIR)$(includedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+am_libMAdLib_la_OBJECTS =
+libMAdLib_la_OBJECTS = $(am_libMAdLib_la_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libMAdLib_la_SOURCES)
+DIST_SOURCES = $(libMAdLib_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+DATA = $(dist_doc_DATA)
+am__allinclude_HEADERS_DIST = Adapt/AdaptInterface.h \
+	Adapt/constraint/ModelConstraintManager.h \
+	Adapt/constraint/Constraint.h Adapt/MeshParametersManager.h \
+	Adapt/operator/MAdOperations.h Adapt/operator/VertexMoveOp.h \
+	Adapt/operator/SliverRegionHandler.h \
+	Adapt/operator/FaceSwapOp.h Adapt/operator/DESCOp.h \
+	Adapt/operator/EdgeCollapseOp.h Adapt/operator/EdgeSplitOp.h \
+	Adapt/operator/EdgeSwapConfig.h Adapt/operator/EdgeSwapOp.h \
+	Adapt/operator/FaceCollapseOp.h Adapt/operator/OperatorTools.h \
+	Adapt/operator/SliverFaceHandler.h \
+	Adapt/operator/RegionRemoveOp.h \
+	Adapt/operator/MAdOperatorBase.h Adapt/output/MAdOutput.h \
+	Adapt/quality/ElementEvaluatorBase.h \
+	Adapt/quality/ElementStatistics.h \
+	Adapt/quality/MeshQualityManager.h \
+	Adapt/quality/MeanRatioEvaluator.h \
+	Adapt/quality/OrientedMeanRatioEvaluator.h \
+	Adapt/repositioning/NodesRepositioningOp.h \
+	Adapt/repositioning/GeoMatcher.h \
+	Adapt/repositioning/MobileObject.h \
+	Adapt/repositioning/LaplaceSmoothingOp.h \
+	Adapt/repositioning/MAdElasticityOp.h \
+	Adapt/sizeField/NullSField.h Adapt/sizeField/MeshSizeBase.h \
+	Adapt/sizeField/IsoMeshSize.h Adapt/sizeField/LocalSizeField.h \
+	Adapt/sizeField/AnalyticalSField.h \
+	Adapt/sizeField/PWLinearSField.h \
+	Adapt/sizeField/AnisoMeshSize.h Adapt/sizeField/SizeField.h \
+	Adapt/sizeField/BackgroundSF.h Adapt/sizeField/SizeFieldBase.h \
+	Adapt/sizeField/SizeFieldManager.h \
+	Adapt/sizeField/DiscreteSF.h Adapt/utils/MAdStatistics.h \
+	Adapt/utils/MAdLinearSystemSparskit.h \
+	Adapt/utils/DistanceToPoints.h Adapt/utils/DistanceFunction.h \
+	Adapt/utils/MAdLinearSystemPETSc.h \
+	Adapt/utils/MAdTimeManager.h Adapt/utils/MAdLinearSystemGmm.h \
+	Adapt/utils/NodalDataManager.h Adapt/utils/CallbackManager.h \
+	Adapt/utils/CallbackDefinition.h Adapt/utils/MAdLinearSystem.h \
+	Adapt/utils/History.h Geo/GM_Iterators.h Geo/GmshEntities.h \
+	Geo/GmshModel.h Geo/MAdModel.h Geo/ModelInterface.h \
+	Geo/NullEntities.h Geo/NullModel.h Geo/PGList.h Geo/Physical.h \
+	Mesh/CheckMesh.h Mesh/CheckOrientation.h Mesh/Mark.h \
+	Mesh/MeshDataBaseAttachable.h Mesh/MeshDataBaseCommCheck.h \
+	Mesh/MeshDataBaseComm.h Mesh/MeshDataBaseCommPeriodic.h \
+	Mesh/MeshDataBaseGEntity2Physical.h Mesh/MeshDataBase.h \
+	Mesh/MeshDataBaseInterface.h Mesh/MeshDataBaseIO.h \
+	Mesh/MeshDataBaseIterators.h Mesh/MeshDataBaseLoadBalancing.h \
+	Mesh/MeshDataBaseMiniMesh.h \
+	Mesh/MeshDataBaseParallelInterface.h \
+	Mesh/MeshDataBaseParallelIO.h Mesh/metisAdaptiveRepart.h \
+	Mesh/MshTags.h Mesh/ParallelUtils.h Mesh/PList.h \
+	Common/MAdDefines.h Common/MAdFieldEvaluator.h \
+	Common/MAdMatrix.h Common/MAdMessage.h \
+	Common/MAdResourceManager.h Common/MAdSingleton.h \
+	Common/MAdStringFieldEvaluator.h Common/MathUtils.h \
+	Common/MAdLib.h Common/MAdMetric.h Common/MAdVector3.h \
+	Contrib/mathex/mathex.h
+HEADERS = $(allinclude_HEADERS) $(include_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+VPATH = @srcdir@
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@ ${MAdLib_DEFS}
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MADLIB_MAJOR_VERSION = 1
+MADLIB_MINOR_VERSION = 2
+MADLIB_PATCH_VERSION = 3
+MADLIB_VERSION = ${MADLIB_MAJOR_VERSION}.${MADLIB_MINOR_VERSION}.${MADLIB_PATCH_VERSION}
+SUBDIRS = ${MAdLib_DIRS}
+AUTOMAKE_OPTIONS = subdir-objects
+dist_doc_DATA = README License.txt Copyright.txt Credits.txt 
+lib_LTLIBRARIES = libMAdLib.la
+libMAdLib_la_LIBADD = ${MAdLib_LIBADD}
+libMAdLib_la_DEPENDENCIES = ${MAdLib_LIBADD}
+AM_CPPFLAGS = ${MAdLib_INCLUDES}\
+       -I$(srcdir)/Geo\
+       -I$(srcdir)/Mesh\
+       -I$(srcdir)/Common\
+       -I$(srcdir)/Adapt\
+       -I$(srcdir)/Adapt/constraint\
+       -I$(srcdir)/Adapt/operator\
+       -I$(srcdir)/Adapt/output\
+       -I$(srcdir)/Adapt/quality\
+       -I$(srcdir)/Adapt/repositioning\
+       -I$(srcdir)/Adapt/sizeField\
+       -I$(srcdir)/Adapt/utils
+
+libMAdLib_la_SOURCES = 
+include_HEADERS = \
+  Adapt/AdaptInterface.h\
+  Adapt/output/MAdOutput.h\
+  Adapt/repositioning/MobileObject.h\
+  Adapt/operator/MAdOperations.h\
+  Adapt/sizeField/LocalSizeField.h\
+  Adapt/sizeField/AnalyticalSField.h\
+  Adapt/sizeField/PWLinearSField.h\
+  Adapt/sizeField/SizeFieldBase.h\
+  Adapt/sizeField/DiscreteSF.h\
+  Adapt/sizeField/SizeField.h\
+  Adapt/sizeField/BackgroundSF.h\
+  Adapt/utils/DistanceToPoints.h\
+  Adapt/utils/DistanceFunction.h\
+  Adapt/utils/CallbackDefinition.h\
+  Geo/ModelInterface.h\
+  Mesh/CheckMesh.h\
+  Mesh/MshTags.h\
+  Mesh/MeshDataBaseInterface.h\
+  Mesh/MeshDataBaseParallelInterface.h\
+  Mesh/MeshDataBaseComm.h\
+  Mesh/MeshDataBaseCommPeriodic.h\
+  Common/MAdLib.h
+
+ at Extended_API_TRUE@allinclude_HEADERS = \
+ at Extended_API_TRUE@  Adapt/AdaptInterface.h\
+ at Extended_API_TRUE@  Adapt/constraint/ModelConstraintManager.h\
+ at Extended_API_TRUE@  Adapt/constraint/Constraint.h\
+ at Extended_API_TRUE@  Adapt/MeshParametersManager.h\
+ at Extended_API_TRUE@  Adapt/operator/MAdOperations.h\
+ at Extended_API_TRUE@  Adapt/operator/VertexMoveOp.h\
+ at Extended_API_TRUE@  Adapt/operator/SliverRegionHandler.h\
+ at Extended_API_TRUE@  Adapt/operator/FaceSwapOp.h\
+ at Extended_API_TRUE@  Adapt/operator/DESCOp.h\
+ at Extended_API_TRUE@  Adapt/operator/EdgeCollapseOp.h\
+ at Extended_API_TRUE@  Adapt/operator/EdgeSplitOp.h\
+ at Extended_API_TRUE@  Adapt/operator/EdgeSwapConfig.h\
+ at Extended_API_TRUE@  Adapt/operator/EdgeSwapOp.h\
+ at Extended_API_TRUE@  Adapt/operator/FaceCollapseOp.h\
+ at Extended_API_TRUE@  Adapt/operator/OperatorTools.h\
+ at Extended_API_TRUE@  Adapt/operator/SliverFaceHandler.h\
+ at Extended_API_TRUE@  Adapt/operator/RegionRemoveOp.h\
+ at Extended_API_TRUE@  Adapt/operator/MAdOperatorBase.h\
+ at Extended_API_TRUE@  Adapt/output/MAdOutput.h\
+ at Extended_API_TRUE@  Adapt/quality/ElementEvaluatorBase.h\
+ at Extended_API_TRUE@  Adapt/quality/ElementStatistics.h\
+ at Extended_API_TRUE@  Adapt/quality/MeshQualityManager.h\
+ at Extended_API_TRUE@  Adapt/quality/MeanRatioEvaluator.h\
+ at Extended_API_TRUE@  Adapt/quality/OrientedMeanRatioEvaluator.h\
+ at Extended_API_TRUE@  Adapt/repositioning/NodesRepositioningOp.h\
+ at Extended_API_TRUE@  Adapt/repositioning/GeoMatcher.h\
+ at Extended_API_TRUE@  Adapt/repositioning/MobileObject.h\
+ at Extended_API_TRUE@  Adapt/repositioning/LaplaceSmoothingOp.h\
+ at Extended_API_TRUE@  Adapt/repositioning/MAdElasticityOp.h\
+ at Extended_API_TRUE@  Adapt/sizeField/NullSField.h\
+ at Extended_API_TRUE@  Adapt/sizeField/MeshSizeBase.h\
+ at Extended_API_TRUE@  Adapt/sizeField/IsoMeshSize.h\
+ at Extended_API_TRUE@  Adapt/sizeField/LocalSizeField.h\
+ at Extended_API_TRUE@  Adapt/sizeField/AnalyticalSField.h\
+ at Extended_API_TRUE@  Adapt/sizeField/PWLinearSField.h\
+ at Extended_API_TRUE@  Adapt/sizeField/AnisoMeshSize.h\
+ at Extended_API_TRUE@  Adapt/sizeField/SizeField.h\
+ at Extended_API_TRUE@  Adapt/sizeField/BackgroundSF.h\
+ at Extended_API_TRUE@  Adapt/sizeField/SizeFieldBase.h\
+ at Extended_API_TRUE@  Adapt/sizeField/SizeFieldManager.h\
+ at Extended_API_TRUE@  Adapt/sizeField/DiscreteSF.h\
+ at Extended_API_TRUE@  Adapt/utils/MAdStatistics.h\
+ at Extended_API_TRUE@  Adapt/utils/MAdLinearSystemSparskit.h\
+ at Extended_API_TRUE@  Adapt/utils/DistanceToPoints.h\
+ at Extended_API_TRUE@  Adapt/utils/DistanceFunction.h\
+ at Extended_API_TRUE@  Adapt/utils/MAdLinearSystemPETSc.h\
+ at Extended_API_TRUE@  Adapt/utils/MAdTimeManager.h\
+ at Extended_API_TRUE@  Adapt/utils/MAdLinearSystemGmm.h\
+ at Extended_API_TRUE@  Adapt/utils/NodalDataManager.h\
+ at Extended_API_TRUE@  Adapt/utils/CallbackManager.h\
+ at Extended_API_TRUE@  Adapt/utils/CallbackDefinition.h\
+ at Extended_API_TRUE@  Adapt/utils/MAdLinearSystem.h\
+ at Extended_API_TRUE@  Adapt/utils/History.h\
+ at Extended_API_TRUE@  Geo/GM_Iterators.h\
+ at Extended_API_TRUE@  Geo/GmshEntities.h\
+ at Extended_API_TRUE@  Geo/GmshModel.h\
+ at Extended_API_TRUE@  Geo/MAdModel.h\
+ at Extended_API_TRUE@  Geo/ModelInterface.h\
+ at Extended_API_TRUE@  Geo/NullEntities.h\
+ at Extended_API_TRUE@  Geo/NullModel.h\
+ at Extended_API_TRUE@  Geo/PGList.h\
+ at Extended_API_TRUE@  Geo/Physical.h\
+ at Extended_API_TRUE@  Mesh/CheckMesh.h\
+ at Extended_API_TRUE@  Mesh/CheckOrientation.h\
+ at Extended_API_TRUE@  Mesh/Mark.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseAttachable.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseCommCheck.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseComm.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseCommPeriodic.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseGEntity2Physical.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBase.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseInterface.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseIO.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseIterators.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseLoadBalancing.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseMiniMesh.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseParallelInterface.h\
+ at Extended_API_TRUE@  Mesh/MeshDataBaseParallelIO.h\
+ at Extended_API_TRUE@  Mesh/metisAdaptiveRepart.h\
+ at Extended_API_TRUE@  Mesh/MshTags.h\
+ at Extended_API_TRUE@  Mesh/ParallelUtils.h\
+ at Extended_API_TRUE@  Mesh/PList.h\
+ at Extended_API_TRUE@  Common/MAdDefines.h\
+ at Extended_API_TRUE@  Common/MAdFieldEvaluator.h\
+ at Extended_API_TRUE@  Common/MAdMatrix.h\
+ at Extended_API_TRUE@  Common/MAdMessage.h\
+ at Extended_API_TRUE@  Common/MAdResourceManager.h\
+ at Extended_API_TRUE@  Common/MAdSingleton.h\
+ at Extended_API_TRUE@  Common/MAdStringFieldEvaluator.h\
+ at Extended_API_TRUE@  Common/MathUtils.h\
+ at Extended_API_TRUE@  Common/MAdLib.h\
+ at Extended_API_TRUE@  Common/MAdMetric.h\
+ at Extended_API_TRUE@  Common/MAdVector3.h\
+ at Extended_API_TRUE@  Contrib/mathex/mathex.h
+
+ACLOCAL_AMFLAGS = -I m4
+MADLIB_PCFILE = MAdLib.pc
+all: MAdConfig.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+MAdConfig.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+	else :; fi
+
+stamp-h1: $(srcdir)/MAdConfig.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status MAdConfig.h
+$(srcdir)/MAdConfig.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f MAdConfig.h stamp-h1
+variables: $(top_builddir)/config.status $(srcdir)/variables.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libMAdLib.la: $(libMAdLib_la_OBJECTS) $(libMAdLib_la_DEPENDENCIES) 
+	$(LINK) -rpath $(libdir) $(libMAdLib_la_OBJECTS) $(libMAdLib_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-dist_docDATA: $(dist_doc_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
+	@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-dist_docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(docdir)" && rm -f $$files
+install-allincludeHEADERS: $(allinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(allincludedir)" || $(MKDIR_P) "$(DESTDIR)$(allincludedir)"
+	@list='$(allinclude_HEADERS)'; test -n "$(allincludedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(allincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(allincludedir)" || exit $$?; \
+	done
+
+uninstall-allincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(allinclude_HEADERS)'; test -n "$(allincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(allincludedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(allincludedir)" && rm -f $$files
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	done
+
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) MAdConfig.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS) MAdConfig.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) MAdConfig.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) MAdConfig.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@$(am__cd) '$(distuninstallcheck_dir)' \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) MAdConfig.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(allincludedir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-allincludeHEADERS install-dist_docDATA \
+	install-includeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-allincludeHEADERS uninstall-dist_docDATA \
+	uninstall-includeHEADERS uninstall-libLTLIBRARIES
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+	ctags-recursive install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool ctags ctags-recursive dist \
+	dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
+	dist-xz dist-zip distcheck distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-libtool \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install \
+	install-allincludeHEADERS install-am install-data \
+	install-data-am install-dist_docDATA install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-includeHEADERS install-info \
+	install-info-am install-libLTLIBRARIES install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs installdirs-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-recursive uninstall \
+	uninstall-allincludeHEADERS uninstall-am \
+	uninstall-dist_docDATA uninstall-includeHEADERS \
+	uninstall-libLTLIBRARIES
+
+
+bench: install
+	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE}); done
+
+install-bench: bench
+	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} install); done
+
+uninstall-bench:
+	@for i in ${MAdLib_BENCHDIRS}; do (cd $$i && ${MAKE} uninstall); done
+
+doc:
+	cd ${srcdir} && ${DOXYGEN} && cd -
+
+install-doc: doc
+	cd ${srcdir} && cp -r doc/ ${prefix}/. && cd -
+
+source-tree: ##purge
+	rm -rf MAdLib-${MADLIB_VERSION}
+	cd ${srcdir} && tar zcf MAdLib.tgz --exclude "*.o" --exclude "*.a" --exclude "libMAdLib*"\
+          --exclude "variables" --exclude "config.log" --exclude "config.status"\
+          --exclude "autom4*" --exclude "Makefile.distrib" --exclude "*.bak"\
+          --exclude "HTML" --exclude "*TAGS*" --exclude ".svn" --exclude "*.pos"\
+          --exclude "*.msh" --exclude "toPort" --exclude "poubelle"\
+          --exclude "Makefile.buildconfig"\
+          Geo Mesh Adapt Common Copyright.txt License.txt Credits.txt\
+          README *.in Contrib Makefile* configure Tutorial
+	mkdir MAdLib-${MADLIB_VERSION}
+	cd MAdLib-${MADLIB_VERSION} && tar zxf ${srcdir}/MAdLib.tgz
+	rm -f ${srcdir}/MAdLib.tgz
+	cd ${srcdir} && tar zcf MAdLib_Benchmarks.tgz\
+          --exclude "*.bak"\
+          --exclude "*.msh"\
+          --exclude "*.pos"\
+          --exclude ".svn"\
+          --exclude "cpu" --exclude "*tmp*" --exclude "statistics"\
+          --exclude "slivers" --exclude "cpuinfo" --exclude "journal" --exclude "meshSize"\
+          Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize\
+          Benchmarks/moveIt/*.h Benchmarks/moveIt/*.cc Benchmarks/moveIt/Makefile*\
+          Benchmarks/moveIt/README\
+          Benchmarks/moveIt/examples/tube
+	cd MAdLib-${MADLIB_VERSION} && tar zxf ${srcdir}/MAdLib_Benchmarks.tgz
+	rm -f ${srcdir}/MAdLib_Benchmarks.tgz
+
+source: source-tree
+	cd MAdLib-${MADLIB_VERSION} && rm -rf ${MADLIB_VERSION_FILE}\
+          Common/MAdLibConfig.h 
+	tar zcf MAdLib-${MADLIB_VERSION}-source.tgz MAdLib-${MADLIB_VERSION}
+pc:
+	echo "prefix=${prefix}" > ${MADLIB_PCFILE}
+	echo "exec_prefix=${prefix}/bin" >> ${MADLIB_PCFILE}
+	echo "libdir=${libdir}" >> ${MADLIB_PCFILE}
+	echo "includedir=${includedir}" >> ${MADLIB_PCFILE}
+	echo "">> ${MADLIB_PCFILE}
+	echo "Name: MAdLib" >> ${MADLIB_PCFILE}
+	echo "Version: ${MADLIB_VERSION}" >> ${MADLIB_PCFILE}
+	echo "Description: Mesh adaptation library" >> ${MADLIB_PCFILE}
+	echo "Libs: -L${libdir} -lMAdLib" >> ${MADLIB_PCFILE}
+	echo "Cflags: -I${includedir}" >> ${MADLIB_PCFILE}
+	mkdir ${libdir}/pkgconfig
+	cp ${MADLIB_PCFILE} ${libdir}/pkgconfig/.
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Mesh/Balance.cc b/Mesh/Balance.cc
index 02aaa03..b8a3d18 100644
--- a/Mesh/Balance.cc
+++ b/Mesh/Balance.cc
@@ -11,7 +11,6 @@
 // -------------------------------------------------------------------
 
 #include "MeshDataBase.h"
-#include "MSops.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseComm.h"
 #include "MeshDataBaseParallelInterface.h"
diff --git a/Mesh/CheckMesh.cc b/Mesh/CheckMesh.cc
index d34835f..39f42fa 100644
--- a/Mesh/CheckMesh.cc
+++ b/Mesh/CheckMesh.cc
@@ -133,8 +133,8 @@ namespace MAd {
               F_info(pf,"",out);
             }
           }
-          if ( ( F_whatIn(pf) != R_whatIn( F_region(pf,0) ) ) || 
-               ( F_whatIn(pf) != R_whatIn( F_region(pf,1) ) ) ) {
+          if ( ( F_whatIn(pf) != (pGEntity)R_whatIn( F_region(pf,0) ) ) || 
+               ( F_whatIn(pf) != (pGEntity)R_whatIn( F_region(pf,1) ) ) ) {
             flag = 0;
             if (verbose) {
               out << "Face classif on dim 3 used by regions classif on different entities\n";
diff --git a/Mesh/CheckMesh.h b/Mesh/CheckMesh.h
index fcf46b7..c7d2506 100644
--- a/Mesh/CheckMesh.h
+++ b/Mesh/CheckMesh.h
@@ -48,7 +48,7 @@ namespace MAd {
 
   // -------------------------------------------------------------------
   // return 1 if the mesh passes the test successfully, 0 otherwise
-  bool checkMesh(MDB_Mesh * mesh, checkType type, int verbose, 
+  bool checkMesh(MDB_Mesh * mesh, checkType type=CHECK_ALL, int verbose=1, 
                  std::ostream& out=std::cout, MeshStatus * status=NULL);
 
   // -------------------------------------------------------------------
diff --git a/Mesh/CheckOrientation.cc b/Mesh/CheckOrientation.cc
index 94269c8..d57c26e 100644
--- a/Mesh/CheckOrientation.cc
+++ b/Mesh/CheckOrientation.cc
@@ -10,8 +10,6 @@
 // Authors: Cecile Dobrzynski, Jean-Francois Remacle, Gaetan Compere
 // -------------------------------------------------------------------
 
-#include "MSops.h"
-
 #ifdef PARALLEL
 #include <cassert>
 
@@ -19,10 +17,7 @@
 #include "autopack.h"
 
 #include "MeshDataBase.h"
-
-#include "MeshDataBaseInterface.h"
 #include "MeshDataBaseParallelInterface.h"
-
 #include "CheckOrientation.h"
 
 namespace MAd {
diff --git a/Mesh/Makefile b/Mesh/Makefile
deleted file mode 100644
index 055132f..0000000
--- a/Mesh/Makefile
+++ /dev/null
@@ -1,69 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../variables
-
-LIB = ../lib/libMAdMesh${LIBEXT}
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common
-
-ALLFLAGS = ${OPTIM} ${CXXFLAGS} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = Balance.cc\
-      CheckMesh.cc\
-      CheckOrientation.cc\
-      Mark.cc\
-      MeshDataBase.cc\
-      MeshDataBaseComm.cc\
-      MeshDataBaseCommCheck.cc\
-      MeshDataBaseGEntity2Physical.cc\
-      MeshDataBaseInterface.cc\
-      MeshDataBaseIO.cc\
-      MeshDataBaseLoadBalancing.cc\
-      MeshDataBaseMessage.cc\
-      MeshDataBaseMigration.cc\
-      MeshDataBaseMiniMesh.cc\
-      MeshDataBaseParallelInterface.cc\
-      MeshDataBaseParallelIO.cc\
-      metisAdaptiveRepart.cc\
-      ParallelUtils.cc\
-      PeriodicInterfaceMigration.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-${LIB}: ${OBJ} 
-	${AR} ${ARFLAGS} ${LIB} ${OBJ}
-	${RANLIB} ${LIB}
-
-cpobj: ${OBJ} 
-	cp -f ${OBJ} ${MAdLib_TMPDIR}/.
-
-.cc${OBJEXT}:
-	${CXX} ${ALLFLAGS} ${DASH}c $< ${DASH}o $@
-
-clean:
-	${RM} */*.o *.o *.obj
-
-purge:
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${ALLFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/Mesh/Makefile.am b/Mesh/Makefile.am
new file mode 100644
index 0000000..9cbc908
--- /dev/null
+++ b/Mesh/Makefile.am
@@ -0,0 +1,48 @@
+## -------------------------------------------------------------------
+## MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
+
+## See the Copyright.txt and License.txt files for license information. 
+## You should have received a copy of these files along with MAdLib. 
+## If not, see <http://www.madlib.be/license/>
+
+## Please report all bugs and problems to <contrib at madlib.be>
+
+## Author: Gaetan Compere
+## -------------------------------------------------------------------
+
+## Process this file with automake to produce Makefile.in
+
+srcdir = @srcdir@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+
+noinst_LTLIBRARIES = libMAdMesh.la
+
+CPPFLAGS += ${MAdLib_DEFS}
+
+AM_CPPFLAGS =  ${MAdLib_INCLUDES} -I.\
+  -I$(srcdir)/../Common\
+  -I$(srcdir)/../Geo\
+  -I${srcdir}/../Contrib/mathex
+
+libMAdMesh_la_SOURCES = \
+  Balance.cc\
+  CheckMesh.cc\
+  CheckOrientation.cc\
+  Mark.cc\
+  MeshDataBase.cc\
+  MeshDataBaseComm.cc\
+  MeshDataBaseCommCheck.cc\
+  MeshDataBaseGEntity2Physical.cc\
+  MeshDataBaseInterface.cc\
+  MeshDataBaseIO.cc\
+  MeshDataBaseLoadBalancing.cc\
+  MeshDataBaseMigration.cc\
+  MeshDataBaseMiniMesh.cc\
+  MeshDataBaseParallelInterface.cc\
+  MeshDataBaseParallelIO.cc\
+  metisAdaptiveRepart.cc\
+  ParallelUtils.cc\
+  PeriodicInterfaceMigration.cc
+
+purge:
diff --git a/Mesh/Makefile.in b/Mesh/Makefile.in
new file mode 100644
index 0000000..b96fbbc
--- /dev/null
+++ b/Mesh/Makefile.in
@@ -0,0 +1,534 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = Mesh
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/MAdConfig.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libMAdMesh_la_LIBADD =
+am_libMAdMesh_la_OBJECTS = Balance.lo CheckMesh.lo CheckOrientation.lo \
+	Mark.lo MeshDataBase.lo MeshDataBaseComm.lo \
+	MeshDataBaseCommCheck.lo MeshDataBaseGEntity2Physical.lo \
+	MeshDataBaseInterface.lo MeshDataBaseIO.lo \
+	MeshDataBaseLoadBalancing.lo MeshDataBaseMigration.lo \
+	MeshDataBaseMiniMesh.lo MeshDataBaseParallelInterface.lo \
+	MeshDataBaseParallelIO.lo metisAdaptiveRepart.lo \
+	ParallelUtils.lo PeriodicInterfaceMigration.lo
+libMAdMesh_la_OBJECTS = $(am_libMAdMesh_la_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(libMAdMesh_la_SOURCES)
+DIST_SOURCES = $(libMAdMesh_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@ ${MAdLib_DEFS}
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOX = @DOX@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+HOSTNAME = @HOSTNAME@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LINKER = @LINKER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MAdLib_BENCHDIRS = @MAdLib_BENCHDIRS@
+MAdLib_DEFS = @MAdLib_DEFS@
+MAdLib_DIRS = @MAdLib_DIRS@
+MAdLib_INCLUDES = @MAdLib_INCLUDES@
+MAdLib_LIBADD = @MAdLib_LIBADD@
+MAdLib_LIBS = @MAdLib_LIBS@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+RM = @RM@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UNAME = @UNAME@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+allincludedir = @allincludedir@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LTLIBRARIES = libMAdMesh.la
+AM_CPPFLAGS = ${MAdLib_INCLUDES} -I.\
+  -I$(srcdir)/../Common\
+  -I$(srcdir)/../Geo\
+  -I${srcdir}/../Contrib/mathex
+
+libMAdMesh_la_SOURCES = \
+  Balance.cc\
+  CheckMesh.cc\
+  CheckOrientation.cc\
+  Mark.cc\
+  MeshDataBase.cc\
+  MeshDataBaseComm.cc\
+  MeshDataBaseCommCheck.cc\
+  MeshDataBaseGEntity2Physical.cc\
+  MeshDataBaseInterface.cc\
+  MeshDataBaseIO.cc\
+  MeshDataBaseLoadBalancing.cc\
+  MeshDataBaseMigration.cc\
+  MeshDataBaseMiniMesh.cc\
+  MeshDataBaseParallelInterface.cc\
+  MeshDataBaseParallelIO.cc\
+  metisAdaptiveRepart.cc\
+  ParallelUtils.cc\
+  PeriodicInterfaceMigration.cc
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Mesh/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Mesh/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+	@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test "$$dir" != "$$p" || dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+libMAdMesh.la: $(libMAdMesh_la_OBJECTS) $(libMAdMesh_la_DEPENDENCIES) 
+	$(CXXLINK)  $(libMAdMesh_la_OBJECTS) $(libMAdMesh_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Balance.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CheckMesh.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CheckOrientation.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Mark.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBase.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseComm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseCommCheck.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseGEntity2Physical.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseIO.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseInterface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseLoadBalancing.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseMigration.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseMiniMesh.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseParallelIO.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/MeshDataBaseParallelInterface.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ParallelUtils.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/PeriodicInterfaceMigration.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/metisAdaptiveRepart.Plo at am__quote@
+
+.cc.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cc.lo:
+ at am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+purge:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Mesh/Mark.cc b/Mesh/Mark.cc
index 9828ea6..9fc2711 100644
--- a/Mesh/Mark.cc
+++ b/Mesh/Mark.cc
@@ -11,8 +11,8 @@
 // -------------------------------------------------------------------
 
 #include "Mark.h"
-#include "MSops.h"
 #include "MeshDataBase.h"
+#include "MeshDataBaseInterface.h"
 
 #include "assert.h"
 
diff --git a/Mesh/Mark.h b/Mesh/Mark.h
index 0b3f6e7..b19a83b 100644
--- a/Mesh/Mark.h
+++ b/Mesh/Mark.h
@@ -14,7 +14,7 @@
 #ifndef _MARK_H_
 #define _MARK_H_
 
-#include "MSops.h"
+#include "MeshDataBaseInterface.h"
 
 #include <vector>
 
diff --git a/Mesh/MeshDataBase.cc b/Mesh/MeshDataBase.cc
index 839d1d2..41c862c 100644
--- a/Mesh/MeshDataBase.cc
+++ b/Mesh/MeshDataBase.cc
@@ -11,9 +11,8 @@
 // -------------------------------------------------------------------
 
 #include "MeshDataBase.h"
+#include "MeshDataBaseInterface.h"
 #include "MeshDataBaseGEntity2Physical.h"
-#include "MSops.h"
-#include "MeshDataBaseMessage.h"
 #include "MAdMessage.h"
 #include "MAdDefines.h"
 #include "MathUtils.h"
@@ -64,7 +63,7 @@ namespace MAd {
     else throw;
   }
 
-  void MDB_Point::getTriangles(MDB_ListF&t) const
+  void MDB_Point::getFaces(MDB_ListFace &t) const
   {
     t.clear();
     MDB_VectorE::const_iterator it = edges.begin();
@@ -72,10 +71,10 @@ namespace MAd {
     while(it != ite) {
       int NF = (*it)->numfaces();
       for(int i = 0; i < NF; ++i) {
-        MDB_Triangle *tt = (*it)->faces(i);
+        MDB_Face *tt = (*it)->faces(i);
         if(tt) {
-          MDB_ListF::iterator tit = t.begin();
-          MDB_ListF::iterator tite = t.end();
+          MDB_ListFace::iterator tit = t.begin();
+          MDB_ListFace::iterator tite = t.end();
           int found = 0;
           while(tit != tite) {
             if(tt == *tit)
@@ -90,33 +89,6 @@ namespace MAd {
     }
   }
 
-  void MDB_Point::getQuads(MDB_ListQ&q) const
-  {
-    q.clear();
-    MDB_VectorE::const_iterator it = edges.begin();
-    MDB_VectorE::const_iterator ite = edges.end();
-    while(it != ite) {
-      int NF = (*it)->numquads();
-      for(int i = 0; i < NF; ++i) {
-        MDB_Quad *qq = (*it)->quads(i);
-        if(qq) {
-          MDB_ListQ::iterator qit = q.begin();
-          MDB_ListQ::iterator qite = q.end();
-          int found = 0;
-          while(qit != qite) {
-            if(qq == *qit)
-              found = 1;
-            ++qit;
-          }
-          if(!found)
-            q.push_back(qq);
-        }
-      }
-      ++it;
-    }
-  }
-
-
   MDB_Point * MDB_Mesh::add_point(int num, double x, double y, double z, pGEntity pg)
   {
     int newId = num;
@@ -204,18 +176,34 @@ namespace MAd {
   }
 
 
-  MDB_Edge *MDB_Mesh::find_edge(MDB_Point * p1, MDB_Point * p2,
-                                MDB_Triangle * t) const
+  MDB_Edge *MDB_Quad::find_edge(const MDB_Point * p1, const MDB_Point * p2) const
   {
-    if((t->e1->p1->iD == p1->iD && t->e1->p2->iD == p2->iD) ||
-       (t->e1->p1->iD == p2->iD && t->e1->p2->iD == p1->iD))
-      return t->e1;
-    if((t->e2->p1->iD == p1->iD && t->e2->p2->iD == p2->iD) ||
-       (t->e2->p1->iD == p2->iD && t->e2->p2->iD == p1->iD))
-      return t->e2;
-    if((t->e3->p1->iD == p1->iD && t->e3->p2->iD == p2->iD)||
-       (t->e3->p1->iD == p2->iD && t->e3->p2->iD == p1->iD))
-      return t->e3;
+    if((e1->p1->iD == p1->iD && e1->p2->iD == p2->iD) ||
+       (e1->p1->iD == p2->iD && e1->p2->iD == p1->iD))
+      return e1;
+    if((e2->p1->iD == p1->iD && e2->p2->iD == p2->iD) ||
+       (e2->p1->iD == p2->iD && e2->p2->iD == p1->iD))
+      return e2;
+    if((e3->p1->iD == p1->iD && e3->p2->iD == p2->iD)||
+       (e3->p1->iD == p2->iD && e3->p2->iD == p1->iD))
+      return e3;
+    if((e4->p1->iD == p1->iD && e4->p2->iD == p2->iD)||
+       (e4->p1->iD == p2->iD && e4->p2->iD == p1->iD))
+      return e4;
+    return 0; 
+  }
+
+  MDB_Edge *MDB_Triangle::find_edge(const MDB_Point * p1, const MDB_Point * p2) const
+  {
+    if((e1->p1->iD == p1->iD && e1->p2->iD == p2->iD) ||
+       (e1->p1->iD == p2->iD && e1->p2->iD == p1->iD))
+      return e1;
+    if((e2->p1->iD == p1->iD && e2->p2->iD == p2->iD) ||
+       (e2->p1->iD == p2->iD && e2->p2->iD == p1->iD))
+      return e2;
+    if((e3->p1->iD == p1->iD && e3->p2->iD == p2->iD)||
+       (e3->p1->iD == p2->iD && e3->p2->iD == p1->iD))
+      return e3;
     return 0;
   }
 
@@ -261,17 +249,19 @@ namespace MAd {
   {
     int i;
     for(i = 0; i < e1->numfaces(); i++) {
-      MDB_Triangle *t = e1->faces(i);
-      MDB_Edge *o1 = t->e1;
-      MDB_Edge *o2 = t->e2;
-      MDB_Edge *o3 = t->e3;
+      MDB_Face *t = e1->faces(i);
+      if(t->getNbEdges()!=3)
+        continue;
+      MDB_Edge *o1 = t->getEdge(0);
+      MDB_Edge *o2 = t->getEdge(1);
+      MDB_Edge *o3 = t->getEdge(2);
       if((o1 == e1 && o2 == e2 && o3 == e3) ||
          (o1 == e1 && o2 == e3 && o3 == e2) ||
          (o1 == e2 && o2 == e1 && o3 == e3) ||
          (o1 == e2 && o2 == e3 && o3 == e1) ||
          (o1 == e3 && o2 == e1 && o3 == e2) ||
          (o1 == e3 && o2 == e2 && o3 == e1))
-        return t;
+        return (MDB_Triangle *)t;
     }
 
     return 0;
@@ -283,12 +273,14 @@ namespace MAd {
   {
     MDB_Edge *eds[4] = {e1,e2,e3,e4};
     std::sort(eds,eds+4);
-    for(int i = 0; i < e1->numquads(); i++) {
-      MDB_Quad *q = e1->quads(i);
-      MDB_Edge *edsb[4] = {q->e1,q->e2,q->e3,q->e4};
+    for(int i = 0; i < e1->numfaces(); i++) {
+      MDB_Face *q = e1->faces(i);
+      if(q->getNbEdges()!=4)
+        continue;
+      MDB_Edge *edsb[4] = {q->getEdge(0),q->getEdge(1),q->getEdge(2),q->getEdge(3)};
       std::sort(edsb,edsb+4);
       if (edsb[0] == eds[0] && edsb[1] == eds[1] && edsb[2] == eds[2] && edsb[3] == eds[3])
-        return q;
+        return (MDB_Quad*)q;
     }
     return 0;
   }
@@ -383,7 +375,9 @@ namespace MAd {
       assert(pp1 && pp2 && pp3 && pp4 && pp5 && ppend);
       return add_edge (6,pg,pp1,pp2,pp3,pp4,pp5,ppend);
     default:
-      Msg(MDB_FATAL,"add_edge only implemented up to order 5 (this edge has %d nodes)\n",numberOfPoints);
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "add_edge only implemented up to order 5 (this edge has %d nodes)",
+                                  numberOfPoints);
     }
     throw;
   }
@@ -419,7 +413,8 @@ namespace MAd {
       e = new MDB_EdgeP5(pp1, pp[0], pp[1], pp[2], pp[3] , pp2);
       break;
     default:
-      Msg(MDB_FATAL,"add_edge only implemented up to order 5\n");
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "add_edge only implemented up to order 5");
     }
     e->g = pg;
 
@@ -479,7 +474,8 @@ namespace MAd {
       e = new MDB_EdgeP5(firstPoint, pp2, pp3, pp4, pp5, ppend);
       break;
     default:
-      Msg(MDB_FATAL,"add_edge only implemented up to order 5\n");
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "add_edge only implemented up to order 5");
     }
     e->g = pg;
     edges.push_back(e);
@@ -555,6 +551,19 @@ namespace MAd {
     return add_triangle(e1, e2, e3,pg);
   }
 
+  MDB_Triangle *MDB_Mesh::add_triangle(MDB_Point* p1, MDB_Point* p2, 
+                                       MDB_Point* p3, pGEntity pg)
+  {
+    MDB_Edge *e1 = find_edge(p1,p2);
+    if (!e1) e1 = add_edge(p1, p2, pg);
+    MDB_Edge *e2 = find_edge(p2,p3);
+    if (!e2) e2 = add_edge(p2, p3, pg);
+    MDB_Edge *e3 = find_edge(p3,p1);
+    if (!e3) e3 = add_edge(p3, p1, pg);
+
+    return add_triangle(e1, e2, e3, pg);
+  }
+
   /*MDB_Triangle *MDB_Mesh::add_triangle(int numberOfPoints, pGEntity pg, int p1, int p2, ...)
     {
     va_list ap;
@@ -672,7 +681,9 @@ namespace MAd {
         p15 = va_arg(ap,int);
         break;
       default:
-        Msg(MDB_FATAL,"Complete triangles not defined for order %d\n",order);
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Complete triangles not defined for order %d",
+                                    order);
       }
     }
     va_end(ap);
@@ -722,7 +733,9 @@ namespace MAd {
         innerPoints[2] = find_point(p15);
         break;
       default:
-        Msg(MDB_FATAL,"Complete triangles not defined for order %d\n",order);
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Complete triangles not defined for order %d",
+                                    order);
       }
     }
 
@@ -739,6 +752,79 @@ namespace MAd {
     //return add_triangle(e1, e2, e3,pg);
   }
 
+  // high order quad ...
+  // template is the following v0 ho[v0->v1] v1 ho[v1->v2] v2 ho[v2->v3] v3 ho[v3->v0]
+  MDB_Quad *MDB_Mesh::add_quad(int order, bool complete, pGEntity pg, int p1, int p2, int p3, ...)
+  {
+    va_list ap;
+    va_start(ap,p3);
+    int p4(0),p5(0),p6(0),p7(0),p8(0),p9(0);
+    if(order>=1){
+      p4 = va_arg(ap,int);
+      if (order>=2){
+        p5 = va_arg(ap,int);
+        p6 = va_arg(ap,int);
+        p7 = va_arg(ap,int);
+        p8 = va_arg(ap,int);
+      }
+    }
+    if (complete && order>=2){
+      switch(order){
+      case 2:
+        p9 = va_arg(ap,int);
+        break;
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__, "Complete quad not defined for order %d", order);
+      }
+    }
+    va_end(ap);
+
+    MDB_Edge *e1 = NULL;
+    MDB_Edge *e2 = NULL;
+    MDB_Edge *e3 = NULL;
+    MDB_Edge *e4 = NULL;
+
+    switch(order){
+    case 1:
+      e1 = add_edge(2,0,p1, p2);
+      e2 = add_edge(2,0,p2, p3);
+      e3 = add_edge(2,0,p3, p4);
+      e4 = add_edge(2,0,p4, p1);
+      break;
+    case 2:
+      e1 = add_edge(3,0,p1, p2, p3);
+      e2 = add_edge(3,0,p3, p4, p5);
+      e3 = add_edge(3,0,p5, p6, p7);
+      e4 = add_edge(3,0,p7, p8, p1);
+      break;
+      default :
+        MAdMsgSgl::instance().error(__LINE__,__FILE__, "Quad not defined for order %d", order);
+    }
+    MDB_Point** innerPoints = NULL;
+    if (complete && order>=2){
+      int nbFacePoints = (order-1)*(order-1);
+      innerPoints = new MDB_Point*[nbFacePoints];
+      switch (order){
+      case 2:
+        innerPoints[0] = find_point(p9);
+        break;
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__, "Complete triangles not defined for order %d", order);
+      }
+    }
+
+    MDB_Quad *efound = find_quad(e1, e2, e3,e4);
+    if(efound)
+      {
+        if (efound->g == 0 || ( pg && GEN_type(pg) <  GEN_type(efound->g )))
+          {
+            efound->g = pg;
+          }
+        return efound;
+      }
+    return add_quad(e1,e2,e3,e4,pg,order,!complete,innerPoints);
+  }
+
   // template for higher order triangle, following gmsh template
   // v0 v1 v2
   // higher order points
@@ -806,7 +892,9 @@ namespace MAd {
               t = new MDB_CompleteTriangle<5>(e1,e2,e3,point);
               break;*/
       default:
-        Msg(MDB_FATAL,"Complete triangle of order %d\n",order);
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Complete triangle of order %d",
+                                    order);
       }
 
       int nbPoints = (order-2)*(order-1)/2;
@@ -847,6 +935,21 @@ namespace MAd {
     return add_quad(e1, e2, e3, e4,pg);
   }
 
+  MDB_Quad *MDB_Mesh::add_quad(MDB_Point* p1, MDB_Point* p2, 
+                               MDB_Point* p3, MDB_Point* p4, pGEntity pg)
+  {
+    MDB_Edge *e1 = find_edge(p1,p2);
+    if (!e1) e1 = add_edge(p1, p2, pg);
+    MDB_Edge *e2 = find_edge(p2,p3);
+    if (!e2) e2 = add_edge(p2, p3, pg);
+    MDB_Edge *e3 = find_edge(p3,p4);
+    if (!e3) e3 = add_edge(p3, p4, pg);
+    MDB_Edge *e4 = find_edge(p4,p1);
+    if (!e4) e4 = add_edge(p4, p1, pg);
+
+    return add_quad(e1, e2, e3, e4, pg);
+  }
+
   MDB_Quad *MDB_Mesh::add_quad(MDB_Edge * e1, MDB_Edge * e2,
                                MDB_Edge * e3, MDB_Edge * e4, pGEntity pg)
   {
@@ -915,6 +1018,38 @@ namespace MAd {
     //   return (vo1+vo2+vo3+vo4+vo5+vo6)/6;
     return (-vo1+vo2-vo3+vo4-vo5+vo6)/6;
   }
+  MDB_Quad *MDB_Mesh::add_quad(MDB_Edge *e1,MDB_Edge* e2,
+                                       MDB_Edge *e3,MDB_Edge *e4,pGEntity pg,
+                                       int order,bool serendip,
+                                       MDB_Point** point) {
+
+
+
+
+    MDB_Quad *q = NULL;
+    if (serendip || order < 2) q = new MDB_Quad(e1,e2,e3,e4);
+    else {
+      switch (order) {
+        case 2:
+          q = new MDB_CompleteQuad<2>(e1,e2,e3,e4,point);
+          break;
+        default:
+          MAdMsgSgl::instance().error(__LINE__,__FILE__, "Complete quad of order %d", order);
+      }
+      int nbPoints = (order-1)*(order-1);
+      for (int i=0;i<nbPoints;i++) {
+        std::set<MDB_Point*,PointLessThan>::iterator it = points.find(point[i]);
+        deleteTheHighOrderPoint(it);
+      }
+    }
+
+    if (q) {
+      q->g = pg;
+      quads.push_back(q);
+      nbQuads++;
+    }
+    return q;
+  }
 
 
   // -----------------------------------------------------------------------------
@@ -1068,7 +1203,9 @@ namespace MAd {
         t = new MDB_CompleteTet<5> (t1,t2,t3,t4,pp);
         break;
       default:
-        Msg(MDB_FATAL,"Complete tetrahedron of order %d not yet implemented ",order);
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Complete tetrahedron of order %d not yet implemented",
+                                    order);
         break;
       }
 
@@ -1731,7 +1868,7 @@ namespace MAd {
       }
     VIter_delete(vit);
 
-    if ( !nbV || !nbE || !nbF || !nbR ) {
+    if ( nbV || nbE || nbF || nbR ) {
       MAdMsgSgl::instance().info(__LINE__,__FILE__,
                                  "There are unclassified entities: %d, regions, %d faces, %d edges, %d vertices\n",
                                  nbR,nbF,nbE,nbV);
diff --git a/Mesh/MeshDataBase.h b/Mesh/MeshDataBase.h
index 575e4d3..5056c7c 100644
--- a/Mesh/MeshDataBase.h
+++ b/Mesh/MeshDataBase.h
@@ -27,7 +27,7 @@
 #include "MeshDataBaseIterators.h"
 #include "MeshDataBaseAttachable.h"
 #include "MeshDataBaseMiniMesh.h"
-#include "MeshDataBaseMessage.h"
+#include "MAdMessage.h"
 
 namespace MAd {
 
@@ -54,6 +54,7 @@ namespace MAd {
   typedef std::list<MDB_Region *>     MDB_ListR ;
   typedef std::vector<MDB_Triangle *> MDB_VectorF ;
   typedef std::vector<MDB_Quad *>     MDB_VectorQ ;
+  typedef std::vector<MDB_Face *>     MDB_VectorFace ;
   typedef std::vector<MDB_Edge *>     MDB_VectorE ;
   typedef std::vector<MDB_Tet *>      MDB_VectorT ;
   typedef std::vector<MDB_Hex *>      MDB_VectorH ;
@@ -101,9 +102,8 @@ namespace MAd {
         ++it;
       }
     }
-    void getTriangles(MDB_ListF &) const; 	
+    void getFaces(MDB_ListFace &) const; 	
     void getTets(MDB_ListT &) const; 
-    void getQuads(MDB_ListQ &) const; 	
     void getHexes(MDB_ListH &) const;
   
     //void getHexs     (MDB_ListH &) const;
@@ -139,9 +139,7 @@ namespace MAd {
 
   class MDB_Edge: public MDB_MeshEntity
   {
-    std::vector<MDB_Triangle *> _faces;
-//     MDB_VectorF _faces;
-    MDB_VectorQ _quads;
+    MDB_VectorFace _faces;
   public:
 
     MDB_Point *p1,*p2;
@@ -149,20 +147,13 @@ namespace MAd {
     virtual int getDim()   const {return 1;}
     virtual int getOrder() const {return 1;}
 
-    inline MDB_Triangle* faces(int i) const
+    inline MDB_Face* faces(int i) const
     {
       if ( _faces.size() == 0 ) return NULL;
       if ( _faces.size() == 1 && i == 1 ) return NULL;
       return _faces [i];
     }
 
-    inline MDB_Quad* quads(int i) const
-    {
-      if ( _quads.size() == 0 ) return NULL;
-      if ( _quads.size() == 1 && i == 1 ) return NULL;
-      return _quads [i];
-    }
-
     inline double length() const
     {
       return sqrt((p1->X-p2->X)*(p1->X-p2->X)+(p1->Y-p2->Y)*(p1->Y-p2->Y)+(p1->Z-p2->Z)*(p1->Z-p2->Z));
@@ -173,11 +164,6 @@ namespace MAd {
       return _faces.size();
     }
 
-    inline int numquads() const 
-    {
-      return _quads.size();
-    }
-
     inline MDB_Point * commonvertex(const MDB_Edge *other) const
     {
       if(p1 == other->p1 || p1 == other->p2) return p1;
@@ -193,17 +179,12 @@ namespace MAd {
       return 0;
     }
 
-    inline void addface(MDB_Triangle *f)
+    inline void addface(MDB_Face *f)
     {
       _faces.push_back(f);
     }
 
-    inline void addface(MDB_Quad *q)
-    {
-      _quads.push_back(q);
-    }
-
-    inline MDB_Triangle * otherFace(const MDB_Triangle *f) const
+    inline MDB_Face * otherFace(const MDB_Face *f) const
     {
       if(numfaces()!=2) return NULL;
       if(f == _faces[0]) return _faces[1];
@@ -211,18 +192,12 @@ namespace MAd {
       throw;
     }
 
-    inline void del( MDB_Triangle *t )
+    inline void del( MDB_Face *t )
     {
-      _faces.erase(std::remove_if(_faces.begin(),_faces.end() , std::bind2nd(std::equal_to<MDB_Triangle*>(), t)) , 
+      _faces.erase(std::remove_if(_faces.begin(),_faces.end() , std::bind2nd(std::equal_to<MDB_Face*>(), t)) , 
                    _faces.end());
     }
   
-    inline void del( MDB_Quad *t )
-    {
-      _quads.erase(std::remove_if(_quads.begin(),_quads.end() , std::bind2nd(std::equal_to<MDB_Quad*>(), t)) , 
-                   _quads.end());
-    }
-  
     inline void oppositeof(MDB_Point * oface[2]) const; 
   
     virtual int getNbHighOrderPoints () const {return 0;}
@@ -432,6 +407,7 @@ namespace MAd {
     {
       for (int i=0;i<getNbEdges ();i++)n[i] = getNode(i);
     }
+    virtual MDB_Edge * find_edge(const MDB_Point*, const MDB_Point*) const = 0;
 
     MDB_Face() /*: r1(0), r2(0) */{};
     virtual MDB_Point *getHighOrderPoint (int i) {throw;}
@@ -476,6 +452,8 @@ namespace MAd {
     }
     virtual ~MDB_Triangle() {}
 
+    virtual MDB_Edge * find_edge(const MDB_Point*, const MDB_Point*) const;
+
     virtual int getNbHighOrderPoints() const { return 0;}
 
   };
@@ -511,7 +489,10 @@ namespace MAd {
     virtual int align(MDB_Point* v0,MDB_Point* v1,MDB_Point* v2,MDB_Point* v3) {
 
 
-      if (v3 != NULL) Msg(MDB_FATAL,"Aligning a triangle with a quadrilateral is not allowed\n");
+      if (v3 != NULL) {
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Aligning a triangle with a quadrilateral is not allowed");
+      }
     
       int rot = MDB_Triangle::align(v0,v1,v2,NULL);
 
@@ -605,6 +586,32 @@ namespace MAd {
       e4->addface(this);
     }
     virtual ~MDB_Quad() {}
+    virtual MDB_Edge * find_edge(const MDB_Point*, const MDB_Point*) const;
+  };
+
+  /*! \brief Generic order equidistant Lagrange quad with complete interpolation */ 
+  template <int order>
+  class MDB_CompleteQuad : public MDB_Quad {
+
+  public:
+  
+    MDB_CompleteQuad(MDB_Edge *A, MDB_Edge *B, MDB_Edge *C,MDB_Edge *D, MDB_Point** P):
+      MDB_Quad(A,B,C,D),nbPoints(std::max(0,(order-1)*(order-1))),point(NULL) {
+      point = nbPoints > 0 ? new MDB_Point*[nbPoints] : NULL;
+      for (int i=0;i<nbPoints;i++) point[i] = P[i];  
+    }
+    
+    ~MDB_CompleteQuad() {if (point) delete [] point;}
+    
+    virtual int getOrder()     const {return order;}
+    int getNbHighOrderPoints() const {return nbPoints;}
+    MDB_Point* getHighOrderPoint(int i) {return (i<nbPoints) ?  point[i] : NULL;}
+
+  protected:
+    
+    int nbPoints;
+    MDB_Point** point;
+
   };
 
 
@@ -994,13 +1001,14 @@ namespace MAd {
     void del_edge(MDB_Edge *e);
     MDB_Edge  *find_edge(int p1, int p2);
     MDB_Edge  *find_edge(MDB_Point *p1, MDB_Point *p2)const;
-    MDB_Edge  *find_edge(MDB_Point *p1, MDB_Point *p2, MDB_Triangle *t)const;
     MDB_Edge  *find_clone_edge(MDB_Edge *edge)const;
     // Faces operations
     void del_face(MDB_Face *f);
     // Triangles operations
     /*! straight triangle from vertex id's */ 
     MDB_Triangle *add_triangle(int p1, int p2, int p3, pGEntity=0); 
+    /*! straight triangle from vertices */ 
+    MDB_Triangle *add_triangle(MDB_Point* v0, MDB_Point* v1, MDB_Point* v2, pGEntity=0); 
     /* curvilinear triangle */
     //  MDB_Triangle *add_triangle(int p1, int p2, int p3, int p4, int p5, int p6, pGEntity=0);
     /*! straight/serendipity triangle from edges */
@@ -1015,8 +1023,16 @@ namespace MAd {
     void del_triangle(MDB_Triangle *t);
     MDB_Triangle  *find_triangle(MDB_Edge *e1,MDB_Edge *e2,MDB_Edge *e3);
     // Quad operations
+    /*! straight quadrangle from vertex id's */ 
     MDB_Quad *add_quad(int p1, int p2, int p3, int p4, pGEntity=0); 
+    /*! straight quadrangle from vertices */ 
+    MDB_Quad *add_quad(MDB_Point* v0, MDB_Point* v1, MDB_Point* v2, MDB_Point* v3, pGEntity=0); 
     MDB_Quad *add_quad(MDB_Edge *e1,MDB_Edge *e2,MDB_Edge *e3,MDB_Edge *e4, pGEntity=0);
+    /*! straight/serendipity quad from point id's */ 
+    MDB_Quad *add_quad(int order, bool complete, pGEntity pg, int p1, int p2, int p3, ...);
+    /*! straight/complete quad from edges and internal points */
+    MDB_Quad *add_quad(MDB_Edge *e1,MDB_Edge *e2,MDB_Edge *e3,MDB_Edge *e4, pGEntity,int order,
+                               bool serendip=true,MDB_Point** iP=NULL);
     void del_quad(MDB_Quad *q);
     MDB_Quad  *find_quad(MDB_Edge *e1,MDB_Edge *e2,MDB_Edge *e3,MDB_Edge *e4);
     // Tets operations
diff --git a/Mesh/MeshDataBaseComm.cc b/Mesh/MeshDataBaseComm.cc
index 5cce89c..506df06 100644
--- a/Mesh/MeshDataBaseComm.cc
+++ b/Mesh/MeshDataBaseComm.cc
@@ -10,8 +10,8 @@
 // Authors: Cecile Dobrzynski, Jean-Francois Remacle, Gaetan Compere
 // -------------------------------------------------------------------
 
-#include "MSops.h"
 #include "MeshDataBase.h"
+#include "MeshDataBaseInterface.h"
 #ifdef PARALLEL
 #include "MeshDataBaseParallelInterface.h"
 #endif
diff --git a/Mesh/MeshDataBaseComm.h b/Mesh/MeshDataBaseComm.h
index ccffdba..8d2bbce 100644
--- a/Mesh/MeshDataBaseComm.h
+++ b/Mesh/MeshDataBaseComm.h
@@ -14,7 +14,7 @@
 #ifndef _MeshDataBaseCOMM_H
 #define _MeshDataBaseCOMM_H
 
-#include "MeshDataBase.h"
+#include "MeshDataBaseInterface.h"
 
 /*
   MDB_DataExchanger is a class that allow user to exchange
@@ -37,24 +37,24 @@ namespace MAd {
     // get a tag for the communication
     int tag() const { return tagComm; }
     // user allocates sends a message of _size size related to mesh entity pe to proc iProc
-    virtual void * sendData (MDB_MeshEntity * pe, // in
-                             int    iProcDest , // in
+    virtual void * sendData (pEntity pe,       // in
+                             int iProcDest ,   // in
                              int &_size ) = 0; // out
     // mesh entity pe recieves data *buf form proc iProc.
     // The user shall NOT delete the message !!
-    virtual void receiveData (MDB_MeshEntity * pe, //in
-                              int iProcSender ,//in
+    virtual void receiveData (pEntity pe,       //in
+                              int iProcSender , //in
                               void *buf ) = 0;  //in
     // In case the user has to delete a data when 'pe' is deleted
-    virtual void deleteExternalData (MDB_MeshEntity * pe) const {}
+    virtual void deleteExternalData (pEntity pe) const {}
     MDB_DataExchanger(int _tag): tagComm(_tag) {}
     virtual ~MDB_DataExchanger() {}
   };
-  void exchangeDataOnVertices (MDB_Mesh * m, MDB_DataExchanger &de );
-  void exchangeDataOnEdges    (MDB_Mesh * m, MDB_DataExchanger &de );
-  void exchangeDataOnFaces    (MDB_Mesh * m, MDB_DataExchanger &de );
-  void exchangeDataOnTriangles(MDB_Mesh * m, MDB_DataExchanger &de );
-  void exchangeDataOnQuads    (MDB_Mesh * m, MDB_DataExchanger &de );
+  void exchangeDataOnVertices (pMesh m, MDB_DataExchanger &de );
+  void exchangeDataOnEdges    (pMesh m, MDB_DataExchanger &de );
+  void exchangeDataOnFaces    (pMesh m, MDB_DataExchanger &de );
+  void exchangeDataOnTriangles(pMesh m, MDB_DataExchanger &de );
+  void exchangeDataOnQuads    (pMesh m, MDB_DataExchanger &de );
 
 }
 
diff --git a/Mesh/MeshDataBaseCommCheck.cc b/Mesh/MeshDataBaseCommCheck.cc
index 2a0584a..0efd30c 100644
--- a/Mesh/MeshDataBaseCommCheck.cc
+++ b/Mesh/MeshDataBaseCommCheck.cc
@@ -11,9 +11,10 @@
 // -------------------------------------------------------------------
 
 #include "MeshDataBaseCommCheck.h"
-#include "MeshDataBaseMessage.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseParallelInterface.h"
+#include "MAdMessage.h"
+#include "MeshDataBase.h"
 
 #include <sstream>
 using std::ostringstream;
@@ -21,6 +22,7 @@ using std::ostream;
 using std::cout;
 using std::endl;
 #include <iostream>
+#include <stdlib.h>
 
 #ifdef PARALLEL
 #include "mpi.h"
@@ -131,8 +133,8 @@ namespace MAd {
         
         if (!V_corresponds((pVertex) pe,id)) {
           
-          Msg_char(MDB_FATAL,
-                   "Non-corresponding communication vertex from proc %d : %d vs %d\n",
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                   "Non-corresponding communication vertex from proc %d : %d vs %d",
                    from,EN_id(pe),id);
         }
         
@@ -142,7 +144,7 @@ namespace MAd {
         std::pair<int,pEntity> comm = std::make_pair(from,corr);
         
         if (communications[pe].find(comm) != communications[pe].end()) {
-          Msg_char(MDB_FATAL,
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
                    "Multiple identical communications for vertex %d on %d from %d",
                    EN_id(pe),myrank,from);
           
@@ -164,8 +166,8 @@ namespace MAd {
         
         if (!check) {        
           
-          Msg_char(MDB_FATAL,
-                   "Non-corresponding edge from proc %d on proc %d : (%d,%d) vs (%d,%d)\n",
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                   "Non-corresponding edge from proc %d on proc %d : (%d,%d) vs (%d,%d)",
                    from,myrank,
                    idSend[0],
                    idSend[1],
@@ -180,7 +182,7 @@ namespace MAd {
         std::pair<int,pEntity> comm = std::make_pair(from,corr);
 
         if (communications[pe].find(comm) != communications[pe].end()) {
-          Msg_char(MDB_FATAL,
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
                    "Multiple identical communications for edge %d-%d on %d from %d",
                    EN_id((pEntity) E_vertex(pl,0)),
                    EN_id((pEntity) E_vertex(pl,1))
@@ -208,8 +210,8 @@ namespace MAd {
           ostringstream send;
           for (int i=0;i<F_numVertices(pf);i++) send << " " << EN_id((pEntity) F_vertex(pf,i));
         
-          Msg_char(MDB_FATAL,
-                   "Non-corresponding face from proc %d - (%s) vs (%s)\n",
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                   "Non-corresponding face from proc %d - (%s) vs (%s)",
                    recv.str().c_str(),send.str().c_str());
         }
 
@@ -220,7 +222,7 @@ namespace MAd {
         std::pair<int,pEntity> comm = std::make_pair(from,corr);
 
         if (communications[pe].find(comm) != communications[pe].end()) {
-          Msg_char(MDB_FATAL,
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
                    "Multiple identical communications for face %d-%d-%d on %d from %d",
                    EN_id((pEntity) F_vertex(pf,0)),
                    EN_id((pEntity) F_vertex(pf,1)),
diff --git a/Mesh/MeshDataBaseCommCheck.h b/Mesh/MeshDataBaseCommCheck.h
index 43ee0ec..cd5ebb2 100644
--- a/Mesh/MeshDataBaseCommCheck.h
+++ b/Mesh/MeshDataBaseCommCheck.h
@@ -15,7 +15,6 @@
 #define MESHDATABASEPARALLELCHECK_H
 
 #include "MeshDataBaseComm.h"
-#include "MeshDataBaseInterface.h"
 
 #include <iostream>
 #include <map>
@@ -34,8 +33,8 @@ namespace MAd {
 
     void printStatus(std::ostream&) const;
   
-    virtual void* sendData(MDB_MeshEntity *,int,int&);
-    virtual void  receiveData(MDB_MeshEntity *,int,void*);
+    virtual void* sendData(pEntity,int,int&);
+    virtual void  receiveData(pEntity,int,void*);
 
   private:
 
diff --git a/Mesh/MeshDataBaseIO.cc b/Mesh/MeshDataBaseIO.cc
index 53c4fc6..127dc63 100644
--- a/Mesh/MeshDataBaseIO.cc
+++ b/Mesh/MeshDataBaseIO.cc
@@ -13,7 +13,6 @@
 #include "MeshDataBase.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseIO.h"
-#include "MeshDataBaseMessage.h"
 #include "MeshDataBaseGEntity2Physical.h"
 #include <assert.h>
 #include "MeshDataBaseCommPeriodic.h"
@@ -42,7 +41,8 @@ namespace MAd {
   {  
     FILE *fp = fopen(filename, "r");
     if(!fp) {
-      Msg(MDB_FATAL,"Unknown File %s\n",filename);
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "Unknown File %s",filename);
     }
 
 #ifdef PARALLEL 
@@ -85,7 +85,8 @@ namespace MAd {
 
 #ifdef PARALLEL
     if ( version == 1 && nbProc > 1 ) {
-      Msg(MDB_FATAL,"Cannot load Gmsh mesh from file %s: parallel loading not implemented for file format msh1\n",filename);
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "Cannot load Gmsh mesh from file %s: parallel loading not implemented for file format msh1",filename);
     }
 #endif
 
@@ -280,12 +281,14 @@ namespace MAd {
           case MSH_LIN_2:
             {
               geom = (pGEntity) GM_edgeByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_edge(verts[0],verts[1],geom);
             }
             break;
           case MSH_LIN_3:
             {
               geom = (pGEntity) GM_edgeByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               //m->add_edge(verts[0],verts[2],verts[1],geom);
               m->add_edge(3,geom,verts[0],verts[2],verts[1]);
               //m->add_edge(verts[0],verts[1],ge);
@@ -294,24 +297,28 @@ namespace MAd {
           case MSH_LIN_4:
             {
               geom = (pGEntity) GM_edgeByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_edge(4,geom, verts[0],verts[2],verts[3],verts[1]);
             }
             break;
           case MSH_LIN_5:
             {
               geom = (pGEntity) GM_edgeByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_edge(5,geom, verts[0],verts[2],verts[3],verts[4],verts[1]);
             }
             break;
           case MSH_LIN_6:
             {
               geom = (pGEntity) GM_edgeByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_edge(6,geom, verts[0],verts[2],verts[3],verts[4],verts[5],verts[1]);
             }
             break;
           case MSH_TRI_3:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_triangle(verts[0],verts[1],verts[2],geom); 
             }
             break;
@@ -319,6 +326,7 @@ namespace MAd {
           case MSH_TRI_6:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               //	    printf ("adding a second order triangle %d %d %d %d %d %d\n",verts[0],verts[1],verts[2],verts[3],verts[4],verts[5]);
               m->add_triangle(2,0,geom,verts[0],verts[3],verts[1],verts[4],verts[2],verts[5]); 
               //m->add_triangle(verts[0],verts[3],verts[1],verts[4],verts[2],verts[5],geom); 
@@ -329,6 +337,7 @@ namespace MAd {
           case MSH_TRI_9:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_triangle(3,0,geom,verts[0],verts[3],verts[4],verts[1],verts[5],verts[6],verts[2],verts[7],verts[8]); 
               //m->add_triangle(verts[0],verts[3],verts[1],verts[4],verts[2],verts[5],geom); 
             }
@@ -337,6 +346,7 @@ namespace MAd {
           case MSH_TRI_10:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_triangle(3,1,geom,verts[0],verts[3],verts[4],verts[1],verts[5],verts[6],verts[2],verts[7],verts[8],verts[9]); 
             }
             break;
@@ -344,6 +354,7 @@ namespace MAd {
           case MSH_TRI_12:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_triangle(4,0,geom,verts[0],verts[3],verts[4],verts[5],verts[1],verts[6],verts[7],verts[8],verts[2],verts[9],verts[10],verts[11]); 
             }
             break;
@@ -351,6 +362,7 @@ namespace MAd {
           case MSH_TRI_15:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_triangle(4,1,geom,verts[0],verts[3],verts[4],verts[5],verts[1],verts[6],verts[7],verts[8],verts[2],verts[9],verts[10],verts[11],verts[12],verts[13],verts[14]); 
             }
             break;
@@ -358,15 +370,25 @@ namespace MAd {
           case MSH_TRI_15I:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_triangle(5,0,geom,verts[0],verts[3],verts[4],verts[5],verts[6],verts[1],verts[7],verts[8],verts[9],verts[10],verts[2],verts[11],verts[12],verts[13],verts[14]); 
             }
             break;
           case MSH_QUA_4:
             {
               geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_quad(verts[0],verts[1],verts[2],verts[3],geom); 
             }
             break;
+            // 9 nodes quad (LAGRANGE)
+          case MSH_QUA_9:
+            {
+              geom = (pGEntity) GM_faceByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
+              m->add_quad(2,1,geom,verts[0],verts[4],verts[1],verts[5],verts[2],verts[6],verts[3],verts[7],verts[8]); 
+            }
+            break;
           case MSH_TET_4:
             {
               geom = (pGEntity) GM_regionByTag(m->model,Elementary);
@@ -374,12 +396,14 @@ namespace MAd {
                 {
                   printf("READ MESH : no classification for  Region\n");
                 }
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_tet(verts[0],verts[1],verts[2],verts[3],geom); 
             }
             break;
           case MSH_PRI_6:
             {
               geom = (pGEntity) GM_regionByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_prism(verts[0],verts[1],verts[2],
                            verts[3],verts[4],verts[5],geom); 
             }
@@ -387,6 +411,7 @@ namespace MAd {
           case MSH_PNT:
             {
               geom = (pGEntity) GM_vertexByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               MDB_Point *p = m->find_point(verts[0]);
               p->g = geom;
             }
@@ -394,7 +419,8 @@ namespace MAd {
             // 8 nodes hexahedron
           case MSH_HEX_8:
             {
-              geom = (pGEntity) GM_regionByTag(m->model,Elementary); 
+              geom = (pGEntity) GM_regionByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical); 
               m->add_hex(verts[0],verts[1],verts[2],verts[3],verts[4],verts[5],verts[6],verts[7],geom); 
             }
             break;
@@ -402,24 +428,28 @@ namespace MAd {
           case MSH_TET_10:
             {
               geom = (pGEntity) GM_regionByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_tet(geom,2,false,verts);
               break;
             }
           case MSH_TET_20:
             {
               geom = (pGEntity) GM_regionByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_tet(geom,3,false,verts);
               break;
             }
           case MSH_TET_35:
             {
               geom = (pGEntity) GM_regionByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_tet(geom,4,false,verts);
               break;
             }
           case MSH_TET_34:
             {
               geom = (pGEntity) GM_regionByTag(m->model,Elementary);
+              if ( Physical > 0 ) GEN_setPhysical(geom,GEN_type(geom),Physical);
               m->add_tet(geom,4,true,verts);
               break;
             }
@@ -735,10 +765,11 @@ namespace MAd {
   // -------------------------------------------------------------------
 
   void SaveGmshMesh (const pMesh m,const char *filename, int version, 
-                     const int * partitionTable)
+                     bool saveAll, const int * partitionTable)
   {
     if ( version == 1 && partitionTable ) {
-      Msg(MDB_FATAL,"Error while saving mesh on file %s: SaveGmshMesh not implemented for msh1 format with partitioning\n",filename);
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "Error while saving mesh on file %s: SaveGmshMesh not implemented for msh1 format with partitioning",filename);
     }
 
     int meshDim = M_dim(m);
@@ -752,7 +783,7 @@ namespace MAd {
       throw;
     }
     if ( version != 1 ) {
-      fprintf(f, "$MeshFormat\n2 0 8\n$EndMeshFormat\n");
+      fprintf(f, "$MeshFormat\n2.1 0 8\n$EndMeshFormat\n");
     }
     // ------ Writting the nodes ------
     if ( version == 1 || !(m->isParametric()) )
@@ -772,11 +803,11 @@ namespace MAd {
               {
                 int dim = GEN_type(pv->g); 
                 if(dim == 0)  nbModelVertex++;
-                fprintf(f, "%d %g %g %g\n", pv->iD, pv->X, pv->Y, pv->Z);
+                fprintf(f, "%d %.16g %.16g %.16g\n", pv->iD, pv->X, pv->Y, pv->Z);
               }
             else
               {
-                fprintf(f, "%d %g %g %g\n", pv->iD, pv->X, pv->Y, pv->Z);
+                fprintf(f, "%d %.16g %.16g %.16g\n", pv->iD, pv->X, pv->Y, pv->Z);
               }
           }
         if (NN != m->nbPoints) {
@@ -801,12 +832,12 @@ namespace MAd {
               {
                 int gdim = GEN_type(pv->g);
                 int gtag = GEN_tag(pv->g);
-                fprintf(f, "%d %g %g %g %d %d", pv->iD, pv->X, pv->Y, pv->Z, gdim, gtag);
+                fprintf(f, "%d %.16g %.16g %.16g %d %d", pv->iD, pv->X, pv->Y, pv->Z, gdim, gtag);
                 double u[2]; V_params(pv,&u[0],&u[1]);
                 switch (gdim) {
                 case 0: { nbModelVertex++; break; }
-                case 1: { fprintf(f, " %g", u[0]); break; }
-                case 2: { fprintf(f, " %g %g", u[0], u[1]); break; }
+                case 1: { fprintf(f, " %.16g", u[0]); break; }
+                case 2: { fprintf(f, " %.16g %.16g", u[0], u[1]); break; }
                 case 3: { break; }
                 }
                 fprintf(f, "\n");
@@ -824,15 +855,39 @@ namespace MAd {
       if ( version == 1 ) { fprintf(f, "$ELM\n");   } 
       else                { fprintf(f, "$Elements\n"); }
     
-      int nbClasEdges = 0;
-      int nbClasFaces = 0;
+      bool physic = GM_physical(m->model);
+
+      long int nbClasVerts = 0;
+      long int nbClasEdges = 0;
+      long int nbClasFaces = 0;
+      long int nbClasRegs = 0;
+      {
+        VIter vit = M_vertexIter(m);
+        pVertex pv;
+        while ((pv = VIter_next(vit)))
+          {
+            if( GEN_type(pv->g) == 0 ){
+              if ( saveAll ) { nbClasVerts++; continue; }
+              if ( physic ) {
+                if ( GEN_physTag(pv->g) != 0 ) nbClasVerts++;
+              }
+              else nbClasVerts++;
+            }
+          }
+        VIter_delete(vit);
+      } 
       {
         EIter eit = M_edgeIter(m);
         pEdge pe;  
         while ((pe = EIter_next(eit)))
           {
-            int dim = GEN_type(pe->g); 
-            if(dim == 1) nbClasEdges++;
+            if( GEN_type(pe->g) == 1 ){
+              if ( saveAll ) { nbClasVerts++; continue; }
+              if ( physic ) {
+                if ( GEN_physTag(pe->g) != 0 ) nbClasEdges++;
+              }
+              else nbClasEdges++;
+            }
           }
         EIter_delete(eit);
       }  
@@ -841,14 +896,36 @@ namespace MAd {
         pFace pf;  
         while ((pf = FIter_next(fit)))
           {
-            int dim = GEN_type(pf->g); 
-            if(dim == 2) nbClasFaces++;
-            else if(F_numRegions(pf)==1) nbClasFaces++;
+#ifdef PARALLEL
+            if ( F_isInterface(pf) ) { nbClasFaces++; continue; }
+#endif
+            if( GEN_type(pf->g) == 2 ){
+              if ( saveAll ) { nbClasVerts++; continue; }
+              if ( physic ) {
+                if ( GEN_physTag(pf->g) != 0 ) nbClasFaces++;
+              }
+              else nbClasFaces++;
+            }
           }
         FIter_delete(fit);
       }
+      {
+        RIter rit = M_regionIter(m);
+        pRegion pr;
+        while ((pr = RIter_next(rit)))
+          {
+            if( GEN_type(pr->g) == 3 ){
+              if ( saveAll ) { nbClasVerts++; continue; }
+              if ( physic ) {
+                if ( GEN_physTag(pr->g) != 0 ) nbClasRegs++;
+              }
+              else nbClasRegs++;
+            }
+          }
+        RIter_delete(rit);
+      } 
 
-      fprintf(f, "%ld\n", (long int)(nbClasEdges + nbModelVertex + nbClasFaces + m->nbTets) );
+      fprintf(f, "%ld\n", (nbClasVerts + nbClasEdges + nbClasFaces + nbClasRegs) );
 
       int k = 1;
       // --- Nodes ---
@@ -862,7 +939,10 @@ namespace MAd {
                 int dim = GEN_type(pv->g);
                 int nbTags = 3;
                 int tag = GEN_tag (pv->g); 
-                int phys = gentity2phys.get_first_tag(pv->g);
+                int phys = 0;
+                if ( GEN_type(pv->g) == 0 ) phys = GEN_physTag(pv->g); 
+                if ( !saveAll && physic && phys == 0 ) continue;
+//                 int phys = gentity2phys.get_first_tag(pv->g);
                 int partition = -1;
                 if ( partitionTable ) {
                   switch(meshDim) {
@@ -923,8 +1003,11 @@ namespace MAd {
               {
                 int dim = GEN_type(pe->g);
                 int nbTags = 3;
-                int tag = GEN_tag (pe->g); 
-                int phys = gentity2phys.get_first_tag(pe->g);
+                int tag = GEN_tag (pe->g);
+                int phys = 0;
+                if ( GEN_type(pe->g) == 1 ) phys = GEN_physTag(pe->g);
+                if ( !saveAll && physic && phys == 0 ) continue; 
+//                 int phys = gentity2phys.get_first_tag(pe->g);
                 int partition = -1;
                 if ( partitionTable ) {
                   switch(meshDim) {
@@ -977,7 +1060,14 @@ namespace MAd {
                 int dim = GEN_type(pf->g);
                 int nbTags = 3;
                 int tag = GEN_tag (pf->g); 
-                int phys = gentity2phys.get_first_tag(pf->g);
+                int phys = 0;
+                if ( GEN_type(pf->g) == 2 ) phys = GEN_physTag(pf->g);
+#ifdef PARALLEL
+                if ( !saveAll && physic && phys == 0 && !F_isInterface(pf) ) continue;
+#else
+                if ( !saveAll && physic && phys == 0 ) continue;
+#endif
+//                 int phys = gentity2phys.get_first_tag(pf->g);
                 int partition = -1;
                 if ( partitionTable ) {
                   switch(meshDim) {
@@ -995,7 +1085,11 @@ namespace MAd {
                 }
 	      
                 pf->getNodes(nod);
-                if(dim == 2 || F_numRegions(pf)==1) {
+#ifdef PARALLEL
+                if(dim == 2 || F_isInterface(pf)) {
+#else
+                if(dim == 2) {
+#endif
                   if (pf->getNbEdges() == 4) { //quad
                     if ( version == 1 ) { fprintf(f, "%d %d %d %d %d %d %d %d %d\n",
                                                   k++, 3, phys, tag, 4,
@@ -1027,8 +1121,11 @@ namespace MAd {
                 MDB_Point *nod[8];
                 //int dim = GEN_type(pr->g);
                 int nbTags = 3;
-                int tag = GEN_tag (pr->g);  
-                int phys = gentity2phys.get_first_tag(pr->g);
+                int tag = GEN_tag (pr->g);
+                int phys = 0;
+                if ( GEN_type(pr->g) == 3 ) phys = GEN_physTag(pr->g);
+                if ( !saveAll && physic && phys == 0 ) continue;
+//                 int phys = gentity2phys.get_first_tag(pr->g);
                 int partition = 0;
                 if ( partitionTable ) {
                   partition = partitionTable[pr->iD];
@@ -1049,7 +1146,7 @@ namespace MAd {
                 }
                 else if(numVer==8) {
                   if ( version == 1 ) { fprintf(f, "%d %d %d %d %d %d %d %d %d %d %d %d %d\n", 
-                                                k++, 5, phys, tag, 5,
+                                                k++, 5, phys, tag, 8,
                                                 nod[0]->iD, nod[1]->iD, nod[2]->iD, nod[3]->iD,
                                                 nod[4]->iD, nod[5]->iD, nod[6]->iD, nod[7]->iD); }
                   else                { fprintf(f, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
@@ -1170,7 +1267,7 @@ namespace MAd {
                   }	        		
      		        }
                 if (nump == EN_id((pEntity) pv)) {  
-                  fprintf(f, "%d %g %g %g\n", pv->iD, pv->X, pv->Y, pv->Z);					
+                  fprintf(f, "%d %.16g %.16g %.16g\n", pv->iD, pv->X, pv->Y, pv->Z);					
                 } else {
                   double X,Y,Z;
                   X = pnump->X;
@@ -1184,7 +1281,7 @@ namespace MAd {
                       }  
                     }
                   }
-                  fprintf(f, "%d %g %g %g\n", pv->iD, X, Y, Z);    
+                  fprintf(f, "%d %.16g %.16g %.16g\n", pv->iD, X, Y, Z);    
                   if((fabs(X-pv->X) > 1e-12) || (fabs(Y-pv->Y) > 1e-12) || (fabs(Z-pv->Z) > 1e-12)  ) {
                     printf("point %d : %e %e %e \n",EN_id((pEntity) pv),pv->X, pv->Y, pv->Z);
                     printf("-- corresp %d : %e %e %e\n",nump,pnump->X,pnump->Y,pnump->Z);
@@ -1193,13 +1290,13 @@ namespace MAd {
                 }
                 delete [] ntrans;
               } else {
-                fprintf(f, "%d %g %g %g\n", pv->iD, pv->X, pv->Y, pv->Z);
+                fprintf(f, "%d %.16g %.16g %.16g\n", pv->iD, pv->X, pv->Y, pv->Z);
               }
             }
           else
             {
               NN++;
-              fprintf(f, "%d %g %g %g\n", pv->iD, pv->X, pv->Y, pv->Z);
+              fprintf(f, "%d %.16g %.16g %.16g\n", pv->iD, pv->X, pv->Y, pv->Z);
             }
           // 	   throw;
         }
@@ -1393,7 +1490,8 @@ void LoadGmshMesh (pMesh m,const char *filename, int version)
   pMeshDataId tagPeriodic = MD_newMeshDataId("PeriodicPoint");
   if(!fp)
     {
-      Msg(MDB_FATAL,"Unknown File %s\n",filename);
+      MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                  "Unknown File %s",filename);
     }
   char String[256];
   if (!m->model)
diff --git a/Mesh/MeshDataBaseIO.h b/Mesh/MeshDataBaseIO.h
index 3524e4d..7150855 100644
--- a/Mesh/MeshDataBaseIO.h
+++ b/Mesh/MeshDataBaseIO.h
@@ -33,7 +33,7 @@ namespace MAd {
   //   - If a partitioning table is submitted, 
   //     write the right partition numbers in the file
   void SaveGmshMesh (const MAd::pMesh, const char *, int version=2, 
-                     const int * partitionTable=NULL);
+                     bool saveAll=true, const int * partitionTable=NULL);
 
   void SaveGmshMeshPer (const MAd::pMesh, const char *,  MDB_DataExchangerPeriodic &deperiodic,int version=1);
 
diff --git a/Mesh/MeshDataBaseInterface.cc b/Mesh/MeshDataBaseInterface.cc
index b13422b..f8f6736 100644
--- a/Mesh/MeshDataBaseInterface.cc
+++ b/Mesh/MeshDataBaseInterface.cc
@@ -281,7 +281,7 @@ namespace MAd {
 #ifdef PARALLEL
     SaveGmshMeshParallel (mesh, name, version);
 #else
-    SaveGmshMesh (mesh, name, version, partitionTable);
+    SaveGmshMesh (mesh, name, version, true, partitionTable);
 #endif
   }
 
@@ -572,6 +572,12 @@ namespace MAd {
     return (MDB_VIter(&mesh->points,(pGEntity) pg,0)).next();
   }
 
+  //! Automatically classify the entities with no classification \ingroup mesh
+  void M_classifyEntities(pMesh mesh)
+  {
+    mesh->classify_unclassified_entities();
+  }
+
   // -------------------------------------------------------------------
   // Iterators
   // -------------------------------------------------------------------
@@ -629,7 +635,65 @@ namespace MAd {
   {
     delete it;
   }
+
   // -------------------------------------------------------------------
+  //! returns the region using the vertices with these id's. \ingroup mesh
+  //! Returns NULL if not found.
+  pRegion M_region(pMesh m, int id[])
+  {
+    pFace f = M_face(m,id);
+    if ( !f ) {printf("could not find face with ids: %d %d %d\n",id[0],id[1],id[2]); return 0;}
+
+    pRegion r; pVertex v;
+    for (int i=0; i<2; i++) {
+      r = F_region(f,i);
+      if (r) {
+        v = R_fcOpVt(r,f);
+        if ( v && ( V_id(v) == id[3] ) ) return r;
+      }
+    }
+
+    return 0;
+  }
+
+  // -------------------------------------------------------------------
+  //! returns the face using the vertices with these id's. \ingroup mesh
+  //! Returns NULL if not found.
+  pFace M_face(pMesh m, int id[])
+  {
+    pEdge e = M_edge(m,id[0],id[1]);
+    if ( !e ) {printf("could not find edge with ids: %d %d\n",id[0],id[1]); return 0;}
+
+    pPList eF = E_faces(e);
+    void * tmp = NULL;
+    pFace f;
+    pVertex v;
+    while ( ( f = (pFace)PList_next(eF,&tmp) ) ) {
+      v = F_edOpVt(f,e);
+      if ( v && ( V_id(v) == id[2] ) ) {
+        PList_delete(eF);
+        return f;
+      }
+    }
+
+    PList_delete(eF);
+    return 0;
+  }
+
+  // -------------------------------------------------------------------
+  //! returns the edge between the vertices with these id's. \ingroup mesh
+  //! Returns NULL if not found.
+  pEdge M_edge(pMesh m, int id0, int id1)
+  {
+    return m->find_edge(id0,id1);
+  }
+
+  // -------------------------------------------------------------------
+  //! returns the vertex with this id. Returns NULL if not found. \ingroup mesh
+  pVertex M_vertex(pMesh m, int id)
+  {
+    return m->find_point(id);
+  }
 
   // -------------------------------------------------------------------
   // Region operators
@@ -1307,6 +1371,56 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
+  //! returns the bounding box (xyz-oriented) of the region \ingroup region
+  //! warning: only implemented for tets
+  void R_box(const pRegion pr, double box[3][2])
+  {
+    double xyz[4][3];
+    R_coordP1(pr,xyz);
+    
+    for (int i=0; i<3; i++) {
+      box[i][0] = MAdBIG;
+      box[i][1] = -MAdBIG;
+      for (int j=0; j<4; j++) {
+        box[i][0] = std::min(box[i][0],xyz[j][i]);
+        box[i][1] = std::max(box[i][1],xyz[j][i]);
+      }
+    }
+  }
+
+  // -------------------------------------------------------------------
+  //! returns true if the point is in the bounding box (xyz-oriented)
+  //! of the region plus a tolerance \ingroup region
+  //! warning: only implemented for tets
+  bool R_inBox(const pRegion pr, const double xyz[3], double tol)
+  {
+    double box[3][2];
+    R_box(pr,box);
+
+    for (int i=0; i<3; i++) {
+      if ( xyz[i] < box[i][0] - tol || xyz[i] > box[i][1] + tol ) return false;
+    }
+    
+    return true;
+  }
+
+  // -------------------------------------------------------------------
+  //! returns true if the point is in the region plus a tolerance \ingroup region
+  //! warning: only implemented for tets
+  bool R_contains(const pRegion pr, const double xyz[3], double tol)
+  {
+    double tmp[4];
+    R_linearParams(pr,xyz,tmp);
+    tmp[3] = 1. - tmp[0] - tmp[1] - tmp[2];
+
+    for (int i=0; i<4; i++) {
+      if ( tmp[i] < -tol || tmp[i] > 1.+tol ) return false;
+    }
+
+    return true;
+  }
+
+  // -------------------------------------------------------------------
 
   // -------------------------------------------------------------------
   // Face operators
@@ -1387,6 +1501,14 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
+  //! Returns the edge used by the face and using the two vertices
+  //! Returns NULL if not found \ingroup face
+  pEdge F_findEdge(const pFace pf, const pVertex v0, const pVertex v1)
+  {
+    return pf->find_edge(v0,v1);
+  }
+
+  // -------------------------------------------------------------------
   //! Returns number of vertices in pf \ingroup face
   int F_numVertices(pFace pf)
   {
@@ -1408,7 +1530,7 @@ namespace MAd {
     pVertex ve1 = E_vertex (e,0);
     pVertex ve2 = E_vertex (e,1);
     pVertex vf1 = F_vertex (pf,n);
-    pVertex vf2 = F_vertex (pf,(n+1)%3);
+    pVertex vf2 = F_vertex (pf,(n+1)%F_numVertices(pf));
     if (ve1 == vf1 && ve2 == vf2) return 1;
     if (ve2 == vf1 && ve1 == vf2) return 0;
     throw;
@@ -1427,17 +1549,16 @@ namespace MAd {
   pPList F_vertices(pFace pf, int dir)
   {
     pPList pl = PList_new();
+    int n = F_numVertices(pf);
     if (dir<=0)
       {
-        PList_append(pl,F_vertex(pf,2));
-        PList_append(pl,F_vertex(pf,1));
-        PList_append(pl,F_vertex(pf,0));
+        for (int i=n-1;i>=0;i--)
+          PList_append(pl,F_vertex(pf,i));
       }
     else
       {
-        PList_append(pl,F_vertex(pf,0));
-        PList_append(pl,F_vertex(pf,1));
-        PList_append(pl,F_vertex(pf,2));
+        for (int i=0;i<n;i++)
+          PList_append(pl,F_vertex(pf,i));
       }
     return pl;
   }
@@ -1447,9 +1568,9 @@ namespace MAd {
   pPList F_edges(pFace pf)
   {
     pPList pl = PList_new();
-    PList_append(pl,F_edge(pf,0)); 
-    PList_append(pl,F_edge(pf,1)); 
-    PList_append(pl,F_edge(pf,2)); 
+    int n = F_numVertices(pf);
+    for (int i=0;i<n;i++)
+      PList_append(pl,F_edge(pf,i));
     return pl;
   }
 
@@ -1954,6 +2075,26 @@ namespace MAd {
   }
 
   // -------------------------------------------------------------------
+  //! Returns the first other face attached to edge pe found \ingroup edge
+  //! Warns if more than 2 faces around edge, returns NULL if no other face.
+  pFace E_otherFace(pEdge edge, pFace face)
+  {
+    int nF = edge->numfaces();
+    if ( nF > 2 ) {
+      MAdMsgSgl::instance().warning(__LINE__,__FILE__,
+                                    "There are more than 2 faces around this edge, returning the first candidate");
+    }
+
+    for (int i=0;i<nF;i++)
+      {
+        pFace pf = edge->faces(i);
+        if ( pf != face ) return pf;
+      }
+   
+    return NULL;
+  }
+
+  // -------------------------------------------------------------------
   //! Returns the other face attached to edge pe belonging to the closure of region r \ingroup edge
   pFace E_otherFace(pEdge edge, pFace face, pRegion r)
   {
@@ -2612,36 +2753,192 @@ namespace MAd {
   /* mesh entity creation routines */
 
   //! Creates a region, classified on gent, in mesh m using specified faces \ingroup mesh
-  pRegion M_createR(pMesh mesh, int nFace, pFace *faces, pGEntity gent)
+  pRegion M_createR(pMesh mesh, int nFace, pFace faces[], pGEntity gent)
   {
     pRegion pr(0);
     switch(nFace)
       {
-      case 4 : pr =  mesh->add_tet((MDB_Triangle*)faces[0],(MDB_Triangle*)faces[1],(MDB_Triangle*)faces[2],(MDB_Triangle*)faces[3],gent);
+      case 4 : pr =  mesh->add_tet((MDB_Triangle*)faces[0], (MDB_Triangle*)faces[1],
+                                   (MDB_Triangle*)faces[2], (MDB_Triangle*)faces[3],
+                                   gent);
         break;
-      case 5 : pr =  mesh->add_prism((MDB_Triangle*)faces[0],(MDB_Triangle*)faces[1],
-                                     (MDB_Quad*)faces[2],(MDB_Quad*)faces[3],(MDB_Quad*)faces[4],gent);
+      case 5 : pr =  mesh->add_prism((MDB_Triangle*)faces[0], (MDB_Triangle*)faces[1],
+                                     (MDB_Quad*)faces[2], (MDB_Quad*)faces[3],
+                                     (MDB_Quad*)faces[4], gent);
         break;
-      case 6 : pr =  mesh->add_hex((MDB_Quad*)faces[0],(MDB_Quad*)faces[1],(MDB_Quad*)faces[2],
-                                   (MDB_Quad*)faces[3],(MDB_Quad*)faces[4],(MDB_Quad*)faces[5],gent);
+      case 6 : pr =  mesh->add_hex((MDB_Quad*)faces[0], (MDB_Quad*)faces[1],
+                                   (MDB_Quad*)faces[2], (MDB_Quad*)faces[3],
+                                   (MDB_Quad*)faces[4], (MDB_Quad*)faces[5],gent);
         break;      
       }
     return pr;
   }
 
+  //! Creates a region, classified on gent, in mesh m using specified vertices \ingroup mesh
+  pRegion M_createR(pMesh mesh, int nVert, pVertex verts[], pGEntity gent)
+  {
+    pRegion pr(0);
+    switch(nVert)
+      {
+      case 4 : pr =  mesh->add_tet(verts[0], verts[1], verts[2], verts[3],
+                                   gent);
+        break;
+      case 6 : pr =  mesh->add_prism(verts[0], verts[1], verts[2], 
+                                     verts[3], verts[4], verts[5],
+                                     gent);
+        break;
+      case 8 : pr =  mesh->add_hex(verts[0], verts[1], verts[2], verts[3],
+                                   verts[4], verts[5], verts[6], verts[7],
+                                   gent);
+        break;      
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Not a valid number of vertices: %d",
+                                    nVert);
+      }
+    return pr;
+  }
+
+  //! Creates a region, classified on gent, in mesh m using specified vertices \ingroup mesh
+  pRegion M_createR(pMesh mesh, int nVert, int vId[], pGEntity gent)
+  {
+    pRegion pr(0);
+    switch(nVert)
+      {
+      case 4 : pr =  mesh->add_tet(vId[0], vId[1], vId[2], vId[3],
+                                   gent);
+        break;
+      case 6 : pr =  mesh->add_prism(vId[0], vId[1], vId[2], 
+                                     vId[3], vId[4], vId[5],
+                                     gent);
+        break;
+      case 8 : pr =  mesh->add_hex(vId[0], vId[1], vId[2], vId[3],
+                                   vId[4], vId[5], vId[6], vId[7],
+                                   gent);
+        break;      
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Not a valid number of vertices: %d",
+                                    nVert);
+      }
+    return pr;
+  }
+
+  //! Creates a high order region, classified on gent, in mesh m using 
+  //! specified vertices \ingroup mesh
+  pRegion M_createTet(pMesh m, int order, bool serendip, int vId[], pGEntity gent)
+  {
+    m->add_tet(gent,order,serendip,vId); 
+  }
+
   //! Creates a face, classified on gent, in mesh m using specified edges \ingroup mesh
   /*! \warning currently only implemented for triangles */
-  pFace M_createF(pMesh mesh, int nEdge, pEdge *edges, pGEntity gent)
+  pFace M_createF(pMesh mesh, int nEdge, pEdge edges[], pGEntity gent)
+  {
+    pFace pf(0);
+    switch(nEdge)
+      {
+      case 3: pf = mesh->add_triangle (edges[0], edges[1], edges[2], gent);
+        break;
+      case 4: pf = mesh->add_quad (edges[0], edges[1], edges[2], edges[3], gent);
+        break;
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Not a valid number of edges: %d", nEdge);
+      }
+    return pf;
+  }
+
+  //! Creates a face, classified on gent, in mesh m using specified vertices \ingroup mesh
+  pFace M_createF(pMesh mesh, int nVert, pVertex verts[], pGEntity gent)
+  {
+    pFace pf(0);
+    switch(nVert)
+      {
+      case 3: pf = mesh->add_triangle (verts[0], verts[1], verts[2], gent);
+        break;
+      case 4: pf = mesh->add_quad (verts[0], verts[1], verts[2], verts[3], gent);
+        break;
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Not a valid number of vertices: %d", nVert);
+      }
+    return pf;
+  }
+
+  //! Creates a face, classified on gent, in mesh m using specified vertices \ingroup mesh
+  pFace M_createF(pMesh mesh, int nVert, int vId[], pGEntity gent)
   {
-    pFace pf = mesh->add_triangle (edges[0],edges[1],edges[2],gent);
+    pFace pf(0);
+    switch(nVert)
+      {
+      case 3: pf = mesh->add_triangle (vId[0], vId[1], vId[2], gent);
+        break;
+      case 4: pf = mesh->add_quad (vId[0], vId[1], vId[2], vId[3], gent);
+        break;
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Not a valid number of vertices: %d", nVert);
+      }
     return pf;
   }
 
-  //! Create a edge, classified on ent, in mesh m using specified vertices \ingroup mesh
+  //! Creates a complete high order triangle, classified on gent, in mesh m using 
+  //! specified vertices \ingroup mesh
+  //! template is the following v0 ho[v0->v1] v1 ho[v1->v2] v2 ho[v2->v0]
+  pFace M_createTri(pMesh mesh, int order, int vId[], pGEntity gent)
+  {
+    pFace pf(0);
+    switch(order)
+      {
+      case 1: pf = mesh->add_triangle (vId[0], vId[1], vId[2], gent);
+        break;
+      case 2: pf = mesh->add_triangle (order, true, gent,
+                                       vId[0], vId[1], vId[2], 
+                                       vId[3], vId[4], vId[5] );
+        break;
+      case 3: pf = mesh->add_triangle (order, true, gent,
+                                       vId[0], vId[1], vId[2], 
+                                       vId[3], vId[4], vId[5],
+                                       vId[6], vId[7], vId[8], vId[9] );
+        break;
+      case 4: pf = mesh->add_triangle (order, true, gent,
+                                       vId[0], vId[1], vId[2], 
+                                       vId[3], vId[4], vId[5],
+                                       vId[6], vId[7], vId[8], vId[9],
+                                       vId[10], vId[11], vId[12], vId[13], vId[14] );
+        break;
+      default:
+        MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                    "Complete triangles not defined for order %d",
+                                    order);
+      }
+    return pf;
+
+  }
+
+  //! Create a first order edge, classified on ent, in mesh 'mesh' using 
+  //! specified vertices \ingroup mesh
   pEdge M_createE(pMesh mesh, pVertex v1, pVertex v2, pGEntity ent)
   {
     return mesh->add_edge (v1,v2,ent);
   }
+
+  //! Create a first order edge, classified on ent, in mesh 'mesh' using 
+  //! specified vertices \ingroup mesh
+  pEdge M_createE(pMesh mesh, int id1, int id2, pGEntity ent)
+  {
+    return mesh->add_edge (id1,id2,ent);
+  }
+
+  //! Create a high order edge, classified on ent, in mesh 'mesh' using 
+  //! specified vertices \ingroup mesh
+  pEdge M_createE(pMesh mesh, pVertex v1, pVertex v2, int order, 
+                  pVertex internalPoints[], pGEntity ent)
+  {
+    return mesh->add_edge(v1,v2,ent,order,internalPoints);
+  }
+
   pVertex M_createV(pMesh mesh, double x, double y, double z,
                     int patch, pGEntity ent)
   {
@@ -2703,7 +3000,10 @@ namespace MAd {
   pFace F_exist(pEdge edge, pVertex vertex)
   {
     for (int iF=0; iF<edge->numfaces(); iF++) {
-      MDB_Triangle * tri = edge->faces(iF);
+      MDB_Face * face = edge->faces(iF);
+      if(face->getNbEdges()!=3)
+        continue;
+      MDB_Triangle *tri=(MDB_Triangle*) face;
       MDB_Edge * otherE = tri->e1;
       if ( otherE == edge) otherE = tri->e2;
       if ( otherE->p1 == vertex || otherE->p2 == vertex ) {
@@ -2727,19 +3027,19 @@ namespace MAd {
       { pVertex p1 = (pVertex) e1;
         pVertex p2 = (pVertex) e2;
         pVertex p3 = (pVertex) e3;
-        MDB_ListF listFaces;
-        p1->getTriangles(listFaces);
-        MDB_ListF::iterator it  = listFaces.begin();
-        MDB_ListF::iterator ite = listFaces.end();
+        pVertex p4 = (pVertex) e4;
+        MDB_ListFace listFaces;
+        p1->getFaces(listFaces);
+        MDB_ListFace::iterator it  = listFaces.begin();
+        MDB_ListFace::iterator ite = listFaces.end();
         while(it!=ite){
-          pVertex p[3];
+          pVertex p[4]={NULL,NULL,NULL,NULL};
           (*it)->getNodes(p);
-          if(p[0]==p1 && p[1]==p2 && p[2]==p3) return(*it);
-          if(p[0]==p1 && p[1]==p3 && p[2]==p2) return(*it);
-          if(p[0]==p2 && p[1]==p1 && p[2]==p3) return(*it);
-          if(p[0]==p2 && p[1]==p3 && p[2]==p1) return(*it);
-          if(p[0]==p3 && p[1]==p1 && p[2]==p2) return(*it);
-          if(p[0]==p3 && p[1]==p2 && p[2]==p1) return(*it);
+          if (   (p[0]==p1 || p[0]==p2 || p[0]==p3 || p[0]==p4)
+              && (p[1]==p1 || p[1]==p2 || p[1]==p3 || p[1]==p4)
+              && (p[2]==p1 || p[2]==p2 || p[2]==p3 || p[2]==p4)
+              && (p[3]==p1 || p[3]==p2 || p[3]==p3 || p[3]==p4))
+                return (*it);
           ++it;
         }      
         return 0;
@@ -2750,14 +3050,14 @@ namespace MAd {
         pEdge ped1 = (pEdge) e1;
         pEdge ped2 = (pEdge) e2;
         pEdge ped3 = (pEdge) e3;
+        pEdge ped4 = (pEdge) e4;
         for(int k=0 ; k<ped1->numfaces() ; k++) {
           pFace pface = ped1->faces(k);
-          if(pface->getEdge(0)==ped1 && pface->getEdge(1)==ped2 && pface->getEdge(2)==ped3) return(pface);
-          if(pface->getEdge(0)==ped1 && pface->getEdge(1)==ped3 && pface->getEdge(2)==ped2) return(pface);
-          if(pface->getEdge(0)==ped2 && pface->getEdge(1)==ped1 && pface->getEdge(2)==ped3) return(pface);
-          if(pface->getEdge(0)==ped2 && pface->getEdge(1)==ped3 && pface->getEdge(2)==ped1) return(pface);
-          if(pface->getEdge(0)==ped3 && pface->getEdge(1)==ped1 && pface->getEdge(2)==ped2) return(pface);
-          if(pface->getEdge(0)==ped3 && pface->getEdge(1)==ped2 && pface->getEdge(2)==ped1) return(pface);
+          if ((pface->getEdge(0)==ped1 || pface->getEdge(1)==ped1 || pface->getEdge(2)==ped1  || pface->getEdge(3)==ped1)
+            &&(pface->getEdge(0)==ped2 || pface->getEdge(1)==ped2 || pface->getEdge(2)==ped2  || pface->getEdge(3)==ped2)
+            &&(pface->getEdge(0)==ped3 || pface->getEdge(1)==ped3 || pface->getEdge(2)==ped3  || pface->getEdge(3)==ped3)
+            &&(pface->getEdge(0)==ped4 || pface->getEdge(1)==ped4 || pface->getEdge(2)==ped4  || pface->getEdge(3)==ped4))
+              return (pface);
         }
         return 0;
       }
@@ -2768,6 +3068,18 @@ namespace MAd {
     return 0;
   }
 
+  /* deprecated (rather use ModelInterface) */
+  void M_setGeomFeature(pMesh m, int tag, pGEntity geom)
+  {
+    bool found = false;
+    std::multimap<int, pGEntity>::iterator it;
+    for (it  = m->geomFeatures_Tags.lower_bound(tag);
+         it != m->geomFeatures_Tags.upper_bound(tag);++it)
+      if (it->second == geom) found = true;
+    if (!found)
+      m->geomFeatures_Tags.insert(std::pair<int,pGEntity>(tag, geom));
+  }
+
   //! Returns the number of geometric entities associated to the mesh \ingroup mesh
 
   int    M_numGeomFeatures (pMesh pm)
diff --git a/Mesh/MeshDataBaseInterface.h b/Mesh/MeshDataBaseInterface.h
index 1f8acab..0698d93 100644
--- a/Mesh/MeshDataBaseInterface.h
+++ b/Mesh/MeshDataBaseInterface.h
@@ -14,11 +14,14 @@
 #ifndef H_MESHDATABASEINTEFACE
 #define H_MESHDATABASEINTEFACE
 
-#include "MeshDataBase.h"
-#include "MeshDataBaseCommPeriodic.h"
+#include "ModelInterface.h"
+#include <iostream>
+#include <set>
 
 namespace MAd {
 
+  class MDB_DataExchangerPeriodic;
+
   typedef unsigned int pMeshDataId;
 
   typedef class MDB_Mesh  * pMesh;  
@@ -60,8 +63,8 @@ namespace MAd {
 
   bool    M_isParametric(pMesh);
 
-  void    M_writeMsh(const pMesh, const char *name, 
-                     int version=2, const int * partitionTable=NULL);
+  void    M_writeMsh(const pMesh, const char *name, int version=2, 
+                     const int * partitionTable=NULL);
   void    M_writeMshPer(pMesh, const char *name, 
                         MDB_DataExchangerPeriodic &, int version);
 
@@ -95,14 +98,25 @@ namespace MAd {
   VIter   M_classifiedVertexIter(pMesh, pGEntity, int closure);
   pVertex M_classifiedVertex    (pMesh, pGVertex);
 
+  void M_classifyEntities(pMesh);
+
   /* mesh entity creation routines */
-  pRegion M_createR(pMesh, int nFace, pFace *faces, pGEntity);
-  pFace   M_createF(pMesh, int nEdge, pEdge *edges, pGEntity);
-  pEdge   M_createE(pMesh, pVertex v1, pVertex v2, pGEntity);
-  pVertex M_createV(pMesh, double x, double y, double z, int patch, pGEntity);
-  pVertex M_createV2(pMesh, double xyz[3], int patch, pGEntity);
+  pRegion M_createR(pMesh, int nFace, pFace   faces[], pGEntity pg=NULL);
+  pRegion M_createR(pMesh, int nVert, pVertex verts[], pGEntity pg=NULL);
+  pRegion M_createR(pMesh, int nVert, int   vertIds[], pGEntity pg=NULL);
+  pRegion M_createTet(pMesh, int order, bool serendip, int vertIds[], pGEntity pg=NULL);
+  pFace   M_createF(pMesh, int nEdge, pEdge   edges[], pGEntity pg=NULL);
+  pFace   M_createF(pMesh, int nVert, pVertex verts[], pGEntity pg=NULL);
+  pFace   M_createF(pMesh, int nVert, int   vertIds[], pGEntity pg=NULL);
+  pFace   M_createTri(pMesh, int order, int vertIds[], pGEntity pg=NULL);
+  pEdge   M_createE(pMesh, pVertex v1, pVertex v2, pGEntity pg=NULL);
+  pEdge   M_createE(pMesh, int   vId1, int   vId2, pGEntity pg=NULL);
+  pEdge   M_createE(pMesh, pVertex v1, pVertex v2, int order=1, 
+                    pVertex pts[]=NULL, pGEntity pg=NULL);
+  pVertex M_createV(pMesh, double x, double y, double z, int patch, pGEntity pg=NULL);
+  pVertex M_createV2(pMesh, double xyz[3], int patch, pGEntity pg=NULL);
   pVertex M_createVP(pMesh, double x, double y, double z, 
-                     double u, double v, int patch, pGEntity);
+                     double u, double v, int patch, pGEntity pg=NULL);
 
   /* mesh entity deletion routines */
   void M_removeRegion(pMesh, pRegion);
@@ -112,10 +126,19 @@ namespace MAd {
   void P_delete(pPoint);
   pPoint P_new(void);
 
+  /* extra access to entities */
+  pRegion M_region(pMesh, int []);
+  pFace   M_face  (pMesh, int []);
+  pEdge   M_edge  (pMesh, int, int);
+  pVertex M_vertex(pMesh, int);
+
+
   /***********************/
   /* Geometric model ops */
   /***********************/
+  /* deprecated (rather use ModelInterface) */
 
+  void    M_setGeomFeature    (pMesh, int, pGEntity);
   int     M_numGeomFeatures   (pMesh);
   int     M_geomFeatureId     (pMesh, int ith);
   pPGList M_geomFeature       (pMesh, int id);
@@ -200,6 +223,9 @@ namespace MAd {
   void     R_center(const pRegion, double [3]);
   void     R_jacobian(const pRegion, double [3][3]);
   double   R_invJacobian(const pRegion, double [3][3]);
+  void     R_box(const pRegion, double [3][2]);
+  bool     R_inBox(const pRegion, const double [3], double);
+  bool     R_contains(const pRegion, const double [3], double);
 
   /********************/
   /*  Face Operators  */
@@ -225,6 +251,7 @@ namespace MAd {
   pPList   F_edges(pFace);
   pEdge    F_edge(pFace, int);
   int      F_edgeDir(pFace, int);
+  pEdge    F_findEdge(const pFace, const pVertex, const pVertex);
   pVertex  F_edOpVt(const pFace, const pEdge);
   int      F_dirUsingEdge(pFace, pEdge);
   int      F_numRegions(pFace);
@@ -269,6 +296,7 @@ namespace MAd {
   int      E_numFaces(pEdge);
   pPList   E_faces(const pEdge);
   pFace    E_face(pEdge, int);
+  pFace    E_otherFace(pEdge, pFace);
   pFace    E_otherFace(pEdge, pFace, pRegion);
   int      E_numRegions(pEdge);
   pPList   E_regions(pEdge);
diff --git a/Mesh/MeshDataBaseIterators.h b/Mesh/MeshDataBaseIterators.h
index 33ea10e..985b4a0 100644
--- a/Mesh/MeshDataBaseIterators.h
+++ b/Mesh/MeshDataBaseIterators.h
@@ -14,6 +14,8 @@
 #ifndef H_MESHDATABASEITERATORS
 #define H_MESHDATABASEITERATORS
 
+#include <stdio.h>
+
 namespace MAd {
 
   template <class CONTAINER, class DATA, class CLASSIF>
diff --git a/Mesh/MeshDataBaseLoadBalancing.cc b/Mesh/MeshDataBaseLoadBalancing.cc
index 9971300..f431124 100644
--- a/Mesh/MeshDataBaseLoadBalancing.cc
+++ b/Mesh/MeshDataBaseLoadBalancing.cc
@@ -15,7 +15,6 @@
 #include "autopack.h"
 
 #include "MeshDataBase.h"
-#include "MSops.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseParallelInterface.h"
 #include "MeshDataBaseLoadBalancing.h"
@@ -2957,7 +2956,6 @@ namespace MAd {
     MigrateEntitiesAndData(mesh, tagDest, de);
     // 2 delete entities
     DeleteEntitiesAndData( mesh,tagElt, de );
-
  
     pMeshDataId tagVertex = MD_lookupMeshDataId("RemotePoint");
     MD_deleteMeshDataId(tagVertex);
diff --git a/Mesh/MeshDataBaseMessage.cc b/Mesh/MeshDataBaseMessage.cc
deleted file mode 100644
index 2fce545..0000000
--- a/Mesh/MeshDataBaseMessage.cc
+++ /dev/null
@@ -1,150 +0,0 @@
-// -------------------------------------------------------------------
-// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-//
-// See the Copyright.txt and License.txt files for license information. 
-// You should have received a copy of these files along with MAdLib. 
-// If not, see <http://www.madlib.be/license/>
-//
-// Please report all bugs and problems to <contrib at madlib.be>
-//
-// Authors: Jean-Francois Remacle, Gaetan Compere
-// -------------------------------------------------------------------
-
-#include <signal.h>
-#ifndef _WIN_
-#include <sys/time.h>
-#include <sys/resource.h>
-#else
-#include <windows.h>
-#include <psapi.h>
-#endif
-#include <stdio.h>
-#include <stdarg.h>
-#include "MeshDataBaseMessage.h"
-using std::string;
-
-namespace MAd {
-
-  // Handle signals. We should not use Msg functions in these...
-
-  void Signal(int sig_num)
-  {
-    switch (sig_num) {
-    case SIGSEGV:
-      Msg(MDB_FATAL, "Segmentation violation (invalid memory reference)");
-      break;
-    case SIGFPE:
-      Msg(MDB_FATAL, "Floating point exception (division by zero?)");
-      break;
-    case SIGINT:
-      Msg(MDB_FATAL, "Interrupt (generated from terminal special char)");
-      break;
-    default:
-      Msg(MDB_FATAL, "Unknown signal");
-      break;
-    }
-  }
-
-  // General purpose message routine
-
-  void Msg(int level, string fmt, ...)
-  {
-    va_list args;
-    va_start(args, fmt);
-
-    Msg_char(level, fmt.c_str(), args);
-
-    va_end(args);
-  }
-
-  void Msg_char(int level, const char *fmt, ...)
-  {
-    va_list args;
-    int abort = 0;
-
-    va_start(args, fmt);
-
-    switch (level) {
-
-    case MDB_PROGRESS:
-    case MDB_STATUS1N:
-    case MDB_STATUS2N:
-    case MDB_STATUS3N:
-      break;
-
-    case MDB_DIRECT:
-      vfprintf(stdout, fmt, args);
-      fprintf(stdout, "\n");
-      break;
-
-    case MDB_FATAL:
-    case MDB_FATAL3: abort = 1;
-    case MDB_FATAL1:
-    case MDB_FATAL2:
-      fprintf(stderr, MDB_FATAL_STR);
-      vfprintf(stderr, fmt, args);
-      fprintf(stderr, "\n");
-      break;
-
-    case MDB_GERROR:
-    case MDB_GERROR1:
-    case MDB_GERROR2:
-    case MDB_GERROR3:
-      fprintf(stderr, MDB_ERROR_STR);
-      vfprintf(stderr, fmt, args);
-      fprintf(stderr, "\n");
-      break;
-
-    case MDB_WARNING:
-    case MDB_WARNING1:
-    case MDB_WARNING2:
-    case MDB_WARNING3:
-      fprintf(stderr, MDB_WARNING_STR);
-      vfprintf(stderr, fmt, args);
-      fprintf(stderr, "\n");
-      break;
-
-      //   case DEBUG:
-      //   case DEBUG1:
-      //   case DEBUG2:
-      //   case DEBUG3:
-      //     fprintf(stderr, DEBUG_STR);
-      //     vfprintf(stderr, fmt, args);
-      //     fprintf(stderr, "\n");
-      //     break;
-    
-    default:
-      fprintf(stderr, MDB_INFO_STR);
-      vfprintf(stderr, fmt, args);
-      fprintf(stderr, "\n");
-      break;
-    }
-
-    va_end(args);
-
-    if(abort)
-      throw;
-  }
-
-  // CPU time computation
-
-  void GetResources(long *s, long *us, long *mem)
-  {
-#ifndef _WIN_
-    static struct rusage r;
-
-    getrusage(RUSAGE_SELF, &r);
-    *s = (long)r.ru_utime.tv_sec;
-    *us = (long)r.ru_utime.tv_usec;
-    *mem = (long)r.ru_maxrss;
-#else
-	PROCESS_MEMORY_COUNTERS counters;
-    if (GetProcessMemoryInfo (GetCurrentProcess(), &counters, sizeof (counters)))
-        *mem=counters.PagefileUsage;
-	SYSTEMTIME systime; 
-	GetSystemTime(&systime); 
-	*s=systime.wSecond;
-	*us=systime.wMilliseconds;
-#endif
-  }
-}
diff --git a/Mesh/MeshDataBaseMessage.h b/Mesh/MeshDataBaseMessage.h
deleted file mode 100644
index d27ce1f..0000000
--- a/Mesh/MeshDataBaseMessage.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- C++ -*-
-// -------------------------------------------------------------------
-// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-//
-// See the Copyright.txt and License.txt files for license information. 
-// You should have received a copy of these files along with MAdLib. 
-// If not, see <http://www.madlib.be/license/>
-//
-// Please report all bugs and problems to <contrib at madlib.be>
-//
-// Authors: Jean-Francois Remacle, Gaetan Compere
-// -------------------------------------------------------------------
-
-#ifndef _MESSAGE_H_
-#define _MESSAGE_H_
-
-#include <stdarg.h>
-#include <string>
-
-#define MDB_FATAL          1  // Fatal error (causes Gmsh to exit)
-#define MDB_FATAL1         2  // First part of a multiline FATAL message 
-#define MDB_FATAL2         3  // Middle part of a multiline FATAL message
-#define MDB_FATAL3         4  // Last part of a multiline FATAL message  
-
-#define MDB_GERROR         5  // Error (but Gmsh can live with it)
-#define MDB_GERROR1        6  // First part of a multiline ERROR message 
-#define MDB_GERROR2        7  // Middle part of a multiline ERROR message
-#define MDB_GERROR3        8  // Last part of a multiline ERROR message  
-
-#define MDB_WARNING        9  // Warning
-#define MDB_WARNING1      10  // First part of a multiline WARNING message 
-#define MDB_WARNING2      11  // Middle part of a multiline WARNING message
-#define MDB_WARNING3      12  // Last part of a multiline WARNING message  
-
-#define MDB_INFO          13  // Long informations
-#define MDB_INFO1         14  // First part of a multiline INFO message 
-#define MDB_INFO2         15  // Middle part of a multiline INFO message
-#define MDB_INFO3         16  // Last part of a multiline INFO message  
-
-#define MDB_STATUS1       21  // Small information in status bar (left)
-#define MDB_STATUS2       22  // Small interaction in status bar (middle)
-#define MDB_STATUS3       23  // Small interaction in status bar (right)
-
-#define MDB_STATUS1N      24  // Same as STATUS1, but not going into the log file
-#define MDB_STATUS2N      25  // Same as STATUS2, but not going into the log file
-#define MDB_STATUS3N      26  // Same as STATUS3, but not going into the log file
-
-#define MDB_ONSCREEN      27  // Persistent on-screen message
-
-#define MDB_DIRECT        30  // Direct message (no special formatting)
-#define MDB_SOLVER        31  // Solver message
-#define MDB_SOLVERR       32  // Solver errors and warnings
-
-#define MDB_PROGRESS      40  // Progress indicator
-
-#define MDB_WHITE_STR          "        : "
-#define MDB_FATAL_STR          "Fatal   : "
-#define MDB_ERROR_STR          "Error   : "
-#define MDB_WARNING_STR        "Warning : "
-#define MDB_INFO_STR           "Info    : "
-/* #define MDB_DEBUG_STR          "Debug   : " */
-#define MDB_STATUS_STR         "Info    : "
-
-namespace MAd {
-
-  void   Signal(int signum);
-  void   Msg(int level, std::string fmt, ...);
-  void   Msg_char(int level, const char * fmt, ...);
-  double Cpu(void);
-  double GetValue(char *text, double defaultval);
-
-}
-
-#endif
diff --git a/Mesh/MeshDataBaseMigration.cc b/Mesh/MeshDataBaseMigration.cc
index 62b9254..4fac269 100644
--- a/Mesh/MeshDataBaseMigration.cc
+++ b/Mesh/MeshDataBaseMigration.cc
@@ -15,6 +15,7 @@
 #include "autopack.h"
 #include "MeshDataBaseParallelInterface.h"
 #include "MeshDataBaseLoadBalancing.h"
+#include "MeshDataBase.h"
 #include "assert.h"
 #include <iostream>
 
diff --git a/Mesh/MeshDataBaseParallelIO.cc b/Mesh/MeshDataBaseParallelIO.cc
index 77d7c42..abf8202 100644
--- a/Mesh/MeshDataBaseParallelIO.cc
+++ b/Mesh/MeshDataBaseParallelIO.cc
@@ -13,7 +13,6 @@
 #include "MeshDataBase.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseIO.h"
-#include "MeshDataBaseMessage.h"
 #include "MeshDataBaseGEntity2Physical.h"
 #ifndef _WIN_
 #include <unistd.h>
diff --git a/Mesh/MeshDataBaseParallelInterface.cc b/Mesh/MeshDataBaseParallelInterface.cc
index 5c1ea38..a165bf6 100644
--- a/Mesh/MeshDataBaseParallelInterface.cc
+++ b/Mesh/MeshDataBaseParallelInterface.cc
@@ -13,22 +13,17 @@
 #include "assert.h"
 #include "MeshDataBase.h"
 #include "MeshDataBaseIO.h"
-#include "MSops.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseParallelInterface.h"
 #include "MeshDataBaseParallelIO.h"
-#include "MeshDataBaseMessage.h"
 #include "MeshDataBaseCommCheck.h"
 #include "MeshDataBaseComm.h"
+#include "MeshDataBaseCommPeriodic.h"
 #ifdef PARALLEL
 #include "mpi.h"
 #include "autopack.h"
 #endif
 
-// #include <sstream>
-// using std::ostringstream;
-// #include <fstream>
-// using std::ofstream;
 #include <set>
 #include <iterator>
 #include <algorithm>
@@ -250,9 +245,8 @@ namespace MAd {
   
   bool E_isPotentialInterface(pMesh mesh, pEdge pe)
   {
-    int dim = (mesh->tets.empty()) ? 2 : 3;
 
-    switch (dim) {
+    switch (M_dim(mesh)) {
     case 2:
       {     
       
@@ -418,8 +412,7 @@ namespace MAd {
     //     return check;
 
     // --- check that the mesh is 3D ---
-
-    if (mesh->tets.empty()) return false;
+    if ( M_dim(mesh) != 3 ) return false;
   
     // --- check that the face has less than two neighbouring regions ---
 
@@ -666,7 +659,8 @@ namespace MAd {
         int id4 = EN_id((pEntity) nod[3]);
     
         if( !(isInterface1 && isInterface2 && isInterface3 && isInterface4) ) {
-          Msg(MDB_FATAL,"Error: found a face which nodes are not all on a parallel boundary although it fits the conditions to be a parallel boundary face\n");
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                      "found a face which nodes are not all on a parallel boundary although it fits the conditions to be a parallel boundary face");
         }
     
         // --- check that the three nodes are on the same parallel boundary ---
@@ -755,8 +749,8 @@ namespace MAd {
     MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
 
     // --- list local nodes on parallel boundaries ---
-    
-    int meshDim = (mesh->tets.empty()) ? 2 : 3;
+   int meshDim = M_dim(mesh);
+
     if ( meshDim == 3 ) {
       FIter fit = M_faceIter(mesh);
       while ( pFace pf = FIter_next(fit) ) {
@@ -968,7 +962,9 @@ namespace MAd {
       if (havePeriodic) {
         
         if (!haveRemote) {
-          Msg_char(MDB_FATAL,"Periodic node %d without connection table",EN_id((pEntity) pv));
+          MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                      "Periodic node %d without connection table",
+                                      EN_id((pEntity) pv));
         }
         
         // allocate and attach transformation table 
@@ -1272,9 +1268,10 @@ namespace MAd {
               if (V_corresponds(p1Remote,p2Local) && V_corresponds(p2Remote,p1Local)) orientation = -1;
                 
               if (orientation == 0) {
-                Msg(MDB_FATAL,
-                    "Got a locally periodic edge connection from %d-%d to %d-%d which does not correspond nodewise",
-                    EN_id((pEntity) p1),EN_id((pEntity) p2),EN_id((pEntity) p1Local),EN_id((pEntity) p2Local));
+                MAdMsgSgl::instance().error(__LINE__,__FILE__,
+                                            "Got a locally periodic edge connection from %d-%d to %d-%d which does not correspond nodewise",
+                                            EN_id((pEntity) p1),EN_id((pEntity) p2),
+                                            EN_id((pEntity) p1Local),EN_id((pEntity) p2Local));
               }
               
               std::pair<int,int> rNodeID(std::min(EN_id((pEntity) p1Remote),EN_id((pEntity) p2Remote)),
@@ -1335,7 +1332,7 @@ namespace MAd {
             castbuf->p1  = riter->p1;
             castbuf->p2  = riter->p2;
             castbuf->id1 = riter->id1;
-            castbuf->id2 = riter->id1;
+            castbuf->id2 = riter->id2;
             castbuf->pe = pe;
             AP_send(buf);
             sendcounts[distProc]++;
diff --git a/Mesh/MeshDataBaseParallelInterface.h b/Mesh/MeshDataBaseParallelInterface.h
index 7f5fe16..34ee6c2 100644
--- a/Mesh/MeshDataBaseParallelInterface.h
+++ b/Mesh/MeshDataBaseParallelInterface.h
@@ -14,14 +14,17 @@
 #ifndef H_MESHDATABASEPARALLELINTEFACE
 #define H_MESHDATABASEPARALLELINTEFACE
 
-#include "MeshDataBaseCommPeriodic.h"
-#include "MeshDataBaseComm.h"
 #include "MeshDataBaseInterface.h"
+#include "MeshDataBaseComm.h"
+#include "MeshDataBaseCommPeriodic.h"
 
 #include <vector>
 
 namespace MAd {
 
+  class MDB_DataExchanger;
+  class MDB_DataExchangerPeriodic;
+
   // -------------------------------------------------------------------
 
 #ifdef PARALLEL
@@ -41,7 +44,7 @@ namespace MAd {
 
   /*! \brief Return size of the list and list is an array containing 
     proc numbers where pv exist except calling proc \ingroup parallel */ 
-  int  V_listInterface(pVertex pv, int* list=NULL);
+  int  V_listInterface(pVertex pv, std::vector<int>* list);
 
   /*! \brief  Return true if edge is //possibly// on a parallel or periodic interface \ingroup internal */ 
   bool E_isPotentialInterface(pMesh, pEdge);
diff --git a/Mesh/ParallelUtils.cc b/Mesh/ParallelUtils.cc
index a2df5c8..9b8a475 100644
--- a/Mesh/ParallelUtils.cc
+++ b/Mesh/ParallelUtils.cc
@@ -11,7 +11,6 @@
 // -------------------------------------------------------------------
 
 #include "MeshDataBase.h"
-#include "MSops.h"
 #include "MeshDataBaseInterface.h"
 #include "ParallelUtils.h"
 #include "assert.h"
diff --git a/Mesh/PeriodicInterfaceMigration.cc b/Mesh/PeriodicInterfaceMigration.cc
index c40016f..fdb290f 100644
--- a/Mesh/PeriodicInterfaceMigration.cc
+++ b/Mesh/PeriodicInterfaceMigration.cc
@@ -11,7 +11,6 @@
 // -------------------------------------------------------------------
 
 #include "MeshDataBase.h"
-#include "MSops.h"
 #include "MeshDataBaseInterface.h"
 #include "MeshDataBaseCommPeriodic.h"
 #include "MeshDataBaseComm.h"
diff --git a/Mesh/metisAdaptiveRepart.cc b/Mesh/metisAdaptiveRepart.cc
index a16e228..4aa318f 100644
--- a/Mesh/metisAdaptiveRepart.cc
+++ b/Mesh/metisAdaptiveRepart.cc
@@ -21,7 +21,6 @@ extern "C" {
 
 #include "assert.h"
 #include "MeshDataBase.h"
-#include "MSops.h"
 #include "MeshDataBaseInterface.h"
 #include "ParallelUtils.h"
 
diff --git a/Mesh/metisAdaptiveRepart.h b/Mesh/metisAdaptiveRepart.h
index 98e8e9a..bb1f039 100644
--- a/Mesh/metisAdaptiveRepart.h
+++ b/Mesh/metisAdaptiveRepart.h
@@ -15,7 +15,7 @@
 #ifndef H_METISADAPTIVEREPART
 #define H_METISADAPTIVEREPART
 
-#include "MSops.h"
+#include "MeshDataBaseInterface.h"
 
 namespace MAd {
 
diff --git a/README b/README
index 06b5cb4..63bf558 100755
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-MAdLib 1.0 - README file.
+MAdLib - README file.
 
 See the Copyright.txt, License.txt and Credits.txt files for copyright, 
 license and authors informations. You should have received a copy of 
@@ -6,25 +6,38 @@ these files along with MAdLib. If not, see <http://www.madlib.be/license/>.
 
 Please report bugs and problems to <contrib at madlib.be>.
 
-To compile and install the MAdLib library, simply type
- ./configure;
+To compile and install the MAdLib library, you should first run the 
+following command:
+ make -f Makefile.svn
+This will generate the 'configure' and 'Makefile.in' files required in the 
+second step. You need the GNU Autotools (aclocal, autoconf, automake) to 
+generate these files.
+
+You can then compile the library by typing
+ ./configure [opts];
  make;
  make install;
 
 If you want to compile and install some benchmark executables, type
- ./configure;
- make bench;
- make install-bin;
+ ./configure --enable-benchmarks [opts];
+ make install-bench;
 
 The documentation is generated and installed automatically with the 
 previous compilations if you have Doxygen installed but you can also 
 generate it (in doc/) by
  make doc;
 
-Note that you need a linear system solver for the benchmarks that include 
+The pkgconfig file MAdLib.pc is generated and installed by
+ make pc
+
+Note that the configure and make commands can be called from any 
+third-part directory. All files built during the compilation 
+processes will be stored in that directory, except the documentation.
+
+Also note that you need a linear system solver for the benchmarks that include 
 the global node repositioning algorithm, like 'moveIt/example/tube' (for inst. PETSc) 
-and a library to compute the distance to a cloud of points (for inst. ANN) 
-for benchmarks including local size fields.
+and a library to compute the distance to a cloud of points (for inst. ANN: add 
+--enable-ann in the configure command) for benchmarks including local size fields.
 
 To see what options are available, type
  ./configure --help
diff --git a/Tutorial/MAdLibInterface.cpp b/Tutorial/MAdLibInterface.cpp
deleted file mode 100644
index aa7764b..0000000
--- a/Tutorial/MAdLibInterface.cpp
+++ /dev/null
@@ -1,444 +0,0 @@
-// -------------------------------------------------------------------
-// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-//
-// See the Copyright.txt and License.txt files for license information. 
-// You should have received a copy of these files along with MAdLib. 
-// If not, see <http://www.madlib.be/license/>
-//
-// Please report all bugs and problems to <contrib at madlib.be>
-// -------------------------------------------------------------------
-// Author: Gaetan Compere
-//
-// This file provides an example of an interface to MAdLib as it 
-// could be implemented in a physical solver requiring mesh adaptivity.
-// -------------------------------------------------------------------
-
-#include "MAdLibInterface.h"
-using namespace MAd;
-
-// -------------------------------------------------------------------
-// This is an example of a callback function that takes care of a 
-// nodal solution when local mesh modifications are applied.
-// This function will be registered by 'MAdLibInterface' and will 
-// then be called during every local mesh modification.
-// --------------------------------------------------------------------
-void Solver_CBFunction (pPList before, pPList after, void *data,
-                        operationType type, pEntity ppp) {
-  
-  // Data can point to the object of type 'MAdLibInterface' for instance,
-  // depending on what pointer was given when registering the callback function
-  // It is not used in this example
-  MAdLibInterface * mi = static_cast<MAdLibInterface *>(data);
-  
-  // The data id used to identify the data attached to mesh entities
-  pMeshDataId dataId = MD_lookupMeshDataId("SolutionTag");
-
-  // Do the right manipulation on data according to the mesh modification
-  // that is currently applied
-  switch (type) {
-  case MAd_ESPLIT:
-    // Edge split case:
-    //   - 'before' contains the split edge (not deleted yet)
-    //   - 'after'  contains the two new edges
-    //   - 'ppp'    contains the new vertex
-    {
-      // find the edge to be deleted
-      void * temp = NULL;
-      pEdge pE = (pEdge) PList_next(before,&temp);
-     
-      // get coordinates and data at old nodes
-      double data0 = 0.;
-      pVertex pV0 = E_vertex((pEdge)pE, 0);
-      int gotit0 = EN_getDataDbl((pEntity)pV0, dataId,  &data0);
-      
-      double data1 = 0.;
-      pVertex pV1 = E_vertex((pEdge)pE, 1);
-      int gotit1 = EN_getDataDbl((pEntity)pV1, dataId,  &data1);
-      
-      if ( !gotit0 || !gotit1) {
-        printf("Error: one of the nodes has no data attached to\n");
-        throw;
-      }
-
-      // interpolate the data at the new vertex (here linear interpolation)
-      double t = E_linearParams(pE,(pVertex)ppp);
-      double newData = (1.-t) * data0 + t * data1;
-      
-      // attach this data to the new vertex
-      EN_attachDataDbl(ppp, dataId, newData);
-    }
-    break;
-  case MAd_ECOLLAPSE:
-    // Edge collapse case:
-    //   - 'before' contains the regions (3D) or faces (2D) of the cavity 
-    //                       before the edge collapse (not deleted yet)
-    //   - 'after'  contains the regions (3D) or faces (2D) of the cavity 
-    //                       after the edge collapse
-    //   - 'ppp'    contains the vertex to be deleted (not deleted yet)
-    {
-      // remove the data on deleted vertex
-      EN_deleteData(ppp, dataId);
-    }
-    break;
-  case MAd_FSWAP:
-    // Face swap case:
-    //   - 'before' contains the regions of the cavity before the face swap (not deleted yet)
-    //   - 'after'  contains the regions of the cavity after the face swap
-    //   - 'ppp'    contains the swapped face (not deleted yet)
-    {
-      // nothing to be done for nodal solutions
-    }
-    break;
-  case MAd_ESWAP:
-    // Edge swap case:
-    //   - 'before' contains the regions (3D) or faces (2D) of the cavity 
-    //                       before the edge swap (not deleted yet)
-    //   - 'after'  contains the regions (3D) or faces (2D) of the cavity 
-    //                       after the edge swap
-    //   - 'ppp'    contains the swapped edge (not deleted yet)
-    {
-      // nothing to be done for nodal solutions
-    }
-    break;
-  default:
-    printf("Error: no callback function should be called with this operation: %d",type);
-    throw;
-  }
-};
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-MAdLibInterface::MAdLibInterface()
-{}
-
-//-----------------------------------------------------------------------------
-MAdLibInterface::~MAdLibInterface()
-{}
-
-//-----------------------------------------------------------------------------
-// Main routine for adaptation
-void MAdLibInterface::adaptMesh()
-{
-  //-----------------------------------------------------
-  // Step 1: Prepare for adaptation
-  //-----------------------------------------------------
-
-  // 1. Delete mesh/solution dependent data in the solver
-  solver->deleteData();
-
-  // 2.A. Build the MAdLib geometrical model.
-  pGModel MAdModel = NULL;
-  GM_create(&MAdModel,"theModel");
-  exportToMAdModel(solver->getModel(), MAdModel);
-
-  // 2.B. Build the MAdLib mesh.
-  pMesh MAdMesh = M_new(MAdModel);
-  exportToMAdMesh(solver->getMesh(), MAdMesh);
-  
-  // 3. Transfer solution to the MAdLib mesh as an attached data
-  attachSolutionToMesh(MAdMesh);
-  solver->deallocateSolution();
-
-  // 4. Delete the solver mesh.
-  solver->deleteMesh();
-
-  // 5. Build the size field used in adaptation
-  PWLSField * sizeField = new PWLSField(MAdMesh);
-  buildSizeField(sizeField);
-
-  //-----------------------------------------------------
-  // Step 2: Run the adaptation
-  //-----------------------------------------------------
-
-  // 6.A. Build the adaptation tool
-  MeshAdapter * adapter = new MeshAdapter(MAdMesh,sizeField);
-  
-  // 6.B. Register the callback function(s) of the solver
-  adapter->addCallback(Solver_CBFunction,(void*)this);
-
-  // 6.C. Edit the adaptation parameters if necessary
-  adapter->setEdgeLenSqBounds( 1.0/3.0, 3.0 );
-  adapter->setNoSwapQuality( 0.1 );
-  adapter->setSliverQuality( 0.02 );
-  adapter->setSliverPermissionInESplit( true, 10. );
-  adapter->setSliverPermissionInECollapse( true, 0.1 );
-
-  // 6.D. Run the adaptation procedure
-  adapter->run();
-
-  // 6.E. Optional output
-  adapter->printStatistics(std::cout);
-  M_writeMsh(MAdMesh,"adapted_mesh.msh",2);
-
-  // 6.F. Clean the adaptation objects
-  delete adapter;
-  delete sizeField;
-
-  //-----------------------------------------------------
-  // Step 3: Rebuild solver data and mesh
-  //-----------------------------------------------------
-
-  // 7. Rebuild the solver mesh
-  importFromMAdModel(MAdModel, solver->getModel());
-  importFromMAdMesh(MAdMesh, solver->getMesh());
-
-  // 8. Get the solution from the MAdLib mesh
-  solver->allocateSolution();
-  getSolutionFromMesh(MAdMesh);
-
-  // 9. Delete MAdLib mesh
-  delete MAdMesh;
-  delete MAdModel;
-
-  // 10. Build mesh/solution dependent data in the solver
-  solver->allocateAndComputeData();
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-// Converts a MAdLib mesh into a 'Solver_mesh'
-void MAdLibInterface::importFromMAdMesh(const MAd::pMesh MAdMesh, 
-                                        Solver_mesh * solverMesh)
-{
-  MAdToSolverIds.clear();
-  SolverToMAdIds.clear();
-
-  // --- Mesh dimension ---
-  int dim = M_dim(MAdMesh);
-
-  // --- Mesh size ---
-  int numVertices = M_numVertices(MAdMesh);
-  int numElements;
-  if ( dim == 3 ) numElements = M_numRegions(MAdMesh);
-  if ( dim == 2 ) numElements = M_numFaces(MAdMesh);
-
-  solverMesh->allocate(numVertices,numElements);
-
-  // --- Build vertices ---
-  int solver_Id = 0; // will allow consecutive ids for the solver mesh
-  VIter vit = M_vertexIter(MAdMesh);
-  while (pVertex pv = VIter_next(vit))
-    {
-      // get MAdLib mesh id
-      int MAd_Id = EN_id((pEntity)pv);
-
-      // get coordinates
-      double xyz[3];
-      V_coord(pv,xyz);
-      
-      // add node in solver mesh
-      solverMesh->addNode(solver_Id,xyz[0],xyz[1],xyz[2]);
-      
-      // fill in id's tables
-      MAdToSolverIds[MAd_Id] = solver_Id;
-      SolverToMAdIds[solver_Id] = MAd_Id;
-
-      solver_Id++;
-    }
-  VIter_delete(vit);
-
-  // --- Build elements ---
-  int solver_elem_Id = 0;
-  if (dim==3) {
-    RIter rit = M_regionIter(MAdMesh);
-    while (pRegion pr = RIter_next(rit))
-      {
-        // get list of node id's in the solver mesh
-        int nodes[4];
-        pPList rVerts = R_vertices(pr);
-        void * temp = NULL;
-        int iN = 0;
-        while ( pVertex pv = (pVertex)PList_next(rVerts,&temp) )
-          {
-            int MAd_Id = EN_id((pEntity)pv);
-            nodes[iN++] = MAdToSolverIds[MAd_Id];
-          }
-        PList_delete(rVerts);
-
-        // add the element to the solver mesh
-        solverMesh->addElement(solver_elem_Id, nodes);
-        solver_elem_Id++;
-      }
-    RIter_delete(rit);
-  }
-  else  if (dim==2) {
-    FIter fit = M_faceIter(MAdMesh);
-    while (pFace pf = FIter_next(fit))
-      {
-        // get list of node id's in the solver mesh
-        int nodes[3];
-        pPList fVerts = F_vertices(pf,1);
-        void * temp = NULL;
-        int iN = 0;
-        while ( pVertex pv = (pVertex)PList_next(fVerts,&temp) )
-          {
-            int MAd_Id = EN_id((pEntity)pv);
-            nodes[iN++] = MAdToSolverIds[MAd_Id];
-          }
-        PList_delete(fVerts);
-
-        // add the element to the solver mesh
-        solverMesh->addElement(solver_elem_Id, nodes);
-        solver_elem_Id++;
-      }
-    FIter_delete(fit);
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Converts a 'Solver_mesh' into a MAdLib mesh
-void MAdLibInterface::exportToMAdMesh(const Solver_mesh * solverMesh, 
-                                      MAd::pMesh MAdMesh)
-{
-  // --- Build the vertices ---
-  MAdToSolverIds.clear();
-  SolverToMAdIds.clear();
-  int nVerts = solverMesh->nVertices();
-  const double ** xyz = solverMesh->getCoordinates();
-  for (int iV=0; iV < nVerts; iV++) {
-    MAdMesh->add_point(iV+1,xyz[iV][0],xyz[iV][1],xyz[iV][2]);
-    SolverToMAdIds[iV] = iV+1;
-    MAdToSolverIds[iV+1] = iV;
-  }
-
-  // --- Build the elements ---
-  int dim = solverMesh->getDim();
-  int nElems = solverMesh->nElements();
-  if (dim==3)
-    {
-      const int ** elements = solverMesh->getElements();
-      const int * elemGeoTags = solverMesh->getElemGeoTags();
-      for (int iC=0; iC < nElems; iC++) {
-        pGRegion geom = GM_regionByTag(MAdMesh->model,
-                                       elemGeoTags[iC]);
-        MAdMesh->add_tet(elements[iC][0], elements[iC][1],
-                         elements[iC][2], elements[iC][3],
-                         (pGEntity)geom); 
-      }
-    }
-  else if (dim==2)
-    {
-      const int ** elements = solverMesh->getElements();
-      const int * elemGeoTags = solverMesh->getElemGeoTags();
-      for (int iC=0; iC < nElems; iC++) {
-        pGFace geom = GM_faceByTag(MAdMesh->model,
-                                   elemGeoTags[iC]);
-        MAdMesh->add_triangle(elements[iC][0], elements[iC][1],
-                              elements[iC][2], (pGEntity)geom); 
-      }
-    }
-
-  /*
-    Here, the entities of the MAdLib mesh sould be classified
-    on their corresponding geometrical entities, like for boundary 
-    faces in 3D for instance. The implementation of this step 
-    is highly dependent on the implementation of Solver_mesh and 
-    Solver_model so it is up to the reader to add the right 
-    instructions here. 
-
-    Note that the geometrical entities have been created in the 
-    execution of 'exportToMAdModel'. Any mesh entity can be 
-    associated to a geometrical entity using the EN_setWhatIn(...) 
-    function of the MAdLib mesh interface.
-
-    Note that all the steps involving geometrical entities can be
-    replaced by appropriate constraints on boundary mesh entities
-    (see AdaptInterface.h) but no mesh modification will therefore
-    be applied on the boundaries, which can be problematic for some
-    computations.
-  */
-
-  MAdMesh->classify_unclassified_entities();
-  MAdMesh->destroyStandAloneEntities();
-}
-
-//-----------------------------------------------------------------------------
-// Create in MAdModel all geometrical entities listed in solverModel.
-void MAdLibInterface::exportToMAdModel(const Solver_model * solverModel, 
-                                       MAd::pGModel MAdModel)
-{
-  std::set<std::pair<int,int> > geometry = solverModel->getAllGeoEntities();
-  std::set<std::pair<int,int> >::const_iterator geoIter = geometry.begin();
-  for (; geoIter != geometry.end(); geoIter++) {
-    int dim = (*geoIter).first;
-    int id  = (*geoIter).second;
-    GM_entityByTag(MAdModel,dim,id);
-  }
-}
-
-//-----------------------------------------------------------------------------
-// Build a field of prescribed edges lengths on the domain.
-void MAdLibInterface::buildSizeField(MAd::PWLSField * sizeField)
-{
-  // First option: keep actual edges lengths
-  sizeField->setCurrentSize();
-
-  // Second option: compute it from solver functions
-  VIter vit = M_vertexIter(sizeField->getMesh());
-  while (pVertex pv = VIter_next(vit))
-    {
-      // get solver point id
-      int MAd_Id = EN_id((pEntity)pv);
-      int solver_Id = MAdToSolverIds[MAd_Id];
-      
-      // get the edge length prescribed by the solver
-      double length = solver->prescribedEdgeLength(solver_Id);
-
-      // fill in the size field
-      sizeField->setSize((pEntity)pv, length);
-    }
-  VIter_delete(vit);
-}
-
-//-----------------------------------------------------------------------------
-void MAdLibInterface::attachSolutionToMesh(MAd::pMesh MAdMesh)
-{
-  // Get the solution database. Here we assume that it is a nodal solution.
-  const Solver_solution * solution = solver->getSolution();
-
-  // The data id used to identify the data attached to mesh entities
-  pMeshDataId dataId = MD_lookupMeshDataId("SolutionTag");
-
-  VIter vit = M_vertexIter(MAdMesh);
-  while (pVertex pv = VIter_next(vit))
-    {
-      // get solver point id
-      int MAd_Id = EN_id((pEntity)pv);
-      int solver_Id = MAdToSolverIds[MAd_Id];
-      
-      double data = (*solution)[solver_Id];
-      
-      // attach data to the mesh vertex
-      EN_attachDataDbl((pEntity)pv,dataId,data);
-    }
-  VIter_delete(vit);
-}
-
-//-----------------------------------------------------------------------------
-void MAdLibInterface::getSolutionFromMesh(MAd::pMesh MAdMesh)
-{
-  // Get the solution database. Here we assume that it is a nodal solution.
-  Solver_solution * solution = solver->getSolution();
-
-  // The data id used to identify the data attached to mesh entities
-  pMeshDataId dataId = MD_lookupMeshDataId("SolutionTag");
-
-  VIter vit = M_vertexIter(MAdMesh);
-  while (pVertex pv = VIter_next(vit))
-    {
-      // get solver point id
-      pPoint pp = V_point(pv);
-      int MAdId = P_id(pp);
-      int solver_Id = MAdToSolverIds[MAdId];
-      
-      // get attached data and delete it
-      double data;
-      EN_getDataDbl((pEntity)pv,dataId,&data);
-      EN_deleteData((pEntity)pv,dataId);
-      
-      *(*solution)[solver_Id] = data;
-    }
-  VIter_delete(vit);
-}
-
-//-----------------------------------------------------------------------------
diff --git a/Tutorial/MAdLibInterface.h b/Tutorial/MAdLibInterface.h
deleted file mode 100644
index c80f187..0000000
--- a/Tutorial/MAdLibInterface.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// -*- C++ -*-
-// -------------------------------------------------------------------
-// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-//
-// See the Copyright.txt and License.txt files for license information. 
-// You should have received a copy of these files along with MAdLib. 
-// If not, see <http://www.madlib.be/license/>
-//
-// Please report all bugs and problems to <contrib at madlib.be>
-// -------------------------------------------------------------------
-// Author: Gaetan Compere
-//
-// This file provides an example of an interface to MAdLib as it 
-// could be implemented in a physical solver requiring mesh adaptivity.
-// -------------------------------------------------------------------
-
-#ifndef __MADLIBINTERFACE_H
-#define __MADLIBINTERFACE_H
-
-#include "ModelInterface.h"
-#include "MeshDataBaseInterface.h"
-#include "AdaptInterface.h"
-#include "PWLinearSField.h"
-#include <utility>
-#include <set>
-
-//-----------------------------------------------------------------------------
-// For this example, what is needed in the solver side ?
-//-----------------------------------------------------------------------------
-
-/*
-Solver class containing the solver geometrical model if any.
-  ( Note that all the steps involving geometrical entities can be
-    replaced by appropriate constraints on boundary mesh entities
-    (see AdaptInterface.h) but no mesh modification will therefore
-    be applied on the boundaries, which can be problematic for some
-    computations. )
-*/
-class Solver_model
-{
-public:
-  void addGeoEntity(int dim, int id);
-  std::set<std::pair<int,int> > getAllGeoEntities() const;
-  // return a set of pairs(dimension,id) 
-  // each pair representing a geometric entity.
-};
-
-/*
-  Solver class containing the solver mesh
-*/
-class Solver_mesh
-{
-public:
-  void allocate (int nNodes, int nElements) {}
-  void addNode (int id, double x, double y, double z) {}
-  void addElement (int id, int * nodes) {}
-  int getDim() const {return -1;}
-  int nVertices() const {return -1;}
-  int nElements() const {return -1;}
-  const double ** getCoordinates() const {return NULL;}
-  const int ** getElements() const {return NULL;}
-  const int * getElemGeoTags() const {return NULL;}
-};
-
-/*
-  Solver solution. We assume a nodal solution but the current example can be
-  easily extended to other discretizations.
-*/
-class Solver_solution
-{
-public:
-  double * operator[](int i) {return NULL;}
-  const double operator[](int i) const {return 0.;}
-};
-
-/*
-  Solver class containing pointers to solver data, solution and mesh
-*/
-class Solver
-{
-public:
-  Solver_model    * getModel()    {return model;}
-  Solver_mesh     * getMesh()     {return mesh;}
-  Solver_solution * getSolution() {return solution;}
-  void deleteMesh() {}
-  void deallocateSolution() {}
-  void allocateSolution() {}
-  // optional functions:
-  void deleteData() {}
-  void allocateAndComputeData() {}
-  double prescribedEdgeLength(int node) {return 0.;}
-private:
-  Solver_model    * model;
-  Solver_mesh     * mesh;
-  Solver_solution * solution;
-};
-
-//-----------------------------------------------------------------------------
-// Class interfacing MAdLib with 'Solver'
-//-----------------------------------------------------------------------------
-class MAdLibInterface {
-
-public:
-   
-  MAdLibInterface();
-  ~MAdLibInterface();
-
-  void adaptMesh();
-
-private:
-
-  // Mesh to mesh conversion
-  void importFromMAdMesh(const MAd::pMesh, Solver_mesh *);
-  void exportToMAdMesh(const Solver_mesh *, MAd::pMesh);
-  void importFromMAdModel(const MAd::pGModel, Solver_model *);
-  void exportToMAdModel(const Solver_model *, MAd::pGModel);
-
-  // Size field construction
-  void buildSizeField(MAd::PWLSField *);
-
-  // Solution to solution conversion
-  void attachSolutionToMesh(MAd::pMesh);
-  void getSolutionFromMesh(MAd::pMesh);
-
-private:
-
-  // The solver that needs mesh adaptivity
-  Solver * solver;
-
-  // Correspondancy tables between nodal id's in the solver
-  // and in the MAdLib mesh
-  std::map<int,int> MAdToSolverIds;
-  std::map<int,int> SolverToMAdIds;
-};
-
-//-----------------------------------------------------------------------------
-
-#endif
-
diff --git a/Tutorial/Makefile b/Tutorial/Makefile
deleted file mode 100644
index b32d126..0000000
--- a/Tutorial/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-# -------------------------------------------------------------------
-# MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
-#
-# See the Copyright.txt and License.txt files for license information. 
-# You should have received a copy of these files along with MAdLib. 
-# If not, see <http://www.madlib.be/license/>
-#
-# Please report all bugs and problems to <contrib at madlib.be>
-#
-# Authors: Gaetan Compere, Jean-Francois Remacle
-# -------------------------------------------------------------------
-
-include ../variables
-
-INC =  ${MAdLib_INCLUDES}\
-       ${DASH}I$(MAdROOT)/Tutorial\
-       ${DASH}I$(MAdROOT)/Geo\
-       ${DASH}I$(MAdROOT)/Mesh\
-       ${DASH}I$(MAdROOT)/Common\
-       ${DASH}I$(MAdROOT)/Adapt\
-       ${DASH}I$(MAdROOT)/Adapt/constraint\
-       ${DASH}I$(MAdROOT)/Adapt/operator\
-       ${DASH}I$(MAdROOT)/Adapt/output\
-       ${DASH}I$(MAdROOT)/Adapt/quality\
-       ${DASH}I$(MAdROOT)/Adapt/repositioning\
-       ${DASH}I$(MAdROOT)/Adapt/sizeField\
-       ${DASH}I$(MAdROOT)/Adapt/utils
-
-CXXFLAGS = ${OPTIM} ${MAdLib_DEFS} ${FLAGS} ${INC} ${SYSINCLUDE}
-
-SRC = MAdLibInterface.cc
-
-OBJ = ${SRC:.cc=${OBJEXT}}
-
-.SUFFIXES: ${OBJEXT} .cc
-
-.cc${OBJEXT}:
-	${CXX} ${CXXFLAGS} ${DASH}c $< ${DASH}o $@
-
-build: ${OBJ}
-
-clean:
-	${RM} */*.o *.o *.obj
-
-purge:
-
-depend:
-	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
-         ${CXX} -MM ${CXXFLAGS} ${SRC} | sed 's/.o:/$${OBJEXT}:/g' \
-        ) > Makefile.new
-	cp Makefile Makefile.bak
-	cp Makefile.new Makefile
-	rm -f Makefile.new
\ No newline at end of file
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..955b56d
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,956 @@
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
+[m4_warning([this file was generated for autoconf 2.64.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..f32079a
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1526 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-23'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[456])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..6759825
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1658 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-16'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+        mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
index 5dc1d33..40fda62 100755
--- a/configure
+++ b/configure
@@ -1,20 +1,22 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for MAdLib 1.2.3.
+# Generated by GNU Autoconf 2.64 for MAdLib 1.2.3.
 #
 # Report bugs to <contrib at madlib.be>.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
+#
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
 as_nl='
 '
 export as_nl
@@ -46,7 +40,13 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -57,7 +57,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
 	expr "X$arg" : "X\\(.*\\)$as_nl";
 	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -96,15 +89,15 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -116,12 +109,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
@@ -133,330 +130,300 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
 # CDPATH.
-$as_unset CDPATH
-
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
 else
-  as_have_required=no
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-
-  if test $as_have_required = yes &&	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
 
 exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
 else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_have_required=no
 fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
 else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  case $as_dir in
+  as_found=:
+  case $as_dir in #(
 	 /*)
 	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
 	   done;;
        esac
+  as_found=false
 done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
 IFS=$as_save_IFS
 
 
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-	done
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+	# neutralization value for shells without unset; and this also
+	# works around shells that cannot unset nonexistent variables.
+	BASH_ENV=/dev/null
+	ENV=/dev/null
+	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
 	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 fi
 
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and contrib at madlib.be
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
 fi
-
-
 fi
-
 fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
 
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
 
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
 
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
 
-exitcode=0
-if as_func_success; then
-  :
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
 else
-  exitcode=1
-  echo as_func_success failed.
-fi
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
 
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
 
-if as_func_ret_success; then
-  :
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
 else
-  exitcode=1
-  echo as_func_ret_success failed.
+  as_expr=false
 fi
 
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
 fi
 
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
 else
-  exitcode=1
-  echo positional parameters were not saved.
+  as_dirname=false
 fi
 
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf at gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
-}
-
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
   sed -n '
     p
     /[$]LINENO/=
@@ -473,8 +440,7 @@ test \$exitcode = 0") || {
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
@@ -484,29 +450,18 @@ test \$exitcode = 0") || {
   exit
 }
 
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
 
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
@@ -536,7 +491,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
@@ -555,10 +510,10 @@ else
       if test -d "$1"; then
 	test -d "$1/.";
       else
-	case $1 in
+	case $1 in #(
 	-*)set "./$1";;
 	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 	???[sx]*):;;*)false;;esac;fi
     '\'' sh
   '
@@ -573,6 +528,154 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+$*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
+
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
+
+	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "$0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
 exec 7<&0 </dev/null 6>&1
 
 # Name of the host.
@@ -591,7 +694,6 @@ cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='MAdLib'
@@ -599,6 +701,7 @@ PACKAGE_TARNAME='madlib'
 PACKAGE_VERSION='1.2.3'
 PACKAGE_STRING='MAdLib 1.2.3'
 PACKAGE_BUGREPORT='contrib at madlib.be'
+PACKAGE_URL=''
 
 # Factoring default headers for most tests.
 ac_includes_default="\
@@ -636,32 +739,60 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
 LIBOBJS
+allincludedir
+MAdLib_LIBADD
 MAdLib_BENCHDIRS
 MAdLib_INCLUDES
 MAdLib_LIBS
 MAdLib_DIRS
-MAdLib_TMPDIR
-MAdROOT
 MAdLib_DEFS
-LIBEXT
 LINKER
-OPTIM
-FLAGS
 HOSTNAME
 UNAME
+RM
 DOXYGEN
 DOX
-EGREP
-GREP
 CXXCPP
-AR
-RANLIB
-CPP
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
 ac_ct_CXX
 CXXFLAGS
 CXX
+Extended_API_FALSE
+Extended_API_TRUE
+CPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
 OBJEXT
 EXEEXT
 ac_ct_CC
@@ -669,6 +800,38 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
 target_alias
 host_alias
 build_alias
@@ -699,6 +862,7 @@ bindir
 program_transform_name
 prefix
 exec_prefix
+PACKAGE_URL
 PACKAGE_BUGREPORT
 PACKAGE_STRING
 PACKAGE_VERSION
@@ -709,6 +873,13 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+enable_dependency_tracking
+with_gnu_ld
+enable_libtool_lock
 with_blas_lapack_prefix
 with_mpi_prefix
 with_autopack_prefix
@@ -730,6 +901,9 @@ enable_gmsh
 enable_occ
 enable_petsc
 enable_parser
+enable_benchmarks
+enable_moveIt
+enable_API_extended
 '
       ac_precious_vars='build_alias
 host_alias
@@ -739,10 +913,10 @@ CFLAGS
 LDFLAGS
 LIBS
 CPPFLAGS
+CPP
 CXX
 CXXFLAGS
 CCC
-CPP
 CXXCPP'
 
 
@@ -852,8 +1026,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -879,8 +1052,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1084,8 +1256,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1101,8 +1272,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
-   { (exit 1); exit 1; }; }
+      as_fn_error "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1132,17 +1302,17 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information."
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+    esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
@@ -1159,15 +1329,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
+    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1190,8 +1358,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1221,11 +1388,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1264,13 +1429,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1352,6 +1515,15 @@ Fine tuning of the installation directories:
 _ACEOF
 
   cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 _ACEOF
 fi
 
@@ -1365,6 +1537,13 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-static[=PKGS]  build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-blas-lapack    use Blas/Lapack for linear algebra (default=yes)
   --enable-ann            use ANN library (default=no)
   --enable-mathex         use Mathex library (default=yes)
@@ -1378,10 +1557,19 @@ Optional Features:
   --enable-petsc          use PETSc if available (default=no)
   --enable-parser         use Parser (restricted, CENAERO, Belgium) if
                           available (default=no)
+  --enable-benchmarks     Compile all benchmark executables: checkMesh,
+                          optimize, meshInfo, moveIt (default=no)
+  --enable-moveIt         Compile moveIt, the main benchmark executable
+                          (default=no)
+  --enable-extendedAPI    Whether all header files are included in the API or
+                          not (default=no)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-blas-lapack-prefix=PFX
                           prefix where BLAS and LAPACK are installed
   --with-mpi-prefix=PFX   prefix where MPI is installed
@@ -1406,9 +1594,9 @@ Some influential environment variables:
   LIBS        libraries to pass to the linker, e.g. -l<library>
   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
-  CPP         C preprocessor
   CXXCPP      C++ preprocessor
 
 Use these variables to override the choices made by `configure' or to help
@@ -1478,21 +1666,719 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 MAdLib configure 1.2.3
-generated by GNU Autoconf 2.63
+generated by GNU Autoconf 2.64
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_cxx_try_link
+
+# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
+# ---------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_cxx_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## -------------------------------- ##
+## Report this to contrib at madlib.be ##
+## -------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_cxx_check_header_mongrel
+
+# ac_fn_cxx_try_run LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_cxx_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_cxx_try_run
+
+# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
+# ----------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_cxx_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_cxx_compute_int
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by MAdLib $as_me 1.2.3, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+generated by GNU Autoconf 2.64.  Invocation command line was
 
   $ $0 $@
 
@@ -1528,8 +2414,8 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 } >&5
@@ -1566,9 +2452,9 @@ do
       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
     2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      as_fn_append ac_configure_args1 " '$ac_arg'"
       if test $ac_must_keep_next = true; then
 	ac_must_keep_next=false # Got value, back to normal.
       else
@@ -1584,13 +2470,13 @@ do
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
+      as_fn_append ac_configure_args " '$ac_arg'"
       ;;
     esac
   done
 done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
 
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
@@ -1615,13 +2501,13 @@ _ASBOX
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -1693,39 +2579,41 @@ _ASBOX
     exit $exit_status
 ' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -f -r conftest* confdefs.h
 
+$as_echo "/* confdefs.h */" > confdefs.h
+
 # Predefined preprocessor variables.
 
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_NAME "$PACKAGE_NAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION "$PACKAGE_VERSION"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_STRING "$PACKAGE_STRING"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 _ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer an explicitly selected file to automatically selected ones.
@@ -1744,7 +2632,7 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
   test "x$ac_site_file" = xNONE && continue
   if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
@@ -1755,7 +2643,7 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
 $as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
@@ -1763,7 +2651,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;}
     esac
   fi
 else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
 $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -1778,11 +2666,11 @@ for ac_var in $ac_precious_vars; do
   eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
@@ -1792,17 +2680,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
 	ac_old_val_w=`echo x $ac_old_val`
 	ac_new_val_w=`echo x $ac_new_val`
 	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
 	  ac_cache_corrupted=:
 	else
-	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
 	  eval $ac_var=\$ac_old_val
 	fi
-	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
       fi;;
   esac
@@ -1814,200 +2702,688 @@ $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
     esac
     case " $ac_configure_args " in
       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
     esac
   fi
 done
 if $ac_cache_corrupted; then
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+am__api_version='1.11'
 
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  for ac_t in install-sh install.sh shtool; do
+    if test -f "$ac_dir/$ac_t"; then
+      ac_aux_dir=$ac_dir
+      ac_install_sh="$ac_aux_dir/$ac_t -c"
+      break 2
+    fi
+  done
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
 
+  done
+IFS=$as_save_IFS
 
+rm -rf conftest.one conftest.two conftest.dir
 
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
 
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
 
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
 
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
 
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
 
+fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
 
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-# Check whether --with-blas-lapack-prefix was given.
-if test "${with_blas_lapack_prefix+set}" = set; then
-  withval=$with_blas_lapack_prefix; BLAS_LAPACK_PREFIX=$withval
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
-# Check whether --with-mpi-prefix was given.
-if test "${with_mpi_prefix+set}" = set; then
-  withval=$with_mpi_prefix; MPI_PREFIX=$withval
-fi
+  test -n "$AWK" && break
+done
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
 
-# Check whether --with-autopack-prefix was given.
-if test "${with_autopack_prefix+set}" = set; then
-  withval=$with_autopack_prefix; AUTOPACK_PREFIX=$withval
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
 fi
+rmdir .tst 2>/dev/null
 
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
 
-# Check whether --with-metis-prefix was given.
-if test "${with_metis_prefix+set}" = set; then
-  withval=$with_metis_prefix; METIS_PREFIX=$withval
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
 fi
 
 
-# Check whether --with-parmetis-prefix was given.
-if test "${with_parmetis_prefix+set}" = set; then
-  withval=$with_parmetis_prefix; PARMETIS_PREFIX=$withval
-fi
+# Define the identity of the package.
+ PACKAGE='madlib'
+ VERSION='1.2.3'
 
 
-# Check whether --with-gmsh-prefix was given.
-if test "${with_gmsh_prefix+set}" = set; then
-  withval=$with_gmsh_prefix; GMSH_PREFIX=$withval
-fi
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
 
 
-# Check whether --with-occ-prefix was given.
-if test "${with_occ_prefix+set}" = set; then
-  withval=$with_occ_prefix; OCC_PREFIX=$withval
-fi
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
 
+# Some tools Automake needs.
 
-# Check whether --with-sparskit-prefix was given.
-if test "${with_sparskit_prefix+set}" = set; then
-  withval=$with_sparskit_prefix; SPARSKIT_PREFIX=$withval
-fi
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
 
 
-# Check whether --with-petsc-prefix was given.
-if test "${with_petsc_prefix+set}" = set; then
-  withval=$with_petsc_prefix; PETSC_PREFIX=$withval
-fi
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
 
 
-# Check whether --with-parser-prefix was given.
-if test "${with_parser_prefix+set}" = set; then
-  withval=$with_parser_prefix; PARSER_PREFIX=$withval
-fi
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
 
 
-# Check whether --enable-blas-lapack was given.
-if test "${enable_blas_lapack+set}" = set; then
-  enableval=$enable_blas_lapack;
-fi
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
-# Check whether --enable-ann was given.
-if test "${enable_ann+set}" = set; then
-  enableval=$enable_ann;
-fi
 
-# Check whether --enable-mathex was given.
-if test "${enable_mathex+set}" = set; then
-  enableval=$enable_mathex;
-fi
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-# Check whether --enable-mpi was given.
-if test "${enable_mpi+set}" = set; then
-  enableval=$enable_mpi;
-fi
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
 
-# Check whether --enable-metis was given.
-if test "${enable_metis+set}" = set; then
-  enableval=$enable_metis;
-fi
+AMTAR=${AMTAR-"${am_missing_run}tar"}
 
-# Check whether --enable-parmetis was given.
-if test "${enable_parmetis+set}" = set; then
-  enableval=$enable_parmetis;
-fi
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
 
-# Check whether --enable-gmm was given.
-if test "${enable_gmm+set}" = set; then
-  enableval=$enable_gmm;
-fi
 
-# Check whether --enable-gmsh was given.
-if test "${enable_gmsh+set}" = set; then
-  enableval=$enable_gmsh;
-fi
 
-# Check whether --enable-occ was given.
-if test "${enable_occ+set}" = set; then
-  enableval=$enable_occ;
-fi
 
-# Check whether --enable-petsc was given.
-if test "${enable_petsc+set}" = set; then
-  enableval=$enable_petsc;
-fi
 
-# Check whether --enable-parser was given.
-if test "${enable_parser+set}" = set; then
-  enableval=$enable_parser;
-fi
 
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
 
-if test "x$enable_ann" != "xyes"; then
-  enable_ann=no;
-fi
-if test "x$enable_mpi" != "xyes"; then
-  enable_mpi=no;
-fi
-if test "x$enable_metis" != "xyes"; then
-  enable_metis=no;
-fi
-if test "x$enable_parmetis" != "xyes"; then
-  enable_parmetis=no;
+
+
+macro_version='2.2.6'
+macro_revision='1.3012'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
-if test "x$enable_gmm" != "xyes"; then
-  enable_gmm=no;
+
 fi
-if test "x$enable_gmsh" != "xyes"; then
-  enable_gmsh=no;
-  enable_occ=no;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
-if test "x$enable_occ" != "xyes"; then
-  enable_occ=no;
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
 fi
-if test "x$enable_petsc" != "xyes"; then
-  enable_petsc=no;
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
 fi
-if test "x$enable_parser" != "xyes"; then
-  enable_parser=no;
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
 fi
 
-UNAME=`uname`
-HOSTNAME=`hostname`
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2017,9 +3393,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2030,24 +3406,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2057,9 +3433,9 @@ if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2070,24 +3446,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2096,7 +3472,7 @@ fi
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -2110,9 +3486,9 @@ if test -z "$CC"; then
           if test -n "$ac_tool_prefix"; then
     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2123,24 +3499,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2150,9 +3526,9 @@ fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2164,18 +3540,18 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
@@ -2194,10 +3570,10 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2209,9 +3585,9 @@ if test -z "$CC"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_CC+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -2222,24 +3598,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
 $as_echo "$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2253,9 +3629,9 @@ if test -z "$CC"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -2266,24 +3642,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
 $as_echo "$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -2296,7 +3672,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -2307,73 +3683,55 @@ fi
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
 
 # Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
+#include <stdio.h>
 int
 main ()
 {
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
 
   ;
   return 0;
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
 $as_echo_n "checking for C compiler default output file name... " >&6; }
 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
 
@@ -2390,17 +3748,17 @@ do
 done
 rm -f $ac_rmfiles
 
-if { (ac_try="$ac_link_default"
+if { { ac_try="$ac_link_default"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
@@ -2417,7 +3775,7 @@ do
 	# certainly right.
 	break;;
     *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
 	then :; else
 	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	fi
@@ -2436,84 +3794,75 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
 else
   ac_file=''
 fi
-
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
 $as_echo "$ac_file" >&6; }
-if test -z "$ac_file"; then
+if test -z "$ac_file"; then :
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+{ as_fn_set_status 77
+as_fn_error "C compiler cannot create executables
+See \`config.log' for more details." "$LINENO" 5; }; }
 fi
-
 ac_exeext=$ac_cv_exeext
 
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
 $as_echo_n "checking whether the C compiler works... " >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (case "(($ac_try" in
+  { { case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
+as_fn_error "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+See \`config.log' for more details." "$LINENO" 5; }
     fi
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
 ac_clean_files=$ac_clean_files_save
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
 $as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
 $as_echo "$cross_compiling" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
 $as_echo_n "checking for suffix of executables... " >&6; }
-if { (ac_try="$ac_link"
+if { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 # work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2528,32 +3877,24 @@ for ac_file in conftest.exe conftest conftest.*; do
   esac
 done
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." "$LINENO" 5; }
 fi
-
 rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
 $as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then
+if test "${ac_cv_objext+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2565,17 +3906,17 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+if { { ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
@@ -2588,31 +3929,23 @@ else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." "$LINENO" 5; }
 fi
-
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
 $as_echo "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2626,37 +3959,16 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
 if test $ac_compiler_gnu = yes; then
   GCC=yes
@@ -2665,20 +3977,31 @@ else
 fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
+if test "${ac_cv_prog_cc_g+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
    CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2689,35 +4012,2759 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+  # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+  # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:4866: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
+  (eval echo "\"\$as_me:4869: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:4872: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK '"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 6078 "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2728,82 +6775,4703 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+	LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[012]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in dlfcn.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+  enable_win32_dll=no
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7608: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7612: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-qpic'
+	lt_prog_compiler_static='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7947: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7951: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8052: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:8056: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8107: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:8111: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec=
+	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+	link_all_deplibs=no
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      export_dynamic_flag_spec='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+  else
+  ld_shlibs=no
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld='+b $libdir'
+	hardcode_libdir_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	hardcode_direct_absolute=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
 
-	ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+    ;;
+
+  *)
+    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_shl_load=yes
+else
+  ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dl_dlopen=yes
+else
+  ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
 int
 main ()
 {
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_svld_dlopen=yes
+else
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dld_dld_link=yes
+else
+  ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 10487 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 10583 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}
+_LT_EOF
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+  # Report which library types will actually be built
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+
+# Check whether --with-blas-lapack-prefix was given.
+if test "${with_blas_lapack_prefix+set}" = set; then :
+  withval=$with_blas_lapack_prefix; BLAS_LAPACK_PREFIX=$withval
+fi
+
+
+# Check whether --with-mpi-prefix was given.
+if test "${with_mpi_prefix+set}" = set; then :
+  withval=$with_mpi_prefix; MPI_PREFIX=$withval
+fi
+
+
+# Check whether --with-autopack-prefix was given.
+if test "${with_autopack_prefix+set}" = set; then :
+  withval=$with_autopack_prefix; AUTOPACK_PREFIX=$withval
+fi
+
+
+# Check whether --with-metis-prefix was given.
+if test "${with_metis_prefix+set}" = set; then :
+  withval=$with_metis_prefix; METIS_PREFIX=$withval
+fi
+
+
+# Check whether --with-parmetis-prefix was given.
+if test "${with_parmetis_prefix+set}" = set; then :
+  withval=$with_parmetis_prefix; PARMETIS_PREFIX=$withval
+fi
+
+
+# Check whether --with-gmsh-prefix was given.
+if test "${with_gmsh_prefix+set}" = set; then :
+  withval=$with_gmsh_prefix; GMSH_PREFIX=$withval
+fi
+
+
+# Check whether --with-occ-prefix was given.
+if test "${with_occ_prefix+set}" = set; then :
+  withval=$with_occ_prefix; OCC_PREFIX=$withval
+fi
+
+
+# Check whether --with-sparskit-prefix was given.
+if test "${with_sparskit_prefix+set}" = set; then :
+  withval=$with_sparskit_prefix; SPARSKIT_PREFIX=$withval
+fi
+
+
+# Check whether --with-petsc-prefix was given.
+if test "${with_petsc_prefix+set}" = set; then :
+  withval=$with_petsc_prefix; PETSC_PREFIX=$withval
+fi
+
+
+# Check whether --with-parser-prefix was given.
+if test "${with_parser_prefix+set}" = set; then :
+  withval=$with_parser_prefix; PARSER_PREFIX=$withval
+fi
+
+
+# Check whether --enable-blas-lapack was given.
+if test "${enable_blas_lapack+set}" = set; then :
+  enableval=$enable_blas_lapack;
+fi
+
+# Check whether --enable-ann was given.
+if test "${enable_ann+set}" = set; then :
+  enableval=$enable_ann;
+fi
+
+# Check whether --enable-mathex was given.
+if test "${enable_mathex+set}" = set; then :
+  enableval=$enable_mathex;
+fi
+
+# Check whether --enable-mpi was given.
+if test "${enable_mpi+set}" = set; then :
+  enableval=$enable_mpi;
+fi
+
+# Check whether --enable-metis was given.
+if test "${enable_metis+set}" = set; then :
+  enableval=$enable_metis;
+fi
+
+# Check whether --enable-parmetis was given.
+if test "${enable_parmetis+set}" = set; then :
+  enableval=$enable_parmetis;
+fi
+
+# Check whether --enable-gmm was given.
+if test "${enable_gmm+set}" = set; then :
+  enableval=$enable_gmm;
+fi
+
+# Check whether --enable-gmsh was given.
+if test "${enable_gmsh+set}" = set; then :
+  enableval=$enable_gmsh;
+fi
+
+# Check whether --enable-occ was given.
+if test "${enable_occ+set}" = set; then :
+  enableval=$enable_occ;
+fi
+
+# Check whether --enable-petsc was given.
+if test "${enable_petsc+set}" = set; then :
+  enableval=$enable_petsc;
+fi
+
+# Check whether --enable-parser was given.
+if test "${enable_parser+set}" = set; then :
+  enableval=$enable_parser;
+fi
+
+# Check whether --enable-benchmarks was given.
+if test "${enable_benchmarks+set}" = set; then :
+  enableval=$enable_benchmarks;
+fi
+
+# Check whether --enable-moveIt was given.
+if test "${enable_moveIt+set}" = set; then :
+  enableval=$enable_moveIt;
+fi
+
+# Check whether --enable-API-extended was given.
+if test "${enable_API_extended+set}" = set; then :
+  enableval=$enable_API_extended;
+fi
+
+
+if test "x$enable_ann" != "xyes"; then
+  enable_ann=no;
+fi
+if test "x$enable_mpi" != "xyes"; then
+  enable_mpi=no;
+fi
+if test "x$enable_metis" != "xyes"; then
+  enable_metis=no;
+fi
+if test "x$enable_parmetis" != "xyes"; then
+  enable_parmetis=no;
+fi
+if test "x$enable_gmm" != "xyes"; then
+  enable_gmm=no;
+fi
+if test "x$enable_gmsh" != "xyes"; then
+  enable_gmsh=no;
+  enable_occ=no;
+fi
+if test "x$enable_occ" != "xyes"; then
+  enable_occ=no;
+fi
+if test "x$enable_petsc" != "xyes"; then
+  enable_petsc=no;
+fi
+if test "x$enable_parser" != "xyes"; then
+  enable_parser=no;
+fi
+if test "x$enable_benchmarks" != "xyes"; then
+  enable_benchmarks=no;
+fi
+if test "x$enable_moveIt" != "xyes"; then
+  enable_moveIt=no;
+fi
+if test "x$enable_extendedAPI" != "xyes"; then
+  enable_extendedAPI=no;
+fi
+
+
+$as_echo "#define HAVE_64BIT_SIZE_T /**/" >>confdefs.h
+
+
+$as_echo "#define HAVE_BLAS /**/" >>confdefs.h
+
+
+$as_echo "#define HAVE_LAPACK /**/" >>confdefs.h
+
+
+$as_echo "#define HAVE_NO_DLL /**/" >>confdefs.h
+
+
+$as_echo "#define HAVE_NO_SOCKLEN_T /**/" >>confdefs.h
+
+
+$as_echo "#define PARALLEL /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_ANN_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_BLAS_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_GMM_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_GMSH_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_MATHEX_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_METIS_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_MPI_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_OCC_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_PARMETIS_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_PARSER_ /**/" >>confdefs.h
+
+
+$as_echo "#define _HAVE_PETSC_ /**/" >>confdefs.h
+
+
+ if test "x${enable_extendedAPI}" = "xyes"; then
+  Extended_API_TRUE=
+  Extended_API_FALSE='#'
+else
+  Extended_API_TRUE='#'
+  Extended_API_FALSE=
+fi
+
+
+abssrcdir="../$srcdir"
+
+UNAME=`uname`
+HOSTNAME=`hostname`
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "no acceptable C compiler found in \$PATH
+See \`config.log' for more details." "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_prog_cc_g=yes
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
 fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
 $as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
@@ -2820,18 +11488,14 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
@@ -2888,32 +11552,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
 	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+  if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_c89=$ac_arg
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
@@ -2924,17 +11565,19 @@ fi
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
 $as_echo "none needed" >&6; } ;;
   xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
 $as_echo "unsupported" >&6; } ;;
   *)
     CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2942,6 +11585,133 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2956,9 +11726,9 @@ if test -z "$CXX"; then
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then
+if test "${ac_cv_prog_CXX+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -2969,24 +11739,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
 $as_echo "$CXX" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -3000,9 +11770,9 @@ if test -z "$CXX"; then
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -3013,24 +11783,24 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
 $as_echo "$ac_ct_CXX" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
@@ -3043,7 +11813,7 @@ done
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
@@ -3054,53 +11824,36 @@ fi
   fi
 fi
 # Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
 set X $ac_compile
 ac_compiler=$2
-{ (ac_try="$ac_compiler --version >&5"
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler --version >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -v >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compiler -V >&5") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3114,37 +11867,16 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
 if test $ac_compiler_gnu = yes; then
   GXX=yes
@@ -3153,20 +11885,16 @@ else
 fi
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
    ac_cxx_werror_flag=yes
    ac_cv_prog_cxx_g=no
    CXXFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3177,35 +11905,27 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
   ac_cv_prog_cxx_g=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-	CXXFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3216,36 +11936,350 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  :
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    rm -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -3256,42 +12290,48 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
+if ac_fn_cxx_try_compile "$LINENO"; then :
   ac_cv_prog_cxx_g=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main ()
+{
 
-fi
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
 $as_echo "$ac_cv_prog_cxx_g" >&6; }
 if test "$ac_test_CXXFLAGS" = set; then
   CXXFLAGS=$ac_save_CXXFLAGS
@@ -3314,26 +12354,3135 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+  _lt_caught_CXX_error=yes
+fi
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec_CXX='$convenience'
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+        # as there is no search path for DLLs.
+        hardcode_libdir_flag_spec_CXX='-L$libdir'
+        allow_undefined_flag_CXX=unsupported
+        always_export_symbols_CXX=no
+        enable_shared_with_static_runtimes_CXX=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          ld_shlibs_CXX=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  whole_archive_flag_spec_CXX=''
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+
+  else
+  ld_shlibs_CXX=no
+  fi
+
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[12]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
+
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      old_archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
+
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
+
+	    output_verbose_link_cmd='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd* | netbsdelf*-gnu)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14374: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14378: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14473: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14477: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14525: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14529: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  linux* | k*bsd*-gnu)
+    link_all_deplibs_CXX=no
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[4-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+  shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
 if test "x${CC}" = "x" -o "x${CXX}" = "x" ; then
-  { { $as_echo "$as_me:$LINENO: error: Could not find required compilers, aborting." >&5
-$as_echo "$as_me: error: Could not find required compilers, aborting." >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "Could not find required compilers, aborting." "$LINENO" 5
 fi
 
 if test "x$enable_petsc" != "xno"; then
-
-{ $as_echo "$as_me:$LINENO: checking for main in -lpetsc" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpetsc" >&5
 $as_echo_n "checking for main in -lpetsc... " >&6; }
-if test "${ac_cv_lib_petsc_main+set}" = set; then
+if test "${ac_cv_lib_petsc_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpetsc -lpetsc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -3345,43 +15494,18 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_petsc_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_petsc_main=no
+  ac_cv_lib_petsc_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_petsc_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_petsc_main" >&5
 $as_echo "$ac_cv_lib_petsc_main" >&6; }
-if test "x$ac_cv_lib_petsc_main" = x""yes; then
+if test "x$ac_cv_lib_petsc_main" = x""yes; then :
   PETSC="yes"
 fi
 
@@ -3396,14 +15520,14 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
 $as_echo_n "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
+  if test "${ac_cv_prog_CPP+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -3418,11 +15542,7 @@ do
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -3431,78 +15551,34 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
 		     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
+if $ac_preproc_ok; then :
   break
 fi
 
@@ -3514,7 +15590,7 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
 $as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -3525,11 +15601,7 @@ do
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -3538,87 +15610,40 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
 		     Syntax error
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
 rm -f conftest.err conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
 rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+if $ac_preproc_ok; then :
+
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+as_fn_error "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3629,11 +15654,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 LINKER="${CXX}"
 
-FLAGS="-D_FORTIFY_SOURCE=0 -ansi "
-OPTIM="${CXXFLAGS}"
-CXXFLAGS=""
-
-MAdLib_DEFS=""
+CXXFLAGS="${CXXFLAGS} -D_FORTIFY_SOURCE=0 -ansi "
 
 case "$UNAME" in
   CYGWIN*)
@@ -3655,27 +15676,49 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
 
-MAdROOT=`pwd`
-MAdLib_TMPDIR="/tmp/$USER/MAdLib"
-MAdLib_DIRS="Common Geo Mesh Adapt"
-MAdLib_LIBS="-L${MAdROOT}/lib -lMAdLib"
-MAdLib_INCLUDES=""
-MAdLib_BENCHDIRS="Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize Benchmarks/moveIt"
-
+MAdLib_DEFS=""
 
+MAdLib_INCLUDES="       -I\$(top_srcdir)/Geo\
+       -I\$(top_srcdir)/Mesh\
+       -I\$(top_srcdir)/Common\
+       -I\$(top_srcdir)/Adapt\
+       -I\$(top_srcdir)/Adapt/constraint\
+       -I\$(top_srcdir)/Adapt/operator\
+       -I\$(top_srcdir)/Adapt/output\
+       -I\$(top_srcdir)/Adapt/quality\
+       -I\$(top_srcdir)/Adapt/repositioning\
+       -I\$(top_srcdir)/Adapt/sizeField\
+       -I\$(top_srcdir)/Adapt/utils"
+
+MAdLib_LIBADD="Common/libMAdCommon.la Geo/libMAdGeo.la Mesh/libMAdMesh.la Adapt/libMAdAdapt.la"
+
+MAdLib_LIBS="-L${libdir} -Wl,-rpath,${libdir} -lMAdLib"
+
+MAdLib_DIRS="Common/ Geo/ Mesh/ Adapt/ ."
+
+benchs=""
+MAdLib_BENCHDIRS=""
+if test "x$enable_benchmarks" != "xno"; then
+  MAdLib_BENCHDIRS="Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize Benchmarks/moveIt"
+  benchs="checkMesh, meshInfo, optimize, moveIt"
+  MAdLib_DIRS="${MAdLib_DIRS} Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize Benchmarks/moveIt"
+else
+  if test "x$enable_moveIt" != "xno"; then
+    MAdLib_BENCHDIRS="Benchmarks/moveIt"
+    benchs="moveIt"
+  else
+    benchs=""
+  fi
+fi
 
-{ $as_echo "$as_me:$LINENO: checking for main in -lm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
 $as_echo_n "checking for main in -lm... " >&6; }
-if test "${ac_cv_lib_m_main+set}" = set; then
+if test "${ac_cv_lib_m_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -3687,43 +15730,18 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_m_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_m_main=no
+  ac_cv_lib_m_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
 $as_echo "$ac_cv_lib_m_main" >&6; }
-if test "x$ac_cv_lib_m_main" = x""yes; then
+if test "x$ac_cv_lib_m_main" = x""yes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBM 1
 _ACEOF
@@ -3734,33 +15752,32 @@ fi
 
 
 if test "x$enable_gmm" != "xno"; then
-  { $as_echo "$as_me:$LINENO: checking for Contrib/gmm/gmm.h" >&5
-$as_echo_n "checking for Contrib/gmm/gmm.h... " >&6; }
-if test "${ac_cv_file_Contrib_gmm_gmm_h+set}" = set; then
+  as_ac_File=`$as_echo "ac_cv_file_${srcdir}/Contrib/gmm/gmm.h" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${srcdir}/Contrib/gmm/gmm.h" >&5
+$as_echo_n "checking for ${srcdir}/Contrib/gmm/gmm.h... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "Contrib/gmm/gmm.h"; then
-  ac_cv_file_Contrib_gmm_gmm_h=yes
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${srcdir}/Contrib/gmm/gmm.h"; then
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file_Contrib_gmm_gmm_h=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file_Contrib_gmm_gmm_h" >&5
-$as_echo "$ac_cv_file_Contrib_gmm_gmm_h" >&6; }
-if test "x$ac_cv_file_Contrib_gmm_gmm_h" = x""yes; then
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
   GMM="yes"
 fi
 
   if test "x${GMM}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_GMM_"
-    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MAdROOT}/Contrib/gmm"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_GMM_ 1
-_ACEOF
+    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${srcdir}/Contrib/gmm -I${abssrcdir}/Contrib/gmm"
+    $as_echo "#define _HAVE_GMM_ 1" >>confdefs.h
 
     BO="${BO} Gmm"
     echo "********************************************************************"
@@ -3774,46 +15791,40 @@ fi
 
 if test "x$enable_gmsh" != "xno"; then
   if test "x${GMSH_PREFIX}" != "x"; then
-    LDFLAGS="-L${GMSH_PREFIX} -L${GMSH_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${GMSH_PREFIX}/lib ${LDFLAGS}"
   fi
   as_ac_File=`$as_echo "ac_cv_file_"${GMSH_PREFIX}/include/gmsh/Gmsh.h"" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for \"${GMSH_PREFIX}/include/gmsh/Gmsh.h\"" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"${GMSH_PREFIX}/include/gmsh/Gmsh.h\"" >&5
 $as_echo_n "checking for \"${GMSH_PREFIX}/include/gmsh/Gmsh.h\"... " >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
 if test -r ""${GMSH_PREFIX}/include/gmsh/Gmsh.h""; then
   eval "$as_ac_File=yes"
 else
   eval "$as_ac_File=no"
 fi
 fi
-ac_res=`eval 'as_val=${'$as_ac_File'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_File'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
   GMSH="yes"
 fi
 
   if test "x${GMSH}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_GMSH_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_GMSH_ 1
-_ACEOF
+    $as_echo "#define _HAVE_GMSH_ 1" >>confdefs.h
 
     BO="${BO} Gmsh"
     if test "x${GMSH_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lGmsh"
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${GMSH_PREFIX} -L${GMSH_PREFIX}/lib -lGmsh"
-      FLAGS="${FLAGS} -I${GMSH_PREFIX} -I${GMSH_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${GMSH_PREFIX}/lib -Wl,-rpath,${GMSH_PREFIX}/lib -lGmsh"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${GMSH_PREFIX} -I${GMSH_PREFIX}/include"
     fi
     echo "********************************************************************"
     echo "  You are building a version of MAdLib that uses Gmsh and. Gmsh is "
@@ -3828,20 +15839,16 @@ fi
 
 if test "x$enable_occ" != "xno"; then
   if test "x${OCC_PREFIX}" != "x"; then
-    LDFLAGS="-L${OCC_PREFIX} -L${OCC_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${OCC_PREFIX}/lib ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lTKernel" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lTKernel" >&5
 $as_echo_n "checking for main in -lTKernel... " >&6; }
-if test "${ac_cv_lib_TKernel_main+set}" = set; then
+if test "${ac_cv_lib_TKernel_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lTKernel -lTKernel $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -3853,56 +15860,29 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_TKernel_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_TKernel_main=no
+  ac_cv_lib_TKernel_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_TKernel_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_TKernel_main" >&5
 $as_echo "$ac_cv_lib_TKernel_main" >&6; }
-if test "x$ac_cv_lib_TKernel_main" = x""yes; then
+if test "x$ac_cv_lib_TKernel_main" = x""yes; then :
   OCC="yes"
 fi
 
   if test "x${OCC}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_OCC_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_OCC_ 1
-_ACEOF
+    $as_echo "#define _HAVE_OCC_ 1" >>confdefs.h
 
     BO="${BO} OpenCascade"
     if test "x${OCC_PREFIX}" != "x"; then
-      MAdLib_LIBS="${MAdLib_LIBS} -L${OCC_PREFIX}/lib "
-      FLAGS="${FLAGS} -I${OCC_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${OCC_PREFIX}/lib -Wl,-rpath,${OCC_PREFIX}/lib"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${OCC_PREFIX}/include"
     fi
     # DataExchange (subset; see occ/ros/adm/make/Makefile for more info)
     MAdLib_LIBS="${MAdLib_LIBS} -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKIGES -lTKXSBase"
@@ -3913,44 +15893,40 @@ _ACEOF
     MAdLib_LIBS="${MAdLib_LIBS} -lTKBRep -lTKGeomBase -lTKG3d -lTKG2d"
     # FoundationClasses
     MAdLib_LIBS="${MAdLib_LIBS} -lTKAdvTools -lTKMath -lTKernel"
-
-    #MAdLib_LIBS="${MAdLib_LIBS} -lTKAdvTools -lTKBO -lTKBool -lTKBRep -lTKernel -lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIGES -lTKMath -lTKMesh -lTKOffset -lTKPrim -lTKShHealing -lTKSTEP209 -lTKSTEP -lTKSTEPAttr -lTKSTEPBase -lTKTopAlgo -lTKXSBase"
   fi
 fi
 
 if test "x$enable_ann" != "xno"; then
-  { $as_echo "$as_me:$LINENO: checking for Contrib/ANN/include/ANN/ANN.h" >&5
-$as_echo_n "checking for Contrib/ANN/include/ANN/ANN.h... " >&6; }
-if test "${ac_cv_file_Contrib_ANN_include_ANN_ANN_h+set}" = set; then
+  as_ac_File=`$as_echo "ac_cv_file_${srcdir}/Contrib/ANN/include/ANN/ANN.h" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${srcdir}/Contrib/ANN/include/ANN/ANN.h" >&5
+$as_echo_n "checking for ${srcdir}/Contrib/ANN/include/ANN/ANN.h... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "Contrib/ANN/include/ANN/ANN.h"; then
-  ac_cv_file_Contrib_ANN_include_ANN_ANN_h=yes
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${srcdir}/Contrib/ANN/include/ANN/ANN.h"; then
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file_Contrib_ANN_include_ANN_ANN_h=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file_Contrib_ANN_include_ANN_ANN_h" >&5
-$as_echo "$ac_cv_file_Contrib_ANN_include_ANN_ANN_h" >&6; }
-if test "x$ac_cv_file_Contrib_ANN_include_ANN_ANN_h" = x""yes; then
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
   ANN="yes"
 fi
 
   if test "x${ANN}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_ANN_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_ANN_ 1
-_ACEOF
+    $as_echo "#define _HAVE_ANN_ 1" >>confdefs.h
 
     BO="${BO} Ann"
     MAdLib_DIRS="Contrib/ANN ${MAdLib_DIRS}"
-    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MAdROOT}/Contrib/ANN/include"
-    MAdLib_LIBS="${MAdLib_LIBS} -lMAdANN"
-    FLAGS="${FLAGS} -I${MAdROOT}/Contrib/ANN/include"
+    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I\$(top_srcdir)/Contrib/ANN/include/ANN -I\$(top_srcdir)/Contrib/ANN/include/ANN -I\$(top_srcdir)/Contrib/ANN/src"
+    MAdLib_LIBADD="Contrib/ANN/libMAdANN.la ${MAdLib_LIBADD}"
     echo "********************************************************************"
     echo "  You are building a version of MAdLib that uses ANN, the"
     echo "  Approximate Nearest Neighbor library. ANN is available under the"
@@ -3961,33 +15937,32 @@ _ACEOF
 fi
 
 if test "x$enable_mathex" != "xno"; then
-  { $as_echo "$as_me:$LINENO: checking for Contrib/mathex/mathex.h" >&5
-$as_echo_n "checking for Contrib/mathex/mathex.h... " >&6; }
-if test "${ac_cv_file_Contrib_mathex_mathex_h+set}" = set; then
+  as_ac_File=`$as_echo "ac_cv_file_${srcdir}/Contrib/mathex/mathex.h" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${srcdir}/Contrib/mathex/mathex.h" >&5
+$as_echo_n "checking for ${srcdir}/Contrib/mathex/mathex.h... " >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
-  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "Contrib/mathex/mathex.h"; then
-  ac_cv_file_Contrib_mathex_mathex_h=yes
+  as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "${srcdir}/Contrib/mathex/mathex.h"; then
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file_Contrib_mathex_mathex_h=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_file_Contrib_mathex_mathex_h" >&5
-$as_echo "$ac_cv_file_Contrib_mathex_mathex_h" >&6; }
-if test "x$ac_cv_file_Contrib_mathex_mathex_h" = x""yes; then
+eval ac_res=\$$as_ac_File
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+eval as_val=\$$as_ac_File
+   if test "x$as_val" = x""yes; then :
   MATHEX="yes"
 fi
 
   if test "x${MATHEX}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_MATHEX_"
-    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MAdROOT}/Contrib/mathex"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_MATHEX_ 1
-_ACEOF
+    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${srcdir}/Contrib/mathex -I${abssrcdir}/Contrib/mathex"
+    $as_echo "#define _HAVE_MATHEX_ 1" >>confdefs.h
 
     BO="${BO} Mathex"
     echo "********************************************************************"
@@ -4000,20 +15975,16 @@ fi
 
 if test "x$enable_petsc" != "xno"; then
   if test "x${PETSC_PREFIX}" != "x"; then
-    LDFLAGS="-L${PETSC_PREFIX} -L${PETSC_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${PETSC_PREFIX}/lib ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lpetsc" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpetsc" >&5
 $as_echo_n "checking for main in -lpetsc... " >&6; }
-if test "${ac_cv_lib_petsc_main+set}" = set; then
+if test "${ac_cv_lib_petsc_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpetsc -lpetsc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -4025,78 +15996,47 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_petsc_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_petsc_main=no
+  ac_cv_lib_petsc_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_petsc_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_petsc_main" >&5
 $as_echo "$ac_cv_lib_petsc_main" >&6; }
-if test "x$ac_cv_lib_petsc_main" = x""yes; then
+if test "x$ac_cv_lib_petsc_main" = x""yes; then :
   PETSC="yes"
 fi
 
   if test "x${PETSC}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_PETSC_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_PETSC_ 1
-_ACEOF
+    $as_echo "#define _HAVE_PETSC_ 1" >>confdefs.h
 
     BO="${BO} PETSc"
     if test "x${PETSC_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lpetsc -lpetscksp -lpetscmat -lpetscvec "
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${PETSC_PREFIX} -L${PETSC_PREFIX}/lib -lpetsc -lpetscksp -lpetscmat -lpetscvec "
-      FLAGS="${FLAGS} -I${PETSC_PREFIX} -I${PETSC_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${PETSC_PREFIX}/lib -Wl,-rpath,${PETSC_PREFIX}/lib -lpetsc -lpetscksp -lpetscmat -lpetscvec "
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${PETSC_PREFIX} -I${PETSC_PREFIX}/include"
     fi
   fi
 fi
 
 if test "x$enable_metis" != "xno"; then
   if test "x${METIS_PREFIX}" != "x"; then
-    LDFLAGS="-L${METIS_PREFIX} -L${METIS_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${METIS_PREFIX} ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lmetis" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmetis" >&5
 $as_echo_n "checking for main in -lmetis... " >&6; }
-if test "${ac_cv_lib_metis_main+set}" = set; then
+if test "${ac_cv_lib_metis_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmetis -lmetis $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -4108,78 +16048,47 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_metis_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_metis_main=no
+  ac_cv_lib_metis_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_metis_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_metis_main" >&5
 $as_echo "$ac_cv_lib_metis_main" >&6; }
-if test "x$ac_cv_lib_metis_main" = x""yes; then
+if test "x$ac_cv_lib_metis_main" = x""yes; then :
   METIS="yes"
 fi
 
   if test "x${METIS}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_METIS_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_METIS_ 1
-_ACEOF
+    $as_echo "#define _HAVE_METIS_ 1" >>confdefs.h
 
     BO="${BO} Metis"
     if test "x${METIS_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lmetis"
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${METIS_PREFIX} -L${METIS_PREFIX}/lib -lmetis"
-      FLAGS="${FLAGS} -I${METIS_PREFIX} -I${METIS_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${METIS_PREFIX} -Wl,-rpath,${METIS_PREFIX} -lmetis"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${METIS_PREFIX}/Lib"
     fi
   fi
 fi
 
 if test "x$enable_parmetis" != "xno"; then
   if test "x${PARMETIS_PREFIX}" != "x"; then
-    LDFLAGS="-L${PARMETIS_PREFIX} -L${PARMETIS_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${PARMETIS_PREFIX} ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lmetis" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmetis" >&5
 $as_echo_n "checking for main in -lmetis... " >&6; }
-if test "${ac_cv_lib_metis_main+set}" = set; then
+if test "${ac_cv_lib_metis_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmetis -lmetis $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -4191,58 +16100,29 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_metis_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_metis_main=no
+  ac_cv_lib_metis_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_metis_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_metis_main" >&5
 $as_echo "$ac_cv_lib_metis_main" >&6; }
-if test "x$ac_cv_lib_metis_main" = x""yes; then
+if test "x$ac_cv_lib_metis_main" = x""yes; then :
   METIS="yes"
 fi
 
-  { $as_echo "$as_me:$LINENO: checking for main in -lparmetis" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lparmetis" >&5
 $as_echo_n "checking for main in -lparmetis... " >&6; }
-if test "${ac_cv_lib_parmetis_main+set}" = set; then
+if test "${ac_cv_lib_parmetis_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lparmetis -lparmetis $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -4254,59 +16134,32 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_parmetis_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_parmetis_main=no
+  ac_cv_lib_parmetis_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_parmetis_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_parmetis_main" >&5
 $as_echo "$ac_cv_lib_parmetis_main" >&6; }
-if test "x$ac_cv_lib_parmetis_main" = x""yes; then
+if test "x$ac_cv_lib_parmetis_main" = x""yes; then :
   PARMETIS="yes"
 fi
 
   if test "x${METIS}" = "xyes"; then
     if test "x${PARMETIS}" = "xyes"; then
       MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_PARMETIS_"
-      cat >>confdefs.h <<\_ACEOF
-#define _HAVE_PARMETIS_ 1
-_ACEOF
+      $as_echo "#define _HAVE_PARMETIS_ 1" >>confdefs.h
 
       BO="${BO} Parmetis"
       if test "x${PARMETIS_PREFIX}" = "x"; then
         MAdLib_LIBS="${MAdLib_LIBS} -lparmetis -lmetis"
       else
-        MAdLib_LIBS="${MAdLib_LIBS} -L${PARMETIS_PREFIX} -L${PARMETIS_PREFIX}/lib -lparmetis -lmetis"
-        FLAGS="${FLAGS} -I${PARMETIS_PREFIX} -I${PARMETIS_PREFIX}/include"
+        MAdLib_LIBS="${MAdLib_LIBS} -L${PARMETIS_PREFIX} -Wl,-rpath,${PARMETIS_PREFIX} -lparmetis -lmetis"
+        MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${PARMETIS_PREFIX}"
       fi
     fi
   fi
@@ -4316,18 +16169,14 @@ fi
   if test "x${BLAS_LAPACK_PREFIX}" != "x"; then
     LDFLAGS="-L${BLAS_LAPACK_PREFIX} -L${BLAS_LAPACK_PREFIX}/lib ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lcblas" >&5
 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; }
-if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then
+if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcblas  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4345,59 +16194,30 @@ return cblas_dgemm ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_cblas_cblas_dgemm=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_cblas_cblas_dgemm=no
+  ac_cv_lib_cblas_cblas_dgemm=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_dgemm" >&5
 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; }
-if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then
+if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then :
   CBLAS="yes" BLAS_LIBS="-lcblas"
 fi
 
   if test "x${CBLAS}" != "xyes"; then
-    { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lcblas" >&5
 $as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; }
-if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then
+if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcblas -latlas $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4415,79 +16235,46 @@ return cblas_dgemm ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_cblas_cblas_dgemm=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_cblas_cblas_dgemm=no
+  ac_cv_lib_cblas_cblas_dgemm=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_dgemm" >&5
 $as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; }
-if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then
+if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then :
   CBLAS="yes" BLAS_LIBS="-lcblas -latlas"
 fi
 
   fi
   if test "x${CBLAS}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_BLAS_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_BLAS_ 1
-_ACEOF
+    $as_echo "#define _HAVE_BLAS_ 1" >>confdefs.h
 
     BO="${BO} Cblas"
   else
     if test "x${GSL}" = "xyes"; then
             BLAS_LIBS="-lgslcblas"
       MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_BLAS_"
-      cat >>confdefs.h <<\_ACEOF
-#define _HAVE_BLAS_ 1
-_ACEOF
+      $as_echo "#define _HAVE_BLAS_ 1" >>confdefs.h
 
       BO="${BO} Cblas"
     fi
   fi
 
 if test "x${FM}" = "xyes" -o "x${GSL}" != "xyes"; then
-  { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ATL_xerbla in -latlas" >&5
 $as_echo_n "checking for ATL_xerbla in -latlas... " >&6; }
-if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then
+if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-latlas  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4505,55 +16292,26 @@ return ATL_xerbla ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_atlas_ATL_xerbla=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_atlas_ATL_xerbla=no
+  ac_cv_lib_atlas_ATL_xerbla=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_atlas_ATL_xerbla" >&5
 $as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; }
-if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then
-  { $as_echo "$as_me:$LINENO: checking for dgemm_ in -lf77blas" >&5
+if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgemm_ in -lf77blas" >&5
 $as_echo_n "checking for dgemm_ in -lf77blas... " >&6; }
-if test "${ac_cv_lib_f77blas_dgemm_+set}" = set; then
+if test "${ac_cv_lib_f77blas_dgemm_+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lf77blas -latlas $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4571,61 +16329,32 @@ return dgemm_ ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_f77blas_dgemm_=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_f77blas_dgemm_=no
+  ac_cv_lib_f77blas_dgemm_=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_f77blas_dgemm_" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_f77blas_dgemm_" >&5
 $as_echo "$ac_cv_lib_f77blas_dgemm_" >&6; }
-if test "x$ac_cv_lib_f77blas_dgemm_" = x""yes; then
+if test "x$ac_cv_lib_f77blas_dgemm_" = x""yes; then :
   BLAS="yes" BLAS_LIBS="${BLAS_LIBS} -lf77blas -latlas"
 fi
 
 fi
 
   if test "x${BLAS}" != "xyes"; then
-    { $as_echo "$as_me:$LINENO: checking for dgemm_ in -lblas" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgemm_ in -lblas" >&5
 $as_echo_n "checking for dgemm_ in -lblas... " >&6; }
-if test "${ac_cv_lib_blas_dgemm_+set}" = set; then
+if test "${ac_cv_lib_blas_dgemm_+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lblas  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4643,43 +16372,18 @@ return dgemm_ ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_blas_dgemm_=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_blas_dgemm_=no
+  ac_cv_lib_blas_dgemm_=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blas_dgemm_" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blas_dgemm_" >&5
 $as_echo "$ac_cv_lib_blas_dgemm_" >&6; }
-if test "x$ac_cv_lib_blas_dgemm_" = x""yes; then
+if test "x$ac_cv_lib_blas_dgemm_" = x""yes; then :
   BLAS="yes" BLAS_LIBS="${BLAS_LIBS} -lblas"
 fi
 
@@ -4687,23 +16391,17 @@ fi
   if test "x${BLAS}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_BLAS_"
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_BLAS"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLAS 1
-_ACEOF
+    $as_echo "#define HAVE_BLAS 1" >>confdefs.h
 
     BO="${BO} Blas"
-    { $as_echo "$as_me:$LINENO: checking for dbdsqr_ in -llapack" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbdsqr_ in -llapack" >&5
 $as_echo_n "checking for dbdsqr_ in -llapack... " >&6; }
-if test "${ac_cv_lib_lapack_dbdsqr_+set}" = set; then
+if test "${ac_cv_lib_lapack_dbdsqr_+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-llapack ${BLAS_LIBS} $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4721,52 +16419,25 @@ return dbdsqr_ ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_lapack_dbdsqr_=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_lapack_dbdsqr_=no
+  ac_cv_lib_lapack_dbdsqr_=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lapack_dbdsqr_" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lapack_dbdsqr_" >&5
 $as_echo "$ac_cv_lib_lapack_dbdsqr_" >&6; }
-if test "x$ac_cv_lib_lapack_dbdsqr_" = x""yes; then
+if test "x$ac_cv_lib_lapack_dbdsqr_" = x""yes; then :
   LAPACK="yes" BLAS_LIBS="-llapack ${BLAS_LIBS}"
 fi
 
     if test "x${LAPACK}" = "xyes"; then
       MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_LAPACK_"
       MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_LAPACK"
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_LAPACK 1
-_ACEOF
+      $as_echo "#define HAVE_LAPACK 1" >>confdefs.h
 
       BO="${BO} Lapack"
     fi
@@ -4785,78 +16456,24 @@ if test "x$enable_mpi" = "xyes"; then
   if test "x${MPI_PREFIX}" != "x"; then
     LDFLAGS="-L${MPI_PREFIX}/lib ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lmpi" >&5
-$as_echo_n "checking for main in -lmpi... " >&6; }
-if test "${ac_cv_lib_mpi_main+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmpi  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
+for ac_header in mpi.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default"
+if test "x$ac_cv_header_mpi_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MPI_H 1
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_mpi_main=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_mpi_main=no
+ MPI="yes"
 fi
 
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_main" >&5
-$as_echo "$ac_cv_lib_mpi_main" >&6; }
-if test "x$ac_cv_lib_mpi_main" = x""yes; then
-  MPI="yes"
-fi
+done
 
-  if test "x${MPI}" = "xyes"; then
+    if test "x${MPI}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_MPI_ -DPARALLEL"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_MPI_ 1
-_ACEOF
+    $as_echo "#define _HAVE_MPI_ 1" >>confdefs.h
 
-    cat >>confdefs.h <<\_ACEOF
-#define PARALLEL 1
-_ACEOF
+    $as_echo "#define PARALLEL 1" >>confdefs.h
 
     BO="${BO} Mpi"
     echo "********************************************************************"
@@ -4865,10 +16482,10 @@ _ACEOF
     echo "********************************************************************"
     if test "x${MPI_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lmpi"
-      FLAGS="${FLAGS} -I/usr/include/mpi"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I/usr/include/mpi"
     else
       MAdLib_LIBS="${MAdLib_LIBS} -L${MPI_PREFIX}/lib -lmpi"
-      FLAGS="${FLAGS} -I${MPI_PREFIX}/include"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MPI_PREFIX}/include"
     fi
   fi
 fi
@@ -4877,18 +16494,14 @@ if test "x$enable_mpi" = "xyes"; then
   if test "x${AUTOPACK_PREFIX}" != "x"; then
     LDFLAGS="-L${AUTOPACK_PREFIX}/lib ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lautopack" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lautopack" >&5
 $as_echo_n "checking for main in -lautopack... " >&6; }
-if test "${ac_cv_lib_autopack_main+set}" = set; then
+if test "${ac_cv_lib_autopack_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lautopack  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -4900,43 +16513,18 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_autopack_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_autopack_main=no
+  ac_cv_lib_autopack_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_autopack_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_autopack_main" >&5
 $as_echo "$ac_cv_lib_autopack_main" >&6; }
-if test "x$ac_cv_lib_autopack_main" = x""yes; then
+if test "x$ac_cv_lib_autopack_main" = x""yes; then :
   AUTOPACK="yes"
 fi
 
@@ -4946,7 +16534,7 @@ fi
       MAdLib_LIBS="${MAdLib_LIBS} -lautopack"
     else
       MAdLib_LIBS="${MAdLib_LIBS} -L${AUTOPACK_PREFIX}/lib -lautopack"
-      FLAGS="${FLAGS} -I${AUTOPACK_PREFIX}/include"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${AUTOPACK_PREFIX}/include"
     fi
   fi
 fi
@@ -4955,18 +16543,14 @@ if test "x$enable_parser" = "xyes"; then
   if test "x${PARSER_PREFIX}" != "x"; then
     LDFLAGS="-L${PARSER_PREFIX}/lib ${LDFLAGS}"
   fi
-  { $as_echo "$as_me:$LINENO: checking for main in -lParser" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lParser" >&5
 $as_echo_n "checking for main in -lParser... " >&6; }
-if test "${ac_cv_lib_Parser_main+set}" = set; then
+if test "${ac_cv_lib_Parser_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lParser  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -4978,217 +16562,35 @@ return main ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_lib_Parser_main=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_Parser_main=no
+  ac_cv_lib_Parser_main=no
 fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Parser_main" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Parser_main" >&5
 $as_echo "$ac_cv_lib_Parser_main" >&6; }
-if test "x$ac_cv_lib_Parser_main" = x""yes; then
+if test "x$ac_cv_lib_Parser_main" = x""yes; then :
   PARSER="yes"
 fi
 
   if test "x${PARSER}" = "xyes"; then
     BO="${BO} Parser"
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_PARSER_"
-    cat >>confdefs.h <<\_ACEOF
-#define _HAVE_PARSER_ 1
-_ACEOF
+    $as_echo "#define _HAVE_PARSER_ 1" >>confdefs.h
 
     if test "x${PARSER_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lParser"
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${PARSER_PREFIX}/lib -lParser"
-      FLAGS="${FLAGS} -I${PARSER_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${PARSER_PREFIX}/lib -Wl,-rpath,${PARSER_PREFIX}/lib -lParser"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${PARSER_PREFIX}/include"
     fi
   fi
 fi
 
-case "$UNAME" in
-  Darwin*)
-    RANLIB=true
-    AR="libtool -o"
-    LIBEXT=".a"
-    ;;
-  Linux*)
-    RANLIB=true
-    AR="${CXX} -shared -o"
-    LIBEXT=".so"
-    CXXFLAGS="${CXXFLAGS} -fPIC"
-    ;;
-  *)
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-    # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_AR+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  case $AR in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_AR="$AR" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-AR=$ac_cv_path_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:$LINENO: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    if test "x${AR}" = "x:"; then
-      { { $as_echo "$as_me:$LINENO: error: Could not find the library archiver, aborting." >&5
-$as_echo "$as_me: error: Could not find the library archiver, aborting." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-    AR="${AR} ruvs"
-    LIBEXT=".a"
-    ;;
-esac
-
 MAdLib_LIBS="${MAdLib_LIBS} -lm"
 
 case "$UNAME" in
@@ -5197,9 +16599,7 @@ case "$UNAME" in
             LINKER="${LINKER} -mwindows -Wl,--stack,16777216"
     if test "x$enable_cygwin" != "xyes"; then
       MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_DLL"
-      cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_DLL 1
-_ACEOF
+      $as_echo "#define HAVE_NO_DLL 1" >>confdefs.h
 
       BO="${BO} NoDll"
     fi
@@ -5213,13 +16613,11 @@ _ACEOF
 
   Darwin*)
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_DLL"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_DLL 1
-_ACEOF
+    $as_echo "#define HAVE_NO_DLL 1" >>confdefs.h
 
     BO="${BO} NoDll"
     if test "x$enable_universal" = "xyes"; then
-      FLAGS="-arch ppc -arch i386 ${FLAGS}"
+      CXXFLAGS="${CXXFLAGS} -arch ppc -arch i386"
     fi
     if test "x$enable_gui" = "xno"; then
       MAdLib_LIBS="${MAdLib_LIBS} -framework ApplicationServices"
@@ -5228,18 +16626,16 @@ _ACEOF
 
   AIX*)
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_DLL"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_DLL 1
-_ACEOF
+    $as_echo "#define HAVE_NO_DLL 1" >>confdefs.h
 
     BO="${BO} NoDll"
-    FLAGS="-D_BSD ${FLAGS}"
+    CXXFLAGS="${CXXFLAGS} -D_BSD"
     ;;
 
   IRIX*)
         case "${CXX}" in
       *CC*)
-                        FLAGS="-LANG:std -OPT:Olimit=0 -DOLDCINCLUDE ${FLAGS}"
+                        CXXFLAGS="{CXXFLAGS} -LANG:std -OPT:Olimit=0 -DOLDCINCLUDE"
         AR="${CXX} -ar -o"
         LINKER="${CXX}"
         ;;
@@ -5248,23 +16644,19 @@ _ACEOF
 
   OSF1*)
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_SOCKLEN_T"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_SOCKLEN_T 1
-_ACEOF
+    $as_echo "#define HAVE_NO_SOCKLEN_T 1" >>confdefs.h
 
     BO="${BO} NoSocklenT"
         case "${CXX}" in
       *cxx*)
-        FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
+        CXXFLAGS="${CXXFLAGS} -D__USE_STD_IOSTREAM"
         ;;
     esac
     ;;
 
   SunOS*)
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_DLL"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_DLL 1
-_ACEOF
+    $as_echo "#define HAVE_NO_DLL 1" >>confdefs.h
 
     BO="${BO} NoDll"
     MAdLib_LIBS="${MAdLib_LIBS} -lsocket -lnsl -ldl"
@@ -5272,983 +16664,38 @@ _ACEOF
 
   HP-UX*)
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_DLL"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_NO_DLL 1
-_ACEOF
+    $as_echo "#define HAVE_NO_DLL 1" >>confdefs.h
 
     BO="${BO} NoDll"
     ;;
 
 esac
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  :
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Broken: fails on valid input.
-continue
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  # Broken: success on invalid input.
-continue
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
 $as_echo_n "checking size of size_t... " >&6; }
-if test "${ac_cv_sizeof_size_t+set}" = set; then
+if test "${ac_cv_sizeof_size_t+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_lo=$ac_mid; break
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
+  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_size_t=$ac_lo;;
-'') if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+  if test "$ac_cv_type_size_t" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_size_t=0
-   fi ;;
-esac
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (size_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (size_t))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (size_t))))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (size_t))))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_size_t=`cat conftest.val`
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+{ as_fn_set_status 77
+as_fn_error "cannot compute sizeof (size_t)
+See \`config.log' for more details." "$LINENO" 5; }; }
    else
      ac_cv_sizeof_size_t=0
    fi
 fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
+
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
 $as_echo "$ac_cv_sizeof_size_t" >&6; }
 
 
@@ -6260,17 +16707,15 @@ _ACEOF
 
 if test $ac_cv_sizeof_size_t != 4; then
   if test $ac_cv_sizeof_size_t != 8; then
-    { $as_echo "$as_me:$LINENO: WARNING: Unsupported size of size_t - this may affect FNV hashing." >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unsupported size of size_t - this may affect FNV hashing." >&5
 $as_echo "$as_me: WARNING: Unsupported size of size_t - this may affect FNV hashing." >&2;}
   else
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_64BIT_SIZE_T"
-    cat >>confdefs.h <<\_ACEOF
-#define HAVE_64BIT_SIZE_T 1
-_ACEOF
+    $as_echo "#define HAVE_64BIT_SIZE_T 1" >>confdefs.h
 
     BO="${BO} Have64BitSizeT"
     if test "x${OCC}" = "xyes"; then
-      FLAGS="${FLAGS} -D_OCC64"
+      CXXFLAGS="${CXXFLAGS} -D_OCC64"
     fi
   fi
 fi
@@ -6278,9 +16723,9 @@ fi
 DOX=""
 # Extract the first word of "doxygen", so it can be a program name with args.
 set dummy doxygen; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DOX+set}" = set; then
+if test "${ac_cv_prog_DOX+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DOX"; then
@@ -6291,14 +16736,14 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_DOX=""yes""
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
   test -z "$ac_cv_prog_DOX" && ac_cv_prog_DOX=""no""
@@ -6306,25 +16751,54 @@ fi
 fi
 DOX=$ac_cv_prog_DOX
 if test -n "$DOX"; then
-  { $as_echo "$as_me:$LINENO: result: $DOX" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOX" >&5
 $as_echo "$DOX" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
 if test "x${DOX}" = "xyes"; then
-  DOXYGEN="doxygen"
+  DOXYGEN="doxygen doxygen.config"
 else
   DOXYGEN=""
 fi
 
 
+RM="rm -f"
+
+
 ac_config_headers="$ac_config_headers MAdConfig.h:MAdConfig.h.in"
 
 
+ac_config_files="$ac_config_files Makefile"
 
+ac_config_files="$ac_config_files Common/Makefile"
+
+ac_config_files="$ac_config_files Geo/Makefile"
+
+ac_config_files="$ac_config_files Mesh/Makefile"
+
+ac_config_files="$ac_config_files Adapt/Makefile"
+
+ac_config_files="$ac_config_files variables"
+
+ac_config_files="$ac_config_files Contrib/ANN/Makefile"
+
+ac_config_files="$ac_config_files Benchmarks/meshInfo/Makefile"
+
+ac_config_files="$ac_config_files Benchmarks/checkMesh/Makefile"
+
+ac_config_files="$ac_config_files Benchmarks/optimize/Makefile"
+
+ac_config_files="$ac_config_files Benchmarks/moveIt/Makefile"
+
+
+
+
+includedir="${prefix}/include/MAdLib"
+allincludedir="${prefix}/include_all/MAdLib"
 
 
 
@@ -6340,7 +16814,6 @@ ac_config_headers="$ac_config_headers MAdConfig.h:MAdConfig.h.in"
 
 
 
-ac_config_files="$ac_config_files variables"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -6369,13 +16842,13 @@ _ACEOF
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) $as_unset $ac_var ;;
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -6383,8 +16856,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
   (set) 2>&1 |
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
     *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -6407,11 +16880,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
     test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
     cat confcache >$cache_file
   else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
@@ -6431,22 +16904,55 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${Extended_API_TRUE}" && test -z "${Extended_API_FALSE}"; then
+  as_fn_error "conditional \"Extended_API\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -6456,17 +16962,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -6474,23 +16981,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
 as_nl='
 '
 export as_nl
@@ -6498,7 +16997,13 @@ export as_nl
 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
   as_echo='printf %s\n'
   as_echo_n='printf %s'
 else
@@ -6509,7 +17014,7 @@ else
     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
     as_echo_n_body='eval
       arg=$1;
-      case $arg in
+      case $arg in #(
       *"$as_nl"*)
 	expr "X$arg" : "X\\(.*\\)$as_nl";
 	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -6532,13 +17037,6 @@ if test "${PATH_SEPARATOR+set}" != set; then
   }
 fi
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
 
 # IFS
 # We need space, tab and new line, in precisely that order.  Quoting is
@@ -6548,15 +17046,15 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -6568,12 +17066,16 @@ if test "x$as_myself" = x; then
 fi
 if test ! -f "$as_myself"; then
   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
@@ -6585,7 +17087,89 @@ export LC_ALL
 LANGUAGE=C
 export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  fi
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -6599,8 +17183,12 @@ else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
@@ -6620,76 +17208,25 @@ $as_echo X/"$0" |
 	  }
 	  s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
 
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
@@ -6718,8 +17255,56 @@ fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
@@ -6738,10 +17323,10 @@ else
       if test -d "$1"; then
 	test -d "$1/.";
       else
-	case $1 in
+	case $1 in #(
 	-*)set "./$1";;
 	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
 	???[sx]*):;;*)false;;esac;fi
     '\'' sh
   '
@@ -6756,13 +17341,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
 exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 This file was extended by MAdLib $as_me 1.2.3, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+generated by GNU Autoconf 2.64.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6788,15 +17379,17 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # Files that config.status was made for.
 config_files="$ac_config_files"
 config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
 
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-Usage: $0 [OPTION]... [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
@@ -6815,21 +17408,27 @@ $config_files
 Configuration headers:
 $config_headers
 
-Report bugs to <bug-autoconf at gnu.org>."
+Configuration commands:
+$config_commands
+
+Report bugs to <contrib at madlib.be>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
 MAdLib config.status 1.2.3
-configured by $0, generated by GNU Autoconf 2.63,
+configured by $0, generated by GNU Autoconf 2.64,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
 test -n "\$AWK" || AWK=awk
 _ACEOF
 
@@ -6864,20 +17463,19 @@ do
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
+    as_fn_error "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -6885,11 +17483,10 @@ Try \`$0 --help' for more information." >&2
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
+  -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-  *) ac_config_targets="$ac_config_targets $1"
+  *) as_fn_append ac_config_targets " $1"
      ac_need_defaults=false ;;
 
   esac
@@ -6927,6 +17524,362 @@ _ASBOX
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+fix_srcfile_path_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+  ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+
+
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -6935,12 +17888,22 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "MAdConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS MAdConfig.h:MAdConfig.h.in" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "Common/Makefile") CONFIG_FILES="$CONFIG_FILES Common/Makefile" ;;
+    "Geo/Makefile") CONFIG_FILES="$CONFIG_FILES Geo/Makefile" ;;
+    "Mesh/Makefile") CONFIG_FILES="$CONFIG_FILES Mesh/Makefile" ;;
+    "Adapt/Makefile") CONFIG_FILES="$CONFIG_FILES Adapt/Makefile" ;;
     "variables") CONFIG_FILES="$CONFIG_FILES variables" ;;
+    "Contrib/ANN/Makefile") CONFIG_FILES="$CONFIG_FILES Contrib/ANN/Makefile" ;;
+    "Benchmarks/meshInfo/Makefile") CONFIG_FILES="$CONFIG_FILES Benchmarks/meshInfo/Makefile" ;;
+    "Benchmarks/checkMesh/Makefile") CONFIG_FILES="$CONFIG_FILES Benchmarks/checkMesh/Makefile" ;;
+    "Benchmarks/optimize/Makefile") CONFIG_FILES="$CONFIG_FILES Benchmarks/optimize/Makefile" ;;
+    "Benchmarks/moveIt/Makefile") CONFIG_FILES="$CONFIG_FILES Benchmarks/moveIt/Makefile" ;;
 
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
+  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -6952,6 +17915,7 @@ done
 if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -6966,7 +17930,7 @@ $debug ||
   trap 'exit_status=$?
   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
 ' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  trap 'as_fn_exit 1' 1 2 13 15
 }
 # Create a (secure) tmp directory for tmp files.
 
@@ -6977,11 +17941,7 @@ $debug ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} ||
-{
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -6989,10 +17949,16 @@ $debug ||
 if test -n "$CONFIG_FILES"; then
 
 
-ac_cr='
'
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
+  ac_cs_awk_cr='\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
@@ -7006,24 +17972,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -7112,9 +18072,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
 else
   cat
 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
-   { (exit 1); exit 1; }; }
+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
 # VPATH may cause trouble with some makes, so we remove $(srcdir),
@@ -7155,9 +18113,7 @@ for ac_last_try in false false :; do
   if test -z "$ac_t"; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -7242,13 +18198,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
 shift
 for ac_tag
 do
@@ -7257,9 +18211,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
-   { (exit 1); exit 1; }; };;
+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -7287,12 +18239,10 @@ $as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
+	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
+      as_fn_append ac_file_inputs " '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -7303,7 +18253,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
 	`' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
 $as_echo "$as_me: creating $ac_file" >&6;}
     fi
     # Neutralize special characters interpreted by sed in replacement strings.
@@ -7316,9 +18266,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -7346,47 +18294,7 @@ $as_echo X"$ac_file" |
 	    q
 	  }
 	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+  as_dir="$ac_dir"; as_fn_mkdir_p
   ac_builddir=.
 
 case "$ac_dir" in
@@ -7428,13 +18336,21 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
   # CONFIG_FILE
   #
 
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
 _ACEOF
 
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
 ac_datarootdir_hack=; ac_datarootdir_seen=
-
 ac_sed_dataroot='
 /datarootdir/ {
   p
@@ -7444,12 +18360,11 @@ ac_sed_dataroot='
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p
-'
+/@mandir@/p'
 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -7459,7 +18374,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
@@ -7483,17 +18398,17 @@ s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
 s&@builddir@&$ac_builddir&;t t
 s&@abs_builddir@&$ac_abs_builddir&;t t
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&2;}
@@ -7503,9 +18418,7 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -7516,43 +18429,971 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;}
       $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
     } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+      || as_fn_error "could not create $ac_file" "$LINENO" 5
     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
       mv "$tmp/config.h" "$ac_file" \
-	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+	|| as_fn_error "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
+      || as_fn_error "could not create -" "$LINENO" 5
   fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
  ;;
 
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "libtool":C)
+
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
 
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
   esac
 
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1+=\$2"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+    ;;
+  esac
+
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+
+  esac
 done # for ac_tag
 
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -7573,10 +19414,10 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
+  $ac_cs_success || as_fn_exit $?
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
@@ -7586,10 +19427,9 @@ echo "MAdLib is configured for"
 echo "  - OS           : ${UNAME} on ${HOSTNAME}"
 echo "  - C++ compiler : ${CXX}"
 echo "  - Exe linker   : ${LINKER}"
-echo "  - Lib linker   : ${AR}"
-echo "  - Optimization : ${OPTIM}"
 echo "  - C++ flags    : ${CXXFLAGS}"
 echo "  - Build options: ${BO}"
+echo "  - Executables  : ${benchs}"
 echo "********************************************************************"
 echo "Edit 'variables' and 'MAdConfig.h' to fine-tune the config"
 echo "********************************************************************"
diff --git a/configure.in b/configure.ac
similarity index 73%
rename from configure.in
rename to configure.ac
index 6ff1238..21cbc85 100644
--- a/configure.in
+++ b/configure.ac
@@ -16,6 +16,15 @@ dnl Check that this is the MAdLib source tree
 dnl AC_INIT(Mesh/MeshDataBaseInterface.h)
 AC_INIT([MAdLib], [1.2.3], [contrib at madlib.be])
 
+dnl Initialize Automake
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+
+dnl Initialize Libtool
+LT_INIT()
+
+dnl Initialize Doxygen
+dnl DX_INIT_DOXYGEN([MAdLib], [doxygen.config], [doc/])
+
 dnl Parse '--with' command-line options
 AC_ARG_WITH(blas-lapack-prefix,
             AC_HELP_STRING([--with-blas-lapack-prefix=PFX],
@@ -99,6 +108,15 @@ AC_ARG_ENABLE(petsc,
 AC_ARG_ENABLE(parser,
               AC_HELP_STRING([--enable-parser],
                              [use Parser (restricted, CENAERO, Belgium) if available (default=no)]))
+AC_ARG_ENABLE(benchmarks,
+              AC_HELP_STRING([--enable-benchmarks],
+                             [Compile all benchmark executables: checkMesh, optimize, meshInfo, moveIt (default=no)]))
+AC_ARG_ENABLE(moveIt,
+              AC_HELP_STRING([--enable-moveIt],
+                             [Compile moveIt, the main benchmark executable (default=no)]))
+AC_ARG_ENABLE(API-extended,
+              AC_HELP_STRING([--enable-extendedAPI],
+                             [Whether all header files are included in the API or not (default=no)]))
 
 dnl Disable options when disabled by default and not marked as enabled
 if test "x$enable_ann" != "xyes"; then
@@ -132,6 +150,40 @@ fi
 if test "x$enable_parser" != "xyes"; then
   enable_parser=no;
 fi
+if test "x$enable_benchmarks" != "xyes"; then
+  enable_benchmarks=no;
+fi
+if test "x$enable_moveIt" != "xyes"; then
+  enable_moveIt=no;
+fi
+if test "x$enable_extendedAPI" != "xyes"; then
+  enable_extendedAPI=no;
+fi
+
+dnl Set the auxiliary compilation flag to empty
+AC_DEFINE([HAVE_64BIT_SIZE_T], [], [Whether we run the compilation on a 64 bits architecture or not])
+AC_DEFINE([HAVE_BLAS], [], [Whether we use BLAS or not])
+AC_DEFINE([HAVE_LAPACK], [], [Whether we use Lapack or not])
+AC_DEFINE([HAVE_NO_DLL], [], [Whether we use DLLs or not])
+AC_DEFINE([HAVE_NO_SOCKLEN_T], [], [Whether we use socklens or not])
+AC_DEFINE([PARALLEL], [], [Whether we compile for parallel utilization or not])
+AC_DEFINE([_HAVE_ANN_], [], [Whether we use the ANN library or not])
+AC_DEFINE([_HAVE_BLAS_], [], [Whether we use BLAS or not])
+AC_DEFINE([_HAVE_GMM_], [], [Whether we use GMM or not])
+AC_DEFINE([_HAVE_GMSH_], [], [Whether we use Gmsh or not])
+AC_DEFINE([_HAVE_MATHEX_], [], [Whether we use Mathex or not])
+AC_DEFINE([_HAVE_METIS_], [], [Whether we use Metis or not])
+AC_DEFINE([_HAVE_MPI_], [], [Whether we use MPI or not])
+AC_DEFINE([_HAVE_OCC_], [], [Whether we use OpenCascade or not])
+AC_DEFINE([_HAVE_PARMETIS_], [], [Whether we use ParMetis or not])
+AC_DEFINE([_HAVE_PARSER_], [], [Whether we use the Cenaero parser or not])
+AC_DEFINE([_HAVE_PETSC_], [], [Whether we use PETSc or not])
+
+dnl set a conditional for Automake to know if the API is the normal or extended one
+AM_CONDITIONAL([Extended_API],[test "x${enable_extendedAPI}" = "xyes"])
+
+dnl nasty definition: because something wrong in autoconf ?
+abssrcdir="../$srcdir"
 
 dnl Get the operating system and machine names
 UNAME=`uname`
@@ -158,12 +210,7 @@ AC_PROG_CPP
 LINKER="${CXX}"
 
 dnl Set default compiler flags
-FLAGS="-D_FORTIFY_SOURCE=0 -ansi "
-OPTIM="${CXXFLAGS}"
-CXXFLAGS=""
-
-dnl Set default definitions
-MAdLib_DEFS=""
+CXXFLAGS="${CXXFLAGS} -D_FORTIFY_SOURCE=0 -ansi "
 
 dnl Take care of no-cygwin option before doing any other tests
 case "$UNAME" in
@@ -183,14 +230,46 @@ AC_LANG(C++)
 dnl See if we need a .exe extension on executables
 AC_EXEEXT
 
-dnl Locate sources
-MAdROOT=`pwd`
-MAdLib_TMPDIR="/tmp/$USER/MAdLib"
-MAdLib_DIRS="Common Geo Mesh Adapt"
-MAdLib_LIBS="-L${MAdROOT}/lib -lMAdLib"
-MAdLib_INCLUDES=""
-dnl MAdLib_LIBS="-L${MAdROOT}/lib -lMAdAdapt -lMAdMesh -lMAdGeo -lMAdCommon"
-MAdLib_BENCHDIRS="Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize Benchmarks/moveIt"
+dnl defs for the objects compilation
+MAdLib_DEFS=""
+
+dnl include flags for the objects compilation
+MAdLib_INCLUDES="       -I\$(top_srcdir)/Geo\
+       -I\$(top_srcdir)/Mesh\
+       -I\$(top_srcdir)/Common\
+       -I\$(top_srcdir)/Adapt\
+       -I\$(top_srcdir)/Adapt/constraint\
+       -I\$(top_srcdir)/Adapt/operator\
+       -I\$(top_srcdir)/Adapt/output\
+       -I\$(top_srcdir)/Adapt/quality\
+       -I\$(top_srcdir)/Adapt/repositioning\
+       -I\$(top_srcdir)/Adapt/sizeField\
+       -I\$(top_srcdir)/Adapt/utils"
+
+dnl libraries included in libMAdLib
+MAdLib_LIBADD="Common/libMAdCommon.la Geo/libMAdGeo.la Mesh/libMAdMesh.la Adapt/libMAdAdapt.la"
+
+dnl librairies to be inclued in the executables compilation
+MAdLib_LIBS="-L${libdir} -Wl,-rpath,${libdir} -lMAdLib"
+
+dnl dirs in which the main compilation process will go
+MAdLib_DIRS="Common/ Geo/ Mesh/ Adapt/ ."
+
+dnl dirs in which the benchmark compilation process will go
+benchs=""
+MAdLib_BENCHDIRS=""
+if test "x$enable_benchmarks" != "xno"; then
+  MAdLib_BENCHDIRS="Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize Benchmarks/moveIt"
+  benchs="checkMesh, meshInfo, optimize, moveIt"
+  MAdLib_DIRS="${MAdLib_DIRS} Benchmarks/checkMesh Benchmarks/meshInfo Benchmarks/optimize Benchmarks/moveIt"
+else
+  if test "x$enable_moveIt" != "xno"; then
+    MAdLib_BENCHDIRS="Benchmarks/moveIt"
+    benchs="moveIt"
+  else
+    benchs=""
+  fi
+fi
 
 dnl Check for standard math library (no rule given if found, so gets
 dnl added to $LIBS, used for further checks)
@@ -198,10 +277,10 @@ AC_CHECK_LIB(m,main)
 
 dnl Check for gmm++ linear solver
 if test "x$enable_gmm" != "xno"; then
-  AC_CHECK_FILE(Contrib/gmm/gmm.h,GMM="yes")
+  AC_CHECK_FILE(${srcdir}/Contrib/gmm/gmm.h,GMM="yes")
   if test "x${GMM}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_GMM_"
-    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MAdROOT}/Contrib/gmm"
+    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${srcdir}/Contrib/gmm -I${abssrcdir}/Contrib/gmm"
     AC_DEFINE(_HAVE_GMM_)
     BO="${BO} Gmm"
     echo "********************************************************************"
@@ -216,7 +295,7 @@ fi
 dnl Check for Gmsh
 if test "x$enable_gmsh" != "xno"; then
   if test "x${GMSH_PREFIX}" != "x"; then
-    LDFLAGS="-L${GMSH_PREFIX} -L${GMSH_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${GMSH_PREFIX}/lib ${LDFLAGS}"
   fi
   AC_CHECK_FILE("${GMSH_PREFIX}/include/gmsh/Gmsh.h",GMSH="yes") 
 dnl  AC_CHECK_LIB(Gmsh,main,GMSH="yes",[],-lGmsh)
@@ -225,21 +304,11 @@ dnl  AC_CHECK_LIB(Gmsh,main,GMSH="yes",[],-lGmsh)
     AC_DEFINE(_HAVE_GMSH_)
     BO="${BO} Gmsh"
     if test "x${GMSH_PREFIX}" = "x"; then
-dnl       MAdLib_LIBS="${MAdLib_LIBS} -lGmsh -lgsl"
       MAdLib_LIBS="${MAdLib_LIBS} -lGmsh"
     else
-dnl       MAdLib_LIBS="${MAdLib_LIBS} -L${GMSH_PREFIX} -L${GMSH_PREFIX}/lib -lGmsh -lgsl"
-      MAdLib_LIBS="${MAdLib_LIBS} -L${GMSH_PREFIX} -L${GMSH_PREFIX}/lib -lGmsh"
-      FLAGS="${FLAGS} -I${GMSH_PREFIX} -I${GMSH_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${GMSH_PREFIX}/lib -Wl,-rpath,${GMSH_PREFIX}/lib -lGmsh"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${GMSH_PREFIX} -I${GMSH_PREFIX}/include"
     fi
-dnl     echo "********************************************************************"
-dnl     echo "  You are building a version of MAdLib that uses Gmsh and" 
-dnl     echo "  the GNU GSL. Gmsh and the GNU GSL are available under the GNU GPL."
-dnl     echo "  To disable Gmsh and the GNU GSL, run configure again with"
-dnl     echo "  the --disable-gmsh and --disable-gsl options."
-dnl     echo "  Note that you should disable Chaco and Metis in Gmsh or add"
-dnl     echo "  the corresponding libraries in the current version of MAdLib."
-dnl     echo "********************************************************************"
     echo "********************************************************************"
     echo "  You are building a version of MAdLib that uses Gmsh and. Gmsh is "
     echo "  available under the GNU GPL."
@@ -254,7 +323,7 @@ fi
 dnl Check for OpenCascade
 if test "x$enable_occ" != "xno"; then
   if test "x${OCC_PREFIX}" != "x"; then
-    LDFLAGS="-L${OCC_PREFIX} -L${OCC_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${OCC_PREFIX}/lib ${LDFLAGS}"
   fi
 dnl  AC_CHECK_FILE("${OCC_PREFIX}/inc/Geom_Curve.hxx",OCC="yes") 
   AC_CHECK_LIB(TKernel,main,OCC="yes",[],-lTKernel)
@@ -263,8 +332,8 @@ dnl  AC_CHECK_FILE("${OCC_PREFIX}/inc/Geom_Curve.hxx",OCC="yes")
     AC_DEFINE(_HAVE_OCC_)
     BO="${BO} OpenCascade"
     if test "x${OCC_PREFIX}" != "x"; then
-      MAdLib_LIBS="${MAdLib_LIBS} -L${OCC_PREFIX}/lib "
-      FLAGS="${FLAGS} -I${OCC_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${OCC_PREFIX}/lib -Wl,-rpath,${OCC_PREFIX}/lib"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${OCC_PREFIX}/include"
     fi
     # DataExchange (subset; see occ/ros/adm/make/Makefile for more info)
     MAdLib_LIBS="${MAdLib_LIBS} -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKIGES -lTKXSBase"
@@ -275,22 +344,19 @@ dnl  AC_CHECK_FILE("${OCC_PREFIX}/inc/Geom_Curve.hxx",OCC="yes")
     MAdLib_LIBS="${MAdLib_LIBS} -lTKBRep -lTKGeomBase -lTKG3d -lTKG2d"
     # FoundationClasses
     MAdLib_LIBS="${MAdLib_LIBS} -lTKAdvTools -lTKMath -lTKernel"
-
-    #MAdLib_LIBS="${MAdLib_LIBS} -lTKAdvTools -lTKBO -lTKBool -lTKBRep -lTKernel -lTKFeat -lTKFillet -lTKG2d -lTKG3d -lTKGeomAlgo -lTKGeomBase -lTKHLR -lTKIGES -lTKMath -lTKMesh -lTKOffset -lTKPrim -lTKShHealing -lTKSTEP209 -lTKSTEP -lTKSTEPAttr -lTKSTEPBase -lTKTopAlgo -lTKXSBase"
   fi
 fi
 
 dnl Check for ANN, the Approximate Nearest Neighbor library
 if test "x$enable_ann" != "xno"; then
-  AC_CHECK_FILE(Contrib/ANN/include/ANN/ANN.h,ANN="yes") 
+  AC_CHECK_FILE(${srcdir}/Contrib/ANN/include/ANN/ANN.h,ANN="yes") 
   if test "x${ANN}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_ANN_"
     AC_DEFINE(_HAVE_ANN_)
     BO="${BO} Ann"
     MAdLib_DIRS="Contrib/ANN ${MAdLib_DIRS}"
-    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MAdROOT}/Contrib/ANN/include" 
-    MAdLib_LIBS="${MAdLib_LIBS} -lMAdANN"
-    FLAGS="${FLAGS} -I${MAdROOT}/Contrib/ANN/include"
+    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I\$(top_srcdir)/Contrib/ANN/include/ANN -I\$(top_srcdir)/Contrib/ANN/include/ANN -I\$(top_srcdir)/Contrib/ANN/src" 
+    MAdLib_LIBADD="Contrib/ANN/libMAdANN.la ${MAdLib_LIBADD}"
     echo "********************************************************************"
     echo "  You are building a version of MAdLib that uses ANN, the"
     echo "  Approximate Nearest Neighbor library. ANN is available under the"
@@ -302,10 +368,10 @@ fi
 
 dnl Check for Mathex
 if test "x$enable_mathex" != "xno"; then
-  AC_CHECK_FILE(Contrib/mathex/mathex.h,MATHEX="yes")
+  AC_CHECK_FILE(${srcdir}/Contrib/mathex/mathex.h,MATHEX="yes")
   if test "x${MATHEX}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_MATHEX_"
-    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MAdROOT}/Contrib/mathex"
+    MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${srcdir}/Contrib/mathex -I${abssrcdir}/Contrib/mathex"
     AC_DEFINE(_HAVE_MATHEX_)
     BO="${BO} Mathex"
     echo "********************************************************************"
@@ -319,7 +385,7 @@ fi
 dnl Check for PETSc solvers
 if test "x$enable_petsc" != "xno"; then
   if test "x${PETSC_PREFIX}" != "x"; then
-    LDFLAGS="-L${PETSC_PREFIX} -L${PETSC_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${PETSC_PREFIX}/lib ${LDFLAGS}"
   fi
   AC_CHECK_LIB(petsc,main,PETSC="yes",[],-lpetsc)
   if test "x${PETSC}" = "xyes"; then
@@ -329,8 +395,8 @@ if test "x$enable_petsc" != "xno"; then
     if test "x${PETSC_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lpetsc -lpetscksp -lpetscmat -lpetscvec "
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${PETSC_PREFIX} -L${PETSC_PREFIX}/lib -lpetsc -lpetscksp -lpetscmat -lpetscvec "
-      FLAGS="${FLAGS} -I${PETSC_PREFIX} -I${PETSC_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${PETSC_PREFIX}/lib -Wl,-rpath,${PETSC_PREFIX}/lib -lpetsc -lpetscksp -lpetscmat -lpetscvec "
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${PETSC_PREFIX} -I${PETSC_PREFIX}/include"
     fi
   fi
 fi
@@ -338,7 +404,7 @@ fi
 dnl Check for Metis partitionner
 if test "x$enable_metis" != "xno"; then
   if test "x${METIS_PREFIX}" != "x"; then
-    LDFLAGS="-L${METIS_PREFIX} -L${METIS_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${METIS_PREFIX} ${LDFLAGS}"
   fi
   AC_CHECK_LIB(metis,main,METIS="yes",[],-lmetis)
   if test "x${METIS}" = "xyes"; then
@@ -348,8 +414,8 @@ if test "x$enable_metis" != "xno"; then
     if test "x${METIS_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lmetis"
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${METIS_PREFIX} -L${METIS_PREFIX}/lib -lmetis"
-      FLAGS="${FLAGS} -I${METIS_PREFIX} -I${METIS_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${METIS_PREFIX} -Wl,-rpath,${METIS_PREFIX} -lmetis"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${METIS_PREFIX}/Lib"
     fi
   fi
 fi
@@ -357,7 +423,7 @@ fi
 dnl Check for ParMetis partitionner
 if test "x$enable_parmetis" != "xno"; then
   if test "x${PARMETIS_PREFIX}" != "x"; then
-    LDFLAGS="-L${PARMETIS_PREFIX} -L${PARMETIS_PREFIX}/lib ${LDFLAGS}"
+    LDFLAGS="-L${PARMETIS_PREFIX} ${LDFLAGS}"
   fi
   AC_CHECK_LIB(metis,main,METIS="yes",[],-lmetis)
   AC_CHECK_LIB(parmetis,main,PARMETIS="yes",[],-lparmetis)
@@ -369,8 +435,8 @@ if test "x$enable_parmetis" != "xno"; then
       if test "x${PARMETIS_PREFIX}" = "x"; then
         MAdLib_LIBS="${MAdLib_LIBS} -lparmetis -lmetis"
       else
-        MAdLib_LIBS="${MAdLib_LIBS} -L${PARMETIS_PREFIX} -L${PARMETIS_PREFIX}/lib -lparmetis -lmetis"
-        FLAGS="${FLAGS} -I${PARMETIS_PREFIX} -I${PARMETIS_PREFIX}/include"
+        MAdLib_LIBS="${MAdLib_LIBS} -L${PARMETIS_PREFIX} -Wl,-rpath,${PARMETIS_PREFIX} -lparmetis -lmetis"
+        MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${PARMETIS_PREFIX}"
       fi
     fi
   fi
@@ -390,7 +456,7 @@ dnl     if test "x${GSL_PREFIX}" = "x"; then
 dnl       MAdLib_LIBS="${MAdLib_LIBS} -lgsl"
 dnl     else
 dnl       MAdLib_LIBS="${MAdLib_LIBS} -L${GSL_PREFIX} -L${GSL_PREFIX}/lib -lgsl"
-dnl       FLAGS="${FLAGS} -I${GSL_PREFIX} -I${GSL_PREFIX}/include"
+dnl       MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${GSL_PREFIX} -I${GSL_PREFIX}/include"
 dnl     fi
 dnl   fi
 dnl fi
@@ -468,7 +534,9 @@ if test "x$enable_mpi" = "xyes"; then
   if test "x${MPI_PREFIX}" != "x"; then
     LDFLAGS="-L${MPI_PREFIX}/lib ${LDFLAGS}"
   fi
-  AC_CHECK_LIB(mpi,main,MPI="yes")
+  dnl check presence of mpi.h rather than the lib, the lib is not always present 
+  AC_CHECK_HEADERS(mpi.h,MPI="yes")
+  dnl AC_CHECK_LIB(mpi,main,MPI="yes")
   if test "x${MPI}" = "xyes"; then
     MAdLib_DEFS="${MAdLib_DEFS} -D_HAVE_MPI_ -DPARALLEL"
     AC_DEFINE(_HAVE_MPI_)
@@ -480,10 +548,10 @@ if test "x$enable_mpi" = "xyes"; then
     echo "********************************************************************"
     if test "x${MPI_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lmpi"
-      FLAGS="${FLAGS} -I/usr/include/mpi"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I/usr/include/mpi"
     else
       MAdLib_LIBS="${MAdLib_LIBS} -L${MPI_PREFIX}/lib -lmpi"
-      FLAGS="${FLAGS} -I${MPI_PREFIX}/include"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${MPI_PREFIX}/include"
     fi
   fi
 fi
@@ -500,7 +568,7 @@ if test "x$enable_mpi" = "xyes"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lautopack"
     else
       MAdLib_LIBS="${MAdLib_LIBS} -L${AUTOPACK_PREFIX}/lib -lautopack"
-      FLAGS="${FLAGS} -I${AUTOPACK_PREFIX}/include"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${AUTOPACK_PREFIX}/include"
     fi
   fi
 fi
@@ -518,37 +586,12 @@ if test "x$enable_parser" = "xyes"; then
     if test "x${PARSER_PREFIX}" = "x"; then
       MAdLib_LIBS="${MAdLib_LIBS} -lParser"
     else
-      MAdLib_LIBS="${MAdLib_LIBS} -L${PARSER_PREFIX}/lib -lParser"
-      FLAGS="${FLAGS} -I${PARSER_PREFIX}/include"
+      MAdLib_LIBS="${MAdLib_LIBS} -L${PARSER_PREFIX}/lib -Wl,-rpath,${PARSER_PREFIX}/lib -lParser"
+      MAdLib_INCLUDES="${MAdLib_INCLUDES} -I${PARSER_PREFIX}/include"
     fi
   fi
 fi
 
-dnl How to build static libraries?
-dnl Done after every AC_CHECK_LIB, otherwise AC_CHECK_LIB fails-> to be fixed
-case "$UNAME" in
-  Darwin*)
-    RANLIB=true
-    AR="libtool -o"
-    LIBEXT=".a"
-    ;;
-  Linux*)
-    RANLIB=true
-    AR="${CXX} -shared -o"
-    LIBEXT=".so"
-    CXXFLAGS="${CXXFLAGS} -fPIC"
-    ;;
-  *)
-    AC_PROG_RANLIB
-    AC_PATH_PROG(AR, ar)
-    if test "x${AR}" = "x:"; then
-      AC_MSG_ERROR([Could not find the library archiver, aborting.])
-    fi
-    AR="${AR} ruvs"
-    LIBEXT=".a"
-    ;;
-esac
-
 dnl Finish link line
 MAdLib_LIBS="${MAdLib_LIBS} -lm"
 
@@ -577,7 +620,7 @@ case "$UNAME" in
     AC_DEFINE(HAVE_NO_DLL)
     BO="${BO} NoDll"
     if test "x$enable_universal" = "xyes"; then
-      FLAGS="-arch ppc -arch i386 ${FLAGS}"
+      CXXFLAGS="${CXXFLAGS} -arch ppc -arch i386"
     fi
     if test "x$enable_gui" = "xno"; then
       MAdLib_LIBS="${MAdLib_LIBS} -framework ApplicationServices"
@@ -588,7 +631,7 @@ case "$UNAME" in
     MAdLib_DEFS="${MAdLib_DEFS} -DHAVE_NO_DLL"
     AC_DEFINE(HAVE_NO_DLL)
     BO="${BO} NoDll"
-    FLAGS="-D_BSD ${FLAGS}"
+    CXXFLAGS="${CXXFLAGS} -D_BSD"
     ;;
 
   IRIX*)
@@ -597,7 +640,7 @@ case "$UNAME" in
       *CC*)
         dnl add "-mips3 -n32" to FLAGS, AR and LINKER for portable 32 bit exe
         dnl "-DOLDCINCLUDE" is for Netgen
-        FLAGS="-LANG:std -OPT:Olimit=0 -DOLDCINCLUDE ${FLAGS}"
+        CXXFLAGS="{CXXFLAGS} -LANG:std -OPT:Olimit=0 -DOLDCINCLUDE"
         AR="${CXX} -ar -o"
         LINKER="${CXX}"
         ;;
@@ -611,7 +654,7 @@ case "$UNAME" in
     dnl options for native DEC compiler
     case "${CXX}" in
       *cxx*)
-        FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
+        CXXFLAGS="${CXXFLAGS} -D__USE_STD_IOSTREAM"
         ;;
     esac
     ;;
@@ -641,41 +684,60 @@ if test $ac_cv_sizeof_size_t != 4; then
     AC_DEFINE(HAVE_64BIT_SIZE_T)
     BO="${BO} Have64BitSizeT"
     if test "x${OCC}" = "xyes"; then
-      FLAGS="${FLAGS} -D_OCC64"
+      CXXFLAGS="${CXXFLAGS} -D_OCC64"
     fi
   fi
 fi
 
-dnl Check for Doxygen (to produce the documentation)
+dnl Check for Doxygen
 DOX=""
 AC_CHECK_PROG(DOX,doxygen,"yes","no")
 if test "x${DOX}" = "xyes"; then
-  DOXYGEN="doxygen"
+  DOXYGEN="doxygen doxygen.config"
 else
   DOXYGEN=""
 fi
 AC_SUBST(DOXYGEN)
 
+dnl what is the command for removing files
+RM="rm -f"
+AC_SUBST(RM)
+
 AC_CONFIG_HEADER(MAdConfig.h:MAdConfig.h.in)
 
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Common/Makefile])
+AC_CONFIG_FILES([Geo/Makefile])
+AC_CONFIG_FILES([Mesh/Makefile])
+AC_CONFIG_FILES([Adapt/Makefile])
+AC_CONFIG_FILES([variables])
+AC_CONFIG_FILES([Contrib/ANN/Makefile])
+AC_CONFIG_FILES([Benchmarks/meshInfo/Makefile])
+AC_CONFIG_FILES([Benchmarks/checkMesh/Makefile])
+AC_CONFIG_FILES([Benchmarks/optimize/Makefile])
+AC_CONFIG_FILES([Benchmarks/moveIt/Makefile])
+
+AC_CONFIG_MACRO_DIR([m4])
+
+includedir="${prefix}/include/MAdLib"
+allincludedir="${prefix}/include_all/MAdLib"
+
 dnl Write output
 AC_SUBST(UNAME)
 AC_SUBST(HOSTNAME)
-AC_SUBST(FLAGS)
-AC_SUBST(OPTIM)
 AC_SUBST(CXX)
 AC_SUBST(CXXFLAGS)
 AC_SUBST(LINKER)
 AC_SUBST(AR)
-AC_SUBST(LIBEXT)
 AC_SUBST(MAdLib_DEFS)
-AC_SUBST(MAdROOT)
-AC_SUBST(MAdLib_TMPDIR)
 AC_SUBST(MAdLib_DIRS)
 AC_SUBST(MAdLib_LIBS)
 AC_SUBST(MAdLib_INCLUDES)
 AC_SUBST(MAdLib_BENCHDIRS)
-AC_CONFIG_FILES([variables])
+AC_SUBST(MAdLib_LIBADD)
+AC_SUBST(includedir)
+AC_SUBST(allincludedir)
+
 AC_OUTPUT
 
 dnl Print some information
@@ -684,10 +746,9 @@ echo "MAdLib is configured for"
 echo "  - OS           : ${UNAME} on ${HOSTNAME}"
 echo "  - C++ compiler : ${CXX}"
 echo "  - Exe linker   : ${LINKER}"
-echo "  - Lib linker   : ${AR}"
-echo "  - Optimization : ${OPTIM}"
 echo "  - C++ flags    : ${CXXFLAGS}"
 echo "  - Build options: ${BO}"
+echo "  - Executables  : ${benchs}"
 echo "********************************************************************"
 echo "Edit 'variables' and 'MAdConfig.h' to fine-tune the config"
 echo "********************************************************************"
diff --git a/debian/libmadlib-dbg.debhelper.log b/debian/libmadlib-dbg.debhelper.log
new file mode 100644
index 0000000..1d1d0b2
--- /dev/null
+++ b/debian/libmadlib-dbg.debhelper.log
@@ -0,0 +1 @@
+dh_installdirs
diff --git a/debian/libmadlib-dev.debhelper.log b/debian/libmadlib-dev.debhelper.log
new file mode 100644
index 0000000..1d1d0b2
--- /dev/null
+++ b/debian/libmadlib-dev.debhelper.log
@@ -0,0 +1 @@
+dh_installdirs
diff --git a/debian/libmadlib.debhelper.log b/debian/libmadlib.debhelper.log
new file mode 100644
index 0000000..1d1d0b2
--- /dev/null
+++ b/debian/libmadlib.debhelper.log
@@ -0,0 +1 @@
+dh_installdirs
diff --git a/debian/madlib-doc.debhelper.log b/debian/madlib-doc.debhelper.log
new file mode 100644
index 0000000..1d1d0b2
--- /dev/null
+++ b/debian/madlib-doc.debhelper.log
@@ -0,0 +1 @@
+dh_installdirs
diff --git a/debian/stamp-autotools-files b/debian/stamp-autotools-files
new file mode 100644
index 0000000..e69de29
diff --git a/debian/stamp-makefile-build b/debian/stamp-makefile-build
new file mode 100644
index 0000000..e69de29
diff --git a/debian/stamp-patched b/debian/stamp-patched
new file mode 100644
index 0000000..e69de29
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..e5f9736
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,589 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2007-03-29.01
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/doxygen.config b/doxygen.config
deleted file mode 100644
index 35140bb..0000000
--- a/doxygen.config
+++ /dev/null
@@ -1,76 +0,0 @@
-
-# Automatically generated by buildUtil 
-PROJECT_NAME           = MAdLib
-OUTPUT_DIRECTORY       = ./doc
-OUTPUT_LANGUAGE        = English
-INPUT                  = Common Geo Mesh Adapt 
-FILE_PATTERNS          = *.h *.c *.cc *.cpp *.ipp
-EXTRACT_ALL            = YES
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-ALWAYS_DETAILED_SEC    = NO
-FULL_PATH_NAMES        = NO
-INTERNAL_DOCS          = NO
-CLASS_DIAGRAMS         = YES
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-CASE_SENSE_NAMES       = YES
-SHORT_NAMES            = NO
-HIDE_SCOPE_NAMES       = NO
-VERBATIM_HEADERS       = NO
-SHOW_INCLUDE_FILES     = YES
-JAVADOC_AUTOBRIEF      = NO
-INHERIT_DOCS           = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = YES
-DISTRIBUTE_GROUP_DOC   = NO
-TAB_SIZE               = 4
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = YES
-GENERATE_BUGLIST       = YES
-MAX_INITIALIZER_LINES  = 30
-OPTIMIZE_OUTPUT_FOR_C  = NO
-SHOW_USED_FILES        = YES
-QUIET                  = YES
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-RECURSIVE              = YES
-FILTER_SOURCE_FILES    = NO
-ALPHABETICAL_INDEX     = YES
-COLS_IN_ALPHA_INDEX    = 2
-GENERATE_HTML          = YES
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = NO
-GENERATE_CHI           = NO
-BINARY_TOC             = NO
-TOC_EXPAND             = NO
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = NO
-TREEVIEW_WIDTH         = 250
-GENERATE_LATEX         = NO
-COMPACT_LATEX          = NO
-PAPER_TYPE             = letter
-PDF_HYPERLINKS         = YES
-USE_PDFLATEX           = YES
-LATEX_BATCHMODE        = YES
-GENERATE_RTF           = NO
-GENERATE_MAN           = NO
-MAN_LINKS              = YES
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-ALLEXTERNALS           = NO
-HAVE_DOT               = NO
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-GRAPHICAL_HIERARCHY    = YES
-MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1024
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-SEARCHENGINE           = NO
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..a5897de
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# 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
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755
index 0000000..b612e9a
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,8412 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6
+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+#     --config             show all configuration variables
+#     --debug              enable verbose shell tracing
+# -n, --dry-run            display commands without modifying any files
+#     --features           display basic configuration information and exit
+#     --mode=MODE          use operation mode MODE
+#     --preserve-dup-deps  don't remove duplicate dependency libraries
+#     --quiet, --silent    don't print informational messages
+#     --tag=TAG            use configuration variables from tag TAG
+# -v, --verbose            print informational messages (default)
+#     --version            print version information
+# -h, --help               print short or long help message
+#
+# MODE must be one of the following:
+#
+#       clean              remove files from the build directory
+#       compile            compile a source file into a libtool object
+#       execute            automatically set library path, then run a program
+#       finish             complete the installation of libtool libraries
+#       install            install libraries or executables
+#       link               create a library or an executable
+#       uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#       host-triplet:	$host
+#       shell:		$SHELL
+#       compiler:		$LTCC
+#       compiler flags:		$LTCFLAGS
+#       linker:		$LD (gnu? $with_gnu_ld)
+#       $progname:		(GNU libtool) 2.2.6 Debian-2.2.6a-1ubuntu1
+#       automake:		$automake_version
+#       autoconf:		$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="2.2.6 Debian-2.2.6a-1ubuntu1"
+TIMESTAMP=""
+package_revision=1.3012
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+  -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+    case $1 in
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+    esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "X$1" | $Xsed \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED -n '/^# Usage:/,/# -h/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	p
+     }' < "$progpath"
+    exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell, and then maybe $ECHO will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $ECHO "enable shared libraries"
+    else
+      $ECHO "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $ECHO "enable static libraries"
+    else
+      $ECHO "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
+    ;;
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
+    ;;
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
+    ;;
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
+    ;;
+  install|instal|insta|inst|ins|in|i)
+    shift; set dummy --mode install ${1+"$@"}; shift
+    ;;
+  link|lin|li|l)
+    shift; set dummy --mode link ${1+"$@"}; shift
+    ;;
+  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
+    ;;
+  esac
+
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
+
+    case $opt in
+      --config)		func_config					;;
+
+      --debug)		preserve_args="$preserve_args $opt"
+			func_echo "enabling shell trace mode"
+			opt_debug='set -x'
+			$opt_debug
+			;;
+
+      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			execute_dlfiles="$execute_dlfiles $1"
+			shift
+			;;
+
+      --dry-run | -n)	opt_dry_run=:					;;
+      --features)       func_features					;;
+      --finish)		mode="finish"					;;
+
+      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			case $1 in
+			  # Valid mode arguments:
+			  clean)	;;
+			  compile)	;;
+			  execute)	;;
+			  finish)	;;
+			  install)	;;
+			  link)		;;
+			  relink)	;;
+			  uninstall)	;;
+
+			  # Catch anything else as an error
+			  *) func_error "invalid argument for $opt"
+			     exit_cmd=exit
+			     break
+			     ;;
+		        esac
+
+			mode="$1"
+			shift
+			;;
+
+      --preserve-dup-deps)
+			opt_duplicate_deps=:				;;
+
+      --quiet|--silent)	preserve_args="$preserve_args $opt"
+			opt_silent=:
+			;;
+
+      --verbose| -v)	preserve_args="$preserve_args $opt"
+			opt_silent=false
+			;;
+
+      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			preserve_args="$preserve_args $opt $1"
+			func_enable_tag "$1"	# tagname is set here
+			shift
+			;;
+
+      # Separate optargs to long options:
+      -dlopen=*|--mode=*|--tag=*)
+			func_opt_split "$opt"
+			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+			shift
+			;;
+
+      -\?|-h)		func_usage					;;
+      --help)		opt_help=:					;;
+      --version)	func_version					;;
+
+      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
+
+      *)		nonopt="$opt"
+			break
+			;;
+    esac
+  done
+
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
+
+  # Having warned about all mis-specified options, bail out if
+  # anything was wrong.
+  $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+$opt_help || {
+  # Sanity checks first:
+  func_check_version_match
+
+  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+    func_fatal_configuration "not configured to build any kind of library"
+  fi
+
+  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+  # Darwin sucks
+  eval std_shrext=\"$shrext_cmds\"
+
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    func_error "unrecognized option \`-dlopen'"
+    $ECHO "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+	for lalib_p_l in 1 2 3 4
+	do
+	    read lalib_p_line
+	    case "$lalib_p_line" in
+		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+	    esac
+	done
+	exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_ltwrapper_scriptname_result=""
+    if func_ltwrapper_executable_p "$1"; then
+	func_dirname_and_basename "$1" "" "."
+	func_stripname '' '.exe' "$func_basename_result"
+	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)	. "$1" ;;
+    *)		. "./$1" ;;
+    esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+        func_quote_for_eval "$arg"
+	CC_quoted="$CC_quoted $func_quote_for_eval_result"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	      # Double-quote args containing other shell metacharacters.
+	      func_quote_for_eval "$arg"
+	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	    done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  func_echo "unable to infer tagged configuration"
+	  func_fatal_error "specify a tag with \`--tag'"
+#	else
+#	  func_verbose "using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  test -n "$libobj" && \
+	    func_fatal_error "you cannot specify \`-o' more than once"
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+	  continue
+	  ;;
+
+	-shared | -static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+	    func_quote_for_eval "$arg"
+	    lastarg="$lastarg $func_quote_for_eval_result"
+	  done
+	  IFS="$save_ifs"
+	  func_stripname ' ' '' "$lastarg"
+	  lastarg=$func_stripname_result
+
+	  # Add the arguments to base_compile.
+	  base_compile="$base_compile $lastarg"
+	  continue
+	  ;;
+
+	*)
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+	func_basename "$srcfile"
+	libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	continue
+	;;
+
+      -static)
+	build_libtool_libs=no
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+      removelist="$removelist $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    removelist="$removelist $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	command="$command -o $lobj"
+      fi
+
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+	suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile$pie_flag"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
+
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
+
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
+
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
+
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
+    esac
+
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
+
+    exit $?
+}
+
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && \
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+	;;
+
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if func_ltwrapper_script_p "$file"; then
+	  func_source "$file"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	elif func_ltwrapper_executable_p "$file"; then
+	  func_ltwrapper_scriptname "$file"
+	  func_source "$func_ltwrapper_scriptname_result"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_quote_for_eval "$file"
+      args="$args $func_quote_for_eval_result"
+    done
+
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+	      else
+		$lt_unset $lt_var
+	      fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	$ECHO "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    $ECHO "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $ECHO "   $libdir"
+    done
+    $ECHO
+    $ECHO "If you ever happen to want to link against installed libraries"
+    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $ECHO "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $ECHO "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $ECHO "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $ECHO "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $ECHO "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $ECHO
+
+    $ECHO "See any operating system documentation about shared libraries for"
+    case $host in
+      solaris2.[6789]|solaris2.1[0-9])
+        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	$ECHO "pages."
+	;;
+      *)
+        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+        ;;
+    esac
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    install_prog="$install_prog$func_quote_for_eval_result"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o)
+	prev=$arg
+	;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	func_fatal_help "no file or destination specified"
+      else
+	func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+	func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
+
+	library_names=
+	old_library=
+	relink_command=
+	func_source "$file"
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
+
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  test "$inst_prefix_dir" = "$destdir" && \
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  func_warning "relinking \`$file'"
+	  func_show_eval "$relink_command" \
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names; shift
+	if test -n "$1"; then
+	  realname="$1"
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+	      'exit $?'
+	  tstripme="$stripme"
+	  case $host_os in
+	  cygwin* | mingw* | pw32* | cegcc*)
+	    case $realname in
+	    *.dll.a)
+	      tstripme=""
+	      ;;
+	    esac
+	    ;;
+	  esac
+	  if test -n "$tstripme" && test -n "$striplib"; then
+	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      test "$linkname" != "$realname" \
+		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  func_execute_cmds "$postinstall_cmds" 'exit $?'
+	fi
+
+	# Install the pseudo-library for information purposes.
+	func_basename "$file"
+	name="$func_basename_result"
+	instname="$dir/$name"i
+	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  func_lo2o "$destfile"
+	  staticdest=$func_lo2o_result
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	test -n "$destfile" && \
+	  func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  func_lo2o "$file"
+	  staticobj=$func_lo2o_result
+	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      func_stripname '' '.exe' "$file"
+	      file=$func_stripname_result
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin* | *mingw*)
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      wrapper=$func_ltwrapper_scriptname_result
+	    else
+	      func_stripname '' '.exe' "$file"
+	      wrapper=$func_stripname_result
+	    fi
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if func_ltwrapper_script_p "$wrapper"; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  func_source "$wrapper"
+
+	  # Check the variables that should have been set.
+	  test -z "$generated_by_libtool_version" && \
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      func_source "$lib"
+	    fi
+	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  func_source "$wrapper"
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    $opt_dry_run || {
+	      if test "$finalize" = yes; then
+	        tmpdir=`func_mktempdir`
+		func_basename "$file$stripped_ext"
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
+	        # Replace the output file specification.
+	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	        $opt_silent || {
+	          func_quote_for_expand "$relink_command"
+		  eval "func_echo $func_quote_for_expand_result"
+	        }
+	        if eval "$relink_command"; then :
+	          else
+		  func_error "error: relink \`$file' with the above command before installing it"
+		  $opt_dry_run || ${RM}r "$tmpdir"
+		  continue
+	        fi
+	        file="$outputname"
+	      else
+	        func_warning "cannot relink \`$file'"
+	      fi
+	    }
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
+	  ;;
+	esac
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
+	fi
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	my_dlsyms="${my_outputname}S.c"
+      else
+	func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+	# Discover the nlist of each of the dlfiles.
+	nlist="$output_objdir/${my_outputname}.nm"
+
+	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+	# Parse the name list into a source file.
+	func_verbose "creating $output_objdir/$my_dlsyms"
+
+	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
+
+	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+	  # Add our own program objects to the symbol list.
+	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	  for progfile in $progfiles; do
+	    func_verbose "extracting global C symbols from \`$progfile'"
+	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -n "$exclude_expsyms"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  if test -n "$export_symbols_regex"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  # Prepare the list of exported symbols
+	  if test -z "$export_symbols"; then
+	    export_symbols="$output_objdir/$outputname.exp"
+	    $opt_dry_run || {
+	      $RM $export_symbols
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      case $host in
+	      *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+	        ;;
+	      esac
+	    }
+	  else
+	    $opt_dry_run || {
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	      case $host in
+	        *cygwin | *mingw* | *cegcc* )
+	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+	          ;;
+	      esac
+	    }
+	  fi
+	fi
+
+	for dlprefile in $dlprefiles; do
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_basename "$dlprefile"
+	  name="$func_basename_result"
+	  $opt_dry_run || {
+	    eval '$ECHO ": $name " >> "$nlist"'
+	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	  }
+	done
+
+	$opt_dry_run || {
+	  # Make sure we have at least an empty file.
+	  test -f "$nlist" || : > "$nlist"
+
+	  if test -n "$exclude_expsyms"; then
+	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	    $MV "$nlist"T "$nlist"
+	  fi
+
+	  # Try sorting and uniquifying the output.
+	  if $GREP -v "^: " < "$nlist" |
+	      if sort -k 3 </dev/null >/dev/null 2>&1; then
+		sort -k 3
+	      else
+		sort +2
+	      fi |
+	      uniq > "$nlist"S; then
+	    :
+	  else
+	    $GREP -v "^: " < "$nlist" > "$nlist"S
+	  fi
+
+	  if test -f "$nlist"S; then
+	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+	  else
+	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
+
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+"
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc* )
+	    $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs.  */"
+	    lt_dlsym_const= ;;
+	  *osf5*)
+	    echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+	    lt_dlsym_const= ;;
+	  *)
+	    lt_dlsym_const=const ;;
+	  esac
+
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
+
+	  case $need_lib_prefix in
+	  no)
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  *)
+	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  esac
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
+
+	pic_flag_for_symtable=
+	case "$compile_command " in
+	*" -static "*) ;;
+	*)
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+	  *-*-hpux*)
+	    pic_flag_for_symtable=" $pic_flag"  ;;
+	  *)
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
+	    fi
+	    ;;
+	  esac
+	  ;;
+	esac
+	symtab_cflags=
+	for arg in $LTCFLAGS; do
+	  case $arg in
+	  -pie | -fpie | -fPIE) ;;
+	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  esac
+	done
+
+	# Now compile the dynamic symbol file.
+	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+	# Transform the symbol file into the correct name.
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	case $host in
+	*cygwin* | *mingw* | *cegcc* )
+	  if test -f "$output_objdir/$my_outputname.def"; then
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	  else
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  fi
+	  ;;
+	*)
+	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  ;;
+	esac
+	;;
+      *)
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
+
+      # Nullify the symbol file.
+      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+    fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 |
+	$SED -n -e '
+	    1,100{
+		/ I /{
+		    s,.*,import,
+		    p
+		    q
+		}
+	    }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  func_arith $extracted_serial + 1
+	  extracted_serial=$func_arith_result
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+	func_verbose "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	$opt_dry_run || {
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename "$darwin_archive"`
+	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+	  if test -n "$darwin_arches"; then
+	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      $LIPO -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    $RM -rf unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd $darwin_orig_dir
+	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	} # !$opt_dry_run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+	;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+	func_emit_wrapper_part1_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part1_arg1=$1
+	fi
+
+	$ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    ECHO=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$ECHO works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$ECHO will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$ECHO "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+	func_emit_wrapper_part2_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part2_arg1=$1
+	fi
+
+	$ECHO "\
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+	  $ECHO "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$ECHO \"\$relink_command_output\" >&2
+	$RM \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+	else
+	  $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2* | *-cegcc*)
+	  $ECHO "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+	  ;;
+
+	*)
+	  $ECHO "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+	  ;;
+	esac
+	$ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_arg1=$1
+	fi
+
+	# split this up so that func_emit_cwrapperexe_src
+	# can call each part independently.
+	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin.  Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+  func_to_host_path_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        case $build in
+          *mingw* ) # actually, msys
+            # awkward: cmd appends spaces to result
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_path_tmp1=`cygpath -w "$1"`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # Unfortunately, winepath does not exit with a non-zero
+            # error code, so we are forced to check the contents of
+            # stdout. On the other hand, if the command is not
+            # found, the shell will set an exit code of 127 and print
+            # *an error message* to stdout. So we must check for both
+            # error code of zero AND non-empty stdout, which explains
+            # the odd construction:
+            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+                $SED -e "$lt_sed_naive_backslashify"`
+            else
+              # Allow warning below.
+              func_to_host_path_result=""
+            fi
+            ;;
+        esac
+        if test -z "$func_to_host_path_result" ; then
+          func_error "Could not determine host path corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback:
+          func_to_host_path_result="$1"
+        fi
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+  func_to_host_pathlist_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        # Remove leading and trailing path separator characters from
+        # ARG. msys behavior is inconsistent here, cygpath turns them
+        # into '.;' and ';.', and winepath ignores them completely.
+        func_to_host_pathlist_tmp2="$1"
+        # Once set for this call, this variable should not be
+        # reassigned. It is used in tha fallback case.
+        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+          $SED -e 's|^:*||' -e 's|:*$||'`
+        case $build in
+          *mingw* ) # Actually, msys.
+            # Awkward: cmd appends spaces to result.
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # unfortunately, winepath doesn't convert pathlists
+            func_to_host_pathlist_result=""
+            func_to_host_pathlist_oldIFS=$IFS
+            IFS=:
+            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+              IFS=$func_to_host_pathlist_oldIFS
+              if test -n "$func_to_host_pathlist_f" ; then
+                func_to_host_path "$func_to_host_pathlist_f"
+                if test -n "$func_to_host_path_result" ; then
+                  if test -z "$func_to_host_pathlist_result" ; then
+                    func_to_host_pathlist_result="$func_to_host_path_result"
+                  else
+                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+                  fi
+                fi
+              fi
+              IFS=:
+            done
+            IFS=$func_to_host_pathlist_oldIFS
+            ;;
+        esac
+        if test -z "$func_to_host_pathlist_result" ; then
+          func_error "Could not determine the host path(s) corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback. This may break if $1 contains DOS-style drive
+          # specifications. The fix is not to complicate the expression
+          # below, but for the user to provide a working wine installation
+          # with winepath so that path translation in the cross-to-mingw
+          # case works properly.
+          lt_replace_pathsep_nix_to_dos="s|:|;|g"
+          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+            $SED -e "$lt_replace_pathsep_nix_to_dos"`
+        fi
+        # Now, add the leading and trailing path separators back
+        case "$1" in
+          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+            ;;
+        esac
+        case "$1" in
+          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+            ;;
+        esac
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+	cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+#  define HAVE_SETENV
+#  ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+#  endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+    va_list args;
+    va_start (args, fmt);
+    (void) vfprintf (stderr, fmt, args);
+    va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+	    func_emit_wrapper_part1 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+	    cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+	    func_emit_wrapper_part2 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+
+	    cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_pathlist "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_pathlist "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+	    else
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+	    fi
+
+
+	    cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
+
+static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
+  /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
+  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
+  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
+
+	    cat <<"EOF"
+	  printf ("%s", script_text_part1);
+	  printf ("%s", script_text_part2);
+	  return 0;
+	}
+    }
+
+  newargz = XMALLOC (char *, argc + 1);
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+			  tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+			  actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+			  target_name));
+EOF
+
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
+
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+        {
+          if (argv[i][env_set_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_set_opt_len + 1;
+              lt_opt_process_env_set (p);
+            }
+          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_set (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_set_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+        {
+          if (argv[i][env_prepend_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_prepend_opt_len + 1;
+              lt_opt_process_env_prepend (p);
+            }
+          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_prepend_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+        {
+          if (argv[i][env_append_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_append_opt_len + 1;
+              lt_opt_process_env_append (p);
+            }
+          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_append (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_append_opt);
+          continue;
+        }
+      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal ("Unrecognized option in %s namespace: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  for (i = 0; i < newargc; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+    }
+
+EOF
+
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
+
+	    cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
+
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+	return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+	{
+	  concat_name = xstrdup (wrapper);
+	  if (check_executable (concat_name))
+	    return concat_name;
+	  XFREE (concat_name);
+	}
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+	has_slash = 1;
+	break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+	{
+	  for (p = path; *p; p = p_next)
+	    {
+	      const char *q;
+	      size_t p_len;
+	      for (q = p; *q; q++)
+		if (IS_PATH_SEPARATOR (*q))
+		  break;
+	      p_len = q - p;
+	      p_next = (*q == '\0' ? q : q + 1);
+	      if (p_len == 0)
+		{
+		  /* empty path: current directory */
+		  if (getcwd (tmp, LT_PATHMAX) == NULL)
+		    lt_fatal ("getcwd failed");
+		  tmp_len = strlen (tmp);
+		  concat_name =
+		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, tmp, tmp_len);
+		  concat_name[tmp_len] = '/';
+		  strcpy (concat_name + tmp_len + 1, wrapper);
+		}
+	      else
+		{
+		  concat_name =
+		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, p, p_len);
+		  concat_name[p_len] = '/';
+		  strcpy (concat_name + p_len + 1, wrapper);
+		}
+	      if (check_executable (concat_name))
+		return concat_name;
+	      XFREE (concat_name);
+	    }
+	}
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+			      tmp_pathspec));
+      if (lstat (tmp_pathspec, &s) == 0)
+	{
+	  if (S_ISLNK (s.st_mode) != 0)
+	    {
+	      has_symlinks = 1;
+	      break;
+	    }
+
+	  /* search backwards for last DIR_SEPARATOR */
+	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    p--;
+	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    {
+	      /* no more DIR_SEPARATORS left */
+	      break;
+	    }
+	  *p = '\0';
+	}
+      else
+	{
+	  char *errstr = strerror (errno);
+	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+	}
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+	*str = '\0';
+    }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+	       const char *message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+  const char *p;
+  int len;
+  if (!arg || !*arg)
+    return 1;
+
+  p = strchr (arg, (int)'=');
+
+  if (!p)
+    return 1;
+
+  *value = xstrdup (++p);
+
+  len = strlen (arg) - strlen (*value);
+  *name = XMALLOC (char, len);
+  strncpy (*name, arg, len-1);
+  (*name)[len - 1] = '\0';
+
+  return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+    }
+
+  lt_setenv (name, value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 0);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
+
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+    }
+
+  new_value = lt_extend_str (getenv (name), value, 1);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	break
+	;;
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    func_warning "complete static linking is impossible in this configuration"
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  func_append compile_command " @OUTPUT@"
+	  func_append finalize_command " @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    func_append compile_command " @SYMFILE@"
+	    func_append finalize_command " @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  test -f "$arg" \
+	    || func_fatal_error "symbol file \`$arg' does not exist"
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+		*" $qarg.ltframework "*) ;;
+		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		   ;;
+	      esac
+	      ;;
+	  esac
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat "$save_arg"`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		func_source "$arg"
+
+		if test -z "$pic_object" ||
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
+		fi
+
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  func_append libobjs " $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  func_append non_pic_objects " $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if $opt_dry_run; then
+		  # Extract subdirectory from the argument.
+		  func_dirname "$arg" "/" ""
+		  xdir="$func_dirname_result"
+
+		  func_lo2o "$arg"
+		  pic_object=$xdir$objdir/$func_lo2o_result
+		  non_pic_object=$xdir$func_lo2o_result
+		  func_append libobjs " $pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+	        else
+		  func_fatal_error "\`$arg' is not a valid libtool object"
+		fi
+	      fi
+	    done
+	  else
+	    func_fatal_error "link input file \`$arg' does not exist"
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    func_fatal_error "only absolute run-paths are allowed"
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  weak_libs="$weak_libs $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  func_append compile_command " $wl$qarg"
+	  func_append finalize_command " $wl$qarg"
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  # See comment for -static flag below, for more details.
+	  func_append compile_command " $link_static_flag"
+	  func_append finalize_command " $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  func_fatal_error "more than one -exported-symbols argument is not allowed"
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+	prev=framework
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	func_stripname '-L' '' "$arg"
+	dir=$func_stripname_result
+	if test -z "$dir"; then
+	  if test "$#" -gt 0; then
+	    func_fatal_error "require no space between \`-L' and \`$1'"
+	  else
+	    func_fatal_error "need path for \`-L' option"
+	  fi
+	fi
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  test -z "$absdir" && \
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  ::) dllsearchpath=$dir;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	prev=xcompiler
+	continue
+	;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+	esac
+	continue
+	;;
+
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	func_stripname '-R' '' "$arg"
+	dir=$func_stripname_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
+
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -weak)
+        prev=weak
+	continue
+	;;
+
+      -Wc,*)
+	func_stripname '-Wc,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Wl,*)
+	func_stripname '-Wl,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+	  linker_flags="$linker_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  func_source "$arg"
+
+	  if test -z "$pic_object" ||
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    func_append libobjs " $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    func_append non_pic_objects " $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if $opt_dry_run; then
+	    # Extract subdirectory from the argument.
+	    func_dirname "$arg" "/" ""
+	    xdir="$func_dirname_result"
+
+	    func_lo2o "$arg"
+	    pic_object=$xdir$objdir/$func_lo2o_result
+	    non_pic_object=$xdir$func_lo2o_result
+	    func_append libobjs " $pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_duplicate_deps ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+	passes="conv dlpreopen link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+	## FIXME: Find the place where the list is rebuilt in the wrong
+	##        order, and fix it there properly
+        tmp_deplibs=
+	for deplib in $deplibs; do
+	  tmp_deplibs="$deplib $tmp_deplibs"
+	done
+	deplibs="$tmp_deplibs"
+      fi
+
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link)
+	  libs="$deplibs %DEPLIBS%"
+	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+	  ;;
+	esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+	# Collect and forward deplibs of preopened libtool libs
+	for lib in $dlprefiles; do
+	  # Ignore non-libtool-libs
+	  dependency_libs=
+	  case $lib in
+	  *.la)	func_source "$lib" ;;
+	  esac
+
+	  # Collect preopened libtool deplibs, except any this library
+	  # has declared as weak libs
+	  for deplib in $dependency_libs; do
+            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+	    case " $weak_libs " in
+	    *" $deplib_base "*) ;;
+	    *) deplibs="$deplibs $deplib" ;;
+	    esac
+	  done
+	done
+	libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    continue
+	  fi
+	  func_stripname '-l' '' "$deplib"
+	  name=$func_stripname_result
+	  if test "$linkmode" = lib; then
+	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+	  else
+	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+	  fi
+	  for searchdir in $searchdirs; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if func_lalib_p "$lib"; then
+		  library_names=
+		  old_library=
+		  func_source "$lib"
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    func_dirname "$lib" "" "."
+		    ladir="$func_dirname_result"
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+		;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    func_stripname '-R' '' "$deplib"
+	    dir=$func_stripname_result
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    # Linking convenience modules into shared libraries is allowed,
+	    # but linking other static libraries is non-portable.
+	    case " $dlpreconveniencelibs " in
+	    *" $deplib "*) ;;
+	    *)
+	      valid_a_lib=no
+	      case $deplibs_check_method in
+		match_pattern*)
+		  set dummy $deplibs_check_method; shift
+		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		    valid_a_lib=yes
+		  fi
+		;;
+		pass_all)
+		  valid_a_lib=yes
+		;;
+	      esac
+	      if test "$valid_a_lib" != yes; then
+		$ECHO
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
+		$ECHO "*** that it is just a static archive that I should not use here."
+	      else
+		$ECHO
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      fi
+	      ;;
+	    esac
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$lib" \
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+	func_dirname "$lib" "" "."
+	ladir="$func_dirname_result"
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	inherited_linker_flags=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	func_source "$lib"
+
+	# Convert "-framework foo" to "foo.ltframework"
+	if test -n "$inherited_linker_flags"; then
+	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      func_fatal_error "cannot find name of link library for \`$lib'"
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    func_fatal_error "\`$lib' is not a convenience library"
+	  fi
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    deplibs="$deplib $deplibs"
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  func_fatal_error "cannot find name of link library for \`$lib'"
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "passing it literally to the linker, although it might fail"
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	func_basename "$lib"
+	laname="$func_basename_result"
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    func_warning "library \`$lib' was moved."
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	func_stripname 'lib' '.la' "$laname"
+	name=$func_stripname_result
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	    # Keep a list of preopened convenience libraries to check
+	    # that they are being used correctly in the link pass.
+	    test -z "$libdir" && \
+		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) func_stripname '-L' '' "$deplib"
+	         newlib_search_path="$newlib_search_path $func_stripname_result"
+		 ;;
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath:" in
+	      *"$absdir:"*) ;;
+	      *) temp_rpath="$temp_rpath$absdir:" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc*)
+	      # No point in relinking DLLs because paths are not encoded
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=yes
+	    fi
+	    ;;
+	  esac
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on some
+	  # systems (darwin).  Don't bleat about dlopened modules though!
+	  dlopenmodule=""
+	  for dlpremoduletest in $dlprefiles; do
+	    if test "X$dlpremoduletest" = "X$lib"; then
+	      dlopenmodule="$dlpremoduletest"
+	      break
+	    fi
+	  done
+	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+	    $ECHO
+	    if test "$linkmode" = prog; then
+	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $ECHO "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    shift
+	    realname="$1"
+	    shift
+	    libname=`eval "\\$ECHO \"$libname_spec\""`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw* | *cegcc*)
+	        func_arith $current - $age
+		major=$func_arith_result
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    func_basename "$soroot"
+	    soname="$func_basename_result"
+	    func_stripname 'lib' '.dll' "$soname"
+	    newlib=libimp-$func_stripname_result.a
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      func_verbose "generating import library for \`$soname'"
+	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a (non-dlopened) module then we can not
+		    # link against it, someone is ignoring the earlier warnings
+		    if /usr/bin/file -L $add 2> /dev/null |
+			 $GREP ": [^:]* bundle" >/dev/null ; then
+		      if test "X$dlopenmodule" != "X$lib"; then
+			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
+			if test -z "$old_library" ; then
+			  $ECHO
+			  $ECHO "*** And there doesn't seem to be a static archive available"
+			  $ECHO "*** The link will probably fail, sorry"
+			else
+			  add="$dir/$old_library"
+			fi
+		      elif test -n "$old_library"; then
+			add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes &&
+	         test "$hardcode_direct_absolute" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      func_fatal_configuration "unsupported hardcode properties"
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes &&
+		 test "$hardcode_minus_L" != yes &&
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes &&
+	       test "$hardcode_direct_absolute" = no; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+		add="$inst_prefix_dir$libdir/$linklib"
+	      else
+		add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $ECHO
+	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
+	    $ECHO "*** I have the capability to make that library automatically link in when"
+	    $ECHO "*** you link to this library.  But I can only do this if you have a"
+	    $ECHO "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $ECHO "*** But as you try to build a module library, libtool will still create "
+	      $ECHO "*** a static module, that should work as long as the dlopening application"
+	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$ECHO
+		$ECHO "*** However, this would only work if libtool was able to extract symbol"
+		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$ECHO "*** not find such a program.  So, this module is probably useless."
+		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) func_stripname '-R' '' "$libdir"
+	           temp_xrpath=$func_stripname_result
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+	        func_dirname "$deplib" "" "."
+		dir="$func_dirname_result"
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if $GREP "^installed=no" $deplib > /dev/null; then
+		case $host in
+		*-*-darwin*)
+		  depdepl=
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+		      path=
+		    fi
+		  fi
+		  ;;
+		*)
+		  path="-L$absdir/$objdir"
+		  ;;
+		esac
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  test -z "$libdir" && \
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  test "$absdir" != "$libdir" && \
+		    func_warning "\`$deplib' seems to be moved"
+
+		  path="-L$absdir"
+		fi
+		;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
+	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+	else
+	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	fi
+      fi
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+	func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	func_stripname 'lib' '.la' "$outputname"
+	name=$func_stripname_result
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  func_stripname '' '.la' "$outputname"
+	  name=$func_stripname_result
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  func_stripname '' '.la' "$outputname"
+	  libname=$func_stripname_result
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	else
+	  $ECHO
+	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+	  $ECHO "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	test -n "$vinfo" && \
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+	test -n "$release" && \
+	  func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	shift
+	IFS="$save_ifs"
+
+	test -n "$7" && \
+	  func_fatal_help "too many parameters to \`-version-info'"
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$1"
+	  number_minor="$2"
+	  number_revision="$3"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  *)
+	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$1"
+	  revision="$2"
+	  age="$3"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  func_arith $current + 1
+	  minor_current=$func_arith_result
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    func_arith $current - $age
+	  else
+	    func_arith $current - $age + 1
+	  fi
+	  major=$func_arith_result
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    func_arith $revision - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    func_arith $current - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	qnx)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  func_arith $current - $age
+	  major=$func_arith_result
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      libobjs="$libobjs $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$ECHO "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext | *.gcno)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+		 then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	test -n "$removelist" && \
+	  func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $opt_dry_run || $RM conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+		fi
+		if test -n "$i" ; then
+		  libname=`eval "\\$ECHO \"$libname_spec\""`
+		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		  set dummy $deplib_matches; shift
+		  deplib_match=$1
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $ECHO
+		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		    $ECHO "*** I have the capability to make that library automatically link in when"
+		    $ECHO "*** you link to this library.  But I can only do this if you have a"
+		    $ECHO "*** shared version of the library, which I believe you do not have"
+		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $RM conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval "\\$ECHO \"$libname_spec\""`
+		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		    set dummy $deplib_matches; shift
+		    deplib_match=$1
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $ECHO
+		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		      $ECHO "*** I have the capability to make that library automatically link in when"
+		      $ECHO "*** you link to this library.  But I can only do this if you have a"
+		      $ECHO "*** shared version of the library, which you do not appear to have"
+		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $ECHO
+		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $ECHO "*** make it link in!  You will probably need to install it or some"
+		  $ECHO "*** library that it depends on before this library will be fully"
+		  $ECHO "*** functional.  Installing it before continuing would be even better."
+		fi
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null |
+			 $GREP " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+			 $SED -e 10q |
+			 $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$ECHO
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method; shift
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+		       $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$ECHO
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+	    done
+	  fi
+	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
+	     $GREP . >/dev/null; then
+	    $ECHO
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $ECHO "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library with the System framework
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $ECHO
+	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $ECHO "*** a static module, that should work as long as the dlopening"
+	    $ECHO "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $ECHO
+	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
+	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $ECHO "*** not find such a program.  So, this module is probably useless."
+	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
+	    $ECHO "*** automatically added whenever a program is linked with this library"
+	    $ECHO "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $ECHO
+	      $ECHO "*** Since this library must not contain undefined symbols,"
+	      $ECHO "*** because either the platform does not support them or"
+	      $ECHO "*** it was explicitly requested with -no-undefined,"
+	      $ECHO "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+	*-*-darwin*)
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  ;;
+      esac
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	shift
+	realname="$1"
+	shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	test "X$libobjs" = "X " && libobjs=
+
+	delfiles=
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+	  export_symbols="$output_objdir/$libname.uexp"
+	  delfiles="$delfiles $export_symbols"
+	fi
+
+	orig_export_symbols=
+	case $host_os in
+	cygwin* | mingw* | cegcc*)
+	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+	    # exporting using user supplied symfile
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	      # and it's NOT already a .def file. Must figure out
+	      # which of the given symbols are data symbols and tag
+	      # them as such. So, trigger use of export_symbols_cmds.
+	      # export_symbols gets reassigned inside the "prepare
+	      # the list of exported symbols" if statement, so the
+	      # include_expsyms logic still works.
+	      orig_export_symbols="$export_symbols"
+	      export_symbols=
+	      always_export_symbols=yes
+	    fi
+	  fi
+	  ;;
+	esac
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $opt_dry_run || $RM $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      func_len " $cmd"
+	      len=$func_len_result
+	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "using reloadable object file for export list..."
+		skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	fi
+
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	  # The given exports_symbols file has to be filtered, so filter it.
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # though. Also, the filter scales superlinearly with the number of
+	  # global variables. join(1) would be nice here, but unfortunately
+	  # isn't a blessed tool.
+	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	  export_symbols=$output_objdir/$libname.def
+	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+	  case " $convenience " in
+	  *" $test_deplib "*) ;;
+	  *)
+	    tmp_deplibs="$tmp_deplibs $test_deplib"
+	    ;;
+	  esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec" &&
+	    test "$compiler_needs_object" = yes &&
+	    test -z "$libobjs"; then
+	    # extract the archives, so we have objects to list.
+	    # TODO: could optimize this to just extract one archive.
+	    whole_archive_flag_spec=
+	  fi
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    eval test_cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
+	  else
+	    eval test_cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   func_len " $test_cmds" &&
+	   len=$func_len_result &&
+	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise
+	  # or, if using GNU ld and skipped_export is not :, use a linker
+	  # script.
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  last_robj=
+	  k=1
+
+	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
+	    func_verbose "creating GNU ld script: $output"
+	    $ECHO 'INPUT (' > $output
+	    for obj in $save_libobjs
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    $ECHO ')' >> $output
+	    delfiles="$delfiles $output"
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
+	    fi
+	    for obj
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    delfiles="$delfiles $output"
+	    output=$firstobj\"$file_list_spec$output\"
+	  else
+	    if test -n "$save_libobjs"; then
+	      func_verbose "creating reloadable object files..."
+	      output=$output_objdir/$output_la-${k}.$objext
+	      eval test_cmds=\"$reload_cmds\"
+	      func_len " $test_cmds"
+	      len0=$func_len_result
+	      len=$len0
+
+	      # Loop over the list of objects to be linked.
+	      for obj in $save_libobjs
+	      do
+		func_len " $obj"
+		func_arith $len + $func_len_result
+		len=$func_arith_result
+		if test "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  func_append objlist " $obj"
+		else
+		  # The command $test_cmds is almost too long, add a
+		  # command to the queue.
+		  if test "$k" -eq 1 ; then
+		    # The first file doesn't have a previous command to add.
+		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+		  else
+		    # All subsequent reloadable object files will link in
+		    # the last one created.
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+		  fi
+		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  func_arith $k + 1
+		  k=$func_arith_result
+		  output=$output_objdir/$output_la-${k}.$objext
+		  objlist=$obj
+		  func_len " $last_robj"
+		  func_arith $len0 + $func_len_result
+		  len=$func_arith_result
+		fi
+	      done
+	      # Handle the remaining objects by creating one last
+	      # reloadable object file.  All subsequent reloadable object
+	      # files will link in the last one created.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+	      if test -n "$last_robj"; then
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	      fi
+	      delfiles="$delfiles $output"
+
+	    else
+	      output=
+	    fi
+
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
+	      $opt_dry_run || $RM $export_symbols
+	      libobjs=$output
+	      # Append the command to create the export file.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+	      if test -n "$last_robj"; then
+		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+	      fi
+	    fi
+
+	    test -n "$save_libobjs" &&
+	      func_verbose "creating a temporary reloadable object file: $output"
+
+	    # Loop through the commands generated above and execute them.
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $concat_cmds; do
+	      IFS="$save_ifs"
+	      $opt_silent || {
+		  func_quote_for_expand "$cmd"
+		  eval "func_echo $func_quote_for_expand_result"
+	      }
+	      $opt_dry_run || eval "$cmd" || {
+		lt_exit=$?
+
+		# Restore the uninstalled library and exit
+		if test "$mode" = relink; then
+		  ( cd "$output_objdir" && \
+		    $RM "${realname}T" && \
+		    $MV "${realname}U" "$realname" )
+		fi
+
+		exit $lt_exit
+	      }
+	    done
+	    IFS="$save_ifs"
+
+	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+
+          if ${skipped_export-false}; then
+	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	    fi
+
+	    if test -n "$orig_export_symbols"; then
+	      # The given exports_symbols file has to be filtered, so filter it.
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # though. Also, the filter scales superlinearly with the number of
+	      # global variables. join(1) would be nice here, but unfortunately
+	      # isn't a blessed tool.
+	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	      export_symbols=$output_objdir/$libname.def
+	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	    fi
+	  fi
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	      cmds=$archive_expsym_cmds
+	    else
+	      cmds=$archive_cmds
+	    fi
+	  fi
+	fi
+
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  libobjs="$libobjs $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
+	fi
+
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $opt_silent || {
+	    func_quote_for_expand "$cmd"
+	    eval "func_echo $func_quote_for_expand_result"
+	  }
+	  $opt_dry_run || eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      ( cd "$output_objdir" && \
+	        $RM "${realname}T" && \
+		$MV "${realname}U" "$realname" )
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      func_show_eval '${RM}r "$gentop"'
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+	test -n "$objs$old_deplibs" && \
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+	libobj=$output
+	func_lo2o "$libobj"
+	obj=$func_lo2o_result
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+	func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) func_stripname '' '.exe' "$output"
+	          output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for programs"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
+
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+	# Don't allow lazy linking, it breaks C++ global constructors
+	# But is supposedly fixed on 10.4 or later (yay!).
+	if test "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      compile_command="$compile_command ${wl}-bind_at_load"
+	      finalize_command="$finalize_command ${wl}-bind_at_load"
+	    ;;
+	  esac
+	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  ::) dllsearchpath=$libdir;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *cegcc)
+        # Disable wrappers for cegcc, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+	# Replace the output file specification.
+	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
+
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	fi
+
+	exit $exit_status
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Quote $ECHO for shipping.
+      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) func_stripname '' '.exe' "$output"
+	         output=$func_stripname_result ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    func_stripname '' '.exe' "$outputname"
+	    outputname=$func_stripname_result ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    func_dirname_and_basename "$output" "" "."
+	    output_name=$func_basename_result
+	    output_path=$func_dirname_result
+	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
+	    cwrapper="$output_path/$output_name.exe"
+	    $RM $cwrappersource $cwrapper
+	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_cwrapperexe_src > $cwrappersource
+
+	    # The wrapper executable is built using the $host compiler,
+	    # because it contains $host paths and files. If cross-
+	    # compiling, it, like the target executable, must be
+	    # executed on the $host or under an emulation environment.
+	    $opt_dry_run || {
+	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+	      $STRIP $cwrapper
+	    }
+
+	    # Now, create the wrapper script for func_source use:
+	    func_ltwrapper_scriptname $cwrapper
+	    $RM $func_ltwrapper_scriptname_result
+	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+	    $opt_dry_run || {
+	      # note: this script will not be executed, so do not chmod.
+	      if test "x$build" = "x$host" ; then
+		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+	      else
+		func_emit_wrapper no > $func_ltwrapper_scriptname_result
+	      fi
+	    }
+	  ;;
+	  * )
+	    $RM $output
+	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_wrapper no > $output
+	    chmod +x $output
+	  ;;
+	esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $symfileobj"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    oldobjs="$oldobjs $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
+
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	cmds=$old_archive_from_new_cmds
+      else
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  oldobjs="$oldobjs $func_extract_archives_result"
+	fi
+
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      func_basename "$obj"
+	      $ECHO "$func_basename_result"
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $ECHO "copying selected object files to avoid basename conflicts..."
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+	  func_mkdir_p "$gentop"
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    func_basename "$obj"
+	    objbase="$func_basename_result"
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		func_arith $counter + 1
+		counter=$func_arith_result
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+	eval cmds=\"$old_archive_cmds\"
+
+	func_len " $cmds"
+	len=$func_len_result
+	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  func_verbose "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  eval test_cmds=\"$old_archive_cmds\"
+	  func_len " $test_cmds"
+	  len0=$func_len_result
+	  len=$len0
+	  for obj in $save_oldobjs
+	  do
+	    func_len " $obj"
+	    func_arith $len + $func_len_result
+	    len=$func_arith_result
+	    func_append objlist " $obj"
+	    if test "$len" -lt "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+		RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	      len=$len0
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  func_quote_for_eval "$var_value"
+	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		func_basename "$deplib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+
+	    for lib in $dlfiles; do
+	      case $lib in
+	      *.la)
+	        func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlfiles="$newdlfiles $libdir/$name"
+		;;
+	      *) newdlfiles="$newdlfiles $lib" ;;
+	      esac
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+	      *.la)
+		# Only pass preopened files to the pseudo-archive (for
+		# eventual linking with the app. that links it) if we
+		# didn't already link the preopened objects directly into
+		# the library:
+		func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlprefiles="$newdlprefiles $libdir/$name"
+		;;
+	      esac
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $RM $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $ECHO >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+    func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) RM="$RM $arg"; rmforce=yes ;;
+      -*) RM="$RM $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+	objdir="$origobjdir"
+      else
+	objdir="$dir/$origobjdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+	case " $rmdirs " in
+	  *" $objdir "*) ;;
+	  *) rmdirs="$rmdirs $objdir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+	 { test -h "$file"; } >/dev/null 2>&1 ||
+	 test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if func_lalib_p "$file"; then
+	  func_source $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    rmfiles="$rmfiles $objdir/$n"
+	  done
+	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+	  case "$mode" in
+	  clean)
+	    case "  $library_names " in
+	    # "  " in the beginning catches empty $dlname
+	    *" $dlname "*) ;;
+	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    esac
+	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if func_lalib_p "$file"; then
+
+	  # Read the .lo file
+	  func_source $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
+	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    func_stripname '' '.exe' "$file"
+	    file=$func_stripname_result
+	    func_stripname '' '.exe' "$name"
+	    noexename=$func_stripname_result
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if func_ltwrapper_p "$file"; then
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      relink_command=
+	      func_source $func_ltwrapper_scriptname_result
+	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	    else
+	      relink_command=
+	      func_source $dir/$noexename
+	    fi
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644
index 0000000..2ca1c1f
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1,7373 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+  ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool at gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+  lt_cl_success=:
+  test "$silent" = yes &&
+    lt_config_lt_args="$lt_config_lt_args --quiet"
+  exec AS_MESSAGE_LOG_FD>/dev/null
+  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+  exec AS_MESSAGE_LOG_FD>>config.log
+  $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_XSI_SHELLFNS
+
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [Java],		[_LT_LANG(GCJ)],
+  [Fortran 77],		[_LT_LANG(F77)],
+  [Fortran],		[_LT_LANG(FC)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+	[lt_cv_ld_exported_symbols_list=yes],
+	[lt_cv_ld_exported_symbols_list=no])
+	LDFLAGS="$save_LDFLAGS"
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+[$]*
+_LT_EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
+
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
+
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
+
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
+
+	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "[$]0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+    [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_HELP_STRING([--disable-libtool-lock],
+    [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}]
+_LT_EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+	[], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+       [shlibpath_overrides_runpath=yes])])
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsdelf*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='NetBSD ld.elf_so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  if ( file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd* | netbsdelf*-gnu)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+const struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd* | netbsdelf*-gnu)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+	[Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  linux* | k*bsd*-gnu)
+    _LT_TAGVAR(link_all_deplibs, $1)=no
+  ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 _LT_SYS_MODULE_PATH_AIX
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        AC_LINK_IFELSE(int foo(void) {},
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+        )
+        LDFLAGS="$save_LDFLAGS"
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd* | netbsdelf*-gnu)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+        _LT_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+        then
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+    [[If ld is used when linking, flag to hardcode $libdir into a binary
+    during linking.  This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+    [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_LD
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        _LT_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[[012]]|aix4.[[012]].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        _LT_TAGVAR(always_export_symbols, $1)=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    _LT_SYS_MODULE_PATH_AIX
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+        # as there is no search path for DLLs.
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+        _LT_TAGVAR(always_export_symbols, $1)=no
+        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          _LT_TAGVAR(ld_shlibs, $1)=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            _LT_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+	    ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+		$RANLIB $oldlib'
+	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	    case $host_os in
+	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    output_verbose_link_cmd='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+		*)
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+	   _LT_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${F77-"f77"}
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+  # positional parameters, so assign one to ordinary parameter first.
+  func_stripname_result=${3}
+  func_stripname_result=${func_stripname_result#"${1}"}
+  func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]+=\$[2]"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+    ;;
+  esac
+])
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644
index 0000000..34151a3
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1,368 @@
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+        _LT_MANGLE_DEFUN([$1], [$2]),
+    [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  dnl
+  dnl If no reference was made to various pairs of opposing options, then
+  dnl we run the default mode handler for the pair.  For example, if neither
+  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl archives by default:
+  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+  		   [_LT_ENABLE_FAST_INSTALL])
+  ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 100644
index 0000000..9000a05
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 100644
index 0000000..b8e154f
--- /dev/null
+++ b/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3012 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6])
+m4_define([LT_PACKAGE_REVISION], [1.3012])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6'
+macro_revision='1.3012'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 100644
index 0000000..637bb20
--- /dev/null
+++ b/m4/lt~obsolete.m4
@@ -0,0 +1,92 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/missing b/missing
new file mode 100755
index 0000000..1c8ff70
--- /dev/null
+++ b/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case $firstarg in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case $firstarg in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/variables.in b/variables.in
index e85843b..07ca004 100644
--- a/variables.in
+++ b/variables.in
@@ -40,12 +40,6 @@ OPTIM=@OPTIM@
 # MAdLib definitions
 MAdLib_DEFS=@MAdLib_DEFS@
 
-# MAdLib root directory
-MAdROOT=@MAdROOT@
-
-# MAdLib subdirectories
-MAdLib_TMPDIR=@MAdLib_TMPDIR@
-
 # MAdLib subdirectories
 MAdLib_DIRS=@MAdLib_DIRS@
 
@@ -56,7 +50,7 @@ MAdLib_LIBS=@MAdLib_LIBS@
 MAdLib_INCLUDES=@MAdLib_INCLUDES@
 
 # MAdLib benchmarks subdirectories
-MAdLib_BENCHDIRS=@MAdLib_BENCHDIRS@
+#MAdLib_BENCHDIRS=@MAdLib_BENCHDIRS@
 
 # How you create a static library on this machine
 AR=@AR@
@@ -72,13 +66,16 @@ LIBEXT=@LIBEXT@
 EXEEXT=@EXEEXT@
 
 # File handling commands
-RM=rm -f
+RM=@RM@
 
 # Documentation genration
 DOXYGEN=@DOXYGEN@
 
 # Installation directories
 prefix=@prefix@
+srcdir=@srcdir@
+top_srcdir=@top_srcdir@
+ac_top_srcdir=@ac_top_srcdir@
 exec_prefix=@exec_prefix@
 bindir=@bindir@
 datadir=@datadir@

-- 
MAdLib, a mesh adaptation library.



More information about the Pkg-scicomp-commits mailing list