diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp
index 6f510040955739b8443b07e29deab31210ff29c3..ea039c6b25d1f6df251d2bc389062817180d2887 100644
--- a/Common/CommandLine.cpp
+++ b/Common/CommandLine.cpp
@@ -6,6 +6,17 @@
 #include <string>
 #include <string.h>
 #include <stdlib.h>
+#include "GmshConfig.h"
+#include "GmshDefines.h"
+#include "GmshVersion.h"
+#include "GmshMessage.h"
+#include "OpenFile.h"
+#include "CommandLine.h"
+#include "Context.h"
+#include "Options.h"
+#include "GModel.h"
+#include "CreateFile.h"
+#include "OS.h"
 
 #if defined(HAVE_FLTK)
 #include <FL/Fl.H>
@@ -18,17 +29,6 @@
 #endif
 #endif
 
-#include "GmshDefines.h"
-#include "GmshVersion.h"
-#include "GmshMessage.h"
-#include "OpenFile.h"
-#include "CommandLine.h"
-#include "Context.h"
-#include "Options.h"
-#include "GModel.h"
-#include "CreateFile.h"
-#include "OS.h"
-
 #if !defined(HAVE_NO_POST)
 #include "PView.h"
 #endif
diff --git a/Common/CreateFile.cpp b/Common/CreateFile.cpp
index 2a713bf9da92067aa57354fca92aafa301ae1d53..111bb3c00ec9fe8a2a491d79ef8f930cc74fc2d9 100644
--- a/Common/CreateFile.cpp
+++ b/Common/CreateFile.cpp
@@ -4,6 +4,7 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <string.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "GModel.h"
 #include "GmshDefines.h"
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 2fbc2ecae22b342d27e3f907c81ba9f92c98ddaa..b7d60ff987c8a0edf5ba6b625a4df41e52e10135 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -6,6 +6,7 @@
 #ifndef _DEFAULT_OPTIONS_H_
 #define _DEFAULT_OPTIONS_H_
 
+#include "GmshConfig.h"
 #include "GmshDefines.h"
 #include "Options.h"
 
diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp
index 2d3a20f3c56ea618b26185a6741ab31bef9b1264..4868a115d151a780b137d8b86dd53492b6db2cb2 100644
--- a/Common/Gmsh.cpp
+++ b/Common/Gmsh.cpp
@@ -5,6 +5,7 @@
 
 #include <string>
 #include <time.h>
+#include "GmshConfig.h"
 #include "GmshDefines.h"
 #include "GModel.h"
 #include "GmshMessage.h"
diff --git a/Common/GmshConfig.h.in b/Common/GmshConfig.h.in
new file mode 100644
index 0000000000000000000000000000000000000000..dd637bc3108e4fea5801a4268da01a5d5ca30ec7
--- /dev/null
+++ b/Common/GmshConfig.h.in
@@ -0,0 +1,40 @@
+// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
+//
+// See the LICENSE.txt file for license information. Please report all
+// bugs and problems to <gmsh@geuz.org>.
+
+#ifndef _GMSH_CONFIG_H_
+#define _GMSH_CONFIG_H_
+
+#undef HAVE_64BIT_SIZE_T
+#undef HAVE_ANN
+#undef HAVE_BLAS
+#undef HAVE_CBLAS
+#undef HAVE_CHACO
+#undef HAVE_FLTK
+#undef HAVE_FOURIER_MODEL
+#undef HAVE_GMM
+#undef HAVE_GSL
+#undef HAVE_LAPACK
+#undef HAVE_LIBCGNS
+#undef HAVE_LIBJPEG
+#undef HAVE_LIBPNG
+#undef HAVE_LIBZ
+#undef HAVE_MATH_EVAL
+#undef HAVE_MED
+#undef HAVE_METIS
+#undef HAVE_MPI
+#undef HAVE_NATIVE_FILE_CHOOSER
+#undef HAVE_NETGEN
+#undef HAVE_NO_DLL
+#undef HAVE_NO_PARSER
+#undef HAVE_NO_POST
+#undef HAVE_NO_SOCKLEN_T
+#undef HAVE_NO_VSNPRINTF
+#undef HAVE_OCC
+#undef HAVE_OCC_MESH_CONSTRAINTS
+#undef HAVE_OSMESA
+#undef HAVE_TETGEN
+#undef HAVE_TREE_BROWSER
+
+#endif
diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index a067e4b5cf66d5133372b2eb20606a2950efa34b..86ab9206e381f4a81a7d8d587f63480f98a78117 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Gmsh.h"
 #include "Options.h"
diff --git a/Common/GmshSocket.h b/Common/GmshSocket.h
index 63dfe5341707ca33510e4ddb2bf3c96611c03f2f..49d43be628b46740cc64d3fe7bbba67702bb9281 100644
--- a/Common/GmshSocket.h
+++ b/Common/GmshSocket.h
@@ -6,6 +6,7 @@
 #ifndef _GMSH_SOCKET_H_
 #define _GMSH_SOCKET_H_
 
+#include "GmshConfig.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/Common/Hash.h b/Common/Hash.h
index 9f495b9029afd3aeb265e5997ee6800405efac95..733b4b9bee326b5ba917e1e67521b43fbf54173a 100644
--- a/Common/Hash.h
+++ b/Common/Hash.h
@@ -6,6 +6,8 @@
 #ifndef _HASH_H_
 #define _HASH_H_
 
+#include "GmshConfig.h"
+
 //--FNV hashing parameters
 
 #if defined(HAVE_64BIT_SIZE_T)
diff --git a/Common/Makefile b/Common/Makefile
index efaf189d6ccaf50d05283e01cd97ec6bf0c858f5..6b015b091762a962aea4e2c6ca545d7828e60d14 100644
--- a/Common/Makefile
+++ b/Common/Makefile
@@ -56,8 +56,8 @@ depend:
 	rm -f Makefile.new
 
 # DO NOT DELETE THIS LINE
-Gmsh${OBJEXT}: Gmsh.cpp GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+Gmsh${OBJEXT}: Gmsh.cpp GmshConfig.h GmshDefines.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -67,17 +67,17 @@ Gmsh${OBJEXT}: Gmsh.cpp GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/SBoundingBox3d.h GmshMessage.h OpenFile.h CreateFile.h Options.h \
   ../Post/ColorTable.h CommandLine.h OS.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Mesh/Generator.h ../Mesh/Field.h \
-  ../Post/PView.h Context.h ../Geo/CGNSOptions.h \
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Mesh/Generator.h \
+  ../Mesh/Field.h ../Post/PView.h Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h ../Mesh/meshPartition.h GmshDaemon.h \
   ../Plugin/PluginManager.h
-GmshMessage${OBJEXT}: GmshMessage.cpp GmshMessage.h Gmsh.h Options.h \
-  ../Post/ColorTable.h Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h OS.h ../Fltk/GUI.h \
-  ../Fltk/messageWindow.h ../Fltk/extraDialogs.h
-GmshDaemon${OBJEXT}: GmshDaemon.cpp GmshMessage.h OS.h GmshSocket.h
-Options${OBJEXT}: Options.cpp GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+GmshMessage${OBJEXT}: GmshMessage.cpp GmshConfig.h GmshMessage.h Gmsh.h \
+  Options.h ../Post/ColorTable.h Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h OS.h \
+  ../Fltk/GUI.h ../Fltk/messageWindow.h ../Fltk/extraDialogs.h
+GmshDaemon${OBJEXT}: GmshDaemon.cpp GmshMessage.h OS.h GmshSocket.h GmshConfig.h
+Options${OBJEXT}: Options.cpp GmshConfig.h GmshDefines.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -86,8 +86,8 @@ Options${OBJEXT}: Options.cpp GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h GmshMessage.h ../Fltk/Draw.h \
   ../Mesh/Generator.h Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h Options.h ../Post/ColorTable.h \
-  DefaultOptions.h ../Mesh/Field.h ../Post/PView.h \
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h Options.h \
+  ../Post/ColorTable.h DefaultOptions.h ../Mesh/Field.h ../Post/PView.h \
   ../Mesh/BackgroundMesh.h ../Post/PViewOptions.h ../Post/ColorTable.h \
   ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/GmshMessage.h \
   ../Post/adaptiveData.h ../Plugin/PluginManager.h ../Plugin/Plugin.h \
@@ -98,38 +98,39 @@ Options${OBJEXT}: Options.cpp GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Fltk/spherePositionWidget.h ../Fltk/colorbarWindow.h \
   ../Fltk/solverWindow.h ../Fltk/manipWindow.h ../Fltk/messageWindow.h \
   ../Fltk/contextWindow.h ../Fltk/clippingWindow.h
-CommandLine${OBJEXT}: CommandLine.cpp GmshDefines.h GmshVersion.h GmshMessage.h \
-  OpenFile.h CommandLine.h Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h Options.h ../Post/ColorTable.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h CreateFile.h OS.h ../Post/PView.h
+CommandLine${OBJEXT}: CommandLine.cpp GmshConfig.h GmshDefines.h GmshVersion.h \
+  GmshMessage.h OpenFile.h CommandLine.h Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h Options.h \
+  ../Post/ColorTable.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
+  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h CreateFile.h OS.h \
+  ../Post/PView.h
 OS${OBJEXT}: OS.cpp GmshMessage.h
-OpenFile${OBJEXT}: OpenFile.cpp GmshMessage.h ../Geo/Geo.h \
+OpenFile${OBJEXT}: OpenFile.cpp GmshConfig.h GmshMessage.h ../Geo/Geo.h \
   ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
   ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
-  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
-  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
-  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
-  ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h OpenFile.h \
-  CommandLine.h ../Graphics/ReadImg.h OS.h StringUtils.h \
-  ../Parser/Parser.h ../Post/PView.h ../Post/PViewData.h ../Fltk/GUI.h \
-  ../Fltk/Draw.h
-CreateFile${OBJEXT}: CreateFile.cpp GmshMessage.h ../Geo/GModel.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h ../Geo/SPoint2.h ../Geo/ExtrudeParams.h \
+  ../Common/SmoothData.h ../Geo/GModel.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h OpenFile.h CommandLine.h \
+  ../Graphics/ReadImg.h OS.h StringUtils.h ../Parser/Parser.h \
+  ../Post/PView.h ../Post/PViewData.h ../Fltk/GUI.h ../Fltk/Draw.h
+CreateFile${OBJEXT}: CreateFile.cpp GmshConfig.h GmshMessage.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
@@ -138,21 +139,22 @@ CreateFile${OBJEXT}: CreateFile.cpp GmshMessage.h ../Geo/GModel.h \
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h GmshDefines.h StringUtils.h Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h Options.h \
-  ../Post/ColorTable.h ../Graphics/gl2ps.h ../Graphics/gl2gif.h \
-  ../Graphics/PixelBuffer.h ../Common/GmshMessage.h ../Fltk/Draw.h \
-  ../Common/MallocUtils.h ../Graphics/gl2jpeg.h ../Graphics/PixelBuffer.h \
-  ../Graphics/gl2png.h ../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h Options.h ../Post/ColorTable.h \
+  ../Graphics/gl2ps.h ../Graphics/gl2gif.h ../Graphics/PixelBuffer.h \
+  ../Common/GmshMessage.h ../Fltk/Draw.h ../Common/MallocUtils.h \
+  ../Graphics/gl2jpeg.h ../Graphics/PixelBuffer.h ../Graphics/gl2png.h \
+  ../Graphics/PixelBuffer.h ../Graphics/gl2ppm.h \
   ../Graphics/PixelBuffer.h ../Graphics/gl2yuv.h \
   ../Graphics/PixelBuffer.h
 VertexArray${OBJEXT}: VertexArray.cpp VertexArray.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h
 SmoothData${OBJEXT}: SmoothData.cpp SmoothData.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h
 Octree${OBJEXT}: Octree.cpp Octree.h OctreeInternals.h
 OctreeInternals${OBJEXT}: OctreeInternals.cpp GmshMessage.h OctreeInternals.h
 StringUtils${OBJEXT}: StringUtils.cpp StringUtils.h GmshMessage.h
diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp
index 8f0a86f9c7859caf9198a5ffbaee4330c074fc99..b93f5dd12f83d1a53cc840a8a29dd51215d5b67a 100644
--- a/Common/OpenFile.cpp
+++ b/Common/OpenFile.cpp
@@ -4,6 +4,7 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <string.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Geo.h"
 #include "GModel.h"
diff --git a/Common/Options.cpp b/Common/Options.cpp
index b3b9d42ee7162de511b1428ae1ec4646ba832a3c..5ceff5bca8facd28f2ff4801b3c9270a71b14572 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -5,6 +5,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#include "GmshConfig.h"
 #include "GmshDefines.h"
 #include "GModel.h"
 #include "GmshMessage.h"
diff --git a/Fltk/Makefile b/Fltk/Makefile
index 1432303ab0c01e0440dbdd90535c6066b9cb4fb8..dd6a9f914b22c1ea88cb0065b35da0fde1deb826 100644
--- a/Fltk/Makefile
+++ b/Fltk/Makefile
@@ -71,9 +71,10 @@ depend:
 # DO NOT DELETE THIS LINE
 Main${OBJEXT}: Main.cpp GUI.h menuWindow.h popupButton.h ../Common/Gmsh.h \
   ../Common/GmshMessage.h Draw.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Common/Options.h ../Post/ColorTable.h \
-  ../Parser/Parser.h ../Common/OpenFile.h ../Common/CommandLine.h \
-  Solvers.h ../Plugin/PluginManager.h ../Geo/GModel.h ../Geo/GVertex.h \
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Parser/Parser.h \
+  ../Common/OpenFile.h ../Common/CommandLine.h Solvers.h \
+  ../Plugin/PluginManager.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
@@ -87,32 +88,32 @@ GUI${OBJEXT}: GUI.cpp GUI.h graphicWindow.h openglWindow.h \
   ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   menuWindow.h popupButton.h optionWindow.h spherePositionWidget.h \
   colorbarWindow.h ../Post/ColorTable.h fieldWindow.h pluginWindow.h \
-  statisticsWindow.h visibilityWindow.h clippingWindow.h messageWindow.h \
-  manipWindow.h contextWindow.h solverWindow.h aboutWindow.h \
-  fileDialogs.h Draw.h ../Common/GmshDefines.h ../Common/GmshMessage.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \
-  ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  ../Post/PView.h Solvers.h ../Mesh/Field.h ../Plugin/Plugin.h \
-  ../Common/Options.h ../Post/PViewDataList.h ../Post/PViewData.h \
-  ../Common/ListUtils.h ../Plugin/PluginManager.h ../Common/OpenFile.h \
-  Win32Icon.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  statisticsWindow.h visibilityWindow.h ../Common/GmshConfig.h \
+  clippingWindow.h messageWindow.h manipWindow.h contextWindow.h \
+  solverWindow.h aboutWindow.h fileDialogs.h Draw.h \
+  ../Common/GmshDefines.h ../Common/GmshMessage.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
+  ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
+  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Numeric/Gauss.h ../Post/PView.h Solvers.h ../Mesh/Field.h \
+  ../Plugin/Plugin.h ../Common/Options.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Common/ListUtils.h ../Plugin/PluginManager.h \
+  ../Common/OpenFile.h Win32Icon.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 graphicWindow${OBJEXT}: graphicWindow.cpp GUI.h graphicWindow.h openglWindow.h \
   ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   paletteWindow.h mainWindow.h menuWindow.h popupButton.h messageWindow.h \
   manipWindow.h extraDialogs.h Draw.h ../Post/PView.h ../Post/PViewData.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/OS.h \
-  ../Common/Options.h ../Post/ColorTable.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Common/OS.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 openglWindow${OBJEXT}: openglWindow.cpp openglWindow.h ../Graphics/drawContext.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h graphicWindow.h manipWindow.h \
   contextWindow.h ../Common/GmshDefines.h ../Common/GmshMessage.h \
@@ -126,11 +127,13 @@ openglWindow${OBJEXT}: openglWindow.cpp openglWindow.h ../Graphics/drawContext.h
   ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \
   ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  Draw.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h GUI.h ../Common/VertexArray.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-menuWindow${OBJEXT}: menuWindow.cpp GUI.h Draw.h menuWindow.h popupButton.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h Draw.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h GUI.h \
+  ../Common/VertexArray.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h
+menuWindow${OBJEXT}: menuWindow.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h GUI.h Draw.h menuWindow.h popupButton.h \
   mainWindow.h graphicWindow.h openglWindow.h ../Graphics/drawContext.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h optionWindow.h \
   spherePositionWidget.h colorbarWindow.h ../Post/ColorTable.h \
@@ -148,36 +151,36 @@ menuWindow${OBJEXT}: menuWindow.cpp GUI.h Draw.h menuWindow.h popupButton.h \
   classificationEditor.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/Options.h \
-  Solvers.h ../Common/CommandLine.h ../Mesh/Generator.h \
-  ../Mesh/HighOrder.h ../Post/PView.h ../Post/PViewData.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h ../Mesh/Field.h \
-  ../Common/OS.h ../Common/StringUtils.h ../Common/OpenFile.h \
-  ../Common/CreateFile.h ../Geo/findLinks.h ../Common/ListUtils.h \
-  ../Geo/GeoStringInterface.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
-optionWindow${OBJEXT}: optionWindow.cpp GUI.h optionWindow.h \
-  spherePositionWidget.h colorbarWindow.h ../Post/ColorTable.h \
-  paletteWindow.h menuWindow.h popupButton.h extraDialogs.h Draw.h \
-  ../Common/GmshDefines.h ../Common/GmshMessage.h ../Common/Options.h \
-  Solvers.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
-  ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
-  ../Numeric/Gauss.h ../Post/PView.h ../Post/PViewData.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h ../Common/OS.h \
+  ../Numeric/Gauss.h ../Common/Options.h Solvers.h \
+  ../Common/CommandLine.h ../Mesh/Generator.h ../Mesh/HighOrder.h \
+  ../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Mesh/Field.h ../Common/OS.h \
+  ../Common/StringUtils.h ../Common/OpenFile.h ../Common/CreateFile.h \
+  ../Geo/findLinks.h ../Common/ListUtils.h ../Geo/GeoStringInterface.h \
   ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+optionWindow${OBJEXT}: optionWindow.cpp ../Common/GmshConfig.h \
+  ../Common/GmshDefines.h ../Common/GmshMessage.h GUI.h optionWindow.h \
+  spherePositionWidget.h colorbarWindow.h ../Post/ColorTable.h \
+  paletteWindow.h menuWindow.h popupButton.h extraDialogs.h Draw.h \
+  ../Common/Options.h Solvers.h ../Geo/GModel.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \
+  ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
+  ../Post/PView.h ../Post/PViewData.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Common/OS.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 colorbarWindow${OBJEXT}: colorbarWindow.cpp colorbarWindow.h \
   ../Post/ColorTable.h Draw.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h
 fieldWindow${OBJEXT}: fieldWindow.cpp GUI.h Draw.h fieldWindow.h paletteWindow.h \
   fileDialogs.h ../Common/GmshDefines.h ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
@@ -188,16 +191,16 @@ fieldWindow${OBJEXT}: fieldWindow.cpp GUI.h Draw.h fieldWindow.h paletteWindow.h
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Post/PView.h ../Common/GmshMessage.h \
-  ../Mesh/Field.h ../Geo/GeoStringInterface.h ../Common/ListUtils.h \
-  ../Common/Options.h ../Post/ColorTable.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Mesh/Field.h ../Common/GmshConfig.h ../Geo/GeoStringInterface.h \
+  ../Common/ListUtils.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 pluginWindow${OBJEXT}: pluginWindow.cpp GUI.h Draw.h pluginWindow.h \
   paletteWindow.h ../Post/PView.h ../Geo/SPoint3.h \
   ../Plugin/PluginManager.h ../Plugin/Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 statisticsWindow${OBJEXT}: statisticsWindow.cpp GUI.h Draw.h statisticsWindow.h \
   paletteWindow.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
@@ -211,13 +214,13 @@ statisticsWindow${OBJEXT}: statisticsWindow.cpp GUI.h Draw.h statisticsWindow.h
   ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Post/PView.h \
-  ../Mesh/Generator.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
-visibilityWindow${OBJEXT}: visibilityWindow.cpp GUI.h Draw.h visibilityWindow.h \
-  paletteWindow.h contextWindow.h ../Common/GmshDefines.h \
-  ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Post/PView.h ../Mesh/Generator.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+visibilityWindow${OBJEXT}: visibilityWindow.cpp ../Common/GmshConfig.h GUI.h \
+  Draw.h visibilityWindow.h paletteWindow.h contextWindow.h \
+  ../Common/GmshDefines.h ../Common/GmshMessage.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -235,15 +238,17 @@ clippingWindow${OBJEXT}: clippingWindow.cpp GUI.h Draw.h clippingWindow.h \
   paletteWindow.h ../Common/GmshDefines.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewOptions.h ../Post/ColorTable.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h
 messageWindow${OBJEXT}: messageWindow.cpp GUI.h messageWindow.h paletteWindow.h \
   fileDialogs.h ../Common/GmshMessage.h ../Common/OS.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h
 manipWindow${OBJEXT}: manipWindow.cpp GUI.h Draw.h manipWindow.h paletteWindow.h \
   graphicWindow.h openglWindow.h ../Graphics/drawContext.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h
 contextWindow${OBJEXT}: contextWindow.cpp GUI.h Draw.h contextWindow.h \
   paletteWindow.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
@@ -254,7 +259,8 @@ contextWindow${OBJEXT}: contextWindow.cpp GUI.h Draw.h contextWindow.h \
   ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GeoStringInterface.h \
   ../Common/ListUtils.h ../Common/OpenFile.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h
 solverWindow${OBJEXT}: solverWindow.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -268,19 +274,22 @@ solverWindow${OBJEXT}: solverWindow.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Post/ColorTable.h messageWindow.h fileDialogs.h \
   ../Common/GmshMessage.h Solvers.h ../Common/StringUtils.h \
   ../Common/Options.h ../Common/OS.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h
 aboutWindow${OBJEXT}: aboutWindow.cpp GUI.h aboutWindow.h paletteWindow.h \
   ../Common/CommandLine.h ../Common/StringUtils.h ../Common/OS.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-fileDialogs${OBJEXT}: fileDialogs.cpp GUI.h ../Common/GmshDefines.h \
-  ../Common/CreateFile.h ../Common/Options.h ../Post/ColorTable.h Draw.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h
+fileDialogs${OBJEXT}: fileDialogs.cpp ../Common/GmshConfig.h \
+  ../Common/GmshDefines.h GUI.h ../Common/CreateFile.h \
+  ../Common/Options.h ../Post/ColorTable.h Draw.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h fileChooser.h
 extraDialogs${OBJEXT}: extraDialogs.cpp GUI.h paletteWindow.h \
@@ -294,10 +303,10 @@ extraDialogs${OBJEXT}: extraDialogs.cpp GUI.h paletteWindow.h \
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
-projectionEditor${OBJEXT}: projectionEditor.cpp GUI.h projectionEditor.h \
-  ../Geo/fourierProjectionFace.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h
+projectionEditor${OBJEXT}: projectionEditor.cpp ../Common/GmshConfig.h GUI.h \
+  projectionEditor.h ../Geo/fourierProjectionFace.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -329,23 +338,23 @@ classificationEditor${OBJEXT}: classificationEditor.cpp GUI.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Post/ColorTable.h \
-  paletteWindow.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h Draw.h ../Common/Options.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Mesh/meshGFaceDelaunayInsertion.h ../Mesh/meshGFaceOptimize.h \
-  ../Mesh/meshGFaceDelaunayInsertion.h ../Geo/discreteEdge.h \
-  ../Geo/GModel.h ../Geo/GEdge.h ../Geo/discreteFace.h ../Geo/GModel.h \
-  ../Geo/GFace.h
-partitionDialog${OBJEXT}: partitionDialog.cpp GUI.h paletteWindow.h \
-  ../Common/GmshDefines.h ../Common/GmshMessage.h ../Geo/GModel.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Post/ColorTable.h paletteWindow.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Draw.h \
+  ../Common/Options.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h ../Mesh/meshGFaceDelaunayInsertion.h \
+  ../Mesh/meshGFaceOptimize.h ../Mesh/meshGFaceDelaunayInsertion.h \
+  ../Geo/discreteEdge.h ../Geo/GModel.h ../Geo/GEdge.h \
+  ../Geo/discreteFace.h ../Geo/GModel.h ../Geo/GFace.h
+partitionDialog${OBJEXT}: partitionDialog.cpp ../Common/GmshConfig.h \
+  ../Common/GmshDefines.h ../Common/GmshMessage.h GUI.h paletteWindow.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h Draw.h ../Common/Options.h ../Post/ColorTable.h \
   ../Mesh/meshPartition.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h
@@ -353,10 +362,11 @@ Draw${OBJEXT}: Draw.cpp GUI.h graphicWindow.h openglWindow.h \
   ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   optionWindow.h spherePositionWidget.h colorbarWindow.h \
   ../Post/ColorTable.h ../Common/GmshDefines.h ../Common/GmshMessage.h \
-  Draw.h ../Common/StringUtils.h ../Graphics/gl2ps.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  Draw.h ../Common/StringUtils.h ../Graphics/gl2ps.h \
+  ../Common/GmshConfig.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h
 Solvers${OBJEXT}: Solvers.cpp GUI.h solverWindow.h menuWindow.h popupButton.h \
   ../Common/GmshMessage.h ../Common/StringUtils.h Solvers.h \
-  ../Common/GmshSocket.h ../Common/OpenFile.h ../Post/PView.h \
-  ../Geo/SPoint3.h Draw.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Common/OS.h
+  ../Common/GmshSocket.h ../Common/GmshConfig.h ../Common/OpenFile.h \
+  ../Post/PView.h ../Geo/SPoint3.h Draw.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Common/OS.h
diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp
index e22f31258c6344733c58241afd33e17ed3db9340..6b0815f5b5552fa9aceb4b51da65eb12d6e075a2 100644
--- a/Fltk/fileDialogs.cpp
+++ b/Fltk/fileDialogs.cpp
@@ -18,8 +18,9 @@
 #include <FL/Fl_Toggle_Button.H>
 #include <FL/Fl_Round_Button.H>
 #include <FL/Fl_Choice.H>
-#include "GUI.h"
+#include "GmshConfig.h"
 #include "GmshDefines.h"
+#include "GUI.h"
 #include "CreateFile.h"
 #include "Options.h"
 #include "Draw.h"
diff --git a/Fltk/menuWindow.cpp b/Fltk/menuWindow.cpp
index ec18c3321ca0dc9ac46806ab62349dccea5453bf..92a9094223cef6f2219f33a01b4eb9b447c142ed 100644
--- a/Fltk/menuWindow.cpp
+++ b/Fltk/menuWindow.cpp
@@ -8,6 +8,8 @@
 #include <time.h>
 #include <FL/Fl_Box.H>
 #include <FL/fl_ask.H>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GUI.h"
 #include "Draw.h"
 #include "menuWindow.h"
@@ -30,7 +32,6 @@
 #include "classificationEditor.h"
 #include "Options.h"
 #include "Solvers.h"
-#include "GmshMessage.h"
 #include "CommandLine.h"
 #include "Generator.h"
 #include "HighOrder.h"
diff --git a/Fltk/optionWindow.cpp b/Fltk/optionWindow.cpp
index 4ddf7926bf2115ac05e755649762bdc8f64ba17d..6d7c56ac942db95d504e23af610c9079262f704d 100644
--- a/Fltk/optionWindow.cpp
+++ b/Fltk/optionWindow.cpp
@@ -7,14 +7,15 @@
 #include <FL/Fl_Tabs.H>
 #include <FL/Fl_Scroll.H>
 #include <FL/Fl_Color_Chooser.H>
+#include "GmshConfig.h"
+#include "GmshDefines.h"
+#include "GmshMessage.h"
 #include "GUI.h"
 #include "optionWindow.h"
 #include "paletteWindow.h"
 #include "menuWindow.h"
 #include "extraDialogs.h"
 #include "Draw.h"
-#include "GmshDefines.h"
-#include "GmshMessage.h"
 #include "Options.h"
 #include "Solvers.h"
 #include "GModel.h"
diff --git a/Fltk/partitionDialog.cpp b/Fltk/partitionDialog.cpp
index 3cf3b2cc600f46c879397469a05ccfd1fb7953d5..819278ba8adb7239449b8d17d306d6adb7021ffd 100644
--- a/Fltk/partitionDialog.cpp
+++ b/Fltk/partitionDialog.cpp
@@ -18,10 +18,11 @@
 #include <FL/Fl_Return_Button.H>
 #include <FL/Fl_Group.H>
 #include <FL/Fl_Box.H>
-#include "GUI.h"
-#include "paletteWindow.h"
+#include "GmshConfig.h"
 #include "GmshDefines.h"
 #include "GmshMessage.h"
+#include "GUI.h"
+#include "paletteWindow.h"
 #include "GModel.h"
 #include "Draw.h"
 #include "Options.h"
diff --git a/Fltk/projectionEditor.cpp b/Fltk/projectionEditor.cpp
index 9ce5c044769d778be973f90e3cf7fd04c0711ca7..df3d56c9ec0c961fc194be22b5d093f5e55d5583 100644
--- a/Fltk/projectionEditor.cpp
+++ b/Fltk/projectionEditor.cpp
@@ -7,6 +7,7 @@
 #include <FL/Fl_Box.H>
 #include <FL/Fl_Scroll.H>
 #include <FL/Fl_Repeat_Button.H>
+#include "GmshConfig.h"
 #include "GUI.h"
 #include "projectionEditor.h"
 #include "paletteWindow.h"
diff --git a/Fltk/projectionEditor.h b/Fltk/projectionEditor.h
index 146c0051d2a4e03b3516178cafabc39d79c24d6c..6c17c16346a9582cf96b96814a931ee945a917a5 100644
--- a/Fltk/projectionEditor.h
+++ b/Fltk/projectionEditor.h
@@ -13,6 +13,7 @@
 #include <FL/Fl_Round_Button.H>
 #include <FL/Fl_Value_Input.H>
 #include <FL/Fl_Hold_Browser.H>
+#include "GmshConfig.h"
 #include "fourierProjectionFace.h"
 #include "GModel.h"
 #include "ColorTable.h"
