From e992dafb03964729fc3a6dcdc21a305cbae893da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Remacle=20=28students=29?= <jean-francois.remacle@uclouvain.be> Date: Mon, 15 Jun 2009 12:16:00 +0000 Subject: [PATCH] Geometry-mesh matching and oriented bounding boxes for the entities (Bastien). --- Common/CommandLine.cpp | 8 + Common/Context.h | 1 + Common/DefaultOptions.h | 3 + Common/OpenFile.cpp | 15 + Common/Options.cpp | 7 + Common/Options.h | 2 + Fltk/optionWindow.h | 2 +- Geo/GEdge.cpp | 33 + Geo/GEdge.h | 3 + Geo/GEntity.cpp | 2 +- Geo/GEntity.h | 7 + Geo/GFace.cpp | 51 ++ Geo/GFace.h | 3 + Geo/GModel.cpp | 1 - Geo/GModelIO_OCC.cpp | 1 + Geo/GRegion.cpp | 52 ++ Geo/GRegion.h | 3 + Geo/GeomMeshMatcher.cpp | 455 +++++++++++ Geo/GeomMeshMatcher.h | 39 + Geo/Makefile | 187 +++-- Geo/SOrientedBoundingBox.cpp | 540 +++++++++++++ Geo/SOrientedBoundingBox.h | 89 ++ Graphics/drawGeom.cpp | 7 +- Graphics/drawGlyph.cpp | 1 + Makefile | 1 + configure | 1479 +++++++++++++++++++++++++--------- 26 files changed, 2506 insertions(+), 486 deletions(-) create mode 100644 Geo/GeomMeshMatcher.cpp create mode 100644 Geo/GeomMeshMatcher.h create mode 100644 Geo/SOrientedBoundingBox.cpp create mode 100644 Geo/SOrientedBoundingBox.h diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp index d173cc4983..9c52ec88ea 100644 --- a/Common/CommandLine.cpp +++ b/Common/CommandLine.cpp @@ -61,6 +61,7 @@ void PrintUsage(const char *name) Msg::Direct("Geometry options:"); Msg::Direct(" -0 Output unrolled geometry, then exit"); Msg::Direct(" -tol float Set geometrical tolerance"); + Msg::Direct(" -match int Match geometries and meshes if int != 0"); Msg::Direct("Mesh options:"); Msg::Direct(" -1, -2, -3 Perform 1D, 2D or 3D mesh generation, then exit"); Msg::Direct(" -refine Perform uniform mesh refinement, then exit"); @@ -295,6 +296,13 @@ void GetOptions(int argc, char *argv[]) else Msg::Fatal("Missing number"); } + else if(!strcmp(argv[i] + 1, "match")) { + i++; + if(argv[1]) + CTX::instance()->geom.matchGeomAndMesh = atoi(argv[i++]); + else + Msg::Fatal("Missing number"); + } else if(!strcmp(argv[i] + 1, "scale")) { i++; if(argv[i]) diff --git a/Common/Context.h b/Common/Context.h index 01c9db6a97..c432b714dc 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -158,6 +158,7 @@ class CTX { double tolerance, snap[3], transform[3][3], offset[3]; int occFixSmallEdges, occFixSmallFaces, occSewFaces, occConnectFaces; int copyMeshingMethod, exactExtrusion; + int matchGeomAndMesh; } geom; // mesh options struct { diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index fbbb2590b4..3989d0ed07 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -829,6 +829,9 @@ StringXNumber GeometryOptions_Number[] = { { F|O, "LineWidth" , opt_geometry_line_width , 2. , "Display width of lines (in pixels)" }, + { F|O, "MatchGeomAndMesh" , opt_geometry_match_geom_and_mesh, 0 , + "Matches geometries and meshes." }, + { F|O, "Normals" , opt_geometry_normals , 0. , "Display size of normal vectors (in pixels)" }, { F|O, "NumSubEdges" , opt_geometry_num_sub_edges , 20. , diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 4c03d8b580..bcc5da6f5a 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -10,12 +10,14 @@ #include "GModel.h" #include "Numeric.h" #include "HighOrder.h" + #include "Context.h" #include "OpenFile.h" #include "CommandLine.h" #include "ReadImg.h" #include "OS.h" #include "StringUtils.h" +#include "GeomMeshMatcher.h" #if !defined(HAVE_NO_PARSER) #include "Parser.h" @@ -332,6 +334,19 @@ int MergeFile(std::string fileName, bool warnIfMissing) if(!strncmp(header, "$PTS", 4) || !strncmp(header, "$NO", 3) || !strncmp(header, "$PARA", 5) || !strncmp(header, "$ELM", 4) || !strncmp(header, "$MeshFormat", 11) || !strncmp(header, "$Comments", 9)) { + + // MATCHER + if(CTX::instance()->geom.matchGeomAndMesh && !GModel::current()->empty() ) { + GModel* tmp_model = new GModel(); + tmp_model->readMSH(fileName); + //tmp_model->scaleMesh(1000); + int match_status = GeomMeshMatcher::instance()->match(GModel::current(), tmp_model); + if (match_status) + fileName = "out.msh"; + delete tmp_model; + } + // MATCHER END + status = GModel::current()->readMSH(fileName); #if !defined(HAVE_NO_POST) if(status > 1) status = PView::readMSH(fileName); diff --git a/Common/Options.cpp b/Common/Options.cpp index 93d0ae9d7b..893e5902f8 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -4711,6 +4711,13 @@ double opt_geometry_exact_extrusion(OPT_ARGS_NUM) return CTX::instance()->geom.exactExtrusion; } +double opt_geometry_match_geom_and_mesh(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX::instance()->geom.matchGeomAndMesh = (int)val; + return CTX::instance()->geom.matchGeomAndMesh; +} + double opt_mesh_optimize(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index 90a76826a7..a32bef8270 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -292,6 +292,7 @@ double opt_general_orthographic(OPT_ARGS_NUM); double opt_general_mouse_selection(OPT_ARGS_NUM); double opt_general_mouse_hover_meshes(OPT_ARGS_NUM); double opt_general_draw_bounding_box(OPT_ARGS_NUM); +double opt_general_draw_oriented_bounding_box(OPT_ARGS_NUM); double opt_general_fast_redraw(OPT_ARGS_NUM); double opt_general_xmin(OPT_ARGS_NUM); double opt_general_xmax(OPT_ARGS_NUM); @@ -435,6 +436,7 @@ double opt_geometry_snap2(OPT_ARGS_NUM); double opt_geometry_clip(OPT_ARGS_NUM); double opt_geometry_copy_meshing_method(OPT_ARGS_NUM); double opt_geometry_exact_extrusion(OPT_ARGS_NUM); +double opt_geometry_match_geom_and_mesh(OPT_ARGS_NUM); double opt_mesh_label_frequency(OPT_ARGS_NUM); double opt_mesh_optimize(OPT_ARGS_NUM); double opt_mesh_optimize_netgen(OPT_ARGS_NUM); diff --git a/Fltk/optionWindow.h b/Fltk/optionWindow.h index ff3a126c7f..bce08dba9c 100644 --- a/Fltk/optionWindow.h +++ b/Fltk/optionWindow.h @@ -30,7 +30,7 @@ class optionWindow{ Fl_Return_Button *redraw; struct{ Fl_Group *group; - Fl_Check_Button *butt[20]; + Fl_Check_Button *butt[21]; Fl_Button *push[20]; Fl_Value_Input *value[50]; Fl_Button *color[50]; diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp index b96ace6065..501e63cd03 100644 --- a/Geo/GEdge.cpp +++ b/Geo/GEdge.cpp @@ -107,6 +107,39 @@ SBoundingBox3d GEdge::bounds() const return bbox; } +SOrientedBoundingBox* GEdge::getOBB() { + if (!(this->_obb)) { + vector<SPoint3> vertices; + if(this->getNumMeshVertices() > 0) { + int N = this->getNumMeshVertices(); + for (int i = 0; i < N; i++) { + MVertex* mv = this->getMeshVertex(i); + vertices.push_back(mv->point()); + } + // Don't forget to add the first and last vertices... + SPoint3 pt1(this->getBeginVertex()->x(),this->getBeginVertex()->y(),this->getBeginVertex()->z()); + SPoint3 pt2(this->getEndVertex()->x(),this->getEndVertex()->y(),this->getEndVertex()->z()); + vertices.push_back(pt1); + vertices.push_back(pt2); + } else if(geomType() != DiscreteCurve && geomType() != BoundaryLayerCurve){ + Range<double> tr = this->parBounds(0); + // N can be choosen arbitrarily, but 10 points seems reasonable + int N = 10; + for (int i = 0; i < N; i++) { + double t = tr.low() + (double)i / (double)(N-1)*(tr.high() - tr.low()); + GPoint p = point(t); + SPoint3 pt(p.x(),p.y(),p.z()); + vertices.push_back(pt); + } + } else { + SPoint3 dummy(0,0,0); + vertices.push_back(dummy); + } + this->_obb = SOrientedBoundingBox::buildOBB(vertices); + } + return (this->_obb); +} + void GEdge::setVisibility(char val, bool recursive) { GEntity::setVisibility(val); diff --git a/Geo/GEdge.h b/Geo/GEdge.h index d2fa6720a5..fc5695b8ef 100644 --- a/Geo/GEdge.h +++ b/Geo/GEdge.h @@ -61,6 +61,9 @@ class GEdge : public GEntity { // get the bounding box virtual SBoundingBox3d bounds() const; + // get the oriented bounding box + virtual SOrientedBoundingBox* getOBB(); + // faces that this entity bounds virtual std::list<GFace*> faces() const { return l_faces; } diff --git a/Geo/GEntity.cpp b/Geo/GEntity.cpp index 80970a60f9..b3cad39c42 100644 --- a/Geo/GEntity.cpp +++ b/Geo/GEntity.cpp @@ -17,7 +17,7 @@ GEntity::GEntity(GModel *m, int t) : _model(m), _tag(t), _visible(1), _selection(0), - _allElementsVisible(1), va_lines(0), va_triangles(0) + _allElementsVisible(1), va_lines(0), va_triangles(0), _obb(0) { _color = CTX::instance()->packColor(0, 0, 255, 0); } diff --git a/Geo/GEntity.h b/Geo/GEntity.h index 03cac86fe1..f8634f1945 100644 --- a/Geo/GEntity.h +++ b/Geo/GEntity.h @@ -12,6 +12,7 @@ #include "Range.h" #include "SPoint3.h" #include "SBoundingBox3d.h" +#include "SOrientedBoundingBox.h" class GModel; class GVertex; @@ -40,6 +41,9 @@ class GEntity { // the color of the entity (ignored if set to transparent blue) unsigned int _color; + protected: + SOrientedBoundingBox *_obb; + public: // these will become protected at some point // the mesh vertices uniquely owned by the entity std::vector<MVertex*> mesh_vertices; @@ -207,6 +211,9 @@ class GEntity { // get the bounding box virtual SBoundingBox3d bounds() const { return SBoundingBox3d(); } + // get the oriented bounding box + virtual SOrientedBoundingBox* getOBB() {return new SOrientedBoundingBox(); } + // get/set the visibility flag virtual char getVisibility(); virtual void setVisibility(char val, bool recursive=false){ _visible = val; } diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index eff8e9e62b..c76a1e20c9 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -146,6 +146,57 @@ SBoundingBox3d GFace::bounds() const return res; } +SOrientedBoundingBox* GFace::getOBB() { + if (!(this->_obb)) { + vector<SPoint3> vertices; + if(this->getNumMeshVertices() > 0) { + int N = this->getNumMeshVertices(); + for (int i = 0; i < N; i++) { + MVertex* mv = this->getMeshVertex(i); + vertices.push_back(mv->point()); + } + list<GEdge*> eds = this->edges(); + for(list<GEdge*>::iterator ed = eds.begin(); ed != eds.end(); ed++) { + int N2 = (*ed)->getNumMeshVertices(); + for (int i = 0; i < N2; i++) { + MVertex* mv = (*ed)->getMeshVertex(i); + vertices.push_back(mv->point()); + } + // Don't forget to add the first and last vertices... + SPoint3 pt1((*ed)->getBeginVertex()->x(),(*ed)->getBeginVertex()->y(),(*ed)->getBeginVertex()->z()); + SPoint3 pt2((*ed)->getEndVertex()->x(),(*ed)->getEndVertex()->y(),(*ed)->getEndVertex()->z()); + vertices.push_back(pt1); + vertices.push_back(pt2); + } + } else if(buildSTLTriangulation()) { + int N = va_geom_triangles->getNumVertices(); + for (int i = 0; i < N; i++) { + SPoint3 p((va_geom_triangles->getVertexArray(3*i))[0], + (va_geom_triangles->getVertexArray(3*i))[1], + (va_geom_triangles->getVertexArray(3*i))[2]); + vertices.push_back(p); + } + } else { + // Fallback, if we can't make a STL triangulation of the surface, use its + // edges.. + list<GEdge*> b_edges = this->edges(); + int N = 10; + for (list<GEdge*>::iterator b_edge = b_edges.begin(); b_edge != b_edges.end(); b_edge++) { + Range<double> tr = (*b_edge)->parBounds(0); + for (int j = 0; j < N; j++) { + double t = tr.low() + (double)j / (double)(N-1)*(tr.high() - tr.low()); + GPoint p = (*b_edge)->point(t); + SPoint3 pt(p.x(),p.y(),p.z()); + vertices.push_back(pt); + } + } + } + this->_obb = SOrientedBoundingBox::buildOBB(vertices); + } + return (this->_obb); +} + + surface_params GFace::getSurfaceParams() const { surface_params p; diff --git a/Geo/GFace.h b/Geo/GFace.h index 46a59c6feb..1e340dab95 100644 --- a/Geo/GFace.h +++ b/Geo/GFace.h @@ -110,6 +110,9 @@ class GFace : public GEntity // get the bounding box virtual SBoundingBox3d bounds() const; + // get the oriented bounding box + virtual SOrientedBoundingBox* getOBB(); + // retrieve surface params virtual surface_params getSurfaceParams() const; diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index d21df36dc0..2e12a708b8 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -985,7 +985,6 @@ void GModel::createTopologyFromMesh() //find boundary edges of each face and put them in //a map_edges that associates //the MEdges with the tags of the adjacent faces - std::map<MEdge, std::vector<int>, Less_Edge > map_edges; for (std::vector<discreteFace*>::iterator face = Dfaces.begin(); face != Dfaces.end(); face++){ diff --git a/Geo/GModelIO_OCC.cpp b/Geo/GModelIO_OCC.cpp index 45ff81c7b0..336e17c47f 100644 --- a/Geo/GModelIO_OCC.cpp +++ b/Geo/GModelIO_OCC.cpp @@ -187,6 +187,7 @@ void OCC_Internals::healGeometry(double tolerance, bool fixsmalledges, bool makesolids, bool connect) { int nrc = 0, nrcs = 0; + TopExp_Explorer e; for(e.Init(shape, TopAbs_COMPOUND); e.More(); e.Next()) nrc++; for(e.Init(shape, TopAbs_COMPSOLID); e.More(); e.Next()) nrcs++; diff --git a/Geo/GRegion.cpp b/Geo/GRegion.cpp index bbc2bf533e..3b203b54ca 100644 --- a/Geo/GRegion.cpp +++ b/Geo/GRegion.cpp @@ -12,6 +12,7 @@ #include "MPrism.h" #include "MPyramid.h" #include "GmshMessage.h" +#include "VertexArray.h" GRegion::GRegion(GModel *model, int tag) : GEntity (model, tag) { @@ -110,6 +111,57 @@ SBoundingBox3d GRegion::bounds() const return res; } +SOrientedBoundingBox* GRegion::getOBB() { + if (!(this->_obb)) { + vector<SPoint3> vertices; + list<GFace*> b_faces = this->faces(); + for (list<GFace*>::iterator b_face = b_faces.begin(); b_face != b_faces.end(); b_face++) { + if((*b_face)->getNumMeshVertices() > 0) { + int N = (*b_face)->getNumMeshVertices(); + for (int i = 0; i < N; i++) { + MVertex* mv = (*b_face)->getMeshVertex(i); + vertices.push_back(mv->point()); + } + list<GEdge*> eds = (*b_face)->edges(); + for(list<GEdge*>::iterator ed = eds.begin(); ed != eds.end(); ed++) { + int N2 = (*ed)->getNumMeshVertices(); + for (int i = 0; i < N2; i++) { + MVertex* mv = (*ed)->getMeshVertex(i); + vertices.push_back(mv->point()); + } + // Don't forget to add the first and last vertices... + SPoint3 pt1((*ed)->getBeginVertex()->x(),(*ed)->getBeginVertex()->y(),(*ed)->getBeginVertex()->z()); + SPoint3 pt2((*ed)->getEndVertex()->x(),(*ed)->getEndVertex()->y(),(*ed)->getEndVertex()->z()); + vertices.push_back(pt1); + vertices.push_back(pt2); + } + } else if ((*b_face)->buildSTLTriangulation()) { + int N = (*b_face)->va_geom_triangles->getNumVertices(); + for(int i = 0; i < N; i++) { + SPoint3 p(((*b_face)->va_geom_triangles->getVertexArray(3*i))[0], + ((*b_face)->va_geom_triangles->getVertexArray(3*i))[1], + ((*b_face)->va_geom_triangles->getVertexArray(3*i))[2]); + vertices.push_back(p); + } + } else { + int N = 10; + list<GEdge*> b_edges = (*b_face)->edges(); + for (list<GEdge*>::iterator b_edge = b_edges.begin(); b_edge != b_edges.end(); b_edge++) { + Range<double> tr = (*b_edge)->parBounds(0); + for (int j = 0; j < N; j++) { + double t = tr.low() + (double)j / (double)(N-1)*(tr.high() - tr.low()); + GPoint p = (*b_edge)->point(t); + SPoint3 pt(p.x(),p.y(),p.z()); + vertices.push_back(pt); + } + } + } + } + this->_obb = SOrientedBoundingBox::buildOBB(vertices); + } + return (this->_obb); +} + void GRegion::setVisibility(char val, bool recursive) { GEntity::setVisibility(val); diff --git a/Geo/GRegion.h b/Geo/GRegion.h index f74cb92dff..0a57988749 100644 --- a/Geo/GRegion.h +++ b/Geo/GRegion.h @@ -49,6 +49,9 @@ class GRegion : public GEntity { // get the bounding box virtual SBoundingBox3d bounds() const; + // get the oriented bounding box + virtual SOrientedBoundingBox* getOBB(); + // check if the region is connected to another region by an edge bool edgeConnected(GRegion *r) const; diff --git a/Geo/GeomMeshMatcher.cpp b/Geo/GeomMeshMatcher.cpp new file mode 100644 index 0000000000..75e69c3a28 --- /dev/null +++ b/Geo/GeomMeshMatcher.cpp @@ -0,0 +1,455 @@ +// 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>. +// +// Contributed by Bastien Gorissen + +#include "GeomMeshMatcher.h" +#include "discreteVertex.h" +#include "GmshMessage.h" +#include "SOrientedBoundingBox.h" + +#include <cstdarg> +#include <algorithm> +#include <list> +#include <vector> +#include "Pair.h" + +using namespace std; + + GeomMeshMatcher* GeomMeshMatcher::_gmm_instance = 0; + +/*! \brief Takes a list and returns a new list containing the unique elements of + * the input list. + * + * \param lst The list from which we want to extract the unique elements. + * \param res A list that's cleared and that will, after the execution of the + * the method, contain the elements of lst that only appear once in + * it. Previous contents of res is lost. + */ + +template <class T> void removeDuplicates(list<T>& L, list<T>& res) { + res.clear(); + for (typename list<T>::iterator it1 = L.begin(); it1 != L.end(); it1++) { + bool keep = true; + for (typename list<T>::iterator it2 = L.begin(); it2 != L.end(); it2++) { + if (*it1 == *it2 && it1 != it2) { + keep = false; + break; + } + } + if (keep) res.push_back(*it1); + } +} + +//----------------------------------------------------------------------------- + +template <class T> void getIntersection(vector<T>& res, vector<list<T> >& lists) { + res.clear(); + list<T> first_list = lists[0]; + + for (typename list<T>::iterator item = first_list.begin(); item != first_list.end(); item++) { + bool found = true; + for (typename vector<list<T> >::iterator list_iter = lists.begin(); list_iter != lists.end(); list_iter++) { + if (find((*list_iter).begin(), (*list_iter).end(), (*item)) == (*list_iter).end()) { + found = false; + break; + } + } + if (found) { + res.push_back(*item); + } + } +} + +//----------------------------------------------------------------------------- + +template <class T> T findMatching(vector<Pair<T,T> >& matching, T& entity) { + for (typename vector<Pair<T,T> >::iterator pair = matching.begin(); pair != matching.end(); pair++) { + if ( (*pair).left() == entity) { + return((*pair).right()); + } + } + return (0); +} + + + + +// Private +vector<Pair<GVertex*,GVertex*> >* GeomMeshMatcher::matchVertices(GModel* m1, GModel *m2) { + + // Vector that will be returned. + vector<Pair<GVertex*,GVertex*> >* coresp_v = new vector<Pair<GVertex*, + GVertex*> >; + + // Building two vectors with the models' entities. + vector<GEntity*> m1_entities; + m1->getEntities(m1_entities); + vector<GEntity*> m2_entities; + m2->getEntities(m2_entities); + + int num_matched_vertices = 0; + int num_total_vertices = 0; + + int counter1 = 0; + + for (vector<GEntity*>::iterator entity1 = m1_entities.begin(); + entity1 != m1_entities.end(); + entity1++) + { + // If the entity isn't a vertex, don't bother. + if ((*entity1)->dim() != 0) continue; + num_total_vertices++; + GVertex* v1 = (GVertex*) *entity1; + + // FIXME: need a *much* better way to fix the tolerance... + double tol = 10e-8; + int counter2 = 0; + + for (vector<GEntity*>::iterator entity2 = m2_entities.begin(); + entity2 != m2_entities.end(); + entity2++) + { + if ((*entity2)->dim() != 0) continue; + for (int ed = 0; + ed < ((discreteVertex*) *entity2)->getNumMeshElements(); + ed++) + { + discreteVertex* v2 = (discreteVertex*) *entity2; + // We match the vertices if their coordinates are the same under the + // specified tolerance. + if (fabs(v1->x() - v2->x()) < tol && + fabs(v1->y() - v2->y()) < tol && + fabs(v1->z() - v2->z()) < tol ) + { + Msg::Info("Vertices %i (in m1) and %i (in m2) match.", + counter1, + counter2); + + // We assume that two mesh vertices can't match with the same + // geometrical one. + coresp_v->push_back(Pair<GVertex*,GVertex*>((GVertex*) *entity1, + (GVertex*) *entity2)); + ((GVertex*) *entity2)->setTag(((GVertex*) *entity1)->tag()); // TODO : Double-check this part... + num_matched_vertices++; + break; + } + } + counter2++; + } + counter1++; + } + Msg::Info("Vertices matched : %i / %i", num_matched_vertices, num_total_vertices); + return (coresp_v); +} + +vector<Pair<GEdge*,GEdge*> >* GeomMeshMatcher::matchEdges(GModel* m1, GModel* m2, vector<Pair<GVertex*,GVertex*> >* coresp_v) { + + int num_matched_edges = 0; + int num_total_edges = 0; + + // Vector that will be returned. + vector<Pair<GEdge*,GEdge*> >* coresp_e = new vector<Pair<GEdge*,GEdge*> >; + + // Building two vectors with the models' entities. + vector<GEntity*> m1_entities; + m1->getEntities(m1_entities); + vector<GEntity*> m2_entities; + m2->getEntities(m2_entities); + + int counter1 = 0; + + for (vector<GEntity*>::iterator entity1 = m1_entities.begin(); + entity1 != m1_entities.end(); + entity1++) + { + if ((*entity1)->dim() != 1) continue; + num_total_edges++; + + + + GVertex* v1 = ((GEdge*)(*entity1))->getBeginVertex(); + GVertex* v2 = ((GEdge*)(*entity1))->getEndVertex(); + + vector<GEdge*> common_edges; + vector<list<GEdge*> > lists; + lists.push_back((findMatching<GVertex*>(*coresp_v,v1))->edges()); + lists.push_back((findMatching<GVertex*>(*coresp_v,v2))->edges()); + getIntersection<GEdge*>(common_edges, lists); + + if (common_edges.size() == 1) { + coresp_e->push_back( Pair<GEdge*,GEdge*> ((GEdge*) *entity1, common_edges[0])); + Msg::Info("Edges %i (in m1) and %i (in m2) match.", + ((GEdge*)*entity1)->tag(), + common_edges[0]->tag()); + common_edges[0]->setTag(((GEdge*) *entity1)->tag()); + num_matched_edges++; + } else { + // More than one edge between the two points ? No worries, let us use those bounding boxes ! + Msg::Info("There are %i edges that could match.",common_edges.size()); + // So, first step is to build an array of points taken on the geo entity + // Then, compute the minimal bounding box + SOrientedBoundingBox* geo_obb = ((GEdge*)(*entity1))->getOBB(); + + GEdge* choice = 0; + double best_score = DBL_MAX; + // Next, let's iterate over the mesh entities. + for (vector<GEdge*>::iterator candidate = common_edges.begin(); candidate != common_edges.end(); candidate++) { + SOrientedBoundingBox* mesh_obb = (*candidate)->getOBB(); + Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); + + //if (geo_obb->intersects(mesh_obb)) { + + //double cen_dist1 = geo_obb->getCenter()[0]-mesh_obb->getCenter()[0]; + //double cen_dist2 = geo_obb->getCenter()[1]-mesh_obb->getCenter()[1]; + //double cen_dist3 = geo_obb->getCenter()[2]-mesh_obb->getCenter()[2]; + //double score1 = sqrt( cen_dist1*cen_dist1 + // + cen_dist2*cen_dist2 + // + cen_dist3*cen_dist3); + + // double score2 = fabs(geo_obb->getSize()[0]-mesh_obb->getSize()[0]); + //double score3 = fabs(geo_obb->getSize()[1]-mesh_obb->getSize()[1]); + //double score4 = fabs(geo_obb->getSize()[2]-mesh_obb->getSize()[2]); + double score = SOrientedBoundingBox::compare(geo_obb,mesh_obb); + if (score < best_score) { + + best_score = score; + choice = (*candidate); + } + //} + } + Msg::Info("Edges %i (in m1) and %i (in m2) match.", + ((GEdge*)*entity1)->tag(), + choice->tag()); + coresp_e->push_back(Pair<GEdge*,GEdge*>((GEdge*) *entity1 , + choice)); + choice->setTag(((GEdge*) *entity1)->tag()); + num_matched_edges++; + } + + } + + Msg::Info("Edges matched : %i / %i", num_matched_edges, num_total_edges); + return (coresp_e); + +} + +vector<Pair<GFace*,GFace*> >* GeomMeshMatcher:: matchFaces(GModel* m1, GModel* m2, vector<Pair<GEdge*,GEdge*> >* coresp_e) { + + int num_matched_faces = 0; + int num_total_faces = 0; + + vector<Pair<GFace*,GFace*> >* coresp_f = new vector<Pair<GFace*,GFace*> >; + + vector<GEntity*> m1_entities; + m1->getEntities(m1_entities); + vector<GEntity*> m2_entities; + m2->getEntities(m2_entities); + + int counter1 = 0; + + for (vector<GEntity*>::iterator entity1 = m1_entities.begin(); + entity1 != m1_entities.end(); + entity1++) + { + if ((*entity1)->dim() != 2) continue; + num_total_faces++; + + vector<list<GFace*> > lists; + list<GEdge*> boundary_edges = ((GEdge*)(*entity1))->edges(); + for (list<GEdge*>::iterator boundary_edge = boundary_edges.begin(); boundary_edge != boundary_edges.end(); boundary_edge++) { + lists.push_back(findMatching<GEdge*>(*coresp_e,*boundary_edge)->faces()); + } + vector<GFace*> common_faces; + getIntersection<GFace*>(common_faces, lists); + //cout << "We found " << common_faces.size() << " common faces." << endl; + if (common_faces.size() == 1) { + coresp_f->push_back( Pair<GFace*,GFace*> ((GFace*) *entity1, common_faces[0])); + common_faces[0]->setTag(((GFace*) *entity1)->tag()); + num_matched_faces++; + } else if (common_faces.size() > 1) { + + int N; + // Then, compute the minimal bounding box + SOrientedBoundingBox* geo_obb = ((GFace*)(*entity1))->getOBB(); + + + GFace* choice = 0; + double best_score = DBL_MAX; + // Next, let's iterate over the mesh entities. + for (vector<GFace*>::iterator candidate = common_faces.begin(); candidate != common_faces.end(); candidate++) { + SOrientedBoundingBox* mesh_obb = (*candidate)->getOBB(); + Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); + + double cen_dist1 = geo_obb->getCenter()[0]-mesh_obb->getCenter()[0]; + double cen_dist2 = geo_obb->getCenter()[1]-mesh_obb->getCenter()[1]; + double cen_dist3 = geo_obb->getCenter()[2]-mesh_obb->getCenter()[2]; + double score1 = sqrt( cen_dist1*cen_dist1 + + cen_dist2*cen_dist2 + + cen_dist3*cen_dist3); + + double score2 = fabs(geo_obb->getSize()[0]-mesh_obb->getSize()[0]); + double score3 = fabs(geo_obb->getSize()[1]-mesh_obb->getSize()[1]); + double score4 = fabs(geo_obb->getSize()[2]-mesh_obb->getSize()[2]); + + + if (fmax(fmax(score1,score2),fmax(score3,score4)) < best_score) { + best_score = fmax(fmax(score1,score2),fmax(score3,score4)); + choice = (*candidate); + } + } + //cout << "And the winner is ... " << choice << endl; + coresp_f->push_back(Pair<GFace*,GFace*>((GFace*) *entity1 , + choice)); + choice->setTag(((GFace*) *entity1)->tag()); + num_matched_faces++; + } + } + + Msg::Info("Faces matched : %i / %i", num_matched_faces, num_total_faces); + return coresp_f; + +} + + + +vector<Pair<GRegion*,GRegion*> >* GeomMeshMatcher:: matchRegions(GModel* m1, GModel* m2, vector<Pair<GFace*,GFace*> >* coresp_f) { + int num_matched_regions = 0; + int num_total_regions = 0; + + vector<Pair<GRegion*,GRegion*> >* coresp_r = new vector<Pair<GRegion*,GRegion*> >; + + vector<GEntity*> m1_entities; + m1->getEntities(m1_entities); + vector<GEntity*> m2_entities; + m2->getEntities(m2_entities); + + int counter1 = 0; + + for (vector<GEntity*>::iterator entity1 = m1_entities.begin(); + entity1 != m1_entities.end(); + entity1++) + { + if ((*entity1)->dim() != 3) continue; + num_total_regions++; + + + //vector<list<GRegion*> > lists; + list<GFace*> boundary_faces = ((GFace*)(*entity1))->faces(); + list<GFace*> coresp_bound_faces; + vector<GRegion*> common_regions; + + for (list<GFace*>::iterator boundary_face = boundary_faces.begin(); boundary_face != boundary_faces.end(); boundary_face++) { + coresp_bound_faces.push_back(findMatching<GFace*>(*coresp_f,*boundary_face)); + } + for (vector<GEntity*>::iterator entity2 = m2_entities.begin(); + entity2 != m2_entities.end(); + entity2++) + { + if((*entity2)->dim() != 3) continue; + vector<list<GFace*> > lists; + lists.push_back(coresp_bound_faces); + lists.push_back(((GRegion*)*entity2)->faces()); + vector<GFace*> common_faces; + getIntersection<GFace*>(common_faces, lists); + if (common_faces.size() == coresp_bound_faces.size()) { + common_regions.push_back((GRegion*)*entity2); + } + + } + + if (common_regions.size() == 1) { + coresp_r->push_back( Pair<GRegion*,GRegion*> ((GRegion*) *entity1, common_regions[0])); + common_regions[0]->setTag(((GRegion*) *entity1)->tag()); + num_matched_regions++; + } else if (common_regions.size() > 1) { + + // So, first step is to build an array of points taken on the geo entity + +/* + This is made in a backward fashion compared to the other entities... +*/ + list<GEdge*> boundaries = ((GRegion*) *entity1)->edges(); + + const int N = 10; + int count = 0; + const int N_total = N*boundaries.size(); + double** vertices = new double*[N_total]; + + // Then, compute the minimal bounding box + SOrientedBoundingBox* geo_obb = ((GRegion*) *entity1)->getOBB(); + + + GRegion* choice = 0; + double best_score = DBL_MAX; + // Next, let's iterate over the mesh entities. + for (vector<GRegion*>::iterator candidate = common_regions.begin(); candidate != common_regions.end(); candidate++) { + // Again, build an array with the vertices. + SOrientedBoundingBox* mesh_obb = (*candidate)->getOBB(); + Msg::Info("Comparing score : %f", SOrientedBoundingBox::compare(geo_obb,mesh_obb)); + + if (geo_obb->intersects(mesh_obb)) { + double cen_dist1 = geo_obb->getCenter()[0]-mesh_obb->getCenter()[0]; + double cen_dist2 = geo_obb->getCenter()[1]-mesh_obb->getCenter()[1]; + double cen_dist3 = geo_obb->getCenter()[2]-mesh_obb->getCenter()[2]; + double score1 = sqrt( cen_dist1*cen_dist1 + + cen_dist2*cen_dist2 + + cen_dist3*cen_dist3); + + double score2 = fabs(geo_obb->getSize()[0]-mesh_obb->getSize()[0]); + double score3 = fabs(geo_obb->getSize()[1]-mesh_obb->getSize()[1]); + double score4 = fabs(geo_obb->getSize()[2]-mesh_obb->getSize()[2]); + + + if (fmax(fmax(score1,score2),fmax(score3,score4)) < best_score) { + best_score = fmax(fmax(score1,score2),fmax(score3,score4)); + choice = (*candidate); + } + } + } + coresp_r->push_back(Pair<GRegion*,GRegion*>((GRegion*) *entity1 , + choice)); + choice->setTag(((GRegion*) *entity1)->tag()); + num_matched_regions++; + } + } + + Msg::Info("Regions matched : %i / %i", num_matched_regions, num_total_regions); + return coresp_r; + +} + + +// Public +GeomMeshMatcher* GeomMeshMatcher::instance() { + if (!GeomMeshMatcher::_gmm_instance) { + GeomMeshMatcher::_gmm_instance = new GeomMeshMatcher(); + } + return (GeomMeshMatcher::_gmm_instance); +} + + void GeomMeshMatcher::destroy() { + if (GeomMeshMatcher::_gmm_instance) + delete GeomMeshMatcher::_gmm_instance; +} + +int GeomMeshMatcher:: match(GModel* geom, GModel* mesh) { + mesh->createTopologyFromMesh(); + // This will match VERTICES + vector<Pair<GVertex*,GVertex*> >* coresp_v = matchVertices(geom,mesh); + + // This will match EDGES + vector<Pair<GEdge*,GEdge*> >* coresp_e = matchEdges(geom,mesh,coresp_v); + + // This will match SURFACES + vector<Pair<GFace*,GFace*> >* coresp_f = matchFaces(geom,mesh,coresp_e); + + // This will match REGIONS + vector<Pair<GRegion*,GRegion*> >* coresp_r = matchRegions(geom,mesh,coresp_f); + + mesh->writeMSH("out.msh",2.0,false,true); + + return (1); +} diff --git a/Geo/GeomMeshMatcher.h b/Geo/GeomMeshMatcher.h new file mode 100644 index 0000000000..7058759d60 --- /dev/null +++ b/Geo/GeomMeshMatcher.h @@ -0,0 +1,39 @@ +// 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>. +// +// Contributed by Bastien Gorissen + +#ifndef GEOMMESHMATCHER_H +#define GEOMMESHMATCHER_H + +#include "GModel.h" +#include "GVertex.h" +#include "GEdge.h" +#include "GFace.h" +#include "GRegion.h" +#include "Pair.h" + +#include <vector> + +class GeomMeshMatcher { + private: + vector<Pair<GVertex*,GVertex*> >* matchVertices(GModel* m1, GModel *m2); + vector<Pair<GEdge*,GEdge*> >* matchEdges(GModel* m1, GModel* m2, vector<Pair<GVertex*,GVertex*> >* coresp_v); + vector<Pair<GFace*,GFace*> >* matchFaces(GModel* m1, GModel* m2, vector<Pair<GEdge*,GEdge*> >* coresp_e); + vector<Pair<GRegion*,GRegion*> >* matchRegions(GModel* m1, GModel* m2, vector<Pair<GFace*,GFace*> >* coresp_f); + static GeomMeshMatcher* _gmm_instance; + GeomMeshMatcher() {}; + ~GeomMeshMatcher() {}; + + public: + static GeomMeshMatcher* instance(); + static void destroy(); + int match(GModel* geom, GModel* mesh); +}; + + + + +#endif diff --git a/Geo/Makefile b/Geo/Makefile index b8c6c75bca..f226640d87 100644 --- a/Geo/Makefile +++ b/Geo/Makefile @@ -34,6 +34,8 @@ SRC = GEntity.cpp STensor3.cpp\ Geo.cpp\ GeoStringInterface.cpp GeoInterpolation.cpp\ findLinks.cpp\ + SOrientedBoundingBox.cpp\ + GeomMeshMatcher.cpp\ MVertex.cpp\ MFace.cpp\ MElement.cpp\ @@ -73,21 +75,23 @@ GEntity${OBJEXT}: GEntity.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.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 \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Common/VertexArray.h \ - ../Geo/SVector3.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h + ../Common/GmshConfig.h ../Common/GmshMessage.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 MPoint.h MElement.h ../Common/GmshDefines.h MVertex.h \ MEdge.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.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 MLine.h MElement.h MVertex.h MEdge.h \ MFace.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h ../Numeric/GaussLegendre1D.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h + ../Common/GmshConfig.h ../Common/GmshMessage.h ../Numeric/Gauss.h \ + ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/meshPartitionOptions.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 \ @@ -97,27 +101,29 @@ GFace${OBJEXT}: GFace.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ ../Geo/SVector3.h ../Numeric/Numeric.h ../Numeric/GmshMatrix.h \ ../Numeric/EigSolve.h ../Numeric/GaussLegendre1D.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h + 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 MTetrahedron.h MElement.h \ ../Common/GmshDefines.h MVertex.h MEdge.h MFace.h \ ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Numeric/Gauss.h \ - MHexahedron.h MPrism.h MPyramid.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h MHexahedron.h MPrism.h MPyramid.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 GEdgeCompound${OBJEXT}: GEdgeCompound.cpp ../Common/GmshConfig.h GEdgeCompound.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/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshMessage.h + ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ + ../Common/GmshMessage.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 \ GEdgeCompound.h MLine.h MElement.h ../Common/GmshDefines.h MVertex.h \ MEdge.h MFace.h ../Common/GmshMessage.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h MTriangle.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Octree.h \ + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h MTriangle.h ../Numeric/Numeric.h ../Common/Octree.h \ ../Common/OctreeInternals.h ../Numeric/gmshAssembler.h \ ../Numeric/gmshLinearSystem.h ../Numeric/gmshLaplace.h \ ../Numeric/gmshTermOfFormulation.h ../Numeric/GmshMatrix.h \ @@ -140,9 +146,9 @@ gmshVertex${OBJEXT}: gmshVertex.cpp GFace.h GEntity.h Range.h SPoint3.h \ gmshSurface.h ../Numeric/Numeric.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 \ - MPoint.h MElement.h MEdge.h MFace.h ../Numeric/FunctionSpace.h \ - ../Numeric/GmshMatrix.h ../Numeric/Gauss.h + ExtrudeParams.h ../Common/SmoothData.h GeoInterpolation.h \ + ../Common/GmshMessage.h MVertex.h MPoint.h MElement.h MEdge.h MFace.h \ + ../Numeric/FunctionSpace.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 GEdgeCompound.h gmshEdge.h \ @@ -150,8 +156,8 @@ gmshEdge${OBJEXT}: gmshEdge.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.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 + GeoInterpolation.h ../Common/GmshMessage.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 \ @@ -159,25 +165,27 @@ gmshFace${OBJEXT}: gmshFace.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.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 + ../Common/GmshMessage.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/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 + ../Common/ListUtils.h ExtrudeParams.h ../Common/SmoothData.h \ + ../Common/GmshMessage.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/GmshMatrix.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.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 MPoint.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 + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h OCCVertex.h OCCIncludes.h OCCEdge.h OCCFace.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 \ @@ -187,9 +195,9 @@ 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/GmshMatrix.h ../Common/VertexArray.h \ - ../Geo/SVector3.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h + ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/GmshConfig.h \ + ../Common/GmshMessage.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 \ @@ -220,9 +228,9 @@ discreteRegion${OBJEXT}: discreteRegion.cpp ../Common/GmshConfig.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ GEdgeLoop.h Pair.h GRegion.h MVertex.h Geo.h ../Common/GmshDefines.h \ gmshSurface.h ../Numeric/Numeric.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/GmshConfig.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 \ @@ -243,13 +251,15 @@ GModel${OBJEXT}: GModel.cpp ../Common/GmshConfig.h ../Common/GmshMessage.h \ GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h GEdgeLoop.h Pair.h \ GRegion.h MPoint.h MElement.h ../Common/GmshDefines.h MVertex.h MEdge.h \ MFace.h ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ - ../Numeric/Gauss.h MLine.h MTriangle.h MQuadrangle.h MTetrahedron.h \ - MHexahedron.h MPrism.h MPyramid.h discreteRegion.h discreteFace.h \ - discreteEdge.h discreteVertex.h gmshSurface.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/Octree.h ../Common/OctreeInternals.h \ - ../Common/SmoothData.h ../Mesh/Field.h ../Geo/STensor3.h \ - ../Geo/SVector3.h ../Post/PView.h ../Geo/SPoint3.h ../Mesh/Generator.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h + ../Common/GmshConfig.h ../Common/GmshMessage.h ../Numeric/Gauss.h \ + MLine.h MTriangle.h MQuadrangle.h MTetrahedron.h MHexahedron.h MPrism.h \ + MPyramid.h discreteRegion.h discreteFace.h discreteEdge.h \ + discreteVertex.h gmshSurface.h ../Numeric/Numeric.h ../Common/Octree.h \ + ../Common/OctreeInternals.h ../Common/SmoothData.h ../Mesh/Field.h \ + ../Common/GmshConfig.h ../Geo/STensor3.h ../Geo/SVector3.h \ + ../Numeric/GmshMatrix.h ../Numeric/Numeric.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 ../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 \ @@ -296,115 +306,120 @@ GModelIO_MED${OBJEXT}: GModelIO_MED.cpp ../Common/GmshConfig.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/GmshMatrix.h ../Common/GmshConfig.h ../Common/ListUtils.h \ - ../Common/TreeUtils.h ../Common/avl.h ../Common/ListUtils.h \ - ExtrudeParams.h ../Common/SmoothData.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 Geo${OBJEXT}: Geo.cpp ../Common/GmshMessage.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/MallocUtils.h \ + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.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 ../Common/GmshConfig.h \ + ../Geo/STensor3.h ../Geo/SVector3.h ../Numeric/GmshMatrix.h \ + ../Numeric/Numeric.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/GmshMatrix.h \ + ../Common/GmshConfig.h ../Common/GmshMessage.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 GModel.h GVertex.h GEntity.h \ - GPoint.h GEdge.h GFace.h GEdgeLoop.h GRegion.h GeoInterpolation.h \ - ../Mesh/Field.h ../Geo/STensor3.h ../Geo/SVector3.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/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 + 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/GmshMatrix.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 ../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 GeoStringInterface.h ../Common/Context.h \ + ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.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 \ - ../Common/avl.h ../Common/ListUtils.h + ../Common/avl.h ../Common/ListUtils.h ../Common/ListUtils.h 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 GEdgeCompound.h \ ../Common/GmshMessage.h ../Common/StringUtils.h MFace${OBJEXT}: MFace.cpp ../Common/GmshConfig.h MFace.h MVertex.h SPoint2.h \ SPoint3.h MEdge.h SVector3.h ../Numeric/Numeric.h \ - ../Numeric/GmshMatrix.h ../Common/GmshMessage.h ../Common/Context.h \ - ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.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 MPoint.h MLine.h MTriangle.h \ - MQuadrangle.h MTetrahedron.h MHexahedron.h MPrism.h MPyramid.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/GmshMatrix.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h MPoint.h MLine.h MTriangle.h MQuadrangle.h \ + MTetrahedron.h MHexahedron.h MPrism.h MPyramid.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 ../Common/Context.h \ + ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h MLine${OBJEXT}: MLine.cpp MLine.h 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 \ - ../Common/GmshConfig.h ../Numeric/Gauss.h ../Numeric/GaussLegendre1D.h \ - ../Common/Context.h ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ - ../Mesh/qualityMeasures.h + ../Common/GmshConfig.h ../Common/GmshMessage.h ../Numeric/Gauss.h \ + ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ + ../Mesh/meshPartitionOptions.h ../Mesh/qualityMeasures.h MTriangle${OBJEXT}: MTriangle.cpp MTriangle.h 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 ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h ../Numeric/Numeric.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ ../Mesh/qualityMeasures.h MQuadrangle${OBJEXT}: MQuadrangle.cpp MQuadrangle.h 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 ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/GaussLegendre1D.h ../Common/Context.h ../Geo/CGNSOptions.h \ - ../Mesh/meshPartitionOptions.h ../Mesh/qualityMeasures.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h ../Numeric/GaussLegendre1D.h ../Common/Context.h \ + ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ + ../Mesh/qualityMeasures.h MTetrahedron${OBJEXT}: MTetrahedron.cpp MTetrahedron.h 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 ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h ../Common/Context.h \ + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h ../Numeric/Numeric.h ../Common/Context.h \ ../Geo/CGNSOptions.h ../Mesh/meshPartitionOptions.h \ ../Mesh/qualityMeasures.h ../Mesh/meshGFaceDelaunayInsertion.h \ ../Geo/MTriangle.h ../Geo/MElement.h \ ../Mesh/meshGRegionDelaunayInsertion.h ../Geo/MTetrahedron.h \ - ../Mesh/BackgroundMesh.h ../Geo/STensor3.h ../Geo/SVector3.h \ + ../Numeric/Numeric.h ../Mesh/BackgroundMesh.h ../Geo/STensor3.h \ + ../Geo/SVector3.h ../Numeric/GmshMatrix.h ../Numeric/Numeric.h \ ../Mesh/qualityMeasures.h MHexahedron${OBJEXT}: MHexahedron.cpp MHexahedron.h 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 ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h ../Numeric/Numeric.h MPrism${OBJEXT}: MPrism.cpp MPrism.h 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 ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h ../Numeric/Numeric.h MPyramid${OBJEXT}: MPyramid.cpp MPyramid.h 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 ../Common/GmshConfig.h ../Numeric/Gauss.h \ - ../Numeric/Numeric.h ../Numeric/GmshMatrix.h + ../Numeric/GmshMatrix.h ../Common/GmshConfig.h ../Common/GmshMessage.h \ + ../Numeric/Gauss.h ../Numeric/Numeric.h MZone${OBJEXT}: MZone.cpp ../Common/GmshConfig.h MZoneBoundary${OBJEXT}: MZoneBoundary.cpp ../Common/GmshConfig.h CellComplex${OBJEXT}: CellComplex.cpp CellComplex.h ../Common/GmshConfig.h \ 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 \ + ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ + ../Common/GmshConfig.h ../Common/GmshMessage.h ../Numeric/Gauss.h \ GModel.h GVertex.h GEntity.h Range.h SBoundingBox3d.h GPoint.h GEdge.h \ GFace.h GEdgeLoop.h Pair.h GRegion.h ChainComplex${OBJEXT}: ChainComplex.cpp ChainComplex.h ../Common/GmshConfig.h \ 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 \ + ../Numeric/FunctionSpace.h ../Numeric/GmshMatrix.h \ + ../Common/GmshConfig.h ../Common/GmshMessage.h ../Numeric/Gauss.h \ GModel.h GVertex.h GEntity.h Range.h SBoundingBox3d.h GPoint.h GEdge.h \ GFace.h GEdgeLoop.h Pair.h GRegion.h CellComplex.h STensor3${OBJEXT}: STensor3.cpp STensor3.h SVector3.h SPoint3.h \ diff --git a/Geo/SOrientedBoundingBox.cpp b/Geo/SOrientedBoundingBox.cpp new file mode 100644 index 0000000000..e140152361 --- /dev/null +++ b/Geo/SOrientedBoundingBox.cpp @@ -0,0 +1,540 @@ +// 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>. +// +// Contributed by Bastien Gorissen + +#include <math.h> +#include "SOrientedBoundingBox.h" +#include "GmshMatrix.h" + +#include "DivideAndConquer.h" +#include "SBoundingBox3d.h" + +using namespace std; + +double SOrientedBoundingRectangle::area() { + double b = this->size->at(0); + double B = this->size->at(1); + return (b*B); +} + +SOrientedBoundingRectangle::SOrientedBoundingRectangle() { + this->center = new vector<double>(2,0); + this->size = new vector<double>(2,0); + this->axisX = new vector<double>(2,0); + this->axisY = new vector<double>(2,0); +}; +SOrientedBoundingRectangle::~SOrientedBoundingRectangle() { + delete center; + delete size; + delete axisX; + delete axisY; +}; + +SOrientedBoundingBox::SOrientedBoundingBox() { + + this->center = SVector3(); + this->size = SVector3(); + this->axisX = SVector3(); + this->axisY = SVector3(); + this->axisZ = SVector3(); +} +//----------------------------------------------------------------------------- + + +SOrientedBoundingBox::SOrientedBoundingBox(SVector3& center, + double sizeX, + double sizeY, + double sizeZ, + const SVector3& axisX, + const SVector3& axisY, + const SVector3& axisZ) { + + this->center = center; + + this->size = SVector3(sizeX, sizeY, sizeZ); + + this->axisX = axisX; + this->axisX.normalize(); + + this->axisY = axisY; + this->axisY.normalize(); + + this->axisZ = axisZ; + this->axisZ.normalize(); + + double dx = 0.5*size[0]; + double dy = 0.5*size[1]; + double dz = 0.5*size[2]; + + p1x = center[0] - (axisX[0]*dx) - (axisY[0]*dy) - (axisZ[0]*dz); + p1y = center[1] - (axisX[1]*dx) - (axisY[1]*dy) - (axisZ[1]*dz); + p1z = center[2] - (axisX[2]*dx) - (axisY[2]*dy) - (axisZ[2]*dz); + + p2x = center[0] + (axisX[0]*dx) - (axisY[0]*dy) - (axisZ[0]*dz); + p2y = center[1] + (axisX[1]*dx) - (axisY[1]*dy) - (axisZ[1]*dz); + p2z = center[2] + (axisX[2]*dx) - (axisY[2]*dy) - (axisZ[2]*dz); + + p3x = center[0] - (axisX[0]*dx) + (axisY[0]*dy) - (axisZ[0]*dz); + p3y = center[1] - (axisX[1]*dx) + (axisY[1]*dy) - (axisZ[1]*dz); + p3z = center[2] - (axisX[2]*dx) + (axisY[2]*dy) - (axisZ[2]*dz); + + p4x = center[0] + (axisX[0]*dx) + (axisY[0]*dy) - (axisZ[0]*dz); + p4y = center[1] + (axisX[1]*dx) + (axisY[1]*dy) - (axisZ[1]*dz); + p4z = center[2] + (axisX[2]*dx) + (axisY[2]*dy) - (axisZ[2]*dz); + + p5x = center[0] - (axisX[0]*dx) - (axisY[0]*dy) + (axisZ[0]*dz); + p5y = center[1] - (axisX[1]*dx) - (axisY[1]*dy) + (axisZ[1]*dz); + p5z = center[2] - (axisX[2]*dx) - (axisY[2]*dy) + (axisZ[2]*dz); + + p6x = center[0] + (axisX[0]*dx) - (axisY[0]*dy) + (axisZ[0]*dz); + p6y = center[1] + (axisX[1]*dx) - (axisY[1]*dy) + (axisZ[1]*dz); + p6z = center[2] + (axisX[2]*dx) - (axisY[2]*dy) + (axisZ[2]*dz); + + p7x = center[0] - (axisX[0]*dx) + (axisY[0]*dy) + (axisZ[0]*dz); + p7y = center[1] - (axisX[1]*dx) + (axisY[1]*dy) + (axisZ[1]*dz); + p7z = center[2] - (axisX[2]*dx) + (axisY[2]*dy) + (axisZ[2]*dz); + + p8x = center[0] + (axisX[0]*dx) + (axisY[0]*dy) + (axisZ[0]*dz); + p8y = center[1] + (axisX[1]*dx) + (axisY[1]*dy) + (axisZ[1]*dz); + p8z = center[2] + (axisX[2]*dx) + (axisY[2]*dy) + (axisZ[2]*dz); + + + +} + +//----------------------------------------------------------------------------- + + +SOrientedBoundingBox::~SOrientedBoundingBox() { } + +//----------------------------------------------------------------------------- + + +double SOrientedBoundingBox::getMaxSize() { + return (fmaxf(this->size[0], fmaxf(this->size[1], this->size[2]))); +} + +//----------------------------------------------------------------------------- + + +SVector3 SOrientedBoundingBox::getAxis(int axis) { + switch (axis) { + case 0: + return (this->axisX); + case 1: + return (this->axisY); + case 2: + return (this->axisZ); + } +} + +//----------------------------------------------------------------------------- + +bool SOrientedBoundingBox::intersects(SOrientedBoundingBox* obb) { + + SVector3 collide_axes[15]; + for (int i = 0; i < 3; i ++) { + collide_axes[i] = this->getAxis(i); + collide_axes[i+3] = obb->getAxis(i); + } + + SVector3 sizes[2]; + sizes[0] = this->getSize(); + sizes[1] = obb->getSize(); + + for(unsigned int i=0 ; i<3 ; i++) { + for(unsigned int j=3 ; j<6 ; j++) { + collide_axes[3*i+j+3] = crossprod(collide_axes[i],collide_axes[j]); + } + } + SVector3 T = obb->getCenter() - this->getCenter(); + + for(unsigned int i=0 ; i<15 ; i++) { + double val = 0.0; + for(unsigned int j=0 ; j<6 ; j++) { + val += 0.5*(sizes[j<3?0:1])(j % 3) * fabs(dot(collide_axes[j],collide_axes[i])); + } + if (fabs(dot(collide_axes[i],T )) > val) + return false; + } + + return true; +} + +//----------------------------------------------------------------------------- + +SOrientedBoundingBox* SOrientedBoundingBox::buildOBB(vector<SPoint3> vertices) { + + int num_vertices = vertices.size(); + // First organize the data + gmshMatrix<double> data(3,num_vertices); + int tmp = 0; + for (int i = 0; i < num_vertices; i++) { + bool okay = true; + for (int j = 0; j < tmp; j++) { + if((data(0,j) == vertices[i].x()) && + (data(1,j) == vertices[i].y()) && + (data(2,j) == vertices[i].z())) { + okay = false; + break; + } + } + if (okay) { + data(0,tmp) = vertices[i].x(); + data(1,tmp) = vertices[i].y(); + data(2,tmp) = vertices[i].z(); + tmp++; + } + } + num_vertices = tmp; + + // Compute the empirical means + gmshVector<double> mean(3); + for (int i = 0; i < 3; i++) { + mean(i) = 0; + for (int j = 0; j < num_vertices; j++) { + mean(i) += data(i,j); + } + mean(i) /= (double)num_vertices; + } + + // Get the deviation from the mean + gmshMatrix<double> B(3,num_vertices); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < num_vertices; j++) { + B(i,j) = data(i,j) - mean(i); + } + } + + // Compute the covariance matrix + gmshMatrix<double> covariance(3,3); + B.mult(B.transpose(), covariance); + covariance.scale(1./(num_vertices-1)); + /* + Msg::Debug("Covariance matrix"); + Msg::Debug("%f %f %f", covariance(0,0),covariance(0,1),covariance(0,2) ); + Msg::Debug("%f %f %f", covariance(1,0),covariance(1,1),covariance(1,2) ); + Msg::Debug("%f %f %f", covariance(2,0),covariance(2,1),covariance(2,2) ); + */ + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + if (fabs(covariance(i,j))< 10e-16) + covariance(i,j) = 0; + } + } + + gmshMatrix<double> left_eigv(3,3); + gmshMatrix<double> right_eigv(3,3); + gmshVector<double> real_eig(3); + gmshVector<double> img_eig(3); + covariance.eig(left_eigv, real_eig, img_eig, right_eigv,true); + + // Now, project the data in the new basis. + gmshMatrix<double> projected(3,num_vertices); + left_eigv.transpose().mult(data,projected); + // Get the size of the box in the new direction + gmshVector<double> mins(3); + gmshVector<double> maxs(3); + for (int i = 0; i < 3; i++) { + mins(i) = DBL_MAX; + maxs(i) = -DBL_MAX; + for (int j = 0; j < num_vertices; j++) { + maxs(i) = fmaxf(maxs(i),projected(i,j)); + mins(i) = fminf(mins(i),projected(i,j)); + } + } + + double means[3]; + double sizes[3]; + + // Note: the size is computed in the box's coordinates! + for(int i = 0 ; i < 3 ; i++) { + sizes[i] = maxs(i) - mins(i); + means[i] = (maxs(i) - mins(i)) / 2.; + } + /* + Msg::Debug("Sizes : %f %f %f",sizes[0],sizes[1], sizes[2]); + Msg::Debug("Eig Axis 1 : %f %f %f",left_eigv(0,0),left_eigv(1,0), left_eigv(2,0)); + Msg::Debug("Eig Axis 2 : %f %f %f",left_eigv(0,1),left_eigv(1,1), left_eigv(2,1)); + Msg::Debug("Eig Axis 3 : %f %f %f",left_eigv(0,2),left_eigv(1,2), left_eigv(2,2)); + */ + // We take the smallest component, then project the data on the plane defined by the other twos + + int smallest_comp; + if (sizes[0] <= sizes[1] && sizes[0] <= sizes[2]) + smallest_comp = 0; + else if (sizes[1] <= sizes[0] && sizes[1] <= sizes[2]) + smallest_comp = 1; + else if (sizes[2] <= sizes[0] && sizes[2] <= sizes[1]) + smallest_comp = 2; + + // The projection has been done circa line 161. + // We just ignore the coordinate corresponding to smallest_comp. + vector<SPoint2*> points; + for (int i = 0; i < num_vertices; i++) { + SPoint2* p = new SPoint2(projected(smallest_comp==0?1:0,i), projected(smallest_comp==2?1:2,i)); + bool keep = true; + for (vector<SPoint2*>::iterator point = points.begin();point != points.end();point++) { + if ( fabs((*p)[0] -(**point)[0]) < 10e-10 && fabs((*p)[1] -(**point)[1]) < 10e-10 ) { + keep = false; + break; + } + } + if (keep) { + points.push_back(p); + } else { + delete p; + } + } + + // Find the convex hull from a delaunay triangulation of the points + DocRecord record(points.size()); + record.numPoints = points.size(); + srand((unsigned)time(0)); + for (int i = 0; i < points.size(); i++) { + record.points[i].where.h = points[i]->x()+(10e-6)*sizes[smallest_comp==0?1:0]*(-0.5+((double)rand())/RAND_MAX); + record.points[i].where.v = points[i]->y()+(10e-6)*sizes[smallest_comp==2?1:0]*(-0.5+((double)rand())/RAND_MAX); + record.points[i].adjacent = NULL; + //Msg::Info("Points for delaunay : %f %f",record.points[i].where.h,record.points[i].where.v); + } + + record.MakeMeshWithPoints(); + + vector<Segment> convex_hull; + for (int i = 0; i < record.numTriangles; i++) { + Segment segs[3]; + segs[0].from = record.triangles[i].a; + segs[0].to = record.triangles[i].b; + segs[1].from = record.triangles[i].b; + segs[1].to = record.triangles[i].c; + segs[2].from = record.triangles[i].c; + segs[2].to = record.triangles[i].a; + + for (int j = 0; j < 3; j++) { + bool okay = true; + for (vector<Segment>::iterator seg = convex_hull.begin(); seg != convex_hull.end(); seg++) { + if ( ((*seg).from == segs[j].from && (*seg).from == segs[j].to) || ((*seg).from == segs[j].to && (*seg).from == segs[j].from)) { + convex_hull.erase(seg); + okay = false; + break; + } + } + if (okay) { + convex_hull.push_back(segs[j]); + } + } + } + + // Now, examinate all the directions given by the edges of the convex hull + // to find the one that lets us build the least-area bounding rectangle for then + // points. + gmshVector<double> axis(2); + axis(0) = 1; + axis(1) = 0; + gmshVector<double> axis2(2); + axis2(0) = 0; + axis2(1) = 1; + SOrientedBoundingRectangle least_rectangle; + least_rectangle.center->at(0) = 0.0; + least_rectangle.center->at(1) = 0.0; + least_rectangle.size->at(0) = -1; + least_rectangle.size->at(1) = 1; + + for (vector<Segment>::iterator seg = convex_hull.begin(); seg != convex_hull.end(); seg++) { + + gmshVector<double> segment(2); + //segment(0) = record.points[(*seg).from].where.h - record.points[(*seg).to].where.h; + //segment(1) = record.points[(*seg).from].where.v - record.points[(*seg).to].where.v; + segment(0) = points[(*seg).from]->x() - points[(*seg).to]->x(); + segment(1) = points[(*seg).from]->y() - points[(*seg).to]->y(); + segment.scale(1.0/segment.norm()); + + double cosine = axis(0)*segment(0) + segment(1)*axis(1); + double sine = axis(1)*segment(0) - segment(1)*axis(0); + //double sine = axis(0)*segment(1) - segment(0)*axis(1); + + gmshMatrix<double> rotation(2,2); + + rotation(0,0) = cosine; rotation(0,1) = sine; + rotation(1,0) = -sine; rotation(1,1) = cosine; + + double max_x = -DBL_MAX; + double min_x = DBL_MAX; + double max_y = -DBL_MAX; + double min_y = DBL_MAX; + + for (int i = 0; i < record.numPoints; i++) { + gmshVector<double> pnt(2); + //pnt(0) = record.points[i].where.h; + //pnt(1) = record.points[i].where.v; + pnt(0) = points[i]->x(); + pnt(1) = points[i]->y(); + gmshVector<double> rot_pnt(2); + rotation.mult(pnt,rot_pnt); + if (rot_pnt(0) < min_x) min_x = rot_pnt(0); + if (rot_pnt(0) > max_x) max_x = rot_pnt(0); + if (rot_pnt(1) < min_y) min_y = rot_pnt(1); + if (rot_pnt(1) > max_y) max_y = rot_pnt(1); + } + +/**/ + gmshVector<double> center_rot(2); + gmshVector<double> center_before_rot(2); + center_before_rot(0) = (max_x+min_x)/2.0; + center_before_rot(1) = (max_y+min_y)/2.0; + gmshMatrix<double> rotation_inv(2,2); + + rotation_inv(0,0) = cosine; rotation_inv(0,1) = -sine; + rotation_inv(1,0) = sine; rotation_inv(1,1) = cosine; + + rotation_inv.mult(center_before_rot,center_rot); + + gmshVector<double> axis_rot1(2); + gmshVector<double> axis_rot2(2); + + rotation_inv.mult(axis,axis_rot1); + rotation_inv.mult(axis2,axis_rot2); +//*/ + + if ((least_rectangle.area() == -1) || (max_x-min_x)*(max_y-min_y) < least_rectangle.area()) { + + least_rectangle.size->at(0) = max_x-min_x; + least_rectangle.size->at(1) = max_y-min_y; + least_rectangle.center->at(0) = (max_x+min_x)/2.0; + least_rectangle.center->at(1) = (max_y+min_y)/2.0; + least_rectangle.center->at(0) = center_rot(0); + least_rectangle.center->at(1) = center_rot(1); + least_rectangle.axisX->at(0) = axis_rot1(0); + least_rectangle.axisX->at(1) = axis_rot1(1); +// least_rectangle.axisX->at(0) = segment(0); +// least_rectangle.axisX->at(1) = segment(1); + least_rectangle.axisY->at(0) = axis_rot2(0); + least_rectangle.axisY->at(1) = axis_rot2(1); + } + } + + double min_pca = DBL_MAX; + double max_pca = -DBL_MAX; + for (int i = 0; i < num_vertices; i++) { + min_pca = fminf(min_pca,projected(smallest_comp,i)); + max_pca = fmaxf(max_pca,projected(smallest_comp,i)); + } + double center_pca = (max_pca+min_pca)/2.0; + double size_pca = (max_pca-min_pca); + + double raw_data[3][5]; + raw_data[0][0] = size_pca; + raw_data[1][0] = least_rectangle.size->at(0); + raw_data[2][0] = least_rectangle.size->at(1); + + raw_data[0][1] = center_pca; + raw_data[1][1] = least_rectangle.center->at(0); + raw_data[2][1] = least_rectangle.center->at(1); + + for (int i = 0; i < 3; i++) { + raw_data[0][2+i] = left_eigv(i,smallest_comp); + raw_data[1][2+i] = least_rectangle.axisX->at(0)*left_eigv(i,smallest_comp==0?1:0) + + least_rectangle.axisX->at(1)*left_eigv(i,smallest_comp==2?1:2); + raw_data[2][2+i] = least_rectangle.axisY->at(0)*left_eigv(i,smallest_comp==0?1:0) + + least_rectangle.axisY->at(1)*left_eigv(i,smallest_comp==2?1:2); + } + // Msg::Info("Test 1 : %f %f",least_rectangle.center->at(0),least_rectangle.center->at(1)); +// Msg::Info("Test 2 : %f %f",least_rectangle.axisY->at(0),least_rectangle.axisY->at(1)); + + int tri[3]; + + if (size_pca > least_rectangle.size->at(0)) { // P > R0 + if (size_pca > least_rectangle.size->at(1)) { // P > R1 + tri[0] = 0; + if (least_rectangle.size->at(0) > least_rectangle.size->at(1)) { // R0 > R1 + tri[1] = 1; + tri[2] = 2; + } else { // R1 > R0 + tri[1] = 2; + tri[2] = 1; + } + } else { // P < R1 + tri[0] = 2; + tri[1] = 0; + tri[2] = 1; + } + } else { // P < R0 + if (size_pca < least_rectangle.size->at(1)) { // P < R1 + tri[2] = 0; + if (least_rectangle.size->at(0) > least_rectangle.size->at(1)) { + tri[0] = 1; + tri[1] = 2; + } else { + tri[0] = 2; + tri[1] = 1; + } + } else { + tri[0] = 1; + tri[1] = 0; + tri[2] = 2; + } + } + + SVector3 size; + SVector3 center; + SVector3 Axis1; + SVector3 Axis2; + SVector3 Axis3; + + for (int i = 0; i < 3; i++) { + size[i] = raw_data[tri[i]][0]; + center[i] = raw_data[tri[i]][1]; + Axis1[i] = raw_data[tri[0]][2+i]; + Axis2[i] = raw_data[tri[1]][2+i]; + Axis3[i] = raw_data[tri[2]][2+i]; + } + + SVector3 aux1; + SVector3 aux2; + SVector3 aux3; + for (int i = 0; i < 3; i++) { + aux1(i) = left_eigv(i,smallest_comp); + aux2(i) = left_eigv(i,smallest_comp==0?1:0); + aux3(i) = left_eigv(i,smallest_comp==2?1:2); + } + center = aux1*center_pca + aux2*least_rectangle.center->at(0) + aux3*least_rectangle.center->at(1); + //center[1] = -center[1]; + + + /* + Msg::Info("Box center : %f %f %f",center[0],center[1],center[2]); + Msg::Info("Box size : %f %f %f",size[0],size[1],size[2]); + Msg::Info("Box axis 1 : %f %f %f",Axis1[0],Axis1[1],Axis1[2]); + Msg::Info("Box axis 2 : %f %f %f",Axis2[0],Axis2[1],Axis2[2]); + Msg::Info("Box axis 1 : %f %f %f",Axis3[0],Axis3[1],Axis3[2]); + */ + return (new SOrientedBoundingBox(center, + size[0], size[1], size[2], Axis1, Axis2, Axis3)); +} + +double SOrientedBoundingBox::compare(SOrientedBoundingBox* obb1, SOrientedBoundingBox* obb2) { + + // "center term" + double center_term = norm(obb1->getCenter() - obb2->getCenter()); + + // "size term" + double size_term = 0.0; + for (int i = 0; i < 3; i++) { + if ((obb1->getSize())(i) + (obb2->getSize())(i) != 0) { + size_term += fabs((obb1->getSize())(i) - (obb2->getSize())(i)) / ((obb1->getSize())(i) + (obb2->getSize())(i)); + } + } + + // "orientation term" + double orientation_term = 0.0; + for (int i = 0; i < 3; i++) { + orientation_term += 1 - fabs(dot(obb1->getAxis(i),obb2->getAxis(i))); + } + + return (center_term + size_term + orientation_term); + +} + diff --git a/Geo/SOrientedBoundingBox.h b/Geo/SOrientedBoundingBox.h new file mode 100644 index 0000000000..32c9272330 --- /dev/null +++ b/Geo/SOrientedBoundingBox.h @@ -0,0 +1,89 @@ +// 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>. +// +// Contributed by Bastien Gorissen + +#ifndef ORIENTEDBOUNDINGBOX_H +#define ORIENTEDBOUNDINGBOX_H + +#include "SVector3.h" +# +#include "SPoint2.h" +#include "Pair.h" +#include <vector> +#include <list> + +using namespace std; + +class SOrientedBoundingRectangle { + + public: + vector<double>* center; + vector<double>* size; + vector<double>* axisX; + vector<double>* axisY; + + SOrientedBoundingRectangle(); + ~SOrientedBoundingRectangle(); + double area(); +}; + + +class SOrientedBoundingBox { + + public: + + double p1x,p1y,p1z; + double p2x,p2y,p2z; + double p3x,p3y,p3z; + double p4x,p4y,p4z; + double p5x,p5y,p5z; + double p6x,p6y,p6z; + double p7x,p7y,p7z; + double p8x,p8y,p8z; + + SOrientedBoundingBox(); + /* + * x, y, z are the box center, whereas the sizes are in the local axis + * system of the box. The axis form the local coordinates system of the + * box. All these data are given in the local coordinates system of the + * object. + */ + SOrientedBoundingBox(SVector3& center, + double sizeX, + double sizeY, + double sizeZ, + const SVector3& axisX, + const SVector3& axisY, + const SVector3& axisZ); + + ~SOrientedBoundingBox(); + + SVector3 getCenter() {return (this->center);}; + double getCenterX() {return (this->center[0]);}; + double getCenterY() {return (this->center[1]);}; + double getCenterZ() {return (this->center[2]);}; + SVector3 getSize() {return (this->size);}; + double getMaxSize(); + + /* + * Valid values for axis are 0 (X-axis), 1 (Y-axis) or 2 (Z-axis) + */ + SVector3 getAxis(int axis); + + static SOrientedBoundingBox* buildOBB(vector<SPoint3> vertices); + + bool intersects(SOrientedBoundingBox* obb); + + static double compare(SOrientedBoundingBox* obb1, SOrientedBoundingBox* obb2); + + private: + SVector3 center; + SVector3 size; + SVector3 axisX; + SVector3 axisY; + SVector3 axisZ; +}; +#endif diff --git a/Graphics/drawGeom.cpp b/Graphics/drawGeom.cpp index ebca002be3..0d12509438 100644 --- a/Graphics/drawGeom.cpp +++ b/Graphics/drawGeom.cpp @@ -9,6 +9,7 @@ #include "VertexArray.h" #include "GModel.h" #include "SBoundingBox3d.h" +#include "GmshMessage.h" class drawGVertex { private : @@ -378,7 +379,7 @@ class drawGFace { void operator () (GFace *f) { if(!f->getVisibility()) return; - if(f->geomType() == GEntity::DiscreteSurface) return; + if(f->geomType() == GEntity::DiscreteSurface) return; if(f->geomType() == GEntity::BoundaryLayerSurface) return; bool select = (_ctx->render_mode == drawContext::GMSH_SELECT && @@ -405,7 +406,7 @@ class drawGFace { _drawPlaneGFace(f); else _drawParametricGFace(f); - + if(select) { glPopName(); glPopName(); @@ -454,7 +455,7 @@ class drawGRegion { z + offset / _ctx->s[2]); _ctx->drawString(Num); } - + if(select) { glPopName(); glPopName(); diff --git a/Graphics/drawGlyph.cpp b/Graphics/drawGlyph.cpp index 3858a80f01..16192b147c 100644 --- a/Graphics/drawGlyph.cpp +++ b/Graphics/drawGlyph.cpp @@ -11,6 +11,7 @@ #include "StringUtils.h" #include "Context.h" #include "gl2ps.h" +#include "SVector3.h" void drawContext::drawString(std::string s, std::string &font_name, int font_enum, int font_size, int align) diff --git a/Makefile b/Makefile index d26d7858ce..e9c0406e00 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ GMSH_API =\ Geo/MTetrahedron.h Geo/MHexahedron.h Geo/MPrism.h Geo/MPyramid.h\ Geo/discreteVertex.h Geo/discreteEdge.h Geo/discreteFace.h Geo/discreteRegion.h\ Geo/SPoint2.h Geo/SPoint3.h Geo/SVector3.h Geo/SBoundingBox3d.h Geo/Pair.h Geo/Range.h\ + Geo/SOrientedBoundingBox.h\ Geo/CellComplex.h Geo/ChainComplex.h\ contrib/kbipack/gmp_normal_form.h contrib/kbipack/gmp_matrix.h contrib/kbipack/gmp_blas.h\ Numeric/Gauss.h Numeric/FunctionSpace.h Numeric/GmshMatrix.h\ diff --git a/configure b/configure index 08514685cf..99be5db759 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.60. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -10,8 +10,7 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -20,13 +19,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi - - +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # PATH needs CR @@ -219,7 +215,7 @@ test \$exitcode = 0) || { (exit 1); exit 1; } else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -237,6 +233,7 @@ IFS=$as_save_IFS # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -245,12 +242,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi - +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh : _ASEOF @@ -258,6 +253,7 @@ _ASEOF CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -266,12 +262,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi - +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh : (as_func_return () { @@ -518,28 +512,19 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' + as_executable_p=: fi -as_executable_p=$as_test_x +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -580,36 +565,36 @@ ac_unique_file="Geo/GModel.h" # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H # include <sys/types.h> #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#ifdef STDC_HEADERS +#if STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else -# ifdef HAVE_STDLIB_H +# if HAVE_STDLIB_H # include <stdlib.h> # endif #endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif -#ifdef HAVE_STRINGS_H +#if HAVE_STRINGS_H # include <strings.h> #endif -#ifdef HAVE_INTTYPES_H +#if HAVE_INTTYPES_H # include <inttypes.h> #endif -#ifdef HAVE_STDINT_H +#if HAVE_STDINT_H # include <stdint.h> #endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H # include <unistd.h> #endif" @@ -686,7 +671,6 @@ target_alias CC CFLAGS LDFLAGS -LIBS CPPFLAGS CXX CXXFLAGS @@ -800,10 +784,10 @@ do -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -819,10 +803,10 @@ do -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -1016,19 +1000,19 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + ac_package=`echo $ac_package| sed 's/-/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + ac_package=`echo $ac_package | sed 's/-/_/g'` eval with_$ac_package=no ;; --x) @@ -1324,7 +1308,6 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> - LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CXX C++ compiler command @@ -1398,7 +1381,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1412,7 +1395,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -2035,7 +2018,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2075,7 +2058,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2132,7 +2115,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2173,7 +2156,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -2231,7 +2214,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2275,7 +2258,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2416,7 +2399,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files '' +for ac_file in $ac_files do test -f "$ac_file" || continue case $ac_file in @@ -2444,12 +2427,6 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2461,6 +2438,8 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -2638,10 +2617,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -2696,10 +2692,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2734,10 +2747,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 @@ -2773,10 +2803,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -2892,10 +2939,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -2960,7 +3024,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3004,7 +3068,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3117,10 +3181,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -3175,10 +3256,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -3213,10 +3311,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 @@ -3252,10 +3367,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -3354,10 +3486,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3391,10 +3530,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3459,10 +3605,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -3496,10 +3649,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -3580,7 +3740,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3620,7 +3780,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3677,7 +3837,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3739,7 +3899,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLTKCONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3782,7 +3942,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_FLTKCONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3852,11 +4012,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_OSMesa_main=yes else echo "$as_me: failed program was:" >&5 @@ -3865,7 +4041,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_OSMesa_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4021,11 +4197,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_jpeg_main=yes else echo "$as_me: failed program was:" >&5 @@ -4034,7 +4226,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4103,11 +4295,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_z_main=yes else echo "$as_me: failed program was:" >&5 @@ -4116,7 +4324,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4176,21 +4384,37 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_png_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_png_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_png_main=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_png_main=no +fi + +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_png_main" >&5 @@ -4290,11 +4514,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_z_main=yes else echo "$as_me: failed program was:" >&5 @@ -4303,7 +4543,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4354,11 +4594,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 @@ -4367,7 +4623,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4446,11 +4702,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_vsnprintf=yes else echo "$as_me: failed program was:" >&5 @@ -4459,7 +4731,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_vsnprintf=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5 @@ -4503,10 +4775,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 @@ -4800,11 +5089,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_gmp_main=yes else echo "$as_me: failed program was:" >&5 @@ -4813,7 +5118,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_gmp_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4910,11 +5215,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_TKernel_sin=yes else echo "$as_me: failed program was:" >&5 @@ -4923,7 +5244,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_TKernel_sin=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -4974,11 +5295,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_TKernel_cos=yes else echo "$as_me: failed program was:" >&5 @@ -4987,7 +5324,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_TKernel_cos=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5105,11 +5442,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_hdf5_main=yes else echo "$as_me: failed program was:" >&5 @@ -5118,7 +5471,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_hdf5_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5176,11 +5529,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_cgns_main=yes else echo "$as_me: failed program was:" >&5 @@ -5189,7 +5558,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cgns_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5255,11 +5624,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_med_main=yes else echo "$as_me: failed program was:" >&5 @@ -5268,7 +5653,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_med_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5324,7 +5709,7 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn f90 xlf90 pgf90 pghpf epcf90 g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -5342,7 +5727,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5368,7 +5753,7 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 + for ac_prog in gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn f90 xlf90 pgf90 pghpf epcf90 g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -5386,7 +5771,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_FC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5493,10 +5878,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_fc_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -5539,10 +5941,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_fc_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_fc_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_fc_g=yes else echo "$as_me: failed program was:" >&5 @@ -5633,11 +6052,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_atlas_ATL_xerbla=yes else echo "$as_me: failed program was:" >&5 @@ -5646,7 +6081,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_atlas_ATL_xerbla=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5699,11 +6134,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_f77blas_dgemm_=yes else echo "$as_me: failed program was:" >&5 @@ -5712,7 +6163,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_f77blas_dgemm_=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5766,11 +6217,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_blas_dgemm_=yes else echo "$as_me: failed program was:" >&5 @@ -5779,7 +6246,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_blas_dgemm_=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5833,17 +6300,33 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); }; }; then ac_cv_lib_lapack_atlas_dbdsqr_=yes else echo "$as_me: failed program was:" >&5 @@ -5852,7 +6335,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lapack_atlas_dbdsqr_=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5906,11 +6389,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_lapack_dbdsqr_=yes else echo "$as_me: failed program was:" >&5 @@ -5919,7 +6418,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lapack_dbdsqr_=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -5991,11 +6490,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_FourierModel_main=yes else echo "$as_me: failed program was:" >&5 @@ -6004,7 +6519,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_FourierModel_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -6054,11 +6569,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_fftw3_main=yes else echo "$as_me: failed program was:" >&5 @@ -6067,7 +6598,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fftw3_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -6143,11 +6674,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_lib_mpi_cxx_main=yes else echo "$as_me: failed program was:" >&5 @@ -6156,7 +6703,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_cxx_main=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -6316,10 +6863,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -6353,10 +6907,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -6421,10 +6982,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 @@ -6458,10 +7026,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else @@ -6516,7 +7091,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -6598,7 +7173,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -6694,10 +7269,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -6873,10 +7465,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -6937,10 +7546,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 @@ -6954,15 +7580,16 @@ fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of size_t" >&5 echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; } if test "${ac_cv_sizeof_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else + if test "$ac_cv_type_size_t" = yes; then + # The cast to long int works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF @@ -6972,7 +7599,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef size_t ac__type_sizeof_; + typedef size_t ac__type_sizeof_; int main () { @@ -6996,10 +7623,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7009,7 +7653,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef size_t ac__type_sizeof_; + typedef size_t ac__type_sizeof_; int main () { @@ -7033,10 +7677,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -7063,7 +7724,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef size_t ac__type_sizeof_; + typedef size_t ac__type_sizeof_; int main () { @@ -7087,10 +7748,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF @@ -7100,7 +7778,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef size_t ac__type_sizeof_; + typedef size_t ac__type_sizeof_; int main () { @@ -7124,10 +7802,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 @@ -7164,7 +7859,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef size_t ac__type_sizeof_; + typedef size_t ac__type_sizeof_; int main () { @@ -7188,10 +7883,27 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 @@ -7204,15 +7916,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_size_t=$ac_lo;; -'') if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_size_t=0 - fi ;; + { (exit 77); exit 77; }; } ;; esac else cat >conftest.$ac_ext <<_ACEOF @@ -7222,7 +7930,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef size_t ac__type_sizeof_; + typedef size_t ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include <stdio.h> @@ -7281,25 +7989,21 @@ echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -if test "$ac_cv_type_size_t" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (size_t) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } - else - ac_cv_sizeof_size_t=0 - fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val +else + ac_cv_sizeof_size_t=0 +fi fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; } - - - cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF @@ -7458,8 +8162,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -7468,13 +8171,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi - - +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # PATH needs CR @@ -7698,28 +8398,19 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' + as_executable_p=: fi -as_executable_p=$as_test_x +rm -f conf$$.file # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -7735,7 +8426,7 @@ exec 6>&1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7763,7 +8454,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit + -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -7784,7 +8475,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.61, +configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. -- GitLab