diff --git a/Fltk/visibilityWindow.cpp b/Fltk/visibilityWindow.cpp
index e13dd01d5d5b42faa2442eac648378cd655a0cdf..99d7dae8b76d4aa6a1772df3b3689697a41932c0 100644
--- a/Fltk/visibilityWindow.cpp
+++ b/Fltk/visibilityWindow.cpp
@@ -10,6 +10,7 @@
 #include <FL/Fl_Tabs.H>
 #include <FL/Fl_Box.H>
 #include <FL/Fl_Return_Button.H>
+#include "GmshConfig.h"
 #include "GUI.h"
 #include "Draw.h"
 #include "visibilityWindow.h"
diff --git a/Fltk/visibilityWindow.h b/Fltk/visibilityWindow.h
index d0f2fcfc3f84d110a0af130e03f517d67aace9a7..ce80595ab47561d51e8be04da103685b06d32039 100644
--- a/Fltk/visibilityWindow.h
+++ b/Fltk/visibilityWindow.h
@@ -13,6 +13,7 @@
 #include <FL/Fl_Button.H>
 #include <FL/Fl_Check_Button.H>
 #include <FL/Fl_Input.H>
+#include "GmshConfig.h"
 
 #if defined(HAVE_TREE_BROWSER)
 #include "Flu_Tree_Browser.h"
diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp
index 75925212dbf484b19afc8e4e72fb3a8b12d1103f..a59b67bb145803574368545d20a827bdc6657e4a 100644
--- a/Geo/GEdge.cpp
+++ b/Geo/GEdge.cpp
@@ -5,12 +5,13 @@
 
 #include <sstream>
 #include <algorithm>
+#include "GmshConfig.h"
+#include "GmshDefines.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "GEdge.h"
 #include "GFace.h"
 #include "MElement.h"
-#include "GmshDefines.h"
-#include "GmshMessage.h"
 
 #if !defined(HAVE_GMSH_EMBEDDED)
 #include "GaussLegendre1D.h"
diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp
index 85fdd92ecaeb7637f7bcde29e5afe18f55af920b..0382dc8982ad67b7457af182b0a4bfda30125ebf 100644
--- a/Geo/GFace.cpp
+++ b/Geo/GFace.cpp
@@ -4,11 +4,12 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <sstream>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "GFace.h"
 #include "GEdge.h"
 #include "MElement.h"
-#include "GmshMessage.h"
 #include "VertexArray.h"
 #include "GmshMatrix.h"
 
diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp
index 4d0737f215f9a6b3773a9ddd1873e16c67267e56..09ff0d3b1d375e6389b645a3143f1b73a3eef2c6 100644
--- a/Geo/GFaceCompound.cpp
+++ b/Geo/GFaceCompound.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "GFaceCompound.h"
 #include "gmshAssembler.h"
 #include "gmshLaplace.h"
diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index 7705e1958ef3080cc69447cda5e20d5754156053..acc649c86841686b553080bf3d9fb9268a1e3507 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -4,13 +4,14 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <sstream>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "MElement.h"
 #include "discreteRegion.h"
 #include "discreteFace.h"
 #include "discreteEdge.h"
 #include "discreteVertex.h"
-#include "GmshMessage.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
 #include "GmshEmbedded.h"
diff --git a/Geo/GModelIO_CGNS.cpp b/Geo/GModelIO_CGNS.cpp
index 2d5ee293c4c1a0dd6a39a39478b86140e8be178b..8c05985cf79804c81f92392b215a3696bac8774c 100644
--- a/Geo/GModelIO_CGNS.cpp
+++ b/Geo/GModelIO_CGNS.cpp
@@ -5,8 +5,9 @@
 //
 // GModelIO_CGNS.cpp - Copyright (C) 2008 S. Guzik, C. Geuzaine, J.-F. Remacle
 
-#include "GModel.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "GModel.h"
 #include "CGNSOptions.h"
 
 #if defined(HAVE_LIBCGNS)
diff --git a/Geo/GModelIO_Fourier.cpp b/Geo/GModelIO_Fourier.cpp
index bc2e15dd7c18bd3f65a78bd600d51ca4230aeffa..83f9fa43617f44736219e606cb1878d53fbb81d1 100644
--- a/Geo/GModelIO_Fourier.cpp
+++ b/Geo/GModelIO_Fourier.cpp
@@ -2,9 +2,11 @@
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
+
 #include <string>
-#include "GModel.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "GModel.h"
 #include "fourierVertex.h"
 #include "fourierEdge.h"
 #include "fourierFace.h"
diff --git a/Geo/GModelIO_Fourier.h b/Geo/GModelIO_Fourier.h
index 3369962b69644425b52ceaca83313035026b5ee0..8d17278dd262d60fddb497793fa62c140839be76 100644
--- a/Geo/GModelIO_Fourier.h
+++ b/Geo/GModelIO_Fourier.h
@@ -7,6 +7,7 @@
 #define _GMODEL_IO_FOURIER_H_
 
 #include <vector>
+#include "GmshConfig.h"
 #include "GModel.h"
 
 #if defined(HAVE_FOURIER_MODEL)
diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp
index 43c126bdbe695db3ffd3b950927c662711c789b1..216a0e15bb07cdeb4c0e10de409ce41cabe47c9a 100644
--- a/Geo/GModelIO_Geo.cpp
+++ b/Geo/GModelIO_Geo.cpp
@@ -4,12 +4,13 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <stdlib.h>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "Geo.h"
 #include "OpenFile.h"
 #include "Numeric.h"
 #include "ListUtils.h"
-#include "GmshMessage.h"
 #include "gmshVertex.h"
 #include "gmshFace.h"
 #include "GFaceCompound.h"
diff --git a/Geo/GModelIO_MED.cpp b/Geo/GModelIO_MED.cpp
index 9d44b263fa422c53e0e839117e45978dbb23d06a..a64173cf779209062776dad2ea726221328226ac 100644
--- a/Geo/GModelIO_MED.cpp
+++ b/Geo/GModelIO_MED.cpp
@@ -4,8 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <string>
-#include "GModel.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "GModel.h"
 
 #if defined(HAVE_MED)
 
diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp
index 25313cef018beb39a25df8c710a0d1afada420c7..354de432ed6c48f72bb144b9745a8a3a7e02f047 100644
--- a/Geo/GModelIO_OCC.cpp
+++ b/Geo/GModelIO_OCC.cpp
@@ -3,8 +3,9 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
-#include "GModelIO_OCC.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "GModelIO_OCC.h"
 #include "Context.h"
 #include "OCCVertex.h"
 #include "OCCEdge.h"
diff --git a/Geo/GModelIO_OCC.h b/Geo/GModelIO_OCC.h
index ff9e87294a5aa93c007e80da07253786a98bff51..86febd7bf08497945756141607b40e32e97d266d 100644
--- a/Geo/GModelIO_OCC.h
+++ b/Geo/GModelIO_OCC.h
@@ -6,6 +6,7 @@
 #ifndef _GMODELIO_OCC_H_
 #define _GMODELIO_OCC_H_
 
+#include "GmshConfig.h"
 #include "GModel.h"
 #include "OCCIncludes.h"
 
diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp
index 7900528e4c02bcf1f02a0d040cb70097ea8b7d03..25ece530f44b1df8c4095abac3a8ad1e9b863f65 100644
--- a/Geo/GeoStringInterface.cpp
+++ b/Geo/GeoStringInterface.cpp
@@ -5,6 +5,7 @@
 
 #include <string.h>
 #include <sstream>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Numeric.h"
 #include "StringUtils.h"
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 1f535071d81e6654c10c26ac0b0ba8d70360b166..1fa18ff896806ab428623435f798f3330c43ec4c 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -5,10 +5,11 @@
 
 #include <stdlib.h>
 #include <math.h>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "MElement.h"
 #include "GEntity.h"
 #include "GFace.h"
-#include "GmshMessage.h"
 #include "StringUtils.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
diff --git a/Geo/MFace.cpp b/Geo/MFace.cpp
index a2ced7e7bb05fa2e7f2868aa0cbe97157e7c7428..f2edfd718ca56c461b7e886e41dee5c2c3028f66 100644
--- a/Geo/MFace.cpp
+++ b/Geo/MFace.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "MFace.h"
 
 #if defined(HAVE_GMSH_EMBEDDED)
diff --git a/Geo/MZone.cpp b/Geo/MZone.cpp
index c7d0a36a1849b2b91667274824036df57eb6d8b2..3460a25fc5fe14caa6db5592578639f5b9178902 100644
--- a/Geo/MZone.cpp
+++ b/Geo/MZone.cpp
@@ -5,6 +5,8 @@
 //
 // MZone.cpp - Copyright (C) 2008 S. Guzik, C. Geuzaine, J.-F. Remacle
 
+#include "GmshConfig.h"
+
 #if defined(HAVE_LIBCGNS)
 
 #include <iostream> // DBG
diff --git a/Geo/MZoneBoundary.cpp b/Geo/MZoneBoundary.cpp
index d91ac615b4594da623dbd9e01d3e53178de31b16..9de137d18709309dffce8051b804814016989fee 100644
--- a/Geo/MZoneBoundary.cpp
+++ b/Geo/MZoneBoundary.cpp
@@ -5,6 +5,8 @@
 //
 // MZoneBoundary.cpp - Copyright (C) 2008 S. Guzik, C. Geuzaine, J.-F. Remacle
 
+#include "GmshConfig.h"
+
 #if defined(HAVE_LIBCGNS)
 
 #include <iostream> // DBG
diff --git a/Geo/Makefile b/Geo/Makefile
index 78461edd090f8861b1a3abca2d091b90c31308fe..ad13d501a84bc72fa721f432b9c62addfc49c091 100644
--- a/Geo/Makefile
+++ b/Geo/Makefile
@@ -66,40 +66,42 @@ GEntity${OBJEXT}: GEntity.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
   MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h
 GVertex${OBJEXT}: GVertex.cpp GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GFace.h GEdgeLoop.h GEdge.h \
   SVector3.h Pair.h MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h \
   MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h
-GEdge${OBJEXT}: GEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h
+GEdge${OBJEXT}: GEdge.cpp ../Common/GmshConfig.h ../Common/GmshDefines.h \
+  ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
-  MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \
+  GEdgeLoop.h Pair.h GRegion.h MElement.h MVertex.h MEdge.h MFace.h \
   ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
   ../Numeric/GaussLegendre1D.h
 GEdgeLoop${OBJEXT}: GEdgeLoop.cpp GEdgeLoop.h GEdge.h GEntity.h Range.h \
   SPoint3.h SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h \
   ../Common/GmshMessage.h
-GFace${OBJEXT}: GFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
-  MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \
+GFace${OBJEXT}: GFace.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
+  GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \
+  GRegion.h MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \
   ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
   ../Common/VertexArray.h ../Geo/SVector3.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
   ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h
-GFaceCompound${OBJEXT}: GFaceCompound.cpp GFaceCompound.h GFace.h GEntity.h \
-  Range.h SPoint3.h SBoundingBox3d.h GPoint.h GEdgeLoop.h GEdge.h \
-  GVertex.h SPoint2.h SVector3.h Pair.h ../Numeric/gmshAssembler.h \
-  ../Numeric/gmshLinearSystem.h ../Numeric/gmshLaplace.h \
-  ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Numeric/gmshFunction.h ../Common/Gmsh.h \
-  ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h \
-  ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+GFaceCompound${OBJEXT}: GFaceCompound.cpp ../Common/GmshConfig.h GFaceCompound.h \
+  GFace.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h \
+  GEdgeLoop.h GEdge.h GVertex.h SPoint2.h SVector3.h Pair.h \
+  ../Numeric/gmshAssembler.h ../Numeric/gmshLinearSystem.h \
+  ../Numeric/gmshLaplace.h ../Numeric/gmshTermOfFormulation.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h \
+  ../Numeric/gmshFunction.h ../Common/Gmsh.h ../Common/GmshMessage.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
@@ -113,105 +115,111 @@ GRegion${OBJEXT}: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
   MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h
 gmshVertex${OBJEXT}: gmshVertex.cpp GFace.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h SPoint2.h \
   SVector3.h Pair.h gmshVertex.h Geo.h ../Common/GmshDefines.h \
   gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
-  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
-  ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h MVertex.h \
-  MElement.h MEdge.h MFace.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \
+  GeoInterpolation.h MVertex.h MElement.h MEdge.h MFace.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h
 gmshEdge${OBJEXT}: gmshEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h GRegion.h GFaceCompound.h gmshEdge.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \
-  ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \
-  ../Common/SmoothData.h GeoInterpolation.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
+  ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 gmshFace${OBJEXT}: gmshFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h GRegion.h gmshFace.h Geo.h ../Common/GmshDefines.h \
   gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
-  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
-  ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \
+  GeoInterpolation.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h
 gmshRegion${OBJEXT}: gmshRegion.cpp GModel.h GVertex.h GEntity.h Range.h \
   SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
   GFace.h GEdgeLoop.h Pair.h GRegion.h gmshRegion.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \
-  ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \
-  ../Common/SmoothData.h
-gmshSurface${OBJEXT}: gmshSurface.cpp gmshSurface.h Pair.h Range.h SPoint2.h \
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
+  ExtrudeParams.h ../Common/SmoothData.h
+gmshSurface${OBJEXT}: gmshSurface.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h gmshSurface.h Pair.h Range.h SPoint2.h \
   SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h
-OCCVertex${OBJEXT}: OCCVertex.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h MVertex.h MElement.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
+OCCVertex${OBJEXT}: OCCVertex.cpp ../Common/GmshConfig.h GModel.h GVertex.h \
+  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
+  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h MVertex.h MElement.h \
   ../Common/GmshDefines.h MEdge.h MFace.h ../Common/GmshMessage.h \
   ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
   OCCVertex.h OCCIncludes.h OCCEdge.h OCCFace.h
-OCCEdge${OBJEXT}: OCCEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h OCCEdge.h \
-  OCCVertex.h OCCIncludes.h OCCFace.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-OCCFace${OBJEXT}: OCCFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h \
-  OCCFace.h ../Common/GmshMessage.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/VertexArray.h ../Geo/SVector3.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-OCCRegion${OBJEXT}: OCCRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h \
-  OCCFace.h OCCRegion.h ../Common/GmshMessage.h
-discreteEdge${OBJEXT}: discreteEdge.cpp discreteEdge.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h \
-  Geo.h ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
-  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h
-discreteFace${OBJEXT}: discreteFace.cpp discreteFace.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h \
-  Geo.h ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
+OCCEdge${OBJEXT}: OCCEdge.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
+  GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \
+  GRegion.h OCCEdge.h OCCVertex.h OCCIncludes.h OCCFace.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+OCCFace${OBJEXT}: OCCFace.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
+  GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \
+  GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h OCCFace.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/VertexArray.h ../Geo/SVector3.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+OCCRegion${OBJEXT}: OCCRegion.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
+  GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \
+  GRegion.h OCCVertex.h OCCIncludes.h OCCEdge.h OCCFace.h OCCRegion.h
+discreteEdge${OBJEXT}: discreteEdge.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h discreteEdge.h GModel.h GVertex.h GEntity.h \
+  Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
+  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h \
+  ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
   ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
   ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h
-discreteRegion${OBJEXT}: discreteRegion.cpp discreteRegion.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
+discreteFace${OBJEXT}: discreteFace.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h discreteFace.h GModel.h GVertex.h GEntity.h \
+  Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
   SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \
-  ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \
-  ../Common/SmoothData.h
-fourierEdge${OBJEXT}: fourierEdge.cpp fourierEdge.h GEdge.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h GVertex.h GPoint.h SPoint2.h SVector3.h \
-  GModel.h GFace.h GEdgeLoop.h Pair.h GRegion.h fourierVertex.h MVertex.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-fourierFace${OBJEXT}: fourierFace.cpp fourierVertex.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
+  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h
+discreteRegion${OBJEXT}: discreteRegion.cpp ../Common/GmshConfig.h \
+  discreteRegion.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h Geo.h ../Common/GmshDefines.h \
+  gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
+  ExtrudeParams.h ../Common/SmoothData.h
+fourierEdge${OBJEXT}: fourierEdge.cpp ../Common/GmshConfig.h fourierEdge.h \
+  GEdge.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h GVertex.h GPoint.h \
+  SPoint2.h SVector3.h GModel.h GFace.h GEdgeLoop.h Pair.h GRegion.h \
+  fourierVertex.h MVertex.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h
+fourierFace${OBJEXT}: fourierFace.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h fourierVertex.h GModel.h GVertex.h GEntity.h \
+  Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
   SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h MVertex.h fourierFace.h \
-  fourierEdge.h ../Common/GmshMessage.h
-fourierProjectionFace${OBJEXT}: fourierProjectionFace.cpp \
+  fourierEdge.h
+fourierProjectionFace${OBJEXT}: fourierProjectionFace.cpp ../Common/GmshConfig.h \
   fourierProjectionFace.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h GRegion.h ../Common/VertexArray.h ../Geo/SVector3.h
-GModel${OBJEXT}: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
-  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
-  GEdgeLoop.h Pair.h GRegion.h MElement.h ../Common/GmshDefines.h \
-  MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \
+GModel${OBJEXT}: GModel.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  GModel.h GVertex.h GEntity.h Range.h SPoint3.h SBoundingBox3d.h \
+  GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \
+  GRegion.h MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \
   ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
   discreteRegion.h discreteFace.h discreteEdge.h discreteVertex.h \
   gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
@@ -219,73 +227,80 @@ GModel${OBJEXT}: GModel.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
   ../Common/SmoothData.h ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h \
   ../Mesh/Generator.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h
-GModelIO_Geo${OBJEXT}: GModelIO_Geo.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h Geo.h ../Common/GmshDefines.h \
+GModelIO_Geo${OBJEXT}: GModelIO_Geo.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h Geo.h ../Common/GmshDefines.h \
   gmshSurface.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
-  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
-  ExtrudeParams.h ../Common/SmoothData.h ../Common/OpenFile.h \
-  gmshVertex.h gmshFace.h GFaceCompound.h gmshEdge.h gmshRegion.h \
-  ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h ../Parser/Parser.h
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/TreeUtils.h \
+  ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \
+  ../Common/SmoothData.h ../Common/OpenFile.h gmshVertex.h gmshFace.h \
+  GFaceCompound.h gmshEdge.h gmshRegion.h ../Mesh/Field.h ../Post/PView.h \
+  ../Geo/SPoint3.h ../Parser/Parser.h
 GModelIO_Mesh${OBJEXT}: GModelIO_Mesh.cpp GModel.h GVertex.h GEntity.h Range.h \
   SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
   GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshDefines.h MElement.h \
   MVertex.h MEdge.h MFace.h ../Common/GmshMessage.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  discreteRegion.h discreteFace.h ../Common/StringUtils.h
-GModelIO_OCC${OBJEXT}: GModelIO_OCC.cpp GModelIO_OCC.h GModel.h GVertex.h \
-  GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h OCCIncludes.h \
-  ../Common/GmshMessage.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h OCCVertex.h OCCEdge.h OCCFace.h \
-  OCCRegion.h MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h \
-  MFace.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
-  ../Numeric/Gauss.h ../Common/OpenFile.h
-GModelIO_Fourier${OBJEXT}: GModelIO_Fourier.cpp GModel.h GVertex.h GEntity.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h discreteRegion.h \
+  discreteFace.h ../Common/StringUtils.h
+GModelIO_OCC${OBJEXT}: GModelIO_OCC.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h GModelIO_OCC.h GModel.h GVertex.h GEntity.h \
   Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
-  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h \
-  fourierVertex.h MVertex.h fourierEdge.h fourierFace.h \
-  GModelIO_Fourier.h
-GModelIO_CGNS${OBJEXT}: GModelIO_CGNS.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h \
-  CGNSOptions.h
-GModelIO_MED${OBJEXT}: GModelIO_MED.cpp GModel.h GVertex.h GEntity.h Range.h \
-  SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h \
-  GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/GmshMessage.h
+  SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h OCCIncludes.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  OCCVertex.h OCCEdge.h OCCFace.h OCCRegion.h MElement.h \
+  ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
+  ../Common/OpenFile.h
+GModelIO_Fourier${OBJEXT}: GModelIO_Fourier.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h fourierVertex.h MVertex.h fourierEdge.h \
+  fourierFace.h GModelIO_Fourier.h
+GModelIO_CGNS${OBJEXT}: GModelIO_CGNS.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h CGNSOptions.h
+GModelIO_MED${OBJEXT}: GModelIO_MED.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
+  SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
+  GEdgeLoop.h Pair.h GRegion.h
 ExtrudeParams${OBJEXT}: ExtrudeParams.cpp ../Common/GmshMessage.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
   SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
-  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Common/TreeUtils.h \
+  ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \
+  ../Common/SmoothData.h
 Geo${OBJEXT}: Geo.cpp ../Common/GmshMessage.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/MallocUtils.h Geo.h ../Common/GmshDefines.h gmshSurface.h \
-  Pair.h Range.h SPoint2.h SPoint3.h SVector3.h SBoundingBox3d.h \
-  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
-  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h GModel.h \
-  GVertex.h GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \
-  GeoInterpolation.h ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-GeoStringInterface${OBJEXT}: GeoStringInterface.cpp ../Common/GmshMessage.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/StringUtils.h Geo.h \
+  ../Common/GmshConfig.h ../Common/MallocUtils.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
   SPoint3.h SVector3.h SBoundingBox3d.h ../Common/ListUtils.h \
   ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
-  ExtrudeParams.h ../Common/SmoothData.h GeoStringInterface.h \
-  ../Common/OpenFile.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h GModel.h GVertex.h GEntity.h GPoint.h \
-  GEdge.h GFace.h GEdgeLoop.h GRegion.h ../Parser/Parser.h
+  ExtrudeParams.h ../Common/SmoothData.h GModel.h GVertex.h GEntity.h \
+  GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h GeoInterpolation.h \
+  ../Mesh/Field.h ../Post/PView.h ../Geo/SPoint3.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+GeoStringInterface${OBJEXT}: GeoStringInterface.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
+  ../Common/StringUtils.h Geo.h ../Common/GmshDefines.h gmshSurface.h \
+  Pair.h Range.h SPoint2.h SPoint3.h SVector3.h SBoundingBox3d.h \
+  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \
+  GeoStringInterface.h ../Common/OpenFile.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h GModel.h GVertex.h \
+  GEntity.h GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h \
+  ../Parser/Parser.h
 GeoInterpolation${OBJEXT}: GeoInterpolation.cpp ../Common/GmshMessage.h Geo.h \
   ../Common/GmshDefines.h gmshSurface.h Pair.h Range.h SPoint2.h \
   SPoint3.h SVector3.h SBoundingBox3d.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
-  ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \
-  GeoInterpolation.h GeoStringInterface.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Common/TreeUtils.h \
+  ../Common/avl.h ../Common/ListUtils.h ExtrudeParams.h \
+  ../Common/SmoothData.h GeoInterpolation.h GeoStringInterface.h
 findLinks${OBJEXT}: findLinks.cpp ../Common/GmshMessage.h GModel.h GVertex.h \
   GEntity.h Range.h SPoint3.h SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h \
   SVector3.h GFace.h GEdgeLoop.h Pair.h GRegion.h ../Common/TreeUtils.h \
@@ -294,20 +309,21 @@ MVertex${OBJEXT}: MVertex.cpp MVertex.h SPoint2.h SPoint3.h GVertex.h GEntity.h
   Range.h SBoundingBox3d.h GPoint.h GEdge.h SVector3.h GFace.h \
   GEdgeLoop.h Pair.h GFaceCompound.h ../Common/GmshMessage.h \
   ../Common/StringUtils.h
-MFace${OBJEXT}: MFace.cpp MFace.h MVertex.h SPoint2.h SPoint3.h SVector3.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+MFace${OBJEXT}: MFace.cpp ../Common/GmshConfig.h MFace.h MVertex.h SPoint2.h \
+  SPoint3.h SVector3.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
   ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/Context.h \
   ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-MElement${OBJEXT}: MElement.cpp MElement.h ../Common/GmshDefines.h MVertex.h \
-  SPoint2.h SPoint3.h MEdge.h SVector3.h MFace.h ../Common/GmshMessage.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  GEntity.h Range.h SBoundingBox3d.h GFace.h GPoint.h GEdgeLoop.h GEdge.h \
-  GVertex.h Pair.h ../Common/StringUtils.h ../Numeric/Numeric.h \
+MElement${OBJEXT}: MElement.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  MElement.h ../Common/GmshDefines.h MVertex.h SPoint2.h SPoint3.h \
+  MEdge.h SVector3.h MFace.h ../Numeric/FunctionSpace.h \
+  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h GEntity.h Range.h \
+  SBoundingBox3d.h GFace.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h Pair.h \
+  ../Common/StringUtils.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
   ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h ../Mesh/qualityMeasures.h \
   ../Mesh/meshGFaceDelaunayInsertion.h ../Geo/MElement.h \
   ../Mesh/meshGRegionDelaunayInsertion.h ../Mesh/BackgroundMesh.h \
   ../Mesh/qualityMeasures.h
-MZone${OBJEXT}: MZone.cpp
-MZoneBoundary${OBJEXT}: MZoneBoundary.cpp
+MZone${OBJEXT}: MZone.cpp ../Common/GmshConfig.h
+MZoneBoundary${OBJEXT}: MZoneBoundary.cpp ../Common/GmshConfig.h
diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp
index df47ffd73390c147a247a551f3df3c7310a66a23..bdafff700452d2c92e317be173d856492990b82c 100644
--- a/Geo/OCCEdge.cpp
+++ b/Geo/OCCEdge.cpp
@@ -4,11 +4,13 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <limits>
-#include "GModel.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "GModel.h"
 #include "OCCEdge.h"
 #include "OCCFace.h"
 #include "Context.h"
+
 extern Context_T CTX;
 
 #if defined(HAVE_OCC)
diff --git a/Geo/OCCEdge.h b/Geo/OCCEdge.h
index 969d9046eff500f0ed3360985ccf497a6d246e5b..d04b7476a97c8935991724255cd5cfd05ed4e36e 100644
--- a/Geo/OCCEdge.h
+++ b/Geo/OCCEdge.h
@@ -6,6 +6,7 @@
 #ifndef _OCC_EDGE_H_
 #define _OCC_EDGE_H_
 
+#include "GmshConfig.h"
 #include "GEdge.h"
 #include "GModel.h"
 #include "OCCVertex.h"
diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp
index 785a29dda925ec6cd06d68a8dda520558b1397e6..9e0e7f84ac53bdd209a183611ccfdf31da669cff 100644
--- a/Geo/OCCFace.cpp
+++ b/Geo/OCCFace.cpp
@@ -3,12 +3,13 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "GEdgeLoop.h"
 #include "OCCVertex.h"
 #include "OCCEdge.h"
 #include "OCCFace.h"
-#include "GmshMessage.h"
 #include "Numeric.h"
 #include "VertexArray.h"
 #include "Context.h"
diff --git a/Geo/OCCFace.h b/Geo/OCCFace.h
index 2bb5de307f264b873f5d38f621917798ef3044aa..e2c38ceea6ad07e07b673d72c8505cb392de16b7 100644
--- a/Geo/OCCFace.h
+++ b/Geo/OCCFace.h
@@ -6,6 +6,7 @@
 #ifndef _OCC_FACE_H_
 #define _OCC_FACE_H_
 
+#include "GmshConfig.h"
 #include "GFace.h"
 #include "GModel.h"
 #include "OCCVertex.h"
diff --git a/Geo/OCCIncludes.h b/Geo/OCCIncludes.h
index 795a8534aebb71b41b7c1c88c70684a3f7f7b1fc..d702db77aa4b72f2436893b17f4f0a41a1289570 100644
--- a/Geo/OCCIncludes.h
+++ b/Geo/OCCIncludes.h
@@ -6,6 +6,8 @@
 #ifndef _OCC_INCLUDES_
 #define _OCC_INCLUDES_
 
+#include "GmshConfig.h"
+
 #if defined(HAVE_OCC)
 
 #include <iostream>
diff --git a/Geo/OCCRegion.cpp b/Geo/OCCRegion.cpp
index 5a1b746cf6494287800e863768502af65f13aa04..ee520b925c594f3bd02cf800745007fa85baf34f 100644
--- a/Geo/OCCRegion.cpp
+++ b/Geo/OCCRegion.cpp
@@ -3,12 +3,13 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "OCCVertex.h"
 #include "OCCEdge.h"
 #include "OCCFace.h"
 #include "OCCRegion.h"
-#include "GmshMessage.h"
 
 #if defined(HAVE_OCC)
 
diff --git a/Geo/OCCRegion.h b/Geo/OCCRegion.h
index e04e7dd328fb730b3a25a88aa57424c31dee867f..848d1bb616bcc8a1feacd32c734a337f1c697db5 100644
--- a/Geo/OCCRegion.h
+++ b/Geo/OCCRegion.h
@@ -6,6 +6,7 @@
 #ifndef _OCC_REGION_H_
 #define _OCC_REGION_H_
 
+#include "GmshConfig.h"
 #include "GRegion.h"
 
 #if defined(HAVE_OCC)
diff --git a/Geo/OCCVertex.cpp b/Geo/OCCVertex.cpp
index 0ba1a03e672588d28f8fe5dc63c3c3047e073928..825bd0f18587b6ac3e5cfb19b8f038c6c9385e4b 100644
--- a/Geo/OCCVertex.cpp
+++ b/Geo/OCCVertex.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "GModel.h"
 #include "MVertex.h"
 #include "MElement.h"
diff --git a/Geo/OCCVertex.h b/Geo/OCCVertex.h
index 1e3d304aff050d0b4b530d27d230f50effaf3118..af0721120ae52deccd3e6a7b02aefaffd625e001 100644
--- a/Geo/OCCVertex.h
+++ b/Geo/OCCVertex.h
@@ -6,6 +6,7 @@
 #ifndef _OCC_VERTEX_H_
 #define _OCC_VERTEX_H_
 
+#include "GmshConfig.h"
 #include "GModel.h"
 #include "GVertex.h"
 #include "OCCIncludes.h"
diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp
index d56f116f0d59cb2cb579168db7f860d617f76537..54dcf1fbfab1d46c3e3b359171f145156a990e4a 100644
--- a/Geo/discreteEdge.cpp
+++ b/Geo/discreteEdge.cpp
@@ -3,8 +3,9 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
-#include "discreteEdge.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "discreteEdge.h"
 
 #if !defined(HAVE_GMSH_EMBEDDED)
 #include "Geo.h"
diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp
index f45f75de76a34e4c71b560f233394fd672c69cea..d1751560289b70e4c7fa44af31276145088159cb 100644
--- a/Geo/discreteFace.cpp
+++ b/Geo/discreteFace.cpp
@@ -3,8 +3,9 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
-#include "discreteFace.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "discreteFace.h"
 
 #if !defined(HAVE_GMSH_EMBEDDED)
 #include "Geo.h"
diff --git a/Geo/discreteRegion.cpp b/Geo/discreteRegion.cpp
index dcf1cf22ca92a23caf4f3ab0a46b817a03d16df5..8e9ae71546b036d6857d325b0f345e3c45a78e9c 100644
--- a/Geo/discreteRegion.cpp
+++ b/Geo/discreteRegion.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "discreteRegion.h"
 
 #if !defined(HAVE_GMSH_EMBEDDED)
diff --git a/Geo/fourierEdge.cpp b/Geo/fourierEdge.cpp
index ac2b2f0137b86223796fb6b06e6dee539192792e..21be59edce74506620316994ee709639633076ac 100644
--- a/Geo/fourierEdge.cpp
+++ b/Geo/fourierEdge.cpp
@@ -2,6 +2,8 @@
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
+
+#include "GmshConfig.h"
 #include "fourierEdge.h"
 #include "Context.h"
 
diff --git a/Geo/fourierEdge.h b/Geo/fourierEdge.h
index e206d672989770621296a25abc8f49f44f0dae91..98f2c83e9647c98da9af023d1b4eafc61872f092 100644
--- a/Geo/fourierEdge.h
+++ b/Geo/fourierEdge.h
@@ -6,6 +6,7 @@
 #ifndef _FOURIER_EDGE_H_
 #define _FOURIER_EDGE_H_
 
+#include "GmshConfig.h"
 #include "GEdge.h"
 #include "GModel.h"
 #include "fourierVertex.h"
diff --git a/Geo/fourierFace.cpp b/Geo/fourierFace.cpp
index c0ee5d6b52d5dedce035a4d1db9fe22cfaace27a..a564ab9a6aafca0395b78ab044ae13de2a5a031c 100644
--- a/Geo/fourierFace.cpp
+++ b/Geo/fourierFace.cpp
@@ -2,10 +2,12 @@
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
+
 #include <list>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "fourierVertex.h"
 #include "fourierFace.h"
-#include "GmshMessage.h"
 
 #if defined(HAVE_FOURIER_MODEL)
 
diff --git a/Geo/fourierFace.h b/Geo/fourierFace.h
index 0e49ef2273cdd87a14d1f44d2b29d2294b2a59c0..09412d30dcaf301faaaad7f78b249b6dbe10e1d9 100644
--- a/Geo/fourierFace.h
+++ b/Geo/fourierFace.h
@@ -6,6 +6,7 @@
 #ifndef _FOURIER_FACE_H_
 #define _FOURIER_FACE_H_
 
+#include "GmshConfig.h"
 #include "GFace.h"
 #include "GModel.h"
 #include "Range.h"
diff --git a/Geo/fourierProjectionFace.cpp b/Geo/fourierProjectionFace.cpp
index 3b4a47ec0d452607c8bdf097be5bde6acf3d66d9..a8a9001c115ecd17a071fbe86133e2854afe2e2d 100644
--- a/Geo/fourierProjectionFace.cpp
+++ b/Geo/fourierProjectionFace.cpp
@@ -2,6 +2,8 @@
 //
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
+
+#include "GmshConfig.h"
 #include "fourierProjectionFace.h"
 #include "VertexArray.h"
 
diff --git a/Geo/fourierProjectionFace.h b/Geo/fourierProjectionFace.h
index fc2b02c7b5ad03eb09812f456ef85eb1576d5210..e27a1713ff732eaaa2f3068ec5f7cc5d9e979519 100644
--- a/Geo/fourierProjectionFace.h
+++ b/Geo/fourierProjectionFace.h
@@ -6,6 +6,7 @@
 #ifndef _FOURIER_PROJECTION_FACE_H_
 #define _FOURIER_PROJECTION_FACE_H_
 
+#include "GmshConfig.h"
 #include "GModel.h"
 #include "Range.h"
 
diff --git a/Geo/fourierVertex.h b/Geo/fourierVertex.h
index b7fc7bc5e408dec5e3b42ed5cf34c761986204c1..f0344cf622027c0d98b885f46c8c85c2249d2a68 100644
--- a/Geo/fourierVertex.h
+++ b/Geo/fourierVertex.h
@@ -6,6 +6,7 @@
 #ifndef _FOURIER_VERTEX_H_
 #define _FOURIER_VERTEX_H_
 
+#include "GmshConfig.h"
 #include "GModel.h"
 #include "GVertex.h"
 #include "MVertex.h"
diff --git a/Geo/gmshSurface.cpp b/Geo/gmshSurface.cpp
index 2cfca94d2a2e479bfdc4e7c357e036afe14338ce..4602825aa5a0e0a0cff8cabd1fa34fc28585b5f7 100644
--- a/Geo/gmshSurface.cpp
+++ b/Geo/gmshSurface.cpp
@@ -3,8 +3,10 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
-#include "gmshSurface.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "gmshSurface.h"
+
 #if defined(HAVE_MATH_EVAL)
 #include "matheval.h"
 #endif
diff --git a/Graphics/Makefile b/Graphics/Makefile
index 30b7694b7f6635ca8a96d5052479fbf56f618b09..fb34d92fcb9614d328d7af6451f40e931e198369 100644
--- a/Graphics/Makefile
+++ b/Graphics/Makefile
@@ -60,17 +60,17 @@ depend:
 # DO NOT DELETE THIS LINE
 Trackball${OBJEXT}: Trackball.cpp Trackball.h
 Iso${OBJEXT}: Iso.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h
 ReadImg${OBJEXT}: ReadImg.cpp ReadImg.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h
 drawContext${OBJEXT}: drawContext.cpp ../Common/GmshMessage.h drawContext.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h Trackball.h \
   ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Common/GmshConfig.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
@@ -90,28 +90,30 @@ drawMesh${OBJEXT}: drawMesh.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Geo/MVertex.h \
   ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Common/OS.h gl2ps.h ../Common/VertexArray.h ../Common/SmoothData.h \
-  ../Post/PView.h ../Post/PViewData.h
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Common/OS.h \
+  gl2ps.h ../Common/VertexArray.h ../Common/SmoothData.h ../Post/PView.h \
+  ../Post/PViewData.h
 drawGeom${OBJEXT}: drawGeom.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h gl2ps.h ../Common/VertexArray.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h
-drawPost${OBJEXT}: drawPost.cpp drawContext.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Common/GmshMessage.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h Iso.h \
-  ../Post/PView.h ../Post/PViewOptions.h ../Post/ColorTable.h \
-  ../Post/PViewData.h ../Common/VertexArray.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Common/SmoothData.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h gl2ps.h
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h gl2ps.h \
+  ../Common/VertexArray.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h
+drawPost${OBJEXT}: drawPost.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  drawContext.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h Iso.h ../Post/PView.h ../Post/PViewOptions.h \
+  ../Post/ColorTable.h ../Post/PViewData.h ../Common/VertexArray.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Common/SmoothData.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  gl2ps.h
 drawAxes${OBJEXT}: drawAxes.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
@@ -121,35 +123,35 @@ drawAxes${OBJEXT}: drawAxes.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h gl2ps.h
+  ../Mesh/meshPartitionOptions.h ../Common/GmshConfig.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h gl2ps.h
 drawScales${OBJEXT}: drawScales.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Post/PView.h ../Post/PViewOptions.h \
   ../Post/ColorTable.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h gl2ps.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h gl2ps.h
 drawGraph2d${OBJEXT}: drawGraph2d.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Post/PView.h ../Post/PViewOptions.h \
   ../Post/ColorTable.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h gl2ps.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Common/GmshConfig.h ../Common/GmshMessage.h gl2ps.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
   ../Numeric/GmshMatrix.h
 drawGlyph${OBJEXT}: drawGlyph.cpp drawContext.h ../Geo/SBoundingBox3d.h \
   ../Geo/SPoint3.h ../Fltk/Draw.h ../Common/GmshDefines.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/StringUtils.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  gl2ps.h
-gl2ps${OBJEXT}: gl2ps.cpp gl2ps.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Common/StringUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h gl2ps.h
+gl2ps${OBJEXT}: gl2ps.cpp gl2ps.h ../Common/GmshConfig.h
 gl2gif${OBJEXT}: gl2gif.cpp ../Common/MallocUtils.h gl2gif.h PixelBuffer.h \
-  ../Common/GmshMessage.h ../Fltk/Draw.h
-gl2jpeg${OBJEXT}: gl2jpeg.cpp gl2jpeg.h PixelBuffer.h ../Common/GmshMessage.h \
-  ../Fltk/Draw.h ../Common/MallocUtils.h
-gl2png${OBJEXT}: gl2png.cpp gl2png.h PixelBuffer.h ../Common/GmshMessage.h \
-  ../Fltk/Draw.h ../Common/MallocUtils.h
-gl2ppm${OBJEXT}: gl2ppm.cpp gl2ppm.h PixelBuffer.h ../Common/GmshMessage.h \
-  ../Fltk/Draw.h ../Common/MallocUtils.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Fltk/Draw.h
+gl2jpeg${OBJEXT}: gl2jpeg.cpp ../Common/GmshConfig.h gl2jpeg.h PixelBuffer.h \
+  ../Common/GmshMessage.h ../Fltk/Draw.h ../Common/MallocUtils.h
+gl2png${OBJEXT}: gl2png.cpp ../Common/GmshConfig.h gl2png.h PixelBuffer.h \
+  ../Common/GmshMessage.h ../Fltk/Draw.h ../Common/MallocUtils.h
+gl2ppm${OBJEXT}: gl2ppm.cpp gl2ppm.h PixelBuffer.h ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h ../Fltk/Draw.h ../Common/MallocUtils.h
 gl2yuv${OBJEXT}: gl2yuv.cpp ../Common/MallocUtils.h gl2yuv.h PixelBuffer.h \
-  ../Common/GmshMessage.h ../Fltk/Draw.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Fltk/Draw.h
diff --git a/Graphics/PixelBuffer.h b/Graphics/PixelBuffer.h
index 6d33fe4467ae136e82e7156e1c6f631b0cb954dc..a00e2e26217ed4fa1c303798c39df8461a90b0bd 100644
--- a/Graphics/PixelBuffer.h
+++ b/Graphics/PixelBuffer.h
@@ -7,6 +7,7 @@
 #define _PIXEL_BUFFER_H_
 
 #include <FL/gl.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Draw.h"
 #include "MallocUtils.h"
diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp
index 1ce052d0868db7d8018d793530fe10b7e1d3fa58..0857df41a99cfc78b420a55794fc58c7fb5dc1ac 100644
--- a/Graphics/drawPost.cpp
+++ b/Graphics/drawPost.cpp
@@ -6,8 +6,9 @@
 #include <math.h>
 #include <algorithm>
 #include <FL/gl.h>
-#include "drawContext.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "drawContext.h"
 #include "Numeric.h"
 #include "Iso.h"
 #include "PView.h"
diff --git a/Graphics/gl2jpeg.cpp b/Graphics/gl2jpeg.cpp
index 2c9f60e4d4e773dc43710de787b9e7f197904dc0..9db30b79fb8077989751ba49826712e2fb747d13 100644
--- a/Graphics/gl2jpeg.cpp
+++ b/Graphics/gl2jpeg.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "gl2jpeg.h"
 #undef EXTERN
 
diff --git a/Graphics/gl2png.cpp b/Graphics/gl2png.cpp
index 032b3273ea9cb17576929abb76d095d6c2621fb5..2af7102195786874dc5568d30f6a33f4bef22938 100644
--- a/Graphics/gl2png.cpp
+++ b/Graphics/gl2png.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "gl2png.h"
 
 #if !defined(HAVE_LIBPNG)
diff --git a/Graphics/gl2ps.h b/Graphics/gl2ps.h
index 9057f7c1dcd3740dbd9d9d798bcf4735fcff4a76..e3131d4b1be7efd6f97e77f0df64662cf50f1b0c 100644
--- a/Graphics/gl2ps.h
+++ b/Graphics/gl2ps.h
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.h,v 1.71 2007-09-18 16:26:02 geuzaine Exp $ */
+/* $Id: gl2ps.h,v 1.72 2009-01-08 23:58:07 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2007 Christophe Geuzaine <geuz@geuz.org>
@@ -37,6 +37,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include "GmshConfig.h"
 
 /* Define GL2PSDLL at compile time to build a Windows DLL */
 
diff --git a/Makefile b/Makefile
index b093001d5ab03610ed5f334ba7cf6d4c26c7a43b..21bd89d5c1b24613e28f864ea1a3d7dee02a67ad 100644
--- a/Makefile
+++ b/Makefile
@@ -206,16 +206,15 @@ else
 	erase Common\GmshVersion.h
 endif
 
-clean-most:
-	for i in doc lib ${GMSH_DIRS:contrib/Netgen=}; do (cd $$i && ${MAKE} clean); done
-	rm -f ${GMSH_VERSION_FILE}
-
 clean-fm:
 	rm -f Geo/fourier*.o Geo/GModelIO_Fourier.o Fltk/GUI_Projection.o 
 
 depend: initialtag
+	mv -f Common/GmshConfig.h .
+	cp -f utils/misc/GmshConfig.depend Common/GmshConfig.h
 	for i in ${GMSH_DIRS};\
-        do (cd $$i && ${MAKE} depend "FLAGS=-DHAVE_GSL -DHAVE_FLTK -DHAVE_METIS"); done
+        do (cd $$i && ${MAKE} depend); done
+	mv -f GmshConfig.h Common/
 
 nodepend:
 	for i in ${GMSH_DIRS} ; do \
diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp
index 0bbaff8b353025fc0bce6f4ae29a855702e1db5e..e86b9beec084db5edc8b3df9c53f9ceefc0ffc1b 100644
--- a/Mesh/Field.cpp
+++ b/Mesh/Field.cpp
@@ -13,11 +13,12 @@
 #include <string>
 #include <string.h>
 #include <sstream>
+#include "GmshConfig.h"
 
-#ifdef HAVE_MATH_EVAL
+#if defined(HAVE_MATH_EVAL)
 #include "matheval.h"
 #endif
-#ifdef HAVE_ANN
+#if defined(HAVE_ANN)
 #include "ANN/ANN.h"
 #endif
 
@@ -1113,7 +1114,7 @@ class RestrictField : public Field
   }
 };
 
-#ifdef HAVE_ANN
+#if defined(HAVE_ANN)
 class AttractorField : public Field
 {
   ANNkd_tree *kdtree;
diff --git a/Mesh/Field.h b/Mesh/Field.h
index 87f62af45902df31c927d7ead151e9c5735f0875..f0e3bfb82782f6c8b9c10b0d26f8dd52c80c3a73 100644
--- a/Mesh/Field.h
+++ b/Mesh/Field.h
@@ -9,6 +9,7 @@
 #include <string>
 #include <map>
 #include <list>
+#include "GmshConfig.h"
 
 #if !defined(HAVE_NO_POST)
 #include "PView.h"
diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index 9d26c199826c2317dc0dedb86c31eeb1d608187f..30058f3b1162b4bcd02aa9648bae106129251dee 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -4,6 +4,7 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <stdlib.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Numeric.h"
 #include "Context.h"
diff --git a/Mesh/Makefile b/Mesh/Makefile
index c0fdff8516d00aa84e1b9fa690c6f6f3f549448d..037996debbb9ce3aab0235a009d5213647cbba1d 100644
--- a/Mesh/Makefile
+++ b/Mesh/Makefile
@@ -76,43 +76,45 @@ depend:
 	rm -f Makefile.new
 
 # DO NOT DELETE THIS LINE
-Generator${OBJEXT}: Generator.cpp ../Common/GmshMessage.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Common/OS.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \
-  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  meshGEdge.h meshGFace.h meshGFaceBDS.h meshGRegion.h BackgroundMesh.h \
-  BoundaryLayers.h HighOrder.h Generator.h ../Post/PView.h \
-  ../Post/PViewData.h
-Field${OBJEXT}: Field.cpp ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h Field.h ../Post/PView.h ../Geo/SPoint3.h \
-  ../Geo/GeoInterpolation.h ../Geo/Geo.h ../Common/GmshDefines.h \
-  ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
-  ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h ../Common/TreeUtils.h \
-  ../Common/avl.h ../Common/ListUtils.h ../Geo/SPoint2.h \
-  ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Geo/GModel.h \
+Generator${OBJEXT}: Generator.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h ../Common/OS.h ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h ../Post/PViewDataList.h ../Post/PViewData.h \
-  ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
+  ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
+  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Numeric/Gauss.h meshGEdge.h meshGFace.h meshGFaceBDS.h meshGRegion.h \
+  BackgroundMesh.h BoundaryLayers.h HighOrder.h Generator.h \
+  ../Post/PView.h ../Post/PViewData.h
+Field${OBJEXT}: Field.cpp ../Common/GmshConfig.h \
+  ../contrib/ANN/include/ANN/ANN.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h Field.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Geo/GeoInterpolation.h ../Geo/Geo.h \
+  ../Common/GmshDefines.h ../Geo/gmshSurface.h ../Geo/Pair.h \
+  ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
+  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
+  ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/MVertex.h \
+  ../Geo/SPoint2.h ../Geo/SPoint3.h
 gmshSmoothHighOrder${OBJEXT}: gmshSmoothHighOrder.cpp HighOrder.h \
   ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
@@ -126,17 +128,17 @@ gmshSmoothHighOrder${OBJEXT}: gmshSmoothHighOrder.cpp HighOrder.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
   ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h meshGFaceDelaunayInsertion.h \
-  gmshSmoothHighOrder.h ../Numeric/gmshAssembler.h \
-  ../Numeric/gmshLinearSystem.h ../Numeric/gmshLaplace.h \
-  ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \
-  ../Numeric/gmshFunction.h ../Common/Gmsh.h ../Common/GmshMessage.h \
-  ../Numeric/GmshMatrix.h ../Numeric/gmshElasticity.h \
-  ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \
-  ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  meshGFaceDelaunayInsertion.h gmshSmoothHighOrder.h \
+  ../Numeric/gmshAssembler.h ../Numeric/gmshLinearSystem.h \
+  ../Numeric/gmshLaplace.h ../Numeric/gmshTermOfFormulation.h \
+  ../Numeric/GmshMatrix.h ../Numeric/gmshFunction.h ../Common/Gmsh.h \
+  ../Common/GmshMessage.h ../Numeric/GmshMatrix.h \
+  ../Numeric/gmshElasticity.h ../Numeric/gmshTermOfFormulation.h \
+  ../Numeric/GmshMatrix.h ../Numeric/gmshLinearSystemGmm.h \
+  ../Numeric/gmshLinearSystem.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
 meshGEdge${OBJEXT}: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -150,8 +152,8 @@ meshGEdge${OBJEXT}: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h BackgroundMesh.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  BackgroundMesh.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
   ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h
 meshGEdgeExtruded${OBJEXT}: meshGEdgeExtruded.cpp ../Geo/GModel.h \
@@ -166,27 +168,28 @@ meshGEdgeExtruded${OBJEXT}: meshGEdgeExtruded.cpp ../Geo/GModel.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Geo/ExtrudeParams.h \
-  ../Common/SmoothData.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Geo/ExtrudeParams.h ../Common/SmoothData.h
 meshGFace${OBJEXT}: meshGFace.cpp meshGFace.h meshGFaceBDS.h \
   meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Common/GmshMessage.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  meshGFaceQuadrilateralize.h meshGFaceOptimize.h DivideAndConquer.h \
-  BackgroundMesh.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BDS.h \
-  qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h HighOrder.h
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h meshGFaceQuadrilateralize.h \
+  meshGFaceOptimize.h DivideAndConquer.h BackgroundMesh.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h BDS.h qualityMeasures.h Field.h ../Post/PView.h \
+  ../Common/OS.h HighOrder.h
 meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -198,8 +201,8 @@ meshGFaceTransfinite${OBJEXT}: meshGFaceTransfinite.cpp meshGFace.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
   ../Numeric/GmshMatrix.h
 meshGFaceExtruded${OBJEXT}: meshGFaceExtruded.cpp ../Geo/GModel.h \
@@ -214,82 +217,85 @@ meshGFaceExtruded${OBJEXT}: meshGFaceExtruded.cpp ../Geo/GModel.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Geo/ExtrudeParams.h \
-  ../Common/SmoothData.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Geo/ExtrudeParams.h ../Common/SmoothData.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 meshGFaceBDS${OBJEXT}: meshGFaceBDS.cpp meshGFace.h meshGFaceOptimize.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h meshGFaceDelaunayInsertion.h \
-  BackgroundMesh.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BDS.h \
-  qualityMeasures.h Field.h ../Post/PView.h ../Common/OS.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  meshGFaceDelaunayInsertion.h BackgroundMesh.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h BDS.h qualityMeasures.h Field.h ../Post/PView.h \
+  ../Common/OS.h
 meshGFaceDelaunayInsertion${OBJEXT}: meshGFaceDelaunayInsertion.cpp \
   BackgroundMesh.h meshGFaceDelaunayInsertion.h ../Geo/MElement.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \
   ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h meshGFaceOptimize.h \
-  meshGFace.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Numeric/Numeric.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  meshGFaceOptimize.h meshGFace.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
 meshGFaceOptimize${OBJEXT}: meshGFaceOptimize.cpp meshGFaceOptimize.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h meshGFaceDelaunayInsertion.h \
-  qualityMeasures.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h BackgroundMesh.h Generator.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  meshGFaceDelaunayInsertion.h qualityMeasures.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h BackgroundMesh.h Generator.h
 meshGFaceQuadrilateralize${OBJEXT}: meshGFaceQuadrilateralize.cpp \
   meshGFaceQuadrilateralize.h ../Common/GmshMessage.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  meshGFaceDelaunayInsertion.h ../Geo/MElement.h ../Common/GmshDefines.h \
-  ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h meshGFaceDelaunayInsertion.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
+  meshGFaceOptimize.h meshGFaceBDS.h BDS.h
+meshGRegion${OBJEXT}: meshGRegion.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h meshGRegion.h meshGRegionDelaunayInsertion.h \
+  ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
+  ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
-  ../Numeric/Gauss.h meshGFaceOptimize.h meshGFaceBDS.h BDS.h
-meshGRegion${OBJEXT}: meshGRegion.cpp meshGRegion.h \
-  meshGRegionDelaunayInsertion.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/SPoint2.h \
-  ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BackgroundMesh.h \
-  qualityMeasures.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Numeric/Gauss.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h BackgroundMesh.h qualityMeasures.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/gmshRegion.h ../Geo/Geo.h \
   ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
   ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
@@ -304,16 +310,16 @@ meshGRegionDelaunayInsertion${OBJEXT}: meshGRegionDelaunayInsertion.cpp \
   ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h qualityMeasures.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h qualityMeasures.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h \
+  ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h \
+  ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h \
+  ../Geo/GEntity.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h
 meshGRegionTransfinite${OBJEXT}: meshGRegionTransfinite.cpp meshGFace.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -325,8 +331,8 @@ meshGRegionTransfinite${OBJEXT}: meshGRegionTransfinite.cpp meshGFace.h \
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 meshGRegionExtruded${OBJEXT}: meshGRegionExtruded.cpp ../Geo/GModel.h \
   ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -339,11 +345,12 @@ meshGRegionExtruded${OBJEXT}: meshGRegionExtruded.cpp ../Geo/GModel.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Geo/ExtrudeParams.h \
-  ../Common/SmoothData.h meshGFace.h meshGRegion.h ../Common/Context.h \
-  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-meshGRegionCarveHole${OBJEXT}: meshGRegionCarveHole.cpp ../Geo/GModel.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Geo/ExtrudeParams.h ../Common/SmoothData.h meshGFace.h meshGRegion.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+meshGRegionCarveHole${OBJEXT}: meshGRegionCarveHole.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -353,42 +360,45 @@ meshGRegionCarveHole${OBJEXT}: meshGRegionCarveHole.cpp ../Geo/GModel.h \
   ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h
+  ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Numeric/Gauss.h ../contrib/ANN/include/ANN/ANN.h
 meshGRegionLocalMeshMod${OBJEXT}: meshGRegionLocalMeshMod.cpp \
   meshGRegionLocalMeshMod.h meshGRegionDelaunayInsertion.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h BackgroundMesh.h \
-  qualityMeasures.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h BackgroundMesh.h qualityMeasures.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GRegion.h \
   ../Geo/GEntity.h
 DivideAndConquer${OBJEXT}: DivideAndConquer.cpp ../Common/GmshMessage.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h DivideAndConquer.h ../Common/MallocUtils.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h DivideAndConquer.h \
+  ../Common/MallocUtils.h
 BackgroundMesh${OBJEXT}: BackgroundMesh.cpp ../Common/GmshMessage.h \
   BackgroundMesh.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEdge.h ../Geo/GFace.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEdge.h ../Geo/GFace.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h Field.h ../Post/PView.h
 qualityMeasures${OBJEXT}: qualityMeasures.cpp qualityMeasures.h BDS.h \
   ../Common/GmshMessage.h ../Geo/MVertex.h ../Geo/SPoint2.h \
   ../Geo/SPoint3.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
-  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Numeric/Gauss.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
 BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -401,11 +411,12 @@ BoundaryLayers${OBJEXT}: BoundaryLayers.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h BoundaryLayers.h \
-  ../Geo/ExtrudeParams.h ../Common/SmoothData.h meshGEdge.h meshGFace.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  BoundaryLayers.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
+  meshGEdge.h meshGFace.h
 BDS${OBJEXT}: BDS.cpp ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h BDS.h ../Geo/GFace.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  BDS.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/SVector3.h \
@@ -429,12 +440,12 @@ HighOrder${OBJEXT}: HighOrder.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h \
   gmshSmoothHighOrder.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
   ../Geo/MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/OS.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Common/OS.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
   ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
   ../Mesh/meshPartitionOptions.h
-meshPartition${OBJEXT}: meshPartition.cpp ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+meshPartition${OBJEXT}: meshPartition.cpp ../Common/GmshConfig.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -460,4 +471,5 @@ meshRefine${OBJEXT}: meshRefine.cpp HighOrder.h ../Geo/GModel.h ../Geo/GVertex.h
   ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h \
   ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \
-  ../Numeric/GmshMatrix.h ../Numeric/Gauss.h ../Common/OS.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \
+  ../Common/OS.h
diff --git a/Mesh/meshGRegion.cpp b/Mesh/meshGRegion.cpp
index e08b1780f9f77b6304059af63fccea4ec1fd7932..2425130ec657d915b97735480775e91e0a059221 100644
--- a/Mesh/meshGRegion.cpp
+++ b/Mesh/meshGRegion.cpp
@@ -5,6 +5,8 @@
 
 #include <stdlib.h>
 #include <vector>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "meshGRegion.h"
 #include "meshGRegionDelaunayInsertion.h"
 #include "GModel.h"
@@ -13,7 +15,6 @@
 #include "GEdge.h"
 #include "gmshRegion.h"
 #include "BDS.h"
-#include "GmshMessage.h"
 #include "Context.h"
 
 extern Context_T CTX;
diff --git a/Mesh/meshGRegionCarveHole.cpp b/Mesh/meshGRegionCarveHole.cpp
index bb13e6495abbbf93a2f1b8e87f0a036d9d408cdb..8fe9136d49b6fe1441c66f12ad121b9311c0ea03 100644
--- a/Mesh/meshGRegionCarveHole.cpp
+++ b/Mesh/meshGRegionCarveHole.cpp
@@ -4,9 +4,10 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <set>
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "GModel.h"
 #include "MElement.h"
-#include "GmshMessage.h"
 
 #if !defined(HAVE_ANN)
 
diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp
index 74b672c92232b334baeb17401b01775b38799fde..9bd3fe55caa50a919d28a1d36f3b1037d0a5ebe6 100644
--- a/Mesh/meshPartition.cpp
+++ b/Mesh/meshPartition.cpp
@@ -5,6 +5,8 @@
 //
 // Partition.cpp - Copyright (C) 2008 S. Guzik, C. Geuzaine, J.-F. Remacle
 
+#include "GmshConfig.h"
+
 #if defined(HAVE_CHACO) || defined(HAVE_METIS)
 
 #include "GModel.h"
diff --git a/Mesh/meshPartitionOptions.h b/Mesh/meshPartitionOptions.h
index 53be3dc783d76dbec4dcb9dc7732a54d442d08f3..a3916e492d031a55a3aba401731bddf93d923a91 100644
--- a/Mesh/meshPartitionOptions.h
+++ b/Mesh/meshPartitionOptions.h
@@ -6,6 +6,8 @@
 #ifndef _MESH_PARTITION_OPTIONS_H_
 #define _MESH_PARTITION_OPTIONS_H_
 
+#include "GmshConfig.h"
+
 struct meshPartitionOptions
 {
 
diff --git a/Numeric/GmshMatrix.h b/Numeric/GmshMatrix.h
index 66b1906092542b3f75e0abd0edd824bbefa1eda4..c88554b11f86f2cd578ab75b3d7891e1d08cb58c 100644
--- a/Numeric/GmshMatrix.h
+++ b/Numeric/GmshMatrix.h
@@ -8,6 +8,7 @@
 
 #include <math.h>
 #include <algorithm>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 
 #if defined(HAVE_BLAS)
diff --git a/Numeric/Makefile b/Numeric/Makefile
index e9023fb71e38bc10d7d4ab186456ffe38eff5f69..d028f3999c6a2e24f62b03679333ce9992611363 100644
--- a/Numeric/Makefile
+++ b/Numeric/Makefile
@@ -52,10 +52,10 @@ depend:
 	rm -f Makefile.new
 
 # DO NOT DELETE THIS LINE
-Numeric${OBJEXT}: Numeric.cpp ../Common/GmshMessage.h Numeric.h \
-  NumericEmbedded.h GmshMatrix.h
+Numeric${OBJEXT}: Numeric.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  Numeric.h NumericEmbedded.h GmshMatrix.h
 NumericEmbedded${OBJEXT}: NumericEmbedded.cpp NumericEmbedded.h GmshMatrix.h \
-  ../Common/GmshMessage.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h
 gmshAssembler${OBJEXT}: gmshAssembler.cpp ../Geo/MVertex.h ../Geo/SPoint2.h \
   ../Geo/SPoint3.h gmshAssembler.h gmshLinearSystem.h
 gmshTermOfFormulation${OBJEXT}: gmshTermOfFormulation.cpp ../Common/Gmsh.h \
@@ -71,12 +71,13 @@ gmshTermOfFormulation${OBJEXT}: gmshTermOfFormulation.cpp ../Common/Gmsh.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
   ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
-  ../Numeric/Gauss.h GmshMatrix.h gmshTermOfFormulation.h gmshFunction.h \
-  gmshLinearSystem.h gmshAssembler.h
+  ../Common/GmshConfig.h ../Numeric/Gauss.h GmshMatrix.h \
+  gmshTermOfFormulation.h gmshFunction.h gmshLinearSystem.h \
+  gmshAssembler.h
 gmshLaplace${OBJEXT}: gmshLaplace.cpp gmshLaplace.h gmshTermOfFormulation.h \
-  GmshMatrix.h ../Common/GmshMessage.h gmshFunction.h ../Common/Gmsh.h \
-  ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  gmshFunction.h ../Common/Gmsh.h ../Common/GmshMessage.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
@@ -89,15 +90,15 @@ gmshLaplace${OBJEXT}: gmshLaplace.cpp gmshLaplace.h gmshTermOfFormulation.h \
   ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
   ../Numeric/Gauss.h Numeric.h NumericEmbedded.h
 gmshElasticity${OBJEXT}: gmshElasticity.cpp gmshElasticity.h \
-  gmshTermOfFormulation.h GmshMatrix.h ../Common/GmshMessage.h \
-  ../Common/Gmsh.h ../Common/GmshMessage.h ../Geo/GModel.h \
-  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  gmshTermOfFormulation.h GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h ../Common/Gmsh.h ../Common/GmshMessage.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
+  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
+  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
+  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/MElement.h ../Common/GmshDefines.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h \
   ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
@@ -105,7 +106,7 @@ gmshElasticity${OBJEXT}: gmshElasticity.cpp gmshElasticity.h \
   ../Numeric/Gauss.h Numeric.h NumericEmbedded.h
 EigSolve${OBJEXT}: EigSolve.cpp
 FunctionSpace${OBJEXT}: FunctionSpace.cpp FunctionSpace.h GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/GmshDefines.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/GmshDefines.h
 GaussQuadratureTri${OBJEXT}: GaussQuadratureTri.cpp Gauss.h GaussLegendre1D.h
 GaussQuadratureQuad${OBJEXT}: GaussQuadratureQuad.cpp Gauss.h GaussLegendre1D.h
 GaussQuadratureTet${OBJEXT}: GaussQuadratureTet.cpp Gauss.h GaussLegendre1D.h
diff --git a/Numeric/Numeric.cpp b/Numeric/Numeric.cpp
index 821568231dfc0734c2dd41c3dced7f8f448f8895..25b917a560b7e7c8856b71a7b9d811335977433c 100644
--- a/Numeric/Numeric.cpp
+++ b/Numeric/Numeric.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "Numeric.h"
 
diff --git a/Numeric/gmshLinearSystemGmm.h b/Numeric/gmshLinearSystemGmm.h
index e65894ad12767d3f0175a81a2e11ffb89c3441f4..6b5dd077b4f4764a4981abae9ebb23ef4ae80237 100644
--- a/Numeric/gmshLinearSystemGmm.h
+++ b/Numeric/gmshLinearSystemGmm.h
@@ -8,6 +8,7 @@
 
 // Interface to GMM++
 
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "gmshLinearSystem.h"
 
diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp
index c6060c3d0bf8ac0f356c3c71d6f991a14e594c4c..32f6327f936f8eb2f892b14cfbc8bec398baff25 100644
--- a/Parser/Gmsh.tab.cpp
+++ b/Parser/Gmsh.tab.cpp
@@ -328,6 +328,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <time.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "GmshMatrix.h"
 #include "MallocUtils.h"
@@ -411,7 +412,7 @@ void FixRelativePath(const char *in, char *out);
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 73 "Gmsh.y"
+#line 74 "Gmsh.y"
 {
   char *c;
   int i;
@@ -422,7 +423,7 @@ typedef union YYSTYPE
   List_T *l;
 }
 /* Line 193 of yacc.c.  */
-#line 426 "Gmsh.tab.cpp"
+#line 427 "Gmsh.tab.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -435,7 +436,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 439 "Gmsh.tab.cpp"
+#line 440 "Gmsh.tab.cpp"
 
 #ifdef short
 # undef short
@@ -967,42 +968,42 @@ static const yytype_int16 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   141,   141,   142,   147,   149,   153,   154,   155,   156,
-     157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
-     170,   174,   181,   186,   201,   214,   243,   257,   268,   283,
-     288,   289,   290,   291,   292,   296,   298,   303,   305,   311,
-     457,   310,   475,   482,   493,   492,   511,   518,   529,   528,
-     546,   562,   585,   584,   598,   599,   600,   601,   602,   606,
-     607,   614,   636,   663,   703,   713,   721,   729,   741,   750,
-     755,   763,   781,   799,   808,   820,   825,   833,   853,   876,
-     883,   889,   909,   930,   956,   968,   985,   989,   999,  1002,
-    1015,  1018,  1028,  1051,  1067,  1089,  1107,  1125,  1155,  1185,
-    1205,  1223,  1241,  1267,  1284,  1303,  1321,  1360,  1366,  1372,
-    1379,  1404,  1429,  1445,  1461,  1492,  1510,  1527,  1548,  1553,
-    1558,  1563,  1568,  1588,  1594,  1605,  1606,  1611,  1614,  1618,
-    1641,  1664,  1687,  1715,  1724,  1728,  1743,  1770,  1787,  1801,
-    1807,  1813,  1822,  1836,  1884,  1902,  1917,  1936,  1948,  1972,
-    1976,  1981,  1986,  1998,  2015,  2032,  2051,  2070,  2098,  2106,
-    2112,  2119,  2123,  2132,  2140,  2148,  2157,  2156,  2169,  2168,
-    2181,  2180,  2193,  2192,  2205,  2212,  2219,  2226,  2233,  2240,
-    2247,  2254,  2261,  2269,  2268,  2280,  2279,  2291,  2290,  2302,
-    2301,  2313,  2312,  2324,  2323,  2335,  2334,  2346,  2345,  2357,
-    2356,  2371,  2374,  2380,  2389,  2409,  2432,  2436,  2460,  2463,
-    2479,  2482,  2495,  2498,  2504,  2507,  2514,  2568,  2638,  2643,
-    2710,  2753,  2779,  2802,  2825,  2828,  2837,  2841,  2857,  2858,
-    2859,  2860,  2861,  2862,  2863,  2864,  2865,  2872,  2873,  2874,
-    2875,  2876,  2877,  2878,  2879,  2880,  2881,  2882,  2883,  2884,
-    2885,  2886,  2887,  2888,  2889,  2890,  2891,  2892,  2893,  2894,
-    2895,  2896,  2897,  2898,  2899,  2900,  2901,  2902,  2903,  2905,
-    2906,  2907,  2908,  2909,  2910,  2911,  2912,  2913,  2914,  2915,
-    2916,  2917,  2918,  2919,  2920,  2921,  2922,  2923,  2924,  2925,
-    2934,  2935,  2936,  2937,  2938,  2939,  2940,  2944,  2957,  2969,
-    2984,  2994,  3004,  3022,  3027,  3032,  3042,  3052,  3060,  3064,
-    3068,  3072,  3076,  3083,  3087,  3091,  3095,  3102,  3107,  3114,
-    3119,  3123,  3128,  3132,  3140,  3151,  3155,  3167,  3175,  3183,
-    3190,  3201,  3221,  3231,  3241,  3251,  3271,  3276,  3280,  3284,
-    3296,  3300,  3312,  3319,  3329,  3333,  3348,  3353,  3360,  3364,
-    3377,  3385,  3396,  3400,  3408,  3416,  3430,  3444,  3448
+       0,   142,   142,   143,   148,   150,   154,   155,   156,   157,
+     158,   159,   160,   161,   162,   163,   164,   165,   166,   167,
+     171,   175,   182,   187,   202,   215,   244,   258,   269,   284,
+     289,   290,   291,   292,   293,   297,   299,   304,   306,   312,
+     458,   311,   476,   483,   494,   493,   512,   519,   530,   529,
+     547,   563,   586,   585,   599,   600,   601,   602,   603,   607,
+     608,   615,   637,   664,   704,   714,   722,   730,   742,   751,
+     756,   764,   782,   800,   809,   821,   826,   834,   854,   877,
+     884,   890,   910,   931,   957,   969,   986,   990,  1000,  1003,
+    1016,  1019,  1029,  1052,  1068,  1090,  1108,  1126,  1156,  1186,
+    1206,  1224,  1242,  1268,  1285,  1304,  1322,  1361,  1367,  1373,
+    1380,  1405,  1430,  1446,  1462,  1493,  1511,  1528,  1549,  1554,
+    1559,  1564,  1569,  1589,  1595,  1606,  1607,  1612,  1615,  1619,
+    1642,  1665,  1688,  1716,  1725,  1729,  1744,  1771,  1788,  1802,
+    1808,  1814,  1823,  1837,  1885,  1903,  1918,  1937,  1949,  1973,
+    1977,  1982,  1987,  1999,  2016,  2033,  2052,  2071,  2099,  2107,
+    2113,  2120,  2124,  2133,  2141,  2149,  2158,  2157,  2170,  2169,
+    2182,  2181,  2194,  2193,  2206,  2213,  2220,  2227,  2234,  2241,
+    2248,  2255,  2262,  2270,  2269,  2281,  2280,  2292,  2291,  2303,
+    2302,  2314,  2313,  2325,  2324,  2336,  2335,  2347,  2346,  2358,
+    2357,  2372,  2375,  2381,  2390,  2410,  2433,  2437,  2461,  2464,
+    2480,  2483,  2496,  2499,  2505,  2508,  2515,  2569,  2639,  2644,
+    2711,  2754,  2780,  2803,  2826,  2829,  2838,  2842,  2858,  2859,
+    2860,  2861,  2862,  2863,  2864,  2865,  2866,  2873,  2874,  2875,
+    2876,  2877,  2878,  2879,  2880,  2881,  2882,  2883,  2884,  2885,
+    2886,  2887,  2888,  2889,  2890,  2891,  2892,  2893,  2894,  2895,
+    2896,  2897,  2898,  2899,  2900,  2901,  2902,  2903,  2904,  2906,
+    2907,  2908,  2909,  2910,  2911,  2912,  2913,  2914,  2915,  2916,
+    2917,  2918,  2919,  2920,  2921,  2922,  2923,  2924,  2925,  2926,
+    2935,  2936,  2937,  2938,  2939,  2940,  2941,  2945,  2958,  2970,
+    2985,  2995,  3005,  3023,  3028,  3033,  3043,  3053,  3061,  3065,
+    3069,  3073,  3077,  3084,  3088,  3092,  3096,  3103,  3108,  3115,
+    3120,  3124,  3129,  3133,  3141,  3152,  3156,  3168,  3176,  3184,
+    3191,  3202,  3222,  3232,  3242,  3252,  3272,  3277,  3281,  3285,
+    3297,  3301,  3313,  3320,  3330,  3334,  3349,  3354,  3361,  3365,
+    3378,  3386,  3397,  3401,  3409,  3417,  3431,  3445,  3449
 };
 #endif
 
@@ -3642,96 +3643,96 @@ yyreduce:
   switch (yyn)
     {
         case 3:
-#line 142 "Gmsh.y"
+#line 143 "Gmsh.y"
     { yyerrok; return 1; ;}
     break;
 
   case 6:
-#line 153 "Gmsh.y"
+#line 154 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 7:
-#line 154 "Gmsh.y"
+#line 155 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 8:
-#line 155 "Gmsh.y"
+#line 156 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 9:
-#line 156 "Gmsh.y"
+#line 157 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 10:
-#line 157 "Gmsh.y"
+#line 158 "Gmsh.y"
     { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;}
     break;
 
   case 11:
-#line 158 "Gmsh.y"
+#line 159 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 12:
-#line 159 "Gmsh.y"
+#line 160 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 13:
-#line 160 "Gmsh.y"
+#line 161 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 14:
-#line 161 "Gmsh.y"
+#line 162 "Gmsh.y"
     { List_Delete((yyvsp[(1) - (1)].l)); return 1; ;}
     break;
 
   case 15:
-#line 162 "Gmsh.y"
+#line 163 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 16:
-#line 163 "Gmsh.y"
+#line 164 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 17:
-#line 164 "Gmsh.y"
+#line 165 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 18:
-#line 165 "Gmsh.y"
+#line 166 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 19:
-#line 166 "Gmsh.y"
+#line 167 "Gmsh.y"
     { return 1; ;}
     break;
 
   case 20:
-#line 171 "Gmsh.y"
+#line 172 "Gmsh.y"
     {
       (yyval.c) = (char*)"w";
     ;}
     break;
 
   case 21:
-#line 175 "Gmsh.y"
+#line 176 "Gmsh.y"
     {
       (yyval.c) = (char*)"a";
     ;}
     break;
 
   case 22:
-#line 182 "Gmsh.y"
+#line 183 "Gmsh.y"
     {
       Msg::Direct((yyvsp[(3) - (5)].c));
       Free((yyvsp[(3) - (5)].c));
@@ -3739,7 +3740,7 @@ yyreduce:
     break;
 
   case 23:
-#line 187 "Gmsh.y"
+#line 188 "Gmsh.y"
     {
       char tmpstring[1024];
       FixRelativePath((yyvsp[(6) - (7)].c), tmpstring);
@@ -3757,7 +3758,7 @@ yyreduce:
     break;
 
   case 24:
-#line 202 "Gmsh.y"
+#line 203 "Gmsh.y"
     {
       char tmpstring[1024];
       int i = PrintListOfDouble((yyvsp[(3) - (7)].c), (yyvsp[(5) - (7)].l), tmpstring);
@@ -3773,7 +3774,7 @@ yyreduce:
     break;
 
   case 25:
-#line 215 "Gmsh.y"
+#line 216 "Gmsh.y"
     {
       char tmpstring[1024];
       int i = PrintListOfDouble((yyvsp[(3) - (9)].c), (yyvsp[(5) - (9)].l), tmpstring);
@@ -3800,7 +3801,7 @@ yyreduce:
     break;
 
   case 26:
-#line 244 "Gmsh.y"
+#line 245 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(1) - (6)].c), "View") && ViewData->finalize()){
@@ -3817,7 +3818,7 @@ yyreduce:
     break;
 
   case 27:
-#line 258 "Gmsh.y"
+#line 259 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -3831,7 +3832,7 @@ yyreduce:
     break;
 
   case 28:
-#line 269 "Gmsh.y"
+#line 270 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -3845,7 +3846,7 @@ yyreduce:
     break;
 
   case 29:
-#line 283 "Gmsh.y"
+#line 284 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       ViewData = new PViewDataList(true); 
@@ -3854,27 +3855,27 @@ yyreduce:
     break;
 
   case 35:
-#line 297 "Gmsh.y"
+#line 298 "Gmsh.y"
     { ViewCoord.push_back((yyvsp[(1) - (1)].d)); ;}
     break;
 
   case 36:
-#line 299 "Gmsh.y"
+#line 300 "Gmsh.y"
     { ViewCoord.push_back((yyvsp[(3) - (3)].d)); ;}
     break;
 
   case 37:
-#line 304 "Gmsh.y"
+#line 305 "Gmsh.y"
     { if(ViewValueList) List_Add(ViewValueList, &(yyvsp[(1) - (1)].d)); ;}
     break;
 
   case 38:
-#line 306 "Gmsh.y"
+#line 307 "Gmsh.y"
     { if(ViewValueList) List_Add(ViewValueList, &(yyvsp[(3) - (3)].d)); ;}
     break;
 
   case 39:
-#line 311 "Gmsh.y"
+#line 312 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(1) - (1)].c), "SP")){
@@ -4023,7 +4024,7 @@ yyreduce:
     break;
 
   case 40:
-#line 457 "Gmsh.y"
+#line 458 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(ViewValueList){
@@ -4036,7 +4037,7 @@ yyreduce:
     break;
 
   case 41:
-#line 467 "Gmsh.y"
+#line 468 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(ViewValueList) (*ViewNumList)++;
@@ -4045,7 +4046,7 @@ yyreduce:
     break;
 
   case 42:
-#line 476 "Gmsh.y"
+#line 477 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(1) - (1)].c)[i]); 
@@ -4055,7 +4056,7 @@ yyreduce:
     break;
 
   case 43:
-#line 483 "Gmsh.y"
+#line 484 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T2C, &(yyvsp[(3) - (3)].c)[i]); 
@@ -4065,7 +4066,7 @@ yyreduce:
     break;
 
   case 44:
-#line 493 "Gmsh.y"
+#line 494 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       List_Add(ViewData->T2D, &(yyvsp[(3) - (8)].d)); 
@@ -4078,7 +4079,7 @@ yyreduce:
     break;
 
   case 45:
-#line 503 "Gmsh.y"
+#line 504 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       ViewData->NbT2++;
@@ -4087,7 +4088,7 @@ yyreduce:
     break;
 
   case 46:
-#line 512 "Gmsh.y"
+#line 513 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(1) - (1)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(1) - (1)].c)[i]); 
@@ -4097,7 +4098,7 @@ yyreduce:
     break;
 
   case 47:
-#line 519 "Gmsh.y"
+#line 520 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       for(int i = 0; i < (int)strlen((yyvsp[(3) - (3)].c))+1; i++) List_Add(ViewData->T3C, &(yyvsp[(3) - (3)].c)[i]); 
@@ -4107,7 +4108,7 @@ yyreduce:
     break;
 
   case 48:
-#line 529 "Gmsh.y"
+#line 530 "Gmsh.y"
     { 
 #if !defined(HAVE_NO_POST)
       List_Add(ViewData->T3D, &(yyvsp[(3) - (10)].d)); List_Add(ViewData->T3D, &(yyvsp[(5) - (10)].d));
@@ -4119,7 +4120,7 @@ yyreduce:
     break;
 
   case 49:
-#line 538 "Gmsh.y"
+#line 539 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       ViewData->NbT3++;
@@ -4128,7 +4129,7 @@ yyreduce:
     break;
 
   case 50:
-#line 548 "Gmsh.y"
+#line 549 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       int type = 
@@ -4146,7 +4147,7 @@ yyreduce:
     break;
 
   case 51:
-#line 566 "Gmsh.y"
+#line 567 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       int type = 
@@ -4165,7 +4166,7 @@ yyreduce:
     break;
 
   case 52:
-#line 585 "Gmsh.y"
+#line 586 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       ViewValueList = ViewData->Time;
@@ -4174,48 +4175,48 @@ yyreduce:
     break;
 
   case 53:
-#line 591 "Gmsh.y"
+#line 592 "Gmsh.y"
     {
     ;}
     break;
 
   case 54:
-#line 598 "Gmsh.y"
+#line 599 "Gmsh.y"
     { (yyval.i) = 0; ;}
     break;
 
   case 55:
-#line 599 "Gmsh.y"
+#line 600 "Gmsh.y"
     { (yyval.i) = 1; ;}
     break;
 
   case 56:
-#line 600 "Gmsh.y"
+#line 601 "Gmsh.y"
     { (yyval.i) = 2; ;}
     break;
 
   case 57:
-#line 601 "Gmsh.y"
+#line 602 "Gmsh.y"
     { (yyval.i) = 3; ;}
     break;
 
   case 58:
-#line 602 "Gmsh.y"
+#line 603 "Gmsh.y"
     { (yyval.i) = 4; ;}
     break;
 
   case 59:
-#line 606 "Gmsh.y"
+#line 607 "Gmsh.y"
     { (yyval.i) = 1; ;}
     break;
 
   case 60:
-#line 607 "Gmsh.y"
+#line 608 "Gmsh.y"
     { (yyval.i) = -1; ;}
     break;
 
   case 61:
-#line 615 "Gmsh.y"
+#line 616 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
 	if(!(yyvsp[(2) - (4)].i))
@@ -4240,7 +4241,7 @@ yyreduce:
     break;
 
   case 62:
-#line 637 "Gmsh.y"
+#line 638 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (7)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (7)].c))){
@@ -4270,7 +4271,7 @@ yyreduce:
     break;
 
   case 63:
-#line 664 "Gmsh.y"
+#line 665 "Gmsh.y"
     {
       if(List_Nbr((yyvsp[(4) - (9)].l)) != List_Nbr((yyvsp[(8) - (9)].l))){
 	yymsg(0, "Incompatible array dimensions in affectation");
@@ -4313,7 +4314,7 @@ yyreduce:
     break;
 
   case 64:
-#line 704 "Gmsh.y"
+#line 705 "Gmsh.y"
     {
       if(gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
 	gmsh_yysymbols[(yyvsp[(1) - (6)].c)].clear();
@@ -4326,7 +4327,7 @@ yyreduce:
     break;
 
   case 65:
-#line 714 "Gmsh.y"
+#line 715 "Gmsh.y"
     {
       // appends to the list
       for(int i = 0; i < List_Nbr((yyvsp[(5) - (6)].l)); i++)
@@ -4337,7 +4338,7 @@ yyreduce:
     break;
 
   case 66:
-#line 722 "Gmsh.y"
+#line 723 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (3)].c)); 
@@ -4348,7 +4349,7 @@ yyreduce:
     break;
 
   case 67:
-#line 730 "Gmsh.y"
+#line 731 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (6)].c)); 
@@ -4363,7 +4364,7 @@ yyreduce:
     break;
 
   case 68:
-#line 742 "Gmsh.y"
+#line 743 "Gmsh.y"
     { 
       gmsh_yystringsymbols[(yyvsp[(1) - (4)].c)] = std::string((yyvsp[(3) - (4)].c));
       Free((yyvsp[(1) - (4)].c));
@@ -4372,7 +4373,7 @@ yyreduce:
     break;
 
   case 69:
-#line 751 "Gmsh.y"
+#line 752 "Gmsh.y"
     { 
       StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].c));
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(3) - (6)].c));
@@ -4380,7 +4381,7 @@ yyreduce:
     break;
 
   case 70:
-#line 756 "Gmsh.y"
+#line 757 "Gmsh.y"
     { 
       StringOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), (yyvsp[(8) - (9)].c));
       Free((yyvsp[(1) - (9)].c)); Free((yyvsp[(6) - (9)].c));
@@ -4388,7 +4389,7 @@ yyreduce:
     break;
 
   case 71:
-#line 764 "Gmsh.y"
+#line 765 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), 0, (yyvsp[(3) - (6)].c), d)){
@@ -4409,7 +4410,7 @@ yyreduce:
     break;
 
   case 72:
-#line 782 "Gmsh.y"
+#line 783 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (9)].c), (int)(yyvsp[(3) - (9)].d), (yyvsp[(6) - (9)].c), d)){
@@ -4430,7 +4431,7 @@ yyreduce:
     break;
 
   case 73:
-#line 800 "Gmsh.y"
+#line 801 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(3) - (5)].c), d)){
@@ -4442,7 +4443,7 @@ yyreduce:
     break;
 
   case 74:
-#line 809 "Gmsh.y"
+#line 810 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (8)].c), (int)(yyvsp[(3) - (8)].d), (yyvsp[(6) - (8)].c), d)){
@@ -4454,7 +4455,7 @@ yyreduce:
     break;
 
   case 75:
-#line 821 "Gmsh.y"
+#line 822 "Gmsh.y"
     {
       ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (8)].c), 0, (yyvsp[(5) - (8)].c), (yyvsp[(7) - (8)].u));
       Free((yyvsp[(1) - (8)].c)); Free((yyvsp[(5) - (8)].c));
@@ -4462,7 +4463,7 @@ yyreduce:
     break;
 
   case 76:
-#line 826 "Gmsh.y"
+#line 827 "Gmsh.y"
     {
       ColorOption(GMSH_SET|GMSH_GUI, (yyvsp[(1) - (11)].c), (int)(yyvsp[(3) - (11)].d), (yyvsp[(8) - (11)].c), (yyvsp[(10) - (11)].u));
       Free((yyvsp[(1) - (11)].c)); Free((yyvsp[(8) - (11)].c));
@@ -4470,7 +4471,7 @@ yyreduce:
     break;
 
   case 77:
-#line 834 "Gmsh.y"
+#line 835 "Gmsh.y"
     {
       GmshColorTable *ct = Get_ColorTable(0);
       if(!ct)
@@ -4493,7 +4494,7 @@ yyreduce:
     break;
 
   case 78:
-#line 854 "Gmsh.y"
+#line 855 "Gmsh.y"
     {
       GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (9)].d));
       if(!ct)
@@ -4516,7 +4517,7 @@ yyreduce:
     break;
 
   case 79:
-#line 877 "Gmsh.y"
+#line 878 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (5)].c),"Background"))
 	GModel::current()->getFields()->background_field = (int)(yyvsp[(4) - (5)].d);
@@ -4526,7 +4527,7 @@ yyreduce:
     break;
 
   case 80:
-#line 884 "Gmsh.y"
+#line 885 "Gmsh.y"
     {
       if(!GModel::current()->getFields()->new_field((int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c)))
 	yymsg(0, "Cannot create field %i of type '%s'", (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c));
@@ -4535,7 +4536,7 @@ yyreduce:
     break;
 
   case 81:
-#line 890 "Gmsh.y"
+#line 891 "Gmsh.y"
     {
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d));
       if(field){
@@ -4558,7 +4559,7 @@ yyreduce:
     break;
 
   case 82:
-#line 910 "Gmsh.y"
+#line 911 "Gmsh.y"
     {
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (9)].d));
       if(field){
@@ -4582,7 +4583,7 @@ yyreduce:
     break;
 
   case 83:
-#line 931 "Gmsh.y"
+#line 932 "Gmsh.y"
     {
       Field *field = GModel::current()->getFields()->get((int)(yyvsp[(3) - (11)].d));
       if(field){
@@ -4608,7 +4609,7 @@ yyreduce:
     break;
 
   case 84:
-#line 957 "Gmsh.y"
+#line 958 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       try {
@@ -4623,7 +4624,7 @@ yyreduce:
     break;
 
   case 85:
-#line 969 "Gmsh.y"
+#line 970 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       try {
@@ -4638,14 +4639,14 @@ yyreduce:
     break;
 
   case 86:
-#line 986 "Gmsh.y"
+#line 987 "Gmsh.y"
     { 
       (yyval.i) = (int)(yyvsp[(1) - (1)].d); 
     ;}
     break;
 
   case 87:
-#line 990 "Gmsh.y"
+#line 991 "Gmsh.y"
     { 
       (yyval.i) = GModel::current()->setPhysicalName
 	(std::string((yyvsp[(1) - (1)].c)), ++GModel::current()->getGEOInternals()->MaxPhysicalNum);
@@ -4654,14 +4655,14 @@ yyreduce:
     break;
 
   case 88:
-#line 999 "Gmsh.y"
+#line 1000 "Gmsh.y"
     {
       (yyval.l) = 0;
     ;}
     break;
 
   case 89:
-#line 1003 "Gmsh.y"
+#line 1004 "Gmsh.y"
     {
       (yyval.l) = List_Create(1, 1, sizeof(Vertex*));
       Vertex *v = FindPoint((int)(yyvsp[(4) - (5)].d));
@@ -4674,21 +4675,21 @@ yyreduce:
     break;
 
   case 90:
-#line 1015 "Gmsh.y"
+#line 1016 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++) (yyval.v)[i] = 0.;
     ;}
     break;
 
   case 91:
-#line 1019 "Gmsh.y"
+#line 1020 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 92:
-#line 1029 "Gmsh.y"
+#line 1030 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindPoint(num)){
@@ -4714,7 +4715,7 @@ yyreduce:
     break;
 
   case 93:
-#line 1052 "Gmsh.y"
+#line 1053 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_POINT)){
@@ -4733,7 +4734,7 @@ yyreduce:
     break;
 
   case 94:
-#line 1068 "Gmsh.y"
+#line 1069 "Gmsh.y"
     {      
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -4755,7 +4756,7 @@ yyreduce:
     break;
 
   case 95:
-#line 1090 "Gmsh.y"
+#line 1091 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -4776,7 +4777,7 @@ yyreduce:
     break;
 
   case 96:
-#line 1108 "Gmsh.y"
+#line 1109 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -4797,7 +4798,7 @@ yyreduce:
     break;
 
   case 97:
-#line 1126 "Gmsh.y"
+#line 1127 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (8)].d);
       if(FindCurve(num)){
@@ -4830,7 +4831,7 @@ yyreduce:
     break;
 
   case 98:
-#line 1156 "Gmsh.y"
+#line 1157 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (8)].d);
       if(FindCurve(num)){
@@ -4863,7 +4864,7 @@ yyreduce:
     break;
 
   case 99:
-#line 1187 "Gmsh.y"
+#line 1188 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (17)].d);
       if(FindCurve(num)){
@@ -4885,7 +4886,7 @@ yyreduce:
     break;
 
   case 100:
-#line 1206 "Gmsh.y"
+#line 1207 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -4906,7 +4907,7 @@ yyreduce:
     break;
 
   case 101:
-#line 1224 "Gmsh.y"
+#line 1225 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindCurve(num)){
@@ -4927,7 +4928,7 @@ yyreduce:
     break;
 
   case 102:
-#line 1242 "Gmsh.y"
+#line 1243 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (11)].d);
       if(List_Nbr((yyvsp[(6) - (11)].l)) + (int)(yyvsp[(10) - (11)].d) + 1 != List_Nbr((yyvsp[(8) - (11)].l))){
@@ -4956,7 +4957,7 @@ yyreduce:
     break;
 
   case 103:
-#line 1268 "Gmsh.y"
+#line 1269 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindEdgeLoop(num)){
@@ -4976,7 +4977,7 @@ yyreduce:
     break;
 
   case 104:
-#line 1285 "Gmsh.y"
+#line 1286 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_LINE)){
@@ -4995,7 +4996,7 @@ yyreduce:
     break;
 
   case 105:
-#line 1304 "Gmsh.y"
+#line 1305 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindSurface(num)){
@@ -5016,7 +5017,7 @@ yyreduce:
     break;
 
   case 106:
-#line 1322 "Gmsh.y"
+#line 1323 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (9)].d), type = 0;
       if(FindSurface(num)){
@@ -5058,7 +5059,7 @@ yyreduce:
     break;
 
   case 107:
-#line 1361 "Gmsh.y"
+#line 1362 "Gmsh.y"
     {
       myGmshSurface = 0;
       (yyval.s).Type = 0;
@@ -5067,7 +5068,7 @@ yyreduce:
     break;
 
   case 108:
-#line 1367 "Gmsh.y"
+#line 1368 "Gmsh.y"
     {
       myGmshSurface = gmshSurface::getSurface((int)(yyvsp[(3) - (4)].d));
       (yyval.s).Type = 0;
@@ -5076,7 +5077,7 @@ yyreduce:
     break;
 
   case 109:
-#line 1373 "Gmsh.y"
+#line 1374 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (10)].d);
       myGmshSurface = gmshParametricSurface::NewParametricSurface(num, (yyvsp[(7) - (10)].c), (yyvsp[(8) - (10)].c), (yyvsp[(9) - (10)].c));
@@ -5086,7 +5087,7 @@ yyreduce:
     break;
 
   case 110:
-#line 1380 "Gmsh.y"
+#line 1381 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){
@@ -5114,7 +5115,7 @@ yyreduce:
     break;
 
   case 111:
-#line 1405 "Gmsh.y"
+#line 1406 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if (List_Nbr((yyvsp[(6) - (7)].l)) != 2){
@@ -5142,7 +5143,7 @@ yyreduce:
     break;
 
   case 112:
-#line 1430 "Gmsh.y"
+#line 1431 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].d);
       if(FindSurfaceLoop(num)){
@@ -5161,7 +5162,7 @@ yyreduce:
     break;
 
   case 113:
-#line 1446 "Gmsh.y"
+#line 1447 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
@@ -5180,7 +5181,7 @@ yyreduce:
     break;
 
   case 114:
-#line 1462 "Gmsh.y"
+#line 1463 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (12)].d);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
@@ -5210,7 +5211,7 @@ yyreduce:
     break;
 
   case 115:
-#line 1493 "Gmsh.y"
+#line 1494 "Gmsh.y"
     {
       yymsg(0, "'Complex Volume' command is deprecated: use 'Volume' instead");
       int num = (int)(yyvsp[(4) - (8)].d);
@@ -5231,7 +5232,7 @@ yyreduce:
     break;
 
   case 116:
-#line 1511 "Gmsh.y"
+#line 1512 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (7)].d);
       if(FindVolume(num)){
@@ -5251,7 +5252,7 @@ yyreduce:
     break;
 
   case 117:
-#line 1528 "Gmsh.y"
+#line 1529 "Gmsh.y"
     {
       int num = (int)(yyvsp[(4) - (8)].i);
       if(FindPhysicalGroup(num, MSH_PHYSICAL_VOLUME)){
@@ -5270,7 +5271,7 @@ yyreduce:
     break;
 
   case 118:
-#line 1549 "Gmsh.y"
+#line 1550 "Gmsh.y"
     {
       TranslateShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
@@ -5278,7 +5279,7 @@ yyreduce:
     break;
 
   case 119:
-#line 1554 "Gmsh.y"
+#line 1555 "Gmsh.y"
     {
       RotateShapes((yyvsp[(3) - (11)].v)[0], (yyvsp[(3) - (11)].v)[1], (yyvsp[(3) - (11)].v)[2], (yyvsp[(5) - (11)].v)[0], (yyvsp[(5) - (11)].v)[1], (yyvsp[(5) - (11)].v)[2], (yyvsp[(7) - (11)].d), (yyvsp[(10) - (11)].l));
       (yyval.l) = (yyvsp[(10) - (11)].l);
@@ -5286,7 +5287,7 @@ yyreduce:
     break;
 
   case 120:
-#line 1559 "Gmsh.y"
+#line 1560 "Gmsh.y"
     {
       SymmetryShapes((yyvsp[(2) - (5)].v)[0], (yyvsp[(2) - (5)].v)[1], (yyvsp[(2) - (5)].v)[2], (yyvsp[(2) - (5)].v)[3], (yyvsp[(4) - (5)].l));
       (yyval.l) = (yyvsp[(4) - (5)].l);
@@ -5294,7 +5295,7 @@ yyreduce:
     break;
 
   case 121:
-#line 1564 "Gmsh.y"
+#line 1565 "Gmsh.y"
     {
       DilatShapes((yyvsp[(3) - (9)].v)[0], (yyvsp[(3) - (9)].v)[1], (yyvsp[(3) - (9)].v)[2], (yyvsp[(5) - (9)].d), (yyvsp[(8) - (9)].l));
       (yyval.l) = (yyvsp[(8) - (9)].l);
@@ -5302,7 +5303,7 @@ yyreduce:
     break;
 
   case 122:
-#line 1569 "Gmsh.y"
+#line 1570 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
       if(!strcmp((yyvsp[(1) - (4)].c), "Duplicata")){
@@ -5325,7 +5326,7 @@ yyreduce:
     break;
 
   case 123:
-#line 1589 "Gmsh.y"
+#line 1590 "Gmsh.y"
     { 
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       IntersectCurvesWithSurface((yyvsp[(4) - (9)].l), (int)(yyvsp[(8) - (9)].d), (yyval.l));
@@ -5334,7 +5335,7 @@ yyreduce:
     break;
 
   case 124:
-#line 1595 "Gmsh.y"
+#line 1596 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape*));
       List_T *tmp = ListOfDouble2ListOfInt((yyvsp[(7) - (9)].l));
@@ -5345,31 +5346,31 @@ yyreduce:
     break;
 
   case 125:
-#line 1605 "Gmsh.y"
+#line 1606 "Gmsh.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 126:
-#line 1606 "Gmsh.y"
+#line 1607 "Gmsh.y"
     { (yyval.l) = (yyvsp[(1) - (1)].l); ;}
     break;
 
   case 127:
-#line 1611 "Gmsh.y"
+#line 1612 "Gmsh.y"
     {
       (yyval.l) = List_Create(3, 3, sizeof(Shape));
     ;}
     break;
 
   case 128:
-#line 1615 "Gmsh.y"
+#line 1616 "Gmsh.y"
     {
       List_Add((yyval.l), &(yyvsp[(2) - (2)].s));
     ;}
     break;
 
   case 129:
-#line 1619 "Gmsh.y"
+#line 1620 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5395,7 +5396,7 @@ yyreduce:
     break;
 
   case 130:
-#line 1642 "Gmsh.y"
+#line 1643 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5421,7 +5422,7 @@ yyreduce:
     break;
 
   case 131:
-#line 1665 "Gmsh.y"
+#line 1666 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5447,7 +5448,7 @@ yyreduce:
     break;
 
   case 132:
-#line 1688 "Gmsh.y"
+#line 1689 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (6)].l)); i++){
 	double d;
@@ -5473,7 +5474,7 @@ yyreduce:
     break;
 
   case 133:
-#line 1716 "Gmsh.y"
+#line 1717 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -5485,14 +5486,14 @@ yyreduce:
     break;
 
   case 134:
-#line 1725 "Gmsh.y"
+#line 1726 "Gmsh.y"
     {
       GModel::current()->getFields()->delete_field((int)(yyvsp[(4) - (6)].d));
     ;}
     break;
 
   case 135:
-#line 1729 "Gmsh.y"
+#line 1730 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(2) - (6)].c), "View")){
@@ -5510,7 +5511,7 @@ yyreduce:
     break;
 
   case 136:
-#line 1744 "Gmsh.y"
+#line 1745 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Meshes") || !strcmp((yyvsp[(2) - (3)].c), "All")){
         for(unsigned int i = 0; i < GModel::list.size(); i++){
@@ -5540,7 +5541,7 @@ yyreduce:
     break;
 
   case 137:
-#line 1771 "Gmsh.y"
+#line 1772 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(2) - (4)].c), "Empty") && !strcmp((yyvsp[(3) - (4)].c), "Views")){
@@ -5555,7 +5556,7 @@ yyreduce:
     break;
 
   case 138:
-#line 1788 "Gmsh.y"
+#line 1789 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(4) - (5)].l)); i++){
 	Shape TheShape;
@@ -5567,7 +5568,7 @@ yyreduce:
     break;
 
   case 139:
-#line 1802 "Gmsh.y"
+#line 1803 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 1);
@@ -5576,7 +5577,7 @@ yyreduce:
     break;
 
   case 140:
-#line 1808 "Gmsh.y"
+#line 1809 "Gmsh.y"
     {
       for(int i = 0; i < 4; i++)
 	VisibilityShape((yyvsp[(2) - (3)].c), i, 0);
@@ -5585,7 +5586,7 @@ yyreduce:
     break;
 
   case 141:
-#line 1814 "Gmsh.y"
+#line 1815 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -5597,7 +5598,7 @@ yyreduce:
     break;
 
   case 142:
-#line 1823 "Gmsh.y"
+#line 1824 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (4)].l)); i++){
 	Shape TheShape;
@@ -5609,7 +5610,7 @@ yyreduce:
     break;
 
   case 143:
-#line 1837 "Gmsh.y"
+#line 1838 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Include")){
 	char tmpstring[1024];
@@ -5660,7 +5661,7 @@ yyreduce:
     break;
 
   case 144:
-#line 1885 "Gmsh.y"
+#line 1886 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(1) - (7)].c), "Save") && !strcmp((yyvsp[(2) - (7)].c), "View")){
@@ -5681,7 +5682,7 @@ yyreduce:
     break;
 
   case 145:
-#line 1903 "Gmsh.y"
+#line 1904 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(1) - (7)].c), "Background") && !strcmp((yyvsp[(2) - (7)].c), "Mesh")  && !strcmp((yyvsp[(3) - (7)].c), "View")){
@@ -5699,7 +5700,7 @@ yyreduce:
     break;
 
   case 146:
-#line 1918 "Gmsh.y"
+#line 1919 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (3)].c), "Sleep")){
 	SleepInSeconds((yyvsp[(2) - (3)].d));
@@ -5721,7 +5722,7 @@ yyreduce:
     break;
 
   case 147:
-#line 1937 "Gmsh.y"
+#line 1938 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
        try {
@@ -5736,7 +5737,7 @@ yyreduce:
     break;
 
   case 148:
-#line 1949 "Gmsh.y"
+#line 1950 "Gmsh.y"
     {
 #if !defined(HAVE_NO_POST)
       if(!strcmp((yyvsp[(2) - (3)].c), "ElementsFromAllViews"))
@@ -5763,14 +5764,14 @@ yyreduce:
     break;
 
   case 149:
-#line 1973 "Gmsh.y"
+#line 1974 "Gmsh.y"
     {
       exit(0);
     ;}
     break;
 
   case 150:
-#line 1977 "Gmsh.y"
+#line 1978 "Gmsh.y"
     {
       CTX.forced_bbox = 0;
       SetBoundingBox();
@@ -5778,7 +5779,7 @@ yyreduce:
     break;
 
   case 151:
-#line 1982 "Gmsh.y"
+#line 1983 "Gmsh.y"
     {
       CTX.forced_bbox = 1;
       SetBoundingBox((yyvsp[(3) - (15)].d), (yyvsp[(5) - (15)].d), (yyvsp[(7) - (15)].d), (yyvsp[(9) - (15)].d), (yyvsp[(11) - (15)].d), (yyvsp[(13) - (15)].d));
@@ -5786,7 +5787,7 @@ yyreduce:
     break;
 
   case 152:
-#line 1987 "Gmsh.y"
+#line 1988 "Gmsh.y"
     {
 #if defined(HAVE_FLTK)
       Draw();
@@ -5795,7 +5796,7 @@ yyreduce:
     break;
 
   case 153:
-#line 1999 "Gmsh.y"
+#line 2000 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (6)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (6)].d);
@@ -5815,7 +5816,7 @@ yyreduce:
     break;
 
   case 154:
-#line 2016 "Gmsh.y"
+#line 2017 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(3) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(5) - (8)].d);
@@ -5835,7 +5836,7 @@ yyreduce:
     break;
 
   case 155:
-#line 2033 "Gmsh.y"
+#line 2034 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (8)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (8)].d);
@@ -5857,7 +5858,7 @@ yyreduce:
     break;
 
   case 156:
-#line 2052 "Gmsh.y"
+#line 2053 "Gmsh.y"
     {
       LoopControlVariablesTab[ImbricatedLoop][0] = (yyvsp[(5) - (10)].d);
       LoopControlVariablesTab[ImbricatedLoop][1] = (yyvsp[(7) - (10)].d);
@@ -5879,7 +5880,7 @@ yyreduce:
     break;
 
   case 157:
-#line 2071 "Gmsh.y"
+#line 2072 "Gmsh.y"
     {
       if(ImbricatedLoop <= 0){
 	yymsg(0, "Invalid For/EndFor loop");
@@ -5910,7 +5911,7 @@ yyreduce:
     break;
 
   case 158:
-#line 2099 "Gmsh.y"
+#line 2100 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->createFunction
          ((yyvsp[(2) - (2)].c), gmsh_yyin, gmsh_yyname, gmsh_yylineno))
@@ -5921,7 +5922,7 @@ yyreduce:
     break;
 
   case 159:
-#line 2107 "Gmsh.y"
+#line 2108 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->leaveFunction
          (&gmsh_yyin, gmsh_yyname, gmsh_yylineno))
@@ -5930,7 +5931,7 @@ yyreduce:
     break;
 
   case 160:
-#line 2113 "Gmsh.y"
+#line 2114 "Gmsh.y"
     {
       if(!FunctionManager::Instance()->enterFunction
          ((yyvsp[(2) - (3)].c), &gmsh_yyin, gmsh_yyname, gmsh_yylineno))
@@ -5940,20 +5941,20 @@ yyreduce:
     break;
 
   case 161:
-#line 2120 "Gmsh.y"
+#line 2121 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (4)].d)) skip_until("If", "EndIf");
     ;}
     break;
 
   case 162:
-#line 2124 "Gmsh.y"
+#line 2125 "Gmsh.y"
     {
     ;}
     break;
 
   case 163:
-#line 2133 "Gmsh.y"
+#line 2134 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (5)].l), 
@@ -5964,7 +5965,7 @@ yyreduce:
     break;
 
   case 164:
-#line 2141 "Gmsh.y"
+#line 2142 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (11)].l), 
@@ -5975,7 +5976,7 @@ yyreduce:
     break;
 
   case 165:
-#line 2149 "Gmsh.y"
+#line 2150 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (13)].l), 
@@ -5986,14 +5987,14 @@ yyreduce:
     break;
 
   case 166:
-#line 2157 "Gmsh.y"
+#line 2158 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 167:
-#line 2161 "Gmsh.y"
+#line 2162 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE, (yyvsp[(4) - (7)].l), 
@@ -6004,14 +6005,14 @@ yyreduce:
     break;
 
   case 168:
-#line 2169 "Gmsh.y"
+#line 2170 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 169:
-#line 2173 "Gmsh.y"
+#line 2174 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(ROTATE, (yyvsp[(10) - (13)].l), 
@@ -6022,14 +6023,14 @@ yyreduce:
     break;
 
   case 170:
-#line 2181 "Gmsh.y"
+#line 2182 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 171:
-#line 2185 "Gmsh.y"
+#line 2186 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(TRANSLATE_ROTATE, (yyvsp[(12) - (15)].l), 
@@ -6040,14 +6041,14 @@ yyreduce:
     break;
 
   case 172:
-#line 2193 "Gmsh.y"
+#line 2194 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 173:
-#line 2197 "Gmsh.y"
+#line 2198 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShapes(BOUNDARY_LAYER, (yyvsp[(3) - (6)].l), 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
@@ -6057,7 +6058,7 @@ yyreduce:
     break;
 
   case 174:
-#line 2206 "Gmsh.y"
+#line 2207 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (8)].d), 
@@ -6067,7 +6068,7 @@ yyreduce:
     break;
 
   case 175:
-#line 2213 "Gmsh.y"
+#line 2214 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (8)].d), 
@@ -6077,7 +6078,7 @@ yyreduce:
     break;
 
   case 176:
-#line 2220 "Gmsh.y"
+#line 2221 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (8)].d), 
@@ -6087,7 +6088,7 @@ yyreduce:
     break;
 
   case 177:
-#line 2227 "Gmsh.y"
+#line 2228 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 
@@ -6097,7 +6098,7 @@ yyreduce:
     break;
 
   case 178:
-#line 2234 "Gmsh.y"
+#line 2235 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 
@@ -6107,7 +6108,7 @@ yyreduce:
     break;
 
   case 179:
-#line 2241 "Gmsh.y"
+#line 2242 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 
@@ -6117,7 +6118,7 @@ yyreduce:
     break;
 
   case 180:
-#line 2248 "Gmsh.y"
+#line 2249 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (14)].d), 
@@ -6127,7 +6128,7 @@ yyreduce:
     break;
 
   case 181:
-#line 2255 "Gmsh.y"
+#line 2256 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (14)].d), 
@@ -6137,7 +6138,7 @@ yyreduce:
     break;
 
   case 182:
-#line 2262 "Gmsh.y"
+#line 2263 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (14)].d), 
@@ -6147,14 +6148,14 @@ yyreduce:
     break;
 
   case 183:
-#line 2269 "Gmsh.y"
+#line 2270 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 184:
-#line 2273 "Gmsh.y"
+#line 2274 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_POINT, (int)(yyvsp[(4) - (12)].d), 
@@ -6164,14 +6165,14 @@ yyreduce:
     break;
 
   case 185:
-#line 2280 "Gmsh.y"
+#line 2281 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 186:
-#line 2284 "Gmsh.y"
+#line 2285 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (12)].d), 
@@ -6181,14 +6182,14 @@ yyreduce:
     break;
 
   case 187:
-#line 2291 "Gmsh.y"
+#line 2292 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 188:
-#line 2295 "Gmsh.y"
+#line 2296 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (12)].d), 
@@ -6198,14 +6199,14 @@ yyreduce:
     break;
 
   case 189:
-#line 2302 "Gmsh.y"
+#line 2303 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 190:
-#line 2306 "Gmsh.y"
+#line 2307 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_POINT, (int)(yyvsp[(4) - (16)].d), 
@@ -6215,14 +6216,14 @@ yyreduce:
     break;
 
   case 191:
-#line 2313 "Gmsh.y"
+#line 2314 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 192:
-#line 2317 "Gmsh.y"
+#line 2318 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (16)].d), 
@@ -6232,14 +6233,14 @@ yyreduce:
     break;
 
   case 193:
-#line 2324 "Gmsh.y"
+#line 2325 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 194:
-#line 2328 "Gmsh.y"
+#line 2329 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (16)].d), 
@@ -6249,14 +6250,14 @@ yyreduce:
     break;
 
   case 195:
-#line 2335 "Gmsh.y"
+#line 2336 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 196:
-#line 2339 "Gmsh.y"
+#line 2340 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_POINT, (int)(yyvsp[(4) - (18)].d), 
@@ -6266,14 +6267,14 @@ yyreduce:
     break;
 
   case 197:
-#line 2346 "Gmsh.y"
+#line 2347 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 198:
-#line 2350 "Gmsh.y"
+#line 2351 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SEGM_LINE, (int)(yyvsp[(4) - (18)].d), 
@@ -6283,14 +6284,14 @@ yyreduce:
     break;
 
   case 199:
-#line 2357 "Gmsh.y"
+#line 2358 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = extr.mesh.Recombine = false;
     ;}
     break;
 
   case 200:
-#line 2361 "Gmsh.y"
+#line 2362 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(Shape));
       ExtrudeShape(TRANSLATE_ROTATE, MSH_SURF_PLAN, (int)(yyvsp[(4) - (18)].d), 
@@ -6300,19 +6301,19 @@ yyreduce:
     break;
 
   case 201:
-#line 2372 "Gmsh.y"
+#line 2373 "Gmsh.y"
     {
     ;}
     break;
 
   case 202:
-#line 2375 "Gmsh.y"
+#line 2376 "Gmsh.y"
     {
     ;}
     break;
 
   case 203:
-#line 2381 "Gmsh.y"
+#line 2382 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
       extr.mesh.NbLayer = 1;
@@ -6324,7 +6325,7 @@ yyreduce:
     break;
 
   case 204:
-#line 2390 "Gmsh.y"
+#line 2391 "Gmsh.y"
     {
       extr.mesh.ExtrudeMesh = true;
       extr.mesh.NbLayer = List_Nbr((yyvsp[(3) - (7)].l));
@@ -6347,7 +6348,7 @@ yyreduce:
     break;
 
   case 205:
-#line 2410 "Gmsh.y"
+#line 2411 "Gmsh.y"
     {
       yymsg(0, "Explicit region numbers in layers are deprecated");
       extr.mesh.ExtrudeMesh = true;
@@ -6373,14 +6374,14 @@ yyreduce:
     break;
 
   case 206:
-#line 2433 "Gmsh.y"
+#line 2434 "Gmsh.y"
     {
       extr.mesh.Recombine = true;
     ;}
     break;
 
   case 207:
-#line 2437 "Gmsh.y"
+#line 2438 "Gmsh.y"
     {
       int num = (int)(yyvsp[(3) - (9)].d);
       if(FindSurface(num)){
@@ -6402,14 +6403,14 @@ yyreduce:
     break;
 
   case 208:
-#line 2460 "Gmsh.y"
+#line 2461 "Gmsh.y"
     {
       (yyval.v)[0] = (yyval.v)[1] = 1.;
     ;}
     break;
 
   case 209:
-#line 2464 "Gmsh.y"
+#line 2465 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(2) - (3)].c), "Progression") || !strcmp((yyvsp[(2) - (3)].c), "Power"))
         (yyval.v)[0] = 1.;
@@ -6425,14 +6426,14 @@ yyreduce:
     break;
 
   case 210:
-#line 2479 "Gmsh.y"
+#line 2480 "Gmsh.y"
     {
       (yyval.i) = -1; // left
     ;}
     break;
 
   case 211:
-#line 2483 "Gmsh.y"
+#line 2484 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "Right"))
         (yyval.i) = 1;
@@ -6445,35 +6446,35 @@ yyreduce:
     break;
 
   case 212:
-#line 2495 "Gmsh.y"
+#line 2496 "Gmsh.y"
     {
      (yyval.l) = List_Create(1, 1, sizeof(double));
    ;}
     break;
 
   case 213:
-#line 2499 "Gmsh.y"
+#line 2500 "Gmsh.y"
     {
      (yyval.l) = (yyvsp[(2) - (2)].l);
    ;}
     break;
 
   case 214:
-#line 2504 "Gmsh.y"
+#line 2505 "Gmsh.y"
     {
       (yyval.i) = 45;
     ;}
     break;
 
   case 215:
-#line 2508 "Gmsh.y"
+#line 2509 "Gmsh.y"
     {
       (yyval.i) = (int)(yyvsp[(2) - (2)].d);
     ;}
     break;
 
   case 216:
-#line 2515 "Gmsh.y"
+#line 2516 "Gmsh.y"
     {
       int type = (int)(yyvsp[(6) - (7)].v)[0];
       double coef = fabs((yyvsp[(6) - (7)].v)[1]);
@@ -6530,7 +6531,7 @@ yyreduce:
     break;
 
   case 217:
-#line 2569 "Gmsh.y"
+#line 2570 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (6)].l));
       if(k != 0 && k != 3 && k != 4){
@@ -6603,7 +6604,7 @@ yyreduce:
     break;
 
   case 218:
-#line 2639 "Gmsh.y"
+#line 2640 "Gmsh.y"
     {
       yymsg(1, "Elliptic Surface is deprecated: use Transfinite instead (with smoothing)");
       List_Delete((yyvsp[(7) - (8)].l));
@@ -6611,7 +6612,7 @@ yyreduce:
     break;
 
   case 219:
-#line 2644 "Gmsh.y"
+#line 2645 "Gmsh.y"
     {
       int k = List_Nbr((yyvsp[(4) - (5)].l));
       if(k != 0 && k != 6 && k != 8){
@@ -6681,7 +6682,7 @@ yyreduce:
     break;
 
   case 220:
-#line 2711 "Gmsh.y"
+#line 2712 "Gmsh.y"
     {
       if(!(yyvsp[(3) - (5)].l)){
 	List_T *tmp = Tree2List(GModel::current()->getGEOInternals()->Surfaces);
@@ -6727,7 +6728,7 @@ yyreduce:
     break;
 
   case 221:
-#line 2754 "Gmsh.y"
+#line 2755 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (6)].l)); i++){
 	double d;
@@ -6750,7 +6751,7 @@ yyreduce:
     break;
 
   case 222:
-#line 2780 "Gmsh.y"
+#line 2781 "Gmsh.y"
     { 
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -6776,7 +6777,7 @@ yyreduce:
     break;
 
   case 223:
-#line 2803 "Gmsh.y"
+#line 2804 "Gmsh.y"
     {
       Surface *s = FindSurface((int)(yyvsp[(8) - (10)].d));
       if(s){
@@ -6802,26 +6803,26 @@ yyreduce:
     break;
 
   case 224:
-#line 2826 "Gmsh.y"
+#line 2827 "Gmsh.y"
     {
     ;}
     break;
 
   case 225:
-#line 2829 "Gmsh.y"
+#line 2830 "Gmsh.y"
     {
     ;}
     break;
 
   case 226:
-#line 2838 "Gmsh.y"
+#line 2839 "Gmsh.y"
     { 
       ReplaceAllDuplicates();
     ;}
     break;
 
   case 227:
-#line 2842 "Gmsh.y"
+#line 2843 "Gmsh.y"
     { 
       if(!strcmp((yyvsp[(2) - (3)].c), "Geometry"))
         ReplaceAllDuplicates();
@@ -6834,47 +6835,47 @@ yyreduce:
     break;
 
   case 228:
-#line 2857 "Gmsh.y"
+#line 2858 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d);           ;}
     break;
 
   case 229:
-#line 2858 "Gmsh.y"
+#line 2859 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (3)].d);           ;}
     break;
 
   case 230:
-#line 2859 "Gmsh.y"
+#line 2860 "Gmsh.y"
     { (yyval.d) = -(yyvsp[(2) - (2)].d);          ;}
     break;
 
   case 231:
-#line 2860 "Gmsh.y"
+#line 2861 "Gmsh.y"
     { (yyval.d) = (yyvsp[(2) - (2)].d);           ;}
     break;
 
   case 232:
-#line 2861 "Gmsh.y"
+#line 2862 "Gmsh.y"
     { (yyval.d) = !(yyvsp[(2) - (2)].d);          ;}
     break;
 
   case 233:
-#line 2862 "Gmsh.y"
+#line 2863 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) - (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 234:
-#line 2863 "Gmsh.y"
+#line 2864 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) + (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 235:
-#line 2864 "Gmsh.y"
+#line 2865 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) * (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 236:
-#line 2866 "Gmsh.y"
+#line 2867 "Gmsh.y"
     { 
       if(!(yyvsp[(3) - (3)].d))
 	yymsg(0, "Division by zero in '%g / %g'", (yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));
@@ -6884,307 +6885,307 @@ yyreduce:
     break;
 
   case 237:
-#line 2872 "Gmsh.y"
+#line 2873 "Gmsh.y"
     { (yyval.d) = (int)(yyvsp[(1) - (3)].d) % (int)(yyvsp[(3) - (3)].d);  ;}
     break;
 
   case 238:
-#line 2873 "Gmsh.y"
+#line 2874 "Gmsh.y"
     { (yyval.d) = pow((yyvsp[(1) - (3)].d), (yyvsp[(3) - (3)].d));  ;}
     break;
 
   case 239:
-#line 2874 "Gmsh.y"
+#line 2875 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 240:
-#line 2875 "Gmsh.y"
+#line 2876 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) > (yyvsp[(3) - (3)].d);      ;}
     break;
 
   case 241:
-#line 2876 "Gmsh.y"
+#line 2877 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) <= (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 242:
-#line 2877 "Gmsh.y"
+#line 2878 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) >= (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 243:
-#line 2878 "Gmsh.y"
+#line 2879 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) == (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 244:
-#line 2879 "Gmsh.y"
+#line 2880 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) != (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 245:
-#line 2880 "Gmsh.y"
+#line 2881 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) && (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 246:
-#line 2881 "Gmsh.y"
+#line 2882 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (3)].d) || (yyvsp[(3) - (3)].d);     ;}
     break;
 
   case 247:
-#line 2882 "Gmsh.y"
+#line 2883 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (5)].d) ? (yyvsp[(3) - (5)].d) : (yyvsp[(5) - (5)].d); ;}
     break;
 
   case 248:
-#line 2883 "Gmsh.y"
+#line 2884 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 249:
-#line 2884 "Gmsh.y"
+#line 2885 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 250:
-#line 2885 "Gmsh.y"
+#line 2886 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 251:
-#line 2886 "Gmsh.y"
+#line 2887 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 252:
-#line 2887 "Gmsh.y"
+#line 2888 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 253:
-#line 2888 "Gmsh.y"
+#line 2889 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 254:
-#line 2889 "Gmsh.y"
+#line 2890 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 255:
-#line 2890 "Gmsh.y"
+#line 2891 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 256:
-#line 2891 "Gmsh.y"
+#line 2892 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 257:
-#line 2892 "Gmsh.y"
+#line 2893 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 258:
-#line 2893 "Gmsh.y"
+#line 2894 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
   case 259:
-#line 2894 "Gmsh.y"
+#line 2895 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 260:
-#line 2895 "Gmsh.y"
+#line 2896 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 261:
-#line 2896 "Gmsh.y"
+#line 2897 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 262:
-#line 2897 "Gmsh.y"
+#line 2898 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 263:
-#line 2898 "Gmsh.y"
+#line 2899 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 264:
-#line 2899 "Gmsh.y"
+#line 2900 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 265:
-#line 2900 "Gmsh.y"
+#line 2901 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 266:
-#line 2901 "Gmsh.y"
+#line 2902 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 267:
-#line 2902 "Gmsh.y"
+#line 2903 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 268:
-#line 2903 "Gmsh.y"
+#line 2904 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
     break;
 
   case 269:
-#line 2905 "Gmsh.y"
+#line 2906 "Gmsh.y"
     { (yyval.d) = exp((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 270:
-#line 2906 "Gmsh.y"
+#line 2907 "Gmsh.y"
     { (yyval.d) = log((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 271:
-#line 2907 "Gmsh.y"
+#line 2908 "Gmsh.y"
     { (yyval.d) = log10((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 272:
-#line 2908 "Gmsh.y"
+#line 2909 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 273:
-#line 2909 "Gmsh.y"
+#line 2910 "Gmsh.y"
     { (yyval.d) = sin((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 274:
-#line 2910 "Gmsh.y"
+#line 2911 "Gmsh.y"
     { (yyval.d) = asin((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 275:
-#line 2911 "Gmsh.y"
+#line 2912 "Gmsh.y"
     { (yyval.d) = cos((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 276:
-#line 2912 "Gmsh.y"
+#line 2913 "Gmsh.y"
     { (yyval.d) = acos((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 277:
-#line 2913 "Gmsh.y"
+#line 2914 "Gmsh.y"
     { (yyval.d) = tan((yyvsp[(3) - (4)].d));      ;}
     break;
 
   case 278:
-#line 2914 "Gmsh.y"
+#line 2915 "Gmsh.y"
     { (yyval.d) = atan((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 279:
-#line 2915 "Gmsh.y"
+#line 2916 "Gmsh.y"
     { (yyval.d) = atan2((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d));;}
     break;
 
   case 280:
-#line 2916 "Gmsh.y"
+#line 2917 "Gmsh.y"
     { (yyval.d) = sinh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 281:
-#line 2917 "Gmsh.y"
+#line 2918 "Gmsh.y"
     { (yyval.d) = cosh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 282:
-#line 2918 "Gmsh.y"
+#line 2919 "Gmsh.y"
     { (yyval.d) = tanh((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 283:
-#line 2919 "Gmsh.y"
+#line 2920 "Gmsh.y"
     { (yyval.d) = fabs((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 284:
-#line 2920 "Gmsh.y"
+#line 2921 "Gmsh.y"
     { (yyval.d) = floor((yyvsp[(3) - (4)].d));    ;}
     break;
 
   case 285:
-#line 2921 "Gmsh.y"
+#line 2922 "Gmsh.y"
     { (yyval.d) = ceil((yyvsp[(3) - (4)].d));     ;}
     break;
 
   case 286:
-#line 2922 "Gmsh.y"
+#line 2923 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 287:
-#line 2923 "Gmsh.y"
+#line 2924 "Gmsh.y"
     { (yyval.d) = fmod((yyvsp[(3) - (6)].d), (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 288:
-#line 2924 "Gmsh.y"
+#line 2925 "Gmsh.y"
     { (yyval.d) = sqrt((yyvsp[(3) - (6)].d) * (yyvsp[(3) - (6)].d) + (yyvsp[(5) - (6)].d) * (yyvsp[(5) - (6)].d)); ;}
     break;
 
   case 289:
-#line 2925 "Gmsh.y"
+#line 2926 "Gmsh.y"
     { (yyval.d) = (yyvsp[(3) - (4)].d) * (double)rand() / (double)RAND_MAX; ;}
     break;
 
   case 290:
-#line 2934 "Gmsh.y"
+#line 2935 "Gmsh.y"
     { (yyval.d) = (yyvsp[(1) - (1)].d); ;}
     break;
 
   case 291:
-#line 2935 "Gmsh.y"
+#line 2936 "Gmsh.y"
     { (yyval.d) = 3.141592653589793; ;}
     break;
 
   case 292:
-#line 2936 "Gmsh.y"
+#line 2937 "Gmsh.y"
     { (yyval.d) = Msg::GetCommRank(); ;}
     break;
 
   case 293:
-#line 2937 "Gmsh.y"
+#line 2938 "Gmsh.y"
     { (yyval.d) = Msg::GetCommSize(); ;}
     break;
 
   case 294:
-#line 2938 "Gmsh.y"
+#line 2939 "Gmsh.y"
     { (yyval.d) = Get_GmshMajorVersion(); ;}
     break;
 
   case 295:
-#line 2939 "Gmsh.y"
+#line 2940 "Gmsh.y"
     { (yyval.d) = Get_GmshMinorVersion(); ;}
     break;
 
   case 296:
-#line 2940 "Gmsh.y"
+#line 2941 "Gmsh.y"
     { (yyval.d) = Get_GmshPatchVersion(); ;}
     break;
 
   case 297:
-#line 2945 "Gmsh.y"
+#line 2946 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (1)].c));
@@ -7197,7 +7198,7 @@ yyreduce:
     break;
 
   case 298:
-#line 2958 "Gmsh.y"
+#line 2959 "Gmsh.y"
     {
       char tmpstring[1024];
       sprintf(tmpstring, "%s_%d", (yyvsp[(1) - (5)].c), (int)(yyvsp[(4) - (5)].d)) ;
@@ -7212,7 +7213,7 @@ yyreduce:
     break;
 
   case 299:
-#line 2970 "Gmsh.y"
+#line 2971 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (4)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (4)].c))){
@@ -7230,7 +7231,7 @@ yyreduce:
     break;
 
   case 300:
-#line 2985 "Gmsh.y"
+#line 2986 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(2) - (4)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(2) - (4)].c));
@@ -7243,7 +7244,7 @@ yyreduce:
     break;
 
   case 301:
-#line 2995 "Gmsh.y"
+#line 2996 "Gmsh.y"
     {
       if(!gmsh_yysymbols.count((yyvsp[(1) - (2)].c))){
 	yymsg(0, "Unknown variable '%s'", (yyvsp[(1) - (2)].c));
@@ -7256,7 +7257,7 @@ yyreduce:
     break;
 
   case 302:
-#line 3005 "Gmsh.y"
+#line 3006 "Gmsh.y"
     {
       int index = (int)(yyvsp[(3) - (5)].d);
       if(!gmsh_yysymbols.count((yyvsp[(1) - (5)].c))){
@@ -7274,7 +7275,7 @@ yyreduce:
     break;
 
   case 303:
-#line 3023 "Gmsh.y"
+#line 3024 "Gmsh.y"
     {
       NumberOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), (yyval.d));
       Free((yyvsp[(1) - (3)].c)); Free((yyvsp[(3) - (3)].c));
@@ -7282,7 +7283,7 @@ yyreduce:
     break;
 
   case 304:
-#line 3028 "Gmsh.y"
+#line 3029 "Gmsh.y"
     {
       NumberOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), (yyval.d));
       Free((yyvsp[(1) - (6)].c)); Free((yyvsp[(6) - (6)].c));
@@ -7290,7 +7291,7 @@ yyreduce:
     break;
 
   case 305:
-#line 3033 "Gmsh.y"
+#line 3034 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (4)].c), 0, (yyvsp[(3) - (4)].c), d)){
@@ -7303,7 +7304,7 @@ yyreduce:
     break;
 
   case 306:
-#line 3043 "Gmsh.y"
+#line 3044 "Gmsh.y"
     {
       double d = 0.;
       if(NumberOption(GMSH_GET, (yyvsp[(1) - (7)].c), (int)(yyvsp[(3) - (7)].d), (yyvsp[(6) - (7)].c), d)){
@@ -7316,7 +7317,7 @@ yyreduce:
     break;
 
   case 307:
-#line 3053 "Gmsh.y"
+#line 3054 "Gmsh.y"
     { 
       (yyval.d) = Msg::GetValue((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].d));
       Free((yyvsp[(3) - (6)].c));
@@ -7324,70 +7325,70 @@ yyreduce:
     break;
 
   case 308:
-#line 3061 "Gmsh.y"
+#line 3062 "Gmsh.y"
     {
       memcpy((yyval.v), (yyvsp[(1) - (1)].v), 5*sizeof(double));
     ;}
     break;
 
   case 309:
-#line 3065 "Gmsh.y"
+#line 3066 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = -(yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 310:
-#line 3069 "Gmsh.y"
+#line 3070 "Gmsh.y"
     { 
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(2) - (2)].v)[i];
     ;}
     break;
 
   case 311:
-#line 3073 "Gmsh.y"
+#line 3074 "Gmsh.y"
     { 
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] - (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
   case 312:
-#line 3077 "Gmsh.y"
+#line 3078 "Gmsh.y"
     {
       for(int i = 0; i < 5; i++) (yyval.v)[i] = (yyvsp[(1) - (3)].v)[i] + (yyvsp[(3) - (3)].v)[i];
     ;}
     break;
 
   case 313:
-#line 3084 "Gmsh.y"
+#line 3085 "Gmsh.y"
     { 
       (yyval.v)[0] = (yyvsp[(2) - (11)].d);  (yyval.v)[1] = (yyvsp[(4) - (11)].d);  (yyval.v)[2] = (yyvsp[(6) - (11)].d);  (yyval.v)[3] = (yyvsp[(8) - (11)].d); (yyval.v)[4] = (yyvsp[(10) - (11)].d);
     ;}
     break;
 
   case 314:
-#line 3088 "Gmsh.y"
+#line 3089 "Gmsh.y"
     { 
       (yyval.v)[0] = (yyvsp[(2) - (9)].d);  (yyval.v)[1] = (yyvsp[(4) - (9)].d);  (yyval.v)[2] = (yyvsp[(6) - (9)].d);  (yyval.v)[3] = (yyvsp[(8) - (9)].d); (yyval.v)[4] = 1.0;
     ;}
     break;
 
   case 315:
-#line 3092 "Gmsh.y"
+#line 3093 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
     ;}
     break;
 
   case 316:
-#line 3096 "Gmsh.y"
+#line 3097 "Gmsh.y"
     {
       (yyval.v)[0] = (yyvsp[(2) - (7)].d);  (yyval.v)[1] = (yyvsp[(4) - (7)].d);  (yyval.v)[2] = (yyvsp[(6) - (7)].d);  (yyval.v)[3] = 0.0; (yyval.v)[4] = 1.0;
     ;}
     break;
 
   case 317:
-#line 3103 "Gmsh.y"
+#line 3104 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(List_T*));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].l)));
@@ -7395,14 +7396,14 @@ yyreduce:
     break;
 
   case 318:
-#line 3108 "Gmsh.y"
+#line 3109 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].l)));
     ;}
     break;
 
   case 319:
-#line 3115 "Gmsh.y"
+#line 3116 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
@@ -7410,14 +7411,14 @@ yyreduce:
     break;
 
   case 320:
-#line 3120 "Gmsh.y"
+#line 3121 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
   case 321:
-#line 3124 "Gmsh.y"
+#line 3125 "Gmsh.y"
     {
       // creates an empty list
       (yyval.l) = List_Create(2, 1, sizeof(double));
@@ -7425,14 +7426,14 @@ yyreduce:
     break;
 
   case 322:
-#line 3129 "Gmsh.y"
+#line 3130 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
   case 323:
-#line 3133 "Gmsh.y"
+#line 3134 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (4)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7443,7 +7444,7 @@ yyreduce:
     break;
 
   case 324:
-#line 3141 "Gmsh.y"
+#line 3142 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(4) - (5)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7454,14 +7455,14 @@ yyreduce:
     break;
 
   case 325:
-#line 3152 "Gmsh.y"
+#line 3153 "Gmsh.y"
     { 
       (yyval.l) = (yyvsp[(1) - (1)].l); 
     ;}
     break;
 
   case 326:
-#line 3156 "Gmsh.y"
+#line 3157 "Gmsh.y"
     {
       if(!strcmp((yyvsp[(1) - (1)].c), "*") || !strcmp((yyvsp[(1) - (1)].c), "all"))
         (yyval.l) = 0;
@@ -7473,7 +7474,7 @@ yyreduce:
     break;
 
   case 327:
-#line 3168 "Gmsh.y"
+#line 3169 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (2)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7484,7 +7485,7 @@ yyreduce:
     break;
 
   case 328:
-#line 3176 "Gmsh.y"
+#line 3177 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(3) - (3)].l);
       for(int i = 0; i < List_Nbr((yyval.l)); i++){
@@ -7495,7 +7496,7 @@ yyreduce:
     break;
 
   case 329:
-#line 3184 "Gmsh.y"
+#line 3185 "Gmsh.y"
     { 
       (yyval.l) = List_Create(2, 1, sizeof(double)); 
       for(double d = (yyvsp[(1) - (3)].d); ((yyvsp[(1) - (3)].d) < (yyvsp[(3) - (3)].d)) ? (d <= (yyvsp[(3) - (3)].d)) : (d >= (yyvsp[(3) - (3)].d)); 
@@ -7505,7 +7506,7 @@ yyreduce:
     break;
 
   case 330:
-#line 3191 "Gmsh.y"
+#line 3192 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double)); 
       if(!(yyvsp[(5) - (5)].d) || ((yyvsp[(1) - (5)].d) < (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) < 0) || ((yyvsp[(1) - (5)].d) > (yyvsp[(3) - (5)].d) && (yyvsp[(5) - (5)].d) > 0)){
@@ -7519,7 +7520,7 @@ yyreduce:
     break;
 
   case 331:
-#line 3202 "Gmsh.y"
+#line 3203 "Gmsh.y"
     {
       // Returns the coordinates of a point and fills a list with it.
       // This allows to ensure e.g. that relative point positions are
@@ -7542,7 +7543,7 @@ yyreduce:
     break;
 
   case 332:
-#line 3222 "Gmsh.y"
+#line 3223 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -7555,7 +7556,7 @@ yyreduce:
     break;
 
   case 333:
-#line 3232 "Gmsh.y"
+#line 3233 "Gmsh.y"
     {
       (yyval.l) = List_Create(List_Nbr((yyvsp[(1) - (1)].l)), 1, sizeof(double));
       for(int i = 0; i < List_Nbr((yyvsp[(1) - (1)].l)); i++){
@@ -7568,7 +7569,7 @@ yyreduce:
     break;
 
   case 334:
-#line 3242 "Gmsh.y"
+#line 3243 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (3)].c)))
@@ -7581,7 +7582,7 @@ yyreduce:
     break;
 
   case 335:
-#line 3252 "Gmsh.y"
+#line 3253 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       if(!gmsh_yysymbols.count((yyvsp[(1) - (6)].c)))
@@ -7601,7 +7602,7 @@ yyreduce:
     break;
 
   case 336:
-#line 3272 "Gmsh.y"
+#line 3273 "Gmsh.y"
     {
       (yyval.l) = List_Create(2, 1, sizeof(double));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].d)));
@@ -7609,21 +7610,21 @@ yyreduce:
     break;
 
   case 337:
-#line 3277 "Gmsh.y"
+#line 3278 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(1) - (1)].l);
     ;}
     break;
 
   case 338:
-#line 3281 "Gmsh.y"
+#line 3282 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].d)));
     ;}
     break;
 
   case 339:
-#line 3285 "Gmsh.y"
+#line 3286 "Gmsh.y"
     {
       for(int i = 0; i < List_Nbr((yyvsp[(3) - (3)].l)); i++){
 	double d;
@@ -7635,21 +7636,21 @@ yyreduce:
     break;
 
   case 340:
-#line 3297 "Gmsh.y"
+#line 3298 "Gmsh.y"
     {
       (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (9)].d), (int)(yyvsp[(4) - (9)].d), (int)(yyvsp[(6) - (9)].d), (int)(yyvsp[(8) - (9)].d));
     ;}
     break;
 
   case 341:
-#line 3301 "Gmsh.y"
+#line 3302 "Gmsh.y"
     {
       (yyval.u) = CTX.PACK_COLOR((int)(yyvsp[(2) - (7)].d), (int)(yyvsp[(4) - (7)].d), (int)(yyvsp[(6) - (7)].d), 255);
     ;}
     break;
 
   case 342:
-#line 3313 "Gmsh.y"
+#line 3314 "Gmsh.y"
     {
       int flag;
       (yyval.u) = Get_ColorForString(ColorString, -1, (yyvsp[(1) - (1)].c), &flag);
@@ -7659,7 +7660,7 @@ yyreduce:
     break;
 
   case 343:
-#line 3320 "Gmsh.y"
+#line 3321 "Gmsh.y"
     {
       unsigned int val = 0;
       ColorOption(GMSH_GET, (yyvsp[(1) - (5)].c), 0, (yyvsp[(5) - (5)].c), val);
@@ -7669,14 +7670,14 @@ yyreduce:
     break;
 
   case 344:
-#line 3330 "Gmsh.y"
+#line 3331 "Gmsh.y"
     {
       (yyval.l) = (yyvsp[(2) - (3)].l);
     ;}
     break;
 
   case 345:
-#line 3334 "Gmsh.y"
+#line 3335 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       GmshColorTable *ct = Get_ColorTable((int)(yyvsp[(3) - (6)].d));
@@ -7691,7 +7692,7 @@ yyreduce:
     break;
 
   case 346:
-#line 3349 "Gmsh.y"
+#line 3350 "Gmsh.y"
     {
       (yyval.l) = List_Create(256, 10, sizeof(unsigned int));
       List_Add((yyval.l), &((yyvsp[(1) - (1)].u)));
@@ -7699,21 +7700,21 @@ yyreduce:
     break;
 
   case 347:
-#line 3354 "Gmsh.y"
+#line 3355 "Gmsh.y"
     {
       List_Add((yyval.l), &((yyvsp[(3) - (3)].u)));
     ;}
     break;
 
   case 348:
-#line 3361 "Gmsh.y"
+#line 3362 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
   case 349:
-#line 3365 "Gmsh.y"
+#line 3366 "Gmsh.y"
     {
       if(!gmsh_yystringsymbols.count((yyvsp[(1) - (1)].c))){
 	yymsg(0, "Unknown string variable '%s'", (yyvsp[(1) - (1)].c));
@@ -7729,7 +7730,7 @@ yyreduce:
     break;
 
   case 350:
-#line 3378 "Gmsh.y"
+#line 3379 "Gmsh.y"
     { 
       const char *val = "";
       StringOption(GMSH_GET, (yyvsp[(1) - (3)].c), 0, (yyvsp[(3) - (3)].c), val);
@@ -7740,7 +7741,7 @@ yyreduce:
     break;
 
   case 351:
-#line 3386 "Gmsh.y"
+#line 3387 "Gmsh.y"
     { 
       const char *val = "";
       StringOption(GMSH_GET, (yyvsp[(1) - (6)].c), (int)(yyvsp[(3) - (6)].d), (yyvsp[(6) - (6)].c), val);
@@ -7751,14 +7752,14 @@ yyreduce:
     break;
 
   case 352:
-#line 3397 "Gmsh.y"
+#line 3398 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(1) - (1)].c);
     ;}
     break;
 
   case 353:
-#line 3401 "Gmsh.y"
+#line 3402 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc(32 * sizeof(char));
       time_t now;
@@ -7769,7 +7770,7 @@ yyreduce:
     break;
 
   case 354:
-#line 3409 "Gmsh.y"
+#line 3410 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (6)].c)) + strlen((yyvsp[(5) - (6)].c)) + 1) * sizeof(char));
       strcpy((yyval.c), (yyvsp[(3) - (6)].c));
@@ -7780,7 +7781,7 @@ yyreduce:
     break;
 
   case 355:
-#line 3417 "Gmsh.y"
+#line 3418 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -7797,7 +7798,7 @@ yyreduce:
     break;
 
   case 356:
-#line 3431 "Gmsh.y"
+#line 3432 "Gmsh.y"
     {
       (yyval.c) = (char *)Malloc((strlen((yyvsp[(3) - (4)].c)) + 1) * sizeof(char));
       int i;
@@ -7814,14 +7815,14 @@ yyreduce:
     break;
 
   case 357:
-#line 3445 "Gmsh.y"
+#line 3446 "Gmsh.y"
     {
       (yyval.c) = (yyvsp[(3) - (4)].c);
     ;}
     break;
 
   case 358:
-#line 3449 "Gmsh.y"
+#line 3450 "Gmsh.y"
     {
       char tmpstring[1024];
       int i = PrintListOfDouble((yyvsp[(3) - (6)].c), (yyvsp[(5) - (6)].l), tmpstring);
@@ -7844,7 +7845,7 @@ yyreduce:
 
 
 /* Line 1267 of yacc.c.  */
-#line 7848 "Gmsh.tab.cpp"
+#line 7849 "Gmsh.tab.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -8058,7 +8059,7 @@ yyreturn:
 }
 
 
-#line 3469 "Gmsh.y"
+#line 3470 "Gmsh.y"
 
 
 int PrintListOfDouble(char *format, List_T *list, char *buffer)
diff --git a/Parser/Gmsh.tab.hpp b/Parser/Gmsh.tab.hpp
index 3181cd73331052cd5423fad516c2bbb7ef515614..36f7874a0415819ec5efea60b8cdbf2395ab81c5 100644
--- a/Parser/Gmsh.tab.hpp
+++ b/Parser/Gmsh.tab.hpp
@@ -284,7 +284,7 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 73 "Gmsh.y"
+#line 74 "Gmsh.y"
 {
   char *c;
   int i;
diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y
index 51d4ce32ef4f019fabaf74f226b08679dd4c3c0f..bdc95b13e5d4b6af5b76eeeed93c5920b4993484 100644
--- a/Parser/Gmsh.y
+++ b/Parser/Gmsh.y
@@ -7,6 +7,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <time.h>
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "GmshMatrix.h"
 #include "MallocUtils.h"
diff --git a/Parser/Makefile b/Parser/Makefile
index 95db30118d5355ffe018bb5bbb68af565db9212a..1d449f731f33901ff4ab402ed1b2fdc0afbc4234 100644
--- a/Parser/Makefile
+++ b/Parser/Makefile
@@ -53,18 +53,19 @@ depend:
 	rm -f Makefile.new
 
 # DO NOT DELETE THIS LINE
-Gmsh.tab${OBJEXT}: Gmsh.tab.cpp ../Common/GmshMessage.h ../Numeric/GmshMatrix.h \
-  ../Common/MallocUtils.h ../Common/ListUtils.h ../Common/TreeUtils.h \
-  ../Common/avl.h ../Common/ListUtils.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h \
-  ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h \
-  ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h \
-  ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+Gmsh.tab${OBJEXT}: Gmsh.tab.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  ../Numeric/GmshMatrix.h ../Common/MallocUtils.h ../Common/ListUtils.h \
+  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h ../Geo/GModel.h ../Geo/GVertex.h \
+  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/Geo.h ../Common/GmshDefines.h \
   ../Geo/gmshSurface.h ../Geo/Pair.h ../Geo/Range.h ../Geo/SPoint2.h \
   ../Geo/SPoint3.h ../Geo/SVector3.h ../Geo/SBoundingBox3d.h \
@@ -81,7 +82,8 @@ Gmsh.yy${OBJEXT}: Gmsh.yy.cpp ../Common/GmshMessage.h ../Geo/Geo.h \
   ../Geo/Range.h ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/SVector3.h \
   ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/TreeUtils.h \
-  ../Common/avl.h ../Common/ListUtils.h ../Geo/SPoint2.h \
-  ../Geo/ExtrudeParams.h ../Common/SmoothData.h Gmsh.tab.hpp
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \
+  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
+  ../Geo/SPoint2.h ../Geo/ExtrudeParams.h ../Common/SmoothData.h \
+  Gmsh.tab.hpp
 FunctionManager${OBJEXT}: FunctionManager.cpp FunctionManager.h
diff --git a/Plugin/Annotate.cpp b/Plugin/Annotate.cpp
index a5f52dcebc805274af402cc311ccd953fc0b195b..04732ef4b796c54f8542c0834f34d56a1bb37472 100644
--- a/Plugin/Annotate.cpp
+++ b/Plugin/Annotate.cpp
@@ -4,14 +4,16 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <vector>
+#include "GmshConfig.h"
+#include "Annotate.h"
+#include "Context.h"
+
 #if defined(HAVE_FLTK)
 #include <FL/gl.h>
 #include "drawContext.h"
 #include "Draw.h"
 #include "GUI.h"
 #endif
-#include "Annotate.h"
-#include "Context.h"
 
 extern Context_T CTX;
 
diff --git a/Plugin/CutGrid.cpp b/Plugin/CutGrid.cpp
index 31591d4c8d20cd9141e686e15981bc56584c727f..bc24334d90a80ac9331e9d5f5efe62ead73f4c2e 100644
--- a/Plugin/CutGrid.cpp
+++ b/Plugin/CutGrid.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "OctreePost.h"
 #include "CutGrid.h"
 #include "Context.h"
diff --git a/Plugin/CutParametric.cpp b/Plugin/CutParametric.cpp
index c85386cf5d440cd0b06718a8d8133a55e642b9ee..75bbc159cc5e67518d3d0ee92745198cd62e35ad 100644
--- a/Plugin/CutParametric.cpp
+++ b/Plugin/CutParametric.cpp
@@ -4,17 +4,20 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <math.h>
+#include "GmshConfig.h"
+#include "OctreePost.h"
+#include "CutParametric.h"
+#include "Context.h"
+
 #if defined(HAVE_FLTK)
 #include <FL/gl.h>
 #include "drawContext.h"
 #include "Draw.h"
 #endif
+
 #if defined(HAVE_MATH_EVAL)
 #include "matheval.h"
 #endif
-#include "OctreePost.h"
-#include "CutParametric.h"
-#include "Context.h"
 
 extern Context_T CTX;
 
diff --git a/Plugin/CutPlane.cpp b/Plugin/CutPlane.cpp
index af6bc4212cfa021209f7f51a32de7f49bf3e42d4..ad68c3bbfc909f48fb60f1ac52b979d57830b90a 100644
--- a/Plugin/CutPlane.cpp
+++ b/Plugin/CutPlane.cpp
@@ -3,12 +3,14 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
+#include "CutPlane.h"
+#include "Context.h"
+
 #if defined(HAVE_FLTK)
 #include "drawContext.h"
 #include "Draw.h"
 #endif
-#include "CutPlane.h"
-#include "Context.h"
 
 extern Context_T CTX;
 
diff --git a/Plugin/CutSphere.cpp b/Plugin/CutSphere.cpp
index 40458339bea8272967fb6e1daaca46f5bef131f2..77ab885b65b57db95963eacb8942f9880c00a9e3 100644
--- a/Plugin/CutSphere.cpp
+++ b/Plugin/CutSphere.cpp
@@ -4,12 +4,14 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <string.h>
+#include "GmshConfig.h"
+#include "CutSphere.h"
+#include "Context.h"
+
 #if defined(HAVE_FLTK)
 #include "drawContext.h"
 #include "Draw.h"
 #endif
-#include "CutSphere.h"
-#include "Context.h"
 
 extern Context_T CTX;
 
diff --git a/Plugin/Evaluate.cpp b/Plugin/Evaluate.cpp
index b3b8d6800a3d126b97b82ff0913c0cbc32a0b41e..91c3f7cf8e3132e0099a934a95b1fee032184eb8 100644
--- a/Plugin/Evaluate.cpp
+++ b/Plugin/Evaluate.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "Evaluate.h"
 
 #if defined(HAVE_MATH_EVAL)
diff --git a/Plugin/Extract.cpp b/Plugin/Extract.cpp
index afceab210d9eb5d7ddcb3e1a48b56ef6f8c8fe32..30f11b296dba4cb350c9ef43c5f61dfe81e1b1d8 100644
--- a/Plugin/Extract.cpp
+++ b/Plugin/Extract.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "Extract.h"
 
 #if defined(HAVE_MATH_EVAL)
diff --git a/Plugin/Makefile b/Plugin/Makefile
index 80bc5ddbd7705a19041f5903e097b55c8da0e584..c6b7555b220713134436a2c359e4f31d229ce26e 100644
--- a/Plugin/Makefile
+++ b/Plugin/Makefile
@@ -63,102 +63,109 @@ depend:
 Plugin${OBJEXT}: Plugin.cpp Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h
-PluginManager${OBJEXT}: PluginManager.cpp Plugin.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
-  ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h PluginManager.h CutMap.h Levelset.h CutGrid.h \
-  StreamLines.h CutPlane.h CutParametric.h CutSphere.h Skin.h \
-  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h Extract.h \
-  ExtractElements.h ExtractEdges.h HarmonicToTime.h ModulusPhase.h \
-  Integrate.h Gradient.h Curl.h Divergence.h Annotate.h Remove.h \
-  MakeSimplex.h Smooth.h Transform.h LongitudeLatitude.h Triangulate.h \
-  Warp.h SphericalRaise.h Eigenvectors.h Eigenvalues.h Lambda2.h \
-  Evaluate.h ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h Probe.h FieldView.h GSHHS.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/ListUtils.h
+PluginManager${OBJEXT}: PluginManager.cpp ../Common/GmshConfig.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h PluginManager.h CutMap.h \
+  Levelset.h CutGrid.h StreamLines.h CutPlane.h CutParametric.h \
+  CutSphere.h Skin.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h Extract.h ExtractElements.h ExtractEdges.h \
+  HarmonicToTime.h ModulusPhase.h Integrate.h Gradient.h Curl.h \
+  Divergence.h Annotate.h Remove.h MakeSimplex.h Smooth.h Transform.h \
+  LongitudeLatitude.h Triangulate.h Warp.h SphericalRaise.h \
+  Eigenvectors.h Eigenvalues.h Lambda2.h Evaluate.h ../Post/OctreePost.h \
+  ../Common/Octree.h ../Common/OctreeInternals.h Probe.h FieldView.h \
+  GSHHS.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h
 Levelset${OBJEXT}: Levelset.cpp Levelset.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h MakeSimplex.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Post/adaptiveData.h
-CutPlane${OBJEXT}: CutPlane.cpp ../Graphics/drawContext.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h CutPlane.h \
-  Levelset.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
-  ../Common/GmshMessage.h ../Post/PView.h ../Post/PViewDataList.h \
-  ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
-CutSphere${OBJEXT}: CutSphere.cpp ../Graphics/drawContext.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h CutSphere.h \
-  Levelset.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
-  ../Common/GmshMessage.h ../Post/PView.h ../Post/PViewDataList.h \
-  ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h MakeSimplex.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Post/adaptiveData.h
+CutPlane${OBJEXT}: CutPlane.cpp ../Common/GmshConfig.h CutPlane.h Levelset.h \
+  Plugin.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
+  ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Graphics/drawContext.h ../Fltk/Draw.h
+CutSphere${OBJEXT}: CutSphere.cpp ../Common/GmshConfig.h CutSphere.h Levelset.h \
+  Plugin.h ../Common/Options.h ../Post/ColorTable.h \
+  ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
+  ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Graphics/drawContext.h ../Fltk/Draw.h
 CutMap${OBJEXT}: CutMap.cpp CutMap.h Levelset.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 Smooth${OBJEXT}: Smooth.cpp Smooth.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h
-CutParametric${OBJEXT}: CutParametric.cpp ../Graphics/drawContext.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h \
+  ../Common/GmshConfig.h ../Common/ListUtils.h
+CutParametric${OBJEXT}: CutParametric.cpp ../Common/GmshConfig.h \
   ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
   CutParametric.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
-  ../Common/GmshMessage.h ../Post/PView.h ../Post/PViewDataList.h \
-  ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
+  ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
+  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Graphics/drawContext.h ../Fltk/Draw.h
 Lambda2${OBJEXT}: Lambda2.cpp Lambda2.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
 Eigenvectors${OBJEXT}: Eigenvectors.cpp Eigenvectors.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Numeric/EigSolve.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Numeric/EigSolve.h
 Eigenvalues${OBJEXT}: Eigenvalues.cpp Eigenvalues.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h
-StreamLines${OBJEXT}: StreamLines.cpp ../Graphics/drawContext.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h StreamLines.h \
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
+StreamLines${OBJEXT}: StreamLines.cpp ../Common/GmshConfig.h StreamLines.h \
   Plugin.h ../Common/Options.h ../Post/ColorTable.h \
-  ../Common/GmshMessage.h ../Post/PView.h ../Post/PViewDataList.h \
-  ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
+  ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
+  ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
   ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
   ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h
-CutGrid${OBJEXT}: CutGrid.cpp ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h CutGrid.h Plugin.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
-  ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Graphics/drawContext.h ../Fltk/Draw.h
+  ../Post/PViewOptions.h ../Post/ColorTable.h ../Graphics/drawContext.h \
+  ../Fltk/Draw.h
+CutGrid${OBJEXT}: CutGrid.cpp ../Common/GmshConfig.h ../Post/OctreePost.h \
+  ../Common/Octree.h ../Common/OctreeInternals.h CutGrid.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Graphics/drawContext.h ../Fltk/Draw.h
 Transform${OBJEXT}: Transform.cpp Transform.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h
 LongitudeLatitude${OBJEXT}: LongitudeLatitude.cpp LongitudeLatitude.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h
 Triangulate${OBJEXT}: Triangulate.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
@@ -172,128 +179,137 @@ Triangulate${OBJEXT}: Triangulate.cpp ../Geo/GModel.h ../Geo/GVertex.h \
   ../Geo/MVertex.h ../Geo/SPoint2.h ../Geo/SPoint3.h Triangulate.h \
   Plugin.h ../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 Warp${OBJEXT}: Warp.cpp Warp.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Common/SmoothData.h ../Numeric/Numeric.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/ListUtils.h ../Common/SmoothData.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
 SphericalRaise${OBJEXT}: SphericalRaise.cpp SphericalRaise.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h
 Skin${OBJEXT}: Skin.cpp Skin.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \
-  ../Common/MallocUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/ListUtils.h ../Common/TreeUtils.h ../Common/avl.h \
+  ../Common/ListUtils.h ../Common/MallocUtils.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 GSHHS${OBJEXT}: GSHHS.cpp GSHHS.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Mesh/Field.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h
-Extract${OBJEXT}: Extract.cpp Extract.h Plugin.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
-  ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Mesh/Field.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h
+Extract${OBJEXT}: Extract.cpp ../Common/GmshConfig.h Extract.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h
 ExtractElements${OBJEXT}: ExtractElements.cpp ExtractElements.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h
 ExtractEdges${OBJEXT}: ExtractEdges.cpp ExtractEdges.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Mesh/BDS.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \
+  ../Mesh/BDS.h
 MakeSimplex${OBJEXT}: MakeSimplex.cpp MakeSimplex.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h
-Evaluate${OBJEXT}: Evaluate.cpp Evaluate.h Plugin.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
-  ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h
+Evaluate${OBJEXT}: Evaluate.cpp ../Common/GmshConfig.h Evaluate.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Post/OctreePost.h \
+  ../Common/Octree.h ../Common/OctreeInternals.h
 FieldView${OBJEXT}: FieldView.cpp FieldView.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Mesh/Field.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Mesh/Field.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
+  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
+  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
+  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
+  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h
 Integrate${OBJEXT}: Integrate.cpp Integrate.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Post/PViewOptions.h ../Post/ColorTable.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Post/shapeFunctions.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Post/PViewOptions.h ../Post/ColorTable.h
 Gradient${OBJEXT}: Gradient.cpp Gradient.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Post/shapeFunctions.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h
 Curl${OBJEXT}: Curl.cpp Curl.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
   ../Common/GmshMessage.h ../Post/PView.h ../Geo/SPoint3.h \
   ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Post/shapeFunctions.h ../Numeric/Numeric.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
 Divergence${OBJEXT}: Divergence.cpp Divergence.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Post/shapeFunctions.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
-Annotate${OBJEXT}: Annotate.cpp ../Graphics/drawContext.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Fltk/Draw.h ../Fltk/GUI.h \
-  Annotate.h Plugin.h ../Common/Options.h ../Post/ColorTable.h \
-  ../Common/GmshMessage.h ../Post/PView.h ../Post/PViewDataList.h \
-  ../Post/PViewData.h ../Numeric/GmshMatrix.h ../Common/ListUtils.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h ../Post/shapeFunctions.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h
+Annotate${OBJEXT}: Annotate.cpp ../Common/GmshConfig.h Annotate.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Graphics/drawContext.h ../Fltk/Draw.h ../Fltk/GUI.h
 Remove${OBJEXT}: Remove.cpp Remove.h Plugin.h ../Common/Options.h \
   ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
   ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h
-Probe${OBJEXT}: Probe.cpp ../Graphics/drawContext.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Fltk/Draw.h Probe.h Plugin.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Common/GmshMessage.h ../Post/PView.h \
-  ../Post/PViewDataList.h ../Post/PViewData.h ../Numeric/GmshMatrix.h \
-  ../Common/ListUtils.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h ../Post/OctreePost.h ../Common/Octree.h \
-  ../Common/OctreeInternals.h
+  ../Common/GmshConfig.h ../Common/ListUtils.h
+Probe${OBJEXT}: Probe.cpp ../Common/GmshConfig.h Probe.h Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
+  ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
+  ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
+  ../Numeric/GmshMatrix.h ../Common/ListUtils.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
+  ../Post/OctreePost.h ../Common/Octree.h ../Common/OctreeInternals.h \
+  ../Graphics/drawContext.h ../Fltk/Draw.h
 HarmonicToTime${OBJEXT}: HarmonicToTime.cpp HarmonicToTime.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h
 ModulusPhase${OBJEXT}: ModulusPhase.cpp ModulusPhase.h Plugin.h \
   ../Common/Options.h ../Post/ColorTable.h ../Common/GmshMessage.h \
   ../Post/PView.h ../Geo/SPoint3.h ../Post/PViewDataList.h \
   ../Post/PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/ListUtils.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h
diff --git a/Plugin/PluginManager.cpp b/Plugin/PluginManager.cpp
index 028619e0b45c13801d20cf6fe69cd5da6bccfdf1..d6f9ab94647818468e5182f6655497746d3aeeb3 100644
--- a/Plugin/PluginManager.cpp
+++ b/Plugin/PluginManager.cpp
@@ -3,17 +3,8 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
-#if !defined(HAVE_NO_DLL)
-#include <dlfcn.h>
-#endif
-
 #include <map>
-
-#if defined(HAVE_FLTK)
-#include <FL/Fl.H>
-#include <FL/filename.H>
-#endif
-
+#include "GmshConfig.h"
 #include "Plugin.h"
 #include "PluginManager.h"
 #include "CutMap.h"
@@ -50,6 +41,15 @@
 #include "GSHHS.h"
 #include "Context.h"
 
+#if !defined(HAVE_NO_DLL)
+#include <dlfcn.h>
+#endif
+
+#if defined(HAVE_FLTK)
+#include <FL/Fl.H>
+#include <FL/filename.H>
+#endif
+
 extern Context_T CTX;
 
 const char *GMSH_PluginEntry = "GMSH_RegisterPlugin";
diff --git a/Plugin/Probe.cpp b/Plugin/Probe.cpp
index dc8cce28f431b03e4d335993c11e101e0da57aef..51e69d30c0bbad4fc8351910c939c0c96c310128 100644
--- a/Plugin/Probe.cpp
+++ b/Plugin/Probe.cpp
@@ -3,14 +3,16 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
+#include "Probe.h"
+#include "Context.h"
+#include "OctreePost.h"
+
 #if defined(HAVE_FLTK)
 #include <FL/gl.h>
 #include "drawContext.h"
 #include "Draw.h"
 #endif
-#include "Probe.h"
-#include "Context.h"
-#include "OctreePost.h"
 
 extern Context_T CTX;
 
diff --git a/Plugin/StreamLines.cpp b/Plugin/StreamLines.cpp
index f5fddee5b4a0d2e2cd53a4b6e0bd7cb4bce1b4a1..594d66943190cc37bf3b80b21bbaa2654d79b4f4 100644
--- a/Plugin/StreamLines.cpp
+++ b/Plugin/StreamLines.cpp
@@ -4,15 +4,17 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <math.h>
+#include "GmshConfig.h"
+#include "StreamLines.h"
+#include "OctreePost.h"
+#include "Context.h"
+#include "PViewOptions.h"
+
 #if defined(HAVE_FLTK)
 #include <FL/gl.h>
 #include "drawContext.h"
 #include "Draw.h"
 #endif
-#include "StreamLines.h"
-#include "OctreePost.h"
-#include "Context.h"
-#include "PViewOptions.h"
 
 extern Context_T CTX;
 
diff --git a/Post/Makefile b/Post/Makefile
index 2849abb753b710988a40de805d97dac776b7fb07..8e603f1eb50025df7c4c0cf120b119fb1343694a 100644
--- a/Post/Makefile
+++ b/Post/Makefile
@@ -51,19 +51,7 @@ depend:
 # DO NOT DELETE THIS LINE
 PView${OBJEXT}: PView.cpp PView.h ../Geo/SPoint3.h PViewDataList.h PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h PViewDataGModel.h \
-  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
-  ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
-  ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
-  ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
-  ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
-  ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h PViewOptions.h ColorTable.h \
-  ../Common/VertexArray.h ../Common/SmoothData.h adaptiveData.h
-PViewIO${OBJEXT}: PViewIO.cpp PView.h ../Geo/SPoint3.h PViewDataList.h \
-  PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/ListUtils.h \
   PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
   ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
@@ -71,31 +59,44 @@ PViewIO${OBJEXT}: PViewIO.cpp PView.h ../Geo/SPoint3.h PViewDataList.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Common/StringUtils.h
+  ../Geo/SBoundingBox3d.h PViewOptions.h ColorTable.h \
+  ../Common/VertexArray.h ../Common/SmoothData.h adaptiveData.h
+PViewIO${OBJEXT}: PViewIO.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \
+  PView.h ../Geo/SPoint3.h PViewDataList.h PViewData.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
+  ../Common/ListUtils.h PViewDataGModel.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Common/StringUtils.h
 PViewData${OBJEXT}: PViewData.cpp PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshMessage.h \
-  ../Common/ListUtils.h adaptiveData.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h ../Common/ListUtils.h adaptiveData.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h
 PViewDataIO${OBJEXT}: PViewDataIO.cpp ../Common/GmshMessage.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h
+  ../Numeric/GmshMatrix.h ../Common/GmshConfig.h PViewData.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
 PViewDataList${OBJEXT}: PViewDataList.cpp PViewDataList.h PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/SmoothData.h ../Common/Context.h ../Geo/CGNSOptions.h \
-  ../Mesh/meshPartitionOptions.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/SmoothData.h ../Common/Context.h \
+  ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h
 PViewDataListIO${OBJEXT}: PViewDataListIO.cpp PViewDataList.h PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Common/ListUtils.h ../Numeric/Numeric.h \
-  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h \
-  ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  adaptiveData.h
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Common/ListUtils.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \
+  ../Mesh/meshPartitionOptions.h adaptiveData.h
 PViewDataGModel${OBJEXT}: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \
   ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
   ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
   ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
   ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
@@ -108,41 +109,44 @@ PViewDataGModel${OBJEXT}: PViewDataGModel.cpp PViewDataGModel.h PViewData.h \
   ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
   ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
   ../Numeric/GmshMatrix.h
-PViewDataGModelIO${OBJEXT}: PViewDataGModelIO.cpp ../Common/GmshMessage.h \
-  PViewDataGModel.h PViewData.h ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h \
-  ../Numeric/GmshMatrix.h ../Geo/GModel.h ../Geo/GVertex.h \
-  ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
-  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
-  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
-  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
-  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
-  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/MVertex.h \
-  ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MElement.h \
-  ../Common/GmshDefines.h ../Geo/MVertex.h ../Geo/MEdge.h \
-  ../Geo/MVertex.h ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h \
-  ../Geo/SVector3.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \
-  ../Numeric/Gauss.h ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h ../Common/StringUtils.h
-PViewOptions${OBJEXT}: PViewOptions.cpp PViewOptions.h ColorTable.h \
-  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/GmshMessage.h
-adaptiveData${OBJEXT}: adaptiveData.cpp adaptiveData.h ../Numeric/GmshMatrix.h \
-  ../Common/GmshMessage.h ../Plugin/Plugin.h ../Common/Options.h \
-  ../Post/ColorTable.h ../Post/PView.h ../Geo/SPoint3.h \
-  ../Post/PViewDataList.h ../Post/PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Common/ListUtils.h ../Common/OS.h
-OctreePost${OBJEXT}: OctreePost.cpp ../Common/Octree.h \
-  ../Common/OctreeInternals.h OctreePost.h ../Common/ListUtils.h PView.h \
-  ../Geo/SPoint3.h PViewDataList.h PViewData.h ../Geo/SBoundingBox3d.h \
-  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshMessage.h \
-  PViewDataGModel.h ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h \
-  ../Geo/Range.h ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
+PViewDataGModelIO${OBJEXT}: PViewDataGModelIO.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h PViewDataGModel.h PViewData.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Numeric/GmshMatrix.h \
+  ../Geo/GModel.h ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Geo/GPoint.h \
   ../Geo/SPoint2.h ../Geo/GEdge.h ../Geo/GEntity.h ../Geo/GVertex.h \
   ../Geo/SVector3.h ../Geo/SPoint3.h ../Geo/SPoint3.h ../Geo/SPoint2.h \
   ../Geo/GFace.h ../Geo/GEntity.h ../Geo/GPoint.h ../Geo/GEdgeLoop.h \
   ../Geo/GEdge.h ../Geo/SPoint2.h ../Geo/SVector3.h ../Geo/Pair.h \
   ../Geo/GRegion.h ../Geo/GEntity.h ../Geo/SPoint3.h \
-  ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \
+  ../Geo/SBoundingBox3d.h ../Geo/MVertex.h ../Geo/SPoint2.h \
+  ../Geo/SPoint3.h ../Geo/MElement.h ../Common/GmshDefines.h \
+  ../Geo/MVertex.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
+  ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h \
+  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
+  ../Numeric/GmshMatrix.h ../Common/StringUtils.h
+PViewOptions${OBJEXT}: PViewOptions.cpp ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h PViewOptions.h ColorTable.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h
+adaptiveData${OBJEXT}: adaptiveData.cpp adaptiveData.h ../Numeric/GmshMatrix.h \
+  ../Common/GmshConfig.h ../Common/GmshMessage.h ../Plugin/Plugin.h \
+  ../Common/Options.h ../Post/ColorTable.h ../Post/PView.h \
+  ../Geo/SPoint3.h ../Post/PViewDataList.h ../Post/PViewData.h \
+  ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Common/ListUtils.h \
+  ../Common/OS.h
+OctreePost${OBJEXT}: OctreePost.cpp ../Common/Octree.h \
+  ../Common/OctreeInternals.h OctreePost.h ../Common/ListUtils.h PView.h \
+  ../Geo/SPoint3.h PViewDataList.h PViewData.h ../Geo/SBoundingBox3d.h \
+  ../Geo/SPoint3.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \
+  ../Common/GmshMessage.h PViewDataGModel.h ../Geo/GModel.h \
+  ../Geo/GVertex.h ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
+  ../Geo/SBoundingBox3d.h ../Geo/GPoint.h ../Geo/SPoint2.h ../Geo/GEdge.h \
+  ../Geo/GEntity.h ../Geo/GVertex.h ../Geo/SVector3.h ../Geo/SPoint3.h \
+  ../Geo/SPoint3.h ../Geo/SPoint2.h ../Geo/GFace.h ../Geo/GEntity.h \
+  ../Geo/GPoint.h ../Geo/GEdgeLoop.h ../Geo/GEdge.h ../Geo/SPoint2.h \
+  ../Geo/SVector3.h ../Geo/Pair.h ../Geo/GRegion.h ../Geo/GEntity.h \
+  ../Geo/SPoint3.h ../Geo/SBoundingBox3d.h ../Numeric/Numeric.h \
   ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h shapeFunctions.h \
   ../Geo/MElement.h ../Common/GmshDefines.h ../Geo/MVertex.h \
   ../Geo/SPoint2.h ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h \
@@ -150,5 +154,5 @@ OctreePost${OBJEXT}: OctreePost.cpp ../Common/Octree.h \
   ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h ../Numeric/Gauss.h
 ColorTable${OBJEXT}: ColorTable.cpp ../Common/GmshMessage.h ColorTable.h \
   ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \
-  ../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
-  ../Numeric/GmshMatrix.h
+  ../Common/GmshConfig.h ../Numeric/Numeric.h \
+  ../Numeric/NumericEmbedded.h ../Numeric/GmshMatrix.h
diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp
index c5728cafc6b4a26e9c1c8e06ed63bc7d77a9ee95..841774d7f5176ba18f87239558ec1f64e327f3e1 100644
--- a/Post/PViewDataGModelIO.cpp
+++ b/Post/PViewDataGModelIO.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "PViewDataGModel.h"
 #include "MVertex.h"
diff --git a/Post/PViewIO.cpp b/Post/PViewIO.cpp
index 8346269bddb88d6ebae40e63496770d1cfa20b64..bef680d1eec06107afd929a70d0a1d5452eb967b 100644
--- a/Post/PViewIO.cpp
+++ b/Post/PViewIO.cpp
@@ -3,11 +3,12 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include "GmshConfig.h"
+#include "GmshMessage.h"
 #include "PView.h"
 #include "PViewDataList.h"
 #include "PViewDataGModel.h"
 #include "StringUtils.h"
-#include "GmshMessage.h"
 
 bool PView::readPOS(std::string fileName, int fileIndex)
 {
diff --git a/Post/PViewOptions.cpp b/Post/PViewOptions.cpp
index 26a46b10da4475c880a18c50aa57b158043fbdd7..bbe16a7d3deaf701a4d8027a163fd9de2080c531 100644
--- a/Post/PViewOptions.cpp
+++ b/Post/PViewOptions.cpp
@@ -4,8 +4,9 @@
 // bugs and problems to <gmsh@geuz.org>.
 
 #include <string.h>
-#include "PViewOptions.h"
+#include "GmshConfig.h"
 #include "GmshMessage.h"
+#include "PViewOptions.h"
 
 #if defined(HAVE_MATH_EVAL)
 #include "matheval.h"
diff --git a/configure b/configure
index 56483029459aef3a4ec9320f74440ec6448a83af..b4af543c9fdabaa9adc42a792a3019d79ee62fed 100755
--- a/configure
+++ b/configure
@@ -3715,7 +3715,10 @@ if test "x$enable_gui" != "xno"; then
   GMSH_DIRS="Common Geo Mesh Post Plugin Numeric Parser Graphics Fltk"
   GMSH_LIBS="-Llib -lGmshFltk -lGmshCommon -lGmshMesh -lGmshGeo -lGmshPost -lGmshPlugin"
   GMSH_LIBS="${GMSH_LIBS} -lGmshCommon -lGmshGraphics -lGmshParser -lGmshNumeric"
-  FLAGS="-DHAVE_FLTK ${FLAGS}"
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_FLTK 1
+_ACEOF
+
 
   if test "x${FLTK_PREFIX}" != "x" ; then
     # Extract the first word of "fltk-config", so it can be a program name with args.
@@ -3901,7 +3904,10 @@ fi
         test "x${UNAME}" != "xLinux" -a "x$enable_native_file_chooser" != "xno"); then
        GMSH_DIRS="${GMSH_DIRS} contrib/NativeFileChooser"
        GMSH_LIBS="${GMSH_LIBS} -lGmshNativeFileChooser"
-       FLAGS="-DHAVE_NATIVE_FILE_CHOOSER ${FLAGS}"
+       cat >>confdefs.h <<\_ACEOF
+#define HAVE_NATIVE_FILE_CHOOSER 1
+_ACEOF
+
     fi
   fi
 
@@ -3930,13 +3936,20 @@ fi
     if test "x${TREEBROWSER}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/TreeBrowser"
       GMSH_LIBS="${GMSH_LIBS} -lGmshTreeBrowser"
-      FLAGS="-DHAVE_TREE_BROWSER ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_TREE_BROWSER 1
+_ACEOF
+
     fi
   fi
 
   if test "x${OSMESA}" = "xyes"; then
     GMSH_LIBS="${GMSH_LIBS} `$FLTKCONFIG --use-images --ldflags` -lfltk_gl"
-    FLAGS="${FLAGS} -DHAVE_OSMESA `$FLTKCONFIG --use-images --cxxflags`"
+    FLAGS="${FLAGS} `$FLTKCONFIG --use-images --cxxflags`"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_OSMESA 1
+_ACEOF
+
     if test "x${OSMESA_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lOSMesa -lGL -lGLU"
     else
@@ -3961,7 +3974,10 @@ fi
 
     if test "x$enable_jpeg" != "xno"; then
         if test "x${FL_JPEG}" = "xyes"; then
-      FLAGS="-DHAVE_LIBJPEG ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
     else
       if test "x${JPEG_PREFIX}" != "x"; then
         LDFLAGS="-L${JPEG_PREFIX} -L${JPEG_PREFIX}/lib ${LDFLAGS}"
@@ -4026,7 +4042,10 @@ if test $ac_cv_lib_jpeg_main = yes; then
 fi
 
       if test "x${JPEG}" = "xyes"; then
-        FLAGS="-DHAVE_LIBJPEG ${FLAGS}"
+        cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
         if test "x${JPEG_PREFIX}" = "x"; then
           GMSH_LIBS="${GMSH_LIBS} -ljpeg"
         else
@@ -4108,7 +4127,10 @@ fi
 
     if test "x$enable_png" != "xno" -a "x${ZLIB}" = "xyes"; then
         if test "x${FL_PNG}" = "xyes"; then
-      FLAGS="-DHAVE_LIBPNG ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBPNG 1
+_ACEOF
+
     else
       if test "x${PNG_PREFIX}" != "x"; then
         LDFLAGS="-L${PNG_PREFIX} -L${PNG_PREFIX}/lib ${LDFLAGS}"
@@ -4173,7 +4195,10 @@ if test $ac_cv_lib_png_main = yes; then
 fi
 
       if test "x${PNG}" = "xyes"; then
-        FLAGS="-DHAVE_LIBPNG ${FLAGS}"
+        cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBPNG 1
+_ACEOF
+
         if test "x${PNG_PREFIX}" = "x"; then
           GMSH_LIBS="${GMSH_LIBS} -lpng"
         else
@@ -4193,14 +4218,20 @@ else
     GMSH_DIRS="${GMSH_DIRS} Post Plugin"
     GMSH_LIBS="${GMSH_LIBS} -lGmshPost -lGmshPlugin"
   else
-    FLAGS="-DHAVE_NO_POST ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_POST 1
+_ACEOF
+
   fi
 
   if test "x$enable_parser" != "xno"; then
     GMSH_DIRS="${GMSH_DIRS} Parser"
     GMSH_LIBS="${GMSH_LIBS} -lGmshParser"
   else
-    FLAGS="-DHAVE_NO_PARSER ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_PARSER 1
+_ACEOF
+
   fi
 
     GMSH_DIRS="${GMSH_DIRS} Numeric"
@@ -4423,7 +4454,10 @@ echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6; }
 if test $ac_cv_func_vsnprintf = yes; then
   :
 else
-  FLAGS="-DHAVE_NO_VSNPRINTF ${FLAGS}"
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_VSNPRINTF 1
+_ACEOF
+
 fi
 
 
@@ -4465,7 +4499,10 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	FLAGS="-DHAVE_NO_SOCKLEN_T ${FLAGS}"
+	cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_SOCKLEN_T 1
+_ACEOF
+
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -4497,7 +4534,10 @@ fi
     if test "x${ANN}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/ANN"
       GMSH_LIBS="${GMSH_LIBS} -lGmshANN"
-      FLAGS="-DHAVE_ANN ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_ANN 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains ANN, the"
       echo "  Approximate Nearest Neighbor library. ANN is available under"
@@ -4531,7 +4571,10 @@ if test $ac_cv_file___contrib_gmm_gmm_h = yes; then
 fi
 
     if test "x${GMM}" = "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_GMM"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_GMM 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the gmm++ mesh"
       echo "  partitioner. Gmm++ is available under the GNU LGPL."
@@ -4566,7 +4609,10 @@ fi
     if test "x${CHACO}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Chaco"
       GMSH_LIBS="${GMSH_LIBS} -lGmshChaco"
-      FLAGS="${FLAGS} -DHAVE_CHACO"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHACO 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the Chaco mesh"
       echo "  partitioner. Chaco is available under the GNU LGPL."
@@ -4601,7 +4647,10 @@ fi
     if test "x${METIS}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Metis"
       GMSH_LIBS="${GMSH_LIBS} -lGmshMetis"
-      FLAGS="${FLAGS} -DHAVE_METIS"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_METIS 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the METIS mesh"
       echo "  partitioner."
@@ -4638,7 +4687,10 @@ fi
     if test "x${NETGEN}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Netgen"
       GMSH_LIBS="${GMSH_LIBS} -lGmshNetgen"
-      FLAGS="-DHAVE_NETGEN ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_NETGEN 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the Netgen 3D"
       echo "  mesh generator. Netgen is available under the GNU LGPL."
@@ -4673,7 +4725,10 @@ fi
     if test "x${TETGEN}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Tetgen"
       GMSH_LIBS="${GMSH_LIBS} -lGmshTetgen"
-      FLAGS="-DHAVE_TETGEN ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_TETGEN 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the Tetgen 3D"
       echo "  mesh generator."
@@ -4710,7 +4765,10 @@ fi
     if test "x${MATHEVAL}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/MathEval"
       GMSH_LIBS="${GMSH_LIBS} -lGmshMathEval"
-      FLAGS="-DHAVE_MATH_EVAL ${FLAGS}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_MATH_EVAL 1
+_ACEOF
+
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains GNU MathEval."
       echo "  MathEval is available under the GNU GPL."
@@ -4800,12 +4858,15 @@ fi
     OCC_LIBS="${OCC_LIBS} -lTKBRep -lTKGeomBase -lTKG3d -lTKG2d"
     # FoundationClasses
     OCC_LIBS="${OCC_LIBS} -lTKAdvTools -lTKMath -lTKernel"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_OCC 1
+_ACEOF
+
     if test "x${OCC_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} ${OCC_LIBS}"
-      FLAGS="${FLAGS} -DHAVE_OCC"
     else
       GMSH_LIBS="${GMSH_LIBS} -L${OCC_PREFIX}/lib ${OCC_LIBS}"
-      FLAGS="${FLAGS} -DHAVE_OCC -I${OCC_PREFIX}/inc"
+      FLAGS="${FLAGS} -I${OCC_PREFIX}/inc"
     fi
   fi
 fi
@@ -4836,7 +4897,11 @@ if test `eval echo '${'$as_ac_File'}'` = yes; then
 fi
 
     if test "x${OMC}" = "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_OCC_MESH_CONSTRAINTS -I${OCC_MESH_CONTRAINTS_PREFIX}"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_OCC_MESH_CONSTRAINTS 1
+_ACEOF
+
+      FLAGS="${FLAGS} -I${OCC_MESH_CONTRAINTS_PREFIX}"
     fi
   fi
 fi
@@ -4982,12 +5047,15 @@ if test $ac_cv_lib_cgns_main = yes; then
 fi
 
   if test "x${CGNS}" = "xyes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBCGNS 1
+_ACEOF
+
     if test "x${CGNS_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lcgns"
-      FLAGS="${FLAGS} -DHAVE_LIBCGNS"
     else
       GMSH_LIBS="${GMSH_LIBS} -L${CGNS_PREFIX}/lib -lcgns"
-      FLAGS="${FLAGS} -DHAVE_LIBCGNS -I${CGNS_PREFIX}/include"
+      FLAGS="${FLAGS} -I${CGNS_PREFIX}/include"
     fi
   fi
 fi
@@ -5057,12 +5125,15 @@ if test $ac_cv_lib_med_main = yes; then
 fi
 
     if test "x${MED}" = "xyes"; then
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_MED 1
+_ACEOF
+
       if test "x${MED_PREFIX}" = "x"; then
         GMSH_LIBS="${GMSH_LIBS} -lmed"
-        FLAGS="${FLAGS} -DHAVE_MED"
       else
         GMSH_LIBS="${GMSH_LIBS} -L${MED_PREFIX}/lib -lmed"
-        FLAGS="${FLAGS} -DHAVE_MED -I${MED_PREFIX}/include"
+        FLAGS="${FLAGS} -I${MED_PREFIX}/include"
       fi
     fi
   fi
@@ -5079,7 +5150,10 @@ fi
 
 if test "x${ZLIB}" = "xyes"; then
     if test "x${FL_ZLIB}" = "xyes"; then
-    FLAGS="-DHAVE_LIBZ ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
   else
     FLAGS="-DHAVE_LIBZ ${FLAGS}"
     if test "x${ZLIB_PREFIX}" = "x"; then
@@ -5155,7 +5229,10 @@ if test $ac_cv_lib_gsl_main = yes; then
 fi
 
   if test "x${GSL}" = "xyes"; then
-    FLAGS="-DHAVE_GSL ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSL 1
+_ACEOF
+
     if test "x${GSL_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lgsl"
     else
@@ -5296,12 +5373,15 @@ fi
       { echo "$as_me:$LINENO: WARNING: Could not find FFTW3: disabling FourierModel." >&5
 echo "$as_me: WARNING: Could not find FFTW3: disabling FourierModel." >&2;}
     else
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_FOURIER_MODEL 1
+_ACEOF
+
       if test "x${FM_PREFIX}" = "x"; then
         GMSH_LIBS="${GMSH_LIBS} -lFourierModel"
-        FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}"
       else
         GMSH_LIBS="${GMSH_LIBS} -L${FM_PREFIX}/lib -lFourierModel"
-        FLAGS="-DHAVE_FOURIER_MODEL -I${FM_PREFIX} ${FLAGS}"
+        FLAGS="-I${FM_PREFIX} ${FLAGS}"
       fi
       if test "x${FFTW3_PREFIX}" = "x"; then
         GMSH_LIBS="${GMSH_LIBS} -lfftw3"
@@ -5449,11 +5529,17 @@ fi
 
 fi
 if test "x${CBLAS}" = "xyes"; then
-  FLAGS="${FLAGS} -DHAVE_CBLAS"
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_CBLAS 1
+_ACEOF
+
 else
   if test "x${GSL}" = "xyes"; then
         BLAS_LIBS="-lgslcblas"
-    FLAGS="${FLAGS} -DHAVE_CBLAS"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_CBLAS 1
+_ACEOF
+
   fi
 fi
 
@@ -5927,7 +6013,10 @@ fi
 
   fi
   if test "x${BLAS}" = "xyes"; then
-    FLAGS="${FLAGS} -DHAVE_BLAS"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLAS 1
+_ACEOF
+
     { echo "$as_me:$LINENO: checking for dbdsqr_ in -llapack" >&5
 echo $ECHO_N "checking for dbdsqr_ in -llapack... $ECHO_C" >&6; }
 if test "${ac_cv_lib_lapack_dbdsqr_+set}" = set; then
@@ -5994,7 +6083,10 @@ if test $ac_cv_lib_lapack_dbdsqr_ = yes; then
 fi
 
     if test "x${LAPACK}" = "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_LAPACK"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_LAPACK 1
+_ACEOF
+
     fi
   fi
 fi
@@ -6071,12 +6163,15 @@ if test $ac_cv_lib_mpi_cxx_main = yes; then
 fi
 
   if test "x${MPI}" = "xyes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_MPI 1
+_ACEOF
+
     if test "x${MPI_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lmpi_cxx -lmpi"
-      FLAGS="${FLAGS} -DHAVE_MPI"
     else
       GMSH_LIBS="${GMSH_LIBS} -L${MPI_PREFIX}/lib -lmpi_cxx -lmpi"
-      FLAGS="${FLAGS} -DHAVE_MPI -I${MPI_PREFIX}/include"
+      FLAGS="${FLAGS} -I${MPI_PREFIX}/include"
     fi
   fi
 fi
@@ -6088,7 +6183,10 @@ case "$UNAME" in
   CYGWIN* | MINGW*)
             LINKER="${LINKER} -mwindows -Wl,--stack,16777216"
     if test "x$enable_cygwin" != "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_NO_DLL"
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_DLL 1
+_ACEOF
+
     fi
     if test "x${OCC}" = "xyes"; then
       GMSH_LIBS="${GMSH_LIBS} -lwinspool -lws2_32"
@@ -6099,7 +6197,10 @@ case "$UNAME" in
     ;;
 
   Darwin*)
-    FLAGS="-DHAVE_NO_DLL ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_DLL 1
+_ACEOF
+
     if test "x$enable_universal" = "xyes"; then
       FLAGS="-arch ppc -arch i386 ${FLAGS}"
     fi
@@ -6109,7 +6210,11 @@ case "$UNAME" in
     ;;
 
   AIX*)
-    FLAGS="-D_BSD -DHAVE_NO_DLL ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_DLL 1
+_ACEOF
+
+    FLAGS="-D_BSD ${FLAGS}"
     ;;
 
   IRIX*)
@@ -6123,7 +6228,10 @@ case "$UNAME" in
     ;;
 
   OSF1*)
-    FLAGS="-DHAVE_NO_SOCKLEN_T ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_SOCKLEN_T 1
+_ACEOF
+
         case "${CXX}" in
       *cxx*)
         FLAGS="-D__USE_STD_IOSTREAM ${FLAGS}"
@@ -6132,12 +6240,18 @@ case "$UNAME" in
     ;;
 
   SunOS*)
-    FLAGS="-DHAVE_NO_DLL ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_DLL 1
+_ACEOF
+
     GMSH_LIBS="${GMSH_LIBS} -lsocket -lnsl -ldl"
     ;;
 
   HP-UX*)
-    FLAGS="-DHAVE_NO_DLL ${FLAGS}"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_NO_DLL 1
+_ACEOF
+
     ;;
 
 esac
@@ -7184,13 +7298,19 @@ if test $ac_cv_sizeof_size_t != 4; then
     { echo "$as_me:$LINENO: WARNING: Unsupported size of size_t - this may affect FNV hashing." >&5
 echo "$as_me: WARNING: Unsupported size of size_t - this may affect FNV hashing." >&2;}
   else
-    FLAGS="${FLAGS} -DHAVE_64BIT_SIZE_T"
+    cat >>confdefs.h <<\_ACEOF
+#define HAVE_64BIT_SIZE_T 1
+_ACEOF
+
     if test "x${OCC}" = "xyes"; then
       FLAGS="${FLAGS} -D_OCC64"
     fi
   fi
 fi
 
+ac_config_headers="$ac_config_headers Common/GmshConfig.h:Common/GmshConfig.h.in"
+
+
 
 
 
@@ -7279,37 +7399,7 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
 # Let make expand exec_prefix.
 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-t clear
-:clear
-s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
-	g
-	s/^\n//
-	s/\n/ /g
-	p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
+DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
@@ -7644,6 +7734,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
 config_files="$ac_config_files"
+config_headers="$ac_config_headers"
 
 _ACEOF
 
@@ -7661,10 +7752,15 @@ Usage: $0 [OPTIONS] [FILE]...
       --recheck    update $as_me by reconfiguring in the same conditions
   --file=FILE[:TEMPLATE]
 		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
 
+Configuration headers:
+$config_headers
+
 Report bugs to <bug-autoconf@gnu.org>."
 
 _ACEOF
@@ -7713,7 +7809,16 @@ do
     $ac_shift
     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     ac_need_defaults=false;;
-  --he | --h |  --help | --hel | -h )
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
     echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
@@ -7768,6 +7873,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
+    "Common/GmshConfig.h") CONFIG_HEADERS="$CONFIG_HEADERS Common/GmshConfig.h:Common/GmshConfig.h.in" ;;
     "variables") CONFIG_FILES="$CONFIG_FILES variables" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -7783,6 +7889,7 @@ done
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -7954,7 +8061,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF
 fi # test -n "$CONFIG_FILES"
 
 
-for ac_tag in  :F $CONFIG_FILES
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS
 do
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
@@ -8189,7 +8296,104 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
   esac
  ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status.  If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless.  But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+ac_dB='\\)[	 (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+  sed -n '
+	t rset
+	:rset
+	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+	t ok
+	d
+	:ok
+	s/[\\&,]/\\&/g
+	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+  ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[	 #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+  # Write a here document:
+    cat >>$CONFIG_STATUS <<_ACEOF
+    # First, check the format of the line:
+    cat >"\$tmp/defines.sed" <<\\CEOF
+/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+b
+:def
+_ACEOF
+  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+  grep . conftest.tail >/dev/null || break
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
 
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+  if test x"$ac_file" != x-; then
+    echo "/* $configure_input  */" >"$tmp/config.h"
+    cat "$ac_result" >>"$tmp/config.h"
+    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f $ac_file
+      mv "$tmp/config.h" $ac_file
+    fi
+  else
+    echo "/* $configure_input  */"
+    cat "$ac_result"
+  fi
+  rm -f "$tmp/out12"
+ ;;
 
 
   esac
@@ -8232,7 +8436,6 @@ echo "  - C compiler   : $CC"
 echo "  - C++ compiler : $CXX"
 echo "  - Linker       : $LINKER"
 echo "  - Optimization : $OPTIM"
-echo "  - Options      : $FLAGS"
 echo "********************************************************************"
-echo "To fine-tune the configuration, edit the 'variables' file"
+echo "Edit 'variables' and 'Common/GmshConfig.h' to fine-tune the config"
 echo "********************************************************************"
diff --git a/configure.in b/configure.in
index 300de225871cd107ba8db75f79f816d6f5c6d6d4..a16c4525dad364bbc076755c42340c4ad2b98146 100644
--- a/configure.in
+++ b/configure.in
@@ -240,7 +240,7 @@ if test "x$enable_gui" != "xno"; then
   GMSH_DIRS="Common Geo Mesh Post Plugin Numeric Parser Graphics Fltk"
   GMSH_LIBS="-Llib -lGmshFltk -lGmshCommon -lGmshMesh -lGmshGeo -lGmshPost -lGmshPlugin"
   GMSH_LIBS="${GMSH_LIBS} -lGmshCommon -lGmshGraphics -lGmshParser -lGmshNumeric"
-  FLAGS="-DHAVE_FLTK ${FLAGS}"
+  AC_DEFINE(HAVE_FLTK)
 
   if test "x${FLTK_PREFIX}" != "x" ; then
     AC_PATH_PROG(FLTKCONFIG,fltk-config,[],[${FLTK_PREFIX}:${FLTK_PREFIX}/bin:$PATH])
@@ -269,7 +269,7 @@ if test "x$enable_gui" != "xno"; then
         test "x${UNAME}" != "xLinux" -a "x$enable_native_file_chooser" != "xno"); then
        GMSH_DIRS="${GMSH_DIRS} contrib/NativeFileChooser"
        GMSH_LIBS="${GMSH_LIBS} -lGmshNativeFileChooser"
-       FLAGS="-DHAVE_NATIVE_FILE_CHOOSER ${FLAGS}"
+       AC_DEFINE(HAVE_NATIVE_FILE_CHOOSER)
     fi
   fi
 
@@ -279,13 +279,14 @@ if test "x$enable_gui" != "xno"; then
     if test "x${TREEBROWSER}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/TreeBrowser"
       GMSH_LIBS="${GMSH_LIBS} -lGmshTreeBrowser"
-      FLAGS="-DHAVE_TREE_BROWSER ${FLAGS}"
+      AC_DEFINE(HAVE_TREE_BROWSER)
     fi
   fi
 
   if test "x${OSMESA}" = "xyes"; then
     GMSH_LIBS="${GMSH_LIBS} `$FLTKCONFIG --use-images --ldflags` -lfltk_gl"
-    FLAGS="${FLAGS} -DHAVE_OSMESA `$FLTKCONFIG --use-images --cxxflags`"
+    FLAGS="${FLAGS} `$FLTKCONFIG --use-images --cxxflags`"
+    AC_DEFINE(HAVE_OSMESA)
     if test "x${OSMESA_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lOSMesa -lGL -lGLU"
     else
@@ -313,14 +314,14 @@ if test "x$enable_gui" != "xno"; then
   if test "x$enable_jpeg" != "xno"; then
     dnl If provided by FLTK, use that one; otherwise, look for it
     if test "x${FL_JPEG}" = "xyes"; then
-      FLAGS="-DHAVE_LIBJPEG ${FLAGS}"
+      AC_DEFINE(HAVE_LIBJPEG)
     else      
       if test "x${JPEG_PREFIX}" != "x"; then
         LDFLAGS="-L${JPEG_PREFIX} -L${JPEG_PREFIX}/lib ${LDFLAGS}"
       fi
       AC_CHECK_LIB(jpeg,main,JPEG="yes")
       if test "x${JPEG}" = "xyes"; then
-        FLAGS="-DHAVE_LIBJPEG ${FLAGS}"
+        AC_DEFINE(HAVE_LIBJPEG)
         if test "x${JPEG_PREFIX}" = "x"; then
           GMSH_LIBS="${GMSH_LIBS} -ljpeg"
         else
@@ -349,14 +350,14 @@ if test "x$enable_gui" != "xno"; then
   if test "x$enable_png" != "xno" -a "x${ZLIB}" = "xyes"; then
     dnl If provided by FLTK, use that one; otherwise, look for it
     if test "x${FL_PNG}" = "xyes"; then
-      FLAGS="-DHAVE_LIBPNG ${FLAGS}"
+      AC_DEFINE(HAVE_LIBPNG)
     else
       if test "x${PNG_PREFIX}" != "x"; then
         LDFLAGS="-L${PNG_PREFIX} -L${PNG_PREFIX}/lib ${LDFLAGS}"
       fi
       AC_CHECK_LIB(png,main,PNG="yes")
       if test "x${PNG}" = "xyes"; then
-        FLAGS="-DHAVE_LIBPNG ${FLAGS}"
+        AC_DEFINE(HAVE_LIBPNG)
         if test "x${PNG_PREFIX}" = "x"; then
           GMSH_LIBS="${GMSH_LIBS} -lpng"
         else
@@ -377,14 +378,14 @@ else
     GMSH_DIRS="${GMSH_DIRS} Post Plugin"
     GMSH_LIBS="${GMSH_LIBS} -lGmshPost -lGmshPlugin"
   else
-    FLAGS="-DHAVE_NO_POST ${FLAGS}"
+    AC_DEFINE(HAVE_NO_POST)
   fi
 
   if test "x$enable_parser" != "xno"; then
     GMSH_DIRS="${GMSH_DIRS} Parser"
     GMSH_LIBS="${GMSH_LIBS} -lGmshParser"
   else
-    FLAGS="-DHAVE_NO_PARSER ${FLAGS}"
+    AC_DEFINE(HAVE_NO_PARSER)
   fi
 
   dnl re-add Common to work around linker shortcomings on some archs
@@ -406,13 +407,13 @@ dnl added to $LIBS, used for further checks)
 AC_CHECK_LIB(m,main)
 
 dnl Check for various functions
-AC_CHECK_FUNC(vsnprintf,[],FLAGS="-DHAVE_NO_VSNPRINTF ${FLAGS}")
+AC_CHECK_FUNC(vsnprintf,[],AC_DEFINE(HAVE_NO_VSNPRINTF))
 
 dnl Check if Unix98 socklen_t type is available
 AC_TRY_COMPILE(
   [#include <sys/types.h>
    #include <sys/socket.h>],
-  [socklen_t len = 42; return 0;],,FLAGS="-DHAVE_NO_SOCKLEN_T ${FLAGS}")
+  [socklen_t len = 42; return 0;],,AC_DEFINE(HAVE_NO_SOCKLEN_T))
 
 dnl Check if we should consider the packages in contrib
 if test "x$enable_contrib" != "xno"; then
@@ -423,7 +424,7 @@ if test "x$enable_contrib" != "xno"; then
     if test "x${ANN}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/ANN"
       GMSH_LIBS="${GMSH_LIBS} -lGmshANN"
-      FLAGS="-DHAVE_ANN ${FLAGS}"
+      AC_DEFINE(HAVE_ANN)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains ANN, the"
       echo "  Approximate Nearest Neighbor library. ANN is available under"
@@ -438,7 +439,7 @@ if test "x$enable_contrib" != "xno"; then
   if test "x$enable_gmm" != "xno"; then
     AC_CHECK_FILE(./contrib/gmm/gmm.h,GMM="yes")
     if test "x${GMM}" = "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_GMM"
+      AC_DEFINE(HAVE_GMM)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the gmm++ mesh"
       echo "  partitioner. Gmm++ is available under the GNU LGPL."
@@ -454,7 +455,7 @@ if test "x$enable_contrib" != "xno"; then
     if test "x${CHACO}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Chaco"
       GMSH_LIBS="${GMSH_LIBS} -lGmshChaco"
-      FLAGS="${FLAGS} -DHAVE_CHACO"
+      AC_DEFINE(HAVE_CHACO)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the Chaco mesh"
       echo "  partitioner. Chaco is available under the GNU LGPL."
@@ -470,7 +471,7 @@ if test "x$enable_contrib" != "xno"; then
     if test "x${METIS}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Metis"
       GMSH_LIBS="${GMSH_LIBS} -lGmshMetis"
-      FLAGS="${FLAGS} -DHAVE_METIS"
+      AC_DEFINE(HAVE_METIS)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the METIS mesh"
       echo "  partitioner."
@@ -488,7 +489,7 @@ if test "x$enable_contrib" != "xno"; then
     if test "x${NETGEN}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Netgen"
       GMSH_LIBS="${GMSH_LIBS} -lGmshNetgen"
-      FLAGS="-DHAVE_NETGEN ${FLAGS}"
+      AC_DEFINE(HAVE_NETGEN)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the Netgen 3D"
       echo "  mesh generator. Netgen is available under the GNU LGPL."
@@ -504,7 +505,7 @@ if test "x$enable_contrib" != "xno"; then
     if test "x${TETGEN}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/Tetgen"
       GMSH_LIBS="${GMSH_LIBS} -lGmshTetgen"
-      FLAGS="-DHAVE_TETGEN ${FLAGS}"
+      AC_DEFINE(HAVE_TETGEN)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains the Tetgen 3D"
       echo "  mesh generator."
@@ -522,7 +523,7 @@ if test "x$enable_contrib" != "xno"; then
     if test "x${MATHEVAL}" = "xyes"; then
       GMSH_DIRS="${GMSH_DIRS} contrib/MathEval"
       GMSH_LIBS="${GMSH_LIBS} -lGmshMathEval"
-      FLAGS="-DHAVE_MATH_EVAL ${FLAGS}"
+      AC_DEFINE(HAVE_MATH_EVAL)
       echo "********************************************************************"
       echo "  You are building a version of Gmsh that contains GNU MathEval."
       echo "  MathEval is available under the GNU GPL."
@@ -555,12 +556,12 @@ if test "x$enable_occ" = "xyes"; then
     OCC_LIBS="${OCC_LIBS} -lTKBRep -lTKGeomBase -lTKG3d -lTKG2d"
     # FoundationClasses
     OCC_LIBS="${OCC_LIBS} -lTKAdvTools -lTKMath -lTKernel"
+    AC_DEFINE(HAVE_OCC)
     if test "x${OCC_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} ${OCC_LIBS}"
-      FLAGS="${FLAGS} -DHAVE_OCC"
     else
       GMSH_LIBS="${GMSH_LIBS} -L${OCC_PREFIX}/lib ${OCC_LIBS}"
-      FLAGS="${FLAGS} -DHAVE_OCC -I${OCC_PREFIX}/inc"
+      FLAGS="${FLAGS} -I${OCC_PREFIX}/inc"
     fi
   fi
 fi
@@ -570,7 +571,8 @@ if test "x${OCC}" = "xyes"; then
   if test "x${OCC_MESH_CONTRAINTS_PREFIX}" != "x"; then
     AC_CHECK_FILE(${OCC_MESH_CONTRAINTS_PREFIX}/MeshGmsh_Constrain.hxx,OMC="yes")
     if test "x${OMC}" = "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_OCC_MESH_CONSTRAINTS -I${OCC_MESH_CONTRAINTS_PREFIX}"
+      AC_DEFINE(HAVE_OCC_MESH_CONSTRAINTS)
+      FLAGS="${FLAGS} -I${OCC_MESH_CONTRAINTS_PREFIX}"
     fi
   fi
 fi
@@ -602,12 +604,12 @@ if test "x$enable_cgns" = "xyes"; then
   fi
   AC_CHECK_LIB(cgns,main,CGNS="yes")
   if test "x${CGNS}" = "xyes"; then
+    AC_DEFINE(HAVE_LIBCGNS)
     if test "x${CGNS_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lcgns"
-      FLAGS="${FLAGS} -DHAVE_LIBCGNS"
     else
       GMSH_LIBS="${GMSH_LIBS} -L${CGNS_PREFIX}/lib -lcgns"
-      FLAGS="${FLAGS} -DHAVE_LIBCGNS -I${CGNS_PREFIX}/include"
+      FLAGS="${FLAGS} -I${CGNS_PREFIX}/include"
     fi
   fi
 fi
@@ -620,12 +622,12 @@ if test "x${HDF5}" = "xyes"; then
     fi
     AC_CHECK_LIB(med,main,MED="yes")
     if test "x${MED}" = "xyes"; then
+      AC_DEFINE(HAVE_MED)
       if test "x${MED_PREFIX}" = "x"; then
         GMSH_LIBS="${GMSH_LIBS} -lmed"
-        FLAGS="${FLAGS} -DHAVE_MED"
       else
         GMSH_LIBS="${GMSH_LIBS} -L${MED_PREFIX}/lib -lmed"
-        FLAGS="${FLAGS} -DHAVE_MED -I${MED_PREFIX}/include"
+        FLAGS="${FLAGS} -I${MED_PREFIX}/include"
       fi
     fi
   fi
@@ -646,7 +648,7 @@ dnl libhdf5)
 if test "x${ZLIB}" = "xyes"; then
   dnl If provided by FLTK, use that one; otherwise, look for it
   if test "x${FL_ZLIB}" = "xyes"; then
-    FLAGS="-DHAVE_LIBZ ${FLAGS}"
+    AC_DEFINE(HAVE_LIBZ)
   else
     FLAGS="-DHAVE_LIBZ ${FLAGS}"
     if test "x${ZLIB_PREFIX}" = "x"; then
@@ -667,7 +669,7 @@ if test "x$enable_gsl" != "xno"; then
   fi
   AC_CHECK_LIB(gsl,main,GSL="yes",[],-lgslcblas)
   if test "x${GSL}" = "xyes"; then
-    FLAGS="-DHAVE_GSL ${FLAGS}"
+    AC_DEFINE(HAVE_GSL)
     if test "x${GSL_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lgsl"
     else
@@ -693,12 +695,12 @@ if test "x$enable_fm" != "xno"; then
       FM=no
       AC_MSG_WARN([Could not find FFTW3: disabling FourierModel.])
     else
+      AC_DEFINE(HAVE_FOURIER_MODEL)
       if test "x${FM_PREFIX}" = "x"; then
         GMSH_LIBS="${GMSH_LIBS} -lFourierModel"
-        FLAGS="-DHAVE_FOURIER_MODEL ${FLAGS}"
       else
         GMSH_LIBS="${GMSH_LIBS} -L${FM_PREFIX}/lib -lFourierModel"
-        FLAGS="-DHAVE_FOURIER_MODEL -I${FM_PREFIX} ${FLAGS}"
+        FLAGS="-I${FM_PREFIX} ${FLAGS}"
       fi
       if test "x${FFTW3_PREFIX}" = "x"; then
         GMSH_LIBS="${GMSH_LIBS} -lfftw3"
@@ -719,12 +721,12 @@ if test "x${CBLAS}" != "xyes"; then
   AC_CHECK_LIB(cblas,cblas_dgemm,CBLAS="yes" BLAS_LIBS="-lcblas -latlas",[],-latlas)
 fi
 if test "x${CBLAS}" = "xyes"; then
-  FLAGS="${FLAGS} -DHAVE_CBLAS"
+  AC_DEFINE(HAVE_CBLAS)
 else 
   if test "x${GSL}" = "xyes"; then
     dnl use unoptimized gsl version
     BLAS_LIBS="-lgslcblas"
-    FLAGS="${FLAGS} -DHAVE_CBLAS"
+    AC_DEFINE(HAVE_CBLAS)
   fi
 fi
 
@@ -751,11 +753,11 @@ if test "x${FM}" = "xyes" -o "x${GSL}" != "xyes"; then
     AC_CHECK_LIB(blas,dgemm_,[BLAS="yes" BLAS_LIBS="${BLAS_LIBS} -lblas"])
   fi
   if test "x${BLAS}" = "xyes"; then
-    FLAGS="${FLAGS} -DHAVE_BLAS"
+    AC_DEFINE(HAVE_BLAS)
     AC_CHECK_LIB(lapack,dbdsqr_,
       [LAPACK="yes" BLAS_LIBS="-llapack ${BLAS_LIBS}"],[],${BLAS_LIBS})
     if test "x${LAPACK}" = "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_LAPACK"
+      AC_DEFINE(HAVE_LAPACK)
     fi
   fi
 fi
@@ -775,12 +777,12 @@ if test "x$enable_mpi" = "xyes"; then
   fi
   AC_CHECK_LIB(mpi_cxx,main,MPI="yes")
   if test "x${MPI}" = "xyes"; then
+    AC_DEFINE(HAVE_MPI)
     if test "x${MPI_PREFIX}" = "x"; then
       GMSH_LIBS="${GMSH_LIBS} -lmpi_cxx -lmpi"
-      FLAGS="${FLAGS} -DHAVE_MPI"
     else
       GMSH_LIBS="${GMSH_LIBS} -L${MPI_PREFIX}/lib -lmpi_cxx -lmpi"
-      FLAGS="${FLAGS} -DHAVE_MPI -I${MPI_PREFIX}/include"
+      FLAGS="${FLAGS} -I${MPI_PREFIX}/include"
     fi
   fi
 fi
@@ -796,7 +798,7 @@ case "$UNAME" in
     dnl recursive tet classification for large 3D Delaunay grids
     LINKER="${LINKER} -mwindows -Wl,--stack,16777216"
     if test "x$enable_cygwin" != "xyes"; then
-      FLAGS="${FLAGS} -DHAVE_NO_DLL"
+      AC_DEFINE(HAVE_NO_DLL)
     fi
     if test "x${OCC}" = "xyes"; then
       GMSH_LIBS="${GMSH_LIBS} -lwinspool -lws2_32"
@@ -807,7 +809,7 @@ case "$UNAME" in
     ;;
 
   Darwin*)
-    FLAGS="-DHAVE_NO_DLL ${FLAGS}"
+    AC_DEFINE(HAVE_NO_DLL)
     if test "x$enable_universal" = "xyes"; then
       FLAGS="-arch ppc -arch i386 ${FLAGS}"
     fi
@@ -817,7 +819,8 @@ case "$UNAME" in
     ;;
 
   AIX*)
-    FLAGS="-D_BSD -DHAVE_NO_DLL ${FLAGS}"
+    AC_DEFINE(HAVE_NO_DLL)
+    FLAGS="-D_BSD ${FLAGS}"
     ;;
 
   IRIX*)
@@ -834,7 +837,7 @@ case "$UNAME" in
     ;;
 
   OSF1*)
-    FLAGS="-DHAVE_NO_SOCKLEN_T ${FLAGS}"
+    AC_DEFINE(HAVE_NO_SOCKLEN_T)
     dnl options for native DEC compiler
     case "${CXX}" in
       *cxx*)
@@ -844,12 +847,12 @@ case "$UNAME" in
     ;;
 
   SunOS*)
-    FLAGS="-DHAVE_NO_DLL ${FLAGS}"
+    AC_DEFINE(HAVE_NO_DLL)
     GMSH_LIBS="${GMSH_LIBS} -lsocket -lnsl -ldl"
     ;;
 
   HP-UX*)
-    FLAGS="-DHAVE_NO_DLL ${FLAGS}"
+    AC_DEFINE(HAVE_NO_DLL)
     ;;
 
 esac
@@ -860,13 +863,15 @@ if test $ac_cv_sizeof_size_t != 4; then
   if test $ac_cv_sizeof_size_t != 8; then
     AC_MSG_WARN([Unsupported size of size_t - this may affect FNV hashing.])
   else
-    FLAGS="${FLAGS} -DHAVE_64BIT_SIZE_T"
+    AC_DEFINE(HAVE_64BIT_SIZE_T)
     if test "x${OCC}" = "xyes"; then
       FLAGS="${FLAGS} -D_OCC64"
     fi
   fi
 fi
 
+AC_CONFIG_HEADER(Common/GmshConfig.h:Common/GmshConfig.h.in)
+
 dnl Write output
 AC_SUBST(UNAME)
 AC_SUBST(HOSTNAME)
@@ -887,7 +892,6 @@ echo "  - C compiler   : $CC"
 echo "  - C++ compiler : $CXX"
 echo "  - Linker       : $LINKER"
 echo "  - Optimization : $OPTIM"
-echo "  - Options      : $FLAGS"
 echo "********************************************************************"
-echo "To fine-tune the configuration, edit the 'variables' file"
+echo "Edit 'variables' and 'Common/GmshConfig.h' to fine-tune the config"
 echo "********************************************************************"
diff --git a/doc/FAQ.txt b/doc/FAQ.txt
index 2ab3897f0a2cd46623266995b2e5dea1aadb6cbb..632e7586548f1cfb62bca2b04a7aa985d761f329 100644
--- a/doc/FAQ.txt
+++ b/doc/FAQ.txt
@@ -1,4 +1,4 @@
-$Id: FAQ.txt,v 1.1 2008-07-11 15:55:52 geuzaine Exp $
+$Id: FAQ.txt,v 1.2 2009-01-08 23:58:20 geuzaine Exp $
 
 This is the Gmsh FAQ
 
@@ -59,10 +59,8 @@ with OpenGL support; freely available from http://www.fltk.org).
 
 * 2.4 How do I compile Gmsh?
 
-Just type './configure; make; make install'. If you change some
-configuration options (type './configure --help' to get the list of
-all available choices), don't forget to do 'make clean' before
-rebuilding Gmsh.
+Just type './configure; make; make install'. (Type './configure
+--help' to get the list of all configuration options.)
 
 ********************************************************************