]> SALOME platform Git repositories - modules/hexablock.git/commitdiff
Salome HOME
First publish of HEXABLOCKcomponant cea
authorfkl <fkl>
Mon, 22 Nov 2010 16:07:05 +0000 (16:07 +0000)
committerfkl <fkl>
Mon, 22 Nov 2010 16:07:05 +0000 (16:07 +0000)
Francis KLOSS

175 files changed:
AUTHORS [new file with mode: 0755]
COPYING [new file with mode: 0755]
ChangeLog [new file with mode: 0755]
Doxyfile [new file with mode: 0755]
HEXABLOCK_version.h.in [new file with mode: 0755]
INSTALL [new file with mode: 0755]
Makefile.am [new file with mode: 0755]
NEWS [new file with mode: 0755]
README [new file with mode: 0755]
REMOVEME [deleted file]
aclocal.m4 [new file with mode: 0644]
adm_local/Makefile.am [new file with mode: 0755]
adm_local/unix/Makefile.am [new file with mode: 0755]
adm_local/unix/config_files/Makefile.am [new file with mode: 0755]
adm_local/unix/config_files/check_HEXABLOCK.m4 [new file with mode: 0755]
adm_local/unix/config_files/config.guess [new file with mode: 0755]
adm_local/unix/config_files/config.sub [new file with mode: 0755]
adm_local/unix/config_files/depcomp [new file with mode: 0755]
adm_local/unix/config_files/install-sh [new file with mode: 0755]
adm_local/unix/config_files/ltmain.sh [new file with mode: 0644]
adm_local/unix/config_files/missing [new file with mode: 0755]
adm_local/unix/config_files/py-compile [new file with mode: 0755]
adm_local/unix/make_common_starter.am [new file with mode: 0755]
bin/Makefile.am [new file with mode: 0755]
bin/VERSION.in [new file with mode: 0755]
bin/myrunSalome.py [new file with mode: 0755]
bin/runAppli.in [new file with mode: 0755]
build_configure [new file with mode: 0755]
clean_configure [new file with mode: 0755]
configure [new file with mode: 0755]
configure.ac [new file with mode: 0755]
cppunit-report.xml [new file with mode: 0755]
doc/Makefile.am [new file with mode: 0755]
doc/dev_guide.html [new file with mode: 0755]
doc/dev_guide.txt [new file with mode: 0755]
idl/CrossElements.idl [new file with mode: 0755]
idl/Cylinder.idl [new file with mode: 0755]
idl/Document.idl [new file with mode: 0755]
idl/Edge.idl [new file with mode: 0755]
idl/Element.idl [new file with mode: 0755]
idl/Elements.idl [new file with mode: 0755]
idl/Group.idl [new file with mode: 0755]
idl/HEXABLOCK_Gen.idl [new file with mode: 0755]
idl/Hexa.idl [new file with mode: 0755]
idl/Law.idl [new file with mode: 0755]
idl/Makefile.am [new file with mode: 0755]
idl/Pipe.idl [new file with mode: 0755]
idl/Propagation.idl [new file with mode: 0755]
idl/Quad.idl [new file with mode: 0755]
idl/Vector.idl [new file with mode: 0755]
idl/Vertex.idl [new file with mode: 0755]
resources/ExecHEXABLOCK.png [new file with mode: 0755]
resources/HEXABLOCK.png [new file with mode: 0755]
resources/HEXABLOCKCatalog.xml.in [new file with mode: 0755]
resources/Makefile.am [new file with mode: 0755]
resources/SalomeApp.xml [new file with mode: 0755]
salome_adm/unix/SALOMEconfig.h.in [new file with mode: 0755]
salome_adm/unix/config_files/config.guess [new file with mode: 0755]
salome_adm/unix/config_files/config.sub [new file with mode: 0755]
salome_adm/unix/config_files/depcomp [new file with mode: 0755]
salome_adm/unix/config_files/install-sh [new file with mode: 0755]
salome_adm/unix/config_files/ltmain.sh [new file with mode: 0755]
salome_adm/unix/config_files/missing [new file with mode: 0755]
src/HEXABLOCK/Hex.cxx [new file with mode: 0755]
src/HEXABLOCK/Hex.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCloner.cxx [new file with mode: 0755]
src/HEXABLOCK/HexCloner.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCrossElements.cxx [new file with mode: 0755]
src/HEXABLOCK/HexCrossElements.hxx [new file with mode: 0755]
src/HEXABLOCK/HexCylinder.cxx [new file with mode: 0644]
src/HEXABLOCK/HexCylinder.hxx [new file with mode: 0755]
src/HEXABLOCK/HexDiagnostics.hxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument.cxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument.hxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument_Xml.cxx [new file with mode: 0755]
src/HEXABLOCK/HexDocument_trans.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEdge.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEdge.hxx [new file with mode: 0755]
src/HEXABLOCK/HexElements.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements.hxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_bis.cxx [new file with mode: 0755]
src/HEXABLOCK/HexElements_grid.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEltBase.cxx [new file with mode: 0755]
src/HEXABLOCK/HexEltBase.hxx [new file with mode: 0755]
src/HEXABLOCK/HexGlobale.cxx [new file with mode: 0755]
src/HEXABLOCK/HexGlobale.hxx [new file with mode: 0755]
src/HEXABLOCK/HexGroups.hxx [new file with mode: 0755]
src/HEXABLOCK/HexHexa.cxx [new file with mode: 0755]
src/HEXABLOCK/HexHexa.hxx [new file with mode: 0755]
src/HEXABLOCK/HexLaw.hxx [new file with mode: 0755]
src/HEXABLOCK/HexMatrix.hxx [new file with mode: 0755]
src/HEXABLOCK/HexPipe.cxx [new file with mode: 0755]
src/HEXABLOCK/HexPipe.hxx [new file with mode: 0755]
src/HEXABLOCK/HexPropagation.hxx [new file with mode: 0755]
src/HEXABLOCK/HexQuad.cxx [new file with mode: 0755]
src/HEXABLOCK/HexQuad.hxx [new file with mode: 0755]
src/HEXABLOCK/HexShape.cxx [new file with mode: 0755]
src/HEXABLOCK/HexShape.hxx [new file with mode: 0755]
src/HEXABLOCK/HexVector.cxx [new file with mode: 0755]
src/HEXABLOCK/HexVector.hxx [new file with mode: 0755]
src/HEXABLOCK/HexVertex.cxx [new file with mode: 0755]
src/HEXABLOCK/HexVertex.hxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlTree.cxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlTree.hxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlWriter.cxx [new file with mode: 0755]
src/HEXABLOCK/HexXmlWriter.hxx [new file with mode: 0755]
src/HEXABLOCK/Makefile.am [new file with mode: 0755]
src/HEXABLOCK/hexa_base.hxx [new file with mode: 0755]
src/HEXABLOCK/hexa_utils.cxx [new file with mode: 0755]
src/HEXABLOCK/test_bielle.cxx [new file with mode: 0755]
src/HEXABLOCK/test_bride.cxx [new file with mode: 0755]
src/HEXABLOCK/test_bug1.cxx [new file with mode: 0755]
src/HEXABLOCK/test_debride.cxx [new file with mode: 0755]
src/HEXABLOCK/test_hexa1.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI.cxx [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCKGUI.h [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCK_icons.ts [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCK_msg_en.ts [new file with mode: 0755]
src/HEXABLOCKGUI/HEXABLOCK_msg_fr.ts [new file with mode: 0755]
src/HEXABLOCKGUI/Makefile.am [new file with mode: 0755]
src/HEXABLOCK_I/HEXABLOCK.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HEXABLOCK.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCrossElements_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCrossElements_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCylinder_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexCylinder_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexDocument_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexDocument_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexEdge_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexEdge_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexElements_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexElements_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexGroup_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexGroup_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexHexa_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexHexa_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexLaw_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexLaw_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPipe_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPipe_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPropagation_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexPropagation_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexQuad_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexQuad_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVector_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVector_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVertex_impl.cxx [new file with mode: 0755]
src/HEXABLOCK_I/HexVertex_impl.hxx [new file with mode: 0755]
src/HEXABLOCK_I/Makefile.am [new file with mode: 0755]
src/HEXABLOCK_I/hexablock.py [new file with mode: 0755]
src/Makefile.am [new file with mode: 0755]
src/TEST_CPP/HexEdgeTest.cxx [new file with mode: 0755]
src/TEST_CPP/HexEdgeTest.hxx [new file with mode: 0755]
src/TEST_CPP/HexVertexTest.cxx [new file with mode: 0755]
src/TEST_CPP/HexVertexTest.hxx [new file with mode: 0755]
src/TEST_CPP/Makefile.am [new file with mode: 0755]
src/TEST_CPP/Makefile.orig.am [new file with mode: 0755]
src/TEST_CPP/ModelTest.cxx [new file with mode: 0755]
src/TEST_CPP/ModelTest.hxx [new file with mode: 0755]
src/TEST_CPP/Test_HEXABLOCK.cxx [new file with mode: 0755]
src/TEST_PY/BIELLE.py [new file with mode: 0755]
src/TEST_PY/BRIDE.py [new file with mode: 0755]
src/TEST_PY/INTER_3_CYLINDRE.py [new file with mode: 0755]
src/TEST_PY/Makefile.am [new file with mode: 0755]
src/TEST_PY/TUYAU_COURBE.py [new file with mode: 0755]
src/TEST_PY/Test_HEXABLOCK.py [new file with mode: 0755]
src/TEST_PY/crank.stp [new file with mode: 0755]
src/TEST_PY/tees.brep [new file with mode: 0755]
src/TEST_PY/test_BIELLE_bad_assoc.py [new file with mode: 0755]
src/TEST_PY/test_BIELLE_no_assoc.py [new file with mode: 0755]
src/TEST_PY/test_HEXABLOCK.py [new file with mode: 0755]
src/TEST_PY/test_INTER_3_CYLINDRE_no_assoc.py [new file with mode: 0755]
src/TEST_PY/test_TUYAU_COURBE_no_assoc.py [new file with mode: 0755]
src/TEST_PY/test_TUYAU_COURBE_weird_assoc.py [new file with mode: 0755]
src/TEST_PY/tuyau.brep [new file with mode: 0755]

diff --git a/AUTHORS b/AUTHORS
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/COPYING b/COPYING
new file mode 100755 (executable)
index 0000000..b1e3f5a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,504 @@
+                 GNU LESSER GENERAL PUBLIC LICENSE
+                      Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+                 GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+\f
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+\f
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/Doxyfile b/Doxyfile
new file mode 100755 (executable)
index 0000000..ff8903d
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,283 @@
+# Doxyfile 1.5.1-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = HEXA
+PROJECT_NUMBER         = [5.1.2]
+OUTPUT_DIRECTORY       = 
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+USE_WINDOWS_ENCODING   = NO
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = /home/bphetsar/
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = NO
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+FILE_VERSION_FILTER    = 
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           = 
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = /export/home/bphetsar/PR_HEX/HEXA_SRC
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.C \
+                         *.CC \
+                         *.C++ \
+                         *.II \
+                         *.I++ \
+                         *.H \
+                         *.HH \
+                         *.H++ \
+                         *.CS \
+                         *.PHP \
+                         *.PHP3 \
+                         *.M \
+                         *.MM \
+                         *.PY \
+                         *.C \
+                         *.H \
+                         *.tlh \
+                         *.diff \
+                         *.patch \
+                         *.moc \
+                         *.xpm \
+                         *.dox
+RECURSIVE              = yes
+EXCLUDE                = 
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          = 
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = 
+HTML_FOOTER            = 
+HTML_STYLESHEET        = 
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = 
+HHC_LOCATION           = 
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = YES
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         = 
+LATEX_HEADER           = 
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    = 
+RTF_EXTENSIONS_FILE    = 
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = yes
+XML_OUTPUT             = xml
+XML_SCHEMA             = 
+XML_DTD                = 
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX = 
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           = 
+INCLUDE_FILE_PATTERNS  = 
+PREDEFINED             = 
+EXPAND_AS_DEFINED      = 
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+TAGFILES               = 
+GENERATE_TAGFILE       = HEXA.tag
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               = 
+DOTFILE_DIRS           = 
+MAX_DOT_GRAPH_WIDTH    = 1024
+MAX_DOT_GRAPH_HEIGHT   = 1024
+MAX_DOT_GRAPH_DEPTH    = 1000
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+SEARCHENGINE           = NO
diff --git a/HEXABLOCK_version.h.in b/HEXABLOCK_version.h.in
new file mode 100755 (executable)
index 0000000..fca43e2
--- /dev/null
@@ -0,0 +1,36 @@
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//  File   : HEXABLOCK_version.h
+//  Author : Vadim SANDLER
+//  Module : SALOME
+//
+#if !defined(__HEXABLOCK_VERSION_H__)
+#define __HEXABLOCK_VERSION_H__
+
+/*
+  HEXABLOCK_VERSION is (major << 16) + (minor << 8) + patch.
+*/
+
+#define HEXABLOCK_VERSION_STR "@VERSION@"
+#define HEXABLOCK_VERSION     @XVERSION@
+
+#endif // __HEXABLOCK_VERSION_H__
diff --git a/INSTALL b/INSTALL
new file mode 100755 (executable)
index 0000000..4bf4d3a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1 @@
+SALOME6 : HEXABLOCK module
diff --git a/Makefile.am b/Makefile.am
new file mode 100755 (executable)
index 0000000..6710848
--- /dev/null
@@ -0,0 +1,50 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# -* Makefile *-
+# Author : Patrick GOLDBRONN (CEA)
+# Date : 28/06/2001
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+# $Header:
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+ACLOCAL_AMFLAGS = -I adm_local/unix/config_files \
+                  -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+                  -I ${GUI_ROOT_DIR}/adm_local/unix/config_files 
+
+SUBDIRS = idl adm_local resources src bin doc
+
+DIST_SUBDIRS= idl adm_local resources src bin doc
+
+DISTCLEANFILES = a.out aclocal.m4 configure
+
+salomeinclude_DATA = HEXABLOCK_version.h
+
+EXTRA_DIST +=          \
+       build_configure \
+       clean_configure
+
+dist-hook:
+       rm -rf `find $(distdir) -name CVS`
+
+unittest:
+       ( ./src/TEST_CPP/Tes_tHEXABLOCK )
diff --git a/NEWS b/NEWS
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/REMOVEME b/REMOVEME
deleted file mode 100644 (file)
index d922b0a..0000000
--- a/REMOVEME
+++ /dev/null
@@ -1 +0,0 @@
-To be removed from CVS
\ No newline at end of file
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..84e9355
--- /dev/null
@@ -0,0 +1,10419 @@
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf.  If you want to use that,
+you should regenerate the build system entirely.], [63])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 48 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+                [m4_ifdef([AC_PROVIDE_$1],
+                          [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+       [AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+            [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+            [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+            [define([LT_AC_PROG_GCJ],
+               defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    AC_PATH_MAGIC
+  fi
+  ;;
+esac
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
+
+AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+       [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+AC_ARG_WITH([pic],
+    [AC_HELP_STRING([--with-pic],
+       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_DEFUN([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
+[ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
+[ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+            [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+        [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+[$]*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+        test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+        test "X$echo_testing_string" = "X$echo_test_string"; then
+       # Cool, printf works
+       :
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+       export CONFIG_SHELL
+       SHELL="$CONFIG_SHELL"
+       export SHELL
+       echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       echo="$CONFIG_SHELL [$]0 --fallback-echo"
+      else
+       # maybe with a smaller string...
+       prev=:
+
+       for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+         then
+           break
+         fi
+         prev="$cmd"
+       done
+
+       if test "$prev" != 'sed 50q "[$]0"'; then
+         echo_test_string=`eval $prev`
+         export echo_test_string
+         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+       else
+         # Oops.  We lost completely, so just stick with echo.
+         echo=echo
+       fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+    [AC_HELP_STRING([--disable-libtool-lock],
+       [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+  ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$5], , :, [$5])
+else
+    ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                          [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    ifelse([$4], , :, [$4])
+else
+    ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[       ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+           new_result=`expr "X$teststring" : ".*" 2>&1` &&
+           lt_cv_sys_max_cmd_len=$new_result &&
+           test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# ------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ---------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}]
+EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# ----------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+   ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+         [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+           [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+       [AC_CHECK_FUNC([dlopen],
+             [lt_cv_dlopen="dlopen"],
+         [AC_CHECK_LIB([dl], [dlopen],
+               [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+           [AC_CHECK_LIB([svld], [dlopen],
+                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+             [AC_CHECK_LIB([dld], [dld_link],
+                   [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+             ])
+           ])
+         ])
+       ])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+         lt_cv_dlopen_self, [dnl
+         _LT_AC_TRY_DLOPEN_SELF(
+           lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+           lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+         lt_cv_dlopen_self_static, [dnl
+         _LT_AC_TRY_DLOPEN_SELF(
+           lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+           lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
+   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_AC_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         AC_MSG_RESULT([yes])
+       else
+  AC_MSG_RESULT([no])
+fi
+       ;;
+   *)
+  AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+    if AC_TRY_EVAL(ac_compile); then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,   ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+        [include additional configurations @<:@automatic@:>@])],
+    [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    AC_MSG_WARN([output file `$ofile' does not exist])
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+    else
+      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+    "") ;;
+    *)  AC_MSG_ERROR([invalid tag name: $tagname])
+       ;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      AC_MSG_ERROR([tag name \"$tagname\" already exists])
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+           (test "X$CXX" != "Xg++"))) ; then
+         AC_LIBTOOL_LANG_CXX_CONFIG
+       else
+         tagname=""
+       fi
+       ;;
+
+      F77)
+       if test -n "$F77" && test "X$F77" != "Xno"; then
+         AC_LIBTOOL_LANG_F77_CONFIG
+       else
+         tagname=""
+       fi
+       ;;
+
+      GCJ)
+       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+         AC_LIBTOOL_LANG_GCJ_CONFIG
+       else
+         tagname=""
+       fi
+       ;;
+
+      RC)
+       AC_LIBTOOL_LANG_RC_CONFIG
+       ;;
+
+      *)
+       AC_MSG_ERROR([Unsupported tag name: $tagname])
+       ;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    AC_MSG_ERROR([unable to update list of available tagged configurations.])
+  fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 DLLs
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+       [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+# set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+       [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="ifelse([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+    [AC_HELP_STRING([--with-gnu-ld],
+       [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix3*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       # Tru64's nm complains that /dev/null is an invalid object file
+       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+       */dev/null* | *'Invalid file or object type'*)
+         lt_cv_path_NM="$tmp_nm -B"
+         break
+         ;;
+       *)
+         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+         */dev/null*)
+           lt_cv_path_NM="$tmp_nm -p"
+           break
+           ;;
+         *)
+           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+           continue # so that we can try to find one that supports BSD flags
+           ;;
+         esac
+         ;;
+       esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
+# (note the single quotes!).  If your package is not flat and you're not
+# using automake, define top_builddir and top_srcdir appropriately in
+# the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  case $enable_ltdl_convenience in
+  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+  "") enable_ltdl_convenience=yes
+      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+  esac
+  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments.  Note that
+# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
+# '${top_srcdir}/' (note the single quotes!).  If your package is not
+# flat and you're not using automake, define top_builddir and top_srcdir
+# appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+  AC_CHECK_LIB(ltdl, lt_dlinit,
+  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+  [if test x"$enable_ltdl_install" = xno; then
+     AC_MSG_WARN([libltdl not installed, but installation disabled])
+   else
+     enable_ltdl_install=yes
+   fi
+  ])
+  if test x"$enable_ltdl_install" = x"yes"; then
+    ac_configure_args="$ac_configure_args --enable-ltdl-install"
+    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+  else
+    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+    LIBLTDL="-lltdl"
+    LTDLINCL=
+  fi
+  # For backwards non-gettext consistent compatibility...
+  INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
+
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+# _LT_AC_PROG_CXXCPP
+# ------------------
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
+[
+AC_REQUIRE([AC_PROG_CXX])
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+fi
+])# _LT_AC_PROG_CXXCPP
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+        [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+          [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# -------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF
+
+# Report which library types will actually be built
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+  AC_PROG_LD
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+       grep 'no-whole-archive' > /dev/null; then
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+       for ld_flag in $LDFLAGS; do
+         case $ld_flag in
+         *-brtl*)
+           aix_use_runtimelinking=yes
+           break
+           ;;
+         esac
+       done
+       ;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    _LT_AC_TAGVAR(archive_cmds, $1)=''
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[[012]]|aix4.[[012]].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+       collect2name=`${CC} -print-prog-name=collect2`
+       if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+       then
+         # We have reworked collect2
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+       else
+         # We have old collect2
+         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+       fi
+       ;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+       shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+       shared_flag='-G'
+      else
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag='${wl}-G'
+       else
+         shared_flag='${wl}-bM:SRE'
+       fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      _LT_AC_SYS_LIBPATH_AIX
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+       # Warning - without using the other run time loading flags,
+       # -berok will link without error, but may produce a broken library.
+       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+       # Exported symbols can be pulled into shared objects from archives
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+       # This is similar to how AIX traditionally builds its shared libraries.
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+    # as there is no search path for DLLs.
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+    _LT_AC_TAGVAR(always_export_symbols, $1)=no
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+       cp $export_symbols $output_objdir/$soname.def;
+      else
+       echo EXPORTS > $output_objdir/$soname.def;
+       cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      ghcx*)
+       # Green Hills C++ Compiler
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  freebsd[[12]]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  freebsd-elf*)
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+                               # but as the default
+                               # location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    aCC*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+      case $host_cpu in
+      hppa*64*|ia64*)
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+        ;;
+      *)
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+    *)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      aCC*)
+       case $host_cpu in
+       hppa*64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       ia64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       *)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       esac
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test $with_gnu_ld = no; then
+           case $host_cpu in
+           hppa*64*)
+             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           ia64*)
+             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           *)
+             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           esac
+         fi
+       else
+         # FIXME: insert proper C++ library support
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+    esac
+    ;;
+  interix3*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+       # SGI C++
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+       # Archives containing C++ object files must be created using
+       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test "$with_gnu_ld" = no; then
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+         else
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+         fi
+       fi
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+    esac
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+       ;;
+      icpc*)
+       # Intel C++
+       with_gnu_ld=yes
+       # version 8.0 and above of icpc choke on multiply defined symbols
+       # if we add $predep_objects and $postdep_objects, however 7.1 and
+       # earlier do not add the objects themselves.
+       case `$CC -V 2>&1` in
+       *"Version 7."*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         ;;
+       *)  # Version 8.0 or newer
+         tmp_idyn=
+         case $host_cpu in
+           ia64*) tmp_idyn=' -i_dynamic';;
+         esac
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         ;;
+       esac
+       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+       ;;
+      pgCC*)
+        # Portland Group C++ compiler
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+       # Compaq C++
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+       runpath_var=LD_RUN_PATH
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  openbsd*)
+    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+       ;;
+      RCC*)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      cxx*)
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Archives containing C++ object files must be created using
+       # the KAI C++ compiler.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+       ;;
+      RCC*)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      cxx*)
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+         echo "-hidden">> $lib.exp~
+         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+         $rm $lib.exp'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
+       ;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+       # Sun C++ 4.x
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      lcc*)
+       # Lucid
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+       # Sun C++ 4.2, 5.x and Centerline C++
+        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
+       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       case $host_os in
+         solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+         *)
+           # The C++ compiler is used as linker so we must use $wl
+           # flag to pass the commands to the underlying system
+           # linker. We must also pass each convience library through
+           # to the system linker between allextract/defaultextract.
+           # The C++ compiler will combine linker options so we
+           # cannot just pass the convience library names through
+           # without $wl.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+           ;;
+       esac
+       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+       output_verbose_link_cmd='echo'
+
+       # Archives containing C++ object files must be created using
+       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+       ;;
+      gcx*)
+       # Green Hills C++ Compiler
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+       # The C++ compiler must be used to create the archive.
+       _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+       ;;
+      *)
+       # GNU C++ compiler with Solaris linker
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+         if $CC --version | grep -v '^2\.7' > /dev/null; then
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+         else
+           # g++ 2.7 appears to require `-G' NOT `-shared' on this
+           # platform.
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+         fi
+
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+       fi
+       ;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      *)
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      *)
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+       # NonStop-UX NCC 3.20
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       ;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+    ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+         || test $p = "-R"; then
+        prev=$p
+        continue
+       else
+        prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+          else
+            _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+       else
+        if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+          _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+        else
+          _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+        fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+        pre_test_object_deps_done=yes
+        continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+          _LT_AC_TAGVAR(predep_objects, $1)="$p"
+        else
+          _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+        fi
+       else
+        if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+          _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+        else
+          _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+        fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+interix3*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_AC_TAGVAR(predep_objects,$1)=
+  _LT_AC_TAGVAR(postdep_objects,$1)=
+  _LT_AC_TAGVAR(postdeps,$1)=
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# AC_LIBTOOL_LANG_F77_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# -------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined.  Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars.  Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    _LT_AC_TAGVAR(compiler, $1) \
+    _LT_AC_TAGVAR(CC, $1) \
+    _LT_AC_TAGVAR(LD, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+    _LT_AC_TAGVAR(old_archive_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+    _LT_AC_TAGVAR(predep_objects, $1) \
+    _LT_AC_TAGVAR(postdep_objects, $1) \
+    _LT_AC_TAGVAR(predeps, $1) \
+    _LT_AC_TAGVAR(postdeps, $1) \
+    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+    _LT_AC_TAGVAR(archive_cmds, $1) \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(postinstall_cmds, $1) \
+    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+    _LT_AC_TAGVAR(no_undefined_flag, $1) \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+    _LT_AC_TAGVAR(hardcode_automatic, $1) \
+    _LT_AC_TAGVAR(module_cmds, $1) \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+    _LT_AC_TAGVAR(exclude_expsyms, $1) \
+    _LT_AC_TAGVAR(include_expsyms, $1); do
+
+    case $var in
+    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_cmds, $1) | \
+    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(module_cmds, $1) | \
+    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\[$]0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+    ;;
+  esac
+
+ifelse([$1], [],
+  [cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  AC_MSG_NOTICE([creating $ofile])],
+  [cfgfile="$ofile"])
+
+  cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
+
+# Is the compiler the GNU C compiler?
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+
+# Symbols that must always be exported.
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
+
+__EOF__
+
+ifelse([$1],[], [
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+])
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+])# AC_LIBTOOL_CONFIG
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDGIRSTW]]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+       mv -f "$nlist"T "$nlist"
+      else
+       rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+       if grep ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+         cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+         cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_save_LIBS="$LIBS"
+         lt_save_CFLAGS="$CFLAGS"
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+         if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS="$lt_save_LIBS"
+         CFLAGS="$lt_save_CFLAGS"
+       else
+         echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+       fi
+      else
+       echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       ;;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+       else
+         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68*)
+         # Green Hills C++ Compiler
+         # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+         ;;
+       esac
+       ;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         ghcx*)
+           # Green Hills C++ Compiler
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC*)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           if test "$host_cpu" != ia64; then
+             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+           fi
+           ;;
+         aCC*)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+           case $host_cpu in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      interix*)
+       # This is c89, which is MS Visual C++ (no shared libs)
+       # Anyone wants to do a port?
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC*)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux*)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+           ;;
+         icpc* | ecpc*)
+           # Intel C++
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+           ;;
+         pgCC*)
+           # Portland Group C++ compiler.
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         cxx*)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      lynxos*)
+       ;;
+      m88k*)
+       ;;
+      mvs*)
+       case $cc_basename in
+         cxx*)
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      netbsd*)
+       ;;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC*)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+           ;;
+         RCC*)
+           # Rational C++ 2.4.1
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         cxx*)
+           # Digital/Compaq C++
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+           ;;
+         gcx*)
+           # Green Hills C++ Compiler
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.x
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+         lcc*)
+           # Lucid
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC*)
+           # NonStop-UX NCC 3.20
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+       case $cc_basename in
+         CC*)
+           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+           ;;
+       esac
+       ;;
+      vxworks*)
+       ;;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+       ;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+])
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+],[
+  runpath_var=
+  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_AC_TAGVAR(archive_cmds, $1)=
+  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_AC_TAGVAR(hardcode_direct, $1)=no
+  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+  _LT_AC_TAGVAR(module_cmds, $1)=
+  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+  _LT_AC_TAGVAR(always_export_symbols, $1)=no
+  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_AC_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  _LT_CC_BASENAME([$compiler])
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=no
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    interix3*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+       if test $supports_anon_versioning = yes; then
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+      else
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+         else
+           _LT_AC_TAGVAR(ld_shlibs, $1)=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+       else
+         _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
+
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
+
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_AC_TAGVAR(archive_cmds, $1)=''
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[[012]]|aix4.[[012]].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+         else
+         # We have old collect2
+         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       _LT_AC_SYS_LIBPATH_AIX
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        _LT_AC_SYS_LIBPATH_AIX
+        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      # see comment about different semantics on the GNU ld section
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    bsdi[[45]]*)
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+      # FIXME: Should let the user specify the lib program.
+      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[[012]])
+         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[[012]])
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_direct, $1)=no
+      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+    if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         _LT_AC_TAGVAR(ld_shlibs, $1)=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no
+         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+         ;;
+       *)
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    openbsd*)
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      else
+       case $host_os in
+        openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+          ;;
+        *)
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       wlarc=''
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+       *)
+         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+      esac
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no
+        ;;
+       motorola)
+         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_AC_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+  fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_AC_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+       pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+        then
+         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+        fi
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
+  fi
+  ;;
+esac
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# #  ifdef __CYGWIN32__
+# #    define __CYGWIN__ __CYGWIN32__
+# #  endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+#   __hDllInstance_base = hInst;
+#   return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
+
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+  AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_MSG_RESULT([$SED])
+])
+
+# Copyright (C) 2002, 2003, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.10], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+AC_DEFUN([AM_PATH_PYTHON],
+ [
+  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
+  dnl supported because the default installation locations changed from
+  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+  dnl in 1.5.
+  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
+                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
+python2.1 python2.0 python1.6 python1.5])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+                             [AC_MSG_RESULT(yes)],
+                             [AC_MSG_ERROR(too old)])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
+       [am_cv_pathless_PYTHON],[
+       for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
+         test "$am_cv_pathless_PYTHON" = none && break
+         AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+       done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+       PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.  distutils does not exist in
+  dnl Python 1.5, so we fall back to the hardcoded directory if it
+  dnl doesn't work.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# hexversion has been introduced in Python 1.5.2; it's probably not
+# worth to support older versions (1.5.1 was released on October 31, 1998).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_OPENGL],[
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_ARG_WITH(opengl,
+  [AC_HELP_STRING([--with-opengl=DIR],[root directory path of OpenGL installation])],
+  [opengl_dir="$withval"], 
+  [dirs="/usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/graphics/OpenGL/lib64 /opt/graphics/OpenGL/lib /usr/openwin/lib64 /usr/openwin/lib /usr/X11R6/lib64 /usr/X11R6/lib"])dnl
+
+AC_CHECKING(for OpenGL)
+AC_CHECKING(for OpenGL headers)
+
+OGL_INCLUDES=""
+OGL_LIBS=""
+
+GL_LIB_PATH=""
+GLU_LIB_PATH=""
+
+OpenGL_ok=no
+OpenGL_libs_ok=no
+OpenGL_headers_ok=no
+
+dnl openGL headers
+# by default
+if test "x${opengl_dir}" != "x" ; then
+  AC_MSG_RESULT(for opengl_dir: $opengl_dir)
+  AC_CHECK_HEADER([${opengl_dir}/include/GL/gl.h],
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I${opengl_dir}/include"],
+                  [OpenGL_headers_ok=no])
+  if test "x${OpenGL_headers_ok}" = "xyes" ; then
+    AC_CHECKING(for default OpenGL library)
+    if test "x${opengl_dir}" = "x/usr" ; then
+      OGL_LIBS=""
+    else
+      OGL_LIBS="-L${opengl_dir}/lib"
+    fi
+    LDFLAGS_old="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $OGL_LIBS"
+    AC_CHECK_LIB([GL],
+                 [glBegin],
+                 [OpenGL_libs_ok=yes],
+                 [OpenGL_libs_ok=no])
+    if test "x${OpenGL_libs_ok}" = "xyes" ; then
+      AC_TRY_LINK([],
+                  [],
+                  [OpenGL_libs_ok=yes ; OpenGL_ok=yes; OGL_LIBS="$OGL_LIBS -lGL"],
+                  [OpenGL_libs_ok=no])
+    fi
+    LDFLAGS="$LDFLAGS_old"
+  fi
+fi
+
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  AC_CHECK_HEADER(GL/gl.h,
+                  [OpenGL_headers_ok=yes],
+                  [OpenGL_headers_ok=no])
+fi
+
+# under SunOS ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h,
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/openwin/share/include/"],
+                  [OpenGL_headers_ok=no])
+fi
+
+# under IRIX ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h,
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/opt/graphics/OpenGL/include"],
+                  [OpenGL_headers_ok=no])
+fi
+
+# some linux OpenGL servers hide the includes in /usr/X11R6/include/GL
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h,
+                  [OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/X11R6/include"],
+                  [OpenGL_headers_ok=no])
+fi
+
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
+  AC_CHECKING(for OpenGL library)
+  for idir in $dirs; do
+    if test -r "${idir}/libGL.so"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GL_LIB_PATH=""
+      else
+        GL_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+    # under IRIX ?
+    if test -r "${idir}/libGL.sl"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GL_LIB_PATH=""
+      else
+        GL_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+  done
+  LDFLAGS_old="${LDFLAGS}"
+  LDFLAGS="${LDFLAGS} ${GL_LIB_PATH}"
+  AC_CHECK_LIB([GL],
+               [glBegin],
+               [OpenGL_libs_ok=yes],
+               [OpenGL_libs_ok=no])
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    AC_TRY_LINK([],
+                [],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GL_LIB_PATH} -lGL"],
+                [OpenGL_libs_ok=no])
+  fi
+  LDFLAGS="$LDFLAGS_old"
+fi
+
+if test "x${OpenGL_libs_ok}" = "xyes" ; then
+  for idir in $dirs; do
+    if test -r "${idir}/libGLU.so"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GLU_LIB_PATH=""
+      else
+        GLU_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+    # under IRIX ?
+    if test -r "${idir}/libGLU.sl"; then
+      AC_MSG_RESULT(in ${idir})
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GLU_LIB_PATH=""
+      else
+        GLU_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+  done
+
+  # workaround a problem with libGL library location
+  for idir in $dirs; do
+    if test -r "${idir}/libGLU.la"; then
+      GLU_LA_PATH="${idir}/libGLU.la"
+      GL_LA_PATH_TO_CHECK=`cat ${GLU_LA_PATH} | awk '{ for(i=1;i<NF;i++){ if(gsub("libGL.la","&",$i)>0) print $i } }'`
+      if test -z ${GL_LA_PATH_TO_CHECK} || test -r ${GL_LA_PATH_TO_CHECK}; then
+        # nothing to do
+        break
+      fi
+      for jdir in $dirs; do
+        if test -r "${jdir}/libGL.la"; then
+          GL_LA_PATH="${jdir}/libGL.la"
+          # copy the libGLU.la file and set correct libGL.la path in it
+          NEW_GLU_LA_PATH=${ROOT_BUILDDIR}
+          NEW_GLU_LA_FILE="${NEW_GLU_LA_PATH}/libGLU.la"
+          sed -e "s%${GL_LA_PATH_TO_CHECK}%${GL_LA_PATH}%" ${GLU_LA_PATH} > "${NEW_GLU_LA_FILE}"
+          chmod -f --reference=${GLU_LA_PATH} "${NEW_GLU_LA_FILE}"
+          # set a new libGLU.la path
+          GLU_LIB_PATH="-L${NEW_GLU_LA_PATH}"
+          # create a simbolic link to libGLU.so
+          for kdir in $dirs; do
+            if test -r "${kdir}/libGLU.so"; then
+              cp -fs "${kdir}/libGLU.so" "${NEW_GLU_LA_PATH}/libGLU.so"
+              break
+            fi
+          done
+          break
+        fi
+      done
+      break
+    fi
+  done
+
+  LDFLAGS_old="${LDFLAGS}"
+  LDFLAGS="${LDFLAGS} ${OGL_LIBS} ${GLU_LIB_PATH}"
+  AC_CHECK_LIB([GLU],
+               [gluBeginSurface],
+               [OpenGL_libs_ok=yes],
+               [OpenGL_libs_ok=no])
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    AC_TRY_LINK([],
+                [],
+                [OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GLU_LIB_PATH} -lGLU"],
+                [OpenGL_libs_ok=no])
+  fi
+  LDFLAGS="$LDFLAGS_old"
+fi
+
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    OpenGL_ok=yes
+  fi
+fi
+
+AC_MSG_RESULT(for OpenGL_headers_ok: $OpenGL_headers_ok)
+AC_MSG_RESULT(for OpenGL_libs_ok: $OpenGL_libs_ok)
+AC_MSG_RESULT(for OpenGL_ok: $OpenGL_ok)
+
+AC_SUBST(OGL_INCLUDES)
+AC_SUBST(OGL_LIBS)
+
+AC_LANG_RESTORE
+
+])dnl
+
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl  OPTIONS_QT
+dnl  ------------------------------------------------------------------------
+dnl  Adds the --with-qt=path
+dnl
+AC_DEFUN([OPTIONS_QT], [
+  AC_ARG_WITH([qt],
+              [AC_HELP_STRING([--with-qt], [Possible usage:
+                                             "Qt_Install_Path" - prefix to path where Qt was installd;
+                                             "" or "yes" or "auto" - means seaching installed Qt product in the system (checking $QTDIR and then - standard system paths );
+                                             "no" - not use Qt product (is not supported)
+                                            By default "" option is used)])],
+              [with_qt=$withval], [with_qt=""])
+])
+
+AC_DEFUN([CHECK_QT],[
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_PROG_CXXCPP])dnl
+AC_REQUIRE([CHECK_OPENGL])dnl
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+AC_REQUIRE([OPTIONS_QT])dnl
+
+AC_CHECKING(for Qt)
+
+if test "x$OpenGL_ok" != "xyes" ; then
+   AC_MSG_WARN(Qt needs OpenGL correct configuration, check configure output)
+fi
+
+qt_ok=yes
+
+QTDIR=$(echo $QTDIR | sed 's%[/]\+$%%')
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+dnl QT install dir
+if test -z $with_qt ; then
+  with_qt=""
+fi
+if test "x$with_qt" = "xyes" ; then
+  dnl in case user wrote --with-qt=yes
+  with_qt=""
+fi
+if test "x$with_qt" = "xauto" ; then
+  dnl in case user wrote --with-qt=auto
+  with_qt=""
+fi
+if test "x$with_qt" = "xno" ; then
+  dnl in case user wrote --with-qt=no
+  with_qt=""
+  AC_MSG_WARN(Value no, specified for option --with-qt, is not supported)
+fi
+
+if test "x$with_qt" != "x" ; then
+  dnl Using "--with-qt" prefix path
+  QTDIR="$with_qt"
+elif test "$QTDIR" = "/usr/lib/qt3" ; then
+  dnl Using QTDIR environment variable
+  AC_MSG_RESULT(current QTDIR is $QTDIR)
+  dnl 
+  if test -d /usr/lib/qt4 ; then
+    AC_MSG_RESULT(it is strange for a qt4 installation !)
+    AC_MSG_RESULT(/usr/lib/qt4 is present)
+    AC_MSG_RESULT(replacing QTDIR by /usr/lib/qt4)
+    QTDIR=/usr/lib/qt4
+  fi
+elif test -z $QTDIR ; then
+  AC_MSG_WARN(undefined QTDIR variable which specify where Qt product was installed)
+  for d in /usr/local/lib/qt4 /usr/lib/qt4 /usr ; do
+    if test -f ${d}/lib/libQtCore.so ; then
+      AC_MSG_RESULT(trying ${d})
+      QTDIR="${d}"
+      break
+    elif test -f ${d}/lib64/libQtCore.so ; then
+      AC_MSG_RESULT(trying ${d})
+      QTDIR="${d}"
+      break
+    elif test -f ${d}/libQtCore.so ; then
+      AC_MSG_RESULT(trying ${d})
+      QTDIR="${d}"
+      break
+    fi
+  done
+fi
+
+#
+# check QTDIR environment variable
+#
+if test "x$QTDIR" = "x"
+then
+   AC_MSG_RESULT(Please define correct path in "--with-qt" option or use correct $QTDIR variable)
+   qt_ok=no
+fi
+
+#
+# check Qt version
+#
+if  test "x$qt_ok" = "xyes"
+then
+   qt_inc_ok=no
+   QTINC=""
+   AC_CHECK_FILE(${QTDIR}/include/qt4/QtCore/qglobal.h,QTINC="/qt4",QTINC="")
+   if test "x$QTINC" = "x"
+   then
+     AC_CHECK_FILE(${QTDIR}/include${QTINC}/QtCore/qglobal.h,qt_inc_ok=yes,qt_inc_ok=no)
+   else
+     qt_inc_ok=yes
+   fi
+   if test "x$qt_inc_ok" = "xyes"
+   then
+     AC_MSG_CHECKING(whether Qt version >= 4.0)
+     QT_VERSION=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/QtCore/qglobal.h | sed -e 's%^#define QT_VERSION_STR[[:space:]]*\"\([[:digit:]\.]*\)\"%\1%g'`
+     QT_VERSION_ID=`echo $QT_VERSION | awk -F. '{v=$[1]*10000+$[2]*100+$[3];print v}'`
+     if test $QT_VERSION_ID -ge 40000
+     then
+       AC_MSG_RESULT(yes)
+     else
+       AC_MSG_RESULT(no)
+       qt_ok=no
+     fi
+     AC_MSG_CHECKING(Qt version)
+     AC_MSG_RESULT($QT_VERSION)
+   else
+     qt_ok=no
+   fi
+fi
+
+#
+# check moc presence (meta-object compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/moc
+  then
+    MOC=${QTDIR}/bin/moc
+  else
+    AC_PATH_PROG(MOC, moc)
+  fi
+  if test "x$MOC" = "x"
+  then
+    qt_ok=no
+    AC_MSG_RESULT(moc (Qt meta-object compiler) is not in the PATH variable)
+  else
+    qt_ok=yes
+    AC_MSG_RESULT(moc (Qt meta-object compiler) is found)
+  fi
+
+  if test "x$qt_ok" = "xyes"
+  then
+    dnl check moc version
+    AC_MSG_CHECKING(cheching equality Qt and moc tool version)
+    MOC_VERSION=`$MOC -v 2>&1 | awk 'BEGIN{FS="[[ ()]]"};{print $(NF-1)}'`
+    if test "x$QT_VERSION" = "x$MOC_VERSION"
+    then
+      AC_MSG_RESULT(yes)
+      qt_ok=yes
+    else
+      AC_MSG_RESULT(moc tool and Qt product are incompatible $MOC_VERSION)
+      qt_ok=no
+    fi
+  fi
+fi
+
+#
+# check uic presence (user interface compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/uic
+  then
+    UIC=${QTDIR}/bin/uic
+  else
+    AC_PATH_PROG(UIC, uic)
+  fi
+  if test "x$UIC" = "x"
+  then
+    qt_ok=no
+    AC_MSG_RESULT(uic (Qt user interface compiler) is not in the PATH variable)
+  else
+    qt_ok=yes
+    AC_MSG_RESULT(uic (Qt user interface compiler) is found)
+  fi
+fi
+
+#
+# check rcc presence (resources compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/rcc
+  then
+    QRCC=${QTDIR}/bin/rcc
+  else
+    AC_PATH_PROG(QRCC, rcc)
+  fi
+  if test "x$QRCC" = "x"
+  then
+    qt_ok=no
+    AC_MSG_RESULT(rcc (Qt resources compiler) is not in the PATH variable)
+  else
+    qt_ok=yes
+    AC_MSG_RESULT(rcc (Qt resources compiler) is found)
+  fi
+
+  if test "x$qt_ok" = "xyes"
+  then
+    dnl check rcc version
+    AC_MSG_CHECKING(cheching equality Qt and rcc tool version)
+    QRCC_VERSION=`$QRCC -v 2>&1 | awk '{print $NF}'`
+    if test "x$QT_VERSION" = "x$QRCC_VERSION"
+    then
+      AC_MSG_RESULT(yes)
+      qt_ok=yes
+    else
+      AC_MSG_RESULT(rcc tool and Qt product are incompatible)
+      qt_ok=no
+    fi
+  fi
+fi
+
+#
+# check lrelease presence (translation files compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/lrelease
+  then
+    LRELEASE=${QTDIR}/bin/lrelease
+  else
+    AC_PATH_PROG(LRELEASE, lrelease)
+  fi
+  if test "x$LRELEASE" = "x"
+  then
+    qt_ok=no
+    AC_MSG_RESULT(lrelease (Qt translation files compiler) is not in the PATH variable)
+  else
+    qt_ok=yes
+    AC_MSG_RESULT(lrelease (Qt translation files compiler) is found)
+  fi
+  
+  if test "x$qt_ok" = "xyes"
+  then
+    dnl check lrelease version
+    AC_MSG_CHECKING( equality of Qt and lrelease tool version)
+    LRELEASE_VERSION=`$LRELEASE -version 2>&1 | awk '{print $NF}'`
+    if test "x$QT_VERSION" = "x$LRELEASE_VERSION"
+    then
+      AC_MSG_RESULT(yes)
+      qt_ok=yes
+    else
+      AC_MSG_RESULT(lrelease tool and Qt product are incompatible)
+      qt_ok=no
+    fi
+  fi
+fi
+
+QT_ROOT=$QTDIR
+
+#
+# check Qt header files
+#
+if  test "x$qt_ok" = "xyes"
+then
+  AC_CHECKING(include Qt header files)
+
+  CPPFLAGS_old=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS -I${QTDIR}/include${QTINC} -I${QTDIR}/include${QTINC}/QtCore"
+  AC_CHECK_HEADER(QObject,qt_ok=yes,qt_ok=no)
+  CPPFLAGS=$CPPFLAGS_old
+
+  if  test "x$qt_ok" = "xno"
+  then
+    AC_MSG_RESULT(qt header files are not found in $QTDIR/include${QTINC}/QtCore)
+    AC_MSG_RESULT(QTDIR environment variable may be wrong (probably too old Qt version))
+  else
+    AC_MSG_RESULT(qt header files seem to be OK)
+    QT_INCLUDES="-I${QTDIR}/include${QTINC}"
+    # user header files
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtCore"
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtGui"
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtOpenGL"
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtXml"
+    # not used currently header files (uncomment if required)
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtAssistant"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtDBus"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtDesigner"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtNetwork"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtSql"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtSvg"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtTest"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtUiTools"
+
+    QT_ASSISTANT_INCLUDES="${QT_ASSISTANT_INCLUDES} -I${QTDIR}/include${QTINC}/QtAssistant"
+    QT_ASSISTANT_INCLUDES="${QT_ASSISTANT_INCLUDES} -I${QTDIR}/include${QTINC}/QtNetwork"
+
+    # this flag is obsolete with Qt 4
+    QT_MT_INCLUDES="$QT_INCLUDES"
+  fi
+fi
+
+#
+# test Qt libraries
+#
+if  test "x$qt_ok" = "xyes"
+then
+  AC_MSG_CHECKING(linking against Qt library)
+
+  CXXFLAGS_old=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS $QT_INCLUDES"
+
+  LIBS_old=$LIBS
+  if test "x$QTDIR" = "x/usr" ; then
+    QT_LIB_DIR=""
+  elif test -d ${QTDIR}/lib; then
+    QT_LIB_DIR="-L$QTDIR/lib"
+  elif test -d ${QTDIR}/lib64; then
+    QT_LIB_DIR="-L$QTDIR/lib64"
+  elif test "x$QTDIR" = "x/usr/lib/qt4" ; then
+    QT_LIB_DIR=""
+  else
+    AC_MSG_ERROR(Can't detect of Qt library directory )
+    qt_ok=no
+  fi
+  LIBS="$LIBS $QT_LIB_DIR -lQtCore"
+
+  AC_CACHE_VAL(salome_cv_lib_qt,[
+    AC_TRY_LINK(
+#include <QCoreApplication>
+,   int n;
+    char **s;
+    QCoreApplication a(n, s);
+    a.exec();,
+    eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
+  ])
+  qt_ok="$salome_cv_lib_qt"
+
+  # BEGIN: for CCRT (installation of qt have only a "lib" directory)
+  if  test "x$qt_ok" = "xno"
+  then
+    QT_LIB_DIR="-L$QTDIR/lib"
+    LIBS="$LIBS_old $QT_LIB_DIR -lQtCore"
+
+    AC_CACHE_VAL(salome_cv_lib_qt,[
+      AC_TRY_LINK(
+#include <QCoreApplication>
+,     int n;
+      char **s;
+      QCoreApplication a(n, s);
+      a.exec();,
+      eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
+    ])
+    qt_ok="$salome_cv_lib_qt"
+  fi
+  # END: for CCRT
+
+  if  test "x$qt_ok" = "xno"
+  then
+    AC_MSG_RESULT(no)
+    AC_MSG_RESULT(unable to link with qt library)
+    AC_MSG_RESULT(QTDIR environment variable may be wrong (probably too old Qt version))
+  else
+    AC_MSG_RESULT(yes)
+    # core libs
+    QT_CORE_LIBS="$QT_LIB_DIR -lQtCore -lQtXml"
+    # gui libs
+    QT_GUI_LIBS="$QT_LIB_DIR -lQtGui -lQtOpenGL"
+    # other libs (currently not used)
+    QT_OTHER_LIBS="$QT_LIB_DIR"
+    # other libs (can be used if necessary)
+    #QT_OTHER_LIBS="$QT_LIB_DIR -lQt3Support -lQtAssistantClient -lQtDesigner -lQtNetwork -lQtSql -lQtSvg -lQtTest -ltQtUiTools"
+    QT_ASSISTANT_LIBS="$QT_LIB_DIR -lQtAssistantClient -lQtNetwork"
+    # all libs
+    QT_LIBS="$QT_CORE_LIBS $QT_GUI_LIBS $QT_OTHER_LIBS"
+    # this flag is obsolete with Qt 4
+    QT_MT_LIBS="$QT_LIBS"
+  fi
+  LIBS=$LIBS_old
+  CXXFLAGS=$CXXFLAGS_old
+fi
+
+AC_SUBST(QTDIR)
+AC_SUBST(MOC)
+AC_SUBST(UIC)
+AC_SUBST(QRCC)
+AC_SUBST(LRELEASE)
+
+AC_SUBST(QT_ROOT)
+AC_SUBST(QT_INCLUDES)
+AC_SUBST(QT_MT_INCLUDES)
+AC_SUBST(QT_ASSISTANT_INCLUDES)
+AC_SUBST(QT_LIB_DIR)
+AC_SUBST(QT_CORE_LIBS)
+AC_SUBST(QT_GUI_LIBS)
+AC_SUBST(QT_OTHER_LIBS)
+AC_SUBST(QT_LIBS)
+AC_SUBST(QT_MT_LIBS)
+AC_SUBST(QT_ASSISTANT_LIBS)
+AC_SUBST(QT_VERSION)
+AC_SUBST(QT_VERSION_ID)
+
+AC_LANG_RESTORE
+
+AC_MSG_RESULT(for Qt: $qt_ok)
+
+# Save cache
+AC_CACHE_SAVE
+
+])dnl
+dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+# Check availability of Geom binary distribution
+#
+# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
+#
+
+AC_DEFUN([CHECK_GEOM],[
+
+AC_CHECKING(for Geom)
+
+Geom_ok=no
+
+GEOM_LDFLAGS=""
+GEOM_CXXFLAGS=""
+
+AC_ARG_WITH(geom,
+           [  --with-geom=DIR root directory path of GEOM installation ],
+           GEOM_DIR="$withval",GEOM_DIR="")
+
+if test "x$GEOM_DIR" == "x" ; then
+
+# no --with-geom-dir option used
+
+   if test "x$GEOM_ROOT_DIR" != "x" ; then
+
+    # GEOM_ROOT_DIR environment variable defined
+      GEOM_DIR=$GEOM_ROOT_DIR
+
+   else
+
+    # search Geom binaries in PATH variable
+      AC_PATH_PROG(TEMP, libGEOM_Swig.py)
+      if test "x$TEMP" != "x" ; then
+         GEOM_BIN_DIR=`dirname $TEMP`
+         GEOM_DIR=`dirname $GEOM_BIN_DIR`
+      fi
+      
+   fi
+# 
+fi
+
+if test -f ${GEOM_DIR}/bin/salome/geompy.py ; then
+   Geom_ok=yes
+   AC_MSG_RESULT(Using Geom module distribution in ${GEOM_DIR})
+
+   if test "x$GEOM_ROOT_DIR" == "x" ; then
+      GEOM_ROOT_DIR=${GEOM_DIR}
+   fi
+   AC_SUBST(GEOM_ROOT_DIR)
+
+   GEOM_LDFLAGS=-L${GEOM_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+   GEOM_CXXFLAGS=-I${GEOM_DIR}/include/salome
+
+   AC_SUBST(GEOM_LDFLAGS)
+   AC_SUBST(GEOM_CXXFLAGS)
+
+else
+   AC_MSG_WARN("Cannot find compiled Geom module distribution")
+fi
+
+AC_MSG_RESULT(for Geom: $Geom_ok)
+])dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+#  Check availability of Salome binary distribution
+#
+#  Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_GUI_MODULE],[
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+LightGUI_ok=no
+FullGUI_ok=no
+
+GUI_LDFLAGS=""
+GUI_CXXFLAGS=""
+
+SALOME_GUI_DIR=""
+
+AC_ARG_WITH(gui, 
+           [--with-gui=DIR root directory path of SALOME GUI installation],
+           [],
+            [with_gui=auto])
+
+if test "${with_gui}" = "no"; then
+  SalomeGUI_need=no
+else
+  # define SALOME_GUI_DIR
+  if test "${with_gui}" = "yes" -o "${with_gui}" = "auto"; then
+    SalomeGUI_need="$with_gui"
+    AC_MSG_RESULT(try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR})
+    if test "x${GUI_ROOT_DIR}" != "x" ; then
+      # GUI_ROOT_DIR environment variable defined
+      SALOME_GUI_DIR=${GUI_ROOT_DIR}
+    else
+      # search Salome binaries in PATH variable
+      AC_PATH_PROG(TEMP, SUITApp)
+      if test "x${TEMP}" != "x" ; then
+        AC_MSG_RESULT(SUITApp was found at : ${TEMP})
+        SALOME_BIN_DIR=`dirname ${TEMP}`
+        SALOME_GUI_DIR=`cd ${SALOME_BIN_DIR}/../..; pwd`
+      fi
+    fi 
+  else
+    # GUI directory defined by user
+    SalomeGUI_need=yes
+    SALOME_GUI_DIR="$with_gui"
+  fi
+
+  # check GUI installation
+  AC_CHECKING(for light GUI)
+  if test -f ${SALOME_GUI_DIR}/bin/salome/SUITApp ; then
+    LightGUI_ok=yes
+    AC_MSG_RESULT(Using SALOME GUI distribution in ${SALOME_GUI_DIR})
+       
+    GUI_ROOT_DIR=${SALOME_GUI_DIR}
+
+    GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+    GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome
+
+    AC_CHECKING(for full GUI)
+    if test -f ${SALOME_GUI_DIR}/bin/salome/SALOME_Session_Server ; then
+      FullGUI_ok=yes
+    fi
+  else
+    AC_MSG_WARN("Cannot find compiled SALOME GUI distribution")
+  fi
+  AC_MSG_RESULT(for light GUI: ${LightGUI_ok})
+  AC_MSG_RESULT(for full GUI: ${FullGUI_ok})
+fi
+
+AC_SUBST(GUI_LDFLAGS)
+AC_SUBST(GUI_CXXFLAGS)
+AC_SUBST(GUI_ROOT_DIR)
+])dnl
+
+AC_DEFUN([CHECK_SALOME_GUI],[
+  CHECK_GUI_MODULE()
+  SalomeGUI_ok=${LightGUI_ok}
+])dnl
+
+AC_DEFUN([CHECK_CORBA_IN_GUI],[
+  CHECK_GUI_MODULE()
+  CORBA_IN_GUI=${FullGUI_ok}
+  AC_SUBST(CORBA_IN_GUI)
+])dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_C_DEPEND_FLAG
+dnl define C_DEPEND_FLAG
+dnl define CXX_DEPEND_FLAG
+dnl @version $Id$
+dnl @author Marc Tajchman
+dnl
+AC_DEFUN([AC_DEPEND_FLAG],[
+ AC_MSG_CHECKING([which flag for dependency information generation])
+ AC_LANG_SAVE
+ AC_LANG_C
+ echo "conftest.o: conftest.c" > conftest.verif
+ echo "int  main() { return 0; }" > conftest.c
+
+f77int="F77INT32"
+case  $host_os in
+   irix5.* | irix6.* | osf4.* | osf5.* | linux*  )
+
+        linux64="true"
+# porting on intel processor 64 bits
+        expr "$host_os" : 'linux' >/dev/null && ( test ! x"$host_cpu" = x"x86_64" && test ! x"$host_cpu" = x"ia64" ) && linux64="false"
+       if test ! x"$linux64" = "xfalse" ; then
+         echo "$as_me:$LINENO: checking for 64bits integers size in F77/F90" >&5
+echo $ECHO_N "checking for 64bits integers size in F77/F90... $ECHO_C" >&6
+         # Check whether --enable-int64 or --disable-int64 was given.
+if test "${enable_int64+set}" = set; then
+  enableval="$enable_int64"
+
+fi;
+         case "X-$enable_int64" in
+           X-no)
+            echo "$as_me:$LINENO: result: \"disabled\"" >&5
+echo "${ECHO_T}\"disabled\"" >&6
+            SUFFIXES="_32"
+            ;;
+           *)
+            echo "$as_me:$LINENO: result: \"enabled\"" >&5
+echo "${ECHO_T}\"enabled\"" >&6
+            SUFFIXES=""
+            f77int="F77INT64"
+            ;;
+         esac
+       fi
+     ;;
+   *)
+     ;;
+esac
+
+case $host_os in
+    linux*)
+# porting on intel processor 64 bits: if 64 bits processor, by default compilation in 64 bits
+        if test x"$linux64" = x"true"; then \
+          MACHINE="PCLINUX64${SUFFIXES}";
+         CFLAGS=" -D_OCC64 ${CXXFLAGS}";
+         CXXFLAGS=" -D_OCC64 ${CXXFLAGS}";\
+       else \
+         MACHINE=PCLINUX; \
+       fi
+       ;;
+    hpux*)
+       MACHINE=HP9000
+       ;;
+    aix4.*)
+       MACHINE=RS6000
+       host_os_novers=aix4.x
+       ;;
+    irix5.*)
+       MACHINE="IRIX64${SUFFIXES}"
+       host_os_novers=irix5.x
+       ;;
+    irix6.*)
+       MACHINE="IRIX64${SUFFIXES}"
+       host_os_novers=irix6.x
+       ;;
+    osf4.*)
+       MACHINE="OSF1${SUFFIXES}"
+       host_os_novers=osf4.x
+       ;;
+    osf5.*)
+       MACHINE="OSF1${SUFFIXES}"
+        host_os_novers=osf5.x
+        ;;
+    solaris2.*)
+       MACHINE=SUN4SOL2
+        host_os_novers=solaris2.x
+        ;;
+    uxpv*)
+       MACHINE=VPP5000
+        ;;
+    *)
+       MACHINE=
+        host_os_novers=$host_os
+        ;;
+esac
+
+dnl Evolution portage sur CCRT/osf system
+ case $host_os in
+   osf*)
+dnl sur CCRT/osf pas d'equivalent de l'option -MG de gcc avec compilo natif
+dnl on utilise donc gnu pour generer les dependances.
+     DEPCC=gcc
+     DEPCXX=g++
+     DEPCXXFLAGS=
+     DIFFFLAGS="-w"
+dnl  MACHINE="OSF1"
+     ;;
+   *)
+     DEPCC=${CC-cc}
+     DEPCXX=${CXX-c++}
+     DEPCXXFLAGS="\${CXXFLAGS}"
+     DIFFFLAGS="-b -B"
+dnl  MACHINE="PCLINUX"
+     ;;
+ esac
+ C_DEPEND_FLAG=
+ for ac_C_DEPEND_FLAG in -xM -MM -M ; do
+
+    rm -f conftest.d conftest.err
+    ${DEPCC} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
+    if test -f conftest.u ; then
+       mv conftest.u conftest.d
+    fi
+
+    rm -f conftest
+    diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+    if test ! -s conftest ; then
+       C_DEPEND_FLAG=${ac_C_DEPEND_FLAG}
+       break
+    fi
+ done
+
+dnl use gcc option -MG : asume unknown file will be construct later
+ rm -f conftest.d conftest.err
+ ${DEPCC} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
+ if test -f conftest.u ; then
+    mv conftest.u conftest.d
+ fi
+ rm -f conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ if test ! -s conftest ; then
+    C_DEPEND_FLAG=${C_DEPEND_FLAG}" -MG"
+ fi
+
+ rm -f conftest*
+ if test "x${C_DEPEND_FLAG}" = "x" ; then
+    echo "cannot determine flag (C language)"
+    exit
+ fi
+
+ printf " C :  ${DEPCC} ${C_DEPEND_FLAG}"
+
+ AC_LANG_CPLUSPLUS
+ echo "conftest.o: conftest.cxx" > conftest.verif
+ echo "int  main() { return 0; }" > conftest.cxx
+
+ CXX_DEPEND_FLAG=
+ for ac_CXX_DEPEND_FLAG in -xM -MM -M ; do
+
+    rm -f conftest.d conftest.err
+    ${DEPCXX} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
+    if test -f conftest.u ; then
+       mv conftest.u conftest.d
+    fi
+
+    rm -f conftest
+    diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+    if test ! -s conftest ; then
+       CXX_DEPEND_FLAG=${ac_CXX_DEPEND_FLAG}
+       break
+    fi
+ done
+
+dnl use g++ option -MG : asume unknown file will be construct later
+ rm -f conftest.d conftest.err
+ ${DEPCXX} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
+ if test -f conftest.u ; then
+    mv conftest.u conftest.d
+ fi
+ rm -f conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ if test ! -s conftest ; then
+    CXX_DEPEND_FLAG=${CXX_DEPEND_FLAG}" -MG"
+ fi
+
+
+ rm -f conftest*
+ if test "x${CXX_DEPEND_FLAG}" = "x" ; then
+    echo "cannot determine flag (C++ language)"
+    exit
+ fi
+
+ printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}"
+ AC_LANG_RESTORE
+
+ AC_MSG_RESULT([ ... done])
+
+ AC_SUBST(DEPCC)
+ AC_SUBST(DEPCXX)
+ AC_SUBST(DEPCXXFLAGS)
+ AC_SUBST(C_DEPEND_FLAG)
+ AC_SUBST(CXX_DEPEND_FLAG)
+ AC_SUBST(MACHINE)
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_CXX_HAVE_SSTREAM
+dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
+dnl @author Ben Stanley
+dnl @version $Id$
+dnl modified by Marc Tajchman (CEA) - 10/10/2002
+
+AC_DEFUN([AC_CXX_HAVE_SSTREAM],[
+  AC_CACHE_CHECK([whether the compiler has stringstream],
+                 [ac_cv_prog_cxx_have_sstream],
+                 [ac_cv_prog_cxx_have_sstream=no
+    AC_REQUIRE([AC_CXX_NAMESPACES])
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_TRY_COMPILE([
+      #include <sstream>
+      #ifdef HAVE_NAMESPACES
+      using namespace std;
+      #endif
+    ],
+    [stringstream message; message << "Hello"; return 0;],
+    [ac_cv_prog_cxx_have_sstream=yes],[ac_cv_prog_cxx_have_sstream=no])
+    AC_LANG_RESTORE
+  ])
+  HAVE_SSTREAM=$ac_cv_prog_cxx_have_sstream
+  AC_SUBST(HAVE_SSTREAM)
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_CXX_NAMESPACES
+dnl If the compiler can prevent names clashes using namespaces, define
+dnl HAVE_NAMESPACES.
+dnl @version $Id$
+dnl @author Luc Maisonobe
+dnl
+AC_DEFUN([AC_CXX_NAMESPACES],
+[AC_CACHE_CHECK(whether the compiler implements namespaces,
+ac_cv_cxx_namespaces,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
+                [using namespace Outer::Inner; return i;],
+ ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_namespaces" = yes; then
+  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
+fi
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_CXX_OPTION(-option,variable where we add option if ok,action if ok; action if not ok)
+dnl Check options for C++ compiler
+dnl @author Bernard Secher - 15/01/2004
+dnl
+AC_DEFUN([AC_CXX_OPTION], [
+  AC_MSG_CHECKING(wether $CXX accepts $1)
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX $1 conftest.cxx > conftest.log 2>&1
+  var=`echo $1 | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    AC_MSG_RESULT(no)
+    eval $4
+  else
+    AC_MSG_RESULT(yes)
+    $2="${$2} $1"
+    eval $3
+  fi
+])
+
+
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_CXX_TEMPLATE_OPTIONS
+dnl Check template options for C++ compiler
+dnl
+AC_DEFUN([AC_CXX_TEMPLATE_OPTIONS],[
+dnl 
+  for opt in -ftemplate-depth-42 "-pending_instantiations 42" ; do
+    AC_CXX_OPTION($opt,CXXTMPDPTHFLAGS,flag=yes,flag=no)
+    if test "$flag" = "yes"; then
+      break
+    fi
+    AC_SUBST(CXXTMPDPTHFLAGS)
+  done
+dnl
+  AC_CXX_OPTION(-tweak,CXXFLAGS)
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_CXX_USE_STD_IOSTREAM
+dnl
+dnl If the C++ library use std iostream
+dnl
+dnl @author Bernard Secher (CEA) - 05/12/2003
+
+AC_DEFUN([AC_CXX_USE_STD_IOSTREAM],
+[
+
+AC_MSG_CHECKING(whether the compiler use std iostream)
+
+cat > conftest.cxx <<EOF
+#include <iostream>
+int main(int argc, char **argv) {std::cout << "Hello" << std::endl; return 0;}
+EOF
+
+fUSE_STD_IOSTREAM=no
+for ac_CXX_USE_STD_IOSTREAM in "" -D__USE_STD_IOSTREAM ; do
+  if $CXX ${ac_CXX_USE_STD_IOSTREAM} conftest.cxx > /dev/null 2>&1; then
+    CPPFLAGS="$CPPFLAGS ${ac_CXX_USE_STD_IOSTREAM}"
+    if test x${ac_CXX_USE_STD_IOSTREAM} = x; then
+      AC_MSG_RESULT(yes)
+    else
+      AC_MSG_RESULT(${ac_CXX_USE_STD_IOSTREAM})
+    fi
+    fUSE_STD_IOSTREAM=yes
+    break
+  fi
+done
+if test $fUSE_STD_IOSTREAM = no; then
+  AC_MSG_RESULT(no)
+fi
+
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_CXX_WARNINGS
+dnl Check warning flags for C++ compiler to control warning messages
+dnl
+AC_DEFUN([AC_CXX_WARNINGS],[
+  AC_CXX_OPTION(-Wparentheses,CXXFLAGS)
+  AC_CXX_OPTION(-Wreturn-type,CXXFLAGS)
+  AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS)
+  AC_CXX_OPTION(-Wunused,CXXFLAGS)
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl @synopsis AC_LINKER_OPTIONS
+dnl Check warning flags for C++ compiler to control warning messages
+dnl
+AC_DEFUN([AC_LINKER_OPTIONS],[
+
+  AC_CHECKING(for LIB_LOCATION_SUFFIX)
+  LIB_LOCATION_SUFFIX=""
+  AC_SUBST(LIB_LOCATION_SUFFIX)
+  AC_MSG_RESULT(LIB_LOCATION_SUFFIX is $LIB_LOCATION_SUFFIX)
+
+  for opt in "-Xlinker -export-dynamic" -transitive_link; do
+    AC_CXX_OPTION($opt,LDEXPDYNFLAGS,flag=yes,flag=no)
+    if test "$flag" = "yes"; then
+      break
+    fi
+  done
+  AC_SUBST(LDEXPDYNFLAGS)
+
+  for opt in "-Xlinker -enable-new-dtags" ; do
+    AC_CXX_OPTION($opt,LDFLAGS)
+  done
+  AC_SUBST(LDFLAGS)
+
+dnl 
+  case $host_os in
+    osf*)
+      STDLIB="-lcxxstd"
+      ;;
+    *)
+      STDLIB="-lstdc++"
+      ;;
+  esac
+  AC_SUBST(STDLIB)
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl Paul RASCLE: modification for Linux: -pthread required by boost...
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *linux*)
+
+        # On linux "none" works, but boost requires -pthread, so, try first "-pthread"
+acx_pthread_flags="-pthread pthreads none -Kthread -kthread lthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+        ;;
+
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+               pthread-config)
+               AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+               ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+                    [acx_pthread_ok=yes])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        AC_TRY_LINK([#include <pthread.h>],
+                    [int attr=PTHREAD_CREATE_JOINABLE;],
+                    ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
+        if test x"$ok" = xunknown; then
+                AC_TRY_LINK([#include <pthread.h>],
+                            [int attr=PTHREAD_CREATE_UNDETACHED;],
+                            ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+                AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
+                          [Define to the necessary symbol if this constant
+                           uses a non-standard name on your system.])
+        fi
+        AC_MSG_RESULT(${ok})
+        if test x"$ok" = xunknown; then
+                AC_MSG_WARN([we do not know how to create joinable pthreads])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+# Check availability of Salome's KERNEL binary distribution
+#
+# Author : Jerome Roy (CEA, 2003)
+#
+
+AC_DEFUN([CHECK_KERNEL],[
+AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+AC_CHECKING(for Kernel)
+
+Kernel_ok=no
+
+KERNEL_LDFLAGS=""
+KERNEL_CXXFLAGS=""
+
+AC_ARG_WITH(kernel,
+           [--with-kernel=DIR  root directory path of KERNEL build or installation],
+           [KERNEL_DIR="$withval"],
+           [KERNEL_DIR=""])
+
+if test "x${KERNEL_DIR}" = "x" ; then
+  AC_MSG_RESULT(for \${KERNEL_ROOT_DIR}: ${KERNEL_ROOT_DIR})
+  # no --with-kernel-dir option used
+  if test "x${KERNEL_ROOT_DIR}" != "x" ; then
+    # KERNEL_ROOT_DIR environment variable defined
+    KERNEL_DIR=${KERNEL_ROOT_DIR}
+  else
+    # search Kernel binaries in PATH variable
+    AC_PATH_PROG(TEMP,runSalome)
+    if test "x${TEMP}" != "x" ; then
+      AC_MSG_RESULT(runSalome was found at : ${TEMP})
+      KERNEL_BIN_DIR=`dirname ${TEMP}`
+      KERNEL_DIR=`cd ${KERNEL_BIN_DIR}/../..; pwd`
+    fi
+  fi
+fi
+
+if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then
+   AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR})
+   Kernel_ok=yes
+
+   if test "x${KERNEL_ROOT_DIR}" = "x" ; then
+      KERNEL_ROOT_DIR=${KERNEL_DIR}
+   fi
+
+   if test "x${KERNEL_SITE_DIR}" = "x" ; then
+      KERNEL_SITE_DIR=${KERNEL_ROOT_DIR}
+   fi
+
+   AC_SUBST(KERNEL_ROOT_DIR)
+   AC_SUBST(KERNEL_SITE_DIR)
+
+   KERNEL_LDFLAGS=-L${KERNEL_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+   KERNEL_CXXFLAGS=-I${KERNEL_DIR}/include/salome
+
+   AC_SUBST(KERNEL_LDFLAGS)
+   AC_SUBST(KERNEL_CXXFLAGS)
+else
+   AC_MSG_WARN("Cannot find compiled Kernel module distribution")
+fi
+
+AC_MSG_RESULT(for Kernel: $Kernel_ok)
+])dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_BOOST],[
+
+AC_CHECKING(for BOOST Library)
+
+AC_REQUIRE([ENABLE_PTHREADS])dnl
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+BOOST_CPPFLAGS=""
+BOOST_LIBSUFFIX="-mt"
+BOOST_LIBS=""
+
+AC_CHECKING(for BOOST location)
+AC_ARG_WITH(boost,
+   [AC_HELP_STRING([--with-boost=DIR],[root directory path to BOOST library installation])],
+   [BOOSTDIR="$withval"
+    AC_MSG_RESULT("select $withval as path to BOOST library")
+   ])
+   
+if test "x${BOOSTDIR}" = "x" ; then
+  BOOSTDIR="/usr"
+fi
+
+AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR})
+
+CPPFLAGS_old="${CPPFLAGS}"
+LIBS_old=$LIBS
+
+if test "x${BOOSTDIR}" != "x" ; then
+  BOOST_CPPFLAGS="-I${BOOSTDIR}/include"
+  BOOST_LIBS="-L${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}"
+fi
+
+if test "x${BOOSTDIR}" = "x/usr" ; then
+  BOOST_CPPFLAGS=""
+  BOOST_LIBS=""
+fi
+
+boost_ok=no
+boost_headers_ok=no
+boost_binaries_ok=no
+
+dnl BOOST headers
+AC_CHECKING(for BOOST headers)
+CPPFLAGS="${CPPFLAGS_old} ${BOOST_CPPFLAGS}"
+
+boost_include_dir_ok=yes
+if test "x${BOOSTDIR}" != "x" ; then
+  AC_CHECK_FILE(${BOOSTDIR}/include/boost/shared_ptr.hpp,
+                boost_include_dir_ok=yes,
+                boost_include_dir_ok=no)
+fi
+
+BOOST_PROGRAM_OPTIONS_LIB=no
+if test "x${boost_include_dir_ok}" = "xyes" ; then
+  AC_CHECK_FILE(${BOOSTDIR}/include/boost/program_options.hpp,
+                BOOST_PROGRAM_OPTIONS_LIB=yes,
+                BOOST_PROGRAM_OPTIONS_LIB=no)
+fi
+AC_MSG_RESULT(for boost program_options tool: $BOOST_PROGRAM_OPTIONS_LIB)
+
+if test "x${boost_include_dir_ok}" = "xyes" ; then
+  AC_TRY_COMPILE([#include <boost/shared_ptr.hpp>],
+                 [boost::shared_ptr<int>(new int)],
+                 boost_headers_ok=yes,
+                 boost_headers_ok=no)
+fi
+
+if test "x${boost_headers_ok}" = "xno" ; then
+  BOOST_CPPFLAGS="BOOST_CPPFLAGS_NOT_DEFINED"
+else
+  AC_MSG_RESULT(\$BOOST_CPPFLAGS = ${BOOST_CPPFLAGS})
+fi
+AC_MSG_RESULT(for boost headers: $boost_headers_ok)
+
+if test "x${boost_headers_ok}" = "xyes" ; then
+  dnl BOOST binaries
+  AC_CHECKING(for BOOST binaries)
+  boost_lib_dir_ok=yes
+  if test "x${BOOSTDIR}" != "x" ; then
+    AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so,
+                  boost_lib_dir_ok=yes,
+                  boost_lib_dir_ok=no)
+    if test "x${boost_lib_dir_ok}" = "xno" ; then
+      BOOST_LIBSUFFIX=""
+      AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so,
+                    boost_lib_dir_ok=yes,
+                    boost_lib_dir_ok=no)
+    fi
+  fi
+  if test "x${boost_lib_dir_ok}" = "xyes" ; then
+    LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}"
+    AC_TRY_LINK([#include <boost/thread/thread.hpp>],
+                [struct TBody{ void operator()(){} }; boost::thread(TBody())],
+                boost_binaries_ok=yes,
+                boost_binaries_ok=no)
+    if test "x${boost_binaries_ok}" = "xno" ; then
+      BOOST_LIBSUFFIX=""
+      LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}"
+      AC_TRY_LINK([#include <boost/thread/thread.hpp>],
+                  [struct TBody{ void operator()(){} }; boost::thread(TBody())],
+                  boost_binaries_ok=yes,
+                  boost_binaries_ok=no)
+    fi
+  fi
+fi
+
+if test "x${boost_binaries_ok}" = "xno" ; then
+  BOOST_LIBS="BOOST_LIBS_NOT_FOUND"
+  BOOST_LIBSUFFIX="-not-defined"
+else
+  AC_MSG_RESULT(\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX})
+  AC_MSG_RESULT(\$BOOST_LIBS = ${BOOST_LIBS})
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}",
+                BOOST_LIB_THREAD="")
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_SIGNALS="${BOOST_LIBS} -lboost_signals${BOOST_LIBSUFFIX}",
+                BOOST_LIB_SIGNALS="")
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_SYSTEM="${BOOST_LIBS} -lboost_system${BOOST_LIBSUFFIX}",
+                BOOST_LIB_SYSTEM="")
+  AC_CHECK_FILE(${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so,
+                BOOST_LIB_REGEX="${BOOST_LIBS} -lboost_regex${BOOST_LIBSUFFIX}",
+                BOOST_LIB_REGEX="")
+fi
+AC_MSG_RESULT(for boost binaries: $boost_binaries_ok)
+
+CPPFLAGS="${CPPFLAGS_old}"
+LIBS="${LIBS_old}"
+
+if test "x${boost_headers_ok}" = "xyes" ; then
+  if test "x${boost_binaries_ok}" = "xyes" ; then
+    boost_ok=yes
+  fi
+fi
+
+AC_MSG_RESULT(for boost: $boost_ok)
+
+AC_SUBST(BOOST_CPPFLAGS)
+AC_SUBST(BOOST_LIBSUFFIX)
+AC_SUBST(BOOST_LIBS)
+AC_SUBST(BOOST_LIB_THREAD)
+AC_SUBST(BOOST_LIB_SIGNALS)
+AC_SUBST(BOOST_LIB_SYSTEM)
+AC_SUBST(BOOST_LIB_REGEX)
+AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
+
+AC_LANG_RESTORE
+
+])dnl
+
+
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_CAS],[
+AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_CXXCPP])dnl
+
+AC_CHECKING(for OpenCascade)
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_SUBST(CAS_CPPFLAGS)
+AC_SUBST(CAS_CXXFLAGS)
+AC_SUBST(CAS_KERNEL)
+AC_SUBST(CAS_MATH)
+AC_SUBST(CAS_VIEWER)
+AC_SUBST(CAS_TKTopAlgo)
+AC_SUBST(CAS_MODELER)
+AC_SUBST(CAS_OCAF)
+AC_SUBST(CAS_OCAFVIS)
+AC_SUBST(CAS_DATAEXCHANGE)
+AC_SUBST(CAS_LDFLAGS)
+AC_SUBST(CAS_LDPATH)
+AC_SUBST(CAS_STDPLUGIN)
+
+CAS_CPPFLAGS=""
+CAS_CXXFLAGS=""
+CAS_LDFLAGS=""
+occ_ok=no
+config_h=no
+
+dnl libraries directory location
+case $host_os in
+   linux*)
+      casdir=Linux
+      ;;
+   freebsd*)
+      casdir=Linux
+      ;;
+   irix5.*)
+      casdir=Linux
+      ;;
+   irix6.*)
+      casdir=Linux
+      ;;
+   osf*)
+      casdir=Linux
+      ;;
+   solaris2.*)
+      casdir=Linux
+      ;;
+   *)
+      casdir=Linux
+      ;;
+esac
+
+AC_MSG_CHECKING(for OpenCascade directories)
+
+if test -z "$CASROOT"; then
+  AC_MSG_RESULT(CASROOT not defined)
+  for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
+    if test -f $d/libTKernel.so ; then
+      AC_MSG_RESULT(libTKernel.so detected in $d)
+      CASROOT=$d
+      CASROOT=`echo ${CASROOT} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+      break
+    fi
+  done
+fi
+
+if test -d ${CASROOT}/${casdir}/lib; then
+  CAS_LDPATH="-L$CASROOT/$casdir/lib "
+  AC_MSG_RESULT(yes)
+else
+  if test -d ${CASROOT}/lib; then
+    CAS_LDPATH="-L$CASROOT/lib "
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
+fi
+
+
+dnl were is OCC ?
+if test -z "$CASROOT"; then
+  AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual)
+else
+  occ_ok=yes
+  OCC_VERSION_MAJOR=0
+  OCC_VERSION_MINOR=0
+  OCC_VERSION_MAINTENANCE=0
+  ff=$CASROOT/inc/Standard_Version.hxx
+  if test -f $ff ; then
+    grep "define OCC_VERSION_MAJOR" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MAJOR=`grep "define OCC_VERSION_MAJOR" $ff | awk '{i=3 ; print $i}'`
+    fi
+    grep "define OCC_VERSION_MINOR" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MINOR=`grep "define OCC_VERSION_MINOR" $ff | awk '{i=3 ; print $i}'`
+    fi
+    grep "define OCC_VERSION_MAINTENANCE" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MAINTENANCE=`grep "define OCC_VERSION_MAINTENANCE" $ff | awk '{i=3 ; print $i}'`
+    fi
+  fi
+fi
+
+if test "x$occ_ok" = "xyes"; then
+
+dnl test c++ compiler flag for unsigned character
+  for opt in -funsigned-char -unsigned ; do
+    AC_CXX_OPTION($opt,CAS_CXXFLAGS,flag=yes,flag=no)
+    if test "$flag" = "yes"; then
+      break
+    fi
+  done
+  
+dnl cascade headers
+
+  CPPFLAGS_old="$CPPFLAGS"
+case $host_os in
+   linux*)
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H"
+
+      OCC_VERSION_STRING="$OCC_VERSION_MAJOR.$OCC_VERSION_MINOR.$OCC_VERSION_MAINTENANCE"
+      case $OCC_VERSION_STRING in
+        [[0-5]].* | 6.0.* | 6.1.0) # catch versions < 6.1.1
+          CAS_CPPFLAGS="$CAS_CPPFLAGS -DNO_CXX_EXCEPTION"
+          ;;
+        *)
+          CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS"
+          ;;
+      esac
+      CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc"
+      ;;
+   osf*)
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+      ;;
+esac
+  CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"
+
+  echo
+  echo testing config.h
+
+  AC_CHECK_HEADER(config.h, config_h=yes, [
+       echo "config.h file not found!"
+  ])
+
+  if test "x$config_h" = xno ; then
+      AC_MSG_WARN(config.h file not found)
+      dnl There is no consequence for SALOME building because
+      dnl this file is not used. SALOME uses SALOMEconfig.h instead!
+  else
+      AC_MSG_RESULT(config.h file ok)    
+  fi
+
+  AC_CHECK_HEADER(Standard_Type.hxx,occ_ok=yes ,occ_ok=no)
+
+fi
+
+if test "x$occ_ok" = xyes ; then
+
+  AC_MSG_CHECKING(for OpenCascade libraries)
+
+  LIBS_old="$LIBS"
+  LIBS="$LIBS $CAS_LDPATH -lTKernel"
+  
+  AC_CACHE_VAL(salome_cv_lib_occ,[
+    AC_TRY_LINK(
+#include <TCollection_AsciiString.hxx>
+,    TCollection_AsciiString aStr ("toto");
+    aStr.Capitalize();, 
+    eval "salome_cv_lib_occ=yes",eval "salome_cv_lib_occ=no")
+  ])
+  occ_ok="$salome_cv_lib_occ"
+
+fi
+CPPFLAGS="$CPPFLAGS_old"
+LIBS="$LIBS_old"
+
+if test "x$occ_ok" = xno ; then
+  AC_MSG_RESULT(no)
+  AC_MSG_WARN(Opencascade libraries not found)
+else
+  AC_MSG_RESULT(yes)
+  CAS_KERNEL="$CAS_LDPATH -lTKernel"
+  CAS_MATH="$CAS_LDPATH -lTKMath"
+
+  if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then
+    # this libraries are only for CASCADE 5.2.3
+    CAS_STDPLUGIN="StdPlugin"
+  fi
+
+  CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema"
+  CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lStdPlugin -lStdLPlugin -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema"
+  
+  CAS_TKV3d="$CAS_LDPATH -lTKV3d"
+  CAS_VIEWER="$CAS_TKV3d -lTKService"
+
+  CAS_TKBRep="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep"
+
+  CAS_TKTopAlgo="$CAS_TKBRep -lTKGeomAlgo -lTKTopAlgo"
+  CAS_TKPrim="$CAS_TKTopAlgo -lTKPrim"
+  
+  CAS_MODELER="$CAS_TKPrim -lTKBO -lTKBool -lTKHLR -lTKFillet -lTKOffset -lTKFeat"
+
+  CAS_DATAEXCHANGE="$CAS_LDPATH -lTKIGES -lTKSTEP"
+
+  CAS_LDFLAGS="$CAS_KERNEL $CAS_MATH $CAS_OCAF $CAS_OCAFVIS $CAS_VIEWER $CAS_MODELER $CAS_DATAEXCHANGE"  
+
+fi
+
+AC_LANG_RESTORE
+
+])dnl
+
+
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_CORBA],[
+
+if test x"$DEFAULT_ORB" = x"omniORB"
+then
+
+  #  Contient le nom de l'ORB
+  ORB=omniorb
+
+  AC_MSG_RESULT(default orb : omniORB)
+  IDL=$OMNIORB_IDL
+  AC_SUBST(IDL)
+
+  CORBA_ROOT=$OMNIORB_ROOT
+  CORBA_INCLUDES=$OMNIORB_INCLUDES
+  CORBA_CXXFLAGS=$OMNIORB_CXXFLAGS
+  CORBA_LIBS=$OMNIORB_LIBS
+  IDLCXXFLAGS=$OMNIORB_IDLCXXFLAGS
+  IDLPYFLAGS=$OMNIORB_IDLPYFLAGS
+
+  AC_SUBST(CORBA_ROOT)
+  AC_SUBST(CORBA_INCLUDES)
+  AC_SUBST(CORBA_CXXFLAGS)
+  AC_SUBST(CORBA_LIBS)
+  AC_SUBST(IDLCXXFLAGS)
+  AC_SUBST(IDLPYFLAGS)
+
+  IDL_CLN_H=$OMNIORB_IDL_CLN_H
+  IDL_CLN_CXX=$OMNIORB_IDL_CLN_CXX
+  IDL_CLN_OBJ=$OMNIORB_IDL_CLN_OBJ
+
+  AC_SUBST(IDL_CLN_H)
+  AC_SUBST(IDL_CLN_CXX)
+  AC_SUBST(IDL_CLN_OBJ)
+
+  IDL_SRV_H=$OMNIORB_IDL_SRV_H
+  IDL_SRV_CXX=$OMNIORB_IDL_SRV_CXX
+  IDL_SRV_OBJ=$OMNIORB_IDL_SRV_OBJ
+
+  AC_SUBST(IDL_SRV_H)
+  AC_SUBST(IDL_SRV_CXX)
+  AC_SUBST(IDL_SRV_OBJ)
+
+else
+    AC_MSG_RESULT($DEFAULT_ORB unknown orb)
+
+fi
+
+])dnl
+dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_CPPUNIT],[
+
+AC_CHECKING(for cppunit)
+
+cppunit_ok=yes
+
+dnl were is cppunit ?
+
+AC_ARG_WITH(cppunit,
+    [AC_HELP_STRING([--with-cppunit=DIR],[directory path to CPPUNIT installation])],
+    [CPPUNITHOME="$withval"
+      AC_MSG_RESULT("select $withval as path to CPPUNIT")
+    ])
+
+AC_ARG_WITH(cppunit_inc,
+    [AC_HELP_STRING([--with-cppunit_inc=DIR],[directory path to CPPUNIT includes])],
+    [CPPUNIT_INCLUDES="$withval"
+      AC_MSG_RESULT("select $withval as path to CPPUNIT includes")
+    ])
+
+if test -z "$CPPUNITHOME"; then
+  AC_MSG_RESULT(CPPUNITHOME not defined)
+  exits_ok=no  
+  if test "x$exits_ok" = "xno"; then
+     for d in /usr/local /usr ; do
+        AC_CHECK_FILE(${d}/lib64/libcppunit.so,exits_ok=yes,exits_ok=no)
+        if test "x$exits_ok" = "xyes"; then
+           CPPUNITHOME=$d
+           AC_MSG_RESULT(libcppunit.so detected in $d/lib64)
+          break
+        fi
+       AC_CHECK_FILE(${d}/lib/libcppunit.so,exits_ok=yes,exits_ok=no)
+        if test "x$exits_ok" = "xyes"; then
+           CPPUNITHOME=$d
+           AC_MSG_RESULT(libcppunit.so detected in $d/lib)
+          break
+        fi
+     done
+  fi
+  if test "x$exits_ok" = "xno"; then
+     for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
+        if test -f $d/libcppunit.so ; then
+           AC_MSG_RESULT(libcppunit.so detected in $d)
+           CPPUNITHOME=$d
+           CPPUNITHOME=`echo ${CPPUNITHOME} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+           exits_ok=yes
+           break
+        fi
+     done
+  fi
+  if test "x$exits_ok" = "xyes"; then
+     if test -z "$CPPUNIT_INCLUDES"; then
+        CPPUNIT_INCLUDES=$CPPUNITHOME"/include"
+     fi
+  fi
+else
+  if test -z "$CPPUNIT_INCLUDES"; then
+     CPPUNIT_INCLUDES="$CPPUNITHOME/include"
+  fi           
+fi
+
+if test "x$cppunit_ok" = xno -o ! -d "$CPPUNITHOME" ; then
+  AC_MSG_RESULT(no)
+  AC_MSG_WARN(cppunit not found)
+  cppunit_ok=no
+else
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   CPPFLAGS_old=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS -I$CPPUNIT_INCLUDES"
+   
+   AC_CHECK_HEADER(cppunit/extensions/HelperMacros.h,cppunit_ok=yes,cppunit_ok=no) 
+
+   CPPFLAGS=$CPPFLAGS_old
+
+   if test "x$cppunit_ok" = xno ; then
+     AC_MSG_RESULT(no)
+     AC_MSG_WARN(cppunit not found)
+   else
+     cppunit_ok=yes
+   fi
+
+  if  test "x$cppunit_ok" = "xno"
+  then
+    AC_MSG_RESULT(unable to found cppunit headers and library)
+    AC_MSG_RESULT(CPPUNITHOME environment variable may be wrong)
+  else
+    if test "x$CPPUNIT_INCLUDES" = "x/usr/include"
+    then
+      CPPUNIT_INCLUDES=""
+    else
+      CPPUNIT_INCLUDES="-I$CPPUNIT_INCLUDES"
+    fi
+    if test "x$CPPUNITHOME" = "x/usr"
+    then
+      CPPUNIT_LIBS=" -lcppunit"
+    else
+      CPPUNIT_LIBS="-L$CPPUNITHOME/lib -lcppunit"
+    fi
+
+    AC_SUBST(CPPUNIT_INCLUDES)
+    AC_SUBST(CPPUNIT_LIBS)
+    AC_SUBST(cppunit_ok)
+    AC_MSG_RESULT(yes)
+  fi
+fi
+
+AM_CONDITIONAL(CPPUNIT_IS_OK, [test x"$cppunit_ok" = xyes])
+
+AC_LANG_RESTORE
+
+])dnl
+dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+AC_DEFUN([CHECK_OMNIORB],[
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_CXX])dnl
+AC_REQUIRE([AC_PROG_CPP])dnl
+AC_REQUIRE([AC_PROG_CXXCPP])dnl
+
+AC_CHECKING(for omniORB)
+omniORB_ok=yes
+
+if test "x$PYTHON" = "x" 
+then
+  CHECK_PYTHON
+fi
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+
+AC_PATH_PROG(OMNIORB_IDL, omniidl)
+if test "x$OMNIORB_IDL" = "x"
+then
+  omniORB_ok=no
+  AC_MSG_RESULT(omniORB binaries not in PATH variable)
+else
+  omniORB_ok=yes
+fi
+
+if  test "x$omniORB_ok" = "xyes"
+then
+  AC_SUBST(OMNIORB_IDL)
+
+  OMNIORB_BIN=`echo ${OMNIORB_IDL} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+  OMNIORB_ROOT=${OMNIORB_BIN}
+  # one-level up
+  OMNIORB_ROOT=`echo ${OMNIORB_ROOT}  | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+  #
+  #
+  if test -d $OMNIORB_ROOT/include ; then
+    # if $OMNIORB_ROOT/include exists, there are a lot of chance that
+    # this is omniORB4.x installed via configure && make && make install
+    OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin\$,lib,"`
+    OMNIORB_VERSION=4
+  else
+    # omniORB has been installed old way
+    OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin/,lib/,"`
+    # one-level up again
+    OMNIORB_ROOT=`echo ${OMNIORB_ROOT}  | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+    if test -d $OMNIORB_ROOT/include/omniORB4 ; then
+      OMNIORB_VERSION=4
+    else
+      OMNIORB_VERSION=3
+    fi
+  fi
+  AC_SUBST(OMNIORB_ROOT)
+
+  OMNIORB_INCLUDES="-I$OMNIORB_ROOT/include -I$OMNIORB_ROOT/include/omniORB${OMNIORB_VERSION} -I$OMNIORB_ROOT/include/COS"
+  AC_SUBST(OMNIORB_INCLUDES)
+
+  ENABLE_PTHREADS
+
+  OMNIORB_CXXFLAGS="-DOMNIORB_VERSION=$OMNIORB_VERSION"
+  case $build_cpu in
+    sparc*)
+      # AC_DEFINE(__sparc__)
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sparc__"
+      ;;
+   *86*)
+      # AC_DEFINE(__x86__)
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__x86__"
+      ;;
+  esac
+  case $build_os in
+    osf*)
+      # AC_DEFINE(__osf1__)
+      __OSVERSION__=5
+      AC_DEFINE([__OSVERSION__], [5], [Description])
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__osf1__"
+      ;;
+    solaris*)
+      # AC_DEFINE(__sunos__)
+      __OSVERSION__=5
+      AC_DEFINE([__OSVERSION__], [5], [Description])
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sunos__"
+      ;;
+   linux*)
+      # AC_DEFINE(__linux__)
+      __OSVERSION__=2
+      AC_DEFINE([__OSVERSION__], [2], [Description])
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__linux__"
+      ;;
+  esac
+  AC_SUBST(OMNIORB_CXXFLAGS)
+
+  CPPFLAGS_old=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+
+  AC_LANG_CPLUSPLUS
+  AC_CHECK_HEADER(CORBA.h,omniORB_ok="yes",omniORB_ok="no")
+
+  CPPFLAGS=$CPPFLAGS_old
+
+fi
+
+if test "x$omniORB_ok" = "xyes" 
+then
+  if test "x$OMNIORB_LIB" = "x/usr/lib"
+  then
+    OMNIORB_LDFLAGS=""
+    OMNIORB_RFLAGS=""
+  else
+    OMNIORB_LDFLAGS="-L$OMNIORB_LIB"
+    OMNIORB_RFLAGS="-R$OMNIORB_LIB"
+  fi
+
+  LIBS_old=$LIBS
+  LIBS="$LIBS $OMNIORB_LDFLAGS -lomnithread"
+
+  CXXFLAGS_old=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+
+  AC_MSG_CHECKING(whether we can link with omnithreads)
+  AC_CACHE_VAL(salome_cv_lib_omnithreads,[
+    AC_TRY_LINK(
+#include <omnithread.h>
+,   omni_mutex my_mutex,
+    eval "salome_cv_lib_omnithreads=yes",eval "salome_cv_lib_omnithreads=no")
+  ])
+
+  omniORB_ok="$salome_cv_lib_omnithreads"
+  if  test "x$omniORB_ok" = "xno"
+  then
+    AC_MSG_RESULT(omnithreads not found)
+  else
+    AC_MSG_RESULT(yes)
+  fi
+
+  LIBS=$LIBS_old
+  CXXFLAGS=$CXXFLAGS_old
+fi
+
+
+dnl omniORB_ok=yes
+if test "x$omniORB_ok" = "xyes" 
+then
+
+  AC_CHECK_LIB(socket,socket, LIBS="-lsocket $LIBS",,)
+  AC_CHECK_LIB(nsl,gethostbyname, LIBS="-lnsl $LIBS",,)
+
+  LIBS_old=$LIBS
+  OMNIORB_LIBS="$OMNIORB_LDFLAGS"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lomniORB${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lomniDynamic${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lCOS${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lCOSDynamic${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lomnithread"
+  OMNIORB_LIBS="$OMNIORB_LIBS ${OMNIORB_RFLAGS}"
+  if test $OMNIORB_VERSION = 3 ; then
+    OMNIORB_LIBS="$OMNIORB_LIBS -ltcpwrapGK"
+  fi
+  AC_SUBST(OMNIORB_LIBS)
+
+  LIBS="$OMNIORB_LIBS $LIBS"
+  CXXFLAGS_old=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+
+  AC_MSG_CHECKING(whether we can link with omniORB)
+  AC_CACHE_VAL(salome_cv_lib_omniorb,[
+    AC_TRY_LINK(
+#include <CORBA.h>
+,   CORBA::ORB_var orb,
+    eval "salome_cv_lib_omniorb3=yes",eval "salome_cv_lib_omniorb3=no")
+  ])
+  omniORB_ok="$salome_cv_lib_omniorb3"
+
+  omniORB_ok=yes
+  if test "x$omniORB_ok" = "xno" 
+  then
+    AC_MSG_RESULT(omniORB library linking failed)
+    omniORB_ok=no
+  else
+    AC_MSG_RESULT(yes)
+  fi
+  LIBS="$LIBS_old"
+  CXXFLAGS=$CXXFLAGS_old
+fi
+
+
+if test "x$omniORB_ok" = "xyes" 
+then
+
+  OMNIORB_IDLCXXFLAGS="-Wba -nf -I${OMNIORB_ROOT}/idl"
+  OMNIORB_IDLPYFLAGS_1='-bpython'
+  OMNIORB_IDLPYFLAGS_2=" -I${OMNIORB_ROOT}/idl"
+  OMNIORB_IDLPYFLAGS=${OMNIORB_IDLPYFLAGS_1}${OMNIORB_IDLPYFLAGS_2}
+
+  AC_SUBST(OMNIORB_IDLCXXFLAGS)
+  AC_SUBST(OMNIORB_IDLPYFLAGS)
+
+  OMNIORB_IDL_CLN_H=.hh
+  OMNIORB_IDL_CLN_CXX=SK.cc
+  OMNIORB_IDL_CLN_OBJ=SK.o 
+  AC_SUBST(OMNIORB_IDL_CLN_H)
+  AC_SUBST(OMNIORB_IDL_CLN_CXX)
+  AC_SUBST(OMNIORB_IDL_CLN_OBJ)
+
+  OMNIORB_IDL_SRV_H=.hh
+  OMNIORB_IDL_SRV_CXX=SK.cc
+  OMNIORB_IDL_SRV_OBJ=SK.o
+  AC_SUBST(OMNIORB_IDL_SRV_H)
+  AC_SUBST(OMNIORB_IDL_SRV_CXX)
+  AC_SUBST(OMNIORB_IDL_SRV_OBJ)
+
+  OMNIORB_IDL_TIE_H=
+  OMNIORB_IDL_TIE_CXX=
+  AC_SUBST(OMNIORB_IDL_TIE_H)
+  AC_SUBST(OMNIORB_IDL_TIE_CXX)
+  
+  AC_DEFINE([OMNIORB], [], [Description])
+
+  CORBA_HAVE_POA=1
+  AC_DEFINE([CORBA_HAVE_POA], [], [Description])
+
+  CORBA_ORB_INIT_HAVE_3_ARGS=1
+  AC_DEFINE([CORBA_ORB_INIT_HAVE_3_ARGS], [], [Description])
+  CORBA_ORB_INIT_THIRD_ARG='"omniORB"'
+  AC_DEFINE([CORBA_ORB_INIT_THIRD_ARG], [], [omniORB])
+
+fi
+
+omniORBpy_ok=no
+if  test "x$omniORB_ok" = "xyes"
+then
+  AC_MSG_CHECKING(omniORBpy)
+  $PYTHON -c "import omniORB" &> /dev/null
+  if test $? = 0 ; then
+    AC_MSG_RESULT(yes)
+    omniORBpy_ok=yes
+  else
+    AC_MSG_RESULT(no, check your installation of omniORBpy)
+    omniORBpy_ok=no
+  fi
+fi
+
+dnl AC_LANG_RESTORE
+
+AC_MSG_RESULT(for omniORBpy: $omniORBpy_ok)
+AC_MSG_RESULT(for omniORB: $omniORB_ok)
+
+# Save cache
+AC_CACHE_SAVE
+
+dnl AC_LANG_CPLUSPLUS
+
+CXXFLAGS_old=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+LIBS_old=$LIBS
+LIBS="$LIBS $OMNIORB_LDFLAGS $OMNIORB_LIBS"
+AC_MSG_CHECKING(whether we have double and CORBA::Double compatibility)
+AC_TRY_RUN(
+#include <stdlib.h>
+#include <CORBA.h>
+int main ()
+{
+  CORBA::Double *a=new CORBA::Double(2.5);
+  double c=2.5;
+  double *b;
+  b=(double *)a;
+
+  if( (c==*b) && (sizeof(double)==sizeof(CORBA::Double)) ){
+    delete a;
+    exit(0);
+  }
+  else{
+    delete a;
+    exit(1);
+  }
+}
+,DOUBLECOMP="yes",DOUBLECOMP="no")
+if test "$DOUBLECOMP" = yes; then
+  OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -DCOMP_CORBA_DOUBLE"
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_MSG_CHECKING(whether we have int and CORBA::Long compatibility)
+AC_TRY_RUN(
+#include <stdlib.h>
+#include <CORBA.h>
+int main ()
+{
+  CORBA::Long *a=new CORBA::Long(2);
+  int c=2;
+  int *b;
+  b=(int *)a;
+
+  if( (c==*b) && (sizeof(int)==sizeof(CORBA::Long)) )
+    exit(0);
+  else
+    exit(1);
+}
+,LONGCOMP="yes",LONGCOMP="no")
+if test "$LONGCOMP" = yes; then
+  OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -DCOMP_CORBA_LONG"
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
+fi
+CXXFLAGS=$CXXFLAGS_old
+LIBS=$LIBS_old
+
+AC_LANG_RESTORE
+
+AC_SUBST(OMNIORB_CXXFLAGS)
+
+])dnl
+dnl
+
+dnl modify CFLAGS, CXXFLAGS and LIBS for compiling pthread-based programs.
+dnl@author  (C) Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA>, 1998, 2000
+dnl@id  $Id$
+dnl Modified to use acx_pthread.m4 from GNU Autoconf Macro Archive
+dnl
+AC_DEFUN([ENABLE_PTHREADS],[
+AC_REQUIRE([ACX_PTHREAD])
+
+if test x"$enable_pthreads_done" != xyes; then
+  if test x"$acx_pthread_ok" = xyes; then
+    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+    LIBS="$LIBS $PTHREAD_LIBS"
+    threads_ok=yes
+  else
+    threads_ok=no
+  fi
+  enable_pthreads_done=yes
+fi
+])dnl
+dnl
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+dnl define macros :
+dnl AC_ENABLE_PRODUCTION AC_DISABLE_PRODUCTION
+dnl AC_ENABLE_DEBUG AC_DISABLE_DEBUG
+dnl version $Id$
+dnl author Patrick GOLDBRONN
+dnl AC_ENABLE_PRODUCTION
+dnl This macro enables production build : optimized + no debugging information (-g)
+dnl default = not enabled
+dnl
+AC_DEFUN([AC_ENABLE_PRODUCTION],
+[define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([production],
+    [AC_HELP_STRING([--enable-production],
+     [compile in optimized mode @<:@default=]AC_ENABLE_PRODUCTION_DEFAULT[@:>@])],
+    [
+    enable_production=$enableval
+    ],
+    [enable_production=]AC_ENABLE_PRODUCTION_DEFAULT)
+
+AC_CXX_OPTION(-Wparentheses,CXXFLAGS)
+AC_CXX_OPTION(-Wreturn-type,CXXFLAGS)
+AC_CXX_OPTION(-Wmissing-declarations,CXXFLAGS)
+AC_CXX_OPTION(-fmessage-length=0,CXXFLAGS)
+AC_CXX_OPTION(-Wunused,CXXFLAGS)
+AC_CXX_OPTION(-pipe,CXXFLAGS)
+
+if test "X$enable_production" = "Xyes"; then
+  CFLAGS="$CFLAGS -O"
+  AC_CXX_OPTION(-Wuninitialized,CXXFLAGS)
+  CXXFLAGS="$CXXFLAGS -O "
+else
+  CFLAGS="$CFLAGS -g"
+  CXXFLAGS="$CXXFLAGS -g"
+fi
+])
+
+# AC_DISABLE_PRODUCTION - set the default flag to --disable-production
+AC_DEFUN([AC_DISABLE_PRODUCTION], [AC_ENABLE_PRODUCTION(no)])
+
+dnl AC_ENABLE_DEBUG
+dnl
+dnl This macro enables debugging build : debug + trace
+dnl default = not enabled
+dnl
+AC_DEFUN([AC_ENABLE_DEBUG],
+    [define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl
+    AC_ARG_ENABLE([debug],
+       [AC_HELP_STRING([--enable-debug],
+             [build with debug and trace information @<:@default=]AC_ENABLE_DEBUG_DEFAULT[@:>@])],
+    [
+    enable_debug=$enableval
+    ],
+    [enable_debug=]AC_ENABLE_DEBUG_DEFAULT)
+
+if test "X$enable_debug" = "Xyes"; then
+  CFLAGS="$CFLAGS -g -D_DEBUG_ "
+  CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ "
+fi
+])
+
+# AC_DISABLE_DEBUG - set the default flag to --disable-debug
+AC_DEFUN([AC_DISABLE_DEBUG], [AC_ENABLE_DEBUG(no)])
+
+dnl AC_ENABLE_MPI_SEQ_CONTAINER
+dnl
+dnl This macro enables mpi into the sequential container
+dnl default = not enabled
+dnl
+AC_DEFUN([AC_ENABLE_MPI_SEQ_CONTAINER],
+    [define([AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT], ifelse($1, no, no, yes))dnl
+    AC_ARG_ENABLE([mpi-seq-container],
+       [AC_HELP_STRING([--enable-mpi-seq-container],
+             [enable mpi into seq container @<:@default=]AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT[@:>@])],
+    [
+    enable_mpi_seq_container=$enableval
+    ],
+    [enable_mpi_seq_container=]AC_ENABLE_MPI_SEQ_CONTAINER_DEFAULT)
+
+if test "X$enable_mpi_seq_container" = "Xyes"; then
+  CFLAGS="$CFLAGS -D_MPI_SEQ_CONTAINER_ "
+  CXXFLAGS="$CXXFLAGS -D_MPI_SEQ_CONTAINER_ "
+fi
+AM_CONDITIONAL([WITH_MPI_SEQ_CONTAINER], [test "x$enable_mpi_seq_container" = "xyes"])
+])
+
+dnl  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+
+
+dnl CHECK_PYTHON([module, classes])
+dnl
+dnl Adds support for distributing Python modules or classes.
+dnl Python library files distributed as a `module' are installed
+dnl under PYTHON_SITE_PACKAGE (eg, ./python1.5/site-package/package-name)
+dnl while those distributed as `classes' are installed under PYTHON_SITE
+dnl (eg, ./python1.5/site-packages).  The default is to install as
+dnl a `module'.
+
+AC_DEFUN([CHECK_PYTHON],
+ [
+  python_ok=yes
+  AC_ARG_WITH(python,
+   [AC_HELP_STRING([--with-python=DIR],[root directory path of python installation])],
+   [PYTHON="$withval/bin/python"
+    AC_MSG_RESULT("select python distribution in $withval")
+   ], [
+    AC_PATH_PROG(PYTHON, python)
+    ])
+  
+  AC_CHECKING([local Python configuration])
+
+  AC_REQUIRE([AC_LINKER_OPTIONS])dnl
+
+  PYTHON_PREFIX=`echo $PYTHON | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+  PYTHON_PREFIX=`echo $PYTHON_PREFIX | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+  PYTHONHOME=$PYTHON_PREFIX
+
+  AC_SUBST(PYTHON_PREFIX)
+  AC_SUBST(PYTHONHOME)
+
+  changequote(<<, >>)dnl
+  PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
+  changequote([, ])dnl
+  AC_SUBST(PYTHON_VERSION)
+
+  PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile
+  if test ! -f "$PY_MAKEFILE"; then
+     AC_MSG_WARN([*** Couldn't find ${PY_MAKEFILE}.  Maybe you are
+*** missing the development portion of the python installation])
+     python_ok=no
+  fi
+
+  AC_SUBST(PYTHON_INCLUDES)
+  AC_SUBST(PYTHON_LIBS)
+
+  PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
+  PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+  PYTHON_LIB=$PYTHON_LIBS
+  PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS Python thinks this is.
+
+  AC_SUBST(PYTHON_PLATFORM)
+  PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"`
+
+  AC_SUBST(PYTHON_SITE)
+  AC_ARG_WITH(python-site,
+    [AC_HELP_STRING([--with-python-site=DIR],
+       [Use DIR for installing platform independent Python site-packages])],
+
+dnl modification : by default, we install python script in salome root tree
+
+dnl [PYTHON_SITE="$withval"
+dnl python_site_given=yes],
+dnl [PYTHON_SITE=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
+dnl python_site_given=no]
+
+   [PYTHON_SITE="$withval"
+    python_site_given=yes],
+   [PYTHON_SITE=${prefix}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
+    python_site_given=no])
+
+  AC_SUBST(PYTHON_SITE_PACKAGE)
+  PYTHON_SITE_PACKAGE=$PYTHON_SITE/$PACKAGE
+
+
+  dnl Get PYTHON_SITE from --with-python-site-exec or from
+  dnl --with-python-site or from running Python
+
+  AC_SUBST(PYTHON_SITE_EXEC)
+  AC_ARG_WITH(python-site-exec,
+    [AC_HELP_STRING([--with-python-site-exec=DIR],
+                    [Use DIR for installing platform dependent Python site-packages])],
+    [PYTHON_SITE_EXEC="$withval"],
+    [if test "$python_site_given" = yes; then
+       PYTHON_SITE_EXEC=$PYTHON_SITE
+     else
+       PYTHON_SITE_EXEC=${PYTHON_EXEC_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
+     fi])
+
+  dnl Set up the install directory
+  ifelse($1, classes,
+[PYTHON_SITE_INSTALL=$PYTHON_SITE],
+[PYTHON_SITE_INSTALL=$PYTHON_SITE_PACKAGE])
+  AC_SUBST(PYTHON_SITE_INSTALL)
+
+  dnl Also lets automake think PYTHON means something.
+
+  pythondir=${PYTHON_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/
+  AC_SUBST(pythondir)
+
+ AC_MSG_CHECKING([if we need libdb])
+ PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U`
+  if test "x$PY_NEEDOPENDB" != "x"; then
+     AC_MSG_RESULT(yes)
+     AC_CHECK_LIB(db,dbopen,PYTHON_LIBS="$PYTHON_LIBS -ldb",db_ok=no)
+  else
+     AC_MSG_RESULT(no)
+  fi
+
+ AC_MSG_CHECKING([if we need libdl])
+  PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U`
+  if test "x$PY_NEEDOPENDL" != "x"; then
+     AC_MSG_RESULT(yes)
+     AC_CHECK_LIB(dl,dlopen,PYTHON_LIBS="$PYTHON_LIBS -ldl",dl_ok=no)
+  else
+     AC_MSG_RESULT(no)
+  fi
+
+ AC_MSG_CHECKING([if we need libutil])
+  PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U`
+  if test "x$PY_NEEDOPENPTY" != "x"; then
+     AC_MSG_RESULT(yes)
+     AC_CHECK_LIB(util,openpty,PYTHON_LIBS="$PYTHON_LIBS -lutil",openpty_ok=no)
+  else
+     AC_MSG_RESULT(no)
+  fi
+
+ AC_MSG_CHECKING([if we need tcltk])
+  PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U`
+  if test "x$PY_NEEDTCLTK" != "x"; then
+     AC_MSG_RESULT(yes)
+     AC_CHECK_LIB(tcl,Tcl_Init,PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk",tclinit_ok=no)
+  else
+     AC_MSG_RESULT(no)
+  fi
+
+  if test "$python_ok" == "yes"; then
+      AC_MSG_RESULT(looks good)
+  fi
+])
+
diff --git a/adm_local/Makefile.am b/adm_local/Makefile.am
new file mode 100755 (executable)
index 0000000..f35273f
--- /dev/null
@@ -0,0 +1,24 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = unix
diff --git a/adm_local/unix/Makefile.am b/adm_local/unix/Makefile.am
new file mode 100755 (executable)
index 0000000..5f6d5f7
--- /dev/null
@@ -0,0 +1,24 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+SUBDIRS = config_files
diff --git a/adm_local/unix/config_files/Makefile.am b/adm_local/unix/config_files/Makefile.am
new file mode 100755 (executable)
index 0000000..effdf6a
--- /dev/null
@@ -0,0 +1,25 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_admlocalm4_DATA = \
+       check_HEXABLOCK.m4
\ No newline at end of file
diff --git a/adm_local/unix/config_files/check_HEXABLOCK.m4 b/adm_local/unix/config_files/check_HEXABLOCK.m4
new file mode 100755 (executable)
index 0000000..7d4e170
--- /dev/null
@@ -0,0 +1,84 @@
+dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+dnl
+dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl  This library is free software; you can redistribute it and/or
+dnl  modify it under the terms of the GNU Lesser General Public
+dnl  License as published by the Free Software Foundation; either
+dnl  version 2.1 of the License.
+dnl
+dnl  This library is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl  Lesser General Public License for more details.
+dnl
+dnl  You should have received a copy of the GNU Lesser General Public
+dnl  License along with this library; if not, write to the Free Software
+dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+dnl
+dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+dnl
+#  Check availability of HEXABLOCK module binary distribution
+#
+#  Author : Marc Tajchman (CEA, 2002)
+#------------------------------------------------------------
+
+AC_DEFUN([CHECK_HEXABLOCK],[
+
+AC_CHECKING(for HEXABLOCK)
+
+HEXABLOCK_ok=no
+
+HEXABLOCK_LDFLAGS=""
+HEXABLOCK_CXXFLAGS=""
+
+AC_ARG_WITH(hexablock,
+           --with-hexablock=DIR root directory path of HEXABLOCK installation,
+           HEXABLOCK_DIR="$withval",HEXABLOCK_DIR="")
+
+if test "x$HEXABLOCK_DIR" = "x" ; then
+
+# no --with-gui-dir option used
+
+  if test "x$HEXABLOCK_ROOT_DIR" != "x" ; then
+
+    # HEXABLOCK_ROOT_DIR environment variable defined
+    HEXABLOCK_DIR=$HEXABLOCK_ROOT_DIR
+
+  else
+
+    # search hexablock binaries in PATH variable
+    AC_PATH_PROG(TEMP, libHEXABLOCK.so)
+    if test "x$TEMP" != "x" ; then
+      HEXABLOCK_BIN_DIR=`dirname $TEMP`
+      HEXABLOCK_DIR=`dirname $HEXABLOCK_BIN_DIR`
+    fi
+
+  fi
+#
+fi
+
+if test -f ${HEXABLOCK_DIR}/lib/salome/libHEXABLOCK.so  ; then
+  HEXABLOCK_ok=yes
+  AC_MSG_RESULT(Using HEXABLOCK distribution in ${HEXABLOCK_DIR})
+
+  if test "x$HEXABLOCK_ROOT_DIR" == "x" ; then
+    HEXABLOCK_ROOT_DIR=${HEXABLOCK_DIR}
+  fi
+  AC_SUBST(HEXABLOCK_ROOT_DIR)
+
+  HEXABLOCK_LDFLAGS=-L${HEXABLOCK_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+  HEXABLOCK_CXXFLAGS=-I${HEXABLOCK_DIR}/include/salome
+    
+  AC_SUBST(HEXABLOCK_LDFLAGS)
+  AC_SUBST(HEXABLOCK_CXXFLAGS)
+
+else
+  AC_MSG_WARN("Cannot find compiled HEXABLOCK distribution")
+fi
+  
+AC_MSG_RESULT(for HEXABLOCK: $HEXABLOCK_ok)
+])dnl
diff --git a/adm_local/unix/config_files/config.guess b/adm_local/unix/config_files/config.guess
new file mode 100755 (executable)
index 0000000..e3ef63f
--- /dev/null
@@ -0,0 +1,1471 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-13'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    x86:Interix*:[345]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #if defined(__INTEL_COMPILER) || defined(__PGI)
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/adm_local/unix/config_files/config.sub b/adm_local/unix/config_files/config.sub
new file mode 100755 (executable)
index 0000000..c0ada46
--- /dev/null
@@ -0,0 +1,1602 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray)
+               os=
+               basic_machine=$1
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64vr | mips64vrel \
+       | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | mt \
+       | msp430 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m32c)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+       m32c-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+       spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/adm_local/unix/config_files/depcomp b/adm_local/unix/config_files/depcomp
new file mode 100755 (executable)
index 0000000..ca5ea4e
--- /dev/null
@@ -0,0 +1,584 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2006-10-15.18
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/adm_local/unix/config_files/install-sh b/adm_local/unix/config_files/install-sh
new file mode 100755 (executable)
index 0000000..4fbbae7
--- /dev/null
@@ -0,0 +1,507 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-10-14.15
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+        shift
+        shift
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+       shift
+       shift
+       continue;;
+
+    -T) no_target_directory=true
+       shift
+       continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dstarg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dstarg"
+      shift # fnord
+    fi
+    shift # arg
+    dstarg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dstarg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix=/ ;;
+       -*) prefix=./ ;;
+       *)  prefix= ;;
+      esac
+
+      case $posix_glob in
+        '')
+         if (set -f) 2>/dev/null; then
+           posix_glob=true
+         else
+           posix_glob=false
+         fi ;;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob && set -f
+      set fnord $dstdir
+      shift
+      $posix_glob && set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
+
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dst"; then
+              $doit $rmcmd -f "$dst" 2>/dev/null \
+              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+              || {
+                echo "$0: cannot unlink or rename $dst" >&2
+                (exit 1); exit 1
+              }
+            else
+              :
+            fi
+          } &&
+
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dst"
+        }
+    } || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/adm_local/unix/config_files/ltmain.sh b/adm_local/unix/config_files/ltmain.sh
new file mode 100644 (file)
index 0000000..22f58df
--- /dev/null
@@ -0,0 +1,6933 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+         save_$lt_var=\$$lt_var
+         $lt_var=C
+         export $lt_var
+       fi"
+done
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS="  $lt_nl"
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+duplicate_deps=no
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+       # Failing that, at least try and use $RANDOM to avoid a race
+       my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+       save_mktempdir_umask=`umask`
+       umask 0077
+       $mkdir "$my_tmpdir"
+       umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+       exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+       $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+       case $arg in
+         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+       for z in $available_tags; do
+         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+           # Evaluate the configuration.
+           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           CC_quoted=
+           for arg in $CC; do
+           # Double-quote args containing other shell metacharacters.
+           case $arg in
+             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
+             arg="\"$arg\""
+             ;;
+           esac
+           CC_quoted="$CC_quoted $arg"
+         done
+           case "$@ " in
+             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+             # The compiler in the base compile command matches
+             # the one in the tagged configuration.
+             # Assume this is the tagged configuration we want.
+             tagname=$z
+             break
+             ;;
+           esac
+         fi
+       done
+       # If $tagname still isn't set, then no tagged configuration
+       # was found and let the user know that the "--tag" command
+       # line option must be used.
+       if test -z "$tagname"; then
+         $echo "$modename: unable to infer tagged configuration"
+         $echo "$modename: specify a tag with \`--tag'" 1>&2
+         exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+       fi
+       ;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         extracted_serial=`expr $extracted_serial + 1`
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+       exit $exit_status
+      fi
+      case $host in
+      *-darwin*)
+       $show "Extracting $my_xabs"
+       # Do not bother doing anything if just a dry run
+       if test -z "$run"; then
+         darwin_orig_dir=`pwd`
+         cd $my_xdir || exit $?
+         darwin_archive=$my_xabs
+         darwin_curdir=`pwd`
+         darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+         darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+         if test -n "$darwin_arches"; then 
+           darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+           darwin_arch=
+           $show "$darwin_base_archive has multiple architectures $darwin_arches"
+           for darwin_arch in  $darwin_arches ; do
+             mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+             cd "$darwin_curdir"
+             $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+           done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+           darwin_file=
+           darwin_files=
+           for darwin_file in $darwin_filelist; do
+             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+             lipo -create -output "$darwin_file" $darwin_files
+           done # $darwin_filelist
+           ${rm}r unfat-$$
+           cd "$darwin_orig_dir"
+         else
+           cd "$darwin_orig_dir"
+           func_extract_an_archive "$my_xdir" "$my_xabs"
+         fi # $darwin_arches
+       fi # $run
+       ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+#eval std_shrext=\"$shrext_cmds\"
+
+# And fixing for Darwin sucks for everybody else
+if test -z "$shrext_cmds" && test -n "$shrext"; then
+       eval shrext_cmds=\"$shrext\"
+fi
+
+eval std_shrext=\"$shrext_cmds\"
+
+# This value is evaluated to 32768, so place it here as a compatilibity hack
+# because older libtool.m4 didn't define this variable
+test -z "$max_cmd_len" && max_cmd_len=32768
+
+disable_libs=no
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+       $echo "$progname: invalid tag name: $tagname" 1>&2
+       exit $EXIT_FAILURE
+       ;;
+      esac
+
+      case $tagname in
+      CC)
+       # Don't test for the "default" C tag, as we know, it's there, but
+       # not specially marked.
+       ;;
+      *)
+       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+         taglist="$taglist $tagname"
+         # Evaluate the configuration.
+         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+       else
+         $echo "$progname: ignoring unknown tag $tagname" 1>&2
+       fi
+       ;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+       case $arg in
+       -c)
+          mode=compile
+          break
+          ;;
+       esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+       if test -n "$nonopt"; then
+         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+       else
+         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+       fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
+       arg_mode=normal
+       ;;
+
+      target )
+       libobj="$arg"
+       arg_mode=normal
+       continue
+       ;;
+
+      normal )
+       # Accept any command-line options.
+       case $arg in
+       -o)
+         if test -n "$libobj" ; then
+           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         arg_mode=target
+         continue
+         ;;
+
+       -static | -prefer-pic | -prefer-non-pic)
+         later="$later $arg"
+         continue
+         ;;
+
+       -no-suppress)
+         suppress_opt=no
+         continue
+         ;;
+
+       -Xcompiler)
+         arg_mode=arg  #  the next one goes into the "base_compile" arg list
+         continue      #  The current "srcfile" will either be retained or
+         ;;            #  replaced later.  I would guess that would be a bug.
+
+       -Wc,*)
+         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+
+           # Double-quote args containing other shell metacharacters.
+           # Many Bourne shells cannot handle close brackets correctly
+           # in scan sets, so we specify it separately.
+           case $arg in
+             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
+             arg="\"$arg\""
+             ;;
+           esac
+           lastarg="$lastarg $arg"
+         done
+         IFS="$save_ifs"
+         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+         # Add the arguments to base_compile.
+         base_compile="$base_compile $lastarg"
+         continue
+         ;;
+
+       * )
+         # Accept the current argument as the source file.
+         # The previous "srcfile" becomes the current argument.
+         #
+         lastarg="$srcfile"
+         srcfile="$arg"
+         ;;
+       esac  #  case $arg
+       ;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       lastarg="\"$lastarg\""
+       ;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+       && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"'  &()|`$[]' \
+       && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+       $show "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+       $echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+       command="$base_compile $qsrcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+       $show "$mkdir ${xdir}$objdir"
+       $run $mkdir ${xdir}$objdir
+       exit_status=$?
+       if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+         exit $exit_status
+       fi
+      fi
+
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+       test -n "$output_obj" && $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+       $show "$mv $output_obj $lobj"
+       if $run $mv $output_obj $lobj; then :
+       else
+         error=$?
+         $run $rm $removelist
+         exit $error
+       fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      else
+       command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+       command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+       $show "$mv $output_obj $obj"
+       if $run $mv $output_obj $obj; then :
+       else
+         error=$?
+         $run $rm $removelist
+         exit $error
+       fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static | -static-libtool-libs)
+    case $arg in
+    -all-static)
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+    -static)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=built
+         ;;
+    -static-libtool-libs)
+      if test -z "$pic_flag" && test -n "$link_static_flag"; then
+        dlopen_self=$dlopen_self_static
+      fi
+      prefer_static_libs=yes
+      ;;
+    esac
+       build_libtool_libs=no
+       build_old_libs=yes
+       break
+       ;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+       ;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         compile_command="$compile_command @OUTPUT@"
+         finalize_command="$finalize_command @OUTPUT@"
+         ;;
+       esac
+
+       case $prev in
+       dlfiles|dlprefiles)
+         if test "$preload" = no; then
+           # Add the symbol object into the linking commands.
+           compile_command="$compile_command @SYMFILE@"
+           finalize_command="$finalize_command @SYMFILE@"
+           preload=yes
+         fi
+         case $arg in
+         *.la | *.lo) ;;  # We handle these cases below.
+         force)
+           if test "$dlself" = no; then
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         self)
+           if test "$prev" = dlprefiles; then
+             dlself=yes
+           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+             dlself=yes
+           else
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         *)
+           if test "$prev" = dlfiles; then
+             dlfiles="$dlfiles $arg"
+           else
+             dlprefiles="$dlprefiles $arg"
+           fi
+           prev=
+           continue
+           ;;
+         esac
+         ;;
+       expsyms)
+         export_symbols="$arg"
+         if test ! -f "$arg"; then
+           $echo "$modename: symbol file \`$arg' does not exist"
+           exit $EXIT_FAILURE
+         fi
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex="$arg"
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir="$arg"
+         prev=
+         continue
+         ;;
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
+         ;;
+       release)
+         release="-$arg"
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat $save_arg`
+           do
+#            moreargs="$moreargs $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               # If there is no directory component, then add one.
+               case $arg in
+               */* | *\\*) . $arg ;;
+               *) . ./$arg ;;
+               esac
+
+               if test -z "$pic_object" || \
+                  test -z "$non_pic_object" ||
+                  test "$pic_object" = none && \
+                  test "$non_pic_object" = none; then
+                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+
+               # Extract subdirectory from the argument.
+               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+               if test "X$xdir" = "X$arg"; then
+                 xdir=
+               else
+                 xdir="$xdir/"
+               fi
+
+               if test "$pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 pic_object="$xdir$pic_object"
+
+                 if test "$prev" = dlfiles; then
+                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+                     dlfiles="$dlfiles $pic_object"
+                     prev=
+                     continue
+                   else
+                     # If libtool objects are unsupported, then we need to preload.
+                     prev=dlprefiles
+                   fi
+                 fi
+
+                 # CHECK ME:  I think I busted this.  -Ossama
+                 if test "$prev" = dlprefiles; then
+                   # Preload the old-style object.
+                   dlprefiles="$dlprefiles $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 libobjs="$libobjs $pic_object"
+                 arg="$pic_object"
+               fi
+
+               # Non-PIC object.
+               if test "$non_pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 non_pic_object="$xdir$non_pic_object"
+
+                 # A standard non-PIC object
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+                 if test -z "$pic_object" || test "$pic_object" = none ; then
+                   arg="$non_pic_object"
+                 fi
+               else
+                 # If the PIC object exists, use it instead.
+                 # $xdir was prepended to $pic_object above.
+                 non_pic_object="$pic_object"
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+               fi
+             else
+               # Only an error if not doing a dry-run.
+               if test -z "$run"; then
+                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+                 exit $EXIT_FAILURE
+               else
+                 # Dry-run case.
+
+                 # Extract subdirectory from the argument.
+                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+                 if test "X$xdir" = "X$arg"; then
+                   xdir=
+                 else
+                   xdir="$xdir/"
+                 fi
+
+                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+                 libobjs="$libobjs $pic_object"
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+               fi
+             fi
+           done
+         else
+           $echo "$modename: link input file \`$save_arg' does not exist"
+           exit $EXIT_FAILURE
+         fi
+         arg=$save_arg
+         prev=
+         continue
+         ;;
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           $echo "$modename: only absolute run-paths are allowed" 1>&2
+           exit $EXIT_FAILURE
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) rpath="$rpath $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) xrpath="$xrpath $arg" ;;
+           esac
+         fi
+         prev=
+         continue
+         ;;
+       xcompiler)
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
+       xlinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $wl$qarg"
+         prev=
+         compile_command="$compile_command $wl$qarg"
+         finalize_command="$finalize_command $wl$qarg"
+         continue
+         ;;
+       xcclinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
+       shrext)
+         shrext_cmds="$arg"
+         prev=
+         continue
+         ;;
+       darwin_framework|darwin_framework_skip)
+         test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+         compile_command="$compile_command $arg"
+         finalize_command="$finalize_command $arg"
+         prev=
+         continue
+         ;;
+       *)
+         eval "$prev=\"\$arg\""
+         prev=
+         continue
+         ;;
+       esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+       if test -n "$link_static_flag"; then
+         compile_command="$compile_command $link_static_flag"
+         finalize_command="$finalize_command $link_static_flag"
+       fi
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+       continue
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       continue
+       ;;
+
+      -dlopen)
+       prev=dlfiles
+       continue
+       ;;
+
+      -dlpreopen)
+       prev=dlprefiles
+       continue
+       ;;
+
+      -export-dynamic)
+       export_dynamic=yes
+       continue
+       ;;
+
+      -export-symbols | -export-symbols-regex)
+       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+         $echo "$modename: more than one -exported-symbols argument is not allowed"
+         exit $EXIT_FAILURE
+       fi
+       if test "X$arg" = "X-export-symbols"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       continue
+       ;;
+
+      -framework|-arch|-isysroot)
+       case " $CC " in
+         *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
+               prev=darwin_framework_skip ;;
+         *) compiler_flags="$compiler_flags $arg"
+            prev=darwin_framework ;;
+       esac
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+       continue
+       ;;
+
+      -inst-prefix-dir)
+       prev=inst_prefix
+       continue
+       ;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+       case $with_gcc/$host in
+       no/*-*-irix* | /*-*-irix*)
+         compile_command="$compile_command $arg"
+         finalize_command="$finalize_command $arg"
+         ;;
+       esac
+       continue
+       ;;
+
+      -L*)
+       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         if test -z "$absdir"; then
+           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+           absdir="$dir"
+           notinst_path="$notinst_path $dir"
+         fi
+         dir="$absdir"
+         ;;
+       esac
+       case "$deplibs " in
+       *" -L$dir "*) ;;
+       *)
+         deplibs="$deplibs -L$dir"
+         lib_search_path="$lib_search_path $dir"
+         ;;
+       esac
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$dir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+       continue
+       ;;
+
+      -l*)
+       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C and math libraries are in the System framework
+           deplibs="$deplibs -framework System"
+           continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           test "X$arg" = "X-lc" && continue
+           ;;
+         esac
+       elif test "X$arg" = "X-lc_r"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
+       fi
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+       compile_command="$compile_command $arg"
+       compiler_flags="$compiler_flags $arg"
+       finalize_command="$finalize_command $arg"
+       prev=xcompiler
+       continue
+       ;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+       compiler_flags="$compiler_flags $arg"
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+       continue
+       ;;
+
+      -module)
+       module=yes
+       continue
+       ;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -pg pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+      -t[45]*|-txscale*|@*)
+
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -shrext)
+       prev=shrext
+       continue
+       ;;
+
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
+
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # in order for the loader to find any dlls it needs.
+         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+         fast_install=no
+         ;;
+       *) no_install=yes ;;
+       esac
+       continue
+       ;;
+
+      -no-undefined)
+       allow_undefined=no
+       continue
+       ;;
+
+      -objectlist)
+       prev=objectlist
+       continue
+       ;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
+
+      -release)
+       prev=release
+       continue
+       ;;
+
+      -rpath)
+       prev=rpath
+       continue
+       ;;
+
+      -R)
+       prev=xrpath
+       continue
+       ;;
+
+      -R*)
+       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         $echo "$modename: only absolute run-paths are allowed" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) xrpath="$xrpath $dir" ;;
+       esac
+       continue
+       ;;
+
+      -static | -static-libtool-libs)
+       # The effects of -static are defined in a previous loop.
+       # We used to do the same as -all-static on platforms that
+       # didn't have a PIC flag, but the assumption that the effects
+       # would be equivalent was wrong.  It would break on at least
+       # Digital Unix and AIX.
+       continue
+       ;;
+
+      -thread-safe)
+       thread_safe=yes
+       continue
+       ;;
+
+      -version-info)
+       prev=vinfo
+       continue
+       ;;
+      -version-number)
+       prev=vinfo
+       vinfo_number=yes
+       continue
+       ;;
+
+      -Wc,*)
+       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+         case $flag in
+           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
+           flag="\"$flag\""
+           ;;
+         esac
+         arg="$arg $wl$flag"
+         compiler_flags="$compiler_flags $flag"
+       done
+       IFS="$save_ifs"
+       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+       ;;
+
+      -Wl,*)
+       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+         case $flag in
+           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
+           flag="\"$flag\""
+           ;;
+         esac
+         arg="$arg $wl$flag"
+         compiler_flags="$compiler_flags $wl$flag"
+         linker_flags="$linker_flags $flag"
+       done
+       IFS="$save_ifs"
+       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+       ;;
+
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
+
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
+
+      # Some other compiler flag.
+      -* | +*)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       ;;
+
+      *.$objext)
+       # A standard object.
+       objs="$objs $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         # If there is no directory component, then add one.
+         case $arg in
+         */* | *\\*) . $arg ;;
+         *) . ./$arg ;;
+         esac
+
+         if test -z "$pic_object" || \
+            test -z "$non_pic_object" ||
+            test "$pic_object" = none && \
+            test "$non_pic_object" = none; then
+           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         # Extract subdirectory from the argument.
+         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+         if test "X$xdir" = "X$arg"; then
+           xdir=
+         else
+           xdir="$xdir/"
+         fi
+
+         if test "$pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           pic_object="$xdir$pic_object"
+
+           if test "$prev" = dlfiles; then
+             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+               dlfiles="$dlfiles $pic_object"
+               prev=
+               continue
+             else
+               # If libtool objects are unsupported, then we need to preload.
+               prev=dlprefiles
+             fi
+           fi
+
+           # CHECK ME:  I think I busted this.  -Ossama
+           if test "$prev" = dlprefiles; then
+             # Preload the old-style object.
+             dlprefiles="$dlprefiles $pic_object"
+             prev=
+           fi
+
+           # A PIC object.
+           libobjs="$libobjs $pic_object"
+           arg="$pic_object"
+         fi
+
+         # Non-PIC object.
+         if test "$non_pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           non_pic_object="$xdir$non_pic_object"
+
+           # A standard non-PIC object
+           non_pic_objects="$non_pic_objects $non_pic_object"
+           if test -z "$pic_object" || test "$pic_object" = none ; then
+             arg="$non_pic_object"
+           fi
+         else
+           # If the PIC object exists, use it instead.
+           # $xdir was prepended to $pic_object above.
+           non_pic_object="$pic_object"
+           non_pic_objects="$non_pic_objects $non_pic_object"
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if test -z "$run"; then
+           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+           exit $EXIT_FAILURE
+         else
+           # Dry-run case.
+
+           # Extract subdirectory from the argument.
+           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+           if test "X$xdir" = "X$arg"; then
+             xdir=
+           else
+             xdir="$xdir/"
+           fi
+
+           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+           libobjs="$libobjs $pic_object"
+           non_pic_objects="$non_pic_objects $non_pic_object"
+         fi
+       fi
+       ;;
+
+      *.$libext)
+       # An archive.
+       deplibs="$deplibs $arg"
+       old_deplibs="$old_deplibs $arg"
+       continue
+       ;;
+
+      *.la)
+       # A libtool-controlled library.
+
+       if test "$prev" = dlfiles; then
+         # This library was specified with -dlopen.
+         dlfiles="$dlfiles $arg"
+         prev=
+       elif test "$prev" = dlprefiles; then
+         # The library was specified with -dlpreopen.
+         dlprefiles="$dlprefiles $arg"
+         prev=
+       else
+         deplibs="$deplibs $arg"
+       fi
+       continue
+       ;;
+
+      # Some other compiler argument.
+      *)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       ;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+       exit $exit_status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+       case "$libs " in
+       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+       esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+         esac
+         pre_post_deps="$pre_post_deps $pre_post_dep"
+       done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    case $linkmode in
+    lib)
+       passes="conv link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+           exit $EXIT_FAILURE
+           ;;
+         esac
+       done
+       ;;
+    prog)
+       compile_deplibs=
+       finalize_deplibs=
+       alldeplibs=no
+       newdlfiles=
+       newdlprefiles=
+       passes="conv scan dlopen dlpreopen link"
+       ;;
+    *)  passes="conv"
+       ;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+        test "$linkmode,$pass" = "prog,scan"; then
+       libs="$deplibs"
+       deplibs=
+      fi
+      if test "$linkmode" = prog; then
+       case $pass in
+       dlopen) libs="$dlfiles" ;;
+       dlpreopen) libs="$dlprefiles" ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       esac
+      fi
+      if test "$pass" = dlopen; then
+       # Collect dlpreopened libraries
+       save_deplibs="$deplibs"
+       deplibs=
+      fi
+      for deplib in $libs; do
+       lib=
+       found=no
+       case $deplib in
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           compiler_flags="$compiler_flags $deplib"
+         fi
+         continue
+         ;;
+       -l*)
+         if test "$linkmode" != lib && test "$linkmode" != prog; then
+           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+           continue
+         fi
+         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+           for search_ext in .la $std_shrext .so .a; do
+             # Search the libtool library
+             lib="$searchdir/lib${name}${search_ext}"
+             if test -f "$lib"; then
+               if test "$search_ext" = ".la"; then
+                 found=yes
+               else
+                 found=no
+               fi
+               break 2
+             fi
+           done
+         done
+         if test "$found" != yes; then
+           # deplib doesn't seem to be a libtool library
+           if test "$linkmode,$pass" = "prog,link"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             deplibs="$deplib $deplibs"
+             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
+         else # deplib is a libtool library
+           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+           # We need to do some special things here, and not later.
+           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             case " $predeps $postdeps " in
+             *" $deplib "*)
+               if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+                 library_names=
+                 old_library=
+                 case $lib in
+                 */* | *\\*) . $lib ;;
+                 *) . ./$lib ;;
+                 esac
+                 for l in $old_library $library_names; do
+                   ll="$l"
+                 done
+                 if test "X$ll" = "X$old_library" ; then # only static version available
+                   found=no
+                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+                   test "X$ladir" = "X$lib" && ladir="."
+                   lib=$ladir/$old_library
+                   if test "$linkmode,$pass" = "prog,link"; then
+                     compile_deplibs="$deplib $compile_deplibs"
+                     finalize_deplibs="$deplib $finalize_deplibs"
+                   else
+                     deplibs="$deplib $deplibs"
+                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+                   fi
+                   continue
+                 fi
+               fi
+               ;;
+             *) ;;
+             esac
+           fi
+         fi
+         ;; # -l
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+           ;;
+         prog)
+           if test "$pass" = conv; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test "$pass" = scan; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+           ;;
+         *)
+           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test "$pass" = link; then
+           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) xrpath="$xrpath $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la) lib="$deplib" ;;
+       *.$libext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           valid_a_lib=no
+           case $deplibs_check_method in
+             match_pattern*)
+               set dummy $deplibs_check_method
+               match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+               if eval $echo \"$deplib\" 2>/dev/null \
+                   | $SED 10q \
+                   | $EGREP "$match_pattern_regex" > /dev/null; then
+                 valid_a_lib=yes
+               fi
+               ;;
+             pass_all)
+               valid_a_lib=yes
+               ;;
+            esac
+           if test "$valid_a_lib" != yes; then
+             $echo
+             $echo "*** Warning: Trying to link with static lib archive $deplib."
+             $echo "*** I have the capability to make that library automatically link in when"
+             $echo "*** you link to this library.  But I can only do this if you have a"
+             $echo "*** shared version of the library, which you do not appear to have"
+             $echo "*** because the file extensions .$libext of this argument makes me believe"
+             $echo "*** that it is just a static archive that I should not used here."
+           else
+             $echo
+             $echo "*** Warning: Linking the shared library $output against the"
+             $echo "*** static library $deplib is not portable!"
+             deplibs="$deplib $deplibs"
+           fi
+           continue
+           ;;
+         prog)
+           if test "$pass" != link; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           continue
+           ;;
+         esac # linkmode
+         ;; # *.$libext
+       *.lo | *.$objext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+         elif test "$linkmode" = prog; then
+           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             newdlprefiles="$newdlprefiles $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             newdlfiles="$newdlfiles $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=yes
+         continue
+         ;;
+       esac # case $deplib
+       if test "$found" = yes || test -f "$lib"; then :
+       else
+         $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$ladir" = "X$lib" && ladir="."
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       # If the library was installed with an old release of libtool,
+       # it will not redefine variables installed, or shouldnotlink
+       installed=yes
+       shouldnotlink=no
+       avoidtemprpath=
+
+
+       # Read the .la file
+       case $lib in
+       */* | *\\*) . $lib ;;
+       *) . ./$lib ;;
+       esac
+
+       if test "$linkmode,$pass" = "lib,link" ||
+          test "$linkmode,$pass" = "prog,scan" ||
+          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+       fi
+
+       if test "$pass" = conv; then
+         # Only check for convenience libraries
+         deplibs="$lib $deplibs"
+         if test -z "$libdir"; then
+           if test -z "$old_library"; then
+             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+             exit $EXIT_FAILURE
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           convenience="$convenience $ladir/$objdir/$old_library"
+           old_convenience="$old_convenience $ladir/$objdir/$old_library"
+           tmp_libs=
+           for deplib in $dependency_libs; do
+             deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+               case "$tmp_libs " in
+               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+               esac
+              fi
+             tmp_libs="$tmp_libs $deplib"
+           done
+         elif test "$linkmode" != prog && test "$linkmode" != lib; then
+           $echo "$modename: \`$lib' is not a convenience library" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       for l in $old_library $library_names; do
+         linklib="$l"
+       done
+       if test -z "$linklib"; then
+         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # This library was specified with -dlopen.
+       if test "$pass" = dlopen; then
+         if test -z "$libdir"; then
+           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         if test -z "$dlname" ||
+            test "$dlopen_support" != yes ||
+            test "$build_libtool_libs" = no; then
+           # If there is no dlname, no dlopen support or we're linking
+           # statically, we need to preload.  We also need to preload any
+           # dependent libraries so libltdl's deplib preloader doesn't
+           # bomb out in the load deplibs phase.
+           dlprefiles="$dlprefiles $lib $dependency_libs"
+         else
+           newdlfiles="$newdlfiles $lib"
+         fi
+         continue
+       fi # $pass = dlopen
+
+       # We need an absolute path.
+       case $ladir in
+       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       *)
+         abs_ladir=`cd "$ladir" && pwd`
+         if test -z "$abs_ladir"; then
+           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+           abs_ladir="$ladir"
+         fi
+         ;;
+       esac
+       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+       # Find the relevant object directory and library name.
+       if test "X$installed" = Xyes; then
+         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           $echo "$modename: warning: library \`$lib' was moved." 1>&2
+           dir="$ladir"
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+           dir="$libdir"
+           absdir="$libdir"
+         fi
+         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+       else
+         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           dir="$ladir"
+           absdir="$abs_ladir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         else
+           dir="$ladir/$objdir"
+           absdir="$abs_ladir/$objdir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         fi
+       fi # $installed = yes
+       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+       # This library was specified with -dlpreopen.
+       if test "$pass" = dlpreopen; then
+         if test -z "$libdir"; then
+           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         # Prefer using a static library (so that no silly _DYNAMIC symbols
+         # are required to link).
+         if test -n "$old_library"; then
+           newdlprefiles="$newdlprefiles $dir/$old_library"
+         # Otherwise, use the dlname, so that lt_dlopen finds it.
+         elif test -n "$dlname"; then
+           newdlprefiles="$newdlprefiles $dir/$dlname"
+         else
+           newdlprefiles="$newdlprefiles $dir/$linklib"
+         fi
+       fi # $pass = dlpreopen
+
+       if test -z "$libdir"; then
+         # Link the convenience library
+         if test "$linkmode" = lib; then
+           deplibs="$dir/$old_library $deplibs"
+         elif test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$dir/$old_library $compile_deplibs"
+           finalize_deplibs="$dir/$old_library $finalize_deplibs"
+         else
+           deplibs="$lib $deplibs" # used for prog,scan pass
+         fi
+         continue
+       fi
+
+
+       if test "$linkmode" = prog && test "$pass" != link; then
+         newlib_search_path="$newlib_search_path $ladir"
+         deplibs="$lib $deplibs"
+
+         linkalldeplibs=no
+         if test "$link_all_deplibs" != no || test -z "$library_names" ||
+            test "$build_libtool_libs" = no; then
+           linkalldeplibs=yes
+         fi
+
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           case $deplib in
+           -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+           esac
+           # Need to link against all dependency_libs?
+           if test "$linkalldeplibs" = yes; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           if test "X$duplicate_deps" = "Xyes" ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done # for deplib
+         continue
+       fi # $linkmode = prog...
+
+       if test "$linkmode,$pass" = "prog,link"; then
+         if test -n "$library_names" &&
+         { { test "$prefer_static_libs" = no ||
+             test "$prefer_static_libs,$installed" = "built,yes"; } ||
+           test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+             # Make sure the rpath contains only unique directories.
+             case "$temp_rpath " in
+             *" $dir "*) ;;
+             *" $absdir "*) ;;
+             *) temp_rpath="$temp_rpath $absdir" ;;
+             esac
+           fi
+
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi # $linkmode,$pass = prog,link...
+
+         if test "$alldeplibs" = yes &&
+            { test "$deplibs_check_method" = pass_all ||
+              { test "$build_libtool_libs" = yes &&
+                test -n "$library_names"; }; }; then
+           # We only need to search for static libraries
+           continue
+         fi
+       fi
+
+       link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test "$use_static_libs" = built && test "$installed" = yes ; then
+         use_static_libs=no
+       fi
+       if test -n "$library_names" &&
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
+         if test "$installed" = no; then
+           notinst_deplibs="$notinst_deplibs $lib"
+           need_relink=yes
+         fi
+         # This is a shared library
+
+         # Warn about portability, can't link against -module's on
+         # some systems (darwin)
+         if test "$shouldnotlink" = yes && test "$pass" = link ; then
+           $echo
+           if test "$linkmode" = prog; then
+             $echo "*** Warning: Linking the executable $output against the loadable module"
+           else
+             $echo "*** Warning: Linking the shared library $output against the loadable module"
+           fi
+           $echo "*** $linklib is not portable!"
+         fi
+         if test "$linkmode" = lib &&
+            test "$hardcode_into_libs" = yes; then
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi
+
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           realname="$2"
+           shift; shift
+           libname=`eval \\$echo \"$libname_spec\"`
+           # use dlname if we got it. it's perfectly good, no?
+           if test -n "$dlname"; then
+             soname="$dlname"
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+             *cygwin* | mingw*)
+               major=`expr $current - $age`
+               versuffix="-$major"
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
+           else
+             soname="$realname"
+           fi
+
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot="$soname"
+           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
+           else
+             $show "extracting exported symbol list from \`$soname'"
+             save_ifs="$IFS"; IFS='~'
+             cmds=$extract_expsyms_cmds
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+             done
+             IFS="$save_ifs"
+           fi
+
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             $show "generating import library for \`$soname'"
+             save_ifs="$IFS"; IFS='~'
+             cmds=$old_archive_from_expsyms_cmds
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+             done
+             IFS="$save_ifs"
+           fi
+           # make sure the library variables are pointing to the new library
+           dir=$output_objdir
+           linklib=$newlib
+         fi # test -n "$old_archive_from_expsyms_cmds"
+
+         if test "$linkmode" = prog || test "$mode" != relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           lib_linked=yes
+           case $hardcode_action in
+           immediate | unsupported)
+             if test "$hardcode_direct" = no; then
+               add="$dir/$linklib"
+               case $host in
+                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) add_dir="-L$dir" ;;
+                 *-*-darwin* )
+                   # if the lib is a module then we can not link against
+                   # it, someone is ignoring the new warnings I added
+                   if /usr/bin/file -L $add 2> /dev/null |
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
+                     $echo "** Warning, lib $linklib is a module, not a shared library"
+                     if test -z "$old_library" ; then
+                       $echo
+                       $echo "** And there doesn't seem to be a static archive available"
+                       $echo "** The link will probably fail, sorry"
+                     else
+                       add="$dir/$old_library"
+                     fi
+                   fi
+               esac
+             elif test "$hardcode_minus_L" = no; then
+               case $host in
+               *-*-sunos*) add_shlibpath="$dir" ;;
+               esac
+               add_dir="-L$dir"
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = no; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           relink)
+             if test "$hardcode_direct" = yes; then
+               add="$dir/$linklib"
+             elif test "$hardcode_minus_L" = yes; then
+               add_dir="-L$dir"
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case $libdir in
+                   [\\/]*)
+                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                     ;;
+                 esac
+               fi
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = yes; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           *) lib_linked=no ;;
+           esac
+
+           if test "$lib_linked" != yes; then
+             $echo "$modename: configuration error: unsupported hardcode properties"
+             exit $EXIT_FAILURE
+           fi
+
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+             esac
+           fi
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+             if test "$hardcode_direct" != yes && \
+                test "$hardcode_minus_L" != yes && \
+                test "$hardcode_shlibpath_var" = yes; then
+               case :$finalize_shlibpath: in
+               *":$libdir:"*) ;;
+               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
+
+         if test "$linkmode" = prog || test "$mode" = relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test "$hardcode_direct" = yes; then
+             add="$libdir/$linklib"
+           elif test "$hardcode_minus_L" = yes; then
+             add_dir="-L$libdir"
+             add="-l$name"
+           elif test "$hardcode_shlibpath_var" = yes; then
+             case :$finalize_shlibpath: in
+             *":$libdir:"*) ;;
+             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+             esac
+             add="-l$name"
+           elif test "$hardcode_automatic" = yes; then
+             if test -n "$inst_prefix_dir" &&
+                test -f "$inst_prefix_dir$libdir/$linklib" ; then
+               add="$inst_prefix_dir$libdir/$linklib"
+             else
+               add="$libdir/$linklib"
+             fi
+           else
+             # We cannot seem to hardcode it, guess we'll fake it.
+             add_dir="-L$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
+                 [\\/]*)
+                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                   ;;
+               esac
+             fi
+             add="-l$name"
+           fi
+
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+           fi
+         fi
+       elif test "$linkmode" = prog; then
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
+         if test "$hardcode_direct" != unsupported; then
+           test -n "$old_library" && linklib="$old_library"
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
+         else
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+         fi
+       elif test "$build_libtool_libs" = yes; then
+         # Not a shared library
+         if test "$deplibs_check_method" != pass_all; then
+           # We're trying link a shared library against a static one
+           # but the system doesn't support it.
+
+           # Just print a warning and add the library to dependency_libs so
+           # that the program can be linked against the static library.
+           $echo
+           $echo "*** Warning: This system can not link to static lib archive $lib."
+           $echo "*** I have the capability to make that library automatically link in when"
+           $echo "*** you link to this library.  But I can only do this if you have a"
+           $echo "*** shared version of the library, which you do not appear to have."
+           if test "$module" = yes; then
+             $echo "*** But as you try to build a module library, libtool will still create "
+             $echo "*** a static module, that should work as long as the dlopening application"
+             $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             if test -z "$global_symbol_pipe"; then
+               $echo
+               $echo "*** However, this would only work if libtool was able to extract symbol"
+               $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               $echo "*** not find such a program.  So, this module is probably useless."
+               $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+             fi
+             if test "$build_old_libs" = no; then
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         else
+           deplibs="$dir/$old_library $deplibs"
+           link_static=yes
+         fi
+       fi # link shared/static library?
+
+       if test "$linkmode" = lib; then
+         if test -n "$dependency_libs" &&
+            { test "$hardcode_into_libs" != yes ||
+              test "$build_old_libs" = yes ||
+              test "$link_static" = yes; }; then
+           # Extract -R from dependency_libs
+           temp_deplibs=
+           for libdir in $dependency_libs; do
+             case $libdir in
+             -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) xrpath="$xrpath $temp_xrpath";;
+                  esac;;
+             *) temp_deplibs="$temp_deplibs $libdir";;
+             esac
+           done
+           dependency_libs="$temp_deplibs"
+         fi
+
+         newlib_search_path="$newlib_search_path $absdir"
+         # Link against this library
+         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         # ... and its dependency_libs
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           if test "X$duplicate_deps" = "Xyes" ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done
+
+         if test "$link_all_deplibs" != no; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             case $deplib in
+             -L*) path="$deplib" ;;
+             *.la)
+               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+               test "X$dir" = "X$deplib" && dir="."
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+                   absdir="$dir"
+                 fi
+                 ;;
+               esac
+               if grep "^installed=no" $deplib > /dev/null; then
+                 path="$absdir/$objdir"
+               else
+                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 if test -z "$libdir"; then
+                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                   exit $EXIT_FAILURE
+                 fi
+                 if test "$absdir" != "$libdir"; then
+                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+                 fi
+                 path="$absdir"
+               fi
+               depdepl=
+               case $host in
+               *-*-darwin*)
+                 # we do not want to link against static libs,
+                 # but need to link against shared
+                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names" ; then
+                   for tmp in $deplibrary_names ; do
+                     depdepl=$tmp
+                   done
+                   if test -f "$path/$depdepl" ; then
+                     depdepl="$path/$depdepl"
+                   fi
+                   # do not add paths which are already there
+                   case " $newlib_search_path " in
+                   *" $path "*) ;;
+                   *) newlib_search_path="$newlib_search_path $path";;
+                   esac
+                 fi
+                 path=""
+                 ;;
+               *)
+                 path="-L$path"
+                 ;;
+               esac
+               ;;
+             -l*)
+               case $host in
+               *-*-darwin*)
+                 # Again, we only want to link against shared libraries
+                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+                 for tmp in $newlib_search_path ; do
+                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
+                     eval depdepl="$tmp/lib$tmp_libs.dylib"
+                     break
+                   fi
+                 done
+                 path=""
+                 ;;
+               *) continue ;;
+               esac
+               ;;
+             *) continue ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$path $deplibs" ;;
+             esac
+             case " $deplibs " in
+             *" $depdepl "*) ;;
+             *) deplibs="$depdepl $deplibs" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+       # Link the dlpreopened libraries before other libraries
+       for deplib in $save_deplibs; do
+         deplibs="$deplib $deplibs"
+       done
+      fi
+      if test "$pass" != dlopen; then
+       if test "$pass" != conv; then
+         # Make sure lib_search_path contains only unique directories.
+         lib_search_path=
+         for dir in $newlib_search_path; do
+           case "$lib_search_path " in
+           *" $dir "*) ;;
+           *) lib_search_path="$lib_search_path $dir" ;;
+           esac
+         done
+         newlib_search_path=
+       fi
+
+       if test "$linkmode,$pass" != "prog,link"; then
+         vars="deplibs"
+       else
+         vars="compile_deplibs finalize_deplibs"
+       fi
+       for var in $vars dependency_libs; do
+         # Add libraries to $var in reverse order
+         eval tmp_libs=\"\$$var\"
+         new_libs=
+         for deplib in $tmp_libs; do
+           # FIXME: Pedantically, this is the right thing to do, so
+           #        that some nasty dependency loop isn't accidentally
+           #        broken:
+           #new_libs="$deplib $new_libs"
+           # Pragmatically, this seems to cause very few problems in
+           # practice:
+           case $deplib in
+           -L*) new_libs="$deplib $new_libs" ;;
+           -R*) ;;
+           *)
+             # And here is the reason: when a library appears more
+             # than once as an explicit dependence of a library, or
+             # is implicitly linked in more than once by the
+             # compiler, it is considered special, and multiple
+             # occurrences thereof are not removed.  Compare this
+             # with having the same library being listed as a
+             # dependency of multiple other libraries: in this case,
+             # we know (pedantically, we assume) the library does not
+             # need to be listed more than once, so we keep only the
+             # last copy.  This is not always right, but it is rare
+             # enough that we require users that really mean to play
+             # such unportable linking tricks to link the library
+             # using -Wl,-lname, so that libtool does not consider it
+             # for duplicate removal.
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
+         done
+         tmp_libs=
+         for deplib in $new_libs; do
+           case $deplib in
+           -L*)
+             case " $tmp_libs " in
+             *" $deplib "*) ;;
+             *) tmp_libs="$tmp_libs $deplib" ;;
+             esac
+             ;;
+           *) tmp_libs="$tmp_libs $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+       case " $predeps $postdeps $compiler_lib_search_path " in
+       *" $i "*)
+         i=""
+         ;;
+       esac
+       if test -n "$i" ; then
+         tmp_libs="$tmp_libs $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       if test "$module" = no; then
+         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       if test "$need_lib_prefix" != no; then
+         # Add the "lib" prefix for modules if required
+         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+       fi
+       ;;
+      esac
+
+      if test -n "$objs"; then
+       if test "$deplibs_check_method" != pass_all; then
+         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+         exit $EXIT_FAILURE
+       else
+         $echo
+         $echo "*** Warning: Linking the shared library $output against the non-libtool"
+         $echo "*** objects $objs is not portable!"
+         libobjs="$libobjs $objs"
+       fi
+      fi
+
+      if test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+       if test "$build_libtool_libs" = yes; then
+         # Building a libtool convenience library.
+         # Some compilers have problems with a `.al' extension so
+         # convenience libraries should have the same extension an
+         # archive normally would.
+         oldlibs="$output_objdir/$libname.$libext $oldlibs"
+         build_libtool_libs=convenience
+         build_old_libs=yes
+       fi
+
+       if test -n "$vinfo"; then
+         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+       fi
+
+       if test -n "$release"; then
+         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+       fi
+      else
+
+       # Parse the version information argument.
+       save_ifs="$IFS"; IFS=':'
+       set dummy $vinfo 0 0 0
+       IFS="$save_ifs"
+
+       if test -n "$8"; then
+         $echo "$modename: too many parameters to \`-version-info'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # convert absolute version numbers to libtool ages
+       # this retains compatibility with .la files and attempts
+       # to make the code below a bit more comprehensible
+
+       case $vinfo_number in
+       yes)
+         number_major="$2"
+         number_minor="$3"
+         number_revision="$4"
+         #
+         # There are really only two kinds -- those that
+         # use the current revision as the major version
+         # and those that subtract age and use age as
+         # a minor version.  But, then there is irix
+         # which has an extra 1 added just for fun
+         #
+         case $version_type in
+         darwin|linux|osf|windows|none)
+           current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_revision"
+           ;;
+         freebsd-aout|freebsd-elf|sunos)
+           current="$number_major"
+           revision="$number_minor"
+           age="0"
+           ;;
+         irix|nonstopux)
+           current=`expr $number_major + $number_minor - 1`
+           age="$number_minor"
+           revision="$number_minor"
+           ;;
+         esac
+         ;;
+       no)
+         current="$2"
+         revision="$3"
+         age="$4"
+         ;;
+       esac
+
+       # Check that each of the things are valid numbers.
+       case $current in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       case $revision in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       case $age in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       if test "$age" -gt "$current"; then
+         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Calculate the version variables.
+       major=
+       versuffix=
+       verstring=
+       case $version_type in
+       none) ;;
+
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         minor_current=`expr $current + 1`
+         verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+         ;;
+
+       freebsd-aout)
+         major=".$current"
+         versuffix=".$current.$revision";
+         ;;
+
+       freebsd-elf)
+         major=".$current"
+         versuffix=".$current";
+         ;;
+
+       irix | nonstopux)
+         major=`expr $current - $age + 1`
+
+         case $version_type in
+           nonstopux) verstring_prefix=nonstopux ;;
+           *)         verstring_prefix=sgi ;;
+         esac
+         verstring="$verstring_prefix$major.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$revision
+         while test "$loop" -ne 0; do
+           iface=`expr $revision - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring_prefix$major.$iface:$verstring"
+         done
+
+         # Before this point, $major must not contain `.'.
+         major=.$major
+         versuffix="$major.$revision"
+         ;;
+
+       linux)
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         ;;
+
+       osf)
+         major=.`expr $current - $age`
+         versuffix=".$current.$age.$revision"
+         verstring="$current.$age.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$age
+         while test "$loop" -ne 0; do
+           iface=`expr $current - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring:${iface}.0"
+         done
+
+         # Make executables depend on our current version.
+         verstring="$verstring:${current}.0"
+         ;;
+
+       sunos)
+         major=".$current"
+         versuffix=".$current.$revision"
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 filesystems.
+         major=`expr $current - $age`
+         versuffix="-$major"
+         ;;
+
+       *)
+         $echo "$modename: unknown library version type \`$version_type'" 1>&2
+         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       # Clear the version info if we defaulted, and they specified a release.
+       if test -z "$vinfo" && test -n "$release"; then
+         major=
+         case $version_type in
+         darwin)
+           # we can't check for "0.0" in archive_cmds due to quoting
+           # problems, so we reset it completely
+           verstring=
+           ;;
+         *)
+           verstring="0.0"
+           ;;
+         esac
+         if test "$need_version" = no; then
+           versuffix=
+         else
+           versuffix=".0.0"
+         fi
+       fi
+
+       # Remove version info from name if versioning should be avoided
+       if test "$avoid_version" = yes && test "$need_version" = no; then
+         major=
+         versuffix=
+         verstring=""
+       fi
+
+       # Check to see if the archive will have undefined symbols.
+       if test "$allow_undefined" = yes; then
+         if test "$allow_undefined_flag" = unsupported; then
+           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+           build_libtool_libs=no
+           build_old_libs=yes
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag="$no_undefined_flag"
+       fi
+      fi
+
+      if test "$mode" != relink; then
+       # Remove our outputs, but don't remove object files since they
+       # may have been created when compiling PIC objects.
+       removelist=
+       tempremovelist=`$echo "$output_objdir/*"`
+       for p in $tempremovelist; do
+         case $p in
+           *.$objext)
+              ;;
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+              if test "X$precious_files_regex" != "X"; then
+                if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+                then
+                  continue
+                fi
+              fi
+              removelist="$removelist $p"
+              ;;
+           *) ;;
+         esac
+       done
+       if test -n "$removelist"; then
+         $show "${rm}r $removelist"
+         $run ${rm}r $removelist
+       fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+       oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+#      for path in $notinst_path; do
+#      lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+#      deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+#      dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+#      done
+
+      if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       temp_xrpath=
+       for libdir in $xrpath; do
+         temp_xrpath="$temp_xrpath -R$libdir"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+       case " $dlprefiles $dlfiles " in
+       *" $lib "*) ;;
+       *) dlfiles="$dlfiles $lib" ;;
+       esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+       case "$dlprefiles " in
+       *" $lib "*) ;;
+       *) dlprefiles="$dlprefiles $lib" ;;
+       esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           ;;
+         *)
+           # Add libc to deplibs on all other systems if necessary.
+           if test "$build_libtool_need_lc" = "yes"; then
+             deplibs="$deplibs -lc"
+           fi
+           ;;
+         esac
+       fi
+
+       # Transform deplibs into only deplibs that can be linked in shared.
+       name_save=$name
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=""
+       versuffix=""
+       major=""
+       newdeplibs=
+       droppeddeps=no
+       case $deplibs_check_method in
+       pass_all)
+         # Don't check for shared/static.  Everything works.
+         # This might be a little naive.  We might want to check
+         # whether the library exists or not.  But this is on
+         # osf3 & osf4 and I'm not really sure... Just
+         # implementing what was already the behavior.
+         newdeplibs=$deplibs
+         ;;
+       test_compile)
+         # This code stresses the "libraries are programs" paradigm to its
+         # limits. Maybe even breaks it.  We compile a program, linking it
+         # against the deplibs as a proxy for the library.  Then we can check
+         # whether they linked in statically or dynamically with ldd.
+         $rm conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $rm conftest
+      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   newdeplibs="$newdeplibs $i"
+                   i=""
+                   ;;
+                 esac
+               fi
+               if test -n "$i" ; then
+                 libname=`eval \\$echo \"$libname_spec\"`
+                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
+                 set dummy $deplib_matches
+                 deplib_match=$2
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   newdeplibs="$newdeplibs $i"
+                 else
+                   droppeddeps=yes
+                   $echo
+                   $echo "*** Warning: dynamic linker does not accept needed library $i."
+                   $echo "*** I have the capability to make that library automatically link in when"
+                   $echo "*** you link to this library.  But I can only do this if you have a"
+                   $echo "*** shared version of the library, which I believe you do not have"
+                   $echo "*** because a test_compile did reveal that the linker did not use it for"
+                   $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+               $rm conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     newdeplibs="$newdeplibs $i"
+                     i=""
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i" ; then
+                   libname=`eval \\$echo \"$libname_spec\"`
+                   deplib_matches=`eval \\$echo \"$library_names_spec\"`
+                   set dummy $deplib_matches
+                   deplib_match=$2
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     newdeplibs="$newdeplibs $i"
+                   else
+                     droppeddeps=yes
+                     $echo
+                     $echo "*** Warning: dynamic linker does not accept needed library $i."
+                     $echo "*** I have the capability to make that library automatically link in when"
+                     $echo "*** you link to this library.  But I can only do this if you have a"
+                     $echo "*** shared version of the library, which you do not appear to have"
+                     $echo "*** because a test_compile did reveal that the linker did not use this one"
+                     $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 $echo
+                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+                 $echo "*** make it link in!  You will probably need to install it or some"
+                 $echo "*** library that it depends on before this library will be fully"
+                 $echo "*** functional.  Installing it before continuing would be even better."
+               fi
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method
+         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name=`expr $a_deplib : '-l\(.*\)'`
+           # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval \\$echo \"$libname_spec\"`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                     # Follow soft links.
+                     if ls -lLd "$potent_lib" 2>/dev/null \
+                        | grep " -> " >/dev/null; then
+                       continue
+                     fi
+                     # The statement above tries to avoid entering an
+                     # endless loop below, in case of cyclic links.
+                     # We might still enter an endless loop, since a link
+                     # loop can be closed while we follow links,
+                     # but so what?
+                     potlib="$potent_lib"
+                     while test -h "$potlib" 2>/dev/null; do
+                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+                       case $potliblink in
+                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+                       *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+                        | ${SED} 10q \
+                        | $EGREP "$file_magic_regex" > /dev/null; then
+                       newdeplibs="$newdeplibs $a_deplib"
+                       a_deplib=""
+                       break 2
+                     fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $echo
+               $echo "*** Warning: linker path does not have real file for library $a_deplib."
+               $echo "*** I have the capability to make that library automatically link in when"
+               $echo "*** you link to this library.  But I can only do this if you have a"
+               $echo "*** shared version of the library, which you do not appear to have"
+               $echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $echo "*** with $libname but no candidates were found. (...for file magic test)"
+               else
+                 $echo "*** with $libname and none of the candidates passed a file format test"
+                 $echo "*** using a file magic. Last file checked: $potlib"
+               fi
+             fi
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method
+         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name=`expr $a_deplib : '-l\(.*\)'`
+           # If $name is empty we are operating on a -L argument.
+           if test -n "$name" && test "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval \\$echo \"$libname_spec\"`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                   potlib="$potent_lib" # see symlink-check above in file_magic test
+                   if eval $echo \"$potent_lib\" 2>/dev/null \
+                       | ${SED} 10q \
+                       | $EGREP "$match_pattern_regex" > /dev/null; then
+                     newdeplibs="$newdeplibs $a_deplib"
+                     a_deplib=""
+                     break 2
+                   fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $echo
+               $echo "*** Warning: linker path does not have real file for library $a_deplib."
+               $echo "*** I have the capability to make that library automatically link in when"
+               $echo "*** you link to this library.  But I can only do this if you have a"
+               $echo "*** shared version of the library, which you do not appear to have"
+               $echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+               else
+                 $echo "*** with $libname and none of the candidates passed a file format test"
+                 $echo "*** using a regex pattern. Last file checked: $potlib"
+               fi
+             fi
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=""
+         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+           -e 's/ -[LR][^ ]*//g'`
+         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+           for i in $predeps $postdeps ; do
+             # can't use Xsed below, because $i might contain '/'
+             tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+           done
+         fi
+         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
+           | grep . >/dev/null; then
+           $echo
+           if test "X$deplibs_check_method" = "Xnone"; then
+             $echo "*** Warning: inter-library dependencies are not supported in this platform."
+           else
+             $echo "*** Warning: inter-library dependencies are not known to be supported."
+           fi
+           $echo "*** All declared inter-library dependencies are being dropped."
+           droppeddeps=yes
+         fi
+         ;;
+       esac
+       versuffix=$versuffix_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+       name=$name_save
+
+       case $host in
+       *-*-rhapsody* | *-*-darwin1.[012])
+         # On Rhapsody replace the C library is the System framework
+         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+         ;;
+       esac
+
+       if test "$droppeddeps" = yes; then
+         if test "$module" = yes; then
+           $echo
+           $echo "*** Warning: libtool could not satisfy all declared inter-library"
+           $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+           $echo "*** a static module, that should work as long as the dlopening"
+           $echo "*** application is linked with the -dlopen flag."
+           if test -z "$global_symbol_pipe"; then
+             $echo
+             $echo "*** However, this would only work if libtool was able to extract symbol"
+             $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             $echo "*** not find such a program.  So, this module is probably useless."
+             $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+           fi
+           if test "$build_old_libs" = no; then
+             oldlibs="$output_objdir/$libname.$libext"
+             build_libtool_libs=module
+             build_old_libs=yes
+           else
+             build_libtool_libs=no
+           fi
+         else
+           $echo "*** The inter-library dependencies that have been dropped here will be"
+           $echo "*** automatically added whenever a program is linked with this library"
+           $echo "*** or is declared to -dlopen it."
+
+           if test "$allow_undefined" = no; then
+             $echo
+             $echo "*** Since this library must not contain undefined symbols,"
+             $echo "*** because either the platform does not support them or"
+             $echo "*** it was explicitly requested with -no-undefined,"
+             $echo "*** libtool will only create a static version of it."
+             if test "$build_old_libs" = no; then
+               oldlibs="$output_objdir/$libname.$libext"
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         fi
+       fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
+      fi
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      deplibs="$new_libs"
+
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+       if test "$hardcode_into_libs" = yes; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath="$finalize_rpath"
+         test "$mode" != relink && rpath="$compile_rpath$rpath"
+         for libdir in $rpath; do
+           if test -n "$hardcode_libdir_flag_spec"; then
+             if test -n "$hardcode_libdir_separator"; then
+               if test -z "$hardcode_libdirs"; then
+                 hardcode_libdirs="$libdir"
+               else
+                 # Just accumulate the unique libdirs.
+                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                   ;;
+                 *)
+                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               dep_rpath="$dep_rpath $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) perm_rpath="$perm_rpath $libdir" ;;
+             esac
+           fi
+         done
+         # Substitute the hardcoded libdirs into the rpath.
+         if test -n "$hardcode_libdir_separator" &&
+            test -n "$hardcode_libdirs"; then
+           libdir="$hardcode_libdirs"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             rpath="$rpath$dir:"
+           done
+           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+         fi
+         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+       fi
+
+       shlibpath="$finalize_shlibpath"
+       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       if test -n "$shlibpath"; then
+         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+       fi
+
+       # Get the real and link names of the library.
+       eval shared_ext=\"$shrext_cmds\"
+       eval library_names=\"$library_names_spec\"
+       set dummy $library_names
+       realname="$2"
+       shift; shift
+
+       if test -n "$soname_spec"; then
+         eval soname=\"$soname_spec\"
+       else
+         soname="$realname"
+       fi
+       if test -z "$dlname"; then
+         dlname=$soname
+       fi
+
+       lib="$output_objdir/$realname"
+       linknames=
+       for link
+       do
+         linknames="$linknames $link"
+       done
+
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $cmds; do
+             IFS="$save_ifs"
+             eval cmd=\"$cmd\"
+             if len=`expr "X$cmd" : ".*"` &&
+              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               $show "using reloadable object file for export list..."
+               skipped_export=:
+               # Break out early, otherwise skipped_export may be
+               # set to false by a later but shorter cmd.
+               break
+             fi
+           done
+           IFS="$save_ifs"
+           if test -n "$export_symbols_regex"; then
+             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+             $run eval '$mv "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
+
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+       fi
+
+       tmp_deplibs=
+       inst_prefix_arg=
+       for test_deplib in $deplibs; do
+               case " $convenience " in
+               *" $test_deplib "*) ;;
+               *)
+                       if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then
+                               inst_prefix_arg="$inst_prefix_arg $test_deplib"
+                       else
+                               tmp_deplibs="$tmp_deplibs $test_deplib"
+                       fi
+                       ;;
+               esac
+       done
+       deplibs="$tmp_deplibs"
+       if test -n "$inst_prefix_arg"; then
+               deplibs="$inst_prefix_arg $deplibs"
+       fi
+
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+         else
+           gentop="$output_objdir/${outputname}x"
+           generated="$generated $gentop"
+
+           func_extract_archives $gentop $convenience
+           libobjs="$libobjs $func_extract_archives_result"
+         fi
+       fi
+       
+       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         linker_flags="$linker_flags $flag"
+       fi
+
+       # Make a backup of the uninstalled library when relinking
+       if test "$mode" = relink; then
+         $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+       fi
+
+       # Do each of the archive commands.
+       if test "$module" = yes && test -n "$module_cmds" ; then
+         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+           eval test_cmds=\"$module_expsym_cmds\"
+           cmds=$module_expsym_cmds
+         else
+           eval test_cmds=\"$module_cmds\"
+           cmds=$module_cmds
+         fi
+       else
+       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+         eval test_cmds=\"$archive_expsym_cmds\"
+         cmds=$archive_expsym_cmds
+       else
+         eval test_cmds=\"$archive_cmds\"
+         cmds=$archive_cmds
+         fi
+       fi
+
+       if test "X$skipped_export" != "X:" &&
+          len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise.
+         $echo "creating reloadable object files..."
+
+         # Save the value of $output and $libobjs because we want to
+         # use them later.  If we have whole_archive_flag_spec, we
+         # want to use save_libobjs as it was before
+         # whole_archive_flag_spec was expanded, because we can't
+         # assume the linker understands whole_archive_flag_spec.
+         # This may have to be revisited, in case too many
+         # convenience libraries get linked in and end up exceeding
+         # the spec.
+         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+         fi
+         save_output=$output
+         output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         delfiles=
+         last_robj=
+         k=1
+         output=$output_objdir/$output_la-${k}.$objext
+         # Loop over the list of objects to be linked.
+         for obj in $save_libobjs
+         do
+           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+           if test "X$objlist" = X ||
+              { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+                test "$len" -le "$max_cmd_len"; }; then
+             objlist="$objlist $obj"
+           else
+             # The command $test_cmds is almost too long, add a
+             # command to the queue.
+             if test "$k" -eq 1 ; then
+               # The first file doesn't have a previous command to add.
+               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+             else
+               # All subsequent reloadable object files will link in
+               # the last one created.
+               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+             fi
+             last_robj=$output_objdir/$output_la-${k}.$objext
+             k=`expr $k + 1`
+             output=$output_objdir/$output_la-${k}.$objext
+             objlist=$obj
+             len=1
+           fi
+         done
+         # Handle the remaining objects by creating one last
+         # reloadable object file.  All subsequent reloadable object
+         # files will link in the last one created.
+         test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+         if ${skipped_export-false}; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           libobjs=$output
+           # Append the command to create the export file.
+           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+         # Set up a command to remove the reloadable object files
+         # after they are used.
+         i=0
+         while test "$i" -lt "$k"
+         do
+           i=`expr $i + 1`
+           delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+         done
+
+         $echo "creating a temporary reloadable object file: $output"
+
+         # Loop through the commands generated above and execute them.
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $concat_cmds; do
+           IFS="$save_ifs"
+           $show "$cmd"
+           $run eval "$cmd" || exit $?
+         done
+         IFS="$save_ifs"
+
+         libobjs=$output
+         # Restore the value of output.
+         output=$save_output
+
+         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+         fi
+         # Expand the library linking commands again to reset the
+         # value of $libobjs for piecewise linking.
+
+         # Do each of the archive commands.
+         if test "$module" = yes && test -n "$module_cmds" ; then
+           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+             cmds=$module_expsym_cmds
+           else
+             cmds=$module_cmds
+           fi
+         else
+         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+           cmds=$archive_expsym_cmds
+         else
+           cmds=$archive_cmds
+           fi
+         fi
+
+         # Append the command to remove the reloadable object files
+         # to the just-reset $cmds.
+         eval cmds=\"\$cmds~\$rm $delfiles\"
+       fi
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $show "$cmd"
+         $run eval "$cmd" || {
+           lt_exit=$?
+
+           # Restore the uninstalled library and exit
+           if test "$mode" = relink; then
+             $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+           fi
+
+           exit $lt_exit
+         }
+       done
+       IFS="$save_ifs"
+
+       # Restore the uninstalled library and exit
+       if test "$mode" = relink; then
+         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             $show "${rm}r $gentop"
+             $run ${rm}r "$gentop"
+           fi
+         fi
+
+         exit $EXIT_SUCCESS
+       fi
+
+       # Create links to the real library.
+       for linkname in $linknames; do
+         if test "$realname" != "$linkname"; then
+           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+           $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+         fi
+       done
+
+       # If -module or -export-dynamic was specified, set the dlname.
+       if test "$module" = yes || test "$export_dynamic" = yes; then
+         # On all known operating systems, these are identical.
+         dlname="$soname"
+       fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+       if test -n "$objs$old_deplibs"; then
+         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       libobj="$output"
+       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+       ;;
+      *)
+       libobj=
+       obj="$output"
+       ;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+       else
+         gentop="$output_objdir/${obj}x"
+         generated="$generated $gentop"
+
+         func_extract_archives $gentop $convenience
+         reload_conv_objs="$reload_objs $func_extract_archives_result"
+       fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+       IFS="$save_ifs"
+       eval cmd=\"$cmd\"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         $show "${rm}r $gentop"
+         $run ${rm}r $gentop
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+       if test -n "$gentop"; then
+         $show "${rm}r $gentop"
+         $run ${rm}r $gentop
+       fi
+
+       # Create an invalid libtool object if no PIC, so that we don't
+       # accidentally link it into a program.
+       # $show "echo timestamp > $libobj"
+       # $run eval "echo timestamp > $libobj" || exit $?
+       exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+       # Only do commands if we really have different PIC objects.
+       reload_objs="$libobjs $reload_conv_objs"
+       output="$libobj"
+       cmds=$reload_cmds
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $show "$cmd"
+         $run eval "$cmd" || exit $?
+       done
+       IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+       $show "${rm}r $gentop"
+       $run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+          test "$dlopen_self_static" = unknown; then
+         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+       fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+       ;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $compile_deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $compile_deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       for libdir in $rpath $xrpath; do
+         # This is the magic to use -rpath.
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) perm_rpath="$perm_rpath $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$libdir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+         esac
+       fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+       # Transform all the library objects into standard objects.
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       if test -n "$NM" && test -n "$global_symbol_pipe"; then
+         dlsyms="${outputname}S.c"
+       else
+         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+       fi
+      fi
+
+      if test -n "$dlsyms"; then
+       case $dlsyms in
+       "") ;;
+       *.c)
+         # Discover the nlist of each of the dlfiles.
+         nlist="$output_objdir/${outputname}.nm"
+
+         $show "$rm $nlist ${nlist}S ${nlist}T"
+         $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+         # Parse the name list into a source file.
+         $show "creating $output_objdir/$dlsyms"
+
+         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+         if test "$dlself" = yes; then
+           $show "generating symbol list for \`$output'"
+
+           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+           # Add our own program objects to the symbol list.
+           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+           for arg in $progfiles; do
+             $show "extracting global C symbols from \`$arg'"
+             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+           done
+
+           if test -n "$exclude_expsyms"; then
+             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             $run eval '$mv "$nlist"T "$nlist"'
+           fi
+
+           if test -n "$export_symbols_regex"; then
+             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             $run eval '$mv "$nlist"T "$nlist"'
+           fi
+
+           # Prepare the list of exported symbols
+           if test -z "$export_symbols"; then
+             export_symbols="$output_objdir/$outputname.exp"
+             $run $rm $export_symbols
+             $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+               $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+           else
+             $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+             $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+               $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+           fi
+         fi
+
+         for arg in $dlprefiles; do
+           $show "extracting global C symbols from \`$arg'"
+           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+           $run eval '$echo ": $name " >> "$nlist"'
+           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -z "$run"; then
+           # Make sure we have at least an empty file.
+           test -f "$nlist" || : > "$nlist"
+
+           if test -n "$exclude_expsyms"; then
+             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+             $mv "$nlist"T "$nlist"
+           fi
+
+           # Try sorting and uniquifying the output.
+           if grep -v "^: " < "$nlist" |
+               if sort -k 3 </dev/null >/dev/null 2>&1; then
+                 sort -k 3
+               else
+                 sort +2
+               fi |
+               uniq > "$nlist"S; then
+             :
+           else
+             grep -v "^: " < "$nlist" > "$nlist"S
+           fi
+
+           if test -f "$nlist"S; then
+             eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+           else
+             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+           fi
+
+           $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+           case $host in
+           *cygwin* | *mingw* )
+         $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+             ;;
+           * )
+         $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+             ;;
+           esac
+
+
+         $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+           $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+         fi
+
+         pic_flag_for_symtable=
+         case $host in
+         # compiling the symbol table file with pic_flag works around
+         # a FreeBSD bug that causes programs to crash when -lm is
+         # linked before any other PIC object.  But we must not use
+         # pic_flag when linking with -static.  The problem exists in
+         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+           case "$compile_command " in
+           *" -static "*) ;;
+           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+           esac;;
+         *-*-hpux*)
+           case "$compile_command " in
+           *" -static "*) ;;
+           *) pic_flag_for_symtable=" $pic_flag";;
+           esac
+         esac
+
+         # Now compile the dynamic symbol file.
+         $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+         $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+         # Clean up the generated files.
+         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+         # Transform the symbol file into the correct name.
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            else
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            ;;
+          esac
+         ;;
+       *)
+         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+      else
+       # We keep going just in case the user didn't refer to
+       # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+       # really was required.
+
+       # Nullify the symbol file.
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+       # Replace the output file specification.
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+       link_command="$compile_command$compile_rpath"
+
+       # We have no uninstalled library dependencies, so finalize right now.
+       $show "$link_command"
+       $run eval "$link_command"
+       exit_status=$?
+
+       # Delete the generated files.
+       if test -n "$dlsyms"; then
+         $show "$rm $output_objdir/${outputname}S.${objext}"
+         $run $rm "$output_objdir/${outputname}S.${objext}"
+       fi
+
+       exit $exit_status
+      fi
+
+      if test -n "$shlibpath_var"; then
+       # We should set the shlibpath_var
+       rpath=
+       for dir in $temp_rpath; do
+         case $dir in
+         [\\/]* | [A-Za-z]:[\\/]*)
+           # Absolute path.
+           rpath="$rpath$dir:"
+           ;;
+         *)
+           # Relative path: add a thisdir entry.
+           rpath="$rpath\$thisdir/$dir:"
+           ;;
+         esac
+       done
+       temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+       if test -n "$perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+       if test -n "$finalize_perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $finalize_perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+      fi
+
+      if test "$no_install" = yes; then
+       # We don't need to create a wrapper script.
+       link_command="$compile_var$compile_command$compile_rpath"
+       # Replace the output file specification.
+       link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $run $rm $output
+       # Link the executable and exit
+       $show "$link_command"
+       $run eval "$link_command" || exit $?
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+       # Fast installation is not supported
+       link_command="$compile_var$compile_command$compile_rpath"
+       relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+       $echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+         else
+           # fast_install is set to needless
+           relink_command=
+         fi
+       else
+         link_command="$compile_var$compile_command$compile_rpath"
+         relink_command="$finalize_var$finalize_command$finalize_rpath"
+       fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+       # Preserve any variables that may affect compiler behavior
+       for var in $variables_saved_for_relink; do
+         if eval test -z \"\${$var+set}\"; then
+           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+         elif eval var_value=\$$var; test -z "$var_value"; then
+           relink_command="$var=; export $var; $relink_command"
+         else
+           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+           relink_command="$var=\"$var_value\"; export $var; $relink_command"
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+       case $progpath in
+       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+       esac
+       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.exe"
+            $rm $cwrappersource $cwrapper
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+           cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
+EOF
+
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+              ;;
+            esac
+
+            cat >> $cwrappersource <<"EOF"
+  return 127;
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+          # we should really use a build-platform specific compiler
+          # here, but OTOH, the wrappers (shell script and this C one)
+          # are only useful if you want to execute the "real" binary.
+          # Since the "real" binary is built for $host, then this
+          # wrapper might as well be built for $host, too.
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+       $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+       $echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+       if test "$fast_install" = yes; then
+         $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+         $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+       $echo \"\$relink_command_output\" >&2
+       $rm \"\$progdir/\$file\"
+       exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+       else
+         $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
+
+       $echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+       # Export our shlibpath_var if we have one.
+       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+       fi
+
+       # fixup the dll searchpath if we need to.
+       if test -n "$dllsearchpath"; then
+         $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
+       $echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+       case $host in
+       # Backslashes separate directories on plain windows
+       *-*-mingw | *-*-os2*)
+         $echo >> $output "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+         ;;
+
+       *)
+         $echo >> $output "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+         ;;
+       esac
+       $echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \$*\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+       chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+       oldobjs="$libobjs_save"
+       addlibs="$convenience"
+       build_libtool_libs=no
+      else
+       if test "$build_libtool_libs" = module; then
+         oldobjs="$libobjs_save"
+         build_libtool_libs=no
+       else
+         oldobjs="$old_deplibs $non_pic_objects"
+       fi
+       addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+       gentop="$output_objdir/${outputname}x"
+       generated="$generated $gentop"
+
+       func_extract_archives $gentop $addlibs
+       oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+       # POSIX demands no paths to be encoded in archives.  We have
+       # to avoid creating archives with duplicate basenames if we
+       # might have to extract them afterwards, e.g., when creating a
+       # static archive out of a convenience library, or when linking
+       # the entirety of a libtool archive into another (currently
+       # not supported by libtool).
+       if (for obj in $oldobjs
+           do
+             $echo "X$obj" | $Xsed -e 's%^.*/%%'
+           done | sort | sort -uc >/dev/null 2>&1); then
+         :
+       else
+         $echo "copying selected object files to avoid basename conflicts..."
+
+         if test -z "$gentop"; then
+           gentop="$output_objdir/${outputname}x"
+           generated="$generated $gentop"
+
+           $show "${rm}r $gentop"
+           $run ${rm}r "$gentop"
+           $show "$mkdir $gentop"
+           $run $mkdir "$gentop"
+           exit_status=$?
+           if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+             exit $exit_status
+           fi
+         fi
+
+         save_oldobjs=$oldobjs
+         oldobjs=
+         counter=1
+         for obj in $save_oldobjs
+         do
+           objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+           case " $oldobjs " in
+           " ") oldobjs=$obj ;;
+           *[\ /]"$objbase "*)
+             while :; do
+               # Make sure we don't pick an alternate name that also
+               # overlaps.
+               newobj=lt$counter-$objbase
+               counter=`expr $counter + 1`
+               case " $oldobjs " in
+               *[\ /]"$newobj "*) ;;
+               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+               esac
+             done
+             $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+             $run ln "$obj" "$gentop/$newobj" ||
+             $run cp "$obj" "$gentop/$newobj"
+             oldobjs="$oldobjs $gentop/$newobj"
+             ;;
+           *) oldobjs="$oldobjs $obj" ;;
+           esac
+         done
+       fi
+
+       eval cmds=\"$old_archive_cmds\"
+
+       if len=`expr "X$cmds" : ".*"` &&
+            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         $echo "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$oldobjs
+
+         # Is there a better way of finding the last object in the list?
+         for obj in $save_oldobjs
+         do
+           last_oldobj=$obj
+         done
+         for obj in $save_oldobjs
+         do
+           oldobjs="$objlist $obj"
+           objlist="$objlist $obj"
+           eval test_cmds=\"$old_archive_cmds\"
+           if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+              test "$len" -le "$max_cmd_len"; then
+             :
+           else
+             # the above command should be used before it gets too long
+             oldobjs=$objlist
+             if test "$obj" = "$last_oldobj" ; then
+               RANLIB=$save_RANLIB
+             fi
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+             objlist=
+           fi
+         done
+         RANLIB=$save_RANLIB
+         oldobjs=$objlist
+         if test "X$oldobjs" = "X" ; then
+           eval cmds=\"\$concat_cmds\"
+         else
+           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+         fi
+       fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+       IFS="$save_ifs"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+       if eval test -z \"\${$var+set}\"; then
+         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+       elif eval var_value=\$$var; test -z "$var_value"; then
+         relink_command="$var=; export $var; $relink_command"
+       else
+         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+         relink_command="$var=\"$var_value\"; export $var; $relink_command"
+       fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      if test "$hardcode_automatic" = yes ; then
+       relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+       for installed in no yes; do
+         if test "$installed" = yes; then
+           if test -z "$install_libdir"; then
+             break
+           fi
+           output="$output_objdir/$outputname"i
+           # Replace all uninstalled libtool libraries with the installed ones
+           newdependency_libs=
+           for deplib in $dependency_libs; do
+             case $deplib in
+             *.la)
+               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               if test -z "$libdir"; then
+                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+               newdependency_libs="$newdependency_libs $libdir/$name"
+               ;;
+             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             esac
+           done
+           dependency_libs="$newdependency_libs"
+           newdlfiles=
+           for lib in $dlfiles; do
+             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+             if test -z "$libdir"; then
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+             newdlfiles="$newdlfiles $libdir/$name"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+             if test -z "$libdir"; then
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+             newdlprefiles="$newdlprefiles $libdir/$name"
+           done
+           dlprefiles="$newdlprefiles"
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlfiles="$newdlfiles $abs"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlprefiles="$newdlprefiles $abs"
+           done
+           dlprefiles="$newdlprefiles"
+         fi
+         $rm $output
+         # place dlname in correct position for cygwin
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+         esac
+         $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+         if test "$installed" = no && test "$need_relink" = yes; then
+           $echo >> $output "\
+relink_command=\"$relink_command\""
+         fi
+       done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*|"")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+       files="$files $dest"
+       dest=$arg
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) 
+       case " $install_prog " in
+       *[\\\ /]cp\ *) ;;
+       *) prev=$arg ;;
+       esac
+       ;;
+      -g | -m | -o) prev=$arg ;;
+      -s)
+       stripme=" -s"
+       continue
+       ;;
+      -*)
+       ;;
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         prev=
+       else
+         dest=$arg
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       $echo "$modename: no file or destination specified" 1>&2
+      else
+       $echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+       $echo "$modename: \`$dest' is not a directory" 1>&2
+       $echo "$help" 1>&2
+       exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+       # Do the static libraries later.
+       staticlibs="$staticlibs $file"
+       ;;
+
+      *.la)
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       library_names=
+       old_library=
+       relink_command=
+       # If there is no directory component, then add one.
+       case $file in
+       */* | *\\*) . $file ;;
+       *) . ./$file ;;
+       esac
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) current_libdirs="$current_libdirs $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) future_libdirs="$future_libdirs $libdir" ;;
+         esac
+       fi
+
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+       test "X$dir" = "X$file/" && dir=
+       dir="$dir$objdir"
+
+       if test -n "$relink_command"; then
+         # Determine the prefix the user has applied to our future dir.
+         inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that
+         # are installed to the same prefix.
+         # At present, this check doesn't affect windows .dll's that
+         # are installed into $libdir/../bin (currently, that works fine)
+         # but it's something to keep an eye on.
+         if test "$inst_prefix_dir" = "$destdir"; then
+           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+           relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+         else
+           relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+         fi
+
+         $echo "$modename: warning: relinking \`$file'" 1>&2
+         $show "$relink_command"
+         if $run eval "$relink_command"; then :
+         else
+           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+           exit $EXIT_FAILURE
+         fi
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names
+       if test -n "$2"; then
+         realname="$2"
+         shift
+         shift
+
+         srcname="$realname"
+         test -n "$relink_command" && srcname="$realname"T
+
+         # Install the shared library and build the symlinks.
+         $show "$install_prog $dir/$srcname $destdir/$realname"
+         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+         if test -n "$stripme" && test -n "$striplib"; then
+           $show "$striplib $destdir/$realname"
+           $run eval "$striplib $destdir/$realname" || exit $?
+         fi
+
+         if test "$#" -gt 0; then
+           # Delete the old symlinks, and create new ones.
+           # Try `ln -sf' first, because the `ln' binary might depend on
+           # the symlink we replace!  Solaris /bin/ln does not understand -f,
+           # so we also need to try rm && ln -s.
+           for linkname
+           do
+             if test "$linkname" != "$realname"; then
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+             fi
+           done
+         fi
+
+         # Do each command in the postinstall commands.
+         lib="$destdir/$realname"
+         cmds=$postinstall_cmds
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $cmds; do
+           IFS="$save_ifs"
+           eval cmd=\"$cmd\"
+           $show "$cmd"
+           $run eval "$cmd" || {
+             lt_exit=$?
+
+             # Restore the uninstalled library and exit
+             if test "$mode" = relink; then
+               $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+             fi
+
+             exit $lt_exit
+           }
+         done
+         IFS="$save_ifs"
+       fi
+
+       # Install the pseudo-library for information purposes.
+       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+       instname="$dir/$name"i
+       $show "$install_prog $instname $destdir/$name"
+       $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+       ;;
+
+      *.lo)
+       # Install (i.e. copy) a libtool object.
+
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+         destfile="$destdir/$destfile"
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+         ;;
+       *.$objext)
+         staticdest="$destfile"
+         destfile=
+         ;;
+       *)
+         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       # Install the libtool object if requested.
+       if test -n "$destfile"; then
+         $show "$install_prog $file $destfile"
+         $run eval "$install_prog $file $destfile" || exit $?
+       fi
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+         $show "$install_prog $staticobj $staticdest"
+         $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+       fi
+       exit $EXIT_SUCCESS
+       ;;
+
+      *)
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+         destfile="$destdir/$destfile"
+       fi
+
+       # If the file is missing, and there is a .exe on the end, strip it
+       # because it is most likely a libtool script we actually want to
+       # install
+       stripped_ext=""
+       case $file in
+         *.exe)
+           if test ! -f "$file"; then
+             file=`$echo $file|${SED} 's,.exe$,,'`
+             stripped_ext=".exe"
+           fi
+           ;;
+       esac
+
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin*|*mingw*)
+           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+         notinst_deplibs=
+         relink_command=
+
+         # Note that it is not necessary on cygwin/mingw to append a dot to
+         # foo even if both foo and FILE.exe exist: automatic-append-.exe
+         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+         # `FILE.' does not work on cygwin managed mounts.
+         #
+         # If there is no directory component, then add one.
+         case $wrapper in
+         */* | *\\*) . ${wrapper} ;;
+         *) . ./${wrapper} ;;
+         esac
+
+         # Check the variables that should have been set.
+         if test -z "$notinst_deplibs"; then
+           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         finalize=yes
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             # If there is no directory component, then add one.
+             case $lib in
+             */* | *\\*) . $lib ;;
+             *) . ./$lib ;;
+             esac
+           fi
+           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+             finalize=no
+           fi
+         done
+
+         relink_command=
+         # Note that it is not necessary on cygwin/mingw to append a dot to
+         # foo even if both foo and FILE.exe exist: automatic-append-.exe
+         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+         # `FILE.' does not work on cygwin managed mounts.
+         #
+         # If there is no directory component, then add one.
+         case $wrapper in
+         */* | *\\*) . ${wrapper} ;;
+         *) . ./${wrapper} ;;
+         esac
+
+         outputname=
+         if test "$fast_install" = no && test -n "$relink_command"; then
+           if test "$finalize" = yes && test -z "$run"; then
+             tmpdir=`func_mktempdir`
+             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+             outputname="$tmpdir/$file"
+             # Replace the output file specification.
+             relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+
+             $show "$relink_command"
+             if $run eval "$relink_command"; then :
+             else
+               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+               ${rm}r "$tmpdir"
+               continue
+             fi
+             file="$outputname"
+           else
+             $echo "$modename: warning: cannot relink \`$file'" 1>&2
+           fi
+         else
+           # Install the binary that we compiled earlier.
+           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+         fi
+       fi
+
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway 
+       case $install_prog,$host in
+       */usr/bin/install*,*cygwin*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+           ;;
+         *.exe:*)
+           destfile=$destfile.exe
+           ;;
+         *:*.exe)
+           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+           ;;
+         esac
+         ;;
+       esac
+       $show "$install_prog$stripme $file $destfile"
+       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+       test -n "$outputname" && ${rm}r "$tmpdir"
+       ;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       $show "$old_striplib $oldlib"
+       $run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+       IFS="$save_ifs"
+       eval cmd=\"$cmd\"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+       libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         cmds=$finish_cmds
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $cmds; do
+           IFS="$save_ifs"
+           eval cmd=\"$cmd\"
+           $show "$cmd"
+           $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+         done
+         IFS="$save_ifs"
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+       fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+       $echo "$modename: \`$file' is not a file" 1>&2
+       $echo "$help" 1>&2
+       exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Read the libtool library.
+       dlname=
+       library_names=
+
+       # If there is no directory component, then add one.
+       case $file in
+       */* | *\\*) . $file ;;
+       *) . ./$file ;;
+       esac
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+         continue
+       fi
+
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$dir" = "X$file" && dir=.
+
+       if test -f "$dir/$objdir/$dlname"; then
+         dir="$dir/$objdir"
+       else
+         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$dir" = "X$file" && dir=.
+       ;;
+
+      *)
+       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+       continue
+       ;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+       eval "$shlibpath_var=\"\$dir\""
+      else
+       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+       # Do a test to see if this is really a libtool program.
+       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         # If there is no directory component, then add one.
+         case $file in
+         */* | *\\*) . $file ;;
+         *) . ./$file ;;
+         esac
+
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       fi
+       ;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+               $lt_var=\$save_$lt_var; export $lt_var
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+       $echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+       dir=.
+       objdir="$origobjdir"
+      else
+       objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+       case " $rmdirs " in
+         *" $objdir "*) ;;
+         *) rmdirs="$rmdirs $objdir" ;;
+       esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+       || (test -h "$file") >/dev/null 2>&1 \
+       || test -f "$file"; then
+       :
+      elif test -d "$file"; then
+       exit_status=1
+       continue
+      elif test "$rmforce" = yes; then
+       continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+       # Possibly a libtool archive, so verify it.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         . $dir/$name
+
+         # Delete the libtool libraries and symlinks.
+         for n in $library_names; do
+           rmfiles="$rmfiles $objdir/$n"
+         done
+         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+         case "$mode" in
+         clean)
+           case "  $library_names " in
+           # "  " in the beginning catches empty $dlname
+           *" $dlname "*) ;;
+           *) rmfiles="$rmfiles $objdir/$dlname" ;;
+           esac
+            test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+           ;;
+         uninstall)
+           if test -n "$library_names"; then
+             # Do each command in the postuninstall commands.
+             cmds=$postuninstall_cmds
+             save_ifs="$IFS"; IFS='~'
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd"
+               if test "$?" -ne 0 && test "$rmforce" != yes; then
+                 exit_status=1
+               fi
+             done
+             IFS="$save_ifs"
+           fi
+
+           if test -n "$old_library"; then
+             # Do each command in the old_postuninstall commands.
+             cmds=$old_postuninstall_cmds
+             save_ifs="$IFS"; IFS='~'
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd"
+               if test "$?" -ne 0 && test "$rmforce" != yes; then
+                 exit_status=1
+               fi
+             done
+             IFS="$save_ifs"
+           fi
+           # FIXME: should reinstall the best remaining shared library.
+           ;;
+         esac
+       fi
+       ;;
+
+      *.lo)
+       # Possibly a libtool object, so verify it.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+         # Read the .lo file
+         . $dir/$name
+
+         # Add PIC object to the list of files to remove.
+         if test -n "$pic_object" \
+            && test "$pic_object" != none; then
+           rmfiles="$rmfiles $dir/$pic_object"
+         fi
+
+         # Add non-PIC object to the list of files to remove.
+         if test -n "$non_pic_object" \
+            && test "$non_pic_object" != none; then
+           rmfiles="$rmfiles $dir/$non_pic_object"
+         fi
+       fi
+       ;;
+
+      *)
+       if test "$mode" = clean ; then
+         noexename=$name
+         case $file in
+         *.exe)
+           file=`$echo $file|${SED} 's,.exe$,,'`
+           noexename=`$echo $name|${SED} 's,.exe$,,'`
+           # $file with .exe has already been added to rmfiles,
+           # add $file without .exe
+           rmfiles="$rmfiles $file"
+           ;;
+         esac
+         # Do a test to see if this is a libtool program.
+         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+           relink_command=
+           . $dir/$noexename
+
+           # note $name still contains .exe if it was in $file originally
+           # as does the version of $file that was added into $rmfiles
+           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+           if test "$fast_install" = yes && test -n "$relink_command"; then
+             rmfiles="$rmfiles $objdir/lt-$name"
+           fi
+           if test "X$noexename" != "X$name" ; then
+             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+           fi
+         fi
+       fi
+       ;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+       $show "rmdir $dir"
+       $run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+disable_libs=shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+disable_libs=static
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/adm_local/unix/config_files/missing b/adm_local/unix/config_files/missing
new file mode 100755 (executable)
index 0000000..1c8ff70
--- /dev/null
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/adm_local/unix/config_files/py-compile b/adm_local/unix/config_files/py-compile
new file mode 100755 (executable)
index 0000000..d6e900b
--- /dev/null
@@ -0,0 +1,146 @@
+#!/bin/sh
+# py-compile - Compile a Python program
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+if [ -z "$PYTHON" ]; then
+  PYTHON=python
+fi
+
+basedir=
+destdir=
+files=
+while test $# -ne 0; do
+  case "$1" in
+    --basedir)
+      basedir=$2
+      if test -z "$basedir"; then
+        echo "$0: Missing argument to --basedir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    --destdir)
+      destdir=$2
+      if test -z "$destdir"; then
+        echo "$0: Missing argument to --destdir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    -h|--h*)
+      cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+
+Byte compile some python scripts FILES.  Use --destdir to specify any
+leading directory path to the FILES that you don't want to include in the
+byte compiled file.  Specify --basedir for any additional path information you
+do want to be shown in the byte compiled file.
+
+Example:
+  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+      exit $?
+      ;;
+    -v|--v*)
+      echo "py-compile $scriptversion"
+      exit $?
+      ;;
+    *)
+      files="$files $1"
+      ;;
+  esac
+  shift
+done
+
+if test -z "$files"; then
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+fi
+
+# if basedir was given, then it should be prepended to filenames before
+# byte compilation.
+if [ -z "$basedir" ]; then
+    pathtrans="path = file"
+else
+    pathtrans="path = os.path.join('$basedir', file)"
+fi
+
+# if destdir was given, then it needs to be prepended to the filename to
+# byte compile but not go into the compiled file.
+if [ -z "$destdir" ]; then
+    filetrans="filepath = path"
+else
+    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+fi
+
+$PYTHON -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+
+print 'Byte-compiling python modules...'
+for file in string.split(files):
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+       continue
+    print file,
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'c', path)
+print" || exit $?
+
+# this will fail for python < 1.5, but that doesn't matter ...
+$PYTHON -O -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+print 'Byte-compiling python modules (optimized versions) ...'
+for file in string.split(files):
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+       continue
+    print file,
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'o', path)
+print" 2>/dev/null || :
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/adm_local/unix/make_common_starter.am b/adm_local/unix/make_common_starter.am
new file mode 100755 (executable)
index 0000000..36ad8c3
--- /dev/null
@@ -0,0 +1,88 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# ============================================================
+# This file defines the common definitions used in several
+# Makefile. This file must be included, if needed, by the file
+# Makefile.am.
+# ============================================================
+# Standard directory for installation
+#
+salomeincludedir   = $(includedir)/salome
+libdir             = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
+bindir             = $(prefix)/bin/salome
+salomescriptdir    = $(bindir)
+salomepythondir    = $(pythondir)/salome
+salomepyexecdir    = $(pyexecdir)/salome
+
+# Directory for installing idl files
+salomeidldir       = $(prefix)/idl/salome
+
+# Directory for installing resource files
+salomeresdir       = $(prefix)/share/salome/resources/@MODULE_NAME@
+
+# Directories for installing admin files
+admlocaldir        = $(prefix)/adm_local
+admlocalunixdir    = $(admlocaldir)/unix
+admlocalm4dir      = $(admlocaldir)/unix/config_files
+
+# Shared modules installation directory
+sharedpkgpythondir = $(salomepythondir)/shared_modules
+
+# Documentation directory
+docdir             = $(datadir)/doc/salome
+
+# common rules
+
+# meta object implementation files generation (moc)
+%_moc.cxx: %.h
+       $(MOC) $< -o $@
+
+# translation (*.qm) files generation (lrelease)
+%.qm: %.ts
+       $(LRELEASE) $< -qm $@
+
+# resource files generation (qrcc)
+qrc_%.cxx: %.qrc
+       $(QRCC) $< -o $@ -name $(*F)
+
+# qt forms files generation (uic)
+ui_%.h: %.ui
+       $(UIC) -o $@ $<
+
+# extra distributed files
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \
+             $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts)
+
+# customize clean operation
+mostlyclean-local:
+       rm -f @builddir@/*_moc.cxx
+       rm -f @builddir@/*.qm
+       rm -f @builddir@/ui_*.h
+       rm -f @builddir@/qrc_*.cxx
+
+# tests
+tests: unittest
+
+unittest: $(UNIT_TEST_PROG)
+       @if test "x$(UNIT_TEST_PROG)" != "x"; then \
+           $(UNIT_TEST_PROG);                     \
+       fi;
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100755 (executable)
index 0000000..f9eb701
--- /dev/null
@@ -0,0 +1,35 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# -* Makefile *- 
+# Author : Guillaume Boulant (CSSI)
+# Module : COMPONENT
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_salomescript_SCRIPTS = \
+       myrunSalome.py
+
+nodist_salomescript_SCRIPTS = \
+        runAppli
+
+nodist_salomescript_DATA = \
+       VERSION
diff --git a/bin/VERSION.in b/bin/VERSION.in
new file mode 100755 (executable)
index 0000000..46e3bdd
--- /dev/null
@@ -0,0 +1 @@
+SALOME 2 EXEMPLE MODULE C++ : HEXA : @VERSION@
diff --git a/bin/myrunSalome.py b/bin/myrunSalome.py
new file mode 100755 (executable)
index 0000000..3e06e21
--- /dev/null
@@ -0,0 +1,54 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#!/usr/bin/env python
+#
+def test(clt):
+   """
+        Test function that creates an instance of HEXABLOCK component
+        usage : hexablock = test(clt)
+   """
+   # create an LifeCycleCORBA instance
+   import LifeCycleCORBA
+   lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
+   import HEXABLOCK_ORB
+   hexablock = lcc.FindOrLoadComponent("FactoryServer", "HEXABLOCK")
+   return hexablock
+
+#
+
+if __name__ == "__main__":
+   import user
+   from runSalome import *
+   clt,args = main()
+   
+   #
+   #  Impression arborescence Naming Service
+   #
+   
+   if clt != None:
+     print
+     print " --- registered objects tree in Naming Service ---"
+     clt.showNS()
+     session=clt.waitNS("/Kernel/Session")
+     catalog=clt.waitNS("/Kernel/ModulCatalog")
+     import socket
+     container =  clt.waitNS("/Containers/" + socket.gethostname().split('.')[0] + "/FactoryServer")
diff --git a/bin/runAppli.in b/bin/runAppli.in
new file mode 100755 (executable)
index 0000000..52ab8a1
--- /dev/null
@@ -0,0 +1,65 @@
+#!/bin/sh
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+if [ -z "${KERNEL_ROOT_DIR}" ] ; then 
+export KERNEL_ROOT_DIR=@KERNEL_ROOT_DIR@
+fi
+if [ -z "${HEXA_ROOT_DIR}" ] ; then 
+export HEXA_ROOT_DIR=@prefix@
+fi
+
+searchFreePort() {
+    echo -n "Searching for a free port for naming service: "
+    export NSPORT=2810
+    local limit=$NSPORT
+    let limit=limit+100
+    while [ 1 ]
+    do
+        aRes=`netstat -ltn | grep -E :${NSPORT}`
+        if [ -z "$aRes" ]; then
+            echo ${NSPORT} - Ok
+            local myhost=`hostname`
+            export OMNIORB_CONFIG=${HOME}/.omniORB_${myhost}_${NSPORT}.cfg
+            local initref="NameService=corbaname::"`hostname`":$NSPORT"
+            if [[ `python -c "import CORBA; print CORBA.ORB_ID"` = "omniORB4" ]]; then
+                echo "InitRef = $initref" > $OMNIORB_CONFIG
+            else
+                echo "ORBInitRef $initref" > $OMNIORB_CONFIG
+            fi
+            break
+        fi
+        echo -n "${NSPORT} "
+        if [[ $NSPORT -eq $limit ]] ; then
+            echo
+            echo "Can't find a free port to launch omniNames"
+            echo "Try to kill the running servers and then launch SALOME again."
+            exit
+        fi
+        let NSPORT=NSPORT+1
+    done
+}
+
+searchFreePort
+
+
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py python -i $HEXA_ROOT_DIR/bin/salome/myrunSalome.py --modules=HEXA --killall
diff --git a/build_configure b/build_configure
new file mode 100755 (executable)
index 0000000..89a453b
--- /dev/null
@@ -0,0 +1,121 @@
+#!/bin/bash
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# Tool for updating list of .in file for the SALOME project 
+# and regenerating configure script
+# Author : 
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+# Date : 10/10/2002
+#
+ORIG_DIR=`pwd`
+CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+
+########################################################################
+# Test if the KERNEL_ROOT_DIR is set correctly
+
+if test ! -d "${KERNEL_ROOT_DIR}"; then
+    echo "failed : KERNEL_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+    echo "failed : GUI_ROOT_DIR variable is not correct !"
+    exit
+fi
+
+cd ${CONF_DIR}
+ABS_CONF_DIR=`pwd`
+
+mkdir -p salome_adm/unix/config_files
+#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/* salome_adm/unix/config_files
+#cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/pythonbe.py salome_adm/unix
+
+cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix
+
+#cp -f ${GUI_ROOT_DIR}/adm_local/unix/config_files/* salome_adm/unix/config_files
+
+# remove KERNEL deprecated configure files
+#for deprecated in ac_cc_warnings.m4 ac_cxx_partial_specialization.m4 \
+#  check_mico.m4 config.guess ltmain.sh ac_cxx_bool.m4 ltconfig ac_cxx_typename.m4 \
+#    check_pthreads.m4 config.sub libtool.m4 ac_cxx_mutable.m4 missing
+#    do
+#      rm -f salome_adm/unix/config_files/${deprecated}
+#      done
+
+
+# ____________________________________________________________________
+# aclocal creates the aclocal.m4 file from the standard macro and the
+# custom macro embedded in the directory salome_adm/unix/config_files
+# and KERNEL config_files directory.
+# output:
+#   aclocal.m4
+#   autom4te.cache (directory)
+echo "====================================================== aclocal"
+
+
+aclocal -I adm_local/unix/config_files \
+        -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+        -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
+       -I ${GUI_ROOT_DIR}/adm_local/unix/config_files || exit 1
+
+# ____________________________________________________________________
+# libtoolize creates some configuration files (ltmain.sh,
+# config.guess and config.sub). It only depends on the libtool
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac).
+# output:
+#   salome_adm/unix/config_files/config.guess
+#   salome_adm/unix/config_files/config.sub
+#   salome_adm/unix/config_files/ltmain.sh
+#echo "====================================================== libtoolize"
+
+libtoolize --force --copy --automake || exit 1
+
+# ____________________________________________________________________
+# autoconf creates the configure script from the file configure.ac (or
+# configure.in if configure.ac doesn't exist)
+# output:
+#   configure
+echo "====================================================== autoconf"
+
+autoconf
+
+# ____________________________________________________________________
+# automake creates some scripts used in building process
+# (install-sh, missing, ...). It only depends on the automake
+# version. The files are created in the directory specified with the
+# AC_CONFIG_AUX_DIR(<mydir>) tag (see configure.ac). This step also
+# creates the Makefile.in files from the Makefile.am files.
+# output:
+#   salome_adm/unix/config_files/compile
+#   salome_adm/unix/config_files/depcomp
+#   salome_adm/unix/config_files/install-sh
+#   salome_adm/unix/config_files/missing
+#   salome_adm/unix/config_files/py-compile
+#   Makefile.in (from Makefile.am)
+echo "====================================================== automake"
+
+automake --copy --gnu --add-missing
diff --git a/clean_configure b/clean_configure
new file mode 100755 (executable)
index 0000000..f57f7b3
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+rm -rf autom4te.cache aclocal.m4 configure make_config
+find . -name "*~" -print -exec rm {} \;
+find . -name "*.pyc" -print -exec rm {} \;
+#exit
+# ==================== ON SORT AVANT
+
+find bin -name Makefile.in | xargs rm -f
+find doc -name Makefile.in | xargs rm -f
+find idl -name Makefile.in | xargs rm -f
+find resources -name Makefile.in | xargs rm -f
+find salome_adm -name Makefile.in | xargs rm -f
+find src -name Makefile.in | xargs rm -f
+rm -f Makefile.in
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..2c1cf18
--- /dev/null
+++ b/configure
@@ -0,0 +1,29342 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for Salome6 Project HEXABLOCK module 5.1.2.
+#
+# Report bugs to <webmaster.salome@opencascade.com>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes &&    (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+        /*)
+          for as_base in sh bash ksh sh5; do
+            as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+          done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+        # Try only shells that exist, to save several forks.
+        if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+               { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+              as_have_required=yes
+              if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf@gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='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
+  '
+fi
+as_executable_p=$as_test_x
+
+# 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ;;
+esac
+
+echo=${ECHO-echo}
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell.
+  exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
+       echo_test_string=`eval $cmd` &&
+       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+    then
+      break
+    fi
+  done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+   test "X$echo_testing_string" = "X$echo_test_string"; then
+  :
+else
+  # The Solaris, AIX, and Digital Unix default echo programs unquote
+  # backslashes.  This makes it impossible to quote backslashes using
+  #   echo "$something" | sed 's/\\/\\\\/g'
+  #
+  # So, first we look for a working echo in the user's PATH.
+
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for dir in $PATH /usr/ucb; do
+    IFS="$lt_save_ifs"
+    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      echo="$dir/echo"
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  if test "X$echo" = Xecho; then
+    # We didn't find a better echo, so look for alternatives.
+    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+       test "X$echo_testing_string" = "X$echo_test_string"; then
+      # This shell has a builtin print -r that does the trick.
+      echo='print -r'
+    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+        test "X$CONFIG_SHELL" != X/bin/ksh; then
+      # If we have ksh, try running configure again with it.
+      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+      export ORIGINAL_CONFIG_SHELL
+      CONFIG_SHELL=/bin/ksh
+      export CONFIG_SHELL
+      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+    else
+      # Try using printf.
+      echo='printf %s\n'
+      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+        echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+        test "X$echo_testing_string" = "X$echo_test_string"; then
+       # Cool, printf works
+       :
+      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+       export CONFIG_SHELL
+       SHELL="$CONFIG_SHELL"
+       export SHELL
+       echo="$CONFIG_SHELL $0 --fallback-echo"
+      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+          test "X$echo_testing_string" = 'X\t' &&
+          echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+          test "X$echo_testing_string" = "X$echo_test_string"; then
+       echo="$CONFIG_SHELL $0 --fallback-echo"
+      else
+       # maybe with a smaller string...
+       prev=:
+
+       for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+         if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+         then
+           break
+         fi
+         prev="$cmd"
+       done
+
+       if test "$prev" != 'sed 50q "$0"'; then
+         echo_test_string=`eval $prev`
+         export echo_test_string
+         exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+       else
+         # Oops.  We lost completely, so just stick with echo.
+         echo=echo
+       fi
+      fi
+    fi
+  fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='Salome6 Project HEXABLOCK module'
+PACKAGE_TARNAME='SalomeHEXABLOCK'
+PACKAGE_VERSION='5.1.2'
+PACKAGE_STRING='Salome6 Project HEXABLOCK module 5.1.2'
+PACKAGE_BUGREPORT='webmaster.salome@opencascade.com'
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+target
+target_cpu
+target_vendor
+target_os
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+XVERSION
+MODULE_NAME
+ROOT_SRCDIR
+ROOT_BUILDDIR
+AR
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+GREP
+EGREP
+LN_S
+ECHO
+RANLIB
+CPP
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+CXXCPP
+F77
+FFLAGS
+ac_ct_F77
+LIBTOOL
+CXXTMPDPTHFLAGS
+DEPCC
+DEPCXX
+DEPCXXFLAGS
+C_DEPEND_FLAG
+CXX_DEPEND_FLAG
+MACHINE
+HAVE_SSTREAM
+LIB_LOCATION_SUFFIX
+LDEXPDYNFLAGS
+STDLIB
+acx_pthread_config
+PTHREAD_CC
+PTHREAD_LIBS
+PTHREAD_CFLAGS
+PYTHON
+PYTHON_PREFIX
+PYTHONHOME
+PYTHON_VERSION
+PYTHON_INCLUDES
+PYTHON_LIBS
+PYTHON_PLATFORM
+PYTHON_SITE
+PYTHON_SITE_PACKAGE
+PYTHON_SITE_EXEC
+PYTHON_SITE_INSTALL
+pythondir
+PYTHON_EXEC_PREFIX
+pkgpythondir
+pyexecdir
+pkgpyexecdir
+OGL_INCLUDES
+OGL_LIBS
+MOC
+UIC
+QRCC
+LRELEASE
+QTDIR
+QT_ROOT
+QT_INCLUDES
+QT_MT_INCLUDES
+QT_ASSISTANT_INCLUDES
+QT_LIB_DIR
+QT_CORE_LIBS
+QT_GUI_LIBS
+QT_OTHER_LIBS
+QT_LIBS
+QT_MT_LIBS
+QT_ASSISTANT_LIBS
+QT_VERSION
+QT_VERSION_ID
+BOOST_CPPFLAGS
+BOOST_LIBSUFFIX
+BOOST_LIBS
+BOOST_LIB_THREAD
+BOOST_LIB_SIGNALS
+BOOST_LIB_SYSTEM
+BOOST_LIB_REGEX
+BOOST_PROGRAM_OPTIONS_LIB
+CAS_CPPFLAGS
+CAS_CXXFLAGS
+CAS_KERNEL
+CAS_MATH
+CAS_VIEWER
+CAS_TKTopAlgo
+CAS_MODELER
+CAS_OCAF
+CAS_OCAFVIS
+CAS_DATAEXCHANGE
+CAS_LDFLAGS
+CAS_LDPATH
+CAS_STDPLUGIN
+OMNIORB_IDL
+OMNIORB_ROOT
+OMNIORB_INCLUDES
+OMNIORB_CXXFLAGS
+OMNIORB_LIBS
+OMNIORB_IDLCXXFLAGS
+OMNIORB_IDLPYFLAGS
+OMNIORB_IDL_CLN_H
+OMNIORB_IDL_CLN_CXX
+OMNIORB_IDL_CLN_OBJ
+OMNIORB_IDL_SRV_H
+OMNIORB_IDL_SRV_CXX
+OMNIORB_IDL_SRV_OBJ
+OMNIORB_IDL_TIE_H
+OMNIORB_IDL_TIE_CXX
+IDL
+CORBA_ROOT
+CORBA_INCLUDES
+CORBA_CXXFLAGS
+CORBA_LIBS
+IDLCXXFLAGS
+IDLPYFLAGS
+IDL_CLN_H
+IDL_CLN_CXX
+IDL_CLN_OBJ
+IDL_SRV_H
+IDL_SRV_CXX
+IDL_SRV_OBJ
+CPPUNIT_INCLUDES
+CPPUNIT_LIBS
+cppunit_ok
+CPPUNIT_IS_OK_TRUE
+CPPUNIT_IS_OK_FALSE
+TEMP
+KERNEL_ROOT_DIR
+KERNEL_SITE_DIR
+KERNEL_LDFLAGS
+KERNEL_CXXFLAGS
+GEOM_ROOT_DIR
+GEOM_LDFLAGS
+GEOM_CXXFLAGS
+GUI_LDFLAGS
+GUI_CXXFLAGS
+GUI_ROOT_DIR
+CORBA_IN_GUI
+SETX
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files='CORBA'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+F77
+FFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)   ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -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 &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -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 &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -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 &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    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 &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
+               datadir sysconfdir sharedstatedir localstatedir includedir \
+               oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+               libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$0" : 'X\(//\)[^/]' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+       cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+       pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures Salome6 Project HEXABLOCK module 5.1.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                         [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                         [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/SalomeHEXABLOCK]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of Salome6 Project HEXABLOCK module 5.1.2:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-debug          build with debug and trace information [default=yes]
+  --enable-production     compile in optimized mode [default=no]
+  --enable-static[=PKGS]  build static libraries [default=no]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-pic              try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-tags[=TAGS]      include additional configurations [automatic]
+  --with-python=DIR       root directory path of python installation
+  --with-python-site=DIR  Use DIR for installing platform independent Python
+                          site-packages
+  --with-python-site-exec=DIR
+                          Use DIR for installing platform dependent Python
+                          site-packages
+  --with-opengl=DIR       root directory path of OpenGL installation
+  --with-qt               Possible usage: "Qt_Install_Path" - prefix to path
+                          where Qt was installd; "" or "yes" or "auto" - means
+                          seaching installed Qt product in the system
+                          (checking $QTDIR and then - standard system paths );
+                          "no" - not use Qt product (is not supported) By
+                          default "" option is used)
+  --with-boost=DIR        root directory path to BOOST library installation
+  --with-cppunit=DIR      directory path to CPPUNIT installation
+  --with-cppunit_inc=DIR  directory path to CPPUNIT includes
+--with-kernel=DIR  root directory path of KERNEL build or installation
+  --with-geom=DIR root directory path of GEOM installation
+--with-gui=DIR root directory path of SALOME GUI installation
+
+Some influential environment variables:
+  CC          C compiler command
+  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>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <webmaster.salome@opencascade.com>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+Salome6 Project HEXABLOCK module configure 5.1.2
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Salome6 Project HEXABLOCK module $as_me 5.1.2, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+       ac_must_keep_next=false # Got value, back to normal.
+      else
+       case $ac_arg in
+         *=* | --config-cache | -C | -disable-* | --disable-* \
+         | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+         | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+         | -with-* | --with-* | -without-* | --without-* | --x)
+           case "$ac_configure_args0 " in
+             "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+           esac
+           ;;
+         -* ) ac_must_keep_next=true ;;
+       esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+       "s/'\''/'\''\\\\'\'''\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+       eval ac_val=\$$ac_var
+       case $ac_val in
+       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+       esac
+       echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+       "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+       { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+       { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+       { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+       ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in adm_local/unix/config_files "$srcdir"/adm_local/unix/config_files; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in adm_local/unix/config_files \"$srcdir\"/adm_local/unix/config_files" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in adm_local/unix/config_files \"$srcdir\"/adm_local/unix/config_files" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
+echo "$as_me: error: invalid value of canonical target" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+am__api_version='1.10'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+           break 3
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='SalomeHEXABLOCK'
+ VERSION='5.1.2'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
+
+
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=hexablock
+
+
+
+ROOT_BUILDDIR=`pwd`
+ROOT_SRCDIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+cd $ROOT_SRCDIR
+ROOT_SRCDIR=`pwd`
+cd $ROOT_BUILDDIR
+
+
+
+
+echo
+echo Source root directory : $ROOT_SRCDIR
+echo Build  root directory : $ROOT_BUILDDIR
+echo
+echo
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_SHELL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$SHELL"; then
+  ac_cv_prog_SHELL="$SHELL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_SHELL=""
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+SHELL=$ac_cv_prog_SHELL
+if test -n "$SHELL"; then
+  { echo "$as_me:$LINENO: result: $SHELL" >&5
+echo "${ECHO_T}$SHELL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+
+if test -z "$AR"; then
+   for ac_prog in ar xar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AR" && break
+done
+test -n "$AR" || AR=":"
+
+fi
+
+
+export AR
+
+echo
+echo ---------------------------------------------
+echo testing make
+echo ---------------------------------------------
+echo
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+       @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  SET_MAKE=
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+         if test $ac_prog = install &&
+           grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+           break 3
+         fi
+       fi
+      done
+    done
+    ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+    # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug;
+    enable_debug=$enableval
+
+else
+  enable_debug=yes
+fi
+
+
+if test "X$enable_debug" = "Xyes"; then
+  CFLAGS="$CFLAGS -g -D_DEBUG_ "
+  CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ "
+fi
+
+# Check whether --enable-production was given.
+if test "${enable_production+set}" = set; then
+  enableval=$enable_production;
+    enable_production=$enableval
+
+else
+  enable_production=no
+fi
+
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wparentheses" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wparentheses... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wparentheses conftest.cxx > conftest.log 2>&1
+  var=`echo -Wparentheses | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wparentheses"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wreturn-type" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wreturn-type... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wreturn-type conftest.cxx > conftest.log 2>&1
+  var=`echo -Wreturn-type | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wreturn-type"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wmissing-declarations" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wmissing-declarations... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wmissing-declarations conftest.cxx > conftest.log 2>&1
+  var=`echo -Wmissing-declarations | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wmissing-declarations"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -fmessage-length=0" >&5
+echo $ECHO_N "checking wether $CXX accepts -fmessage-length=0... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -fmessage-length=0 conftest.cxx > conftest.log 2>&1
+  var=`echo -fmessage-length=0 | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -fmessage-length=0"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wunused" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wunused... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wunused conftest.cxx > conftest.log 2>&1
+  var=`echo -Wunused | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wunused"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -pipe" >&5
+echo $ECHO_N "checking wether $CXX accepts -pipe... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -pipe conftest.cxx > conftest.log 2>&1
+  var=`echo -pipe | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -pipe"
+    eval
+  fi
+
+
+if test "X$enable_production" = "Xyes"; then
+  CFLAGS="$CFLAGS -O"
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wuninitialized" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wuninitialized... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wuninitialized conftest.cxx > conftest.log 2>&1
+  var=`echo -Wuninitialized | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wuninitialized"
+    eval
+  fi
+
+  CXXFLAGS="$CXXFLAGS -O "
+else
+  CFLAGS="$CFLAGS -g"
+  CXXFLAGS="$CXXFLAGS -g"
+fi
+
+
+echo ---------------------------------------------
+echo testing libtool
+echo ---------------------------------------------
+
+# Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=no
+fi
+
+
+
+
+
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+# Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+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_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort.  b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions.  Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+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_link_default") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+       ;;
+    [ab].out )
+       # We found the default executable, but exeext='' is most
+       # certainly right.
+       break;;
+    *.* )
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       then :; else
+          ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+       fi
+       # We set ac_cv_exeext here because the later test for it is not
+       # safe: cross compilers may not add the suffix if given an `-o'
+       # argument, so we may need to know it at that point already.
+       # Even if this section looks crufty: it has the advantage of
+       # actually working.
+       break;;
+    * )
+       break;;
+  esac
+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
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) 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
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+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_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+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_compile") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_c_werror_flag=$ac_save_c_werror_flag
+        CFLAGS="-g"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+  xno)
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+if test "${lt_cv_path_SED+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+{ echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6; }
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+    $ac_path_EGREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+
+   fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+
+{ echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
+echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
+if test "${lt_cv_path_NM+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+       # Check to see if the nm accepts a BSD-compat flag.
+       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+       #   nm: unknown option "B" ignored
+       # Tru64's nm complains that /dev/null is an invalid object file
+       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+       */dev/null* | *'Invalid file or object type'*)
+         lt_cv_path_NM="$tmp_nm -B"
+         break
+         ;;
+       *)
+         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+         */dev/null*)
+           lt_cv_path_NM="$tmp_nm -p"
+           break
+           ;;
+         *)
+           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+           continue # so that we can try to find one that supports BSD flags
+           ;;
+         esac
+         ;;
+       esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+NM="$lt_cv_path_NM"
+
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
+echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | kfreebsd*-gnu | dragonfly*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix3*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+nto-qnx*)
+  lt_cv_deplibs_check_method=unknown
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *ELF-32*)
+      HPUX_IA64_MODE="32"
+      ;;
+    *ELF-64*)
+      HPUX_IA64_MODE="64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 4901 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+   if test "$lt_cv_prog_gnu_ld" = yes; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -melf32bsmip"
+      ;;
+    *N32*)
+      LD="${LD-ld} -melf32bmipn32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -melf64bmip"
+      ;;
+    esac
+   else
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+   fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *32-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_i386"
+          ;;
+        ppc64-*linux*|powerpc64-*linux*)
+          LD="${LD-ld} -m elf32ppclinux"
+          ;;
+        s390x-*linux*)
+          LD="${LD-ld} -m elf_s390"
+          ;;
+        sparc64-*linux*)
+          LD="${LD-ld} -m elf32_sparc"
+          ;;
+      esac
+      ;;
+    *64-bit*)
+      case $host in
+        x86_64-*linux*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        ppc*-*linux*|powerpc*-*linux*)
+          LD="${LD-ld} -m elf64ppc"
+          ;;
+        s390*-*linux*)
+          LD="${LD-ld} -m elf64_s390"
+          ;;
+        sparc*-*linux*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  lt_cv_cc_needs_belf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       lt_cv_cc_needs_belf=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)    LD="${LD-ld} -64" ;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                  (('a' <= (c) && (c) <= 'i') \
+                    || ('j' <= (c) && (c) <= 'r') \
+                    || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                 inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+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_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+        CXXFLAGS="-g"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                    Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+fi
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+  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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+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_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_f77_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_f77_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_prog_f77_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536      # usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[        ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    # If test is not a shell built-in, we'll probably end up computing a
+    # maximum length that is only half of the actual maximum length, but
+    # we can't tell.
+    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+              = "XX$teststring") >/dev/null 2>&1 &&
+           new_result=`expr "X$teststring" : ".*" 2>&1` &&
+           lt_cv_sys_max_cmd_len=$new_result &&
+           test $i != 17 # 1/2 MB should be enough
+    do
+      i=`expr $i + 1`
+      teststring=$teststring$teststring
+    done
+    teststring=
+    # Add a significant safety factor because C++ compilers can tack on massive
+    # amounts of additional arguments before passing them to the linker.
+    # It appears as though 1/2 is a usable value.
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6; }
+fi
+
+
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*) # Its linker distinguishes data from code symbols
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  ;;
+linux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDGIRSTW]'
+    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[      ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+EOF
+
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+       mv -f "$nlist"T "$nlist"
+      else
+       rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if grep ' nm_test_var$' "$nlist" >/dev/null; then
+       if grep ' nm_test_func$' "$nlist" >/dev/null; then
+         cat <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+         # Now generate the symbol file.
+         eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+         cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+  const char *name;
+  lt_ptr_t address;
+}
+lt_preloaded_symbols[] =
+{
+EOF
+         $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+         cat <<\EOF >> conftest.$ac_ext
+  {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+         # Now try linking the two files.
+         mv conftest.$ac_objext conftstm.$ac_objext
+         lt_save_LIBS="$LIBS"
+         lt_save_CFLAGS="$CFLAGS"
+         LIBS="conftstm.$ac_objext"
+         CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+         if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext}; then
+           pipe_works=yes
+         fi
+         LIBS="$lt_save_LIBS"
+         CFLAGS="$lt_save_CFLAGS"
+       else
+         echo "cannot find nm_test_func in $nlist" >&5
+       fi
+      else
+       echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -f conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6; }
+else
+  { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+fi
+
+{ echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+       case $deplibs_check_method in
+       "file_magic "*)
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+         MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+         if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+           $EGREP "$file_magic_regex" > /dev/null; then
+           :
+         else
+           cat <<EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+         fi ;;
+       esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+enable_dlopen=yes
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+test -z "$pic_mode" && pic_mode=default
+
+# Use C for the default configuration in the libtool script
+tagname=
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7632: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7636: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static='-Bstatic'
+      else
+       lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic='-qnocommon'
+         lt_prog_compiler_wl='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fpic'
+       lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+       lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic='-Kconform_pic'
+       lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:7900: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:7904: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works=yes
+       fi
+     else
+       lt_prog_compiler_static_works=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:8004: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:8008: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag=
+  enable_shared_with_static_runtimes=no
+  archive_cmds=
+  archive_expsym_cmds=
+  old_archive_From_new_cmds=
+  old_archive_from_expsyms_cmds=
+  export_dynamic_flag_spec=
+  whole_archive_flag_spec=
+  thread_safe_flag_spec=
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_direct=no
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  link_all_deplibs=unknown
+  hardcode_automatic=no
+  module_cmds=
+  module_expsym_cmds=
+  always_export_symbols=no
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    interix3*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+       archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       ld_shlibs=no
+       cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+       ld_shlibs=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+           hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+           archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+           archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+         else
+           ld_shlibs=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
+
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
+
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         hardcode_direct=yes
+         else
+         # We have old collect2
+         hardcode_direct=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L=yes
+         hardcode_libdir_flag_spec='-L$libdir'
+         hardcode_libdir_separator=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       allow_undefined_flag='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+       archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag="-z nodefs"
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag=' ${wl}-bernotok'
+         allow_undefined_flag=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec='$convenience'
+         archive_cmds_need_lc=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc=no
+      hardcode_direct=no
+      hardcode_automatic=yes
+      hardcode_shlibpath_var=unsupported
+      whole_archive_flag_spec=''
+      link_all_deplibs=yes
+    if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator=:
+
+       hardcode_direct=yes
+       export_dynamic_flag_spec='${wl}-E'
+
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         hardcode_libdir_flag_spec_ld='+b $libdir'
+         hardcode_direct=no
+         hardcode_shlibpath_var=no
+         ;;
+       *)
+         hardcode_direct=yes
+         export_dynamic_flag_spec='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    openbsd*)
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec='${wl}-E'
+      else
+       case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec='-R$libdir'
+          ;;
+        *)
+          archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag=' -expect_unresolved \*'
+       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z text'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       wlarc=''
+       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+       *)
+         whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds='$CC -r -o $output$reload_objs'
+         hardcode_direct=no
+        ;;
+       motorola)
+         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+       pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc=no
+        else
+         archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 9469 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+   test -n "$runpath_var" || \
+   test "X$hardcode_automatic" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+striplib=
+old_striplib=
+{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+   darwin*)
+       if test -n "$STRIP" ; then
+         striplib="$STRIP -x"
+         { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+       ;;
+   *)
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    ;;
+  esac
+fi
+
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+   ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+   ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+
+fi
+
+   ;;
+
+  *)
+    { echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
+if test $ac_cv_func_shl_load = yes; then
+  lt_cv_dlopen="shl_load"
+else
+  { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dld_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
+if test $ac_cv_lib_dld_shl_load = yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  { echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_func_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_func_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+if test $ac_cv_func_dlopen = yes; then
+  lt_cv_dlopen="dlopen"
+else
+  { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_svld_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
+if test $ac_cv_lib_svld_dlopen = yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+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_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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dld_dld_link=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
+if test $ac_cv_lib_dld_dld_link = yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 10333 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+         if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<EOF
+#line 10433 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL          RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL                DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL                0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW           RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW         DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW       RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW     DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW     0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+    exit (status);
+}
+EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+
+
+# Report which library types will actually be built
+{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+    ;;
+esac
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+{ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler \
+    CC \
+    LD \
+    lt_prog_compiler_wl \
+    lt_prog_compiler_pic \
+    lt_prog_compiler_static \
+    lt_prog_compiler_no_builtin_flag \
+    export_dynamic_flag_spec \
+    thread_safe_flag_spec \
+    whole_archive_flag_spec \
+    enable_shared_with_static_runtimes \
+    old_archive_cmds \
+    old_archive_from_new_cmds \
+    predep_objects \
+    postdep_objects \
+    predeps \
+    postdeps \
+    compiler_lib_search_path \
+    archive_cmds \
+    archive_expsym_cmds \
+    postinstall_cmds \
+    postuninstall_cmds \
+    old_archive_from_expsyms_cmds \
+    allow_undefined_flag \
+    no_undefined_flag \
+    export_symbols_cmds \
+    hardcode_libdir_flag_spec \
+    hardcode_libdir_flag_spec_ld \
+    hardcode_libdir_separator \
+    hardcode_automatic \
+    module_cmds \
+    module_expsym_cmds \
+    lt_cv_prog_compiler_c_o \
+    exclude_expsyms \
+    include_expsyms; do
+
+    case $var in
+    old_archive_cmds | \
+    old_archive_from_new_cmds | \
+    archive_cmds | \
+    archive_expsym_cmds | \
+    module_cmds | \
+    module_expsym_cmds | \
+    old_archive_from_expsyms_cmds | \
+    export_symbols_cmds | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="${ofile}T"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  $rm -f "$cfgfile"
+  { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
+
+  cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+
+  case $host_os in
+  aix3*)
+    cat <<\EOF >> "$cfgfile"
+
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+EOF
+    ;;
+  esac
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+  mv -f "$cfgfile" "$ofile" || \
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags was given.
+if test "${with_tags+set}" = set; then
+  withval=$with_tags; tagnames="$withval"
+fi
+
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+  if test ! -f "${ofile}"; then
+    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+  fi
+
+  if test -z "$LTCC"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+    if test -z "$LTCC"; then
+      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
+    else
+      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+    fi
+  fi
+  if test -z "$LTCFLAGS"; then
+    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
+  fi
+
+  # Extract list of available tagged configurations in $ofile.
+  # Note that this assumes the entire list is on one line.
+  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+  for tagname in $tagnames; do
+    IFS="$lt_save_ifs"
+    # Check whether tagname contains only valid characters
+    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+    "") ;;
+    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+    esac
+
+    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+    then
+      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+
+    # Update the list of available tags.
+    if test -n "$tagname"; then
+      echo appending configuration tag \"$tagname\" to $ofile
+
+      case $tagname in
+      CXX)
+       if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+           ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+           (test "X$CXX" != "Xg++"))) ; then
+         ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+  $as_unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+  lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+  $as_unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+else
+  lt_prog_compiler_no_builtin_flag_CXX=
+fi
+
+if test "$GXX" = yes; then
+  # Set up default GNU C++ configuration
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break
+       ;;
+      *)
+       test "$with_gnu_ld" != yes && break
+       ;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+  # Check if GNU C++ uses GNU ld as the underlying linker, since the
+  # archiving commands below assume that GNU ld is being used.
+  if test "$with_gnu_ld" = yes; then
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+    #     investigate it a little bit more. (MM)
+    wlarc='${wl}'
+
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
+       grep 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_CXX=
+    fi
+  else
+    with_gnu_ld=no
+    wlarc=
+
+    # A generic and very simple default shared library creation
+    # command for GNU C++ for the case where it uses the native
+    # linker, instead of GNU ld.  If possible, this setting should
+    # overridden to take advantage of the native linker features on
+    # the platform it is being used on.
+    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+  fi
+
+  # Commands to make compiler produce verbose output that lists
+  # what "hidden" libraries, object files and flags are used when
+  # linking a shared library.
+  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+else
+  GXX=no
+  with_gnu_ld=no
+  wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+ld_shlibs_CXX=yes
+case $host_os in
+  aix3*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  aix4* | aix5*)
+    if test "$host_cpu" = ia64; then
+      # On IA64, the linker does run time linking by default, so we don't
+      # have to do anything special.
+      aix_use_runtimelinking=no
+      exp_sym_flag='-Bexport'
+      no_entry_flag=""
+    else
+      aix_use_runtimelinking=no
+
+      # Test if we are trying to use run time linking or normal
+      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+      # need to do runtime linking.
+      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+       for ld_flag in $LDFLAGS; do
+         case $ld_flag in
+         *-brtl*)
+           aix_use_runtimelinking=yes
+           break
+           ;;
+         esac
+       done
+       ;;
+      esac
+
+      exp_sym_flag='-bexport'
+      no_entry_flag='-bnoentry'
+    fi
+
+    # When large executables or shared objects are built, AIX ld can
+    # have problems creating the table of contents.  If linking a library
+    # or program results in "error TOC overflow" add -mminimal-toc to
+    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+    archive_cmds_CXX=''
+    hardcode_direct_CXX=yes
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes; then
+      case $host_os in aix4.[012]|aix4.[012].*)
+      # We only want to do this on AIX 4.2 and lower, the check
+      # below for broken collect2 doesn't work under 4.3+
+       collect2name=`${CC} -print-prog-name=collect2`
+       if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+       then
+         # We have reworked collect2
+         hardcode_direct_CXX=yes
+       else
+         # We have old collect2
+         hardcode_direct_CXX=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_CXX=yes
+         hardcode_libdir_flag_spec_CXX='-L$libdir'
+         hardcode_libdir_separator_CXX=
+       fi
+       ;;
+      esac
+      shared_flag='-shared'
+      if test "$aix_use_runtimelinking" = yes; then
+       shared_flag="$shared_flag "'${wl}-G'
+      fi
+    else
+      # not using gcc
+      if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+       shared_flag='-G'
+      else
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag='${wl}-G'
+       else
+         shared_flag='${wl}-bM:SRE'
+       fi
+      fi
+    fi
+
+    # It seems that -bexpall does not export symbols beginning with
+    # underscore (_), so it is better to generate a list of symbols to export.
+    always_export_symbols_CXX=yes
+    if test "$aix_use_runtimelinking" = yes; then
+      # Warning - without using the other runtime loading flags (-brtl),
+      # -berok will link without error, but may produce a broken library.
+      allow_undefined_flag_CXX='-berok'
+      # Determine the default libpath from the value encoded in an empty executable.
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+     else
+      if test "$host_cpu" = ia64; then
+       hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+       allow_undefined_flag_CXX="-z nodefs"
+       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+      else
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+       # Warning - without using the other run time loading flags,
+       # -berok will link without error, but may produce a broken library.
+       no_undefined_flag_CXX=' ${wl}-bernotok'
+       allow_undefined_flag_CXX=' ${wl}-berok'
+       # Exported symbols can be pulled into shared objects from archives
+       whole_archive_flag_spec_CXX='$convenience'
+       archive_cmds_need_lc_CXX=yes
+       # This is similar to how AIX traditionally builds its shared libraries.
+       archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+      fi
+    fi
+    ;;
+
+  beos*)
+    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+      allow_undefined_flag_CXX=unsupported
+      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+      # support --undefined.  This deserves some investigation.  FIXME
+      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+    ;;
+
+  chorus*)
+    case $cc_basename in
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+
+  cygwin* | mingw* | pw32*)
+    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+    # as there is no search path for DLLs.
+    hardcode_libdir_flag_spec_CXX='-L$libdir'
+    allow_undefined_flag_CXX=unsupported
+    always_export_symbols_CXX=no
+    enable_shared_with_static_runtimes_CXX=yes
+
+    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      # If the export-symbols file already is a .def file (1st line
+      # is EXPORTS), use it as is; otherwise, prepend...
+      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+       cp $export_symbols $output_objdir/$soname.def;
+      else
+       echo EXPORTS > $output_objdir/$soname.def;
+       cat $export_symbols >> $output_objdir/$soname.def;
+      fi~
+      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+    else
+      ld_shlibs_CXX=no
+    fi
+  ;;
+      darwin* | rhapsody*)
+        case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+        esac
+      archive_cmds_need_lc_CXX=no
+      hardcode_direct_CXX=no
+      hardcode_automatic_CXX=yes
+      hardcode_shlibpath_var_CXX=unsupported
+      whole_archive_flag_spec_CXX=''
+      link_all_deplibs_CXX=yes
+
+    if test "$GXX" = yes ; then
+      lt_int_apple_cc_single_mod=no
+      output_verbose_link_cmd='echo'
+      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
+       lt_int_apple_cc_single_mod=yes
+      fi
+      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      else
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        fi
+        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          else
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          fi
+            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_CXX=no
+          ;;
+      esac
+      fi
+        ;;
+
+  dgux*)
+    case $cc_basename in
+      ec++*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      ghcx*)
+       # Green Hills C++ Compiler
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  freebsd[12]*)
+    # C++ shared libraries reported to be fairly broken before switch to ELF
+    ld_shlibs_CXX=no
+    ;;
+  freebsd-elf*)
+    archive_cmds_need_lc_CXX=no
+    ;;
+  freebsd* | kfreebsd*-gnu | dragonfly*)
+    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+    # conventions
+    ld_shlibs_CXX=yes
+    ;;
+  gnu*)
+    ;;
+  hpux9*)
+    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    hardcode_direct_CXX=yes
+    hardcode_minus_L_CXX=yes # Not in the search PATH,
+                               # but as the default
+                               # location of the library.
+
+    case $cc_basename in
+    CC*)
+      # FIXME: insert proper C++ library support
+      ld_shlibs_CXX=no
+      ;;
+    aCC*)
+      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      #
+      # There doesn't appear to be a way to prevent this compiler from
+      # explicitly linking system object files so we need to strip them
+      # from the output so that they don't get included in the library
+      # dependencies.
+      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+      ;;
+    *)
+      if test "$GXX" = yes; then
+        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+      fi
+      ;;
+    esac
+    ;;
+  hpux10*|hpux11*)
+    if test $with_gnu_ld = no; then
+      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_CXX=:
+
+      case $host_cpu in
+      hppa*64*|ia64*)
+       hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+        ;;
+      *)
+       export_dynamic_flag_spec_CXX='${wl}-E'
+        ;;
+      esac
+    fi
+    case $host_cpu in
+    hppa*64*|ia64*)
+      hardcode_direct_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      ;;
+    *)
+      hardcode_direct_CXX=yes
+      hardcode_minus_L_CXX=yes # Not in the search PATH,
+                                             # but as the default
+                                             # location of the library.
+      ;;
+    esac
+
+    case $cc_basename in
+      CC*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      aCC*)
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       *)
+         archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+         ;;
+       esac
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test $with_gnu_ld = no; then
+           case $host_cpu in
+           hppa*64*)
+             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           ia64*)
+             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           *)
+             archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+             ;;
+           esac
+         fi
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+    esac
+    ;;
+  interix3*)
+    hardcode_direct_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    export_dynamic_flag_spec_CXX='${wl}-E'
+    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+    # Instead, shared libraries are loaded at an image base (0x10000000 by
+    # default) and relocated if they conflict, which is a slow very memory
+    # consuming and fragmenting process.  To avoid this, we pick a random,
+    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+    ;;
+  irix5* | irix6*)
+    case $cc_basename in
+      CC*)
+       # SGI C++
+       archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+       # Archives containing C++ object files must be created using
+       # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+       ;;
+      *)
+       if test "$GXX" = yes; then
+         if test "$with_gnu_ld" = no; then
+           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+         else
+           archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+         fi
+       fi
+       link_all_deplibs_CXX=yes
+       ;;
+    esac
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+    hardcode_libdir_separator_CXX=:
+    ;;
+  linux*)
+    case $cc_basename in
+      KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+       archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+       hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+       ;;
+      icpc*)
+       # Intel C++
+       with_gnu_ld=yes
+       # version 8.0 and above of icpc choke on multiply defined symbols
+       # if we add $predep_objects and $postdep_objects, however 7.1 and
+       # earlier do not add the objects themselves.
+       case `$CC -V 2>&1` in
+       *"Version 7."*)
+         archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         ;;
+       *)  # Version 8.0 or newer
+         tmp_idyn=
+         case $host_cpu in
+           ia64*) tmp_idyn=' -i_dynamic';;
+         esac
+         archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+         archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+         ;;
+       esac
+       archive_cmds_need_lc_CXX=no
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+       whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+       ;;
+      pgCC*)
+        # Portland Group C++ compiler
+       archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+       archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+       export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+       whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+        ;;
+      cxx*)
+       # Compaq C++
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+       runpath_var=LD_RUN_PATH
+       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+    esac
+    ;;
+  lynxos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  m88k*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  mvs*)
+    case $cc_basename in
+      cxx*)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  netbsd*)
+    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+      wlarc=
+      hardcode_libdir_flag_spec_CXX='-R$libdir'
+      hardcode_direct_CXX=yes
+      hardcode_shlibpath_var_CXX=no
+    fi
+    # Workaround some broken pre-1.5 toolchains
+    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+    ;;
+  openbsd2*)
+    # C++ shared libraries are fairly broken
+    ld_shlibs_CXX=no
+    ;;
+  openbsd*)
+    hardcode_direct_CXX=yes
+    hardcode_shlibpath_var_CXX=no
+    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+      export_dynamic_flag_spec_CXX='${wl}-E'
+      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    fi
+    output_verbose_link_cmd='echo'
+    ;;
+  osf3*)
+    case $cc_basename in
+      KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Archives containing C++ object files must be created using
+       # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+       ;;
+      RCC*)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      cxx*)
+       allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+         archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
+
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+    esac
+    ;;
+  osf4* | osf5*)
+    case $cc_basename in
+      KCC*)
+       # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+       # KCC will only create a shared library if the output file
+       # ends with ".so" (or ".sl" for HP-UX), so rename the library
+       # to its proper name (with version) after linking.
+       archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+       hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Archives containing C++ object files must be created using
+       # the KAI C++ compiler.
+       old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+       ;;
+      RCC*)
+       # Rational C++ 2.4.1
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      cxx*)
+       allow_undefined_flag_CXX=' -expect_unresolved \*'
+       archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+         echo "-hidden">> $lib.exp~
+         $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
+         $rm $lib.exp'
+
+       hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+       hardcode_libdir_separator_CXX=:
+
+       # Commands to make compiler produce verbose output that lists
+       # what "hidden" libraries, object files and flags are used when
+       # linking a shared library.
+       #
+       # There doesn't appear to be a way to prevent this compiler from
+       # explicitly linking system object files so we need to strip them
+       # from the output so that they don't get included in the library
+       # dependencies.
+       output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+       ;;
+      *)
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+        archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+
+         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+         hardcode_libdir_separator_CXX=:
+
+         # Commands to make compiler produce verbose output that lists
+         # what "hidden" libraries, object files and flags are used when
+         # linking a shared library.
+         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+
+       else
+         # FIXME: insert proper C++ library support
+         ld_shlibs_CXX=no
+       fi
+       ;;
+    esac
+    ;;
+  psos*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  sunos4*)
+    case $cc_basename in
+      CC*)
+       # Sun C++ 4.x
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      lcc*)
+       # Lucid
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  solaris*)
+    case $cc_basename in
+      CC*)
+       # Sun C++ 4.2, 5.x and Centerline C++
+        archive_cmds_need_lc_CXX=yes
+       no_undefined_flag_CXX=' -zdefs'
+       archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+       archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+       hardcode_libdir_flag_spec_CXX='-R$libdir'
+       hardcode_shlibpath_var_CXX=no
+       case $host_os in
+         solaris2.[0-5] | solaris2.[0-5].*) ;;
+         *)
+           # The C++ compiler is used as linker so we must use $wl
+           # flag to pass the commands to the underlying system
+           # linker. We must also pass each convience library through
+           # to the system linker between allextract/defaultextract.
+           # The C++ compiler will combine linker options so we
+           # cannot just pass the convience library names through
+           # without $wl.
+           # Supported since Solaris 2.6 (maybe 2.5.1?)
+           whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+           ;;
+       esac
+       link_all_deplibs_CXX=yes
+
+       output_verbose_link_cmd='echo'
+
+       # Archives containing C++ object files must be created using
+       # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+       # necessary to make sure instantiated templates are included
+       # in the archive.
+       old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+       ;;
+      gcx*)
+       # Green Hills C++ Compiler
+       archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+       # The C++ compiler must be used to create the archive.
+       old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+       ;;
+      *)
+       # GNU C++ compiler with Solaris linker
+       if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+         no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+         if $CC --version | grep -v '^2\.7' > /dev/null; then
+           archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+         else
+           # g++ 2.7 appears to require `-G' NOT `-shared' on this
+           # platform.
+           archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+           archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+               $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+           # Commands to make compiler produce verbose output that lists
+           # what "hidden" libraries, object files and flags are used when
+           # linking a shared library.
+           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
+         fi
+
+         hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+       fi
+       ;;
+    esac
+    ;;
+  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+    no_undefined_flag_CXX='${wl}-z,text'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+       archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      *)
+       archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+    esac
+    ;;
+  sysv5* | sco3.2v5* | sco5v6*)
+    # Note: We can NOT use -z defs as we might desire, because we do not
+    # link with -lc, and that would cause any symbols used from libc to
+    # always be unresolved, which means just about no library would
+    # ever link correctly.  If we're not using GNU ld we use -z text
+    # though, which does catch some bad symbols but isn't as heavy-handed
+    # as -z defs.
+    # For security reasons, it is highly recommended that you always
+    # use absolute paths for naming shared libraries, and exclude the
+    # DT_RUNPATH tag from executables and libraries.  But doing so
+    # requires that you compile everything twice, which is a pain.
+    # So that behaviour is only enabled if SCOABSPATH is set to a
+    # non-empty value in the environment.  Most likely only useful for
+    # creating official distributions of packages.
+    # This is a hack until libtool officially supports absolute path
+    # names for shared libraries.
+    no_undefined_flag_CXX='${wl}-z,text'
+    allow_undefined_flag_CXX='${wl}-z,nodefs'
+    archive_cmds_need_lc_CXX=no
+    hardcode_shlibpath_var_CXX=no
+    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+    hardcode_libdir_separator_CXX=':'
+    link_all_deplibs_CXX=yes
+    export_dynamic_flag_spec_CXX='${wl}-Bexport'
+    runpath_var='LD_RUN_PATH'
+
+    case $cc_basename in
+      CC*)
+       archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+      *)
+       archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       ;;
+    esac
+    ;;
+  tandem*)
+    case $cc_basename in
+      NCC*)
+       # NonStop-UX NCC 3.20
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+      *)
+       # FIXME: insert proper C++ library support
+       ld_shlibs_CXX=no
+       ;;
+    esac
+    ;;
+  vxworks*)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+  *)
+    # FIXME: insert proper C++ library support
+    ld_shlibs_CXX=no
+    ;;
+esac
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  # The `*' in the case matches for architectures that use `case' in
+  # $output_verbose_cmd can trigger glob expansion during the loop
+  # eval without this substitution.
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+  for p in `eval $output_verbose_link_cmd`; do
+    case $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" \
+         || test $p = "-R"; then
+        prev=$p
+        continue
+       else
+        prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+          if test -z "$compiler_lib_search_path_CXX"; then
+            compiler_lib_search_path_CXX="${prev}${p}"
+          else
+            compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+          fi
+          ;;
+        # The "-l" case would never come before the object being
+        # linked, so don't bother handling this case.
+        esac
+       else
+        if test -z "$postdeps_CXX"; then
+          postdeps_CXX="${prev}${p}"
+        else
+          postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+        fi
+       fi
+       ;;
+
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+        pre_test_object_deps_done=yes
+        continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+        if test -z "$predep_objects_CXX"; then
+          predep_objects_CXX="$p"
+        else
+          predep_objects_CXX="$predep_objects_CXX $p"
+        fi
+       else
+        if test -z "$postdep_objects_CXX"; then
+          postdep_objects_CXX="$p"
+        else
+          postdep_objects_CXX="$postdep_objects_CXX $p"
+        fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix3*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC*)
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    postdeps_CXX='-lCstd -lCrun'
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+      ;;
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | os2* | pw32*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       ;;
+      *)
+       lt_prog_compiler_pic_CXX='-fPIC'
+       ;;
+      esac
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix4* | aix5*)
+       # All AIX code is PIC.
+       if test "$host_cpu" = ia64; then
+         # AIX 5 now supports IA64 processor
+         lt_prog_compiler_static_CXX='-Bstatic'
+       else
+         lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+       fi
+       ;;
+      chorus*)
+       case $cc_basename in
+       cxch68*)
+         # Green Hills C++ Compiler
+         # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+         ;;
+       esac
+       ;;
+       darwin*)
+         # PIC is the default on this platform
+         # Common symbols not allowed in MH_DYLIB files
+         case $cc_basename in
+           xlc*)
+           lt_prog_compiler_pic_CXX='-qnocommon'
+           lt_prog_compiler_wl_CXX='-Wl,'
+           ;;
+         esac
+       ;;
+      dgux*)
+       case $cc_basename in
+         ec++*)
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         ghcx*)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      freebsd* | kfreebsd*-gnu | dragonfly*)
+       # FreeBSD uses GNU C++
+       ;;
+      hpux9* | hpux10* | hpux11*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+           if test "$host_cpu" != ia64; then
+             lt_prog_compiler_pic_CXX='+Z'
+           fi
+           ;;
+         aCC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+           case $host_cpu in
+           hppa*64*|ia64*)
+             # +Z the default
+             ;;
+           *)
+             lt_prog_compiler_pic_CXX='+Z'
+             ;;
+           esac
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      interix*)
+       # This is c89, which is MS Visual C++ (no shared libs)
+       # Anyone wants to do a port?
+       ;;
+      irix5* | irix6* | nonstopux*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_static_CXX='-non_shared'
+           # CC pic flag -KPIC is the default.
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      linux*)
+       case $cc_basename in
+         KCC*)
+           # KAI C++ Compiler
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           lt_prog_compiler_pic_CXX='-fPIC'
+           ;;
+         icpc* | ecpc*)
+           # Intel C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-static'
+           ;;
+         pgCC*)
+           # Portland Group C++ compiler.
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-fpic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         cxx*)
+           # Compaq C++
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      lynxos*)
+       ;;
+      m88k*)
+       ;;
+      mvs*)
+       case $cc_basename in
+         cxx*)
+           lt_prog_compiler_pic_CXX='-W c,exportall'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      netbsd*)
+       ;;
+      osf3* | osf4* | osf5*)
+       case $cc_basename in
+         KCC*)
+           lt_prog_compiler_wl_CXX='--backend -Wl,'
+           ;;
+         RCC*)
+           # Rational C++ 2.4.1
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         cxx*)
+           # Digital/Compaq C++
+           lt_prog_compiler_wl_CXX='-Wl,'
+           # Make sure the PIC flag is empty.  It appears that all Alpha
+           # Linux and Compaq Tru64 Unix objects are PIC.
+           lt_prog_compiler_pic_CXX=
+           lt_prog_compiler_static_CXX='-non_shared'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      psos*)
+       ;;
+      solaris*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.2, 5.x and Centerline C++
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           lt_prog_compiler_wl_CXX='-Qoption ld '
+           ;;
+         gcx*)
+           # Green Hills C++ Compiler
+           lt_prog_compiler_pic_CXX='-PIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sunos4*)
+       case $cc_basename in
+         CC*)
+           # Sun C++ 4.x
+           lt_prog_compiler_pic_CXX='-pic'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+         lcc*)
+           # Lucid
+           lt_prog_compiler_pic_CXX='-pic'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      tandem*)
+       case $cc_basename in
+         NCC*)
+           # NonStop-UX NCC 3.20
+           lt_prog_compiler_pic_CXX='-KPIC'
+           ;;
+         *)
+           ;;
+       esac
+       ;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+       case $cc_basename in
+         CC*)
+           lt_prog_compiler_wl_CXX='-Wl,'
+           lt_prog_compiler_pic_CXX='-KPIC'
+           lt_prog_compiler_static_CXX='-Bstatic'
+           ;;
+       esac
+       ;;
+      vxworks*)
+       ;;
+      *)
+       lt_prog_compiler_can_build_shared_CXX=no
+       ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_CXX=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12772: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:12776: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12876: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:12880: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  case $host_os in
+  aix4* | aix5*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+       pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc_CXX=no
+        else
+         archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 13412 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" || \
+   test -n "$runpath_var_CXX" || \
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_CXX \
+    CC_CXX \
+    LD_CXX \
+    lt_prog_compiler_wl_CXX \
+    lt_prog_compiler_pic_CXX \
+    lt_prog_compiler_static_CXX \
+    lt_prog_compiler_no_builtin_flag_CXX \
+    export_dynamic_flag_spec_CXX \
+    thread_safe_flag_spec_CXX \
+    whole_archive_flag_spec_CXX \
+    enable_shared_with_static_runtimes_CXX \
+    old_archive_cmds_CXX \
+    old_archive_from_new_cmds_CXX \
+    predep_objects_CXX \
+    postdep_objects_CXX \
+    predeps_CXX \
+    postdeps_CXX \
+    compiler_lib_search_path_CXX \
+    archive_cmds_CXX \
+    archive_expsym_cmds_CXX \
+    postinstall_cmds_CXX \
+    postuninstall_cmds_CXX \
+    old_archive_from_expsyms_cmds_CXX \
+    allow_undefined_flag_CXX \
+    no_undefined_flag_CXX \
+    export_symbols_cmds_CXX \
+    hardcode_libdir_flag_spec_CXX \
+    hardcode_libdir_flag_spec_ld_CXX \
+    hardcode_libdir_separator_CXX \
+    hardcode_automatic_CXX \
+    module_cmds_CXX \
+    module_expsym_cmds_CXX \
+    lt_cv_prog_compiler_c_o_CXX \
+    exclude_expsyms_CXX \
+    include_expsyms_CXX; do
+
+    case $var in
+    old_archive_cmds_CXX | \
+    old_archive_from_new_cmds_CXX | \
+    archive_cmds_CXX | \
+    archive_expsym_cmds_CXX | \
+    module_cmds_CXX | \
+    module_expsym_cmds_CXX | \
+    old_archive_from_expsyms_cmds_CXX | \
+    export_symbols_cmds_CXX | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_CXX"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+
+       else
+         tagname=""
+       fi
+       ;;
+
+      F77)
+       if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="      program t\n      end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+{ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+test "$can_build_shared" = "no" && enable_shared=no
+
+# On AIX, shared libraries and static libraries use the same namespace, and
+# are all built from PIC.
+case $host_os in
+aix3*)
+  test "$enable_shared" = yes && enable_static=no
+  if test -n "$RANLIB"; then
+    archive_cmds="$archive_cmds~\$RANLIB \$lib"
+    postinstall_cmds='$RANLIB $lib'
+  fi
+  ;;
+aix4* | aix5*)
+  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+    test "$enable_shared" = yes && enable_static=no
+  fi
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+{ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_F77='-Wl,'
+    lt_prog_compiler_static_F77='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_F77=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic_F77=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic_F77='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_F77='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_F77='-Bstatic'
+      else
+       lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_F77='-qnocommon'
+         lt_prog_compiler_wl_F77='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic_F77='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+       lt_prog_compiler_wl_F77='-Wl,'
+       lt_prog_compiler_pic_F77='-KPIC'
+       lt_prog_compiler_static_F77='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl_F77='-Wl,'
+       lt_prog_compiler_pic_F77='-fpic'
+       lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_F77='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_F77='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_F77='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       lt_prog_compiler_wl_F77='-Qoption ld ';;
+      *)
+       lt_prog_compiler_wl_F77='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_F77='-Qoption ld '
+      lt_prog_compiler_pic_F77='-PIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic_F77='-Kconform_pic'
+       lt_prog_compiler_static_F77='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_pic_F77='-KPIC'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_F77='-Wl,'
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_F77='-pic'
+      lt_prog_compiler_static_F77='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_F77=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_F77=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14470: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:14474: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+    case $lt_prog_compiler_pic_F77 in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+     esac
+else
+    lt_prog_compiler_pic_F77=
+     lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_F77=
+    ;;
+  *)
+    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_F77=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_F77=yes
+       fi
+     else
+       lt_prog_compiler_static_works_F77=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
+
+if test x"$lt_prog_compiler_static_works_F77" = xyes; then
+    :
+else
+    lt_prog_compiler_static_F77=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_F77=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:14574: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:14578: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_F77=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag_F77=
+  enable_shared_with_static_runtimes_F77=no
+  archive_cmds_F77=
+  archive_expsym_cmds_F77=
+  old_archive_From_new_cmds_F77=
+  old_archive_from_expsyms_cmds_F77=
+  export_dynamic_flag_spec_F77=
+  whole_archive_flag_spec_F77=
+  thread_safe_flag_spec_F77=
+  hardcode_libdir_flag_spec_F77=
+  hardcode_libdir_flag_spec_ld_F77=
+  hardcode_libdir_separator_F77=
+  hardcode_direct_F77=no
+  hardcode_minus_L_F77=no
+  hardcode_shlibpath_var_F77=unsupported
+  link_all_deplibs_F77=unknown
+  hardcode_automatic_F77=no
+  module_cmds_F77=
+  module_expsym_cmds_F77=
+  always_export_symbols_F77=no
+  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_F77=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_F77=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       whole_archive_flag_spec_F77=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs_F77=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_F77=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag_F77=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=no
+      enable_shared_with_static_runtimes_F77=yes
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+
+    interix3*)
+      hardcode_direct_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_F77='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+       archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_F77=no
+       cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+       ld_shlibs_F77=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+           hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+           archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+           archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+         else
+           ld_shlibs_F77=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_F77=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_F77" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_F77=
+      export_dynamic_flag_spec_F77=
+      whole_archive_flag_spec_F77=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_F77=unsupported
+      always_export_symbols_F77=yes
+      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_F77=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct_F77=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
+
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
+
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_F77=''
+      hardcode_direct_F77=yes
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         hardcode_direct_F77=yes
+         else
+         # We have old collect2
+         hardcode_direct_F77=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_F77=yes
+         hardcode_libdir_flag_spec_F77='-L$libdir'
+         hardcode_libdir_separator_F77=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_F77=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       allow_undefined_flag_F77='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_f77_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+       archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag_F77="-z nodefs"
+         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_f77_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag_F77=' ${wl}-bernotok'
+         allow_undefined_flag_F77=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec_F77='$convenience'
+         archive_cmds_need_lc_F77=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_F77=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_F77=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_F77=' '
+      allow_undefined_flag_F77=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_F77='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_F77=no
+      hardcode_direct_F77=no
+      hardcode_automatic_F77=yes
+      hardcode_shlibpath_var_F77=unsupported
+      whole_archive_flag_spec_F77=''
+      link_all_deplibs_F77=yes
+    if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_F77=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_F77=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_direct_F77=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_F77=:
+
+       hardcode_direct_F77=yes
+       export_dynamic_flag_spec_F77='${wl}-E'
+
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L_F77=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_F77=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+         hardcode_direct_F77=no
+         hardcode_shlibpath_var_F77=no
+         ;;
+       *)
+         hardcode_direct_F77=yes
+         export_dynamic_flag_spec_F77='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_F77=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      link_all_deplibs_F77=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    newsos6)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_F77=yes
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_F77=yes
+      hardcode_shlibpath_var_F77=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_F77='${wl}-E'
+      else
+       case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec_F77='-R$libdir'
+          ;;
+        *)
+          archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag_F77=' -expect_unresolved \*'
+       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag_F77=' -expect_unresolved \*'
+       archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec_F77='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_F77=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_F77=' -z text'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       wlarc=''
+       archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_F77='-R$libdir'
+      hardcode_shlibpath_var_F77=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+       *)
+         whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+      esac
+      link_all_deplibs_F77=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_direct_F77=yes
+      hardcode_minus_L_F77=yes
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_F77=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds_F77='$CC -r -o $output$reload_objs'
+         hardcode_direct_F77=no
+        ;;
+       motorola)
+         archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_F77=no
+      export_dynamic_flag_spec_F77='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var_F77=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs_F77=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      no_undefined_flag_F77='${wl}-z,text'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_F77='${wl}-z,text'
+      allow_undefined_flag_F77='${wl}-z,nodefs'
+      archive_cmds_need_lc_F77=no
+      hardcode_shlibpath_var_F77=no
+      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_F77=':'
+      link_all_deplibs_F77=yes
+      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_shlibpath_var_F77=no
+      ;;
+
+    *)
+      ld_shlibs_F77=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6; }
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_F77=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_F77 in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_F77
+       pic_flag=$lt_prog_compiler_pic_F77
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+        allow_undefined_flag_F77=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc_F77=no
+        else
+         archive_cmds_need_lc_F77=yes
+        fi
+        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 16019 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+   test -n "$runpath_var_F77" || \
+   test "X$hardcode_automatic_F77" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_F77" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+     test "$hardcode_minus_L_F77" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_F77=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_F77=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_F77=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6; }
+
+if test "$hardcode_action_F77" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_F77 \
+    CC_F77 \
+    LD_F77 \
+    lt_prog_compiler_wl_F77 \
+    lt_prog_compiler_pic_F77 \
+    lt_prog_compiler_static_F77 \
+    lt_prog_compiler_no_builtin_flag_F77 \
+    export_dynamic_flag_spec_F77 \
+    thread_safe_flag_spec_F77 \
+    whole_archive_flag_spec_F77 \
+    enable_shared_with_static_runtimes_F77 \
+    old_archive_cmds_F77 \
+    old_archive_from_new_cmds_F77 \
+    predep_objects_F77 \
+    postdep_objects_F77 \
+    predeps_F77 \
+    postdeps_F77 \
+    compiler_lib_search_path_F77 \
+    archive_cmds_F77 \
+    archive_expsym_cmds_F77 \
+    postinstall_cmds_F77 \
+    postuninstall_cmds_F77 \
+    old_archive_from_expsyms_cmds_F77 \
+    allow_undefined_flag_F77 \
+    no_undefined_flag_F77 \
+    export_symbols_cmds_F77 \
+    hardcode_libdir_flag_spec_F77 \
+    hardcode_libdir_flag_spec_ld_F77 \
+    hardcode_libdir_separator_F77 \
+    hardcode_automatic_F77 \
+    module_cmds_F77 \
+    module_expsym_cmds_F77 \
+    lt_cv_prog_compiler_c_o_F77 \
+    exclude_expsyms_F77 \
+    include_expsyms_F77; do
+
+    case $var in
+    old_archive_cmds_F77 | \
+    old_archive_from_new_cmds_F77 | \
+    archive_cmds_F77 | \
+    archive_expsym_cmds_F77 | \
+    module_cmds_F77 | \
+    module_expsym_cmds_F77 | \
+    old_archive_from_expsyms_cmds_F77 | \
+    export_symbols_cmds_F77 | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_F77"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+       else
+         tagname=""
+       fi
+       ;;
+
+      GCJ)
+       if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+LD_GCJ="$LD"
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+old_archive_cmds_GCJ=$old_archive_cmds
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:16797: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:16801: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_GCJ='-Wl,'
+    lt_prog_compiler_static_GCJ='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      # FIXME: we need at least 68020 code to build shared libraries, but
+      # adding the `-m68020' flag to GCC prevents building anything better,
+      # like `-m68040'.
+      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
+      ;;
+
+    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_GCJ='-fno-common'
+      ;;
+
+    interix3*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_GCJ=no
+      enable_shared=no
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       lt_prog_compiler_pic_GCJ=-Kconform_pic
+      fi
+      ;;
+
+    hpux*)
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic_GCJ='-fPIC'
+       ;;
+      esac
+      ;;
+
+    *)
+      lt_prog_compiler_pic_GCJ='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      if test "$host_cpu" = ia64; then
+       # AIX 5 now supports IA64 processor
+       lt_prog_compiler_static_GCJ='-Bstatic'
+      else
+       lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+      darwin*)
+        # PIC is the default on this platform
+        # Common symbols not allowed in MH_DYLIB files
+       case $cc_basename in
+         xlc*)
+         lt_prog_compiler_pic_GCJ='-qnocommon'
+         lt_prog_compiler_wl_GCJ='-Wl,'
+         ;;
+       esac
+       ;;
+
+    mingw* | pw32* | os2*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+       # +Z the default
+       ;;
+      *)
+       lt_prog_compiler_pic_GCJ='+Z'
+       ;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    linux*)
+      case $cc_basename in
+      icc* | ecc*)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       lt_prog_compiler_pic_GCJ='-KPIC'
+       lt_prog_compiler_static_GCJ='-static'
+        ;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+       # which looks to be a dead project)
+       lt_prog_compiler_wl_GCJ='-Wl,'
+       lt_prog_compiler_pic_GCJ='-fpic'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_GCJ='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_GCJ='-non_shared'
+        ;;
+      esac
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_GCJ='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+       lt_prog_compiler_wl_GCJ='-Qoption ld ';;
+      *)
+       lt_prog_compiler_wl_GCJ='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl_GCJ='-Qoption ld '
+      lt_prog_compiler_pic_GCJ='-PIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+       lt_prog_compiler_pic_GCJ='-Kconform_pic'
+       lt_prog_compiler_static_GCJ='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_pic_GCJ='-KPIC'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl_GCJ='-Wl,'
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic_GCJ='-pic'
+      lt_prog_compiler_static_GCJ='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+{ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_pic_works_GCJ=no
+  ac_outfile=conftest.$ac_objext
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17065: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:17069: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_prog_compiler_pic_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+    case $lt_prog_compiler_pic_GCJ in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     esac
+else
+    lt_prog_compiler_pic_GCJ=
+     lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_GCJ=
+    ;;
+  *)
+    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+    ;;
+esac
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_prog_compiler_static_works_GCJ=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_prog_compiler_static_works_GCJ=yes
+       fi
+     else
+       lt_prog_compiler_static_works_GCJ=yes
+     fi
+   fi
+   $rm conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
+
+if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+    :
+else
+    lt_prog_compiler_static_GCJ=
+fi
+
+
+{ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  lt_cv_prog_compiler_c_o_GCJ=no
+   $rm -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:17169: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:17173: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_GCJ=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $rm conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+   $rm out/* && rmdir out
+   cd ..
+   rmdir conftest
+   $rm conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+  hard_links=yes
+  $rm conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+{ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+  runpath_var=
+  allow_undefined_flag_GCJ=
+  enable_shared_with_static_runtimes_GCJ=no
+  archive_cmds_GCJ=
+  archive_expsym_cmds_GCJ=
+  old_archive_From_new_cmds_GCJ=
+  old_archive_from_expsyms_cmds_GCJ=
+  export_dynamic_flag_spec_GCJ=
+  whole_archive_flag_spec_GCJ=
+  thread_safe_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_GCJ=
+  hardcode_libdir_flag_spec_ld_GCJ=
+  hardcode_libdir_separator_GCJ=
+  hardcode_direct_GCJ=no
+  hardcode_minus_L_GCJ=no
+  hardcode_shlibpath_var_GCJ=unsupported
+  link_all_deplibs_GCJ=unknown
+  hardcode_automatic_GCJ=no
+  module_cmds_GCJ=
+  module_expsym_cmds_GCJ=
+  always_export_symbols_GCJ=no
+  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_GCJ=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  extract_expsyms_cmds=
+  # Just being paranoid about ensuring that cc_basename is set.
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+  case $host_os in
+  cygwin* | mingw* | pw32*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs_GCJ=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
+       whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      else
+       whole_archive_flag_spec_GCJ=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>/dev/null` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix3* | aix4* | aix5*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+       ld_shlibs_GCJ=no
+       cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+
+      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+      # that the semantics of dynamic libraries on AmigaOS, at least up
+      # to version 4, is to share data among multiple programs linked
+      # with the same dynamic library.  Since this doesn't match the
+      # behavior of shared libraries on other platforms, we can't use
+      # them.
+      ld_shlibs_GCJ=no
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       allow_undefined_flag_GCJ=unsupported
+       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+       # support --undefined.  This deserves some investigation.  FIXME
+       archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=no
+      enable_shared_with_static_runtimes_GCJ=yes
+      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+       # If the export-symbols file already is a .def file (1st line
+       # is EXPORTS), use it as is; otherwise, prepend...
+       archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+         cp $export_symbols $output_objdir/$soname.def;
+       else
+         echo EXPORTS > $output_objdir/$soname.def;
+         cat $export_symbols >> $output_objdir/$soname.def;
+       fi~
+       $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    interix3*)
+      hardcode_direct_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    linux*)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       tmp_addflag=
+       case $cc_basename,$host_cpu in
+       pgcc*)                          # Portland Group C compiler
+         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag'
+         ;;
+       pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
+         whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
+         tmp_addflag=' $pic_flag -Mnomain' ;;
+       ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
+         tmp_addflag=' -i_dynamic' ;;
+       efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
+         tmp_addflag=' -i_dynamic -nofor_main' ;;
+       ifc* | ifort*)                  # Intel Fortran compiler
+         tmp_addflag=' -nofor_main' ;;
+       esac
+       archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+       if test $supports_anon_versioning = yes; then
+         archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+  $echo "local: *; };" >> $output_objdir/$libname.ver~
+         $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+       fi
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+       wlarc=
+      else
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+       ld_shlibs_GCJ=no
+       cat <<EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+EOF
+      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+       ld_shlibs_GCJ=no
+       cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+       ;;
+       *)
+         if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+           hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+           archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
+           archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
+         else
+           ld_shlibs_GCJ=no
+         fi
+       ;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+       archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+       ld_shlibs_GCJ=no
+      fi
+      ;;
+    esac
+
+    if test "$ld_shlibs_GCJ" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_GCJ=
+      export_dynamic_flag_spec_GCJ=
+      whole_archive_flag_spec_GCJ=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_GCJ=unsupported
+      always_export_symbols_GCJ=yes
+      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_GCJ=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+       # Neither direct hardcoding nor static linking is supported with a
+       # broken collect2.
+       hardcode_direct_GCJ=unsupported
+      fi
+      ;;
+
+    aix4* | aix5*)
+      if test "$host_cpu" = ia64; then
+       # On IA64, the linker does run time linking by default, so we don't
+       # have to do anything special.
+       aix_use_runtimelinking=no
+       exp_sym_flag='-Bexport'
+       no_entry_flag=""
+      else
+       # If we're using GNU nm, then we don't want the "-C" option.
+       # -C means demangle to AIX nm, but means don't demangle with GNU nm
+       if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+         export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       else
+         export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+       fi
+       aix_use_runtimelinking=no
+
+       # Test if we are trying to use run time linking or normal
+       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+       # need to do runtime linking.
+       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+         for ld_flag in $LDFLAGS; do
+         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+           aix_use_runtimelinking=yes
+           break
+         fi
+         done
+         ;;
+       esac
+
+       exp_sym_flag='-bexport'
+       no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds_GCJ=''
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+
+      if test "$GCC" = yes; then
+       case $host_os in aix4.[012]|aix4.[012].*)
+       # We only want to do this on AIX 4.2 and lower, the check
+       # below for broken collect2 doesn't work under 4.3+
+         collect2name=`${CC} -print-prog-name=collect2`
+         if test -f "$collect2name" && \
+          strings "$collect2name" | grep resolve_lib_name >/dev/null
+         then
+         # We have reworked collect2
+         hardcode_direct_GCJ=yes
+         else
+         # We have old collect2
+         hardcode_direct_GCJ=unsupported
+         # It fails to find uninstalled libraries when the uninstalled
+         # path is not listed in the libpath.  Setting hardcode_minus_L
+         # to unsupported forces relinking
+         hardcode_minus_L_GCJ=yes
+         hardcode_libdir_flag_spec_GCJ='-L$libdir'
+         hardcode_libdir_separator_GCJ=
+         fi
+         ;;
+       esac
+       shared_flag='-shared'
+       if test "$aix_use_runtimelinking" = yes; then
+         shared_flag="$shared_flag "'${wl}-G'
+       fi
+      else
+       # not using gcc
+       if test "$host_cpu" = ia64; then
+       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+       # chokes on -Wl,-G. The following line is correct:
+         shared_flag='-G'
+       else
+         if test "$aix_use_runtimelinking" = yes; then
+           shared_flag='${wl}-G'
+         else
+           shared_flag='${wl}-bM:SRE'
+         fi
+       fi
+      fi
+
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      always_export_symbols_GCJ=yes
+      if test "$aix_use_runtimelinking" = yes; then
+       # Warning - without using the other runtime loading flags (-brtl),
+       # -berok will link without error, but may produce a broken library.
+       allow_undefined_flag_GCJ='-berok'
+       # Determine the default libpath from the value encoded in an empty executable.
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+       archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+       else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+         allow_undefined_flag_GCJ="-z nodefs"
+         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+        # Determine the default libpath from the value encoded in an empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
+}'`; fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+        hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+         # Warning - without using the other run time loading flags,
+         # -berok will link without error, but may produce a broken library.
+         no_undefined_flag_GCJ=' ${wl}-bernotok'
+         allow_undefined_flag_GCJ=' ${wl}-berok'
+         # Exported symbols can be pulled into shared objects from archives
+         whole_archive_flag_spec_GCJ='$convenience'
+         archive_cmds_need_lc_GCJ=yes
+         # This is similar to how AIX traditionally builds its shared libraries.
+         archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+       fi
+      fi
+      ;;
+
+    amigaos*)
+      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      # see comment about different semantics on the GNU ld section
+      ld_shlibs_GCJ=no
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec_GCJ=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      hardcode_libdir_flag_spec_GCJ=' '
+      allow_undefined_flag_GCJ=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_From_new_cmds_GCJ='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_GCJ=yes
+      ;;
+
+    darwin* | rhapsody*)
+      case $host_os in
+        rhapsody* | darwin1.[012])
+         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
+         ;;
+       *) # Darwin 1.3 on
+         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+         else
+           case ${MACOSX_DEPLOYMENT_TARGET} in
+             10.[012])
+               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+               ;;
+             10.*)
+               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
+               ;;
+           esac
+         fi
+         ;;
+      esac
+      archive_cmds_need_lc_GCJ=no
+      hardcode_direct_GCJ=no
+      hardcode_automatic_GCJ=yes
+      hardcode_shlibpath_var_GCJ=unsupported
+      whole_archive_flag_spec_GCJ=''
+      link_all_deplibs_GCJ=yes
+    if test "$GCC" = yes ; then
+       output_verbose_link_cmd='echo'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    else
+      case $cc_basename in
+        xlc*)
+         output_verbose_link_cmd='echo'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          ;;
+       *)
+         ld_shlibs_GCJ=no
+          ;;
+      esac
+    fi
+      ;;
+
+    dgux*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    freebsd1*)
+      ld_shlibs_GCJ=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | kfreebsd*-gnu | dragonfly*)
+      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+       archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_direct_GCJ=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_GCJ=:
+
+       hardcode_direct_GCJ=yes
+       export_dynamic_flag_spec_GCJ='${wl}-E'
+
+       # hardcode_minus_L: Not really in the search PATH,
+       # but as the default location of the library.
+       hardcode_minus_L_GCJ=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      else
+       case $host_cpu in
+       hppa*64*)
+         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       ia64*)
+         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       *)
+         archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+         ;;
+       esac
+      fi
+      if test "$with_gnu_ld" = no; then
+       hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+       hardcode_libdir_separator_GCJ=:
+
+       case $host_cpu in
+       hppa*64*|ia64*)
+         hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+         hardcode_direct_GCJ=no
+         hardcode_shlibpath_var_GCJ=no
+         ;;
+       *)
+         hardcode_direct_GCJ=yes
+         export_dynamic_flag_spec_GCJ='${wl}-E'
+
+         # hardcode_minus_L: Not really in the search PATH,
+         # but as the default location of the library.
+         hardcode_minus_L_GCJ=yes
+         ;;
+       esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+       archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    newsos6)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_GCJ=yes
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    openbsd*)
+      hardcode_direct_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+       archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+       hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+       export_dynamic_flag_spec_GCJ='${wl}-E'
+      else
+       case $host_os in
+        openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+          archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+          hardcode_libdir_flag_spec_GCJ='-R$libdir'
+          ;;
+        *)
+          archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+          hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+          ;;
+       esac
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_minus_L_GCJ=yes
+      allow_undefined_flag_GCJ=unsupported
+      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+       allow_undefined_flag_GCJ=' -expect_unresolved \*'
+       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    osf4* | osf5*)     # as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+       allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+       archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+       hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+      else
+       allow_undefined_flag_GCJ=' -expect_unresolved \*'
+       archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+       archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+
+       # Both c and cxx compiler support -rpath directly
+       hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+      fi
+      hardcode_libdir_separator_GCJ=:
+      ;;
+
+    solaris*)
+      no_undefined_flag_GCJ=' -z text'
+      if test "$GCC" = yes; then
+       wlarc='${wl}'
+       archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+         $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+      else
+       wlarc=''
+       archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-R$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+       # The compiler driver will combine linker options so we
+       # cannot just pass the convience library names through
+       # without $wl, iff we do not link with $LD.
+       # Luckily, gcc supports the same syntax we need for Sun Studio.
+       # Supported since Solaris 2.6 (maybe 2.5.1?)
+       case $wlarc in
+       '')
+         whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+       *)
+         whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
+       esac ;;
+      esac
+      link_all_deplibs_GCJ=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+       # Use $CC to link under sequent, because it throws in some extra .o
+       # files that make .init and .fini sections work.
+       archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_direct_GCJ=yes
+      hardcode_minus_L_GCJ=yes
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+       sni)
+         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_GCJ=yes # is this really true???
+       ;;
+       siemens)
+         ## LD is ld it makes a PLAMLIB
+         ## CC just makes a GrossModule.
+         archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+         reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+         hardcode_direct_GCJ=no
+        ;;
+       motorola)
+         archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+         hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+       ;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_GCJ=no
+      export_dynamic_flag_spec_GCJ='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+       archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+       hardcode_shlibpath_var_GCJ=no
+       runpath_var=LD_RUN_PATH
+       hardcode_runpath_var=yes
+       ld_shlibs_GCJ=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+      no_undefined_flag_GCJ='${wl}-z,text'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_GCJ='${wl}-z,text'
+      allow_undefined_flag_GCJ='${wl}-z,nodefs'
+      archive_cmds_need_lc_GCJ=no
+      hardcode_shlibpath_var_GCJ=no
+      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+      hardcode_libdir_separator_GCJ=':'
+      link_all_deplibs_GCJ=yes
+      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+       archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+       archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_GCJ='-L$libdir'
+      hardcode_shlibpath_var_GCJ=no
+      ;;
+
+    *)
+      ld_shlibs_GCJ=no
+      ;;
+    esac
+  fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
+test "$ld_shlibs_GCJ" = no && can_build_shared=no
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_GCJ=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_GCJ in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+      $rm conftest*
+      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_GCJ
+       pic_flag=$lt_prog_compiler_pic_GCJ
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+        allow_undefined_flag_GCJ=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+         archive_cmds_need_lc_GCJ=no
+        else
+         archive_cmds_need_lc_GCJ=yes
+        fi
+        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $rm conftest*
+      { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+{ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix4* | aix5*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+          echo ' yes '
+          echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+       :
+      else
+       can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  library_names_spec='$libname.ixlibrary $libname.a'
+  # Create ${libname}_ixlibrary.a entries in /sys/libs.
+  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32*)
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $rm \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
+
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+  if test "$GCC" = yes; then
+    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+  else
+    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  fi
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+kfreebsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  freebsd*) # from 4.6 on
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+   hppa*64*)
+     shrext_cmds='.sl'
+     hardcode_into_libs=yes
+     dynamic_linker="$host_os dld.sl"
+     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+     soname_spec='${libname}${release}${shared_ext}$major'
+     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+     ;;
+   *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix3*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+       if test "$lt_cv_prog_gnu_ld" = yes; then
+               version_type=linux
+       else
+               version_type=irix
+       fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # find out which ABI we are using
+  libsuff=
+  case "$host_cpu" in
+  x86_64*|s390x*|powerpc64*)
+    echo '#line 18634 "configure"' > conftest.$ac_ext
+    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+      case `/usr/bin/file conftest.$ac_objext` in
+      *64-bit*)
+        libsuff=64
+        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+        ;;
+      esac
+    fi
+    rm -rf conftest*
+    ;;
+  esac
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,       ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+knetbsd*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='GNU ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+    *)                         need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+       shlibpath_overrides_runpath=no
+       ;;
+      *)
+       shlibpath_overrides_runpath=yes
+       ;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      export_dynamic_flag_spec='${wl}-Blargedynsym'
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+    shlibpath_overrides_runpath=no
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    shlibpath_overrides_runpath=yes
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+       ;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+{ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+   test -n "$runpath_var_GCJ" || \
+   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
+
+  # We can hardcode non-existant directories.
+  if test "$hardcode_direct_GCJ" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+     test "$hardcode_minus_L_GCJ" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_GCJ=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_GCJ=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_GCJ=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
+
+if test "$hardcode_action_GCJ" = relink; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_GCJ \
+    CC_GCJ \
+    LD_GCJ \
+    lt_prog_compiler_wl_GCJ \
+    lt_prog_compiler_pic_GCJ \
+    lt_prog_compiler_static_GCJ \
+    lt_prog_compiler_no_builtin_flag_GCJ \
+    export_dynamic_flag_spec_GCJ \
+    thread_safe_flag_spec_GCJ \
+    whole_archive_flag_spec_GCJ \
+    enable_shared_with_static_runtimes_GCJ \
+    old_archive_cmds_GCJ \
+    old_archive_from_new_cmds_GCJ \
+    predep_objects_GCJ \
+    postdep_objects_GCJ \
+    predeps_GCJ \
+    postdeps_GCJ \
+    compiler_lib_search_path_GCJ \
+    archive_cmds_GCJ \
+    archive_expsym_cmds_GCJ \
+    postinstall_cmds_GCJ \
+    postuninstall_cmds_GCJ \
+    old_archive_from_expsyms_cmds_GCJ \
+    allow_undefined_flag_GCJ \
+    no_undefined_flag_GCJ \
+    export_symbols_cmds_GCJ \
+    hardcode_libdir_flag_spec_GCJ \
+    hardcode_libdir_flag_spec_ld_GCJ \
+    hardcode_libdir_separator_GCJ \
+    hardcode_automatic_GCJ \
+    module_cmds_GCJ \
+    module_expsym_cmds_GCJ \
+    lt_cv_prog_compiler_c_o_GCJ \
+    exclude_expsyms_GCJ \
+    include_expsyms_GCJ; do
+
+    case $var in
+    old_archive_cmds_GCJ | \
+    old_archive_from_new_cmds_GCJ | \
+    archive_cmds_GCJ | \
+    archive_expsym_cmds_GCJ | \
+    module_cmds_GCJ | \
+    module_expsym_cmds_GCJ | \
+    old_archive_from_expsyms_cmds_GCJ | \
+    export_symbols_cmds_GCJ | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+       else
+         tagname=""
+       fi
+       ;;
+
+      RC)
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$rm conftest*
+
+ac_outfile=conftest.$ac_objext
+printf "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$rm conftest*
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+  # See if we are running on zsh, and set the options which allow our commands through
+  # without removal of \ escapes.
+  if test -n "${ZSH_VERSION+set}" ; then
+    setopt NO_GLOB_SUBST
+  fi
+  # Now quote all the things that may contain metacharacters while being
+  # careful not to overquote the AC_SUBSTed values.  We take copies of the
+  # variables and quote the copies for generation of the libtool script.
+  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
+    SED SHELL STRIP \
+    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+    deplibs_check_method reload_flag reload_cmds need_locks \
+    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+    lt_cv_sys_global_symbol_to_c_name_address \
+    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+    old_postinstall_cmds old_postuninstall_cmds \
+    compiler_RC \
+    CC_RC \
+    LD_RC \
+    lt_prog_compiler_wl_RC \
+    lt_prog_compiler_pic_RC \
+    lt_prog_compiler_static_RC \
+    lt_prog_compiler_no_builtin_flag_RC \
+    export_dynamic_flag_spec_RC \
+    thread_safe_flag_spec_RC \
+    whole_archive_flag_spec_RC \
+    enable_shared_with_static_runtimes_RC \
+    old_archive_cmds_RC \
+    old_archive_from_new_cmds_RC \
+    predep_objects_RC \
+    postdep_objects_RC \
+    predeps_RC \
+    postdeps_RC \
+    compiler_lib_search_path_RC \
+    archive_cmds_RC \
+    archive_expsym_cmds_RC \
+    postinstall_cmds_RC \
+    postuninstall_cmds_RC \
+    old_archive_from_expsyms_cmds_RC \
+    allow_undefined_flag_RC \
+    no_undefined_flag_RC \
+    export_symbols_cmds_RC \
+    hardcode_libdir_flag_spec_RC \
+    hardcode_libdir_flag_spec_ld_RC \
+    hardcode_libdir_separator_RC \
+    hardcode_automatic_RC \
+    module_cmds_RC \
+    module_expsym_cmds_RC \
+    lt_cv_prog_compiler_c_o_RC \
+    exclude_expsyms_RC \
+    include_expsyms_RC; do
+
+    case $var in
+    old_archive_cmds_RC | \
+    old_archive_from_new_cmds_RC | \
+    archive_cmds_RC | \
+    archive_expsym_cmds_RC | \
+    module_cmds_RC | \
+    module_expsym_cmds_RC | \
+    old_archive_from_expsyms_cmds_RC | \
+    export_symbols_cmds_RC | \
+    extract_expsyms_cmds | reload_cmds | finish_cmds | \
+    postinstall_cmds | postuninstall_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | \
+    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+      # Double-quote double-evaled strings.
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
+
+  case $lt_echo in
+  *'\$0 --fallback-echo"')
+    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+    ;;
+  esac
+
+cfgfile="$ofile"
+
+  cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_LTCFLAGS
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_RC
+
+gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
+gcc_ver=\`gcc -dumpversion\`
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Do we need the lib prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+
+# Library versioning type.
+version_type=$version_type
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME.
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_RC
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == file_magic.
+file_magic_cmd=$lt_file_magic_cmd
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to yes if building a shared library automatically hardcodes DIR into the library
+# and all subsequent libraries and executables linked against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Compile-time system search path for libraries
+sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+
+# Run-time system search path for libraries
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_RC"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+  # If there is no Makefile yet, we rely on a make rule to execute
+  # `config.status --recheck' to rerun these tests and create the
+  # libtool script then.
+  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+  if test -f "$ltmain_in"; then
+    test -f Makefile && make "$ltmain"
+  fi
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+       ;;
+
+      *)
+       { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+   { (exit 1); exit 1; }; }
+       ;;
+      esac
+
+      # Append the new tag name to the list of available tags.
+      if test -n "$tagname" ; then
+      available_tags="$available_tags $tagname"
+    fi
+    fi
+  done
+  IFS="$lt_save_ifs"
+
+  # Now substitute the updated list of available tags.
+  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+    mv "${ofile}T" "$ofile"
+    chmod +x "$ofile"
+  else
+    rm -f "${ofile}T"
+    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Prevent multiple expansion
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case "$INSTALL" in
+   *install-sh*)
+      INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+      ;;
+esac
+
+echo
+echo ---------------------------------------------
+echo testing C/C++
+echo ---------------------------------------------
+echo
+
+cc_ok=no
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+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_compiler --version >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+        CXXFLAGS="-g"
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wparentheses" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wparentheses... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wparentheses conftest.cxx > conftest.log 2>&1
+  var=`echo -Wparentheses | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wparentheses"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wreturn-type" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wreturn-type... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wreturn-type conftest.cxx > conftest.log 2>&1
+  var=`echo -Wreturn-type | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wreturn-type"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wmissing-declarations" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wmissing-declarations... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wmissing-declarations conftest.cxx > conftest.log 2>&1
+  var=`echo -Wmissing-declarations | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wmissing-declarations"
+    eval
+  fi
+
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -Wunused" >&5
+echo $ECHO_N "checking wether $CXX accepts -Wunused... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -Wunused conftest.cxx > conftest.log 2>&1
+  var=`echo -Wunused | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -Wunused"
+    eval
+  fi
+
+
+
+  for opt in -ftemplate-depth-42 "-pending_instantiations 42" ; do
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts $opt" >&5
+echo $ECHO_N "checking wether $CXX accepts $opt... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX $opt conftest.cxx > conftest.log 2>&1
+  var=`echo $opt | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval flag=no
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXTMPDPTHFLAGS="${CXXTMPDPTHFLAGS} $opt"
+    eval flag=yes
+  fi
+
+    if test "$flag" = "yes"; then
+      break
+    fi
+
+  done
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts -tweak" >&5
+echo $ECHO_N "checking wether $CXX accepts -tweak... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX -tweak conftest.cxx > conftest.log 2>&1
+  var=`echo -tweak | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CXXFLAGS="${CXXFLAGS} -tweak"
+    eval
+  fi
+
+
+
+ { echo "$as_me:$LINENO: checking which flag for dependency information generation" >&5
+echo $ECHO_N "checking which flag for dependency information generation... $ECHO_C" >&6; }
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ echo "conftest.o: conftest.c" > conftest.verif
+ echo "int  main() { return 0; }" > conftest.c
+
+f77int="F77INT32"
+case  $host_os in
+   irix5.* | irix6.* | osf4.* | osf5.* | linux*  )
+
+        linux64="true"
+# porting on intel processor 64 bits
+        expr "$host_os" : 'linux' >/dev/null && ( test ! x"$host_cpu" = x"x86_64" && test ! x"$host_cpu" = x"ia64" ) && linux64="false"
+       if test ! x"$linux64" = "xfalse" ; then
+         echo "$as_me:$LINENO: checking for 64bits integers size in F77/F90" >&5
+echo $ECHO_N "checking for 64bits integers size in F77/F90... $ECHO_C" >&6
+         # Check whether --enable-int64 or --disable-int64 was given.
+if test "${enable_int64+set}" = set; then
+  enableval="$enable_int64"
+
+fi;
+         case "X-$enable_int64" in
+           X-no)
+            echo "$as_me:$LINENO: result: \"disabled\"" >&5
+echo "${ECHO_T}\"disabled\"" >&6
+            SUFFIXES="_32"
+            ;;
+           *)
+            echo "$as_me:$LINENO: result: \"enabled\"" >&5
+echo "${ECHO_T}\"enabled\"" >&6
+            SUFFIXES=""
+            f77int="F77INT64"
+            ;;
+         esac
+       fi
+     ;;
+   *)
+     ;;
+esac
+
+case $host_os in
+    linux*)
+# porting on intel processor 64 bits: if 64 bits processor, by default compilation in 64 bits
+        if test x"$linux64" = x"true"; then \
+          MACHINE="PCLINUX64${SUFFIXES}";
+         CFLAGS=" -D_OCC64 ${CXXFLAGS}";
+         CXXFLAGS=" -D_OCC64 ${CXXFLAGS}";\
+       else \
+         MACHINE=PCLINUX; \
+       fi
+       ;;
+    hpux*)
+       MACHINE=HP9000
+       ;;
+    aix4.*)
+       MACHINE=RS6000
+       host_os_novers=aix4.x
+       ;;
+    irix5.*)
+       MACHINE="IRIX64${SUFFIXES}"
+       host_os_novers=irix5.x
+       ;;
+    irix6.*)
+       MACHINE="IRIX64${SUFFIXES}"
+       host_os_novers=irix6.x
+       ;;
+    osf4.*)
+       MACHINE="OSF1${SUFFIXES}"
+       host_os_novers=osf4.x
+       ;;
+    osf5.*)
+       MACHINE="OSF1${SUFFIXES}"
+        host_os_novers=osf5.x
+        ;;
+    solaris2.*)
+       MACHINE=SUN4SOL2
+        host_os_novers=solaris2.x
+        ;;
+    uxpv*)
+       MACHINE=VPP5000
+        ;;
+    *)
+       MACHINE=
+        host_os_novers=$host_os
+        ;;
+esac
+
+ case $host_os in
+   osf*)
+     DEPCC=gcc
+     DEPCXX=g++
+     DEPCXXFLAGS=
+     DIFFFLAGS="-w"
+     ;;
+   *)
+     DEPCC=${CC-cc}
+     DEPCXX=${CXX-c++}
+     DEPCXXFLAGS="\${CXXFLAGS}"
+     DIFFFLAGS="-b -B"
+     ;;
+ esac
+ C_DEPEND_FLAG=
+ for ac_C_DEPEND_FLAG in -xM -MM -M ; do
+
+    rm -f conftest.d conftest.err
+    ${DEPCC} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
+    if test -f conftest.u ; then
+       mv conftest.u conftest.d
+    fi
+
+    rm -f conftest
+    diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+    if test ! -s conftest ; then
+       C_DEPEND_FLAG=${ac_C_DEPEND_FLAG}
+       break
+    fi
+ done
+
+ rm -f conftest.d conftest.err
+ ${DEPCC} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
+ if test -f conftest.u ; then
+    mv conftest.u conftest.d
+ fi
+ rm -f conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ if test ! -s conftest ; then
+    C_DEPEND_FLAG=${C_DEPEND_FLAG}" -MG"
+ fi
+
+ rm -f conftest*
+ if test "x${C_DEPEND_FLAG}" = "x" ; then
+    echo "cannot determine flag (C language)"
+    exit
+ fi
+
+ printf " C :  ${DEPCC} ${C_DEPEND_FLAG}"
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ echo "conftest.o: conftest.cxx" > conftest.verif
+ echo "int  main() { return 0; }" > conftest.cxx
+
+ CXX_DEPEND_FLAG=
+ for ac_CXX_DEPEND_FLAG in -xM -MM -M ; do
+
+    rm -f conftest.d conftest.err
+    ${DEPCXX} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
+    if test -f conftest.u ; then
+       mv conftest.u conftest.d
+    fi
+
+    rm -f conftest
+    diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+    if test ! -s conftest ; then
+       CXX_DEPEND_FLAG=${ac_CXX_DEPEND_FLAG}
+       break
+    fi
+ done
+
+ rm -f conftest.d conftest.err
+ ${DEPCXX} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
+ if test -f conftest.u ; then
+    mv conftest.u conftest.d
+ fi
+ rm -f conftest
+ diff ${DIFFFLAGS} conftest.d conftest.verif > conftest
+ if test ! -s conftest ; then
+    CXX_DEPEND_FLAG=${CXX_DEPEND_FLAG}" -MG"
+ fi
+
+
+ rm -f conftest*
+ if test "x${CXX_DEPEND_FLAG}" = "x" ; then
+    echo "cannot determine flag (C++ language)"
+    exit
+ fi
+
+ printf " C++ : ${DEPCXX} ${CXX_DEPEND_FLAG}"
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ { echo "$as_me:$LINENO: result:  ... done" >&5
+echo "${ECHO_T} ... done" >&6; }
+
+
+
+
+
+
+
+
+# AC_CC_WARNINGS([ansi])
+cc_ok=yes
+
+
+{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+  LIBS="-ldl $LIBS"
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5
+echo $ECHO_N "checking for nanosleep in -lrt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_rt_nanosleep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+int
+main ()
+{
+return nanosleep ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_rt_nanosleep=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_rt_nanosleep=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_nanosleep" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_nanosleep" >&6; }
+if test $ac_cv_lib_rt_nanosleep = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+  LIBS="-lrt $LIBS"
+
+fi
+
+
+
+{ echo "$as_me:$LINENO: checking for ceil in -lm" >&5
+echo $ECHO_N "checking for ceil in -lm... $ECHO_C" >&6; }
+if test "${ac_cv_lib_m_ceil+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ceil ();
+int
+main ()
+{
+return ceil ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_m_ceil=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_m_ceil=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_ceil" >&5
+echo "${ECHO_T}$ac_cv_lib_m_ceil" >&6; }
+if test $ac_cv_lib_m_ceil = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+
+
+{ echo "$as_me:$LINENO: checking whether the compiler use std iostream" >&5
+echo $ECHO_N "checking whether the compiler use std iostream... $ECHO_C" >&6; }
+
+cat > conftest.cxx <<EOF
+#include <iostream>
+int main(int argc, char **argv) {std::cout << "Hello" << std::endl; return 0;}
+EOF
+
+fUSE_STD_IOSTREAM=no
+for ac_CXX_USE_STD_IOSTREAM in "" -D__USE_STD_IOSTREAM ; do
+  if $CXX ${ac_CXX_USE_STD_IOSTREAM} conftest.cxx > /dev/null 2>&1; then
+    CPPFLAGS="$CPPFLAGS ${ac_CXX_USE_STD_IOSTREAM}"
+    if test x${ac_CXX_USE_STD_IOSTREAM} = x; then
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    else
+      { echo "$as_me:$LINENO: result: ${ac_CXX_USE_STD_IOSTREAM}" >&5
+echo "${ECHO_T}${ac_CXX_USE_STD_IOSTREAM}" >&6; }
+    fi
+    fUSE_STD_IOSTREAM=yes
+    break
+  fi
+done
+if test $fUSE_STD_IOSTREAM = no; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5
+echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_namespaces+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+namespace Outer { namespace Inner { int i = 0; }}
+int
+main ()
+{
+using namespace Outer::Inner; return i;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_cxx_namespaces=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_cxx_namespaces=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5
+echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6; }
+if test "$ac_cv_cxx_namespaces" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NAMESPACES
+_ACEOF
+
+fi
+
+
+  { echo "$as_me:$LINENO: checking whether the compiler has stringstream" >&5
+echo $ECHO_N "checking whether the compiler has stringstream... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_have_sstream+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cxx_have_sstream=no
+
+
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+      #include <sstream>
+      #ifdef HAVE_NAMESPACES
+      using namespace std;
+      #endif
+
+int
+main ()
+{
+stringstream message; message << "Hello"; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_have_sstream=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_prog_cxx_have_sstream=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_have_sstream" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_have_sstream" >&6; }
+  HAVE_SSTREAM=$ac_cv_prog_cxx_have_sstream
+
+
+
+
+
+
+  { echo "$as_me:$LINENO: checking for LIB_LOCATION_SUFFIX..." >&5
+echo "$as_me: checking for LIB_LOCATION_SUFFIX..." >&6;}
+  LIB_LOCATION_SUFFIX=""
+
+  { echo "$as_me:$LINENO: result: LIB_LOCATION_SUFFIX is $LIB_LOCATION_SUFFIX" >&5
+echo "${ECHO_T}LIB_LOCATION_SUFFIX is $LIB_LOCATION_SUFFIX" >&6; }
+
+  for opt in "-Xlinker -export-dynamic" -transitive_link; do
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts $opt" >&5
+echo $ECHO_N "checking wether $CXX accepts $opt... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX $opt conftest.cxx > conftest.log 2>&1
+  var=`echo $opt | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval flag=no
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    LDEXPDYNFLAGS="${LDEXPDYNFLAGS} $opt"
+    eval flag=yes
+  fi
+
+    if test "$flag" = "yes"; then
+      break
+    fi
+  done
+
+
+  for opt in "-Xlinker -enable-new-dtags" ; do
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts $opt" >&5
+echo $ECHO_N "checking wether $CXX accepts $opt... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX $opt conftest.cxx > conftest.log 2>&1
+  var=`echo $opt | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    LDFLAGS="${LDFLAGS} $opt"
+    eval
+  fi
+
+  done
+
+
+  case $host_os in
+    osf*)
+      STDLIB="-lcxxstd"
+      ;;
+    *)
+      STDLIB="-lstdc++"
+      ;;
+  esac
+
+
+
+echo
+echo ---------------------------------------------
+echo testing threads
+echo ---------------------------------------------
+echo
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  acx_pthread_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+echo "${ECHO_T}$acx_pthread_ok" >&6; }
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case "${host_cpu}-${host_os}" in
+        *linux*)
+
+        # On linux "none" works, but boost requires -pthread, so, try first "-pthread"
+acx_pthread_flags="-pthread pthreads none -Kthread -kthread lthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+        ;;
+
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                { echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6; }
+                ;;
+
+                -*)
+                { echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+               pthread-config)
+               # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$acx_pthread_config"; then
+  ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_acx_pthread_config="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+fi
+fi
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+  { echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
+echo "${ECHO_T}$acx_pthread_config" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+               if test x"$acx_pthread_config" = xno; then continue; fi
+               PTHREAD_CFLAGS="`pthread-config --cflags`"
+               PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+               ;;
+
+                *)
+                { echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  acx_pthread_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        { echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+echo "${ECHO_T}$acx_pthread_ok" >&6; }
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        { echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr=PTHREAD_CREATE_JOINABLE;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ok=PTHREAD_CREATE_JOINABLE
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ok=unknown
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        if test x"$ok" = xunknown; then
+                cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr=PTHREAD_CREATE_UNDETACHED;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ok=PTHREAD_CREATE_UNDETACHED
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ok=unknown
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PTHREAD_CREATE_JOINABLE $ok
+_ACEOF
+
+        fi
+        { echo "$as_me:$LINENO: result: ${ok}" >&5
+echo "${ECHO_T}${ok}" >&6; }
+        if test x"$ok" = xunknown; then
+                { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
+echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
+        fi
+
+        { echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6; }
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        { echo "$as_me:$LINENO: result: ${flag}" >&5
+echo "${ECHO_T}${flag}" >&6; }
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PTHREAD_CC="cc_r"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+echo "${ECHO_T}$PTHREAD_CC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+else
+        PTHREAD_CC="$CC"
+fi
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD 1
+_ACEOF
+
+        :
+else
+        acx_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+if test x"$enable_pthreads_done" != xyes; then
+  if test x"$acx_pthread_ok" = xyes; then
+    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+    LIBS="$LIBS $PTHREAD_LIBS"
+    threads_ok=yes
+  else
+    threads_ok=no
+  fi
+  enable_pthreads_done=yes
+fi
+
+
+echo
+echo ---------------------------------------------
+echo testing python
+echo ---------------------------------------------
+echo
+
+
+  python_ok=yes
+
+
+# Check whether --with-python was given.
+if test "${with_python+set}" = set; then
+  withval=$with_python; PYTHON="$withval/bin/python"
+    { echo "$as_me:$LINENO: result: \"select python distribution in $withval\"" >&5
+echo "${ECHO_T}\"select python distribution in $withval\"" >&6; }
+
+else
+
+    # Extract the first word of "python", so it can be a program name with args.
+set dummy python; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { echo "$as_me:$LINENO: result: $PYTHON" >&5
+echo "${ECHO_T}$PYTHON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+fi
+
+
+  { echo "$as_me:$LINENO: checking local Python configuration..." >&5
+echo "$as_me: checking local Python configuration..." >&6;}
+
+
+  PYTHON_PREFIX=`echo $PYTHON | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+  PYTHON_PREFIX=`echo $PYTHON_PREFIX | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+  PYTHONHOME=$PYTHON_PREFIX
+
+
+
+
+    PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
+
+
+  PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile
+  if test ! -f "$PY_MAKEFILE"; then
+     { echo "$as_me:$LINENO: WARNING: *** Couldn't find ${PY_MAKEFILE}.  Maybe you are
+*** missing the development portion of the python installation" >&5
+echo "$as_me: WARNING: *** Couldn't find ${PY_MAKEFILE}.  Maybe you are
+*** missing the development portion of the python installation" >&2;}
+     python_ok=no
+  fi
+
+
+
+
+  PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
+  PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+  PYTHON_LIB=$PYTHON_LIBS
+  PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a
+
+
+
+  PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"`
+
+
+
+# Check whether --with-python-site was given.
+if test "${with_python_site+set}" = set; then
+  withval=$with_python_site;
+
+   PYTHON_SITE="$withval"
+    python_site_given=yes
+else
+  PYTHON_SITE=${prefix}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
+    python_site_given=no
+fi
+
+
+
+  PYTHON_SITE_PACKAGE=$PYTHON_SITE/$PACKAGE
+
+
+
+
+
+# Check whether --with-python-site-exec was given.
+if test "${with_python_site_exec+set}" = set; then
+  withval=$with_python_site_exec; PYTHON_SITE_EXEC="$withval"
+else
+  if test "$python_site_given" = yes; then
+       PYTHON_SITE_EXEC=$PYTHON_SITE
+     else
+       PYTHON_SITE_EXEC=${PYTHON_EXEC_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
+     fi
+fi
+
+
+    PYTHON_SITE_INSTALL=$PYTHON_SITE_PACKAGE
+
+
+
+  pythondir=${PYTHON_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/
+
+
+ { echo "$as_me:$LINENO: checking if we need libdb" >&5
+echo $ECHO_N "checking if we need libdb... $ECHO_C" >&6; }
+ PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U`
+  if test "x$PY_NEEDOPENDB" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for dbopen in -ldb" >&5
+echo $ECHO_N "checking for dbopen in -ldb... $ECHO_C" >&6; }
+if test "${ac_cv_lib_db_dbopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dbopen ();
+int
+main ()
+{
+return dbopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_db_dbopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_db_dbopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbopen" >&5
+echo "${ECHO_T}$ac_cv_lib_db_dbopen" >&6; }
+if test $ac_cv_lib_db_dbopen = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -ldb"
+else
+  db_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+ { echo "$as_me:$LINENO: checking if we need libdl" >&5
+echo $ECHO_N "checking if we need libdl... $ECHO_C" >&6; }
+  PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U`
+  if test "x$PY_NEEDOPENDL" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -ldl"
+else
+  dl_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+ { echo "$as_me:$LINENO: checking if we need libutil" >&5
+echo $ECHO_N "checking if we need libutil... $ECHO_C" >&6; }
+  PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U`
+  if test "x$PY_NEEDOPENPTY" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
+if test "${ac_cv_lib_util_openpty+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openpty ();
+int
+main ()
+{
+return openpty ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_util_openpty=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_util_openpty=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
+echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
+if test $ac_cv_lib_util_openpty = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -lutil"
+else
+  openpty_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+ { echo "$as_me:$LINENO: checking if we need tcltk" >&5
+echo $ECHO_N "checking if we need tcltk... $ECHO_C" >&6; }
+  PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U`
+  if test "x$PY_NEEDTCLTK" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for Tcl_Init in -ltcl" >&5
+echo $ECHO_N "checking for Tcl_Init in -ltcl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_tcl_Tcl_Init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltcl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char Tcl_Init ();
+int
+main ()
+{
+return Tcl_Init ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_tcl_Tcl_Init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_tcl_Tcl_Init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_tcl_Tcl_Init" >&5
+echo "${ECHO_T}$ac_cv_lib_tcl_Tcl_Init" >&6; }
+if test $ac_cv_lib_tcl_Tcl_Init = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk"
+else
+  tclinit_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+  if test "$python_ok" == "yes"; then
+      { echo "$as_me:$LINENO: result: looks good" >&5
+echo "${ECHO_T}looks good" >&6; }
+  fi
+
+
+
+
+
+
+        if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      { echo "$as_me:$LINENO: checking whether $PYTHON version >= 2.3" >&5
+echo $ECHO_N "checking whether $PYTHON version >= 2.3... $ECHO_C" >&6; }
+      prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('2.3', '.')) + [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
+   ($PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { { echo "$as_me:$LINENO: error: too old" >&5
+echo "$as_me: error: too old" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # VERSION.
+      { echo "$as_me:$LINENO: checking for a Python interpreter with version >= 2.3" >&5
+echo $ECHO_N "checking for a Python interpreter with version >= 2.3... $ECHO_C" >&6; }
+if test "${am_cv_pathless_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+       for am_cv_pathless_PYTHON in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 none; do
+         test "$am_cv_pathless_PYTHON" = none && break
+         prog="import sys, string
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+minver = map(int, string.split('2.3', '.')) + [0, 0, 0]
+minverhex = 0
+for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[i]
+sys.exit(sys.hexversion < minverhex)"
+  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
+   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; then
+  break
+fi
+
+       done
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_pathless_PYTHON" >&5
+echo "${ECHO_T}$am_cv_pathless_PYTHON" >&6; }
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+       PYTHON=:
+      else
+        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
+set dummy $am_cv_pathless_PYTHON; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { echo "$as_me:$LINENO: result: $PYTHON" >&5
+echo "${ECHO_T}$PYTHON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+
+
+  if test "$PYTHON" = :; then
+      { { echo "$as_me:$LINENO: error: no suitable Python interpreter found" >&5
+echo "$as_me: error: no suitable Python interpreter found" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+
+
+  { echo "$as_me:$LINENO: checking for $am_display_PYTHON version" >&5
+echo $ECHO_N "checking for $am_display_PYTHON version... $ECHO_C" >&6; }
+if test "${am_cv_python_version+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_version" >&5
+echo "${ECHO_T}$am_cv_python_version" >&6; }
+  PYTHON_VERSION=$am_cv_python_version
+
+
+
+  PYTHON_PREFIX='${prefix}'
+
+  PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+
+
+  { echo "$as_me:$LINENO: checking for $am_display_PYTHON platform" >&5
+echo $ECHO_N "checking for $am_display_PYTHON platform... $ECHO_C" >&6; }
+if test "${am_cv_python_platform+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_platform" >&5
+echo "${ECHO_T}$am_cv_python_platform" >&6; }
+  PYTHON_PLATFORM=$am_cv_python_platform
+
+
+
+
+                { echo "$as_me:$LINENO: checking for $am_display_PYTHON script directory" >&5
+echo $ECHO_N "checking for $am_display_PYTHON script directory... $ECHO_C" >&6; }
+if test "${am_cv_python_pythondir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
+     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_pythondir" >&5
+echo "${ECHO_T}$am_cv_python_pythondir" >&6; }
+  pythondir=$am_cv_python_pythondir
+
+
+
+  pkgpythondir=\${pythondir}/$PACKAGE
+
+
+            { echo "$as_me:$LINENO: checking for $am_display_PYTHON extension module directory" >&5
+echo $ECHO_N "checking for $am_display_PYTHON extension module directory... $ECHO_C" >&6; }
+if test "${am_cv_python_pyexecdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
+     echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_python_pyexecdir" >&5
+echo "${ECHO_T}$am_cv_python_pyexecdir" >&6; }
+  pyexecdir=$am_cv_python_pyexecdir
+
+
+
+  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+
+
+  fi
+
+
+
+echo
+echo ---------------------------------------------
+echo testing QT
+echo ---------------------------------------------
+echo
+
+
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+# Check whether --with-opengl was given.
+if test "${with_opengl+set}" = set; then
+  withval=$with_opengl; opengl_dir="$withval"
+else
+  dirs="/usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/graphics/OpenGL/lib64 /opt/graphics/OpenGL/lib /usr/openwin/lib64 /usr/openwin/lib /usr/X11R6/lib64 /usr/X11R6/lib"
+fi
+
+{ echo "$as_me:$LINENO: checking for OpenGL..." >&5
+echo "$as_me: checking for OpenGL..." >&6;}
+{ echo "$as_me:$LINENO: checking for OpenGL headers..." >&5
+echo "$as_me: checking for OpenGL headers..." >&6;}
+
+OGL_INCLUDES=""
+OGL_LIBS=""
+
+GL_LIB_PATH=""
+GLU_LIB_PATH=""
+
+OpenGL_ok=no
+OpenGL_libs_ok=no
+OpenGL_headers_ok=no
+
+# by default
+if test "x${opengl_dir}" != "x" ; then
+  { echo "$as_me:$LINENO: result: for opengl_dir: $opengl_dir" >&5
+echo "${ECHO_T}for opengl_dir: $opengl_dir" >&6; }
+  as_ac_Header=`echo "ac_cv_header_${opengl_dir}/include/GL/gl.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for ${opengl_dir}/include/GL/gl.h" >&5
+echo $ECHO_N "checking for ${opengl_dir}/include/GL/gl.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking ${opengl_dir}/include/GL/gl.h usability" >&5
+echo $ECHO_N "checking ${opengl_dir}/include/GL/gl.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <${opengl_dir}/include/GL/gl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking ${opengl_dir}/include/GL/gl.h presence" >&5
+echo $ECHO_N "checking ${opengl_dir}/include/GL/gl.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <${opengl_dir}/include/GL/gl.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${opengl_dir}/include/GL/gl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${opengl_dir}/include/GL/gl.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for ${opengl_dir}/include/GL/gl.h" >&5
+echo $ECHO_N "checking for ${opengl_dir}/include/GL/gl.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  OpenGL_headers_ok=yes; OGL_INCLUDES="-I${opengl_dir}/include"
+else
+  OpenGL_headers_ok=no
+fi
+
+
+  if test "x${OpenGL_headers_ok}" = "xyes" ; then
+    { echo "$as_me:$LINENO: checking for default OpenGL library..." >&5
+echo "$as_me: checking for default OpenGL library..." >&6;}
+    if test "x${opengl_dir}" = "x/usr" ; then
+      OGL_LIBS=""
+    else
+      OGL_LIBS="-L${opengl_dir}/lib"
+    fi
+    LDFLAGS_old="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $OGL_LIBS"
+    { echo "$as_me:$LINENO: checking for glBegin in -lGL" >&5
+echo $ECHO_N "checking for glBegin in -lGL... $ECHO_C" >&6; }
+if test "${ac_cv_lib_GL_glBegin+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char glBegin ();
+int
+main ()
+{
+return glBegin ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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_GL_glBegin=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_GL_glBegin=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glBegin" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_glBegin" >&6; }
+if test $ac_cv_lib_GL_glBegin = yes; then
+  OpenGL_libs_ok=yes
+else
+  OpenGL_libs_ok=no
+fi
+
+    if test "x${OpenGL_libs_ok}" = "xyes" ; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  OpenGL_libs_ok=yes ; OpenGL_ok=yes; OGL_LIBS="$OGL_LIBS -lGL"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       OpenGL_libs_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    fi
+    LDFLAGS="$LDFLAGS_old"
+  fi
+fi
+
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+  if test "${ac_cv_header_GL_gl_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for GL/gl.h" >&5
+echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_GL_gl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
+echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking GL/gl.h usability" >&5
+echo $ECHO_N "checking GL/gl.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <GL/gl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking GL/gl.h presence" >&5
+echo $ECHO_N "checking GL/gl.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <GL/gl.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: GL/gl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: GL/gl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: GL/gl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: GL/gl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: GL/gl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: GL/gl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: GL/gl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: GL/gl.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for GL/gl.h" >&5
+echo $ECHO_N "checking for GL/gl.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_GL_gl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_GL_gl_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_GL_gl_h" >&5
+echo "${ECHO_T}$ac_cv_header_GL_gl_h" >&6; }
+
+fi
+if test $ac_cv_header_GL_gl_h = yes; then
+  OpenGL_headers_ok=yes
+else
+  OpenGL_headers_ok=no
+fi
+
+
+fi
+
+# under SunOS ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+
+for ac_header in /usr/openwin/share/include/GL/glxmd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/openwin/share/include/"
+else
+  OpenGL_headers_ok=no
+fi
+
+done
+
+fi
+
+# under IRIX ?
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+
+for ac_header in /opt/graphics/OpenGL/include/GL/glxmd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ OpenGL_headers_ok=yes; OGL_INCLUDES="-I/opt/graphics/OpenGL/include"
+else
+  OpenGL_headers_ok=no
+fi
+
+done
+
+fi
+
+# some linux OpenGL servers hide the includes in /usr/X11R6/include/GL
+if test "x${OpenGL_headers_ok}" = "xno" ; then
+
+for ac_header in /usr/X11R6/include/GL/gl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ OpenGL_headers_ok=yes; OGL_INCLUDES="-I/usr/X11R6/include"
+else
+  OpenGL_headers_ok=no
+fi
+
+done
+
+fi
+
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
+  { echo "$as_me:$LINENO: checking for OpenGL library..." >&5
+echo "$as_me: checking for OpenGL library..." >&6;}
+  for idir in $dirs; do
+    if test -r "${idir}/libGL.so"; then
+      { echo "$as_me:$LINENO: result: in ${idir}" >&5
+echo "${ECHO_T}in ${idir}" >&6; }
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GL_LIB_PATH=""
+      else
+        GL_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+    # under IRIX ?
+    if test -r "${idir}/libGL.sl"; then
+      { echo "$as_me:$LINENO: result: in ${idir}" >&5
+echo "${ECHO_T}in ${idir}" >&6; }
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GL_LIB_PATH=""
+      else
+        GL_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+  done
+  LDFLAGS_old="${LDFLAGS}"
+  LDFLAGS="${LDFLAGS} ${GL_LIB_PATH}"
+  { echo "$as_me:$LINENO: checking for glBegin in -lGL" >&5
+echo $ECHO_N "checking for glBegin in -lGL... $ECHO_C" >&6; }
+if test "${ac_cv_lib_GL_glBegin+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char glBegin ();
+int
+main ()
+{
+return glBegin ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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_GL_glBegin=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_GL_glBegin=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glBegin" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_glBegin" >&6; }
+if test $ac_cv_lib_GL_glBegin = yes; then
+  OpenGL_libs_ok=yes
+else
+  OpenGL_libs_ok=no
+fi
+
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GL_LIB_PATH} -lGL"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       OpenGL_libs_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  fi
+  LDFLAGS="$LDFLAGS_old"
+fi
+
+if test "x${OpenGL_libs_ok}" = "xyes" ; then
+  for idir in $dirs; do
+    if test -r "${idir}/libGLU.so"; then
+      { echo "$as_me:$LINENO: result: in ${idir}" >&5
+echo "${ECHO_T}in ${idir}" >&6; }
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GLU_LIB_PATH=""
+      else
+        GLU_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+    # under IRIX ?
+    if test -r "${idir}/libGLU.sl"; then
+      { echo "$as_me:$LINENO: result: in ${idir}" >&5
+echo "${ECHO_T}in ${idir}" >&6; }
+      if test "x${idir}" = "x/usr/lib64" -o "x${idir}" = "x/usr/lib" ; then
+        GLU_LIB_PATH=""
+      else
+        GLU_LIB_PATH="-L${idir}"
+      fi
+      break
+    fi
+  done
+
+  # workaround a problem with libGL library location
+  for idir in $dirs; do
+    if test -r "${idir}/libGLU.la"; then
+      GLU_LA_PATH="${idir}/libGLU.la"
+      GL_LA_PATH_TO_CHECK=`cat ${GLU_LA_PATH} | awk '{ for(i=1;i<NF;i++){ if(gsub("libGL.la","&",$i)>0) print $i } }'`
+      if test -z ${GL_LA_PATH_TO_CHECK} || test -r ${GL_LA_PATH_TO_CHECK}; then
+        # nothing to do
+        break
+      fi
+      for jdir in $dirs; do
+        if test -r "${jdir}/libGL.la"; then
+          GL_LA_PATH="${jdir}/libGL.la"
+          # copy the libGLU.la file and set correct libGL.la path in it
+          NEW_GLU_LA_PATH=${ROOT_BUILDDIR}
+          NEW_GLU_LA_FILE="${NEW_GLU_LA_PATH}/libGLU.la"
+          sed -e "s%${GL_LA_PATH_TO_CHECK}%${GL_LA_PATH}%" ${GLU_LA_PATH} > "${NEW_GLU_LA_FILE}"
+          chmod -f --reference=${GLU_LA_PATH} "${NEW_GLU_LA_FILE}"
+          # set a new libGLU.la path
+          GLU_LIB_PATH="-L${NEW_GLU_LA_PATH}"
+          # create a simbolic link to libGLU.so
+          for kdir in $dirs; do
+            if test -r "${kdir}/libGLU.so"; then
+              cp -fs "${kdir}/libGLU.so" "${NEW_GLU_LA_PATH}/libGLU.so"
+              break
+            fi
+          done
+          break
+        fi
+      done
+      break
+    fi
+  done
+
+  LDFLAGS_old="${LDFLAGS}"
+  LDFLAGS="${LDFLAGS} ${OGL_LIBS} ${GLU_LIB_PATH}"
+  { echo "$as_me:$LINENO: checking for gluBeginSurface in -lGLU" >&5
+echo $ECHO_N "checking for gluBeginSurface in -lGLU... $ECHO_C" >&6; }
+if test "${ac_cv_lib_GLU_gluBeginSurface+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGLU  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gluBeginSurface ();
+int
+main ()
+{
+return gluBeginSurface ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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_GLU_gluBeginSurface=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_GLU_gluBeginSurface=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginSurface" >&5
+echo "${ECHO_T}$ac_cv_lib_GLU_gluBeginSurface" >&6; }
+if test $ac_cv_lib_GLU_gluBeginSurface = yes; then
+  OpenGL_libs_ok=yes
+else
+  OpenGL_libs_ok=no
+fi
+
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  OpenGL_libs_ok=yes ; OGL_LIBS="${OGL_LIBS} ${GLU_LIB_PATH} -lGLU"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       OpenGL_libs_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  fi
+  LDFLAGS="$LDFLAGS_old"
+fi
+
+if test "x${OpenGL_headers_ok}" = "xyes" ; then
+  if test "x${OpenGL_libs_ok}" = "xyes" ; then
+    OpenGL_ok=yes
+  fi
+fi
+
+{ echo "$as_me:$LINENO: result: for OpenGL_headers_ok: $OpenGL_headers_ok" >&5
+echo "${ECHO_T}for OpenGL_headers_ok: $OpenGL_headers_ok" >&6; }
+{ echo "$as_me:$LINENO: result: for OpenGL_libs_ok: $OpenGL_libs_ok" >&5
+echo "${ECHO_T}for OpenGL_libs_ok: $OpenGL_libs_ok" >&6; }
+{ echo "$as_me:$LINENO: result: for OpenGL_ok: $OpenGL_ok" >&5
+echo "${ECHO_T}for OpenGL_ok: $OpenGL_ok" >&6; }
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+# Check whether --with-qt was given.
+if test "${with_qt+set}" = set; then
+  withval=$with_qt; with_qt=$withval
+else
+  with_qt=""
+fi
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for Qt..." >&5
+echo "$as_me: checking for Qt..." >&6;}
+
+if test "x$OpenGL_ok" != "xyes" ; then
+   { echo "$as_me:$LINENO: WARNING: Qt needs OpenGL correct configuration" >&5
+echo "$as_me: WARNING: Qt needs OpenGL correct configuration" >&2;}
+fi
+
+qt_ok=yes
+
+QTDIR=$(echo $QTDIR | sed 's%/\+$%%')
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+if test -z $with_qt ; then
+  with_qt=""
+fi
+if test "x$with_qt" = "xyes" ; then
+    with_qt=""
+fi
+if test "x$with_qt" = "xauto" ; then
+    with_qt=""
+fi
+if test "x$with_qt" = "xno" ; then
+    with_qt=""
+  { echo "$as_me:$LINENO: WARNING: Value no" >&5
+echo "$as_me: WARNING: Value no" >&2;}
+fi
+
+if test "x$with_qt" != "x" ; then
+    QTDIR="$with_qt"
+elif test "$QTDIR" = "/usr/lib/qt3" ; then
+    { echo "$as_me:$LINENO: result: current QTDIR is $QTDIR" >&5
+echo "${ECHO_T}current QTDIR is $QTDIR" >&6; }
+    if test -d /usr/lib/qt4 ; then
+    { echo "$as_me:$LINENO: result: it is strange for a qt4 installation !" >&5
+echo "${ECHO_T}it is strange for a qt4 installation !" >&6; }
+    { echo "$as_me:$LINENO: result: /usr/lib/qt4 is present" >&5
+echo "${ECHO_T}/usr/lib/qt4 is present" >&6; }
+    { echo "$as_me:$LINENO: result: replacing QTDIR by /usr/lib/qt4" >&5
+echo "${ECHO_T}replacing QTDIR by /usr/lib/qt4" >&6; }
+    QTDIR=/usr/lib/qt4
+  fi
+elif test -z $QTDIR ; then
+  { echo "$as_me:$LINENO: WARNING: undefined QTDIR variable which specify where Qt product was installed" >&5
+echo "$as_me: WARNING: undefined QTDIR variable which specify where Qt product was installed" >&2;}
+  for d in /usr/local/lib/qt4 /usr/lib/qt4 /usr ; do
+    if test -f ${d}/lib/libQtCore.so ; then
+      { echo "$as_me:$LINENO: result: trying ${d}" >&5
+echo "${ECHO_T}trying ${d}" >&6; }
+      QTDIR="${d}"
+      break
+    elif test -f ${d}/lib64/libQtCore.so ; then
+      { echo "$as_me:$LINENO: result: trying ${d}" >&5
+echo "${ECHO_T}trying ${d}" >&6; }
+      QTDIR="${d}"
+      break
+    elif test -f ${d}/libQtCore.so ; then
+      { echo "$as_me:$LINENO: result: trying ${d}" >&5
+echo "${ECHO_T}trying ${d}" >&6; }
+      QTDIR="${d}"
+      break
+    fi
+  done
+fi
+
+#
+# check QTDIR environment variable
+#
+if test "x$QTDIR" = "x"
+then
+   { echo "$as_me:$LINENO: result: Please define correct path in \"--with-qt\" option or use correct $QTDIR variable" >&5
+echo "${ECHO_T}Please define correct path in \"--with-qt\" option or use correct $QTDIR variable" >&6; }
+   qt_ok=no
+fi
+
+#
+# check Qt version
+#
+if  test "x$qt_ok" = "xyes"
+then
+   qt_inc_ok=no
+   QTINC=""
+   as_ac_File=`echo "ac_cv_file_${QTDIR}/include/qt4/QtCore/qglobal.h" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${QTDIR}/include/qt4/QtCore/qglobal.h" >&5
+echo $ECHO_N "checking for ${QTDIR}/include/qt4/QtCore/qglobal.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${QTDIR}/include/qt4/QtCore/qglobal.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  QTINC="/qt4"
+else
+  QTINC=""
+fi
+
+   if test "x$QTINC" = "x"
+   then
+     as_ac_File=`echo "ac_cv_file_${QTDIR}/include${QTINC}/QtCore/qglobal.h" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${QTDIR}/include${QTINC}/QtCore/qglobal.h" >&5
+echo $ECHO_N "checking for ${QTDIR}/include${QTINC}/QtCore/qglobal.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${QTDIR}/include${QTINC}/QtCore/qglobal.h"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  qt_inc_ok=yes
+else
+  qt_inc_ok=no
+fi
+
+   else
+     qt_inc_ok=yes
+   fi
+   if test "x$qt_inc_ok" = "xyes"
+   then
+     { echo "$as_me:$LINENO: checking whether Qt version >= 4.0" >&5
+echo $ECHO_N "checking whether Qt version >= 4.0... $ECHO_C" >&6; }
+     QT_VERSION=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/QtCore/qglobal.h | sed -e 's%^#define QT_VERSION_STR[[:space:]]*\"\([[:digit:]\.]*\)\"%\1%g'`
+     QT_VERSION_ID=`echo $QT_VERSION | awk -F. '{v=$1*10000+$2*100+$3;print v}'`
+     if test $QT_VERSION_ID -ge 40000
+     then
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     else
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       qt_ok=no
+     fi
+     { echo "$as_me:$LINENO: checking Qt version" >&5
+echo $ECHO_N "checking Qt version... $ECHO_C" >&6; }
+     { echo "$as_me:$LINENO: result: $QT_VERSION" >&5
+echo "${ECHO_T}$QT_VERSION" >&6; }
+   else
+     qt_ok=no
+   fi
+fi
+
+#
+# check moc presence (meta-object compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/moc
+  then
+    MOC=${QTDIR}/bin/moc
+  else
+    # Extract the first word of "moc", so it can be a program name with args.
+set dummy moc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MOC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MOC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MOC=$ac_cv_path_MOC
+if test -n "$MOC"; then
+  { echo "$as_me:$LINENO: result: $MOC" >&5
+echo "${ECHO_T}$MOC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+  if test "x$MOC" = "x"
+  then
+    qt_ok=no
+    { echo "$as_me:$LINENO: result: moc (Qt meta-object compiler) is not in the PATH variable" >&5
+echo "${ECHO_T}moc (Qt meta-object compiler) is not in the PATH variable" >&6; }
+  else
+    qt_ok=yes
+    { echo "$as_me:$LINENO: result: moc (Qt meta-object compiler) is found" >&5
+echo "${ECHO_T}moc (Qt meta-object compiler) is found" >&6; }
+  fi
+
+  if test "x$qt_ok" = "xyes"
+  then
+        { echo "$as_me:$LINENO: checking cheching equality Qt and moc tool version" >&5
+echo $ECHO_N "checking cheching equality Qt and moc tool version... $ECHO_C" >&6; }
+    MOC_VERSION=`$MOC -v 2>&1 | awk 'BEGIN{FS="[ ()]"};{print $(NF-1)}'`
+    if test "x$QT_VERSION" = "x$MOC_VERSION"
+    then
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+      qt_ok=yes
+    else
+      { echo "$as_me:$LINENO: result: moc tool and Qt product are incompatible $MOC_VERSION" >&5
+echo "${ECHO_T}moc tool and Qt product are incompatible $MOC_VERSION" >&6; }
+      qt_ok=no
+    fi
+  fi
+fi
+
+#
+# check uic presence (user interface compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/uic
+  then
+    UIC=${QTDIR}/bin/uic
+  else
+    # Extract the first word of "uic", so it can be a program name with args.
+set dummy uic; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_UIC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $UIC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_UIC="$UIC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_UIC="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+UIC=$ac_cv_path_UIC
+if test -n "$UIC"; then
+  { echo "$as_me:$LINENO: result: $UIC" >&5
+echo "${ECHO_T}$UIC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+  if test "x$UIC" = "x"
+  then
+    qt_ok=no
+    { echo "$as_me:$LINENO: result: uic (Qt user interface compiler) is not in the PATH variable" >&5
+echo "${ECHO_T}uic (Qt user interface compiler) is not in the PATH variable" >&6; }
+  else
+    qt_ok=yes
+    { echo "$as_me:$LINENO: result: uic (Qt user interface compiler) is found" >&5
+echo "${ECHO_T}uic (Qt user interface compiler) is found" >&6; }
+  fi
+fi
+
+#
+# check rcc presence (resources compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/rcc
+  then
+    QRCC=${QTDIR}/bin/rcc
+  else
+    # Extract the first word of "rcc", so it can be a program name with args.
+set dummy rcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_QRCC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $QRCC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_QRCC="$QRCC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_QRCC="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+QRCC=$ac_cv_path_QRCC
+if test -n "$QRCC"; then
+  { echo "$as_me:$LINENO: result: $QRCC" >&5
+echo "${ECHO_T}$QRCC" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+  if test "x$QRCC" = "x"
+  then
+    qt_ok=no
+    { echo "$as_me:$LINENO: result: rcc (Qt resources compiler) is not in the PATH variable" >&5
+echo "${ECHO_T}rcc (Qt resources compiler) is not in the PATH variable" >&6; }
+  else
+    qt_ok=yes
+    { echo "$as_me:$LINENO: result: rcc (Qt resources compiler) is found" >&5
+echo "${ECHO_T}rcc (Qt resources compiler) is found" >&6; }
+  fi
+
+  if test "x$qt_ok" = "xyes"
+  then
+        { echo "$as_me:$LINENO: checking cheching equality Qt and rcc tool version" >&5
+echo $ECHO_N "checking cheching equality Qt and rcc tool version... $ECHO_C" >&6; }
+    QRCC_VERSION=`$QRCC -v 2>&1 | awk '{print $NF}'`
+    if test "x$QT_VERSION" = "x$QRCC_VERSION"
+    then
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+      qt_ok=yes
+    else
+      { echo "$as_me:$LINENO: result: rcc tool and Qt product are incompatible" >&5
+echo "${ECHO_T}rcc tool and Qt product are incompatible" >&6; }
+      qt_ok=no
+    fi
+  fi
+fi
+
+#
+# check lrelease presence (translation files compiler)
+#
+if  test "x$qt_ok" = "xyes"
+then
+  if test -f ${QTDIR}/bin/lrelease
+  then
+    LRELEASE=${QTDIR}/bin/lrelease
+  else
+    # Extract the first word of "lrelease", so it can be a program name with args.
+set dummy lrelease; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_LRELEASE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $LRELEASE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LRELEASE="$LRELEASE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_LRELEASE="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+LRELEASE=$ac_cv_path_LRELEASE
+if test -n "$LRELEASE"; then
+  { echo "$as_me:$LINENO: result: $LRELEASE" >&5
+echo "${ECHO_T}$LRELEASE" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  fi
+  if test "x$LRELEASE" = "x"
+  then
+    qt_ok=no
+    { echo "$as_me:$LINENO: result: lrelease (Qt translation files compiler) is not in the PATH variable" >&5
+echo "${ECHO_T}lrelease (Qt translation files compiler) is not in the PATH variable" >&6; }
+  else
+    qt_ok=yes
+    { echo "$as_me:$LINENO: result: lrelease (Qt translation files compiler) is found" >&5
+echo "${ECHO_T}lrelease (Qt translation files compiler) is found" >&6; }
+  fi
+
+  if test "x$qt_ok" = "xyes"
+  then
+        { echo "$as_me:$LINENO: checking equality of Qt and lrelease tool version" >&5
+echo $ECHO_N "checking equality of Qt and lrelease tool version... $ECHO_C" >&6; }
+    LRELEASE_VERSION=`$LRELEASE -version 2>&1 | awk '{print $NF}'`
+    if test "x$QT_VERSION" = "x$LRELEASE_VERSION"
+    then
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+      qt_ok=yes
+    else
+      { echo "$as_me:$LINENO: result: lrelease tool and Qt product are incompatible" >&5
+echo "${ECHO_T}lrelease tool and Qt product are incompatible" >&6; }
+      qt_ok=no
+    fi
+  fi
+fi
+
+QT_ROOT=$QTDIR
+
+#
+# check Qt header files
+#
+if  test "x$qt_ok" = "xyes"
+then
+  { echo "$as_me:$LINENO: checking include Qt header files..." >&5
+echo "$as_me: checking include Qt header files..." >&6;}
+
+  CPPFLAGS_old=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS -I${QTDIR}/include${QTINC} -I${QTDIR}/include${QTINC}/QtCore"
+  if test "${ac_cv_header_QObject+set}" = set; then
+  { echo "$as_me:$LINENO: checking for QObject" >&5
+echo $ECHO_N "checking for QObject... $ECHO_C" >&6; }
+if test "${ac_cv_header_QObject+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_QObject" >&5
+echo "${ECHO_T}$ac_cv_header_QObject" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking QObject usability" >&5
+echo $ECHO_N "checking QObject usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <QObject>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking QObject presence" >&5
+echo $ECHO_N "checking QObject presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <QObject>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: QObject: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: QObject: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: QObject: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: QObject: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: QObject: present but cannot be compiled" >&5
+echo "$as_me: WARNING: QObject: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: QObject:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: QObject:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: QObject: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: QObject: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: QObject:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: QObject:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: QObject: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: QObject: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: QObject: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: QObject: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for QObject" >&5
+echo $ECHO_N "checking for QObject... $ECHO_C" >&6; }
+if test "${ac_cv_header_QObject+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_QObject=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_QObject" >&5
+echo "${ECHO_T}$ac_cv_header_QObject" >&6; }
+
+fi
+if test $ac_cv_header_QObject = yes; then
+  qt_ok=yes
+else
+  qt_ok=no
+fi
+
+
+  CPPFLAGS=$CPPFLAGS_old
+
+  if  test "x$qt_ok" = "xno"
+  then
+    { echo "$as_me:$LINENO: result: qt header files are not found in $QTDIR/include${QTINC}/QtCore" >&5
+echo "${ECHO_T}qt header files are not found in $QTDIR/include${QTINC}/QtCore" >&6; }
+    { echo "$as_me:$LINENO: result: QTDIR environment variable may be wrong (probably too old Qt version)" >&5
+echo "${ECHO_T}QTDIR environment variable may be wrong (probably too old Qt version)" >&6; }
+  else
+    { echo "$as_me:$LINENO: result: qt header files seem to be OK" >&5
+echo "${ECHO_T}qt header files seem to be OK" >&6; }
+    QT_INCLUDES="-I${QTDIR}/include${QTINC}"
+    # user header files
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtCore"
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtGui"
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtOpenGL"
+    QT_INCLUDES="${QT_INCLUDES} -I${QTDIR}/include${QTINC}/QtXml"
+    # not used currently header files (uncomment if required)
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtAssistant"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtDBus"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtDesigner"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtNetwork"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtSql"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtSvg"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtTest"
+    #QT_INCLUDES="${QT_INCLUDES} -I$(QTDIR)/include${QTINC}/QtUiTools"
+
+    QT_ASSISTANT_INCLUDES="${QT_ASSISTANT_INCLUDES} -I${QTDIR}/include${QTINC}/QtAssistant"
+    QT_ASSISTANT_INCLUDES="${QT_ASSISTANT_INCLUDES} -I${QTDIR}/include${QTINC}/QtNetwork"
+
+    # this flag is obsolete with Qt 4
+    QT_MT_INCLUDES="$QT_INCLUDES"
+  fi
+fi
+
+#
+# test Qt libraries
+#
+if  test "x$qt_ok" = "xyes"
+then
+  { echo "$as_me:$LINENO: checking linking against Qt library" >&5
+echo $ECHO_N "checking linking against Qt library... $ECHO_C" >&6; }
+
+  CXXFLAGS_old=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS $QT_INCLUDES"
+
+  LIBS_old=$LIBS
+  if test "x$QTDIR" = "x/usr" ; then
+    QT_LIB_DIR=""
+  elif test -d ${QTDIR}/lib; then
+    QT_LIB_DIR="-L$QTDIR/lib"
+  elif test -d ${QTDIR}/lib64; then
+    QT_LIB_DIR="-L$QTDIR/lib64"
+  elif test "x$QTDIR" = "x/usr/lib/qt4" ; then
+    QT_LIB_DIR=""
+  else
+    { { echo "$as_me:$LINENO: error: Can't detect of Qt library directory " >&5
+echo "$as_me: error: Can't detect of Qt library directory " >&2;}
+   { (exit 1); exit 1; }; }
+    qt_ok=no
+  fi
+  LIBS="$LIBS $QT_LIB_DIR -lQtCore"
+
+  if test "${salome_cv_lib_qt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <QCoreApplication>
+
+int
+main ()
+{
+int n;
+    char **s;
+    QCoreApplication a(n, s);
+    a.exec();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  eval "salome_cv_lib_qt=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "salome_cv_lib_qt=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+  qt_ok="$salome_cv_lib_qt"
+
+  # BEGIN: for CCRT (installation of qt have only a "lib" directory)
+  if  test "x$qt_ok" = "xno"
+  then
+    QT_LIB_DIR="-L$QTDIR/lib"
+    LIBS="$LIBS_old $QT_LIB_DIR -lQtCore"
+
+    if test "${salome_cv_lib_qt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <QCoreApplication>
+
+int
+main ()
+{
+int n;
+      char **s;
+      QCoreApplication a(n, s);
+      a.exec();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  eval "salome_cv_lib_qt=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "salome_cv_lib_qt=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+    qt_ok="$salome_cv_lib_qt"
+  fi
+  # END: for CCRT
+
+  if  test "x$qt_ok" = "xno"
+  then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    { echo "$as_me:$LINENO: result: unable to link with qt library" >&5
+echo "${ECHO_T}unable to link with qt library" >&6; }
+    { echo "$as_me:$LINENO: result: QTDIR environment variable may be wrong (probably too old Qt version)" >&5
+echo "${ECHO_T}QTDIR environment variable may be wrong (probably too old Qt version)" >&6; }
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    # core libs
+    QT_CORE_LIBS="$QT_LIB_DIR -lQtCore -lQtXml"
+    # gui libs
+    QT_GUI_LIBS="$QT_LIB_DIR -lQtGui -lQtOpenGL"
+    # other libs (currently not used)
+    QT_OTHER_LIBS="$QT_LIB_DIR"
+    # other libs (can be used if necessary)
+    #QT_OTHER_LIBS="$QT_LIB_DIR -lQt3Support -lQtAssistantClient -lQtDesigner -lQtNetwork -lQtSql -lQtSvg -lQtTest -ltQtUiTools"
+    QT_ASSISTANT_LIBS="$QT_LIB_DIR -lQtAssistantClient -lQtNetwork"
+    # all libs
+    QT_LIBS="$QT_CORE_LIBS $QT_GUI_LIBS $QT_OTHER_LIBS"
+    # this flag is obsolete with Qt 4
+    QT_MT_LIBS="$QT_LIBS"
+  fi
+  LIBS=$LIBS_old
+  CXXFLAGS=$CXXFLAGS_old
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: result: for Qt: $qt_ok" >&5
+echo "${ECHO_T}for Qt: $qt_ok" >&6; }
+
+# Save cache
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+
+
+echo
+echo ---------------------------------------------
+echo BOOST Library
+echo ---------------------------------------------
+echo
+
+
+
+{ echo "$as_me:$LINENO: checking for BOOST Library..." >&5
+echo "$as_me: checking for BOOST Library..." >&6;}
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+BOOST_CPPFLAGS=""
+BOOST_LIBSUFFIX="-mt"
+BOOST_LIBS=""
+
+{ echo "$as_me:$LINENO: checking for BOOST location..." >&5
+echo "$as_me: checking for BOOST location..." >&6;}
+
+# Check whether --with-boost was given.
+if test "${with_boost+set}" = set; then
+  withval=$with_boost; BOOSTDIR="$withval"
+    { echo "$as_me:$LINENO: result: \"select $withval as path to BOOST library\"" >&5
+echo "${ECHO_T}\"select $withval as path to BOOST library\"" >&6; }
+
+fi
+
+
+if test "x${BOOSTDIR}" = "x" ; then
+  BOOSTDIR="/usr"
+fi
+
+{ echo "$as_me:$LINENO: result: \$BOOSTDIR = ${BOOSTDIR}" >&5
+echo "${ECHO_T}\$BOOSTDIR = ${BOOSTDIR}" >&6; }
+
+CPPFLAGS_old="${CPPFLAGS}"
+LIBS_old=$LIBS
+
+if test "x${BOOSTDIR}" != "x" ; then
+  BOOST_CPPFLAGS="-I${BOOSTDIR}/include"
+  BOOST_LIBS="-L${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}"
+fi
+
+if test "x${BOOSTDIR}" = "x/usr" ; then
+  BOOST_CPPFLAGS=""
+  BOOST_LIBS=""
+fi
+
+boost_ok=no
+boost_headers_ok=no
+boost_binaries_ok=no
+
+{ echo "$as_me:$LINENO: checking for BOOST headers..." >&5
+echo "$as_me: checking for BOOST headers..." >&6;}
+CPPFLAGS="${CPPFLAGS_old} ${BOOST_CPPFLAGS}"
+
+boost_include_dir_ok=yes
+if test "x${BOOSTDIR}" != "x" ; then
+  as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/include/boost/shared_ptr.hpp" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/include/boost/shared_ptr.hpp" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/include/boost/shared_ptr.hpp... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/include/boost/shared_ptr.hpp"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  boost_include_dir_ok=yes
+else
+  boost_include_dir_ok=no
+fi
+
+fi
+
+BOOST_PROGRAM_OPTIONS_LIB=no
+if test "x${boost_include_dir_ok}" = "xyes" ; then
+  as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/include/boost/program_options.hpp" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/include/boost/program_options.hpp" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/include/boost/program_options.hpp... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/include/boost/program_options.hpp"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  BOOST_PROGRAM_OPTIONS_LIB=yes
+else
+  BOOST_PROGRAM_OPTIONS_LIB=no
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: for boost program_options tool: $BOOST_PROGRAM_OPTIONS_LIB" >&5
+echo "${ECHO_T}for boost program_options tool: $BOOST_PROGRAM_OPTIONS_LIB" >&6; }
+
+if test "x${boost_include_dir_ok}" = "xyes" ; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <boost/shared_ptr.hpp>
+int
+main ()
+{
+boost::shared_ptr<int>(new int)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  boost_headers_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       boost_headers_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "x${boost_headers_ok}" = "xno" ; then
+  BOOST_CPPFLAGS="BOOST_CPPFLAGS_NOT_DEFINED"
+else
+  { echo "$as_me:$LINENO: result: \$BOOST_CPPFLAGS = ${BOOST_CPPFLAGS}" >&5
+echo "${ECHO_T}\$BOOST_CPPFLAGS = ${BOOST_CPPFLAGS}" >&6; }
+fi
+{ echo "$as_me:$LINENO: result: for boost headers: $boost_headers_ok" >&5
+echo "${ECHO_T}for boost headers: $boost_headers_ok" >&6; }
+
+if test "x${boost_headers_ok}" = "xyes" ; then
+    { echo "$as_me:$LINENO: checking for BOOST binaries..." >&5
+echo "$as_me: checking for BOOST binaries..." >&6;}
+  boost_lib_dir_ok=yes
+  if test "x${BOOSTDIR}" != "x" ; then
+    as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  boost_lib_dir_ok=yes
+else
+  boost_lib_dir_ok=no
+fi
+
+    if test "x${boost_lib_dir_ok}" = "xno" ; then
+      BOOST_LIBSUFFIX=""
+      as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  boost_lib_dir_ok=yes
+else
+  boost_lib_dir_ok=no
+fi
+
+    fi
+  fi
+  if test "x${boost_lib_dir_ok}" = "xyes" ; then
+    LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <boost/thread/thread.hpp>
+int
+main ()
+{
+struct TBody{ void operator()(){} }; boost::thread(TBody())
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  boost_binaries_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       boost_binaries_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    if test "x${boost_binaries_ok}" = "xno" ; then
+      BOOST_LIBSUFFIX=""
+      LIBS="${LIBS_old} ${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <boost/thread/thread.hpp>
+int
+main ()
+{
+struct TBody{ void operator()(){} }; boost::thread(TBody())
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  boost_binaries_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       boost_binaries_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+    fi
+  fi
+fi
+
+if test "x${boost_binaries_ok}" = "xno" ; then
+  BOOST_LIBS="BOOST_LIBS_NOT_FOUND"
+  BOOST_LIBSUFFIX="-not-defined"
+else
+  { echo "$as_me:$LINENO: result: \$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX}" >&5
+echo "${ECHO_T}\$BOOST_LIBSUFFIX = ${BOOST_LIBSUFFIX}" >&6; }
+  { echo "$as_me:$LINENO: result: \$BOOST_LIBS = ${BOOST_LIBS}" >&5
+echo "${ECHO_T}\$BOOST_LIBS = ${BOOST_LIBS}" >&6; }
+  as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_thread${BOOST_LIBSUFFIX}.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  BOOST_LIB_THREAD="${BOOST_LIBS} -lboost_thread${BOOST_LIBSUFFIX}"
+else
+  BOOST_LIB_THREAD=""
+fi
+
+  as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_signals${BOOST_LIBSUFFIX}.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  BOOST_LIB_SIGNALS="${BOOST_LIBS} -lboost_signals${BOOST_LIBSUFFIX}"
+else
+  BOOST_LIB_SIGNALS=""
+fi
+
+  as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_system${BOOST_LIBSUFFIX}.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  BOOST_LIB_SYSTEM="${BOOST_LIBS} -lboost_system${BOOST_LIBSUFFIX}"
+else
+  BOOST_LIB_SYSTEM=""
+fi
+
+  as_ac_File=`echo "ac_cv_file_${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so" >&5
+echo $ECHO_N "checking for ${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${BOOSTDIR}/lib${LIB_LOCATION_SUFFIX}/libboost_regex${BOOST_LIBSUFFIX}.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  BOOST_LIB_REGEX="${BOOST_LIBS} -lboost_regex${BOOST_LIBSUFFIX}"
+else
+  BOOST_LIB_REGEX=""
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: for boost binaries: $boost_binaries_ok" >&5
+echo "${ECHO_T}for boost binaries: $boost_binaries_ok" >&6; }
+
+CPPFLAGS="${CPPFLAGS_old}"
+LIBS="${LIBS_old}"
+
+if test "x${boost_headers_ok}" = "xyes" ; then
+  if test "x${boost_binaries_ok}" = "xyes" ; then
+    boost_ok=yes
+  fi
+fi
+
+{ echo "$as_me:$LINENO: result: for boost: $boost_ok" >&5
+echo "${ECHO_T}for boost: $boost_ok" >&6; }
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing OpenCascade
+echo ---------------------------------------------
+echo
+
+
+
+{ echo "$as_me:$LINENO: checking for OpenCascade..." >&5
+echo "$as_me: checking for OpenCascade..." >&6;}
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+CAS_CPPFLAGS=""
+CAS_CXXFLAGS=""
+CAS_LDFLAGS=""
+occ_ok=no
+config_h=no
+
+case $host_os in
+   linux*)
+      casdir=Linux
+      ;;
+   freebsd*)
+      casdir=Linux
+      ;;
+   irix5.*)
+      casdir=Linux
+      ;;
+   irix6.*)
+      casdir=Linux
+      ;;
+   osf*)
+      casdir=Linux
+      ;;
+   solaris2.*)
+      casdir=Linux
+      ;;
+   *)
+      casdir=Linux
+      ;;
+esac
+
+{ echo "$as_me:$LINENO: checking for OpenCascade directories" >&5
+echo $ECHO_N "checking for OpenCascade directories... $ECHO_C" >&6; }
+
+if test -z "$CASROOT"; then
+  { echo "$as_me:$LINENO: result: CASROOT not defined" >&5
+echo "${ECHO_T}CASROOT not defined" >&6; }
+  for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
+    if test -f $d/libTKernel.so ; then
+      { echo "$as_me:$LINENO: result: libTKernel.so detected in $d" >&5
+echo "${ECHO_T}libTKernel.so detected in $d" >&6; }
+      CASROOT=$d
+      CASROOT=`echo ${CASROOT} | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+      break
+    fi
+  done
+fi
+
+if test -d ${CASROOT}/${casdir}/lib; then
+  CAS_LDPATH="-L$CASROOT/$casdir/lib "
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  if test -d ${CASROOT}/lib; then
+    CAS_LDPATH="-L$CASROOT/lib "
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  else
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+fi
+
+
+if test -z "$CASROOT"; then
+  { echo "$as_me:$LINENO: WARNING: You must provide CASROOT variable : see OCC installation manual" >&5
+echo "$as_me: WARNING: You must provide CASROOT variable : see OCC installation manual" >&2;}
+else
+  occ_ok=yes
+  OCC_VERSION_MAJOR=0
+  OCC_VERSION_MINOR=0
+  OCC_VERSION_MAINTENANCE=0
+  ff=$CASROOT/inc/Standard_Version.hxx
+  if test -f $ff ; then
+    grep "define OCC_VERSION_MAJOR" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MAJOR=`grep "define OCC_VERSION_MAJOR" $ff | awk '{i=3 ; print $i}'`
+    fi
+    grep "define OCC_VERSION_MINOR" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MINOR=`grep "define OCC_VERSION_MINOR" $ff | awk '{i=3 ; print $i}'`
+    fi
+    grep "define OCC_VERSION_MAINTENANCE" $ff > /dev/null
+    if test $? = 0 ; then
+      OCC_VERSION_MAINTENANCE=`grep "define OCC_VERSION_MAINTENANCE" $ff | awk '{i=3 ; print $i}'`
+    fi
+  fi
+fi
+
+if test "x$occ_ok" = "xyes"; then
+
+  for opt in -funsigned-char -unsigned ; do
+
+  { echo "$as_me:$LINENO: checking wether $CXX accepts $opt" >&5
+echo $ECHO_N "checking wether $CXX accepts $opt... $ECHO_C" >&6; }
+  cat > conftest.cxx <<EOF
+int main() { return 0; }
+EOF
+  $CXX $opt conftest.cxx > conftest.log 2>&1
+  var=`echo $opt | sed -e "s, .*$,," | sed -e "s,^-,,"`
+#CCRT  if ! grep -e $var conftest.log > /dev/null 2>&1 ; then
+  if grep -e $var conftest.log > /dev/null 2>&1 ; then
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    eval flag=no
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    CAS_CXXFLAGS="${CAS_CXXFLAGS} $opt"
+    eval flag=yes
+  fi
+
+    if test "$flag" = "yes"; then
+      break
+    fi
+  done
+
+
+  CPPFLAGS_old="$CPPFLAGS"
+case $host_os in
+   linux*)
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H"
+
+      OCC_VERSION_STRING="$OCC_VERSION_MAJOR.$OCC_VERSION_MINOR.$OCC_VERSION_MAINTENANCE"
+      case $OCC_VERSION_STRING in
+        [0-5].* | 6.0.* | 6.1.0) # catch versions < 6.1.1
+          CAS_CPPFLAGS="$CAS_CPPFLAGS -DNO_CXX_EXCEPTION"
+          ;;
+        *)
+          CAS_CPPFLAGS="$CAS_CPPFLAGS -DOCC_CONVERT_SIGNALS"
+          ;;
+      esac
+      CAS_CPPFLAGS="$CAS_CPPFLAGS -I$CASROOT/inc"
+      ;;
+   osf*)
+      CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DOCC_VERSION_MINOR=$OCC_VERSION_MINOR -DOCC_VERSION_MAINTENANCE=$OCC_VERSION_MAINTENANCE -DLIN -DLINTEL -DCSFDB -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_WOK_CONFIG_H -I$CASROOT/inc"
+      ;;
+esac
+  CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS"
+
+  echo
+  echo testing config.h
+
+  if test "${ac_cv_header_config_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for config.h" >&5
+echo $ECHO_N "checking for config.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_config_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_config_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking config.h usability" >&5
+echo $ECHO_N "checking config.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <config.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking config.h presence" >&5
+echo $ECHO_N "checking config.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <config.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: config.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: config.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: config.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: config.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: config.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: config.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: config.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: config.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: config.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: config.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: config.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: config.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: config.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for config.h" >&5
+echo $ECHO_N "checking for config.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_config_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_config_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_config_h" >&6; }
+
+fi
+if test $ac_cv_header_config_h = yes; then
+  config_h=yes
+else
+
+       echo "config.h file not found!"
+
+fi
+
+
+
+  if test "x$config_h" = xno ; then
+      { echo "$as_me:$LINENO: WARNING: config.h file not found" >&5
+echo "$as_me: WARNING: config.h file not found" >&2;}
+              else
+      { echo "$as_me:$LINENO: result: config.h file ok" >&5
+echo "${ECHO_T}config.h file ok" >&6; }
+  fi
+
+  if test "${ac_cv_header_Standard_Type_hxx+set}" = set; then
+  { echo "$as_me:$LINENO: checking for Standard_Type.hxx" >&5
+echo $ECHO_N "checking for Standard_Type.hxx... $ECHO_C" >&6; }
+if test "${ac_cv_header_Standard_Type_hxx+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_Standard_Type_hxx" >&5
+echo "${ECHO_T}$ac_cv_header_Standard_Type_hxx" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking Standard_Type.hxx usability" >&5
+echo $ECHO_N "checking Standard_Type.hxx usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <Standard_Type.hxx>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking Standard_Type.hxx presence" >&5
+echo $ECHO_N "checking Standard_Type.hxx presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <Standard_Type.hxx>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: Standard_Type.hxx: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: Standard_Type.hxx: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx: present but cannot be compiled" >&5
+echo "$as_me: WARNING: Standard_Type.hxx: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: Standard_Type.hxx:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: Standard_Type.hxx: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: Standard_Type.hxx:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: Standard_Type.hxx: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: Standard_Type.hxx: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: Standard_Type.hxx: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for Standard_Type.hxx" >&5
+echo $ECHO_N "checking for Standard_Type.hxx... $ECHO_C" >&6; }
+if test "${ac_cv_header_Standard_Type_hxx+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_Standard_Type_hxx=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_Standard_Type_hxx" >&5
+echo "${ECHO_T}$ac_cv_header_Standard_Type_hxx" >&6; }
+
+fi
+if test $ac_cv_header_Standard_Type_hxx = yes; then
+  occ_ok=yes
+else
+  occ_ok=no
+fi
+
+
+
+fi
+
+if test "x$occ_ok" = xyes ; then
+
+  { echo "$as_me:$LINENO: checking for OpenCascade libraries" >&5
+echo $ECHO_N "checking for OpenCascade libraries... $ECHO_C" >&6; }
+
+  LIBS_old="$LIBS"
+  LIBS="$LIBS $CAS_LDPATH -lTKernel"
+
+  if test "${salome_cv_lib_occ+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <TCollection_AsciiString.hxx>
+
+int
+main ()
+{
+TCollection_AsciiString aStr ("toto");
+    aStr.Capitalize();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  eval "salome_cv_lib_occ=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "salome_cv_lib_occ=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+  occ_ok="$salome_cv_lib_occ"
+
+fi
+CPPFLAGS="$CPPFLAGS_old"
+LIBS="$LIBS_old"
+
+if test "x$occ_ok" = xno ; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  { echo "$as_me:$LINENO: WARNING: Opencascade libraries not found" >&5
+echo "$as_me: WARNING: Opencascade libraries not found" >&2;}
+else
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  CAS_KERNEL="$CAS_LDPATH -lTKernel"
+  CAS_MATH="$CAS_LDPATH -lTKMath"
+
+  if test -f $CASROOT/$casdir/lib/libStdPlugin.so ; then
+    # this libraries are only for CASCADE 5.2.3
+    CAS_STDPLUGIN="StdPlugin"
+  fi
+
+  CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKernel -lTKCDF -lTKLCAF -lTKPCAF -lTKStdSchema"
+  CAS_OCAFVIS="$CAS_LDPATH -lTKCAF -lStdPlugin -lStdLPlugin -lTKPLCAF -lTKPShape -lTKStdLSchema -lTKShapeSchema"
+
+  CAS_TKV3d="$CAS_LDPATH -lTKV3d"
+  CAS_VIEWER="$CAS_TKV3d -lTKService"
+
+  CAS_TKBRep="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep"
+
+  CAS_TKTopAlgo="$CAS_TKBRep -lTKGeomAlgo -lTKTopAlgo"
+  CAS_TKPrim="$CAS_TKTopAlgo -lTKPrim"
+
+  CAS_MODELER="$CAS_TKPrim -lTKBO -lTKBool -lTKHLR -lTKFillet -lTKOffset -lTKFeat"
+
+  CAS_DATAEXCHANGE="$CAS_LDPATH -lTKIGES -lTKSTEP"
+
+  CAS_LDFLAGS="$CAS_KERNEL $CAS_MATH $CAS_OCAF $CAS_OCAFVIS $CAS_VIEWER $CAS_MODELER $CAS_DATAEXCHANGE"
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+echo
+echo ---------------------------------------------
+echo testing omniORB
+echo ---------------------------------------------
+echo
+
+
+
+{ echo "$as_me:$LINENO: checking for omniORB..." >&5
+echo "$as_me: checking for omniORB..." >&6;}
+omniORB_ok=yes
+
+if test "x$PYTHON" = "x"
+then
+
+  python_ok=yes
+
+
+# Check whether --with-python was given.
+if test "${with_python+set}" = set; then
+  withval=$with_python; PYTHON="$withval/bin/python"
+    { echo "$as_me:$LINENO: result: \"select python distribution in $withval\"" >&5
+echo "${ECHO_T}\"select python distribution in $withval\"" >&6; }
+
+else
+
+    # Extract the first word of "python", so it can be a program name with args.
+set dummy python; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PYTHON+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PYTHON in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON=$ac_cv_path_PYTHON
+if test -n "$PYTHON"; then
+  { echo "$as_me:$LINENO: result: $PYTHON" >&5
+echo "${ECHO_T}$PYTHON" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+fi
+
+
+  { echo "$as_me:$LINENO: checking local Python configuration..." >&5
+echo "$as_me: checking local Python configuration..." >&6;}
+
+
+  PYTHON_PREFIX=`echo $PYTHON | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+  PYTHON_PREFIX=`echo $PYTHON_PREFIX | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+  PYTHONHOME=$PYTHON_PREFIX
+
+
+
+
+    PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
+
+
+  PY_MAKEFILE=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/Makefile
+  if test ! -f "$PY_MAKEFILE"; then
+     { echo "$as_me:$LINENO: WARNING: *** Couldn't find ${PY_MAKEFILE}.  Maybe you are
+*** missing the development portion of the python installation" >&5
+echo "$as_me: WARNING: *** Couldn't find ${PY_MAKEFILE}.  Maybe you are
+*** missing the development portion of the python installation" >&2;}
+     python_ok=no
+  fi
+
+
+
+
+  PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
+  PYTHON_LIBS="-L${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
+  PYTHON_LIB=$PYTHON_LIBS
+  PYTHON_LIBA=${PYTHON_PREFIX}/lib${LIB_LOCATION_SUFFIX}/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a
+
+
+
+  PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"`
+
+
+
+# Check whether --with-python-site was given.
+if test "${with_python_site+set}" = set; then
+  withval=$with_python_site;
+
+   PYTHON_SITE="$withval"
+    python_site_given=yes
+else
+  PYTHON_SITE=${prefix}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
+    python_site_given=no
+fi
+
+
+
+  PYTHON_SITE_PACKAGE=$PYTHON_SITE/$PACKAGE
+
+
+
+
+
+# Check whether --with-python-site-exec was given.
+if test "${with_python_site_exec+set}" = set; then
+  withval=$with_python_site_exec; PYTHON_SITE_EXEC="$withval"
+else
+  if test "$python_site_given" = yes; then
+       PYTHON_SITE_EXEC=$PYTHON_SITE
+     else
+       PYTHON_SITE_EXEC=${PYTHON_EXEC_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/site-packages
+     fi
+fi
+
+
+    PYTHON_SITE_INSTALL=$PYTHON_SITE_PACKAGE
+
+
+
+  pythondir=${PYTHON_PREFIX}"/lib${LIB_LOCATION_SUFFIX}/python"${PYTHON_VERSION}/
+
+
+ { echo "$as_me:$LINENO: checking if we need libdb" >&5
+echo $ECHO_N "checking if we need libdb... $ECHO_C" >&6; }
+ PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U`
+  if test "x$PY_NEEDOPENDB" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for dbopen in -ldb" >&5
+echo $ECHO_N "checking for dbopen in -ldb... $ECHO_C" >&6; }
+if test "${ac_cv_lib_db_dbopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dbopen ();
+int
+main ()
+{
+return dbopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_db_dbopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_db_dbopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbopen" >&5
+echo "${ECHO_T}$ac_cv_lib_db_dbopen" >&6; }
+if test $ac_cv_lib_db_dbopen = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -ldb"
+else
+  db_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+ { echo "$as_me:$LINENO: checking if we need libdl" >&5
+echo $ECHO_N "checking if we need libdl... $ECHO_C" >&6; }
+  PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U`
+  if test "x$PY_NEEDOPENDL" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -ldl"
+else
+  dl_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+ { echo "$as_me:$LINENO: checking if we need libutil" >&5
+echo $ECHO_N "checking if we need libutil... $ECHO_C" >&6; }
+  PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U`
+  if test "x$PY_NEEDOPENPTY" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
+if test "${ac_cv_lib_util_openpty+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char openpty ();
+int
+main ()
+{
+return openpty ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_util_openpty=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_util_openpty=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
+echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
+if test $ac_cv_lib_util_openpty = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -lutil"
+else
+  openpty_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+ { echo "$as_me:$LINENO: checking if we need tcltk" >&5
+echo $ECHO_N "checking if we need tcltk... $ECHO_C" >&6; }
+  PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U`
+  if test "x$PY_NEEDTCLTK" != "x"; then
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     { echo "$as_me:$LINENO: checking for Tcl_Init in -ltcl" >&5
+echo $ECHO_N "checking for Tcl_Init in -ltcl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_tcl_Tcl_Init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltcl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char Tcl_Init ();
+int
+main ()
+{
+return Tcl_Init ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_tcl_Tcl_Init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_tcl_Tcl_Init=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_tcl_Tcl_Init" >&5
+echo "${ECHO_T}$ac_cv_lib_tcl_Tcl_Init" >&6; }
+if test $ac_cv_lib_tcl_Tcl_Init = yes; then
+  PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk"
+else
+  tclinit_ok=no
+fi
+
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+  if test "$python_ok" == "yes"; then
+      { echo "$as_me:$LINENO: result: looks good" >&5
+echo "${ECHO_T}looks good" >&6; }
+  fi
+
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+# Extract the first word of "omniidl", so it can be a program name with args.
+set dummy omniidl; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_OMNIORB_IDL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $OMNIORB_IDL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_OMNIORB_IDL="$OMNIORB_IDL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_OMNIORB_IDL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+OMNIORB_IDL=$ac_cv_path_OMNIORB_IDL
+if test -n "$OMNIORB_IDL"; then
+  { echo "$as_me:$LINENO: result: $OMNIORB_IDL" >&5
+echo "${ECHO_T}$OMNIORB_IDL" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test "x$OMNIORB_IDL" = "x"
+then
+  omniORB_ok=no
+  { echo "$as_me:$LINENO: result: omniORB binaries not in PATH variable" >&5
+echo "${ECHO_T}omniORB binaries not in PATH variable" >&6; }
+else
+  omniORB_ok=yes
+fi
+
+if  test "x$omniORB_ok" = "xyes"
+then
+
+
+  OMNIORB_BIN=`echo ${OMNIORB_IDL} | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+  OMNIORB_ROOT=${OMNIORB_BIN}
+  # one-level up
+  OMNIORB_ROOT=`echo ${OMNIORB_ROOT}  | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+  #
+  #
+  if test -d $OMNIORB_ROOT/include ; then
+    # if $OMNIORB_ROOT/include exists, there are a lot of chance that
+    # this is omniORB4.x installed via configure && make && make install
+    OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin\$,lib,"`
+    OMNIORB_VERSION=4
+  else
+    # omniORB has been installed old way
+    OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin/,lib/,"`
+    # one-level up again
+    OMNIORB_ROOT=`echo ${OMNIORB_ROOT}  | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+    if test -d $OMNIORB_ROOT/include/omniORB4 ; then
+      OMNIORB_VERSION=4
+    else
+      OMNIORB_VERSION=3
+    fi
+  fi
+
+
+  OMNIORB_INCLUDES="-I$OMNIORB_ROOT/include -I$OMNIORB_ROOT/include/omniORB${OMNIORB_VERSION} -I$OMNIORB_ROOT/include/COS"
+
+
+
+
+
+if test x"$enable_pthreads_done" != xyes; then
+  if test x"$acx_pthread_ok" = xyes; then
+    CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+    LIBS="$LIBS $PTHREAD_LIBS"
+    threads_ok=yes
+  else
+    threads_ok=no
+  fi
+  enable_pthreads_done=yes
+fi
+
+
+  OMNIORB_CXXFLAGS="-DOMNIORB_VERSION=$OMNIORB_VERSION"
+  case $build_cpu in
+    sparc*)
+      # AC_DEFINE(__sparc__)
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sparc__"
+      ;;
+   *86*)
+      # AC_DEFINE(__x86__)
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__x86__"
+      ;;
+  esac
+  case $build_os in
+    osf*)
+      # AC_DEFINE(__osf1__)
+      __OSVERSION__=5
+
+cat >>confdefs.h <<\_ACEOF
+#define __OSVERSION__ 5
+_ACEOF
+
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__osf1__"
+      ;;
+    solaris*)
+      # AC_DEFINE(__sunos__)
+      __OSVERSION__=5
+
+cat >>confdefs.h <<\_ACEOF
+#define __OSVERSION__ 5
+_ACEOF
+
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sunos__"
+      ;;
+   linux*)
+      # AC_DEFINE(__linux__)
+      __OSVERSION__=2
+
+cat >>confdefs.h <<\_ACEOF
+#define __OSVERSION__ 2
+_ACEOF
+
+      OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__linux__"
+      ;;
+  esac
+
+
+  CPPFLAGS_old=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  if test "${ac_cv_header_CORBA_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for CORBA.h" >&5
+echo $ECHO_N "checking for CORBA.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_CORBA_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_CORBA_h" >&5
+echo "${ECHO_T}$ac_cv_header_CORBA_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking CORBA.h usability" >&5
+echo $ECHO_N "checking CORBA.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <CORBA.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking CORBA.h presence" >&5
+echo $ECHO_N "checking CORBA.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <CORBA.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: CORBA.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: CORBA.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: CORBA.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: CORBA.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: CORBA.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: CORBA.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: CORBA.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: CORBA.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: CORBA.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: CORBA.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: CORBA.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: CORBA.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: CORBA.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: CORBA.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: CORBA.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: CORBA.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for CORBA.h" >&5
+echo $ECHO_N "checking for CORBA.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_CORBA_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_CORBA_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_CORBA_h" >&5
+echo "${ECHO_T}$ac_cv_header_CORBA_h" >&6; }
+
+fi
+if test $ac_cv_header_CORBA_h = yes; then
+  omniORB_ok="yes"
+else
+  omniORB_ok="no"
+fi
+
+
+
+  CPPFLAGS=$CPPFLAGS_old
+
+fi
+
+if test "x$omniORB_ok" = "xyes"
+then
+  if test "x$OMNIORB_LIB" = "x/usr/lib"
+  then
+    OMNIORB_LDFLAGS=""
+    OMNIORB_RFLAGS=""
+  else
+    OMNIORB_LDFLAGS="-L$OMNIORB_LIB"
+    OMNIORB_RFLAGS="-R$OMNIORB_LIB"
+  fi
+
+  LIBS_old=$LIBS
+  LIBS="$LIBS $OMNIORB_LDFLAGS -lomnithread"
+
+  CXXFLAGS_old=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+
+  { echo "$as_me:$LINENO: checking whether we can link with omnithreads" >&5
+echo $ECHO_N "checking whether we can link with omnithreads... $ECHO_C" >&6; }
+  if test "${salome_cv_lib_omnithreads+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <omnithread.h>
+
+int
+main ()
+{
+omni_mutex my_mutex
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  eval "salome_cv_lib_omnithreads=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "salome_cv_lib_omnithreads=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+
+  omniORB_ok="$salome_cv_lib_omnithreads"
+  if  test "x$omniORB_ok" = "xno"
+  then
+    { echo "$as_me:$LINENO: result: omnithreads not found" >&5
+echo "${ECHO_T}omnithreads not found" >&6; }
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  fi
+
+  LIBS=$LIBS_old
+  CXXFLAGS=$CXXFLAGS_old
+fi
+
+
+if test "x$omniORB_ok" = "xyes"
+then
+
+  { echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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_socket_socket=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_socket_socket=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
+if test $ac_cv_lib_socket_socket = yes; then
+  LIBS="-lsocket $LIBS"
+fi
+
+  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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_nsl_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_nsl_gethostbyname=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+  LIBS="-lnsl $LIBS"
+fi
+
+
+  LIBS_old=$LIBS
+  OMNIORB_LIBS="$OMNIORB_LDFLAGS"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lomniORB${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lomniDynamic${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lCOS${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lCOSDynamic${OMNIORB_VERSION}"
+  OMNIORB_LIBS="$OMNIORB_LIBS -lomnithread"
+  OMNIORB_LIBS="$OMNIORB_LIBS ${OMNIORB_RFLAGS}"
+  if test $OMNIORB_VERSION = 3 ; then
+    OMNIORB_LIBS="$OMNIORB_LIBS -ltcpwrapGK"
+  fi
+
+
+  LIBS="$OMNIORB_LIBS $LIBS"
+  CXXFLAGS_old=$CXXFLAGS
+  CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+
+  { echo "$as_me:$LINENO: checking whether we can link with omniORB" >&5
+echo $ECHO_N "checking whether we can link with omniORB... $ECHO_C" >&6; }
+  if test "${salome_cv_lib_omniorb+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <CORBA.h>
+
+int
+main ()
+{
+CORBA::ORB_var orb
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  eval "salome_cv_lib_omniorb3=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       eval "salome_cv_lib_omniorb3=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+  omniORB_ok="$salome_cv_lib_omniorb3"
+
+  omniORB_ok=yes
+  if test "x$omniORB_ok" = "xno"
+  then
+    { echo "$as_me:$LINENO: result: omniORB library linking failed" >&5
+echo "${ECHO_T}omniORB library linking failed" >&6; }
+    omniORB_ok=no
+  else
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  fi
+  LIBS="$LIBS_old"
+  CXXFLAGS=$CXXFLAGS_old
+fi
+
+
+if test "x$omniORB_ok" = "xyes"
+then
+
+  OMNIORB_IDLCXXFLAGS="-Wba -nf -I${OMNIORB_ROOT}/idl"
+  OMNIORB_IDLPYFLAGS_1='-bpython'
+  OMNIORB_IDLPYFLAGS_2=" -I${OMNIORB_ROOT}/idl"
+  OMNIORB_IDLPYFLAGS=${OMNIORB_IDLPYFLAGS_1}${OMNIORB_IDLPYFLAGS_2}
+
+
+
+
+  OMNIORB_IDL_CLN_H=.hh
+  OMNIORB_IDL_CLN_CXX=SK.cc
+  OMNIORB_IDL_CLN_OBJ=SK.o
+
+
+
+
+  OMNIORB_IDL_SRV_H=.hh
+  OMNIORB_IDL_SRV_CXX=SK.cc
+  OMNIORB_IDL_SRV_OBJ=SK.o
+
+
+
+
+  OMNIORB_IDL_TIE_H=
+  OMNIORB_IDL_TIE_CXX=
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define OMNIORB
+_ACEOF
+
+
+  CORBA_HAVE_POA=1
+
+cat >>confdefs.h <<\_ACEOF
+#define CORBA_HAVE_POA
+_ACEOF
+
+
+  CORBA_ORB_INIT_HAVE_3_ARGS=1
+
+cat >>confdefs.h <<\_ACEOF
+#define CORBA_ORB_INIT_HAVE_3_ARGS
+_ACEOF
+
+  CORBA_ORB_INIT_THIRD_ARG='"omniORB"'
+
+cat >>confdefs.h <<\_ACEOF
+#define CORBA_ORB_INIT_THIRD_ARG
+_ACEOF
+
+
+fi
+
+omniORBpy_ok=no
+if  test "x$omniORB_ok" = "xyes"
+then
+  { echo "$as_me:$LINENO: checking omniORBpy" >&5
+echo $ECHO_N "checking omniORBpy... $ECHO_C" >&6; }
+  $PYTHON -c "import omniORB" &> /dev/null
+  if test $? = 0 ; then
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    omniORBpy_ok=yes
+  else
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    omniORBpy_ok=no
+  fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: for omniORBpy: $omniORBpy_ok" >&5
+echo "${ECHO_T}for omniORBpy: $omniORBpy_ok" >&6; }
+{ echo "$as_me:$LINENO: result: for omniORB: $omniORB_ok" >&5
+echo "${ECHO_T}for omniORB: $omniORB_ok" >&6; }
+
+# Save cache
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+
+CXXFLAGS_old=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
+LIBS_old=$LIBS
+LIBS="$LIBS $OMNIORB_LDFLAGS $OMNIORB_LIBS"
+{ echo "$as_me:$LINENO: checking whether we have double and CORBA::Double compatibility" >&5
+echo $ECHO_N "checking whether we have double and CORBA::Double compatibility... $ECHO_C" >&6; }
+if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <CORBA.h>
+int main ()
+{
+  CORBA::Double *a=new CORBA::Double(2.5);
+  double c=2.5;
+  double *b;
+  b=(double *)a;
+
+  if( (c==*b) && (sizeof(double)==sizeof(CORBA::Double)) ){
+    delete a;
+    exit(0);
+  }
+  else{
+    delete a;
+    exit(1);
+  }
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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
+  DOUBLECOMP="yes"
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+DOUBLECOMP="no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+if test "$DOUBLECOMP" = yes; then
+  OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -DCOMP_CORBA_DOUBLE"
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+{ echo "$as_me:$LINENO: checking whether we have int and CORBA::Long compatibility" >&5
+echo $ECHO_N "checking whether we have int and CORBA::Long compatibility... $ECHO_C" >&6; }
+if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <CORBA.h>
+int main ()
+{
+  CORBA::Long *a=new CORBA::Long(2);
+  int c=2;
+  int *b;
+  b=(int *)a;
+
+  if( (c==*b) && (sizeof(int)==sizeof(CORBA::Long)) )
+    exit(0);
+  else
+    exit(1);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "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
+  LONGCOMP="yes"
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+LONGCOMP="no"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+if test "$LONGCOMP" = yes; then
+  OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -DCOMP_CORBA_LONG"
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+CXXFLAGS=$CXXFLAGS_old
+LIBS=$LIBS_old
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+echo
+echo ---------------------------------------------
+echo default ORB : omniORB
+echo ---------------------------------------------
+echo
+
+DEFAULT_ORB=omniORB
+
+
+if test x"$DEFAULT_ORB" = x"omniORB"
+then
+
+  #  Contient le nom de l'ORB
+  ORB=omniorb
+
+  { echo "$as_me:$LINENO: result: default orb : omniORB" >&5
+echo "${ECHO_T}default orb : omniORB" >&6; }
+  IDL=$OMNIORB_IDL
+
+
+  CORBA_ROOT=$OMNIORB_ROOT
+  CORBA_INCLUDES=$OMNIORB_INCLUDES
+  CORBA_CXXFLAGS=$OMNIORB_CXXFLAGS
+  CORBA_LIBS=$OMNIORB_LIBS
+  IDLCXXFLAGS=$OMNIORB_IDLCXXFLAGS
+  IDLPYFLAGS=$OMNIORB_IDLPYFLAGS
+
+
+
+
+
+
+
+
+  IDL_CLN_H=$OMNIORB_IDL_CLN_H
+  IDL_CLN_CXX=$OMNIORB_IDL_CLN_CXX
+  IDL_CLN_OBJ=$OMNIORB_IDL_CLN_OBJ
+
+
+
+
+
+  IDL_SRV_H=$OMNIORB_IDL_SRV_H
+  IDL_SRV_CXX=$OMNIORB_IDL_SRV_CXX
+  IDL_SRV_OBJ=$OMNIORB_IDL_SRV_OBJ
+
+
+
+
+
+else
+    { echo "$as_me:$LINENO: result: $DEFAULT_ORB unknown orb" >&5
+echo "${ECHO_T}$DEFAULT_ORB unknown orb" >&6; }
+
+fi
+
+
+
+
+corba=make_$ORB
+CORBA=adm_local/unix/$corba
+
+
+
+echo
+echo ----------------------------------------------
+echo testing CPPUNIT only required for unit testing
+echo ----------------------------------------------
+echo
+
+
+{ echo "$as_me:$LINENO: checking for cppunit..." >&5
+echo "$as_me: checking for cppunit..." >&6;}
+
+cppunit_ok=yes
+
+
+
+# Check whether --with-cppunit was given.
+if test "${with_cppunit+set}" = set; then
+  withval=$with_cppunit; CPPUNITHOME="$withval"
+      { echo "$as_me:$LINENO: result: \"select $withval as path to CPPUNIT\"" >&5
+echo "${ECHO_T}\"select $withval as path to CPPUNIT\"" >&6; }
+
+fi
+
+
+
+# Check whether --with-cppunit_inc was given.
+if test "${with_cppunit_inc+set}" = set; then
+  withval=$with_cppunit_inc; CPPUNIT_INCLUDES="$withval"
+      { echo "$as_me:$LINENO: result: \"select $withval as path to CPPUNIT includes\"" >&5
+echo "${ECHO_T}\"select $withval as path to CPPUNIT includes\"" >&6; }
+
+fi
+
+
+if test -z "$CPPUNITHOME"; then
+  { echo "$as_me:$LINENO: result: CPPUNITHOME not defined" >&5
+echo "${ECHO_T}CPPUNITHOME not defined" >&6; }
+  exits_ok=no
+  if test "x$exits_ok" = "xno"; then
+     for d in /usr/local /usr ; do
+        as_ac_File=`echo "ac_cv_file_${d}/lib64/libcppunit.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${d}/lib64/libcppunit.so" >&5
+echo $ECHO_N "checking for ${d}/lib64/libcppunit.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${d}/lib64/libcppunit.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  exits_ok=yes
+else
+  exits_ok=no
+fi
+
+        if test "x$exits_ok" = "xyes"; then
+           CPPUNITHOME=$d
+           { echo "$as_me:$LINENO: result: libcppunit.so detected in $d/lib64" >&5
+echo "${ECHO_T}libcppunit.so detected in $d/lib64" >&6; }
+          break
+        fi
+       as_ac_File=`echo "ac_cv_file_${d}/lib/libcppunit.so" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${d}/lib/libcppunit.so" >&5
+echo $ECHO_N "checking for ${d}/lib/libcppunit.so... $ECHO_C" >&6; }
+if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "${d}/lib/libcppunit.so"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+ac_res=`eval echo '${'$as_ac_File'}'`
+              { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  exits_ok=yes
+else
+  exits_ok=no
+fi
+
+        if test "x$exits_ok" = "xyes"; then
+           CPPUNITHOME=$d
+           { echo "$as_me:$LINENO: result: libcppunit.so detected in $d/lib" >&5
+echo "${ECHO_T}libcppunit.so detected in $d/lib" >&6; }
+          break
+        fi
+     done
+  fi
+  if test "x$exits_ok" = "xno"; then
+     for d in `echo $LD_LIBRARY_PATH | sed -e "s/:/ /g"` ; do
+        if test -f $d/libcppunit.so ; then
+           { echo "$as_me:$LINENO: result: libcppunit.so detected in $d" >&5
+echo "${ECHO_T}libcppunit.so detected in $d" >&6; }
+           CPPUNITHOME=$d
+           CPPUNITHOME=`echo ${CPPUNITHOME} | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
+           exits_ok=yes
+           break
+        fi
+     done
+  fi
+  if test "x$exits_ok" = "xyes"; then
+     if test -z "$CPPUNIT_INCLUDES"; then
+        CPPUNIT_INCLUDES=$CPPUNITHOME"/include"
+     fi
+  fi
+else
+  if test -z "$CPPUNIT_INCLUDES"; then
+     CPPUNIT_INCLUDES="$CPPUNITHOME/include"
+  fi
+fi
+
+if test "x$cppunit_ok" = xno -o ! -d "$CPPUNITHOME" ; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  { echo "$as_me:$LINENO: WARNING: cppunit not found" >&5
+echo "$as_me: WARNING: cppunit not found" >&2;}
+  cppunit_ok=no
+else
+
+   ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+   CPPFLAGS_old=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS -I$CPPUNIT_INCLUDES"
+
+   if test "${ac_cv_header_cppunit_extensions_HelperMacros_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for cppunit/extensions/HelperMacros.h" >&5
+echo $ECHO_N "checking for cppunit/extensions/HelperMacros.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_cppunit_extensions_HelperMacros_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_cppunit_extensions_HelperMacros_h" >&5
+echo "${ECHO_T}$ac_cv_header_cppunit_extensions_HelperMacros_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking cppunit/extensions/HelperMacros.h usability" >&5
+echo $ECHO_N "checking cppunit/extensions/HelperMacros.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <cppunit/extensions/HelperMacros.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_cxx_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking cppunit/extensions/HelperMacros.h presence" >&5
+echo $ECHO_N "checking cppunit/extensions/HelperMacros.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <cppunit/extensions/HelperMacros.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  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
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cppunit/extensions/HelperMacros.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: cppunit/extensions/HelperMacros.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to webmaster.salome@opencascade.com ##
+## ----------------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for cppunit/extensions/HelperMacros.h" >&5
+echo $ECHO_N "checking for cppunit/extensions/HelperMacros.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_cppunit_extensions_HelperMacros_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_cppunit_extensions_HelperMacros_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_cppunit_extensions_HelperMacros_h" >&5
+echo "${ECHO_T}$ac_cv_header_cppunit_extensions_HelperMacros_h" >&6; }
+
+fi
+if test $ac_cv_header_cppunit_extensions_HelperMacros_h = yes; then
+  cppunit_ok=yes
+else
+  cppunit_ok=no
+fi
+
+
+
+   CPPFLAGS=$CPPFLAGS_old
+
+   if test "x$cppunit_ok" = xno ; then
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+     { echo "$as_me:$LINENO: WARNING: cppunit not found" >&5
+echo "$as_me: WARNING: cppunit not found" >&2;}
+   else
+     cppunit_ok=yes
+   fi
+
+  if  test "x$cppunit_ok" = "xno"
+  then
+    { echo "$as_me:$LINENO: result: unable to found cppunit headers and library" >&5
+echo "${ECHO_T}unable to found cppunit headers and library" >&6; }
+    { echo "$as_me:$LINENO: result: CPPUNITHOME environment variable may be wrong" >&5
+echo "${ECHO_T}CPPUNITHOME environment variable may be wrong" >&6; }
+  else
+    if test "x$CPPUNIT_INCLUDES" = "x/usr/include"
+    then
+      CPPUNIT_INCLUDES=""
+    else
+      CPPUNIT_INCLUDES="-I$CPPUNIT_INCLUDES"
+    fi
+    if test "x$CPPUNITHOME" = "x/usr"
+    then
+      CPPUNIT_LIBS=" -lcppunit"
+    else
+      CPPUNIT_LIBS="-L$CPPUNITHOME/lib -lcppunit"
+    fi
+
+
+
+
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+  fi
+fi
+
+ if test x"$cppunit_ok" = xyes; then
+  CPPUNIT_IS_OK_TRUE=
+  CPPUNIT_IS_OK_FALSE='#'
+else
+  CPPUNIT_IS_OK_TRUE='#'
+  CPPUNIT_IS_OK_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing Kernel
+echo ---------------------------------------------
+echo
+
+
+
+{ echo "$as_me:$LINENO: checking for Kernel..." >&5
+echo "$as_me: checking for Kernel..." >&6;}
+
+Kernel_ok=no
+
+KERNEL_LDFLAGS=""
+KERNEL_CXXFLAGS=""
+
+
+# Check whether --with-kernel was given.
+if test "${with_kernel+set}" = set; then
+  withval=$with_kernel; KERNEL_DIR="$withval"
+else
+  KERNEL_DIR=""
+fi
+
+
+if test "x${KERNEL_DIR}" = "x" ; then
+  { echo "$as_me:$LINENO: result: for \${KERNEL_ROOT_DIR}: ${KERNEL_ROOT_DIR}" >&5
+echo "${ECHO_T}for \${KERNEL_ROOT_DIR}: ${KERNEL_ROOT_DIR}" >&6; }
+  # no --with-kernel-dir option used
+  if test "x${KERNEL_ROOT_DIR}" != "x" ; then
+    # KERNEL_ROOT_DIR environment variable defined
+    KERNEL_DIR=${KERNEL_ROOT_DIR}
+  else
+    # search Kernel binaries in PATH variable
+    # Extract the first word of "runSalome", so it can be a program name with args.
+set dummy runSalome; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_TEMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEMP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEMP="$TEMP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_TEMP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+TEMP=$ac_cv_path_TEMP
+if test -n "$TEMP"; then
+  { echo "$as_me:$LINENO: result: $TEMP" >&5
+echo "${ECHO_T}$TEMP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+    if test "x${TEMP}" != "x" ; then
+      { echo "$as_me:$LINENO: result: runSalome was found at : ${TEMP}" >&5
+echo "${ECHO_T}runSalome was found at : ${TEMP}" >&6; }
+      KERNEL_BIN_DIR=`dirname ${TEMP}`
+      KERNEL_DIR=`cd ${KERNEL_BIN_DIR}/../..; pwd`
+    fi
+  fi
+fi
+
+if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then
+   { echo "$as_me:$LINENO: result: Using Kernel module distribution in ${KERNEL_DIR}" >&5
+echo "${ECHO_T}Using Kernel module distribution in ${KERNEL_DIR}" >&6; }
+   Kernel_ok=yes
+
+   if test "x${KERNEL_ROOT_DIR}" = "x" ; then
+      KERNEL_ROOT_DIR=${KERNEL_DIR}
+   fi
+
+   if test "x${KERNEL_SITE_DIR}" = "x" ; then
+      KERNEL_SITE_DIR=${KERNEL_ROOT_DIR}
+   fi
+
+
+
+
+   KERNEL_LDFLAGS=-L${KERNEL_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+   KERNEL_CXXFLAGS=-I${KERNEL_DIR}/include/salome
+
+
+
+else
+   { echo "$as_me:$LINENO: WARNING: \"Cannot find compiled Kernel module distribution\"" >&5
+echo "$as_me: WARNING: \"Cannot find compiled Kernel module distribution\"" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: result: for Kernel: $Kernel_ok" >&5
+echo "${ECHO_T}for Kernel: $Kernel_ok" >&6; }
+
+
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing Geom
+echo ---------------------------------------------
+echo
+
+
+
+{ echo "$as_me:$LINENO: checking for Geom..." >&5
+echo "$as_me: checking for Geom..." >&6;}
+
+Geom_ok=no
+
+GEOM_LDFLAGS=""
+GEOM_CXXFLAGS=""
+
+
+# Check whether --with-geom was given.
+if test "${with_geom+set}" = set; then
+  withval=$with_geom; GEOM_DIR="$withval"
+else
+  GEOM_DIR=""
+fi
+
+
+if test "x$GEOM_DIR" == "x" ; then
+
+# no --with-geom-dir option used
+
+   if test "x$GEOM_ROOT_DIR" != "x" ; then
+
+    # GEOM_ROOT_DIR environment variable defined
+      GEOM_DIR=$GEOM_ROOT_DIR
+
+   else
+
+    # search Geom binaries in PATH variable
+      # Extract the first word of "libGEOM_Swig.py", so it can be a program name with args.
+set dummy libGEOM_Swig.py; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_TEMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEMP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEMP="$TEMP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_TEMP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+TEMP=$ac_cv_path_TEMP
+if test -n "$TEMP"; then
+  { echo "$as_me:$LINENO: result: $TEMP" >&5
+echo "${ECHO_T}$TEMP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+      if test "x$TEMP" != "x" ; then
+         GEOM_BIN_DIR=`dirname $TEMP`
+         GEOM_DIR=`dirname $GEOM_BIN_DIR`
+      fi
+
+   fi
+#
+fi
+
+if test -f ${GEOM_DIR}/bin/salome/geompy.py ; then
+   Geom_ok=yes
+   { echo "$as_me:$LINENO: result: Using Geom module distribution in ${GEOM_DIR}" >&5
+echo "${ECHO_T}Using Geom module distribution in ${GEOM_DIR}" >&6; }
+
+   if test "x$GEOM_ROOT_DIR" == "x" ; then
+      GEOM_ROOT_DIR=${GEOM_DIR}
+   fi
+
+
+   GEOM_LDFLAGS=-L${GEOM_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+   GEOM_CXXFLAGS=-I${GEOM_DIR}/include/salome
+
+
+
+
+else
+   { echo "$as_me:$LINENO: WARNING: \"Cannot find compiled Geom module distribution\"" >&5
+echo "$as_me: WARNING: \"Cannot find compiled Geom module distribution\"" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: result: for Geom: $Geom_ok" >&5
+echo "${ECHO_T}for Geom: $Geom_ok" >&6; }
+
+
+
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+
+
+
+LightGUI_ok=no
+FullGUI_ok=no
+
+GUI_LDFLAGS=""
+GUI_CXXFLAGS=""
+
+SALOME_GUI_DIR=""
+
+
+# Check whether --with-gui was given.
+if test "${with_gui+set}" = set; then
+  withval=$with_gui;
+else
+  with_gui=auto
+fi
+
+
+if test "${with_gui}" = "no"; then
+  SalomeGUI_need=no
+else
+  # define SALOME_GUI_DIR
+  if test "${with_gui}" = "yes" -o "${with_gui}" = "auto"; then
+    SalomeGUI_need="$with_gui"
+    { echo "$as_me:$LINENO: result: try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR}" >&5
+echo "${ECHO_T}try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR}" >&6; }
+    if test "x${GUI_ROOT_DIR}" != "x" ; then
+      # GUI_ROOT_DIR environment variable defined
+      SALOME_GUI_DIR=${GUI_ROOT_DIR}
+    else
+      # search Salome binaries in PATH variable
+      # Extract the first word of "SUITApp", so it can be a program name with args.
+set dummy SUITApp; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_TEMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEMP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEMP="$TEMP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_TEMP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+TEMP=$ac_cv_path_TEMP
+if test -n "$TEMP"; then
+  { echo "$as_me:$LINENO: result: $TEMP" >&5
+echo "${ECHO_T}$TEMP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+      if test "x${TEMP}" != "x" ; then
+        { echo "$as_me:$LINENO: result: SUITApp was found at : ${TEMP}" >&5
+echo "${ECHO_T}SUITApp was found at : ${TEMP}" >&6; }
+        SALOME_BIN_DIR=`dirname ${TEMP}`
+        SALOME_GUI_DIR=`cd ${SALOME_BIN_DIR}/../..; pwd`
+      fi
+    fi
+  else
+    # GUI directory defined by user
+    SalomeGUI_need=yes
+    SALOME_GUI_DIR="$with_gui"
+  fi
+
+  # check GUI installation
+  { echo "$as_me:$LINENO: checking for light GUI..." >&5
+echo "$as_me: checking for light GUI..." >&6;}
+  if test -f ${SALOME_GUI_DIR}/bin/salome/SUITApp ; then
+    LightGUI_ok=yes
+    { echo "$as_me:$LINENO: result: Using SALOME GUI distribution in ${SALOME_GUI_DIR}" >&5
+echo "${ECHO_T}Using SALOME GUI distribution in ${SALOME_GUI_DIR}" >&6; }
+
+    GUI_ROOT_DIR=${SALOME_GUI_DIR}
+
+    GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+    GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome
+
+    { echo "$as_me:$LINENO: checking for full GUI..." >&5
+echo "$as_me: checking for full GUI..." >&6;}
+    if test -f ${SALOME_GUI_DIR}/bin/salome/SALOME_Session_Server ; then
+      FullGUI_ok=yes
+    fi
+  else
+    { echo "$as_me:$LINENO: WARNING: \"Cannot find compiled SALOME GUI distribution\"" >&5
+echo "$as_me: WARNING: \"Cannot find compiled SALOME GUI distribution\"" >&2;}
+  fi
+  { echo "$as_me:$LINENO: result: for light GUI: ${LightGUI_ok}" >&5
+echo "${ECHO_T}for light GUI: ${LightGUI_ok}" >&6; }
+  { echo "$as_me:$LINENO: result: for full GUI: ${FullGUI_ok}" >&5
+echo "${ECHO_T}for full GUI: ${FullGUI_ok}" >&6; }
+fi
+
+
+
+
+
+
+  SalomeGUI_ok=${LightGUI_ok}
+
+
+echo
+echo ---------------------------------------------
+echo Testing full GUI
+echo ---------------------------------------------
+echo
+
+
+
+
+LightGUI_ok=no
+FullGUI_ok=no
+
+GUI_LDFLAGS=""
+GUI_CXXFLAGS=""
+
+SALOME_GUI_DIR=""
+
+
+# Check whether --with-gui was given.
+if test "${with_gui+set}" = set; then
+  withval=$with_gui;
+else
+  with_gui=auto
+fi
+
+
+if test "${with_gui}" = "no"; then
+  SalomeGUI_need=no
+else
+  # define SALOME_GUI_DIR
+  if test "${with_gui}" = "yes" -o "${with_gui}" = "auto"; then
+    SalomeGUI_need="$with_gui"
+    { echo "$as_me:$LINENO: result: try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR}" >&5
+echo "${ECHO_T}try \${GUI_ROOT_DIR}: ${GUI_ROOT_DIR}" >&6; }
+    if test "x${GUI_ROOT_DIR}" != "x" ; then
+      # GUI_ROOT_DIR environment variable defined
+      SALOME_GUI_DIR=${GUI_ROOT_DIR}
+    else
+      # search Salome binaries in PATH variable
+      # Extract the first word of "SUITApp", so it can be a program name with args.
+set dummy SUITApp; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_TEMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEMP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEMP="$TEMP" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_TEMP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+TEMP=$ac_cv_path_TEMP
+if test -n "$TEMP"; then
+  { echo "$as_me:$LINENO: result: $TEMP" >&5
+echo "${ECHO_T}$TEMP" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+      if test "x${TEMP}" != "x" ; then
+        { echo "$as_me:$LINENO: result: SUITApp was found at : ${TEMP}" >&5
+echo "${ECHO_T}SUITApp was found at : ${TEMP}" >&6; }
+        SALOME_BIN_DIR=`dirname ${TEMP}`
+        SALOME_GUI_DIR=`cd ${SALOME_BIN_DIR}/../..; pwd`
+      fi
+    fi
+  else
+    # GUI directory defined by user
+    SalomeGUI_need=yes
+    SALOME_GUI_DIR="$with_gui"
+  fi
+
+  # check GUI installation
+  { echo "$as_me:$LINENO: checking for light GUI..." >&5
+echo "$as_me: checking for light GUI..." >&6;}
+  if test -f ${SALOME_GUI_DIR}/bin/salome/SUITApp ; then
+    LightGUI_ok=yes
+    { echo "$as_me:$LINENO: result: Using SALOME GUI distribution in ${SALOME_GUI_DIR}" >&5
+echo "${ECHO_T}Using SALOME GUI distribution in ${SALOME_GUI_DIR}" >&6; }
+
+    GUI_ROOT_DIR=${SALOME_GUI_DIR}
+
+    GUI_LDFLAGS=-L${SALOME_GUI_DIR}/lib${LIB_LOCATION_SUFFIX}/salome
+    GUI_CXXFLAGS=-I${SALOME_GUI_DIR}/include/salome
+
+    { echo "$as_me:$LINENO: checking for full GUI..." >&5
+echo "$as_me: checking for full GUI..." >&6;}
+    if test -f ${SALOME_GUI_DIR}/bin/salome/SALOME_Session_Server ; then
+      FullGUI_ok=yes
+    fi
+  else
+    { echo "$as_me:$LINENO: WARNING: \"Cannot find compiled SALOME GUI distribution\"" >&5
+echo "$as_me: WARNING: \"Cannot find compiled SALOME GUI distribution\"" >&2;}
+  fi
+  { echo "$as_me:$LINENO: result: for light GUI: ${LightGUI_ok}" >&5
+echo "${ECHO_T}for light GUI: ${LightGUI_ok}" >&6; }
+  { echo "$as_me:$LINENO: result: for full GUI: ${FullGUI_ok}" >&5
+echo "${ECHO_T}for full GUI: ${FullGUI_ok}" >&6; }
+fi
+
+
+
+
+
+
+  CORBA_IN_GUI=${FullGUI_ok}
+
+
+if test "x${CORBA_IN_GUI}" != "xyes"; then
+  echo "failed : For configure HEXABLOCK module necessary full GUI !"
+  exit
+fi
+
+
+echo
+echo ---------------------------------------------
+echo Summary
+echo ---------------------------------------------
+echo
+
+echo Configure
+variables="cc_ok threads_ok boost_ok python_ok omniORB_ok qt_ok Kernel_ok SalomeGUI_ok"
+
+for var in $variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+echo
+echo "Default ORB   : $DEFAULT_ORB"
+echo
+
+if test "X$GMAKE" = "Xyes"; then
+    SETX=":"
+else
+    SETX="set -x"
+fi
+echo
+echo ---------------------------------------------
+echo generating Makefiles and configure files
+echo ---------------------------------------------
+echo
+
+ac_config_commands="$ac_config_commands default-1"
+
+
+# This list is initiated using autoscan and must be updated manually
+# when adding a new file <filename>.in to manage. When you execute
+# autoscan, the Makefile list is generated in the output file configure.scan.
+#
+# This could be helpfull to update de configuration.
+ac_config_files="$ac_config_files salome_adm/unix/SALOMEconfig.h adm_local/Makefile adm_local/unix/Makefile adm_local/unix/config_files/Makefile bin/VERSION bin/runAppli bin/Makefile doc/Makefile HEXABLOCK_version.h resources/HEXABLOCKCatalog.xml src/Makefile src/HEXABLOCK/Makefile src/HEXABLOCK_I/Makefile src/HEXABLOCKGUI/Makefile src/TEST_CPP/Makefile src/TEST_PY/Makefile resources/Makefile idl/Makefile Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+       "s/'/'\\\\''/g;
+         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[     `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+       g
+       s/^\n//
+       s/\n/ /g
+       p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${CPPUNIT_IS_OK_TRUE}" && test -z "${CPPUNIT_IS_OK_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"CPPUNIT_IS_OK\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CPPUNIT_IS_OK\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='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
+  '
+fi
+as_executable_p=$as_test_x
+
+# 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by Salome6 Project HEXABLOCK module $as_me 5.1.2, which was
+generated by GNU Autoconf 2.61.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, 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
+  --file=FILE[:TEMPLATE]
+                  instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Salome6 Project HEXABLOCK module config.status 5.1.2
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+    "salome_adm/unix/SALOMEconfig.h") CONFIG_FILES="$CONFIG_FILES salome_adm/unix/SALOMEconfig.h" ;;
+    "adm_local/Makefile") CONFIG_FILES="$CONFIG_FILES adm_local/Makefile" ;;
+    "adm_local/unix/Makefile") CONFIG_FILES="$CONFIG_FILES adm_local/unix/Makefile" ;;
+    "adm_local/unix/config_files/Makefile") CONFIG_FILES="$CONFIG_FILES adm_local/unix/config_files/Makefile" ;;
+    "bin/VERSION") CONFIG_FILES="$CONFIG_FILES bin/VERSION" ;;
+    "bin/runAppli") CONFIG_FILES="$CONFIG_FILES bin/runAppli" ;;
+    "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
+    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+    "HEXABLOCK_version.h") CONFIG_FILES="$CONFIG_FILES HEXABLOCK_version.h" ;;
+    "resources/HEXABLOCKCatalog.xml") CONFIG_FILES="$CONFIG_FILES resources/HEXABLOCKCatalog.xml" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "src/HEXABLOCK/Makefile") CONFIG_FILES="$CONFIG_FILES src/HEXABLOCK/Makefile" ;;
+    "src/HEXABLOCK_I/Makefile") CONFIG_FILES="$CONFIG_FILES src/HEXABLOCK_I/Makefile" ;;
+    "src/HEXABLOCKGUI/Makefile") CONFIG_FILES="$CONFIG_FILES src/HEXABLOCKGUI/Makefile" ;;
+    "src/TEST_CPP/Makefile") CONFIG_FILES="$CONFIG_FILES src/TEST_CPP/Makefile" ;;
+    "src/TEST_PY/Makefile") CONFIG_FILES="$CONFIG_FILES src/TEST_PY/Makefile" ;;
+    "resources/Makefile") CONFIG_FILES="$CONFIG_FILES resources/Makefile" ;;
+    "idl/Makefile") CONFIG_FILES="$CONFIG_FILES idl/Makefile" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+# Create sed commands to just substitute file output variables.
+
+# Remaining file output variables are in a fragment that also has non-file
+# output varibles.
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+target!$target$ac_delim
+target_cpu!$target_cpu$ac_delim
+target_vendor!$target_vendor$ac_delim
+target_os!$target_os$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+XVERSION!$XVERSION$ac_delim
+MODULE_NAME!$MODULE_NAME$ac_delim
+ROOT_SRCDIR!$ROOT_SRCDIR$ac_delim
+ROOT_BUILDDIR!$ROOT_BUILDDIR$ac_delim
+AR!$AR$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 94; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+/^[     ]*@CORBA@[      ]*$/{
+r $CORBA
+d
+}
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+LN_S!$LN_S$ac_delim
+ECHO!$ECHO$ac_delim
+RANLIB!$RANLIB$ac_delim
+CPP!$CPP$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+CXXCPP!$CXXCPP$ac_delim
+F77!$F77$ac_delim
+FFLAGS!$FFLAGS$ac_delim
+ac_ct_F77!$ac_ct_F77$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+CXXTMPDPTHFLAGS!$CXXTMPDPTHFLAGS$ac_delim
+DEPCC!$DEPCC$ac_delim
+DEPCXX!$DEPCXX$ac_delim
+DEPCXXFLAGS!$DEPCXXFLAGS$ac_delim
+C_DEPEND_FLAG!$C_DEPEND_FLAG$ac_delim
+CXX_DEPEND_FLAG!$CXX_DEPEND_FLAG$ac_delim
+MACHINE!$MACHINE$ac_delim
+HAVE_SSTREAM!$HAVE_SSTREAM$ac_delim
+LIB_LOCATION_SUFFIX!$LIB_LOCATION_SUFFIX$ac_delim
+LDEXPDYNFLAGS!$LDEXPDYNFLAGS$ac_delim
+STDLIB!$STDLIB$ac_delim
+acx_pthread_config!$acx_pthread_config$ac_delim
+PTHREAD_CC!$PTHREAD_CC$ac_delim
+PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
+PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
+PYTHON!$PYTHON$ac_delim
+PYTHON_PREFIX!$PYTHON_PREFIX$ac_delim
+PYTHONHOME!$PYTHONHOME$ac_delim
+PYTHON_VERSION!$PYTHON_VERSION$ac_delim
+PYTHON_INCLUDES!$PYTHON_INCLUDES$ac_delim
+PYTHON_LIBS!$PYTHON_LIBS$ac_delim
+PYTHON_PLATFORM!$PYTHON_PLATFORM$ac_delim
+PYTHON_SITE!$PYTHON_SITE$ac_delim
+PYTHON_SITE_PACKAGE!$PYTHON_SITE_PACKAGE$ac_delim
+PYTHON_SITE_EXEC!$PYTHON_SITE_EXEC$ac_delim
+PYTHON_SITE_INSTALL!$PYTHON_SITE_INSTALL$ac_delim
+pythondir!$pythondir$ac_delim
+PYTHON_EXEC_PREFIX!$PYTHON_EXEC_PREFIX$ac_delim
+pkgpythondir!$pkgpythondir$ac_delim
+pyexecdir!$pyexecdir$ac_delim
+pkgpyexecdir!$pkgpyexecdir$ac_delim
+OGL_INCLUDES!$OGL_INCLUDES$ac_delim
+OGL_LIBS!$OGL_LIBS$ac_delim
+MOC!$MOC$ac_delim
+UIC!$UIC$ac_delim
+QRCC!$QRCC$ac_delim
+LRELEASE!$LRELEASE$ac_delim
+QTDIR!$QTDIR$ac_delim
+QT_ROOT!$QT_ROOT$ac_delim
+QT_INCLUDES!$QT_INCLUDES$ac_delim
+QT_MT_INCLUDES!$QT_MT_INCLUDES$ac_delim
+QT_ASSISTANT_INCLUDES!$QT_ASSISTANT_INCLUDES$ac_delim
+QT_LIB_DIR!$QT_LIB_DIR$ac_delim
+QT_CORE_LIBS!$QT_CORE_LIBS$ac_delim
+QT_GUI_LIBS!$QT_GUI_LIBS$ac_delim
+QT_OTHER_LIBS!$QT_OTHER_LIBS$ac_delim
+QT_LIBS!$QT_LIBS$ac_delim
+QT_MT_LIBS!$QT_MT_LIBS$ac_delim
+QT_ASSISTANT_LIBS!$QT_ASSISTANT_LIBS$ac_delim
+QT_VERSION!$QT_VERSION$ac_delim
+QT_VERSION_ID!$QT_VERSION_ID$ac_delim
+BOOST_CPPFLAGS!$BOOST_CPPFLAGS$ac_delim
+BOOST_LIBSUFFIX!$BOOST_LIBSUFFIX$ac_delim
+BOOST_LIBS!$BOOST_LIBS$ac_delim
+BOOST_LIB_THREAD!$BOOST_LIB_THREAD$ac_delim
+BOOST_LIB_SIGNALS!$BOOST_LIB_SIGNALS$ac_delim
+BOOST_LIB_SYSTEM!$BOOST_LIB_SYSTEM$ac_delim
+BOOST_LIB_REGEX!$BOOST_LIB_REGEX$ac_delim
+BOOST_PROGRAM_OPTIONS_LIB!$BOOST_PROGRAM_OPTIONS_LIB$ac_delim
+CAS_CPPFLAGS!$CAS_CPPFLAGS$ac_delim
+CAS_CXXFLAGS!$CAS_CXXFLAGS$ac_delim
+CAS_KERNEL!$CAS_KERNEL$ac_delim
+CAS_MATH!$CAS_MATH$ac_delim
+CAS_VIEWER!$CAS_VIEWER$ac_delim
+CAS_TKTopAlgo!$CAS_TKTopAlgo$ac_delim
+CAS_MODELER!$CAS_MODELER$ac_delim
+CAS_OCAF!$CAS_OCAF$ac_delim
+CAS_OCAFVIS!$CAS_OCAFVIS$ac_delim
+CAS_DATAEXCHANGE!$CAS_DATAEXCHANGE$ac_delim
+CAS_LDFLAGS!$CAS_LDFLAGS$ac_delim
+CAS_LDPATH!$CAS_LDPATH$ac_delim
+CAS_STDPLUGIN!$CAS_STDPLUGIN$ac_delim
+OMNIORB_IDL!$OMNIORB_IDL$ac_delim
+OMNIORB_ROOT!$OMNIORB_ROOT$ac_delim
+OMNIORB_INCLUDES!$OMNIORB_INCLUDES$ac_delim
+OMNIORB_CXXFLAGS!$OMNIORB_CXXFLAGS$ac_delim
+OMNIORB_LIBS!$OMNIORB_LIBS$ac_delim
+OMNIORB_IDLCXXFLAGS!$OMNIORB_IDLCXXFLAGS$ac_delim
+OMNIORB_IDLPYFLAGS!$OMNIORB_IDLPYFLAGS$ac_delim
+OMNIORB_IDL_CLN_H!$OMNIORB_IDL_CLN_H$ac_delim
+OMNIORB_IDL_CLN_CXX!$OMNIORB_IDL_CLN_CXX$ac_delim
+OMNIORB_IDL_CLN_OBJ!$OMNIORB_IDL_CLN_OBJ$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+OMNIORB_IDL_SRV_H!$OMNIORB_IDL_SRV_H$ac_delim
+OMNIORB_IDL_SRV_CXX!$OMNIORB_IDL_SRV_CXX$ac_delim
+OMNIORB_IDL_SRV_OBJ!$OMNIORB_IDL_SRV_OBJ$ac_delim
+OMNIORB_IDL_TIE_H!$OMNIORB_IDL_TIE_H$ac_delim
+OMNIORB_IDL_TIE_CXX!$OMNIORB_IDL_TIE_CXX$ac_delim
+IDL!$IDL$ac_delim
+CORBA_ROOT!$CORBA_ROOT$ac_delim
+CORBA_INCLUDES!$CORBA_INCLUDES$ac_delim
+CORBA_CXXFLAGS!$CORBA_CXXFLAGS$ac_delim
+CORBA_LIBS!$CORBA_LIBS$ac_delim
+IDLCXXFLAGS!$IDLCXXFLAGS$ac_delim
+IDLPYFLAGS!$IDLPYFLAGS$ac_delim
+IDL_CLN_H!$IDL_CLN_H$ac_delim
+IDL_CLN_CXX!$IDL_CLN_CXX$ac_delim
+IDL_CLN_OBJ!$IDL_CLN_OBJ$ac_delim
+IDL_SRV_H!$IDL_SRV_H$ac_delim
+IDL_SRV_CXX!$IDL_SRV_CXX$ac_delim
+IDL_SRV_OBJ!$IDL_SRV_OBJ$ac_delim
+CPPUNIT_INCLUDES!$CPPUNIT_INCLUDES$ac_delim
+CPPUNIT_LIBS!$CPPUNIT_LIBS$ac_delim
+cppunit_ok!$cppunit_ok$ac_delim
+CPPUNIT_IS_OK_TRUE!$CPPUNIT_IS_OK_TRUE$ac_delim
+CPPUNIT_IS_OK_FALSE!$CPPUNIT_IS_OK_FALSE$ac_delim
+TEMP!$TEMP$ac_delim
+KERNEL_ROOT_DIR!$KERNEL_ROOT_DIR$ac_delim
+KERNEL_SITE_DIR!$KERNEL_SITE_DIR$ac_delim
+KERNEL_LDFLAGS!$KERNEL_LDFLAGS$ac_delim
+KERNEL_CXXFLAGS!$KERNEL_CXXFLAGS$ac_delim
+GEOM_ROOT_DIR!$GEOM_ROOT_DIR$ac_delim
+GEOM_LDFLAGS!$GEOM_LDFLAGS$ac_delim
+GEOM_CXXFLAGS!$GEOM_CXXFLAGS$ac_delim
+GUI_LDFLAGS!$GUI_LDFLAGS$ac_delim
+GUI_CXXFLAGS!$GUI_CXXFLAGS$ac_delim
+GUI_ROOT_DIR!$GUI_ROOT_DIR$ac_delim
+CORBA_IN_GUI!$CORBA_IN_GUI$ac_delim
+SETX!$SETX$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 38; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[         ]*VPATH[        ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[    ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[      ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES      :C $CONFIG_COMMANDS
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+         echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_file" : 'X\(//\)[^/]' \| \
+        X"$ac_file" : 'X\(//\)$' \| \
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+
+
+  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # Grep'ing the whole file is not good either: AIX grep has a line
+  # limit of 2048, but all sed's we know have understand at least 4000.
+  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+    dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+    { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    "default-1":C)  \
+      chmod +x ./bin/*; \
+ ;;
+
+  esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100755 (executable)
index 0000000..445d72f
--- /dev/null
@@ -0,0 +1,322 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  PLEASE DO NOT MODIFY configure.in FILE
+#  ALL CHANGES WILL BE DISCARDED BY THE NEXT
+#  build_configure COMMAND
+#  CHANGES MUST BE MADE IN configure.in.base FILE
+# Author : Marc Tajchman (CEA)
+# Date : 28/06/2001
+# Modified by : Patrick GOLDBRONN (CEA)
+# Modified by : Marc Tajchman (CEA)
+# Created from configure.in.base
+#
+AC_INIT([Salome6 Project HEXABLOCK module],[5.1.2], [webmaster.salome@opencascade.com], [SalomeHEXABLOCK])
+AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AM_INIT_AUTOMAKE([-Wno-portability])
+
+XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
+AC_SUBST(XVERSION)
+
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=hexablock
+AC_SUBST(MODULE_NAME)
+
+dnl
+dnl Initialize source and build root directories
+dnl
+
+ROOT_BUILDDIR=`pwd`
+ROOT_SRCDIR=`echo $0 | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
+cd $ROOT_SRCDIR
+ROOT_SRCDIR=`pwd`
+cd $ROOT_BUILDDIR
+
+AC_SUBST(ROOT_SRCDIR)
+AC_SUBST(ROOT_BUILDDIR)
+
+echo
+echo Source root directory : $ROOT_SRCDIR
+echo Build  root directory : $ROOT_BUILDDIR
+echo
+echo
+
+AC_CHECK_PROG(SHELL,sh)
+AC_SUBST(SHELL)
+
+if test -z "$AR"; then
+   AC_CHECK_PROGS(AR,ar xar,:,$PATH)
+fi
+AC_SUBST(AR)
+
+dnl Export the AR macro so that it will be placed in the libtool file
+dnl correctly.
+export AR
+
+echo
+echo ---------------------------------------------
+echo testing make
+echo ---------------------------------------------
+echo
+
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+dnl 
+dnl libtool macro check for CC, LD, NM, LN_S, RANLIB, STRIP + for shared libraries
+
+AC_ENABLE_DEBUG(yes)
+AC_DISABLE_PRODUCTION
+
+echo ---------------------------------------------
+echo testing libtool
+echo ---------------------------------------------
+
+dnl first, we set static to no!
+dnl if we want it, use --enable-static
+AC_ENABLE_STATIC(no)
+
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+
+dnl Fix up the INSTALL macro if it s a relative path. We want the
+dnl full-path to the binary instead.
+case "$INSTALL" in
+   *install-sh*)
+      INSTALL='\${KERNEL_ROOT_DIR}'/salome_adm/unix/config_files/install-sh
+      ;;
+esac
+
+echo
+echo ---------------------------------------------
+echo testing C/C++
+echo ---------------------------------------------
+echo
+
+cc_ok=no
+dnl inutil car libtool
+dnl AC_PROG_CC
+AC_PROG_CXX
+AC_CXX_WARNINGS
+AC_CXX_TEMPLATE_OPTIONS
+AC_DEPEND_FLAG
+# AC_CC_WARNINGS([ansi])
+cc_ok=yes
+
+dnl Library libdl :
+AC_CHECK_LIB(dl,dlopen)
+
+dnl Library librt : for alpha/osf
+AC_CHECK_LIB(rt,nanosleep)
+
+dnl add library libm :
+AC_CHECK_LIB(m,ceil)
+
+AC_CXX_USE_STD_IOSTREAM
+AC_CXX_HAVE_SSTREAM
+
+dnl
+dnl ---------------------------------------------
+dnl testing linker
+dnl ---------------------------------------------
+dnl
+
+AC_LINKER_OPTIONS
+
+echo
+echo ---------------------------------------------
+echo testing threads
+echo ---------------------------------------------
+echo
+
+ENABLE_PTHREADS
+
+echo
+echo ---------------------------------------------
+echo testing python
+echo ---------------------------------------------
+echo
+
+CHECK_PYTHON
+
+AM_PATH_PYTHON(2.3)
+
+echo
+echo ---------------------------------------------
+echo testing QT
+echo ---------------------------------------------
+echo
+
+CHECK_QT
+
+echo
+echo ---------------------------------------------
+echo BOOST Library
+echo ---------------------------------------------
+echo
+
+CHECK_BOOST
+
+echo
+echo ---------------------------------------------
+echo Testing OpenCascade
+echo ---------------------------------------------
+echo
+
+CHECK_CAS
+
+echo
+echo ---------------------------------------------
+echo testing omniORB
+echo ---------------------------------------------
+echo
+
+CHECK_OMNIORB
+
+echo
+echo ---------------------------------------------
+echo default ORB : omniORB
+echo ---------------------------------------------
+echo
+
+DEFAULT_ORB=omniORB
+CHECK_CORBA
+
+AC_SUBST_FILE(CORBA)
+corba=make_$ORB
+CORBA=adm_local/unix/$corba
+
+
+
+echo
+echo ----------------------------------------------
+echo testing CPPUNIT only required for unit testing
+echo ----------------------------------------------
+echo
+CHECK_CPPUNIT
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing Kernel
+echo ---------------------------------------------
+echo
+
+CHECK_KERNEL
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing Geom
+echo ---------------------------------------------
+echo
+
+CHECK_GEOM
+
+
+
+
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+CHECK_SALOME_GUI
+
+echo
+echo ---------------------------------------------
+echo Testing full GUI
+echo ---------------------------------------------
+echo
+
+CHECK_CORBA_IN_GUI
+if test "x${CORBA_IN_GUI}" != "xyes"; then
+  echo "failed : For configure HEXABLOCK module necessary full GUI !"
+  exit
+fi
+
+
+echo
+echo ---------------------------------------------
+echo Summary
+echo ---------------------------------------------
+echo
+
+echo Configure
+variables="cc_ok threads_ok boost_ok python_ok omniORB_ok qt_ok Kernel_ok SalomeGUI_ok"
+
+for var in $variables
+do
+   printf "   %10s : " `echo \$var | sed -e "s,_ok,,"`
+   eval echo \$$var
+done
+
+echo
+echo "Default ORB   : $DEFAULT_ORB"
+echo
+
+dnl We don t need to say when we re entering directories if we re using
+dnl GNU make becuase make does it for us.
+if test "X$GMAKE" = "Xyes"; then
+   AC_SUBST(SETX) SETX=":"
+else
+   AC_SUBST(SETX) SETX="set -x"
+fi
+echo
+echo ---------------------------------------------
+echo generating Makefiles and configure files
+echo ---------------------------------------------
+echo
+
+AC_OUTPUT_COMMANDS([ \
+      chmod +x ./bin/*; \
+])
+
+# This list is initiated using autoscan and must be updated manually
+# when adding a new file <filename>.in to manage. When you execute
+# autoscan, the Makefile list is generated in the output file configure.scan.
+# 
+# This could be helpfull to update de configuration.
+AC_OUTPUT([ \
+  salome_adm/unix/SALOMEconfig.h \
+  adm_local/Makefile \
+  adm_local/unix/Makefile \
+  adm_local/unix/config_files/Makefile \
+  bin/VERSION \
+  bin/runAppli \
+  bin/Makefile \
+  doc/Makefile \
+  HEXABLOCK_version.h \
+  resources/HEXABLOCKCatalog.xml \
+  src/Makefile \
+  src/HEXABLOCK/Makefile \
+  src/HEXABLOCK_I/Makefile \
+  src/HEXABLOCKGUI/Makefile \
+  src/TEST_CPP/Makefile \
+  src/TEST_PY/Makefile \
+  resources/Makefile \
+  idl/Makefile \
+  Makefile \
+])
diff --git a/cppunit-report.xml b/cppunit-report.xml
new file mode 100755 (executable)
index 0000000..3f7a255
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?>
+<TestRun>
+  <FailedTests></FailedTests>
+  <SuccessfulTests>
+    <Test id="1">
+      <Name>VertexTest::TestGetX</Name>
+    </Test>
+    <Test id="2">
+      <Name>VertexTest::TestGetY</Name>
+    </Test>
+    <Test id="3">
+      <Name>VertexTest::TestGetZ</Name>
+    </Test>
+    <Test id="4">
+      <Name>EdgeTest::TestGetVertex</Name>
+    </Test>
+  </SuccessfulTests>
+  <Statistics>
+    <Tests>4</Tests>
+    <FailuresTotal>0</FailuresTotal>
+    <Errors>0</Errors>
+    <Failures>0</Failures>
+  </Statistics>
+</TestRun>
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100755 (executable)
index 0000000..ab3e5c7
--- /dev/null
@@ -0,0 +1,26 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_doc_DATA = dev_guide.html
+
+EXTRA_DIST   += dev_guide.txt
diff --git a/doc/dev_guide.html b/doc/dev_guide.html
new file mode 100755 (executable)
index 0000000..c5fa41c
--- /dev/null
@@ -0,0 +1,576 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" />
+<title>Guide pour le développement d'un module SALOME 2 en C++</title>
+<link rel="stylesheet" href="default.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="guide-pour-le-d-veloppement-d-un-module-salome-2-en-c">
+<h1 class="title">Guide pour le développement d'un module SALOME 2 en C++</h1>
+<table class="docinfo" frame="void" rules="none">
+<col class="docinfo-name" />
+<col class="docinfo-content" />
+<tbody valign="top">
+<tr class="field"><th class="docinfo-name">Auteur:</th><td class="field-body">Crouzet N.</td>
+</tr>
+</tbody>
+</table>
+<div class="contents topic" id="contents">
+<p class="topic-title"><a name="contents">Contents</a></p>
+<ul class="auto-toc simple">
+<li><a class="reference" href="#pr-sentation" id="id1" name="id1">1   Présentation</a></li>
+<li><a class="reference" href="#les-tapes-de-construction-du-module-exemple" id="id2" name="id2">2   Les étapes de construction du module exemple</a></li>
+<li><a class="reference" href="#cr-ation-de-l-arborescence-du-module" id="id3" name="id3">3   Création de l'arborescence du module</a></li>
+<li><a class="reference" href="#interface-idl" id="id4" name="id4">4   Interface idl</a></li>
+<li><a class="reference" href="#impl-mentation-c" id="id5" name="id5">5   Implémentation C++</a><ul class="auto-toc">
+<li><a class="reference" href="#les-sources" id="id6" name="id6">5.1   Les sources</a></li>
+<li><a class="reference" href="#makefile" id="id7" name="id7">5.2   Makefile</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#pilotage-du-composant-depuis-python-mode-tui" id="id8" name="id8">6   Pilotage du composant depuis Python (mode TUI)</a></li>
+<li><a class="reference" href="#interface-graphique" id="id9" name="id9">7   Interface graphique</a><ul class="auto-toc">
+<li><a class="reference" href="#introduction" id="id10" name="id10">7.1   Introduction</a></li>
+<li><a class="reference" href="#choix-des-widgets" id="id11" name="id11">7.2   Choix des widgets</a><ul class="auto-toc">
+<li><a class="reference" href="#description-xml" id="id12" name="id12">7.2.1   Description xml</a></li>
+<li><a class="reference" href="#convention" id="id13" name="id13">7.2.2   Convention</a></li>
+</ul>
+</li>
+<li><a class="reference" href="#impl-mentation-de-l-ihm" id="id14" name="id14">7.3   Implémentation de l'IHM</a><ul class="auto-toc">
+<li><a class="reference" href="#gestion-des-v-nements" id="id15" name="id15">7.3.1   Gestion des évènements</a></li>
+<li><a class="reference" href="#classes-disponibles" id="id16" name="id16">7.3.2   Classes disponibles</a></li>
+<li><a class="reference" href="#gestion-du-multi-linguisme" id="id17" name="id17">7.3.3   Gestion du multi-linguisme</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a class="reference" href="#r-gles-syntaxiques-de-nommage" id="id18" name="id18">8   Règles syntaxiques de nommage</a></li>
+</ul>
+</div>
+<div class="section" id="pr-sentation">
+<h1><a class="toc-backref" href="#id1" name="pr-sentation">1   Présentation</a></h1>
+<p>Ce document a pour objectif de décrire les différentes étapes
+du développement d'un module SALOME 2 en C++.
+Il fait suite au document &quot;Guide pour le développement d'un module SALOME 2 en
+Python&quot;, qui documente de module PYHEXA, et en reprend la démarche :
+construction pas à pas d'un module HEXA.
+Comme de nombreux points ne sont pas repris, il est recommendé de lire ce
+document préalablement.</p>
+</div>
+<div class="section" id="les-tapes-de-construction-du-module-exemple">
+<h1><a class="toc-backref" href="#id2" name="les-tapes-de-construction-du-module-exemple">2   Les étapes de construction du module exemple</a></h1>
+<p>Le composant choisi pour illustrer le processus de construction en C++
+est le même que celui choisi pour illustrer la construction du module python :
+il implémentera donc la même interface idl Corba.
+Il sera complété par un GUI graphique écrit en Qt.</p>
+<p>Les différentes étapes du développement seront les suivantes :</p>
+<blockquote>
+<ul class="simple">
+<li>créer une arborescence de module</li>
+<li>créer un composant SALOME 2 chargeable par un container C++</li>
+<li>configurer le module pour que le composant soit connu de SALOME</li>
+<li>ajouter un GUI graphique</li>
+<li>rendre le composant utilisable dans le superviseur</li>
+</ul>
+</blockquote>
+</div>
+<div class="section" id="cr-ation-de-l-arborescence-du-module">
+<h1><a class="toc-backref" href="#id3" name="cr-ation-de-l-arborescence-du-module">3   Création de l'arborescence du module</a></h1>
+<p>Dans un premier temps, on se contentera de mettre dans le module exemple un composant
+SALOME écrit en C++ qui sera chargeable par un container C++.
+Il suffit donc d'une interface idl et d'une implantation C++ du composant.
+Pour mettre en oeuvre ceci dans un module SALOME 2, il nous faut reproduire l'arborescence de
+fichier standard suivante:</p>
+<pre class="literal-block">
++ HEXA1_SRC
+  + build_configure
+  + configure.in.base
+  + Makefile.in
+  + adm_local
+    + unix
+      + make_commence.in
+      + make_omniorb.in
+      + config_files
+  + bin
+    + VERSION
+    + runAppli.in
+    + runSalome.py
+  + idl
+    + Makefile.in
+    + HEXA_Gen.idl
+  + src
+    + Makefile.in
+    + HEXA
+      + Makefile.in
+      + HEXA.cxx 
+      + HEXA.hxx 
+  + doc
+</pre>
+<p>Pour cela, on recopie l'arborescence de PYHEXA, et on modifie où nécessaire
+PYHEXA en HEXA:</p>
+<pre class="literal-block">
+cp -r PYHEXA1_SRC HEXA1_SRC
+cd HEXA1_SRC
+mv idl/PYHEXA_Gen.idl idl/HEXA_Gen.idl
+mv src/PYHEXA src/HEXA
+</pre>
+</div>
+<div class="section" id="interface-idl">
+<h1><a class="toc-backref" href="#id4" name="interface-idl">4   Interface idl</a></h1>
+<p>Dans le répertoire idl, nous modifions le fichier idl HEXA_Gen.idl : le
+module défini est renommé HEXA_ORB, et l'interface en HEXA_Gen.
+Le service rendu reste le même : à partir d'une chaine de caractères
+fournie comme unique argument, retour d'une chaine de caractères obtenue
+par concaténation de &quot;Hello, &quot; et de la chaine d'entrée.
+Ce service est spécifié par la fonction makeBanner.</p>
+<p>Un utilitaire de documentation basé sur doxygen a été mis en place pour
+compiler une documentation des services corba à partir de commentaires se
+trouvant dans les fichiers idl. Nous rajouter donc à notre idl quelques
+commentaires, en respectant le formalisme doxygen.
+Un commentaire doxygen commence par &quot;/<em>!&quot; et se finit pas &quot;</em>/&quot;.
+Pour structurer un minimum les pages générées, on les regroupes par module ou
+sujet. Dans notre exemple, nous utilisons la directive:</p>
+<pre class="literal-block">
+\ingroup EXAMPLES 
+</pre>
+<p>spécifiant que la documentation générée fait partie du groupe EXAMPLES.
+(pour plus d'information sur doxygen, consulter le site www.doxygen.org).</p>
+<p>Pour finir, nous mettons à jour le Makefile avec le nouveau nom de composant:</p>
+<pre class="literal-block">
+IDL_FILES = HEXA_Gen.idl
+</pre>
+</div>
+<div class="section" id="impl-mentation-c">
+<h1><a class="toc-backref" href="#id5" name="impl-mentation-c">5   Implémentation C++</a></h1>
+<div class="section" id="les-sources">
+<h2><a class="toc-backref" href="#id6" name="les-sources">5.1   Les sources</a></h2>
+<p>L'implémentation C++ de notre module CORBA HEXA (interface idl HEXA_Gen) est faite dans le répertoire
+/src/HEXA:</p>
+<pre class="literal-block">
+HEXA.hxx
+HEXA.cxx
+</pre>
+<p>Au début du header de notre module (HEXA.hxx), les inclusions suivantes sont
+nécessaires:</p>
+<pre class="literal-block">
+#include &lt;SALOMEconfig.h&gt;
+#include CORBA_SERVER_HEADER(HEXA_Gen)
+#include &quot;SALOME_Component_i.hxx&quot;
+</pre>
+<p>Le fichier SALOMEconfig.h contient un certain nombre de définitions utiles
+pour assurer l'indépendance du code par rapport à la version de CORBA
+utilisée. SALOME_Component_i.hxx contient l'interface de la classe
+d'implémentation C++ du composant de base Salome (idl Engines::Component).
+Enfin, la macro CORBA_SERVER_HEADER assure l'indépendance des noms de fichiers
+d'inclusion par rapport à l'implémentation de l'ORB CORBA.</p>
+<p>Après cela, nous définissons une classe d'implémentation, nommée HEXA, dérivant de
+POA_HEXA_ORB::HEXA_Gen (classe abstraite générée automatiquement par CORBA lors de la
+compilation de l'idl) et de Engines_Component_i (car l'interface idl HEXA_Gen
+dérive de Engines::Component comme tout composant Salome2). Cette classe
+contient un constructeur dont les arguments sont imposés par CORBA, un
+destructeur virtuel, et une méthode makeBanner fournissant le service souhaité:</p>
+<pre class="literal-block">
+class HEXA:
+  public POA_HEXA_ORB::HEXA_Gen,
+  public Engines_Component_i
+{
+public:
+    HEXA(CORBA::ORB_ptr orb,
+            PortableServer::POA_ptr poa,
+            PortableServer::ObjectId * contId,
+            const char *instanceName,
+            const char *interfaceName);
+    virtual ~HEXA();
+    char* makeBanner(const char* name);
+};
+</pre>
+<p>La fonction makeBanner prend comme argument et renvoit un char*, projection C++ du type CORBA/IDL
+string. 
+La documentation complète du mapping c++ de l'IDL est fournie par l'OMG sur
+son site internet : <a class="reference" href="http://www.omg.org/cgi-bin/doc?ptc/00-01-02">http://www.omg.org/cgi-bin/doc?ptc/00-01-02</a>.</p>
+<p>Enfin, nous fournissons l'interface (normalisé) de la fonction HEXAEngine_factory, qui
+sera appelée par le &quot;FactoryServer C++&quot; pour charger le composant HEXA:</p>
+<pre class="literal-block">
+extern &quot;C&quot;
+    PortableServer::ObjectId * HEXAEngine_factory(
+            CORBA::ORB_ptr orb,
+            PortableServer::POA_ptr poa,
+            PortableServer::ObjectId * contId,
+            const char *instanceName,
+            const char *interfaceName);
+</pre>
+<p>Dans le fichier source (HEXA.cxx) se trouvent les définitions 
+du constructeur et de la fonction d'instanciation
+HEXAEngine_factory (toutes deux normalisées!), et de makeBanner:</p>
+<pre class="literal-block">
+char* HEXA::makeBanner(const char* name)
+{
+    string banner=&quot;Hello, &quot;;
+    banner+=name;
+    return CORBA::string_dup(banner.c_str());
+}
+</pre>
+<p>Dans cette fonction, l'emploi de string_dup (fonction déclarée dans le
+namespace CORBA) n'est pas obligatoire (on aurait pu utiliser l'opérateur new),
+mais conseillé car ces fonctions permettent aux ORB d'utiliser des mécanismes
+spéciaux de gestion de la mémoire sans avoir à redéfinir les opérateurs new
+globaux.</p>
+</div>
+<div class="section" id="makefile">
+<h2><a class="toc-backref" href="#id7" name="makefile">5.2   Makefile</a></h2>
+<p>Dans le makefile, il faut définir certaines cibles:</p>
+<pre class="literal-block">
+VPATH=.:&#64;srcdir&#64;:&#64;top_srcdir&#64;/idl
+LIB = libHEXAEngine.la
+LIB_SRC = HEXA.cxx
+LIB_SERVER_IDL = HEXA_Gen.idl
+LIB_CLIENT_IDL = SALOME_Component.idl SALOME_Exception.idl Logger.idl
+CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
+LDFLAGS+= -lSalomeContainer -lOpUtil -L${KERNEL_ROOT_DIR}/lib/salome
+</pre>
+<p>Passons en revue chacune de ces cibles.
+- LIB contient le nom <em>normalisé</em> (lib&lt;Nom_Module&gt;Engine.la) le nom de la
+librairie, LIB_SRC définit le nom des fichiers sources, et VPATH les
+repertoire où l'on peut les trouver.
+- LIB_SERVER_IDL contient le nom des fichiers idl implémentés par le module.
+- LIB_CLIENT_IDL contient le nom des idl où sont définis les services CORBA
+utilisés par le module. HEXA utilise Logger.idl via les macros &quot;MESSAGE&quot;,
+SALOME_Component.idl et SALOME_Exception.idl via l'héritage de HEXA_ORB::
+- Il faut ajouter à CPPFLAGS le chemin pour les fichiers includes utilisés
+(SALOMEconfig.h, SALOME_Component_i.hxx et utilities.h se trouvent dans
+${KERNEL_ROOT_DIR}/include/salome)::
+- La classe HEXA utilise les librairies lib (pour Engines_Component_i) et
+libOptUtil (pour PortableServer et Salome_Exception). On indique donc le nom
+de ces librairies et leur chemin dans LDFLAGS.
+D'autres librairies sont souvent utiles, par exemple libsalomeDS si on
+implémente la persistence, ou libSalomeNS si on utilise le naming service.</p>
+</div>
+</div>
+<div class="section" id="pilotage-du-composant-depuis-python-mode-tui">
+<h1><a class="toc-backref" href="#id8" name="pilotage-du-composant-depuis-python-mode-tui">6   Pilotage du composant depuis Python (mode TUI)</a></h1>
+<p>Lors de la compilation du module, la cible lib du Makefile dans /idl a
+provoqué la génération d'un stub python (souche côté client générée à partir
+de l'idl et offrant une interface dans le langage client - ici python.
+Concrètement, un module python HEXA_ORB contenant une classe
+_objref_HEXA_Gen sont créés, permettant de faire appel aux services de notre
+module C++ depuis python. Mettons ceci en application. Pour cela, nous lançons
+Salome en mode TUI:</p>
+<pre class="literal-block">
+cd $HEXA_ROOT_DIR/bin/salome
+python -i runSalome.py --modules=HEXA --xterm --logger --containers=cpp,python --killall
+</pre>
+<p>Depuis la fenêtre python, nous importons le module LifeCycle, et utilisons ses
+services pour charger notre composant Dans la conteneur C++ FactoryServer:</p>
+<pre class="literal-block">
+&gt;&gt;&gt; import LifeCycleCORBA
+&gt;&gt;&gt; lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
+&gt;&gt;&gt; import HEXA_ORB
+&gt;&gt;&gt; hexa = lcc.FindOrLoadComponent(&quot;FactoryServer&quot;, &quot;HEXA&quot;)
+</pre>
+<p>L'import de HEXA_ORB est nécessaire avant l'appel de FindOrLoadComponent,
+pour permettre de retourner un objet typé (opération de &quot;narrowing&quot;). Sinon,
+l'objet retourné est générique de type Engines::Component. Vérifions que notre
+objet hexa est correctement typé, et appelons le service makeBanner:</p>
+<pre class="literal-block">
+&gt;&gt;&gt; print hexa
+&lt;HEXA_ORB._objref_HEXA_Gen instance at 0x8274e94&gt;
+&gt;&gt;&gt; mybanner=hexa.makeBanner(&quot;Nicolas&quot;)
+&gt;&gt;&gt; print mybanner
+Hello, Nicolas
+</pre>
+<p>Les commandes précédentes ont été regroupées dans la fonction test du script
+/bin/runSalome.py.</p>
+</div>
+<div class="section" id="interface-graphique">
+<h1><a class="toc-backref" href="#id9" name="interface-graphique">7   Interface graphique</a></h1>
+<div class="section" id="introduction">
+<h2><a class="toc-backref" href="#id10" name="introduction">7.1   Introduction</a></h2>
+<p>Pour aller plus loin dans l'intégration de notre module, nous allons ajouter
+une interface graphique (développée en Qt), s'intégrant dans l'interface
+applicative de Salome (IAPP).
+On ne détaillera pas ici le fonctionnement de l'IAPP de Salome, mais pour
+résumer, l'IAPP gère une boucle d'évènements (clics souris, clavier, etc), et
+redirige après traitement ces évènements vers le module actif (le principe est
+qu'à un instant donné, <em>un</em> module est actif. Lorsqu'un module est activé, son
+IHM est chargée dynamiquement).
+Le programmeur de la GUI d'un module a donc à charge de définir les méthodes
+permettant de traiter correctement les évènements transmis. Parmi ces
+méthodes, citons les principales : OnGUIEvent(), OnMousePress(), OnMouseMove(),
+OnKeyPress(), DefinePopup(), CustomPopup().</p>
+</div>
+<div class="section" id="choix-des-widgets">
+<h2><a class="toc-backref" href="#id11" name="choix-des-widgets">7.2   Choix des widgets</a></h2>
+<div class="section" id="description-xml">
+<h3><a class="toc-backref" href="#id12" name="description-xml">7.2.1   Description xml</a></h3>
+<p>La description des items de notre module se fait dans le fichier XML
+/ressources/HEXA_en.xml. Ce fichier est utilisé par l'IAPP pour charger
+dynamiquement l'IHM du module quand celle-ci est activée.
+Le principe est de définir par des balises les menus et boutons souhaités, et
+d'y associer des ID, qui seront récupérés par les fonctions gérant les
+évènemements IHM. Plusieures possibilités sont offertes:</p>
+<ul>
+<li><p class="first">ajout d'items à des menus déjà existant, auquel cas il faut reprendre les
+balises du menu pré-existant, et y ajouter les nouveaux items. Dans
+l'exemple qui suis, on ajoute le Menu <strong>Hello</strong> et l'item <strong>MyNewItem</strong> au
+menu File, dont l'ID vaut 1:</p>
+<pre class="literal-block">
+&lt;menu-item label-id=&quot;File&quot; item-id=&quot;1&quot; pos-id=&quot;&quot;&gt;
+     &lt;submenu label-id=&quot;Hello&quot; item-id=&quot;19&quot; pos-id=&quot;8&quot;&gt;
+        &lt;popup-item item-id=&quot;190&quot; pos-id=&quot;&quot; label-id=&quot;MyNewItem&quot; icon-id=&quot;&quot; tooltip-id=&quot;&quot; accel-id=&quot;&quot; toggle-id=&quot;&quot; execute-action=&quot;&quot;/&gt;
+      &lt;/submenu&gt;
+      &lt;endsubmenu /&gt;
+&lt;/menu-item&gt;
+</pre>
+</li>
+<li><p class="first">Création de nouveaux menus. Pour le module HEXA, nous ajoutons un menu
+HEXA, avec un unique item de label &quot;Get banner&quot;:</p>
+<pre class="literal-block">
+&lt;menubar&gt;
+ &lt;menu-item label-id=&quot;HEXA&quot; item-id=&quot;90&quot; pos-id=&quot;3&quot;&gt;
+  &lt;popup-item item-id=&quot;901&quot; label-id=&quot;Get banner&quot; icon-id=&quot;&quot; tooltip-id=&quot;Get HEXA banner&quot; accel-id=&quot;&quot; toggle-id=&quot;&quot; execute-action=&quot;&quot;/&gt;
+ &lt;/menu-item&gt;
+&lt;/menubar&gt;
+</pre>
+</li>
+<li><p class="first">Ajout d'un bouton dans la barre à boutons. Dans l'exemple suivant, nous
+créons un deuxième point d'entrée pour notre action &quot;Get banner&quot;, sous forme
+d'un bouton associé au même ID &quot;901&quot;. L'icône est spécifiée par la le champ
+icon-id, qui doit être un fichier graphique 20x20 pixels au format png:</p>
+<pre class="literal-block">
+&lt;toolbar label-id=&quot;HEXA&quot;&gt;
+ &lt;toolbutton-item item-id=&quot;901&quot; label-id=&quot;Get banner&quot; icon-id=&quot;ExecHEXA.png&quot;
+tooltip-id=&quot;Get HEXA banner&quot; accel-id=&quot;&quot; toggle-id=&quot;&quot; execute-action=&quot;&quot;/&gt;
+&lt;/toolbar&gt;
+</pre>
+</li>
+</ul>
+</div>
+<div class="section" id="convention">
+<h3><a class="toc-backref" href="#id13" name="convention">7.2.2   Convention</a></h3>
+<p>A chaque menu ou item est associé un ID. Les numéros entre 1 et 40 sont
+réservés à l'IAPP. Les numéros d'ID suivent une certaine règle, quoique
+celle-ci ne soit pas obligatoire. Au menu &quot;HEXA&quot; est associé l'ID 90. Son
+unique item &quot;Get banner&quot; a l'ID 901. Un deuxième item aurait l'ID 902, et un
+sous item l'ID 9021.</p>
+</div>
+</div>
+<div class="section" id="impl-mentation-de-l-ihm">
+<h2><a class="toc-backref" href="#id14" name="impl-mentation-de-l-ihm">7.3   Implémentation de l'IHM</a></h2>
+<p>L'implémentation C++ de l'IHM est faite dans le répertoire /src/HEXAGUI.
+Le header HEXAGUI.h déclare de la classe HEXAGUI, et
+contient des directives Qt (Q_OBJECT). De ce fait, il doit être processé par
+le compilateur moc (Qt Meta Model Compiler). Pour cette raison, l'extension du
+fichier est .h et dans le Makefile nous ajoutons la cible:</p>
+<pre class="literal-block">
+LIB_MOC = HEXAGUI.h
+</pre>
+<p>Le fichier source HEXA.cxx contient la définition des fonctions membres, et
+le Makefile permet de construire une librairie libHEXAGUI (le nom est
+normalisé poour permettre le chargement dynamique : lib&lt;NomModule&gt;GUI.</p>
+<div class="section" id="gestion-des-v-nements">
+<h3><a class="toc-backref" href="#id15" name="gestion-des-v-nements">7.3.1   Gestion des évènements</a></h3>
+<p>Pour l'IHM d'HEXA, nous définissons la fonction HEXAGUI::OnGUIEvent, qui
+sera appelé à chaque évènement. Cette fonction contient essentiellement une
+structure switch permettant de traiter l'ID reçu en argument:</p>
+<pre class="literal-block">
+switch (theCommandID)
+  {
+  case 901:
+    // Traitement de &quot;Get banner&quot;
+    ...
+  case 190:
+    // Traitement de &quot;MyNewItem&quot;
+    ...
+  }
+</pre>
+<p>Le traitement standard consiste à récupérer des données d'entrée (ici, le
+prénom via une fenêtre de dialogue QInputDialog::getText), à récupérer une
+poignée sur le composant CORBA interfacé afin d'appeler le service souhaité
+(ici, getBanner), et d'afficher le résultat obtenu ().</p>
+</div>
+<div class="section" id="classes-disponibles">
+<h3><a class="toc-backref" href="#id16" name="classes-disponibles">7.3.2   Classes disponibles</a></h3>
+<p>Pour les dialogues avec l'utilisateur, il est possible d'utiliser n'importe
+quelle classe fournie par Qt (<a class="reference" href="http://doc.trolltech.com/3.2/classes.html">http://doc.trolltech.com/3.2/classes.html</a>). 
+Cependant, lorque c'eset possible, il est préférable d'utiliser les fonctions
+QAD (Qt Application Desktop), définies dans KERNEL_SRC/src/SALOMEGUI, qui
+encapsulent les fonctions Qt correspondantes et gèrent mieux les
+communications avec l'IAPP. Ainsi, dans HEXAGUI, nous utilisons la classe
+QAD_MessageBox en lieu et place de la classe Qt QMessageBox.</p>
+</div>
+<div class="section" id="gestion-du-multi-linguisme">
+<h3><a class="toc-backref" href="#id17" name="gestion-du-multi-linguisme">7.3.3   Gestion du multi-linguisme</a></h3>
+<p>Qt fournit un outil d'aide au support du multi-linguisme. Celui-ci est
+repris dans salome. Le principe est simple : toutes les chaînes de caractères
+utilisées pour les labels des menus et les dialogues avec l'utilisateur 
+sont encapsulés dans des appels à la fonction Qt tr() (pour translate), qui
+prend en argument un nom de label. Par exemple, pour demander à l'utilisateur
+de rentrer un prénom, nous utilisons la fonction getText, où les deux premiers
+arguments sont des labels encapsulés par tr():</p>
+<pre class="literal-block">
+myName = QInputDialog::getText( tr(&quot;QUE_HEXA_LABEL&quot;), tr(&quot;QUE_HEXA_NAME&quot;),
+                                QLineEdit::Normal, QString::null, &amp;ok);
+</pre>
+<p>Le nom des label est préfixé à titre indicatif par trois lettres et un underscore. Les codes
+suivants sont utilisés:</p>
+<pre class="literal-block">
+- MEN_ : label menu
+- BUT_ : label bouton
+- TOT_ : aide tooltip
+- ERR_ : message d'erreur
+- WRN_ : message d'alerte
+- INF_ : message d'information
+- QUE_ : question
+- PRP_ : prompt dans la barre des status
+</pre>
+<p>La traduction des labels encapsulés par tr() est faite pour différents
+langages cibles (par exemple français et anglais) dans des fichiers nommés &quot;&lt;nom_module&gt;_msg_&lt;langage&gt;.po&quot;. 
+&lt;langage&gt; correspond au code du langage, on a choisi <strong>en</strong> pour l'anglais et
+<strong>fr</strong> pour le français. Ce fichier doit contenir pour chaque clé sa
+traduction, par exemple:</p>
+<pre class="literal-block">
+msgid &quot;HEXAGUI::INF_HEXA_BANNER&quot;
+msgstr &quot;HEXA Information&quot;
+</pre>
+<p>Le squelette de ce fichier peut être généré par l'utilitaire Qt findtr:</p>
+<pre class="literal-block">
+findtr HEXAGUI.cxx &gt; HEXA_msg_en.po
+</pre>
+<p>puis éditer le fichier HEXA_msg_en.po pour remplir les traductions.
+Ces fichiers sont ensuite compilés par l'utilitaire <strong>msg2qm</strong> pour générer
+des binaires <em>.qm</em>. Pour cela, il faut remplir la cible LIB_MOC dans le
+Makefile:</p>
+<pre class="literal-block">
+PO_FILES =  HEXA_msg_en.po HEXA_msg_fr.po
+</pre>
+<p>Pour l'utilisateur final, le choix du langage se fait au niveau de chaque
+module dans le fichier ressources/config, en utilisant la commande:</p>
+<pre class="literal-block">
+langage=&lt;langage&gt;
+</pre>
+</div>
+</div>
+</div>
+<div class="section" id="r-gles-syntaxiques-de-nommage">
+<h1><a class="toc-backref" href="#id18" name="r-gles-syntaxiques-de-nommage">8   Règles syntaxiques de nommage</a></h1>
+<p>Dans ce qui précède, nous avons utilisé un certain nombre de règles de
+nommage. Le présent chapitre se propose de faire le point sur ces règles.
+Celles-ci ne sont pas toutes obligatoires, mais simplifient la compréhension
+si on les suit!</p>
+<table class="table" frame="border" rules="all">
+<colgroup>
+<col width="21%" />
+<col width="20%" />
+<col width="17%" />
+<col width="42%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th>Règle</th>
+<th>Formalisme</th>
+<th>Exemple HEXA</th>
+<th>Commentaire</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td>Nom du module</td>
+<td>&lt;Module&gt;</td>
+<td>HEXA</td>
+<td>C'est le nom qui figure dans le
+catalogue des modules</td>
+</tr>
+<tr><td>Base CVS</td>
+<td>&lt;Module&gt;</td>
+<td>EXAMPLES</td>
+<td>Si la base cvs contient plusieurs
+modules, on prend un autre nom</td>
+</tr>
+<tr><td>Repertoire source</td>
+<td>&lt;Module&gt;_SRC</td>
+<td>HEXA1_SRC</td>
+<td>L'indice 1 est utilisé car on prévoit
+plusieurs version du module</td>
+</tr>
+<tr><td>Fichier idl</td>
+<td>&lt;Module&gt;_Gen.idl</td>
+<td>HEXA_Gen.idl</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td>Nom du module
+CORBA</td>
+<td>&lt;Module&gt;_ORB</td>
+<td>HEXA_ORB</td>
+<td>On évite d'utiliser le nom du module
+(conflits)</td>
+</tr>
+<tr><td>Nom de
+l'interface CORBA</td>
+<td>&lt;Module&gt;_Gen</td>
+<td>HEXA_Gen</td>
+<td>La compilation de l'idl génère une
+classe abstraite
+POA_&lt;Module&gt;_ORB::&lt;Module&gt;_Gen</td>
+</tr>
+<tr><td>fichier source</td>
+<td>&lt;Module&gt;.cxx</td>
+<td>HEXA.cxx</td>
+<td>Dans le répertoire /src/&lt;Module&gt;</td>
+</tr>
+<tr><td>Classe
+d'implémentation</td>
+<td>&lt;Module&gt;</td>
+<td>HEXA</td>
+<td>Cette classe hérite de
+POA_HEXA_ORB::HEXA_Gen</td>
+</tr>
+<tr><td>Fonction
+d'instanciation</td>
+<td>&lt;Module&gt;_
+Engine_factory</td>
+<td>HEXA_Engine
+factory</td>
+<td>Cette fonction est appelée par
+le FactoryServer de Salome</td>
+</tr>
+<tr><td>Catalogue des
+modules</td>
+<td>&lt;Module&gt;Catalog
+.xml</td>
+<td>HEXACatalog
+.xml</td>
+<td>Dans /ressources</td>
+</tr>
+<tr><td>Nom de la
+librairie C++</td>
+<td>lib&lt;Module&gt;Engine</td>
+<td>libHEXAEngine</td>
+<td>Dans le répertoire /src/&lt;Module&gt;</td>
+</tr>
+<tr><td>Librairie C++
+de l'IHM</td>
+<td>lib&lt;Module&gt;GUI</td>
+<td>libHEXAGUI</td>
+<td>Dans le répertoire /src/&lt;Module&gt;GUI</td>
+</tr>
+<tr><td>Variable
+d'environnement</td>
+<td>&lt;Module&gt;_ROOT_DIR</td>
+<td>HEXA_ROOT_DIR</td>
+<td>&nbsp;</td>
+</tr>
+<tr><td><p class="last">...</p>
+</td>
+<td><p class="last">...</p>
+</td>
+<td><p class="last">...</p>
+</td>
+<td><p class="last">...</p>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/dev_guide.txt b/doc/dev_guide.txt
new file mode 100755 (executable)
index 0000000..77522b3
--- /dev/null
@@ -0,0 +1,477 @@
+===========================================================
+Guide pour le développement d'un module SALOME 2 en C++
+===========================================================
+
+:Auteur: Crouzet N.
+
+.. contents::
+.. sectnum::
+
+Présentation
+=========================
+Ce document a pour objectif de décrire les différentes étapes
+du développement d'un module SALOME 2 en C++.
+Il fait suite au document "Guide pour le développement d'un module SALOME 2 en
+Python", qui documente de module PYHEXA, et en reprend la démarche :
+construction pas à pas d'un module HEXA.
+Comme de nombreux points ne sont pas repris, il est recommendé de lire ce
+document préalablement.
+
+
+Les étapes de construction du module exemple
+====================================================
+Le composant choisi pour illustrer le processus de construction en C++
+est le même que celui choisi pour illustrer la construction du module python :
+il implémentera donc la même interface idl Corba.
+Il sera complété par un GUI graphique écrit en Qt.
+
+Les différentes étapes du développement seront les suivantes :
+
+  - créer une arborescence de module
+  - créer un composant SALOME 2 chargeable par un container C++
+  - configurer le module pour que le composant soit connu de SALOME
+  - ajouter un GUI graphique
+  - rendre le composant utilisable dans le superviseur
+
+Création de l'arborescence du module
+=======================================
+Dans un premier temps, on se contentera de mettre dans le module exemple un composant
+SALOME écrit en C++ qui sera chargeable par un container C++.
+Il suffit donc d'une interface idl et d'une implantation C++ du composant.
+Pour mettre en oeuvre ceci dans un module SALOME 2, il nous faut reproduire l'arborescence de
+fichier standard suivante::
+
+  + HEXA1_SRC
+    + build_configure
+    + configure.in.base
+    + Makefile.in
+    + adm_local
+      + unix
+        + make_commence.in
+        + make_omniorb.in
+        + config_files
+    + bin
+      + VERSION
+      + runAppli.in
+      + runSalome.py
+    + idl
+      + Makefile.in
+      + HEXA_Gen.idl
+    + src
+      + Makefile.in
+      + HEXA
+        + Makefile.in
+        + HEXA.cxx 
+        + HEXA.hxx 
+    + doc
+
+Pour cela, on recopie l'arborescence de PYHEXA, et on modifie où nécessaire
+PYHEXA en HEXA::
+
+    cp -r PYHEXA1_SRC HEXA1_SRC
+    cd HEXA1_SRC
+    mv idl/PYHEXA_Gen.idl idl/HEXA_Gen.idl
+    mv src/PYHEXA src/HEXA
+
+
+Interface idl
+==================
+Dans le répertoire idl, nous modifions le fichier idl HEXA_Gen.idl : le
+module défini est renommé HEXA_ORB, et l'interface en HEXA_Gen.
+Le service rendu reste le même : à partir d'une chaine de caractères
+fournie comme unique argument, retour d'une chaine de caractères obtenue
+par concaténation de "Hello, " et de la chaine d'entrée.
+Ce service est spécifié par la fonction makeBanner.
+
+Un utilitaire de documentation basé sur doxygen a été mis en place pour
+compiler une documentation des services corba à partir de commentaires se
+trouvant dans les fichiers idl. Nous rajouter donc à notre idl quelques
+commentaires, en respectant le formalisme doxygen.
+Un commentaire doxygen commence par "/*!" et se finit pas "*/".
+Pour structurer un minimum les pages générées, on les regroupes par module ou
+sujet. Dans notre exemple, nous utilisons la directive::
+
+    \ingroup EXAMPLES 
+
+spécifiant que la documentation générée fait partie du groupe EXAMPLES.
+(pour plus d'information sur doxygen, consulter le site www.doxygen.org).
+
+Pour finir, nous mettons à jour le Makefile avec le nouveau nom de composant::
+    
+    IDL_FILES = HEXA_Gen.idl
+
+
+Implémentation C++
+==================
+
+Les sources
+-----------
+
+L'implémentation C++ de notre module CORBA HEXA (interface idl HEXA_Gen) est faite dans le répertoire
+/src/HEXA::
+
+    HEXA.hxx
+    HEXA.cxx
+
+Au début du header de notre module (HEXA.hxx), les inclusions suivantes sont
+nécessaires::
+
+    #include <SALOMEconfig.h>
+    #include CORBA_SERVER_HEADER(HEXA_Gen)
+    #include "SALOME_Component_i.hxx"
+
+Le fichier SALOMEconfig.h contient un certain nombre de définitions utiles
+pour assurer l'indépendance du code par rapport à la version de CORBA
+utilisée. SALOME_Component_i.hxx contient l'interface de la classe
+d'implémentation C++ du composant de base Salome (idl Engines::Component).
+Enfin, la macro CORBA_SERVER_HEADER assure l'indépendance des noms de fichiers
+d'inclusion par rapport à l'implémentation de l'ORB CORBA.
+
+Après cela, nous définissons une classe d'implémentation, nommée HEXA, dérivant de
+POA_HEXA_ORB::HEXA_Gen (classe abstraite générée automatiquement par CORBA lors de la
+compilation de l'idl) et de Engines_Component_i (car l'interface idl HEXA_Gen
+dérive de Engines::Component comme tout composant Salome2). Cette classe
+contient un constructeur dont les arguments sont imposés par CORBA, un
+destructeur virtuel, et une méthode makeBanner fournissant le service souhaité::
+
+    class HEXA:
+      public POA_HEXA_ORB::HEXA_Gen,
+      public Engines_Component_i
+    {
+    public:
+       HEXA(CORBA::ORB_ptr orb,
+               PortableServer::POA_ptr poa,
+               PortableServer::ObjectId * contId,
+               const char *instanceName,
+               const char *interfaceName);
+       virtual ~HEXA();
+       char* makeBanner(const char* name);
+    };
+
+La fonction makeBanner prend comme argument et renvoit un char*, projection C++ du type CORBA/IDL
+string. 
+La documentation complète du mapping c++ de l'IDL est fournie par l'OMG sur
+son site internet : http://www.omg.org/cgi-bin/doc?ptc/00-01-02.
+
+Enfin, nous fournissons l'interface (normalisé) de la fonction HEXAEngine_factory, qui
+sera appelée par le "FactoryServer C++" pour charger le composant HEXA::
+
+    extern "C"
+       PortableServer::ObjectId * HEXAEngine_factory(
+               CORBA::ORB_ptr orb,
+               PortableServer::POA_ptr poa,
+               PortableServer::ObjectId * contId,
+               const char *instanceName,
+               const char *interfaceName);
+
+Dans le fichier source (HEXA.cxx) se trouvent les définitions 
+du constructeur et de la fonction d'instanciation
+HEXAEngine_factory (toutes deux normalisées!), et de makeBanner::
+
+    char* HEXA::makeBanner(const char* name)
+    {
+       string banner="Hello, ";
+       banner+=name;
+       return CORBA::string_dup(banner.c_str());
+    }
+
+Dans cette fonction, l'emploi de string_dup (fonction déclarée dans le
+namespace CORBA) n'est pas obligatoire (on aurait pu utiliser l'opérateur new),
+mais conseillé car ces fonctions permettent aux ORB d'utiliser des mécanismes
+spéciaux de gestion de la mémoire sans avoir à redéfinir les opérateurs new
+globaux.
+
+Makefile
+--------
+
+Dans le makefile, il faut définir certaines cibles::
+
+    VPATH=.:@srcdir@:@top_srcdir@/idl
+    LIB = libHEXAEngine.la
+    LIB_SRC = HEXA.cxx
+    LIB_SERVER_IDL = HEXA_Gen.idl
+    LIB_CLIENT_IDL = SALOME_Component.idl SALOME_Exception.idl Logger.idl
+    CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
+    LDFLAGS+= -lSalomeContainer -lOpUtil -L${KERNEL_ROOT_DIR}/lib/salome
+
+Passons en revue chacune de ces cibles.
+- LIB contient le nom *normalisé* (lib<Nom_Module>Engine.la) le nom de la
+librairie, LIB_SRC définit le nom des fichiers sources, et VPATH les
+repertoire où l'on peut les trouver.
+- LIB_SERVER_IDL contient le nom des fichiers idl implémentés par le module.
+- LIB_CLIENT_IDL contient le nom des idl où sont définis les services CORBA
+utilisés par le module. HEXA utilise Logger.idl via les macros "MESSAGE",
+SALOME_Component.idl et SALOME_Exception.idl via l'héritage de HEXA_ORB::
+- Il faut ajouter à CPPFLAGS le chemin pour les fichiers includes utilisés
+(SALOMEconfig.h, SALOME_Component_i.hxx et utilities.h se trouvent dans
+${KERNEL_ROOT_DIR}/include/salome)::
+- La classe HEXA utilise les librairies lib (pour Engines_Component_i) et
+libOptUtil (pour PortableServer et Salome_Exception). On indique donc le nom
+de ces librairies et leur chemin dans LDFLAGS.
+D'autres librairies sont souvent utiles, par exemple libsalomeDS si on
+implémente la persistence, ou libSalomeNS si on utilise le naming service.
+
+
+Pilotage du composant depuis Python (mode TUI)
+==============================================
+
+Lors de la compilation du module, la cible lib du Makefile dans /idl a
+provoqué la génération d'un stub python (souche côté client générée à partir
+de l'idl et offrant une interface dans le langage client - ici python.
+Concrètement, un module python HEXA_ORB contenant une classe
+_objref_HEXA_Gen sont créés, permettant de faire appel aux services de notre
+module C++ depuis python. Mettons ceci en application. Pour cela, nous lançons
+Salome en mode TUI::
+
+    cd $HEXA_ROOT_DIR/bin/salome
+    python -i runSalome.py --modules=HEXA --xterm --logger --containers=cpp,python --killall
+
+Depuis la fenêtre python, nous importons le module LifeCycle, et utilisons ses
+services pour charger notre composant Dans la conteneur C++ FactoryServer::
+
+    >>> import LifeCycleCORBA
+    >>> lcc = LifeCycleCORBA.LifeCycleCORBA(clt.orb)
+    >>> import HEXA_ORB
+    >>> hexa = lcc.FindOrLoadComponent("FactoryServer", "HEXA")
+
+L'import de HEXA_ORB est nécessaire avant l'appel de FindOrLoadComponent,
+pour permettre de retourner un objet typé (opération de "narrowing"). Sinon,
+l'objet retourné est générique de type Engines::Component. Vérifions que notre
+objet hexa est correctement typé, et appelons le service makeBanner::
+
+    >>> print hexa
+    <HEXA_ORB._objref_HEXA_Gen instance at 0x8274e94>
+    >>> mybanner=hexa.makeBanner("Nicolas")
+    >>> print mybanner
+    Hello, Nicolas
+
+Les commandes précédentes ont été regroupées dans la fonction test du script
+/bin/runSalome.py.
+
+
+Interface graphique
+===================
+
+Introduction
+------------
+
+Pour aller plus loin dans l'intégration de notre module, nous allons ajouter
+une interface graphique (développée en Qt), s'intégrant dans l'interface
+applicative de Salome (IAPP).
+On ne détaillera pas ici le fonctionnement de l'IAPP de Salome, mais pour
+résumer, l'IAPP gère une boucle d'évènements (clics souris, clavier, etc), et
+redirige après traitement ces évènements vers le module actif (le principe est
+qu'à un instant donné, *un* module est actif. Lorsqu'un module est activé, son
+IHM est chargée dynamiquement).
+Le programmeur de la GUI d'un module a donc à charge de définir les méthodes
+permettant de traiter correctement les évènements transmis. Parmi ces
+méthodes, citons les principales : OnGUIEvent(), OnMousePress(), OnMouseMove(),
+OnKeyPress(), DefinePopup(), CustomPopup().
+
+Choix des widgets
+-----------------
+
+Description xml
+```````````````
+La description des items de notre module se fait dans le fichier XML
+/ressources/HEXA_en.xml. Ce fichier est utilisé par l'IAPP pour charger
+dynamiquement l'IHM du module quand celle-ci est activée.
+Le principe est de définir par des balises les menus et boutons souhaités, et
+d'y associer des ID, qui seront récupérés par les fonctions gérant les
+évènemements IHM. Plusieures possibilités sont offertes:
+
+- ajout d'items à des menus déjà existant, auquel cas il faut reprendre les
+  balises du menu pré-existant, et y ajouter les nouveaux items. Dans
+  l'exemple qui suis, on ajoute le Menu **Hello** et l'item **MyNewItem** au
+  menu File, dont l'ID vaut 1::
+
+    <menu-item label-id="File" item-id="1" pos-id="">
+        <submenu label-id="Hello" item-id="19" pos-id="8">
+           <popup-item item-id="190" pos-id="" label-id="MyNewItem" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+         </submenu>
+         <endsubmenu />
+    </menu-item>
+
+- Création de nouveaux menus. Pour le module HEXA, nous ajoutons un menu
+  HEXA, avec un unique item de label "Get banner"::
+
+    <menubar>
+     <menu-item label-id="HEXA" item-id="90" pos-id="3">
+      <popup-item item-id="901" label-id="Get banner" icon-id="" tooltip-id="Get HEXA banner" accel-id="" toggle-id="" execute-action=""/>
+     </menu-item>
+    </menubar>
+
+- Ajout d'un bouton dans la barre à boutons. Dans l'exemple suivant, nous
+  créons un deuxième point d'entrée pour notre action "Get banner", sous forme
+  d'un bouton associé au même ID "901". L'icône est spécifiée par la le champ
+  icon-id, qui doit être un fichier graphique 20x20 pixels au format png::
+
+    <toolbar label-id="HEXA">
+     <toolbutton-item item-id="901" label-id="Get banner" icon-id="ExecHEXA.png"
+    tooltip-id="Get HEXA banner" accel-id="" toggle-id="" execute-action=""/>
+    </toolbar>
+
+Convention
+``````````
+A chaque menu ou item est associé un ID. Les numéros entre 1 et 40 sont
+réservés à l'IAPP. Les numéros d'ID suivent une certaine règle, quoique
+celle-ci ne soit pas obligatoire. Au menu "HEXA" est associé l'ID 90. Son
+unique item "Get banner" a l'ID 901. Un deuxième item aurait l'ID 902, et un
+sous item l'ID 9021.
+
+
+Implémentation de l'IHM
+-----------------------
+
+L'implémentation C++ de l'IHM est faite dans le répertoire /src/HEXAGUI.
+Le header HEXAGUI.h déclare de la classe HEXAGUI, et
+contient des directives Qt (Q_OBJECT). De ce fait, il doit être processé par
+le compilateur moc (Qt Meta Model Compiler). Pour cette raison, l'extension du
+fichier est .h et dans le Makefile nous ajoutons la cible::
+
+       LIB_MOC = HEXAGUI.h
+
+Le fichier source HEXA.cxx contient la définition des fonctions membres, et
+le Makefile permet de construire une librairie libHEXAGUI (le nom est
+normalisé poour permettre le chargement dynamique : lib<NomModule>GUI.
+
+Gestion des évènements
+``````````````````````
+Pour l'IHM d'HEXA, nous définissons la fonction HEXAGUI::OnGUIEvent, qui
+sera appelé à chaque évènement. Cette fonction contient essentiellement une
+structure switch permettant de traiter l'ID reçu en argument::
+
+  switch (theCommandID)
+    {
+    case 901:
+      // Traitement de "Get banner"
+      ...
+    case 190:
+      // Traitement de "MyNewItem"
+      ...
+    }
+
+Le traitement standard consiste à récupérer des données d'entrée (ici, le
+prénom via une fenêtre de dialogue QInputDialog::getText), à récupérer une
+poignée sur le composant CORBA interfacé afin d'appeler le service souhaité
+(ici, getBanner), et d'afficher le résultat obtenu ().
+
+Classes disponibles
+````````````````````
+Pour les dialogues avec l'utilisateur, il est possible d'utiliser n'importe
+quelle classe fournie par Qt (http://doc.trolltech.com/3.2/classes.html). 
+Cependant, lorque c'eset possible, il est préférable d'utiliser les fonctions
+QAD (Qt Application Desktop), définies dans KERNEL_SRC/src/SALOMEGUI, qui
+encapsulent les fonctions Qt correspondantes et gèrent mieux les
+communications avec l'IAPP. Ainsi, dans HEXAGUI, nous utilisons la classe
+QAD_MessageBox en lieu et place de la classe Qt QMessageBox.
+
+
+Gestion du multi-linguisme
+``````````````````````````
+Qt fournit un outil d'aide au support du multi-linguisme. Celui-ci est
+repris dans salome. Le principe est simple : toutes les chaînes de caractères
+utilisées pour les labels des menus et les dialogues avec l'utilisateur 
+sont encapsulés dans des appels à la fonction Qt tr() (pour translate), qui
+prend en argument un nom de label. Par exemple, pour demander à l'utilisateur
+de rentrer un prénom, nous utilisons la fonction getText, où les deux premiers
+arguments sont des labels encapsulés par tr()::
+
+        myName = QInputDialog::getText( tr("QUE_HEXA_LABEL"), tr("QUE_HEXA_NAME"),
+                                        QLineEdit::Normal, QString::null, &ok);
+
+Le nom des label est préfixé à titre indicatif par trois lettres et un underscore. Les codes
+suivants sont utilisés::
+
+ - MEN_ : label menu
+ - BUT_ : label bouton
+ - TOT_ : aide tooltip
+ - ERR_ : message d'erreur
+ - WRN_ : message d'alerte
+ - INF_ : message d'information
+ - QUE_ : question
+ - PRP_ : prompt dans la barre des status
+
+
+La traduction des labels encapsulés par tr() est faite pour différents
+langages cibles (par exemple français et anglais) dans des fichiers nommés "<nom_module>_msg_<langage>.po". 
+<langage> correspond au code du langage, on a choisi **en** pour l'anglais et
+**fr** pour le français. Ce fichier doit contenir pour chaque clé sa
+traduction, par exemple::
+
+    msgid "HEXAGUI::INF_HEXA_BANNER"
+    msgstr "HEXA Information"
+
+Le squelette de ce fichier peut être généré par l'utilitaire Qt findtr::
+
+    findtr HEXAGUI.cxx > HEXA_msg_en.po
+
+puis éditer le fichier HEXA_msg_en.po pour remplir les traductions.
+Ces fichiers sont ensuite compilés par l'utilitaire **msg2qm** pour générer
+des binaires *.qm*. Pour cela, il faut remplir la cible LIB_MOC dans le
+Makefile::
+
+    PO_FILES =  HEXA_msg_en.po HEXA_msg_fr.po
+
+Pour l'utilisateur final, le choix du langage se fait au niveau de chaque
+module dans le fichier ressources/config, en utilisant la commande::
+
+    langage=<langage>
+
+
+
+Règles syntaxiques de nommage
+=============================
+
+Dans ce qui précède, nous avons utilisé un certain nombre de règles de
+nommage. Le présent chapitre se propose de faire le point sur ces règles.
+Celles-ci ne sont pas toutes obligatoires, mais simplifient la compréhension
+si on les suit!
+
++-------------------+------------------+----------------+---------------------------------------+
+| Règle             | Formalisme       | Exemple HEXA  | Commentaire                           |
++===================+==================+================+=======================================+
+| Nom du module     | <Module>         | HEXA          | C'est le nom qui figure dans le       |
+|                   |                  |                | catalogue des modules                 |
++-------------------+------------------+----------------+---------------------------------------+
+| Base CVS          | <Module>         | EXAMPLES       | Si la base cvs contient plusieurs     | 
+|                   |                  |                | modules, on prend un autre nom        |
++-------------------+------------------+----------------+---------------------------------------+
+| Repertoire source | <Module>_SRC     | HEXA1_SRC     | L'indice 1 est utilisé car on prévoit |
+|                   |                  |                | plusieurs version du module           |
++-------------------+------------------+----------------+---------------------------------------+
+| Fichier idl       | <Module>_Gen.idl | HEXA_Gen.idl  |                                       |
+|                   |                  |                |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+| Nom du module     | <Module>_ORB     | HEXA_ORB      | On évite d'utiliser le nom du module  |
+| CORBA             |                  |                | (conflits)                            |
++-------------------+------------------+----------------+---------------------------------------+
+| Nom de            | <Module>_Gen     | HEXA_Gen      | La compilation de l'idl génère une    |
+| l'interface CORBA |                  |                | classe abstraite                      |
+|                   |                  |                | POA_<Module>_ORB::<Module>_Gen        |
++-------------------+------------------+----------------+---------------------------------------+
+| fichier source    | <Module>.cxx     | HEXA.cxx      | Dans le répertoire /src/<Module>      |
+|                   |                  |                |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+| Classe            | <Module>         | HEXA          | Cette classe hérite de                |
+| d'implémentation  |                  |                | POA_HEXA_ORB::HEXA_Gen              |
++-------------------+------------------+----------------+---------------------------------------+
+| Fonction          | <Module>_        | HEXA_Engine   | Cette fonction est appelée par        |
+| d'instanciation   | Engine_factory   | factory        | le FactoryServer de Salome            |
++-------------------+------------------+----------------+---------------------------------------+
+| Catalogue des     | <Module>Catalog  | HEXACatalog   | Dans /ressources                      |
+| modules           | .xml             | .xml           |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+| Nom de la         | lib<Module>Engine| libHEXAEngine | Dans le répertoire /src/<Module>      |
+| librairie C++     |                  |                |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+| Librairie C++     | lib<Module>GUI   | libHEXAGUI    | Dans le répertoire /src/<Module>GUI   |
+| de l'IHM          |                  |                |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+| Variable          | <Module>_ROOT_DIR| HEXA_ROOT_DIR |                                       |
+| d'environnement   |                  |                |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+| ...               | ...              | ...            | ...                                   |
+|                   |                  |                |                                       |
++-------------------+------------------+----------------+---------------------------------------+
+
diff --git a/idl/CrossElements.idl b/idl/CrossElements.idl
new file mode 100755 (executable)
index 0000000..4035eb3
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef __CrossElements_idl__
+#define __CrossElements_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+#include "Quad.idl"
+#include "Hexa.idl"
+#include "Cylinder.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+
+//   interface CrossElements : Elements
+  interface CrossElements: Element
+  {
+      Hexa getHexaIJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Quad getQuadIJ(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Quad getQuadJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Quad getQuadIK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Edge getEdgeI(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Edge getEdgeJ(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Edge getEdgeK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+      Vertex getVertexIJK(in long part, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception);
+
+      // Tutaux en T (like castles in scotland)
+      long crossCylinders (in Cylinder cyl1, in Cylinder cyl2) raises (SALOME::SALOME_Exception);
+
+      long saveVtk( in string fname );//CS_NOT_SPEC
+  };
+
+};
+
+#endif
diff --git a/idl/Cylinder.idl b/idl/Cylinder.idl
new file mode 100755 (executable)
index 0000000..23219f3
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __Cylinder_idl__
+#define __Cylinder_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Vector.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+    interface Cylinder : Element
+    {
+        Vertex getBase() raises (SALOME::SALOME_Exception);
+        Vector getDirection() raises (SALOME::SALOME_Exception);
+        double getRadius() raises (SALOME::SALOME_Exception);
+        double getHeight() raises (SALOME::SALOME_Exception);
+
+//         long saveVtk( in string fname );//CS_NOT_SPEC
+    };
+};
+
+#endif
+
diff --git a/idl/Document.idl b/idl/Document.idl
new file mode 100755 (executable)
index 0000000..8cb1071
--- /dev/null
@@ -0,0 +1,471 @@
+#ifndef __Document_idl__
+#define __Document_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+// #include "GEOM_Gen.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+
+  interface Element;
+  interface Vertex;
+  interface Edge;
+  interface Quad;
+  interface Hexa;
+  interface Vector;
+  interface Cylinder;
+  interface Pipe;
+  interface Elements;
+  interface CrossElements;
+  interface Law;
+  interface Group;
+  interface Propagation;
+
+  typedef sequence<Quad>  Quads;
+
+  interface Document : SALOME::GenericObj
+  {
+    void purge()
+      raises (SALOME::SALOME_Exception);
+    /*!
+    */
+    string getFile()
+      raises (SALOME::SALOME_Exception);
+
+    void setFile( in string fileName )
+      raises (SALOME::SALOME_Exception);
+
+    boolean isSavedFile()
+      raises (SALOME::SALOME_Exception);
+
+//     void saveFile() 
+    long saveFile() //CS_NOT_SPEC
+      raises (SALOME::SALOME_Exception);
+
+    long saveVtk( in string fname );//CS_NOT_SPEC
+
+    /*!
+    */
+    void setTolerance( in double tol ) raises (SALOME::SALOME_Exception);
+    double getTolerance() raises (SALOME::SALOME_Exception);
+
+    /*!
+        Sommets
+    */
+    Vertex addVertex( in double x, in double y, in double z )
+        raises (SALOME::SALOME_Exception);
+
+    long countVertex()
+        raises (SALOME::SALOME_Exception);
+
+    Vertex getVertex( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Vertex findVertex( in double x, in double y, in double z )
+        raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Arêtes
+    */
+    Edge addEdge( in Vertex v0, in Vertex v1 )
+        raises (SALOME::SALOME_Exception);
+
+    long countEdge()
+        raises (SALOME::SALOME_Exception);
+
+    Edge getEdge( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Edge findEdge( in Vertex p1, in Vertex p2 )
+        raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Quadrangles
+    */
+    Quad addQuad( in Edge e0, in Edge e1, in Edge e2, in Edge e3 )
+        raises (SALOME::SALOME_Exception);
+
+    Quad addQuadVertices( in Vertex v0, in Vertex v1, in Vertex v2, in Vertex v3 )
+        raises (SALOME::SALOME_Exception);
+
+    long countQuad()
+        raises (SALOME::SALOME_Exception);
+
+    Quad getQuad( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Quad findQuad( in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);
+
+
+
+    /*!
+        Hexaèdre
+    */
+    Hexa addHexa( in Quad q0, in Quad q1, in Quad q2, in Quad q3, in Quad q4, in Quad q5 )
+        raises (SALOME::SALOME_Exception);
+
+    Hexa addHexaVertices( in Vertex v1, in Vertex v2, in Vertex v3, in Vertex v4,
+                  in Vertex v5, in Vertex v6, in Vertex v7, in Vertex v8 )
+        raises (SALOME::SALOME_Exception);
+
+    long countHexa()
+        raises (SALOME::SALOME_Exception);
+
+    Hexa getHexa( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Hexa findHexa( in Vertex p1, in Vertex p2 )
+        raises (SALOME::SALOME_Exception);
+
+
+
+    /*!
+        Vecteurs
+    */
+    Vector addVector( in double dx, in double dy, in double dz )
+        raises (SALOME::SALOME_Exception);
+
+    Vector addVectorVertices( in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);
+
+//     long countVector()
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Vector getVector( in long i )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Cylindre
+    */
+    Cylinder addCylinder( in Vertex base, in Vector direction, in double radius, in double height )
+        raises (SALOME::SALOME_Exception);
+
+//     long countCylinder()
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Cylinder getCylinder( in long i )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Pipe
+    */
+    Pipe addPipe( in Vertex base, in Vector direction,
+                  in double int_radius, in double ext_radius, 
+                  in double height )
+        raises (SALOME::SALOME_Exception);
+
+//     long countPipe()
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Pipe getPipe( in long i )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Remove block
+    */
+    boolean removeHexa( in Hexa h )
+        raises (SALOME::SALOME_Exception);
+
+    boolean removeConnectedHexa( in Hexa h )
+        raises (SALOME::SALOME_Exception);
+
+   /*!
+       Grille cartésiennes
+   */
+    Elements makeCartesian( in Vertex pt, 
+            in Vector vx, in Vector vy, in Vector vz,
+            in long nx, in long ny, in long nz)
+        raises (SALOME::SALOME_Exception);
+
+    Elements makeCartesian1( in Vertex v, 
+            in Vector v1,
+            in long px, in long py, in long pz,
+            in long mx, in long my, in long mz )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Grille cylindrique
+    */
+    Elements makeCylindrical( in Vertex pt,
+          in Vector vex, in Vector vez,
+          in double dr, in double da, in double dl,
+          in long nr, in long na, in long nl,
+          in boolean fill )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Grille sphérique
+    */
+//     Elements makeSpherical( in Vertex pt,
+//           in double dx,
+//           in double dy,
+//           in double dz,
+//           in long n )
+//         raises (SALOME::SALOME_Exception); //CS_TODO
+
+    Elements makeSpherical( in Vertex pt,
+        in Vector dv,
+        in long n,
+        in double k )
+        raises (SALOME::SALOME_Exception); //CS_TO_DEL
+
+
+    /*!
+        Cylindre découpé en blocs
+    */
+//     Elements makeCylinder( in Cylinder cyl, in long nr, in long na, in long nl )
+//         raises (SALOME::SALOME_Exception);//CS_TODO
+    Elements makeCylinder( in Cylinder cyl, in Vector vr, in long nr, in long na, in long nl )
+        raises (SALOME::SALOME_Exception);//CS_NEW CS_NOT_SPEC
+   
+
+    /*!
+        Tuyau découpé en blocs
+    */
+//     Elements makePipe( in Pipe p, in long nr, in long na, in long nl )
+//         raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        2 Cylindres en T découpés en blocs
+    */
+    CrossElements makeCylinders( in Cylinder c1, in Cylinder c2 )
+      raises (SALOME::SALOME_Exception);//CS_NEW CS_NOT_SPEC
+
+    /*!
+        2 Tuyau découpé en intersection découpés en blocs
+    */
+//     Elements makePipes( in Pipe p1, in long n1r, in long n1a, in long n1l,
+//                         in Pipe p2, in long n2r, in long n2a, in long n2l )
+//         raises (SALOME::SALOME_Exception);
+
+    /*!
+        Prismer des quadrangles
+    */
+    Elements prismQuad( in Quad qd, in Vector v, in long nb )
+        raises (SALOME::SALOME_Exception);
+
+    Elements prismQuads( in Quads qds, in Vector v, in long nb )
+        raises (SALOME::SALOME_Exception); //CS_NEW
+
+    Elements joinQuad( in Quad qa, in Quad qb,
+                       in Vertex va1, in Vertex vb1,
+                       in Vertex va2, in Vertex vb2,
+                       in long nb )
+        raises (SALOME::SALOME_Exception);
+
+    Elements joinQuads( in Quads qds,
+                        in Quad qb,
+                        in Vertex va1, in Vertex vb1,
+                        in Vertex va2, in Vertex vb2,
+                        in long nb )
+        raises (SALOME::SALOME_Exception);
+// 
+// 
+//     /*!
+//         Fusionner 2 Ã©léments de même nature //CS_NOT_SPEC
+//     */
+
+//     Elements mergeQuads( in Quad qa, in Quad qb,
+//                         in Vertex va1, in Vertex vb1,
+//                         in Vertex va2, in Vertex vb2 )
+//         raises (SALOME::SALOME_Exception);
+
+    long mergeQuads( in Quad qa, in Quad qb,
+                        in Vertex va1, in Vertex vb1,
+                        in Vertex va2, in Vertex vb2 )
+        raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW
+
+// 
+//     Elements mergeEdges( in Edge e1, in Edge e2,
+//                         in Vertex v1, in Vertex v2 )
+//         raises (SALOME::SALOME_Exception);
+
+    long mergeEdges( in Edge e1, in Edge e2,
+                        in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW
+
+//     Elements mergeVertices( in Vertex v1, in Vertex v2 )
+//         raises (SALOME::SALOME_Exception);
+    long mergeVertices( in Vertex v1, in Vertex v2 )
+        raises (SALOME::SALOME_Exception);//CS_NOT_SPEC //CS_NEW
+
+
+    /*!
+        Déconnecter des Ã©léments du modèle
+    */
+    Elements disconnectQuad( in Hexa h, in Quad q )  //CS_NOT_SPEC
+//     long disconnectQuad( in Hexa h, in Quad q )//CS_NOT_SPEC
+//         raises (SALOME::SALOME_Exception);
+//     Quad disconnectQuad( in Hexa h, in Quad q )//CS_NOT_SPEC
+        raises (SALOME::SALOME_Exception);
+
+    Elements disconnectEdge( in Hexa h, in Edge e )//CS_NOT_SPEC
+       raises (SALOME::SALOME_Exception);
+//     Elements disconnectEdge( in Hexa h, in Edge e )
+//     long disconnectEdge( in Hexa h, in Edge e ) 
+//     Edge disconnectEdge( in Hexa h, in Edge e ) //CS_NOT_SPEC
+//         raises (SALOME::SALOME_Exception);
+
+    Elements disconnectVertex( in Hexa h, in Vertex v )//CS_NOT_SPEC
+//     long disconnectVertex( in Hexa h, in Vertex v )
+//     Vertex disconnectVertex( in Hexa h, in Vertex v ) //CS_NOT_SPEC
+        raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Couper des hexaèdres du modèle
+    */
+    Elements cut( in Edge e, in long nb_of_cuts )
+        raises (SALOME::SALOME_Exception);
+
+    /*!
+        Make elements by transforming elements
+    */
+//     Elements makeTranslation( in Element e, in Vector vec )
+//         raises (SALOME::SALOME_Exception);
+    Elements makeTranslation( in Elements l, in Vector vec )
+        raises (SALOME::SALOME_Exception);
+// 
+//     Elements makeScale( in Vertex e, in Vertex ver, in double k )
+//         raises (SALOME::SALOME_Exception);
+// 
+    Elements makeRotation(in Elements l, in Vertex ver, in Vector vec, in double angle)
+        raises (SALOME::SALOME_Exception);
+// 
+//     Elements makeSymmetryPoint(in Element e, in Vertex ver)
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Elements makeSymmetryLine(in Element e, in Vertex ver, in Vector vec)
+//         raises (SALOME::SALOME_Exception);
+// 
+//     Elements makeSymmetryPlane(in Element e, in Vertex ver, in Vector vec)
+//         raises (SALOME::SALOME_Exception);
+// 
+    /*!
+    Modify elements by transforming elements
+    */
+//     void performTranslation(in Element e, in Vector vec)
+//         raises (SALOME::SALOME_Exception);
+
+    void performTranslation(in Elements l, in Vector vec)
+        raises (SALOME::SALOME_Exception);
+// 
+//     void performScale(in Element e, in Vertex ver, in double k)
+//         raises (SALOME::SALOME_Exception);
+// 
+    void performRotation(in Elements l, in Vertex ver, in Vector vec, in double angle)
+        raises (SALOME::SALOME_Exception);
+// 
+//     void performSymmetryPoint(in Element e, in Vertex ver)
+//         raises (SALOME::SALOME_Exception);
+// 
+//     void performSymmetryLine(in Element e, in Vertex ver, in Vector vec)
+//         raises (SALOME::SALOME_Exception);
+// 
+//     void performSymmetryPlane(in Element e, in Vertex ver, in Vector vec)
+//         raises (SALOME::SALOME_Exception);
+// 
+//     /*!
+//                     --------
+//                     MAILLAGE
+//                     --------
+//     */
+// 
+//     /*!
+//         Créer, Ã©diter et supprimer un groupe
+//     */
+//     HexaGroup addHexaGroup( in string name )
+    Group addHexaGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     QuadGroup addQuadGroup( in string name )
+    Group addQuadGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     EdgeGroup addEdgeGroup( in string name )
+    Group addEdgeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     HexaNodeGroup addHexaNodeGroup( in string name )
+    Group addHexaNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     QuadNodeGroup addQuadNodeGroup( in string name )
+    Group addQuadNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     EdgeNodeGroup addEdgeNodeGroup( in string name )
+    Group addEdgeNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+//     VertexNodeGroup addVertexNodeGroup( in string name )
+    Group addVertexNodeGroup( in string name )
+        raises (SALOME::SALOME_Exception);
+
+    long removeGroup( in Group g)
+        raises (SALOME::SALOME_Exception);
+
+    long countGroup()
+      raises (SALOME::SALOME_Exception);
+
+    Group getGroup( in long i )
+      raises (SALOME::SALOME_Exception);
+
+    Group findGroup( in string name )
+      raises (SALOME::SALOME_Exception);
+
+
+
+    /*!
+        Définir une loi de discrétisation
+    */
+    Law addLaw( in string name, in long nb_nodes )
+        raises (SALOME::SALOME_Exception);
+
+    long countLaw()
+        raises (SALOME::SALOME_Exception);
+
+    Law getLaw( in long i )
+      raises (SALOME::SALOME_Exception);
+
+    void removeLaw( in Law l )
+        raises (SALOME::SALOME_Exception);
+
+    Law findLaw( in string name )
+      raises (SALOME::SALOME_Exception);
+
+
+    /*!
+        Discretization defined on the model of blocks 
+    */
+    long countPropagation()
+        raises (SALOME::SALOME_Exception);
+
+    Propagation getPropagation( in long i )
+        raises (SALOME::SALOME_Exception);
+
+    Propagation findPropagation( in Edge e )
+        raises (SALOME::SALOME_Exception);
+
+  };
+};
+
+
+#endif
+
diff --git a/idl/Edge.idl b/idl/Edge.idl
new file mode 100755 (executable)
index 0000000..6e6d8ff
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __Edge_idl__
+#define __Edge_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+
+  struct EdgeAssociation
+  {
+    GEOM::GEOM_Object geomObj;
+    double debut;
+    double fin;
+  };
+
+  typedef sequence<EdgeAssociation>  EdgeAssociations;
+
+  interface Edge : Element
+  {
+    Vertex getVertex( in long n ) raises (SALOME::SALOME_Exception);
+    boolean getWay() raises (SALOME::SALOME_Exception);
+
+    long addAssociation (in GEOM::GEOM_Object geom_object_1D, in double debut, in double val ) //CS_NOT_SPEC
+      raises (SALOME::SALOME_Exception);
+
+//     sequence<EdgeAssociation> getAssociations() //CS_NOT_SPEC
+    EdgeAssociations getAssociations() //CS_NOT_SPEC CS_WARNING: not working when reloading a document
+      raises (SALOME::SALOME_Exception);
+
+//     void addAssociation( in GEOM::GEOM_Object geom_object_1D, in double debut, in double val )
+//       raises (SALOME::SALOME_Exception);
+//     GEOM_Objects getAssociations() raises (SALOME::SALOME_Exception);
+
+//     GEOM_Objects GEOM::GEOM_Object getAssociation()
+//             raises (SALOME::SALOME_Exception);
+
+//     void removeAssociation()
+//             raises (SALOME::SALOME_Exception);
+
+     void setScalar( in double val ) //CS_NOT_SPEC
+       raises (SALOME::SALOME_Exception);
+
+  };
+
+  typedef sequence<Edge>  Edges;
+
+
+};
+
+#endif
diff --git a/idl/Element.idl b/idl/Element.idl
new file mode 100755 (executable)
index 0000000..ef530cf
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __Element_idl__
+#define __Element_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+  interface Element : SALOME::GenericObj
+  {
+      void dump() raises (SALOME::SALOME_Exception);//CS_NOT_SPEC
+      void printName() raises (SALOME::SALOME_Exception);//CS_NOT_SPEC
+  };
+
+
+
+};
+
+#endif
diff --git a/idl/Elements.idl b/idl/Elements.idl
new file mode 100755 (executable)
index 0000000..ca8054a
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef __Elements_idl__
+#define __Elements_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+#include "Quad.idl"
+#include "Hexa.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+
+//   enum EnumCoord { dir_x, dir_y, dir_z, DIM3 };
+  enum EnumCoord { DIR_X, DIR_Y, DIR_Z, DIM3 };
+
+  interface Elements : Element
+  {
+      long countVertex() raises (SALOME::SALOME_Exception);
+      long countEdge() raises (SALOME::SALOME_Exception);
+      long countQuad() raises (SALOME::SALOME_Exception);
+      long countHexa() raises (SALOME::SALOME_Exception);
+
+      Vertex getVertex( in long n ) raises (SALOME::SALOME_Exception);
+      Edge getEdge( in long n ) raises (SALOME::SALOME_Exception);
+      Quad getQuad( in long n ) raises (SALOME::SALOME_Exception);
+      Hexa getHexa( in long n ) raises (SALOME::SALOME_Exception);
+
+      long findVertex( in Vertex p ) raises (SALOME::SALOME_Exception);
+
+      Vertex  getVertexIJK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+      Edge getEdgeI( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Edge getEdgeJ( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Edge getEdgeK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+      Quad getQuadIJ( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Quad getQuadIK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+      Quad getQuadJK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+      Hexa getHexaIJK( in long x, in long y, in long  z)
+        raises (SALOME::SALOME_Exception);
+
+
+//       Quad  getQuad1( in EnumCoord dir, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); //CS_NOT_SPEC
+// 
+//       Edge  getEdge1( in EnumCoord dir, in long nx, in long ny, in long nz) raises (SALOME::SALOME_Exception); //CS_NOT_SPEC
+
+      long saveVtk( in string fname );//CS_NOT_SPEC
+
+  };
+
+
+};
+
+#endif
diff --git a/idl/Group.idl b/idl/Group.idl
new file mode 100755 (executable)
index 0000000..1e11d86
--- /dev/null
@@ -0,0 +1,57 @@
+#ifndef __Group_idl__
+#define __Group_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+    enum GroupKind {  HEXA_GROUP,
+                      QUAD_GROUP,
+                      EDGE_GROUP,
+                      HEXANODE_GROUP,
+                      QUADNODE_GROUP,
+                      EDGENODE_GROUP,
+                      VERTEXNODE_GROUP };
+
+    interface Group : SALOME::GenericObj
+    {
+        /*!
+        comment
+        */
+        string getName()
+          raises (SALOME::SALOME_Exception);
+        void setName( in string name )
+          raises (SALOME::SALOME_Exception);
+        GroupKind getKind()
+          raises (SALOME::SALOME_Exception);
+        long addElement( in Element e)
+          raises (SALOME::SALOME_Exception);
+        long countElement()
+          raises (SALOME::SALOME_Exception);
+        Element getElement( in long index )
+          raises (SALOME::SALOME_Exception);
+        long removeElement( in long index )
+            raises (SALOME::SALOME_Exception);
+        void clearElement()
+            raises (SALOME::SALOME_Exception);
+    };
+
+//     interface HexaGroup : Group {};
+//     interface QuadGroup : Group {};
+//     interface EdgeGroup : Group {};
+// 
+//     interface HexaNodeGroup : Group {};
+//     interface QuadNodeGroup : Group {};
+//     interface EdgeNodeGroup : Group {};
+//     interface VertexNodeGroup : Group {};
+};
+
+#endif
diff --git a/idl/HEXABLOCK_Gen.idl b/idl/HEXABLOCK_Gen.idl
new file mode 100755 (executable)
index 0000000..8f3bd7c
--- /dev/null
@@ -0,0 +1,67 @@
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#ifndef __HEXABLOCK_GEN__
+#define __HEXABLOCK_GEN__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Component.idl"
+#include "SALOME_Exception.idl"
+#include "Document.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+  /*! \brief Interface of the %HEXABLOCK component
+   */
+  interface HEXABLOCK_Gen : Engines::Component
+  {
+     /*!
+         Donne le nombre de documents ouverts en session.
+      */
+    void test() raises (SALOME::SALOME_Exception);
+    long countDocument()
+        raises (SALOME::SALOME_Exception);
+
+    Document getDocument(in long i)
+        raises (SALOME::SALOME_Exception);
+
+    void removeDocument( in Document d)
+        raises (SALOME::SALOME_Exception);
+
+    Document addDocument()
+        raises (SALOME::SALOME_Exception);
+
+    Document loadDocument(in string xmlFilename)
+        raises (SALOME::SALOME_Exception);
+
+  };
+};
+
+
+#endif
+
diff --git a/idl/Hexa.idl b/idl/Hexa.idl
new file mode 100755 (executable)
index 0000000..9527232
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef __Hexa_idl__
+#define __Hexa_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+#include "Quad.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+    interface Hexa : Element
+    {
+        Quad getQuad( in long n ) raises(SALOME::SALOME_Exception);
+        Edge getEdge( in long n ) raises(SALOME::SALOME_Exception);
+        Vertex getVertex( in long n ) raises(SALOME::SALOME_Exception);
+
+       void setScalar( in double val ) //CS_NOT_SPEC
+               raises (SALOME::SALOME_Exception);
+    };
+
+    typedef sequence<Hexa>  Hexas;
+};
+#endif
+
diff --git a/idl/Law.idl b/idl/Law.idl
new file mode 100755 (executable)
index 0000000..d5451bd
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __Law_idl__
+#define __Law_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Vertex.idl"
+
+/*!  \ingroup EXAMPLES
+*/
+module HEXABLOCK_ORB
+{
+    enum KindLaw { UNIFORM, ARITHMETIC, GEOMETRIC };
+
+    interface Law : SALOME::GenericObj
+    {
+        void setName( in string name ) raises (SALOME::SALOME_Exception);
+        string getName() raises (SALOME::SALOME_Exception);
+
+        void setNodes( in long n ) raises (SALOME::SALOME_Exception);
+        long getNodes() raises (SALOME::SALOME_Exception);
+
+        void setKind( in KindLaw k ) raises (SALOME::SALOME_Exception);
+        KindLaw getKind() raises (SALOME::SALOME_Exception);
+
+        void setCoefficient( in double c ) raises (SALOME::SALOME_Exception);
+        double getCoefficient() raises (SALOME::SALOME_Exception);
+    };
+};
+
+#endif
diff --git a/idl/Makefile.am b/idl/Makefile.am
new file mode 100755 (executable)
index 0000000..c348c78
--- /dev/null
@@ -0,0 +1,188 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# This Makefile is responsible of generating the client and server
+# implementation of IDL interfaces for both C++ and python usage.
+# The building process of the C++ files is in charge of each source
+# package and then is not manage here.
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+BASEIDL_FILES = \
+       Element.idl\
+       Vertex.idl\
+       Edge.idl\
+       Quad.idl\
+       Hexa.idl\
+       Vector.idl\
+       Elements.idl\
+       Cylinder.idl\
+       CrossElements.idl\
+       Pipe.idl\
+       Law.idl\
+       Propagation.idl\
+       Group.idl\
+       Document.idl\
+       HEXABLOCK_Gen.idl
+
+# This variable defines the files to be installed
+dist_salomeidl_DATA = $(BASEIDL_FILES)
+
+# GUI idl common library
+lib_LTLIBRARIES = libSalomeIDLHEXABLOCK.la
+
+
+
+
+# Sources built from idl files
+nodist_libSalomeIDLHEXABLOCK_la_SOURCES = \
+       ElementSK.cc\
+       ElementDynSK.cc\
+       VertexSK.cc\
+       VertexDynSK.cc\
+       EdgeSK.cc\
+       EdgeDynSK.cc\
+       QuadSK.cc\
+       QuadDynSK.cc\
+       HexaSK.cc\
+       HexaDynSK.cc\
+       VectorSK.cc\
+       VectorDynSK.cc\
+       ElementsSK.cc\
+       ElementsDynSK.cc\
+       CylinderSK.cc\
+       CylinderDynSK.cc\
+       CrossElementsSK.cc\
+       CrossElementsDynSK.cc\
+       PipeSK.cc\
+       PipeDynSK.cc\
+       LawSK.cc\
+       LawDynSK.cc\
+       PropagationSK.cc\
+       PropagationDynSK.cc\
+       GroupSK.cc\
+       GroupDynSK.cc\
+       DocumentSK.cc\
+       DocumentDynSK.cc\
+       HEXABLOCK_GenSK.cc\
+       HEXABLOCK_GenDynSK.cc
+
+ElementDynSK.cc: ElementSK.cc
+VertexDynSK.cc: VertexSK.cc
+EdgeDynSK.cc: EdgeSK.cc
+PropagationDynSK.cc: PropagationSK.cc
+LawDynSK.cc: LawSK.cc
+ElementsDynSK.cc: ElementsSK.cc
+CrossElementsDynSK.cc: CrossElementsSK.cc
+QuadDynSK.cc: QuadSK.cc
+VectorDynSK.cc: VectorSK.cc
+CylinderDynSK.cc: CylinderSK.cc
+GroupDynSK.cc: GroupSK.cc
+HexaDynSK.cc: HexaSK.cc
+PipeDynSK.cc: PipeSK.cc
+DocumentDynSK.cc: DocumentSK.cc
+HEXABLOCK_GenDynSK.cc: HEXABLOCK_GenSK.cc
+
+
+# header files must be exported: other modules have to use this library
+nodist_salomeinclude_HEADERS = $(BASEIDL_FILES:%.idl=%.hh)
+
+libSalomeIDLHEXABLOCK_la_CPPFLAGS =\
+       @CORBA_CXXFLAGS@        \
+       @CORBA_INCLUDES@        \
+       $(KERNEL_CXXFLAGS)      \
+       $(GEOM_CXXFLAGS)        \
+       -I$(top_builddir)/salome_adm/unix \
+       -I$(top_builddir)/idl
+
+
+libSalomeIDLHEXABLOCK_la_LDFLAGS = -no-undefined -version-info=0:0:0
+
+libSalomeIDLHEXABLOCK_la_LIBADD  =                     \
+       $(KERNEL_LDFLAGS) -lSalomeIDLKernel     \
+       $(GEOM_LDFLAGS) -lSalomeIDLGEOM         \
+       @CORBA_LIBS@
+
+# These variables defines the building process of CORBA files
+OMNIORB_IDL         = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS  = \
+       @OMNIORB_IDLPYFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome
+
+
+IDLCXXFLAGS = \
+       -bcxx \
+       @IDLCXXFLAGS@ \
+       -I$(top_builddir)/idl/salome \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome \
+       -I$(top_builddir)/salome_adm/unix \
+       -I$(srcdir)
+#      -I$(srcdir)/SD/Vertex
+#      -I$(srcdir)/SD/Edge
+
+IDLPYFLAGS  = \
+       @IDLPYFLAGS@ \
+       -I$(KERNEL_ROOT_DIR)/idl/salome \
+       -I$(GEOM_ROOT_DIR)/idl/salome
+       
+
+
+# potential problem on parallel make on the following - multiple outputs
+SUFFIXES = .idl .hh SK.cc
+.idlSK.cc:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+.idl.hh:
+       $(OMNIORB_IDL) $(IDLCXXFLAGS) $(OMNIORB_IDLCXXFLAGS) $<
+
+install-exec-local: $(BASEIDL_FILES:%=$(top_srcdir)/idl/%)
+       $(INSTALL) -d  $(DESTDIR)$(salomepythondir)
+       ls $^ | while read file; do \
+         $(OMNIORB_IDL) $(IDLPYFLAGS) -C$(DESTDIR)$(salomepythondir) $$file ; \
+       done
+
+# uninstall-local removes too much, but it works in distcheck
+uninstall-local:
+       rm -rf $(DESTDIR)$(salomepythondir)/*
+
+mostlyclean-local:
+       -rm -f *.hh *.cc .depidl
+
+# we use cpp to generate dependencies between idl files.
+# option x c tells the preprocessor to consider idl as a c file.
+# if an idl is modified, all idl dependencies are rebuilt
+
+.depidl: $(BASEIDL_FILES)
+       @echo "" > $@
+       @for dep in $^ dummy; do \
+         if [ $$dep != "dummy" ]; then \
+           echo Building dependencies for $$dep; \
+           $(CPP) $(C_DEPEND_FLAG) -x c -I$(srcdir) -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome $$dep 2>/dev/null \ | \
+           sed 's/\.o/\SK.cc/' >>$@; \
+         fi; \
+       done ;
+
+-include .depidl
+
+# -I$(GEOM_ROOT_DIR)/include/salome
\ No newline at end of file
diff --git a/idl/Pipe.idl b/idl/Pipe.idl
new file mode 100755 (executable)
index 0000000..48049b0
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __Pipe_idl__
+#define __Pipe_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Vector.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+    interface Pipe : Element
+    {
+        Vertex getBase() raises (SALOME::SALOME_Exception);
+        Vector getDirection() raises (SALOME::SALOME_Exception);
+        double getInternal_radius() raises (SALOME::SALOME_Exception);
+        double getRadius() raises (SALOME::SALOME_Exception);
+        double getHeight() raises (SALOME::SALOME_Exception);
+    };
+};
+
+#endif
+
diff --git a/idl/Propagation.idl b/idl/Propagation.idl
new file mode 100755 (executable)
index 0000000..c21e1ce
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef __Propagation_idl__
+#define __Propagation_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+#include "Edge.idl"
+#include "Law.idl"
+
+
+
+/*!  \ingroup EXAMPLES
+
+*/
+module HEXABLOCK_ORB
+{
+  typedef sequence<boolean>  Ways;
+
+  interface Propagation : SALOME::GenericObj
+  {
+    Edges getEdges() raises (SALOME::SALOME_Exception);
+//     Ways getWays() raises (SALOME::SALOME_Exception);
+    void setLaw(in Law l) raises (SALOME::SALOME_Exception);
+    Law getLaw() raises (SALOME::SALOME_Exception);
+    void setWay(in boolean w) raises (SALOME::SALOME_Exception);
+    boolean getWay() raises (SALOME::SALOME_Exception);
+  };
+
+};
+
+#endif
diff --git a/idl/Quad.idl b/idl/Quad.idl
new file mode 100755 (executable)
index 0000000..28c552b
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef __Quad_idl__
+#define __Quad_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Element.idl"
+#include "Vertex.idl"
+#include "Edge.idl"
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+  interface Quad : Element
+  {
+      Edge getEdge( in long n )
+          raises (SALOME::SALOME_Exception);
+
+      Vertex getVertex( in long n )
+          raises (SALOME::SALOME_Exception);
+
+//       void addAssociation( in GEOM::GEOM_Object geom_object_2D )
+//           raises (SALOME::SALOME_Exception);
+// 
+//       GEOM_Objects getAssociations()
+//           raises (SALOME::SALOME_Exception);
+
+      long addAssociation( in GEOM::GEOM_Object geom_object_2D ) //CS_NOT_SPEC
+          raises (SALOME::SALOME_Exception);
+
+      GEOM::ListOfGO getAssociations() //CS_NOT_SPEC CS_WARNING: not working when reloading a document
+          raises (SALOME::SALOME_Exception);
+// 
+//       void removeAssociation()
+//           raises (SALOME::SALOME_Exception);
+
+      void setScalar( in double val ) //CS_NOT_SPEC
+       raises (SALOME::SALOME_Exception);
+
+  };
+};
+
+#endif
diff --git a/idl/Vector.idl b/idl/Vector.idl
new file mode 100755 (executable)
index 0000000..0d6dc5b
--- /dev/null
@@ -0,0 +1,27 @@
+#ifndef __Vector_idl__
+#define __Vector_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "Element.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component as an example in %SALOME application.
+*/
+module HEXABLOCK_ORB
+{
+  interface Vector : Element
+  {
+    double getDX() raises (SALOME::SALOME_Exception);
+    double getDY() raises (SALOME::SALOME_Exception);
+    double getDZ() raises (SALOME::SALOME_Exception);
+  };
+};
+
+#endif
diff --git a/idl/Vertex.idl b/idl/Vertex.idl
new file mode 100755 (executable)
index 0000000..75aa018
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef __Vertex_idl__
+#define __Vertex_idl__
+/*!
+ \defgroup EXAMPLES SALOME EXAMPLES components
+ */
+#include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
+
+#include "GEOM_Gen.idl"
+
+#include "Element.idl"
+
+
+/*!  \ingroup EXAMPLES
+
+This package contains the interface HEXABLOCK_ORB used 
+for  %HEXABLOCK component 
+*/
+module HEXABLOCK_ORB
+{
+
+    interface Vertex : Element
+    {
+        double getX() raises (SALOME::SALOME_Exception);
+        double getY() raises (SALOME::SALOME_Exception);
+        double getZ() raises (SALOME::SALOME_Exception);
+
+        void setX( in double x ) raises (SALOME::SALOME_Exception);
+        void setY( in double y ) raises (SALOME::SALOME_Exception);
+        void setZ( in double z ) raises (SALOME::SALOME_Exception);
+
+        void setAssociation( in GEOM::GEOM_Object geom_object_vertex )
+            raises (SALOME::SALOME_Exception);
+
+        GEOM::GEOM_Object getAssociation()
+            raises (SALOME::SALOME_Exception);
+// 
+//         void removeAssociation()
+//             raises (SALOME::SALOME_Exception);
+
+       void setScalar( in double val ) //CS_NOT_SPEC
+               raises (SALOME::SALOME_Exception);
+
+    };
+
+
+};
+
+#endif
+
diff --git a/resources/ExecHEXABLOCK.png b/resources/ExecHEXABLOCK.png
new file mode 100755 (executable)
index 0000000..a1e89e5
Binary files /dev/null and b/resources/ExecHEXABLOCK.png differ
diff --git a/resources/HEXABLOCK.png b/resources/HEXABLOCK.png
new file mode 100755 (executable)
index 0000000..dfcf3f9
Binary files /dev/null and b/resources/HEXABLOCK.png differ
diff --git a/resources/HEXABLOCKCatalog.xml.in b/resources/HEXABLOCKCatalog.xml.in
new file mode 100755 (executable)
index 0000000..c755401
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version='1.0' encoding='us-ascii' ?>
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<!-- XML component catalog -->
+<begin-catalog>
+
+<!-- Path prefix information -->
+
+<path-prefix-list>
+</path-prefix-list>
+
+<!-- Component list -->
+<component-list>
+        <component>
+                <!-- Component identification -->
+                <component-name>HEXABLOCK</component-name>
+               <component-username>HexaBlock</component-username>
+                <component-type>Data</component-type>
+                <component-author>F. Kloss</component-author>
+                <component-version>@VERSION@</component-version>
+                <component-comment>CEA - RD</component-comment>
+                <component-multistudy>1</component-multistudy>
+                <component-icone>HEXABLOCK.png</component-icone>
+                <constraint>'linux' ~ OS</constraint>
+       
+       </component>
+</component-list>
+</begin-catalog>
diff --git a/resources/Makefile.am b/resources/Makefile.am
new file mode 100755 (executable)
index 0000000..20369b5
--- /dev/null
@@ -0,0 +1,29 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+dist_salomeres_DATA = \
+SalomeApp.xml \
+HEXABLOCK.png \
+ExecHEXABLOCK.png
+
+nodist_salomeres_SCRIPTS = HEXABLOCKCatalog.xml
diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml
new file mode 100755 (executable)
index 0000000..3d10c2e
--- /dev/null
@@ -0,0 +1,34 @@
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<document>
+  <section name="HEXABLOCK">
+    <!-- Major module parameters -->
+    <parameter name="name" value="HexaBlock"/>
+    <parameter name="icon" value="HEXABLOCK.png"/>
+  </section>
+  <section name="resources">
+    <!-- Module resources -->
+    <parameter name="HEXABLOCK" value="${HEXABLOCK_ROOT_DIR}/share/salome/resources/hexablock"/>
+  </section>
+</document>
diff --git a/salome_adm/unix/SALOMEconfig.h.in b/salome_adm/unix/SALOMEconfig.h.in
new file mode 100755 (executable)
index 0000000..c8fc173
--- /dev/null
@@ -0,0 +1,65 @@
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+/* Debug mode ??? */
+#ifndef DEBUG
+# define DEBUG
+#endif
+
+/* CORBA headers include rules */
+#ifndef CORBA_CLIENT_HEADER
+# define QUOTE(x)  #x
+# define CORBA_CLIENT_HEADER(x)  QUOTE(x@IDL_CLN_H@)
+# define CORBA_SERVER_HEADER(x)  QUOTE(x@IDL_SRV_H@)
+#endif
+
+/* Platform definition */
+#ifndef @MACHINE@
+  #define @MACHINE@
+#endif
+
+// This is only to suppress warning messages with defines redefined (cause of omniORB that exports these names)
+#ifdef PACKAGE
+#undef PACKAGE
+#endif
+#ifdef PACKAGE_BUGREPORT
+#undef PACKAGE_BUGREPORT
+#endif
+#ifdef PACKAGE_NAME
+#undef PACKAGE_NAME
+#endif
+#ifdef PACKAGE_STRING
+#undef PACKAGE_STRING
+#endif
+#ifdef PACKAGE_TARNAME
+#undef PACKAGE_TARNAME
+#endif
+#ifdef PACKAGE_VERSION
+#undef PACKAGE_VERSION
+#endif
+#ifdef VERSION
+#undef VERSION
+#endif
+
+#ifdef _POSIX_C_SOURCE
+#undef _POSIX_C_SOURCE
+#endif
diff --git a/salome_adm/unix/config_files/config.guess b/salome_adm/unix/config_files/config.guess
new file mode 100755 (executable)
index 0000000..e3ef63f
--- /dev/null
@@ -0,0 +1,1471 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-13'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    x86:Interix*:[345]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #if defined(__INTEL_COMPILER) || defined(__PGI)
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/salome_adm/unix/config_files/config.sub b/salome_adm/unix/config_files/config.sub
new file mode 100755 (executable)
index 0000000..c0ada46
--- /dev/null
@@ -0,0 +1,1602 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-12-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray)
+               os=
+               basic_machine=$1
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64vr | mips64vrel \
+       | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | mt \
+       | msp430 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m32c)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+       m32c-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+       spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/salome_adm/unix/config_files/depcomp b/salome_adm/unix/config_files/depcomp
new file mode 100755 (executable)
index 0000000..ca5ea4e
--- /dev/null
@@ -0,0 +1,584 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2006-10-15.18
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+       set fnord "$@"
+       shift
+       shift
+       ;;
+    *)
+       set fnord "$@" "$arg"
+       shift
+       shift
+       ;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "       " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/salome_adm/unix/config_files/install-sh b/salome_adm/unix/config_files/install-sh
new file mode 100755 (executable)
index 0000000..4fbbae7
--- /dev/null
@@ -0,0 +1,507 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-10-14.15
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""       $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+posix_glob=
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chmodcmd=$chmodprog
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+        shift
+        shift
+       case $mode in
+         *' '* | *'    '* | *'
+'*       | *'*'* | *'?'* | *'['*)
+           echo "$0: invalid mode: $mode" >&2
+           exit 1;;
+       esac
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+       shift
+       shift
+       continue;;
+
+    -T) no_target_directory=true
+       shift
+       continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)        shift
+       break;;
+
+    -*)        echo "$0: invalid option: $1" >&2
+       exit 1;;
+
+    *)  break;;
+  esac
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dstarg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dstarg"
+      shift # fnord
+    fi
+    shift # arg
+    dstarg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+       u_plus_rw=
+      else
+       u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dstarg: Is a directory" >&2
+       exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+       (dirname "$dst") 2>/dev/null ||
+       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+            X"$dst" : 'X\(//\)[^/]' \| \
+            X"$dst" : 'X\(//\)$' \| \
+            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+       echo X"$dst" |
+           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)[^/].*/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\/\)$/{
+                  s//\1/
+                  q
+                }
+                /^X\(\/\).*/{
+                  s//\1/
+                  q
+                }
+                s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+       # Create intermediate dirs using mode 755 as modified by the umask.
+       # This is like FreeBSD 'install' as of 1997-10-28.
+       umask=`umask`
+       case $stripcmd.$umask in
+         # Optimize common cases.
+         *[2367][2367]) mkdir_umask=$umask;;
+         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+         *[0-7])
+           mkdir_umask=`expr $umask + 22 \
+             - $umask % 100 % 40 + $umask % 20 \
+             - $umask % 10 % 4 + $umask % 2
+           `;;
+         *) mkdir_umask=$umask,go-w;;
+       esac
+
+       # With -d, create the new directory with the user-specified mode.
+       # Otherwise, rely on $mkdir_umask.
+       if test -n "$dir_arg"; then
+         mkdir_mode=-m$mode
+       else
+         mkdir_mode=
+       fi
+
+       posix_mkdir=false
+       case $umask in
+         *[123567][0-7][0-7])
+           # POSIX mkdir -p sets u+wx bits regardless of umask, which
+           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+           ;;
+         *)
+           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+           if (umask $mkdir_umask &&
+               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+           then
+             if test -z "$dir_arg" || {
+                  # Check for POSIX incompatibilities with -m.
+                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                  # other-writeable bit of parent directory when it shouldn't.
+                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                  case $ls_ld_tmpdir in
+                    d????-?r-*) different_mode=700;;
+                    d????-?--*) different_mode=755;;
+                    *) false;;
+                  esac &&
+                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                  }
+                }
+             then posix_mkdir=:
+             fi
+             rmdir "$tmpdir/d" "$tmpdir"
+           else
+             # Remove any dirs left behind by ancient mkdir implementations.
+             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+           fi
+           trap '' 0;;
+       esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+       umask $mkdir_umask &&
+       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+       /*) prefix=/ ;;
+       -*) prefix=./ ;;
+       *)  prefix= ;;
+      esac
+
+      case $posix_glob in
+        '')
+         if (set -f) 2>/dev/null; then
+           posix_glob=true
+         else
+           posix_glob=false
+         fi ;;
+      esac
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob && set -f
+      set fnord $dstdir
+      shift
+      $posix_glob && set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+       test -z "$d" && continue
+
+       prefix=$prefix$d
+       if test -d "$prefix"; then
+         prefixes=
+       else
+         if $posix_mkdir; then
+           (umask=$mkdir_umask &&
+            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+           # Don't fail if two instances are running concurrently.
+           test -d "$prefix" || exit 1
+         else
+           case $prefix in
+             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+             *) qprefix=$prefix;;
+           esac
+           prefixes="$prefixes '$qprefix'"
+         fi
+       fi
+       prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+       # Don't fail if two instances are running concurrently.
+       (umask $mkdir_umask &&
+        eval "\$doit_exec \$mkdirprog $prefixes") ||
+         test -d "$dstdir" || exit 1
+       obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
+
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dst"; then
+              $doit $rmcmd -f "$dst" 2>/dev/null \
+              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
+                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
+              || {
+                echo "$0: cannot unlink or rename $dst" >&2
+                (exit 1); exit 1
+              }
+            else
+              :
+            fi
+          } &&
+
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dst"
+        }
+    } || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/salome_adm/unix/config_files/ltmain.sh b/salome_adm/unix/config_files/ltmain.sh
new file mode 100755 (executable)
index 0000000..22f58df
--- /dev/null
@@ -0,0 +1,6933 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+  # Yippee, $echo works!
+  :
+else
+  # Restart under the correct shell, and then maybe $echo will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  SP2NL='tr \040 \012'
+  NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  SP2NL='tr \100 \n'
+  NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+         save_$lt_var=\$$lt_var
+         $lt_var=C
+         export $lt_var
+       fi"
+done
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS="  $lt_nl"
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+duplicate_deps=no
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+       # Failing that, at least try and use $RANDOM to avoid a race
+       my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+       save_mktempdir_umask=`umask`
+       umask 0077
+       $mkdir "$my_tmpdir"
+       umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || {
+        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
+       exit $EXIT_FAILURE
+      }
+    fi
+
+    $echo "X$my_tmpdir" | $Xsed
+}
+
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+       $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+       case $arg in
+         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+       for z in $available_tags; do
+         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+           # Evaluate the configuration.
+           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+           CC_quoted=
+           for arg in $CC; do
+           # Double-quote args containing other shell metacharacters.
+           case $arg in
+             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
+             arg="\"$arg\""
+             ;;
+           esac
+           CC_quoted="$CC_quoted $arg"
+         done
+           case "$@ " in
+             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+             # The compiler in the base compile command matches
+             # the one in the tagged configuration.
+             # Assume this is the tagged configuration we want.
+             tagname=$z
+             break
+             ;;
+           esac
+         fi
+       done
+       # If $tagname still isn't set, then no tagged configuration
+       # was found and let the user know that the "--tag" command
+       # line option must be used.
+       if test -z "$tagname"; then
+         $echo "$modename: unable to infer tagged configuration"
+         $echo "$modename: specify a tag with \`--tag'" 1>&2
+         exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+       fi
+       ;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       *) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+       *" $my_xlib_u "*)
+         extracted_serial=`expr $extracted_serial + 1`
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+       exit $exit_status
+      fi
+      case $host in
+      *-darwin*)
+       $show "Extracting $my_xabs"
+       # Do not bother doing anything if just a dry run
+       if test -z "$run"; then
+         darwin_orig_dir=`pwd`
+         cd $my_xdir || exit $?
+         darwin_archive=$my_xabs
+         darwin_curdir=`pwd`
+         darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+         darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+         if test -n "$darwin_arches"; then 
+           darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+           darwin_arch=
+           $show "$darwin_base_archive has multiple architectures $darwin_arches"
+           for darwin_arch in  $darwin_arches ; do
+             mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+             cd "$darwin_curdir"
+             $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+           done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+           darwin_file=
+           darwin_files=
+           for darwin_file in $darwin_filelist; do
+             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+             lipo -create -output "$darwin_file" $darwin_files
+           done # $darwin_filelist
+           ${rm}r unfat-$$
+           cd "$darwin_orig_dir"
+         else
+           cd "$darwin_orig_dir"
+           func_extract_an_archive "$my_xdir" "$my_xabs"
+         fi # $darwin_arches
+       fi # $run
+       ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+#eval std_shrext=\"$shrext_cmds\"
+
+# And fixing for Darwin sucks for everybody else
+if test -z "$shrext_cmds" && test -n "$shrext"; then
+       eval shrext_cmds=\"$shrext\"
+fi
+
+eval std_shrext=\"$shrext_cmds\"
+
+# This value is evaluated to 32768, so place it here as a compatilibity hack
+# because older libtool.m4 didn't define this variable
+test -z "$max_cmd_len" && max_cmd_len=32768
+
+disable_libs=no
+
+# Parse our command line options once, thoroughly.
+while test "$#" -gt 0
+do
+  arg="$1"
+  shift
+
+  case $arg in
+  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$prev"; then
+    case $prev in
+    execute_dlfiles)
+      execute_dlfiles="$execute_dlfiles $arg"
+      ;;
+    tag)
+      tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
+
+      # Check whether tagname contains only valid characters
+      case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+       $echo "$progname: invalid tag name: $tagname" 1>&2
+       exit $EXIT_FAILURE
+       ;;
+      esac
+
+      case $tagname in
+      CC)
+       # Don't test for the "default" C tag, as we know, it's there, but
+       # not specially marked.
+       ;;
+      *)
+       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+         taglist="$taglist $tagname"
+         # Evaluate the configuration.
+         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+       else
+         $echo "$progname: ignoring unknown tag $tagname" 1>&2
+       fi
+       ;;
+      esac
+      ;;
+    *)
+      eval "$prev=\$arg"
+      ;;
+    esac
+
+    prev=
+    prevopt=
+    continue
+  fi
+
+  # Have we seen a non-optional argument yet?
+  case $arg in
+  --help)
+    show_help=yes
+    ;;
+
+  --version)
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
+    ;;
+
+  --config)
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+    done
+    exit $?
+    ;;
+
+  --debug)
+    $echo "$progname: enabling shell trace mode"
+    set -x
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --dry-run | -n)
+    run=:
+    ;;
+
+  --features)
+    $echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      $echo "enable shared libraries"
+    else
+      $echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      $echo "enable static libraries"
+    else
+      $echo "disable static libraries"
+    fi
+    exit $?
+    ;;
+
+  --finish) mode="finish" ;;
+
+  --mode) prevopt="--mode" prev=mode ;;
+  --mode=*) mode="$optarg" ;;
+
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
+  --quiet | --silent)
+    show=:
+    preserve_args="$preserve_args $arg"
+    ;;
+
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+  --tag=*)
+    set tag "$optarg" ${1+"$@"}
+    shift
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
+
+  -dlopen)
+    prevopt="-dlopen"
+    prev=execute_dlfiles
+    ;;
+
+  -*)
+    $echo "$modename: unrecognized option \`$arg'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+
+  *)
+    nonopt="$arg"
+    break
+    ;;
+  esac
+done
+
+if test -n "$prevopt"; then
+  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+fi
+
+case $disable_libs in
+no) 
+  ;;
+shared)
+  build_libtool_libs=no
+  build_old_libs=yes
+  ;;
+static)
+  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+  ;;
+esac
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+  # Infer the operation mode.
+  if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
+    case $nonopt in
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
+      mode=link
+      for arg
+      do
+       case $arg in
+       -c)
+          mode=compile
+          break
+          ;;
+       esac
+      done
+      ;;
+    *db | *dbx | *strace | *truss)
+      mode=execute
+      ;;
+    *install*|cp|mv)
+      mode=install
+      ;;
+    *rm)
+      mode=uninstall
+      ;;
+    *)
+      # If we have no mode, but dlfiles were specified, then do execute mode.
+      test -n "$execute_dlfiles" && mode=execute
+
+      # Just use the default operation mode.
+      if test -z "$mode"; then
+       if test -n "$nonopt"; then
+         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+       else
+         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+       fi
+      fi
+      ;;
+    esac
+  fi
+
+  # Only execute mode is allowed to have -dlopen flags.
+  if test -n "$execute_dlfiles" && test "$mode" != execute; then
+    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+    $echo "$help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+
+  # Change the help message to a mode-specific one.
+  generic_help="$help"
+  help="Try \`$modename --help --mode=$mode' for more information."
+
+  # These modes are in order of execution frequency so that they run quickly.
+  case $mode in
+  # libtool compile mode
+  compile)
+    modename="$modename: compile"
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+       # do not "continue".  Instead, add this to base_compile
+       lastarg="$arg"
+       arg_mode=normal
+       ;;
+
+      target )
+       libobj="$arg"
+       arg_mode=normal
+       continue
+       ;;
+
+      normal )
+       # Accept any command-line options.
+       case $arg in
+       -o)
+         if test -n "$libobj" ; then
+           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         arg_mode=target
+         continue
+         ;;
+
+       -static | -prefer-pic | -prefer-non-pic)
+         later="$later $arg"
+         continue
+         ;;
+
+       -no-suppress)
+         suppress_opt=no
+         continue
+         ;;
+
+       -Xcompiler)
+         arg_mode=arg  #  the next one goes into the "base_compile" arg list
+         continue      #  The current "srcfile" will either be retained or
+         ;;            #  replaced later.  I would guess that would be a bug.
+
+       -Wc,*)
+         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+         lastarg=
+         save_ifs="$IFS"; IFS=','
+         for arg in $args; do
+           IFS="$save_ifs"
+
+           # Double-quote args containing other shell metacharacters.
+           # Many Bourne shells cannot handle close brackets correctly
+           # in scan sets, so we specify it separately.
+           case $arg in
+             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
+             arg="\"$arg\""
+             ;;
+           esac
+           lastarg="$lastarg $arg"
+         done
+         IFS="$save_ifs"
+         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+         # Add the arguments to base_compile.
+         base_compile="$base_compile $lastarg"
+         continue
+         ;;
+
+       * )
+         # Accept the current argument as the source file.
+         # The previous "srcfile" becomes the current argument.
+         #
+         lastarg="$srcfile"
+         srcfile="$arg"
+         ;;
+       esac  #  case $arg
+       ;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+      case $lastarg in
+      # Double-quote args containing other shell metacharacters.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       lastarg="\"$lastarg\""
+       ;;
+      esac
+
+      base_compile="$base_compile $lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
+      ;;
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *)
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    xform='[cCFSifmso]'
+    case $libobj in
+    *.ada) xform=ada ;;
+    *.adb) xform=adb ;;
+    *.ads) xform=ads ;;
+    *.asm) xform=asm ;;
+    *.c++) xform=c++ ;;
+    *.cc) xform=cc ;;
+    *.ii) xform=ii ;;
+    *.class) xform=class ;;
+    *.cpp) xform=cpp ;;
+    *.cxx) xform=cxx ;;
+    *.f90) xform=f90 ;;
+    *.for) xform=for ;;
+    *.java) xform=java ;;
+    *.obj) xform=obj ;;
+    esac
+
+    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+    case $libobj in
+    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *)
+      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+       build_old_libs=yes
+       continue
+       ;;
+
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+      esac
+    done
+
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       qlibobj="\"$qlibobj\"" ;;
+    esac
+    test "X$libobj" != "X$qlibobj" \
+       && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"'  &()|`$[]' \
+       && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$xdir" = "X$obj"; then
+      xdir=
+    else
+      xdir=$xdir/
+    fi
+    lobj=${xdir}$objdir/$objname
+
+    if test -z "$base_compile"; then
+      $echo "$modename: you must specify a compilation command" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    $run $rm $removelist
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+      removelist="$removelist $output_obj $lockfile"
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+       $show "Waiting for $lockfile to be removed"
+       sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+       $echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+      $echo "$srcfile" > "$lockfile"
+    fi
+
+    if test -n "$fix_srcfile_path"; then
+      eval srcfile=\"$fix_srcfile_path\"
+    fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
+
+    $run $rm "$libobj" "${libobj}T"
+
+    # Create a libtool object file (analogous to a ".la" file),
+    # but don't create it if we're doing a dry run.
+    test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+       command="$base_compile $qsrcfile $pic_flag"
+      else
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      fi
+
+      if test ! -d "${xdir}$objdir"; then
+       $show "$mkdir ${xdir}$objdir"
+       $run $mkdir ${xdir}$objdir
+       exit_status=$?
+       if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+         exit $exit_status
+       fi
+      fi
+
+      if test -z "$output_obj"; then
+       # Place PIC objects in $objdir
+       command="$command -o $lobj"
+      fi
+
+      $run $rm "$lobj" "$output_obj"
+
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+       test -n "$output_obj" && $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+       $show "$mv $output_obj $lobj"
+       if $run $mv $output_obj $lobj; then :
+       else
+         error=$?
+         $run $rm $removelist
+         exit $error
+       fi
+      fi
+
+      # Append the name of the PIC object to the libtool object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
+
+EOF
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
+    else
+      # No PIC object so indicate it doesn't exist in the libtool
+      # object file.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
+
+EOF
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+       # Don't build PIC code
+       command="$base_compile $qsrcfile"
+      else
+       command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+       command="$command -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      command="$command$suppress_output"
+      $run $rm "$obj" "$output_obj"
+      $show "$command"
+      if $run eval "$command"; then :
+      else
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      if test "$need_locks" = warn &&
+        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+       $echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+       $run $rm $removelist
+       exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+       $show "$mv $output_obj $obj"
+       if $run $mv $output_obj $obj; then :
+       else
+         error=$?
+         $run $rm $removelist
+         exit $error
+       fi
+      fi
+
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+    else
+      # Append the name of the non-PIC object the libtool object file.
+      # Only append if the libtool object file exists.
+      test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
+    fi
+
+    $run $mv "${libobj}T" "${libobj}"
+
+    # Unlock the critical section if it was locked
+    if test "$need_locks" != no; then
+      $run $rm "$lockfile"
+    fi
+
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool link mode
+  link | relink)
+    modename="$modename: link"
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args="$nonopt"
+    base_compile="$nonopt $@"
+    compile_command="$nonopt"
+    finalize_command="$nonopt"
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    notinst_path= # paths that contain not-installed libtool libraries
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -all-static | -static | -static-libtool-libs)
+    case $arg in
+    -all-static)
+         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+         fi
+         if test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+    -static)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=built
+         ;;
+    -static-libtool-libs)
+      if test -z "$pic_flag" && test -n "$link_static_flag"; then
+        dlopen_self=$dlopen_self_static
+      fi
+      prefer_static_libs=yes
+      ;;
+    esac
+       build_libtool_libs=no
+       build_old_libs=yes
+       break
+       ;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+       ;;
+      *) qarg=$arg ;;
+      esac
+      libtool_args="$libtool_args $qarg"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+       case $prev in
+       output)
+         compile_command="$compile_command @OUTPUT@"
+         finalize_command="$finalize_command @OUTPUT@"
+         ;;
+       esac
+
+       case $prev in
+       dlfiles|dlprefiles)
+         if test "$preload" = no; then
+           # Add the symbol object into the linking commands.
+           compile_command="$compile_command @SYMFILE@"
+           finalize_command="$finalize_command @SYMFILE@"
+           preload=yes
+         fi
+         case $arg in
+         *.la | *.lo) ;;  # We handle these cases below.
+         force)
+           if test "$dlself" = no; then
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         self)
+           if test "$prev" = dlprefiles; then
+             dlself=yes
+           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+             dlself=yes
+           else
+             dlself=needless
+             export_dynamic=yes
+           fi
+           prev=
+           continue
+           ;;
+         *)
+           if test "$prev" = dlfiles; then
+             dlfiles="$dlfiles $arg"
+           else
+             dlprefiles="$dlprefiles $arg"
+           fi
+           prev=
+           continue
+           ;;
+         esac
+         ;;
+       expsyms)
+         export_symbols="$arg"
+         if test ! -f "$arg"; then
+           $echo "$modename: symbol file \`$arg' does not exist"
+           exit $EXIT_FAILURE
+         fi
+         prev=
+         continue
+         ;;
+       expsyms_regex)
+         export_symbols_regex="$arg"
+         prev=
+         continue
+         ;;
+       inst_prefix)
+         inst_prefix_dir="$arg"
+         prev=
+         continue
+         ;;
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
+         ;;
+       release)
+         release="-$arg"
+         prev=
+         continue
+         ;;
+       objectlist)
+         if test -f "$arg"; then
+           save_arg=$arg
+           moreargs=
+           for fil in `cat $save_arg`
+           do
+#            moreargs="$moreargs $fil"
+             arg=$fil
+             # A libtool-controlled object.
+
+             # Check to see that this really is a libtool object.
+             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+               pic_object=
+               non_pic_object=
+
+               # Read the .lo file
+               # If there is no directory component, then add one.
+               case $arg in
+               */* | *\\*) . $arg ;;
+               *) . ./$arg ;;
+               esac
+
+               if test -z "$pic_object" || \
+                  test -z "$non_pic_object" ||
+                  test "$pic_object" = none && \
+                  test "$non_pic_object" = none; then
+                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+
+               # Extract subdirectory from the argument.
+               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+               if test "X$xdir" = "X$arg"; then
+                 xdir=
+               else
+                 xdir="$xdir/"
+               fi
+
+               if test "$pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 pic_object="$xdir$pic_object"
+
+                 if test "$prev" = dlfiles; then
+                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+                     dlfiles="$dlfiles $pic_object"
+                     prev=
+                     continue
+                   else
+                     # If libtool objects are unsupported, then we need to preload.
+                     prev=dlprefiles
+                   fi
+                 fi
+
+                 # CHECK ME:  I think I busted this.  -Ossama
+                 if test "$prev" = dlprefiles; then
+                   # Preload the old-style object.
+                   dlprefiles="$dlprefiles $pic_object"
+                   prev=
+                 fi
+
+                 # A PIC object.
+                 libobjs="$libobjs $pic_object"
+                 arg="$pic_object"
+               fi
+
+               # Non-PIC object.
+               if test "$non_pic_object" != none; then
+                 # Prepend the subdirectory the object is found in.
+                 non_pic_object="$xdir$non_pic_object"
+
+                 # A standard non-PIC object
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+                 if test -z "$pic_object" || test "$pic_object" = none ; then
+                   arg="$non_pic_object"
+                 fi
+               else
+                 # If the PIC object exists, use it instead.
+                 # $xdir was prepended to $pic_object above.
+                 non_pic_object="$pic_object"
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+               fi
+             else
+               # Only an error if not doing a dry-run.
+               if test -z "$run"; then
+                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+                 exit $EXIT_FAILURE
+               else
+                 # Dry-run case.
+
+                 # Extract subdirectory from the argument.
+                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+                 if test "X$xdir" = "X$arg"; then
+                   xdir=
+                 else
+                   xdir="$xdir/"
+                 fi
+
+                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+                 libobjs="$libobjs $pic_object"
+                 non_pic_objects="$non_pic_objects $non_pic_object"
+               fi
+             fi
+           done
+         else
+           $echo "$modename: link input file \`$save_arg' does not exist"
+           exit $EXIT_FAILURE
+         fi
+         arg=$save_arg
+         prev=
+         continue
+         ;;
+       rpath | xrpath)
+         # We need an absolute path.
+         case $arg in
+         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         *)
+           $echo "$modename: only absolute run-paths are allowed" 1>&2
+           exit $EXIT_FAILURE
+           ;;
+         esac
+         if test "$prev" = rpath; then
+           case "$rpath " in
+           *" $arg "*) ;;
+           *) rpath="$rpath $arg" ;;
+           esac
+         else
+           case "$xrpath " in
+           *" $arg "*) ;;
+           *) xrpath="$xrpath $arg" ;;
+           esac
+         fi
+         prev=
+         continue
+         ;;
+       xcompiler)
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
+       xlinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $wl$qarg"
+         prev=
+         compile_command="$compile_command $wl$qarg"
+         finalize_command="$finalize_command $wl$qarg"
+         continue
+         ;;
+       xcclinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
+       shrext)
+         shrext_cmds="$arg"
+         prev=
+         continue
+         ;;
+       darwin_framework|darwin_framework_skip)
+         test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+         compile_command="$compile_command $arg"
+         finalize_command="$finalize_command $arg"
+         prev=
+         continue
+         ;;
+       *)
+         eval "$prev=\"\$arg\""
+         prev=
+         continue
+         ;;
+       esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+       if test -n "$link_static_flag"; then
+         compile_command="$compile_command $link_static_flag"
+         finalize_command="$finalize_command $link_static_flag"
+       fi
+       continue
+       ;;
+
+      -allow-undefined)
+       # FIXME: remove this flag sometime in the future.
+       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+       continue
+       ;;
+
+      -avoid-version)
+       avoid_version=yes
+       continue
+       ;;
+
+      -dlopen)
+       prev=dlfiles
+       continue
+       ;;
+
+      -dlpreopen)
+       prev=dlprefiles
+       continue
+       ;;
+
+      -export-dynamic)
+       export_dynamic=yes
+       continue
+       ;;
+
+      -export-symbols | -export-symbols-regex)
+       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+         $echo "$modename: more than one -exported-symbols argument is not allowed"
+         exit $EXIT_FAILURE
+       fi
+       if test "X$arg" = "X-export-symbols"; then
+         prev=expsyms
+       else
+         prev=expsyms_regex
+       fi
+       continue
+       ;;
+
+      -framework|-arch|-isysroot)
+       case " $CC " in
+         *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
+               prev=darwin_framework_skip ;;
+         *) compiler_flags="$compiler_flags $arg"
+            prev=darwin_framework ;;
+       esac
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+       continue
+       ;;
+
+      -inst-prefix-dir)
+       prev=inst_prefix
+       continue
+       ;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+       case $with_gcc/$host in
+       no/*-*-irix* | /*-*-irix*)
+         compile_command="$compile_command $arg"
+         finalize_command="$finalize_command $arg"
+         ;;
+       esac
+       continue
+       ;;
+
+      -L*)
+       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         absdir=`cd "$dir" && pwd`
+         if test -z "$absdir"; then
+           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+           absdir="$dir"
+           notinst_path="$notinst_path $dir"
+         fi
+         dir="$absdir"
+         ;;
+       esac
+       case "$deplibs " in
+       *" -L$dir "*) ;;
+       *)
+         deplibs="$deplibs -L$dir"
+         lib_search_path="$lib_search_path $dir"
+         ;;
+       esac
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$dir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$dir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+       continue
+       ;;
+
+      -l*)
+       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+           # These systems don't actually have a C or math library (as such)
+           continue
+           ;;
+         *-*-os2*)
+           # These systems don't actually have a C library (as such)
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C and math libraries are in the System framework
+           deplibs="$deplibs -framework System"
+           continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           test "X$arg" = "X-lc" && continue
+           ;;
+         esac
+       elif test "X$arg" = "X-lc_r"; then
+        case $host in
+        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+          # Do not include libc_r directly, use -pthread flag.
+          continue
+          ;;
+        esac
+       fi
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+       compile_command="$compile_command $arg"
+       compiler_flags="$compiler_flags $arg"
+       finalize_command="$finalize_command $arg"
+       prev=xcompiler
+       continue
+       ;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+       compiler_flags="$compiler_flags $arg"
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+       continue
+       ;;
+
+      -module)
+       module=yes
+       continue
+       ;;
+
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -pg pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
+      -t[45]*|-txscale*|@*)
+
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -shrext)
+       prev=shrext
+       continue
+       ;;
+
+      -no-fast-install)
+       fast_install=no
+       continue
+       ;;
+
+      -no-install)
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         # The PATH hackery in wrapper scripts is required on Windows
+         # in order for the loader to find any dlls it needs.
+         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+         fast_install=no
+         ;;
+       *) no_install=yes ;;
+       esac
+       continue
+       ;;
+
+      -no-undefined)
+       allow_undefined=no
+       continue
+       ;;
+
+      -objectlist)
+       prev=objectlist
+       continue
+       ;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
+
+      -release)
+       prev=release
+       continue
+       ;;
+
+      -rpath)
+       prev=rpath
+       continue
+       ;;
+
+      -R)
+       prev=xrpath
+       continue
+       ;;
+
+      -R*)
+       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+       # We need an absolute path.
+       case $dir in
+       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       *)
+         $echo "$modename: only absolute run-paths are allowed" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+       case "$xrpath " in
+       *" $dir "*) ;;
+       *) xrpath="$xrpath $dir" ;;
+       esac
+       continue
+       ;;
+
+      -static | -static-libtool-libs)
+       # The effects of -static are defined in a previous loop.
+       # We used to do the same as -all-static on platforms that
+       # didn't have a PIC flag, but the assumption that the effects
+       # would be equivalent was wrong.  It would break on at least
+       # Digital Unix and AIX.
+       continue
+       ;;
+
+      -thread-safe)
+       thread_safe=yes
+       continue
+       ;;
+
+      -version-info)
+       prev=vinfo
+       continue
+       ;;
+      -version-number)
+       prev=vinfo
+       vinfo_number=yes
+       continue
+       ;;
+
+      -Wc,*)
+       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+         case $flag in
+           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
+           flag="\"$flag\""
+           ;;
+         esac
+         arg="$arg $wl$flag"
+         compiler_flags="$compiler_flags $flag"
+       done
+       IFS="$save_ifs"
+       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+       ;;
+
+      -Wl,*)
+       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+       arg=
+       save_ifs="$IFS"; IFS=','
+       for flag in $args; do
+         IFS="$save_ifs"
+         case $flag in
+           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
+           flag="\"$flag\""
+           ;;
+         esac
+         arg="$arg $wl$flag"
+         compiler_flags="$compiler_flags $wl$flag"
+         linker_flags="$linker_flags $flag"
+       done
+       IFS="$save_ifs"
+       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+       ;;
+
+      -Xcompiler)
+       prev=xcompiler
+       continue
+       ;;
+
+      -Xlinker)
+       prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
+       continue
+       ;;
+
+      # Some other compiler flag.
+      -* | +*)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       ;;
+
+      *.$objext)
+       # A standard object.
+       objs="$objs $arg"
+       ;;
+
+      *.lo)
+       # A libtool-controlled object.
+
+       # Check to see that this really is a libtool object.
+       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         pic_object=
+         non_pic_object=
+
+         # Read the .lo file
+         # If there is no directory component, then add one.
+         case $arg in
+         */* | *\\*) . $arg ;;
+         *) . ./$arg ;;
+         esac
+
+         if test -z "$pic_object" || \
+            test -z "$non_pic_object" ||
+            test "$pic_object" = none && \
+            test "$non_pic_object" = none; then
+           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         # Extract subdirectory from the argument.
+         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+         if test "X$xdir" = "X$arg"; then
+           xdir=
+         else
+           xdir="$xdir/"
+         fi
+
+         if test "$pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           pic_object="$xdir$pic_object"
+
+           if test "$prev" = dlfiles; then
+             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+               dlfiles="$dlfiles $pic_object"
+               prev=
+               continue
+             else
+               # If libtool objects are unsupported, then we need to preload.
+               prev=dlprefiles
+             fi
+           fi
+
+           # CHECK ME:  I think I busted this.  -Ossama
+           if test "$prev" = dlprefiles; then
+             # Preload the old-style object.
+             dlprefiles="$dlprefiles $pic_object"
+             prev=
+           fi
+
+           # A PIC object.
+           libobjs="$libobjs $pic_object"
+           arg="$pic_object"
+         fi
+
+         # Non-PIC object.
+         if test "$non_pic_object" != none; then
+           # Prepend the subdirectory the object is found in.
+           non_pic_object="$xdir$non_pic_object"
+
+           # A standard non-PIC object
+           non_pic_objects="$non_pic_objects $non_pic_object"
+           if test -z "$pic_object" || test "$pic_object" = none ; then
+             arg="$non_pic_object"
+           fi
+         else
+           # If the PIC object exists, use it instead.
+           # $xdir was prepended to $pic_object above.
+           non_pic_object="$pic_object"
+           non_pic_objects="$non_pic_objects $non_pic_object"
+         fi
+       else
+         # Only an error if not doing a dry-run.
+         if test -z "$run"; then
+           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+           exit $EXIT_FAILURE
+         else
+           # Dry-run case.
+
+           # Extract subdirectory from the argument.
+           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+           if test "X$xdir" = "X$arg"; then
+             xdir=
+           else
+             xdir="$xdir/"
+           fi
+
+           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+           libobjs="$libobjs $pic_object"
+           non_pic_objects="$non_pic_objects $non_pic_object"
+         fi
+       fi
+       ;;
+
+      *.$libext)
+       # An archive.
+       deplibs="$deplibs $arg"
+       old_deplibs="$old_deplibs $arg"
+       continue
+       ;;
+
+      *.la)
+       # A libtool-controlled library.
+
+       if test "$prev" = dlfiles; then
+         # This library was specified with -dlopen.
+         dlfiles="$dlfiles $arg"
+         prev=
+       elif test "$prev" = dlprefiles; then
+         # The library was specified with -dlpreopen.
+         dlprefiles="$dlprefiles $arg"
+         prev=
+       else
+         deplibs="$deplibs $arg"
+       fi
+       continue
+       ;;
+
+      # Some other compiler argument.
+      *)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+       ;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+       compile_command="$compile_command $arg"
+       finalize_command="$finalize_command $arg"
+      fi
+    done # argument parsing loop
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      compile_command="$compile_command $arg"
+      finalize_command="$finalize_command $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    if test "X$output_objdir" = "X$output"; then
+      output_objdir="$objdir"
+    else
+      output_objdir="$output_objdir/$objdir"
+    fi
+    # Create the object directory.
+    if test ! -d "$output_objdir"; then
+      $show "$mkdir $output_objdir"
+      $run $mkdir $output_objdir
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+       exit $exit_status
+      fi
+    fi
+
+    # Determine the type of output
+    case $output in
+    "")
+      $echo "$modename: you must specify an output file" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if test "X$duplicate_deps" = "Xyes" ; then
+       case "$libs " in
+       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+       esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+       for pre_post_dep in $predeps $postdeps; do
+         case "$pre_post_deps " in
+         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+         esac
+         pre_post_deps="$pre_post_deps $pre_post_dep"
+       done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    case $linkmode in
+    lib)
+       passes="conv link"
+       for file in $dlfiles $dlprefiles; do
+         case $file in
+         *.la) ;;
+         *)
+           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+           exit $EXIT_FAILURE
+           ;;
+         esac
+       done
+       ;;
+    prog)
+       compile_deplibs=
+       finalize_deplibs=
+       alldeplibs=no
+       newdlfiles=
+       newdlprefiles=
+       passes="conv scan dlopen dlpreopen link"
+       ;;
+    *)  passes="conv"
+       ;;
+    esac
+    for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link" ||
+        test "$linkmode,$pass" = "prog,scan"; then
+       libs="$deplibs"
+       deplibs=
+      fi
+      if test "$linkmode" = prog; then
+       case $pass in
+       dlopen) libs="$dlfiles" ;;
+       dlpreopen) libs="$dlprefiles" ;;
+       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       esac
+      fi
+      if test "$pass" = dlopen; then
+       # Collect dlpreopened libraries
+       save_deplibs="$deplibs"
+       deplibs=
+      fi
+      for deplib in $libs; do
+       lib=
+       found=no
+       case $deplib in
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+         if test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$deplib $compile_deplibs"
+           finalize_deplibs="$deplib $finalize_deplibs"
+         else
+           compiler_flags="$compiler_flags $deplib"
+         fi
+         continue
+         ;;
+       -l*)
+         if test "$linkmode" != lib && test "$linkmode" != prog; then
+           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+           continue
+         fi
+         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+           for search_ext in .la $std_shrext .so .a; do
+             # Search the libtool library
+             lib="$searchdir/lib${name}${search_ext}"
+             if test -f "$lib"; then
+               if test "$search_ext" = ".la"; then
+                 found=yes
+               else
+                 found=no
+               fi
+               break 2
+             fi
+           done
+         done
+         if test "$found" != yes; then
+           # deplib doesn't seem to be a libtool library
+           if test "$linkmode,$pass" = "prog,link"; then
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             deplibs="$deplib $deplibs"
+             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+           fi
+           continue
+         else # deplib is a libtool library
+           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+           # We need to do some special things here, and not later.
+           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+             case " $predeps $postdeps " in
+             *" $deplib "*)
+               if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+                 library_names=
+                 old_library=
+                 case $lib in
+                 */* | *\\*) . $lib ;;
+                 *) . ./$lib ;;
+                 esac
+                 for l in $old_library $library_names; do
+                   ll="$l"
+                 done
+                 if test "X$ll" = "X$old_library" ; then # only static version available
+                   found=no
+                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+                   test "X$ladir" = "X$lib" && ladir="."
+                   lib=$ladir/$old_library
+                   if test "$linkmode,$pass" = "prog,link"; then
+                     compile_deplibs="$deplib $compile_deplibs"
+                     finalize_deplibs="$deplib $finalize_deplibs"
+                   else
+                     deplibs="$deplib $deplibs"
+                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+                   fi
+                   continue
+                 fi
+               fi
+               ;;
+             *) ;;
+             esac
+           fi
+         fi
+         ;; # -l
+       -L*)
+         case $linkmode in
+         lib)
+           deplibs="$deplib $deplibs"
+           test "$pass" = conv && continue
+           newdependency_libs="$deplib $newdependency_libs"
+           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+           ;;
+         prog)
+           if test "$pass" = conv; then
+             deplibs="$deplib $deplibs"
+             continue
+           fi
+           if test "$pass" = scan; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+           ;;
+         *)
+           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+           ;;
+         esac # linkmode
+         continue
+         ;; # -L
+       -R*)
+         if test "$pass" = link; then
+           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+           # Make sure the xrpath contains only unique directories.
+           case "$xrpath " in
+           *" $dir "*) ;;
+           *) xrpath="$xrpath $dir" ;;
+           esac
+         fi
+         deplibs="$deplib $deplibs"
+         continue
+         ;;
+       *.la) lib="$deplib" ;;
+       *.$libext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+           continue
+         fi
+         case $linkmode in
+         lib)
+           valid_a_lib=no
+           case $deplibs_check_method in
+             match_pattern*)
+               set dummy $deplibs_check_method
+               match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+               if eval $echo \"$deplib\" 2>/dev/null \
+                   | $SED 10q \
+                   | $EGREP "$match_pattern_regex" > /dev/null; then
+                 valid_a_lib=yes
+               fi
+               ;;
+             pass_all)
+               valid_a_lib=yes
+               ;;
+            esac
+           if test "$valid_a_lib" != yes; then
+             $echo
+             $echo "*** Warning: Trying to link with static lib archive $deplib."
+             $echo "*** I have the capability to make that library automatically link in when"
+             $echo "*** you link to this library.  But I can only do this if you have a"
+             $echo "*** shared version of the library, which you do not appear to have"
+             $echo "*** because the file extensions .$libext of this argument makes me believe"
+             $echo "*** that it is just a static archive that I should not used here."
+           else
+             $echo
+             $echo "*** Warning: Linking the shared library $output against the"
+             $echo "*** static library $deplib is not portable!"
+             deplibs="$deplib $deplibs"
+           fi
+           continue
+           ;;
+         prog)
+           if test "$pass" != link; then
+             deplibs="$deplib $deplibs"
+           else
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           fi
+           continue
+           ;;
+         esac # linkmode
+         ;; # *.$libext
+       *.lo | *.$objext)
+         if test "$pass" = conv; then
+           deplibs="$deplib $deplibs"
+         elif test "$linkmode" = prog; then
+           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             newdlprefiles="$newdlprefiles $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             newdlfiles="$newdlfiles $deplib"
+           fi
+         fi
+         continue
+         ;;
+       %DEPLIBS%)
+         alldeplibs=yes
+         continue
+         ;;
+       esac # case $deplib
+       if test "$found" = yes || test -f "$lib"; then :
+       else
+         $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$ladir" = "X$lib" && ladir="."
+
+       dlname=
+       dlopen=
+       dlpreopen=
+       libdir=
+       library_names=
+       old_library=
+       # If the library was installed with an old release of libtool,
+       # it will not redefine variables installed, or shouldnotlink
+       installed=yes
+       shouldnotlink=no
+       avoidtemprpath=
+
+
+       # Read the .la file
+       case $lib in
+       */* | *\\*) . $lib ;;
+       *) . ./$lib ;;
+       esac
+
+       if test "$linkmode,$pass" = "lib,link" ||
+          test "$linkmode,$pass" = "prog,scan" ||
+          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+       fi
+
+       if test "$pass" = conv; then
+         # Only check for convenience libraries
+         deplibs="$lib $deplibs"
+         if test -z "$libdir"; then
+           if test -z "$old_library"; then
+             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+             exit $EXIT_FAILURE
+           fi
+           # It is a libtool convenience library, so add in its objects.
+           convenience="$convenience $ladir/$objdir/$old_library"
+           old_convenience="$old_convenience $ladir/$objdir/$old_library"
+           tmp_libs=
+           for deplib in $dependency_libs; do
+             deplibs="$deplib $deplibs"
+              if test "X$duplicate_deps" = "Xyes" ; then
+               case "$tmp_libs " in
+               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+               esac
+              fi
+             tmp_libs="$tmp_libs $deplib"
+           done
+         elif test "$linkmode" != prog && test "$linkmode" != lib; then
+           $echo "$modename: \`$lib' is not a convenience library" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         continue
+       fi # $pass = conv
+
+
+       # Get the name of the library we link against.
+       linklib=
+       for l in $old_library $library_names; do
+         linklib="$l"
+       done
+       if test -z "$linklib"; then
+         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # This library was specified with -dlopen.
+       if test "$pass" = dlopen; then
+         if test -z "$libdir"; then
+           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         if test -z "$dlname" ||
+            test "$dlopen_support" != yes ||
+            test "$build_libtool_libs" = no; then
+           # If there is no dlname, no dlopen support or we're linking
+           # statically, we need to preload.  We also need to preload any
+           # dependent libraries so libltdl's deplib preloader doesn't
+           # bomb out in the load deplibs phase.
+           dlprefiles="$dlprefiles $lib $dependency_libs"
+         else
+           newdlfiles="$newdlfiles $lib"
+         fi
+         continue
+       fi # $pass = dlopen
+
+       # We need an absolute path.
+       case $ladir in
+       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       *)
+         abs_ladir=`cd "$ladir" && pwd`
+         if test -z "$abs_ladir"; then
+           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+           abs_ladir="$ladir"
+         fi
+         ;;
+       esac
+       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+       # Find the relevant object directory and library name.
+       if test "X$installed" = Xyes; then
+         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           $echo "$modename: warning: library \`$lib' was moved." 1>&2
+           dir="$ladir"
+           absdir="$abs_ladir"
+           libdir="$abs_ladir"
+         else
+           dir="$libdir"
+           absdir="$libdir"
+         fi
+         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+       else
+         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+           dir="$ladir"
+           absdir="$abs_ladir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         else
+           dir="$ladir/$objdir"
+           absdir="$abs_ladir/$objdir"
+           # Remove this search path later
+           notinst_path="$notinst_path $abs_ladir"
+         fi
+       fi # $installed = yes
+       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+       # This library was specified with -dlpreopen.
+       if test "$pass" = dlpreopen; then
+         if test -z "$libdir"; then
+           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+         # Prefer using a static library (so that no silly _DYNAMIC symbols
+         # are required to link).
+         if test -n "$old_library"; then
+           newdlprefiles="$newdlprefiles $dir/$old_library"
+         # Otherwise, use the dlname, so that lt_dlopen finds it.
+         elif test -n "$dlname"; then
+           newdlprefiles="$newdlprefiles $dir/$dlname"
+         else
+           newdlprefiles="$newdlprefiles $dir/$linklib"
+         fi
+       fi # $pass = dlpreopen
+
+       if test -z "$libdir"; then
+         # Link the convenience library
+         if test "$linkmode" = lib; then
+           deplibs="$dir/$old_library $deplibs"
+         elif test "$linkmode,$pass" = "prog,link"; then
+           compile_deplibs="$dir/$old_library $compile_deplibs"
+           finalize_deplibs="$dir/$old_library $finalize_deplibs"
+         else
+           deplibs="$lib $deplibs" # used for prog,scan pass
+         fi
+         continue
+       fi
+
+
+       if test "$linkmode" = prog && test "$pass" != link; then
+         newlib_search_path="$newlib_search_path $ladir"
+         deplibs="$lib $deplibs"
+
+         linkalldeplibs=no
+         if test "$link_all_deplibs" != no || test -z "$library_names" ||
+            test "$build_libtool_libs" = no; then
+           linkalldeplibs=yes
+         fi
+
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           case $deplib in
+           -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+           esac
+           # Need to link against all dependency_libs?
+           if test "$linkalldeplibs" = yes; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           if test "X$duplicate_deps" = "Xyes" ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done # for deplib
+         continue
+       fi # $linkmode = prog...
+
+       if test "$linkmode,$pass" = "prog,link"; then
+         if test -n "$library_names" &&
+         { { test "$prefer_static_libs" = no ||
+             test "$prefer_static_libs,$installed" = "built,yes"; } ||
+           test -z "$old_library"; }; then
+           # We need to hardcode the library path
+           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+             # Make sure the rpath contains only unique directories.
+             case "$temp_rpath " in
+             *" $dir "*) ;;
+             *" $absdir "*) ;;
+             *) temp_rpath="$temp_rpath $absdir" ;;
+             esac
+           fi
+
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi # $linkmode,$pass = prog,link...
+
+         if test "$alldeplibs" = yes &&
+            { test "$deplibs_check_method" = pass_all ||
+              { test "$build_libtool_libs" = yes &&
+                test -n "$library_names"; }; }; then
+           # We only need to search for static libraries
+           continue
+         fi
+       fi
+
+       link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test "$use_static_libs" = built && test "$installed" = yes ; then
+         use_static_libs=no
+       fi
+       if test -n "$library_names" &&
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
+         if test "$installed" = no; then
+           notinst_deplibs="$notinst_deplibs $lib"
+           need_relink=yes
+         fi
+         # This is a shared library
+
+         # Warn about portability, can't link against -module's on
+         # some systems (darwin)
+         if test "$shouldnotlink" = yes && test "$pass" = link ; then
+           $echo
+           if test "$linkmode" = prog; then
+             $echo "*** Warning: Linking the executable $output against the loadable module"
+           else
+             $echo "*** Warning: Linking the shared library $output against the loadable module"
+           fi
+           $echo "*** $linklib is not portable!"
+         fi
+         if test "$linkmode" = lib &&
+            test "$hardcode_into_libs" = yes; then
+           # Hardcode the library path.
+           # Skip directories that are in the system default run-time
+           # search path.
+           case " $sys_lib_dlsearch_path " in
+           *" $absdir "*) ;;
+           *)
+             case "$compile_rpath " in
+             *" $absdir "*) ;;
+             *) compile_rpath="$compile_rpath $absdir"
+             esac
+             ;;
+           esac
+           case " $sys_lib_dlsearch_path " in
+           *" $libdir "*) ;;
+           *)
+             case "$finalize_rpath " in
+             *" $libdir "*) ;;
+             *) finalize_rpath="$finalize_rpath $libdir"
+             esac
+             ;;
+           esac
+         fi
+
+         if test -n "$old_archive_from_expsyms_cmds"; then
+           # figure out the soname
+           set dummy $library_names
+           realname="$2"
+           shift; shift
+           libname=`eval \\$echo \"$libname_spec\"`
+           # use dlname if we got it. it's perfectly good, no?
+           if test -n "$dlname"; then
+             soname="$dlname"
+           elif test -n "$soname_spec"; then
+             # bleh windows
+             case $host in
+             *cygwin* | mingw*)
+               major=`expr $current - $age`
+               versuffix="-$major"
+               ;;
+             esac
+             eval soname=\"$soname_spec\"
+           else
+             soname="$realname"
+           fi
+
+           # Make a new name for the extract_expsyms_cmds to use
+           soroot="$soname"
+           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+
+           # If the library has no export list, then create one now
+           if test -f "$output_objdir/$soname-def"; then :
+           else
+             $show "extracting exported symbol list from \`$soname'"
+             save_ifs="$IFS"; IFS='~'
+             cmds=$extract_expsyms_cmds
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+             done
+             IFS="$save_ifs"
+           fi
+
+           # Create $newlib
+           if test -f "$output_objdir/$newlib"; then :; else
+             $show "generating import library for \`$soname'"
+             save_ifs="$IFS"; IFS='~'
+             cmds=$old_archive_from_expsyms_cmds
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+             done
+             IFS="$save_ifs"
+           fi
+           # make sure the library variables are pointing to the new library
+           dir=$output_objdir
+           linklib=$newlib
+         fi # test -n "$old_archive_from_expsyms_cmds"
+
+         if test "$linkmode" = prog || test "$mode" != relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           lib_linked=yes
+           case $hardcode_action in
+           immediate | unsupported)
+             if test "$hardcode_direct" = no; then
+               add="$dir/$linklib"
+               case $host in
+                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) add_dir="-L$dir" ;;
+                 *-*-darwin* )
+                   # if the lib is a module then we can not link against
+                   # it, someone is ignoring the new warnings I added
+                   if /usr/bin/file -L $add 2> /dev/null |
+                      $EGREP ": [^:]* bundle" >/dev/null ; then
+                     $echo "** Warning, lib $linklib is a module, not a shared library"
+                     if test -z "$old_library" ; then
+                       $echo
+                       $echo "** And there doesn't seem to be a static archive available"
+                       $echo "** The link will probably fail, sorry"
+                     else
+                       add="$dir/$old_library"
+                     fi
+                   fi
+               esac
+             elif test "$hardcode_minus_L" = no; then
+               case $host in
+               *-*-sunos*) add_shlibpath="$dir" ;;
+               esac
+               add_dir="-L$dir"
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = no; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           relink)
+             if test "$hardcode_direct" = yes; then
+               add="$dir/$linklib"
+             elif test "$hardcode_minus_L" = yes; then
+               add_dir="-L$dir"
+               # Try looking first in the location we're being installed to.
+               if test -n "$inst_prefix_dir"; then
+                 case $libdir in
+                   [\\/]*)
+                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                     ;;
+                 esac
+               fi
+               add="-l$name"
+             elif test "$hardcode_shlibpath_var" = yes; then
+               add_shlibpath="$dir"
+               add="-l$name"
+             else
+               lib_linked=no
+             fi
+             ;;
+           *) lib_linked=no ;;
+           esac
+
+           if test "$lib_linked" != yes; then
+             $echo "$modename: configuration error: unsupported hardcode properties"
+             exit $EXIT_FAILURE
+           fi
+
+           if test -n "$add_shlibpath"; then
+             case :$compile_shlibpath: in
+             *":$add_shlibpath:"*) ;;
+             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+             esac
+           fi
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+             if test "$hardcode_direct" != yes && \
+                test "$hardcode_minus_L" != yes && \
+                test "$hardcode_shlibpath_var" = yes; then
+               case :$finalize_shlibpath: in
+               *":$libdir:"*) ;;
+               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               esac
+             fi
+           fi
+         fi
+
+         if test "$linkmode" = prog || test "$mode" = relink; then
+           add_shlibpath=
+           add_dir=
+           add=
+           # Finalize command for both is simple: just hardcode it.
+           if test "$hardcode_direct" = yes; then
+             add="$libdir/$linklib"
+           elif test "$hardcode_minus_L" = yes; then
+             add_dir="-L$libdir"
+             add="-l$name"
+           elif test "$hardcode_shlibpath_var" = yes; then
+             case :$finalize_shlibpath: in
+             *":$libdir:"*) ;;
+             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+             esac
+             add="-l$name"
+           elif test "$hardcode_automatic" = yes; then
+             if test -n "$inst_prefix_dir" &&
+                test -f "$inst_prefix_dir$libdir/$linklib" ; then
+               add="$inst_prefix_dir$libdir/$linklib"
+             else
+               add="$libdir/$linklib"
+             fi
+           else
+             # We cannot seem to hardcode it, guess we'll fake it.
+             add_dir="-L$libdir"
+             # Try looking first in the location we're being installed to.
+             if test -n "$inst_prefix_dir"; then
+               case $libdir in
+                 [\\/]*)
+                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
+                   ;;
+               esac
+             fi
+             add="-l$name"
+           fi
+
+           if test "$linkmode" = prog; then
+             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+           else
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
+           fi
+         fi
+       elif test "$linkmode" = prog; then
+         # Here we assume that one of hardcode_direct or hardcode_minus_L
+         # is not unsupported.  This is valid on all known static and
+         # shared platforms.
+         if test "$hardcode_direct" != unsupported; then
+           test -n "$old_library" && linklib="$old_library"
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
+         else
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+         fi
+       elif test "$build_libtool_libs" = yes; then
+         # Not a shared library
+         if test "$deplibs_check_method" != pass_all; then
+           # We're trying link a shared library against a static one
+           # but the system doesn't support it.
+
+           # Just print a warning and add the library to dependency_libs so
+           # that the program can be linked against the static library.
+           $echo
+           $echo "*** Warning: This system can not link to static lib archive $lib."
+           $echo "*** I have the capability to make that library automatically link in when"
+           $echo "*** you link to this library.  But I can only do this if you have a"
+           $echo "*** shared version of the library, which you do not appear to have."
+           if test "$module" = yes; then
+             $echo "*** But as you try to build a module library, libtool will still create "
+             $echo "*** a static module, that should work as long as the dlopening application"
+             $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+             if test -z "$global_symbol_pipe"; then
+               $echo
+               $echo "*** However, this would only work if libtool was able to extract symbol"
+               $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+               $echo "*** not find such a program.  So, this module is probably useless."
+               $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+             fi
+             if test "$build_old_libs" = no; then
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         else
+           deplibs="$dir/$old_library $deplibs"
+           link_static=yes
+         fi
+       fi # link shared/static library?
+
+       if test "$linkmode" = lib; then
+         if test -n "$dependency_libs" &&
+            { test "$hardcode_into_libs" != yes ||
+              test "$build_old_libs" = yes ||
+              test "$link_static" = yes; }; then
+           # Extract -R from dependency_libs
+           temp_deplibs=
+           for libdir in $dependency_libs; do
+             case $libdir in
+             -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+                  case " $xrpath " in
+                  *" $temp_xrpath "*) ;;
+                  *) xrpath="$xrpath $temp_xrpath";;
+                  esac;;
+             *) temp_deplibs="$temp_deplibs $libdir";;
+             esac
+           done
+           dependency_libs="$temp_deplibs"
+         fi
+
+         newlib_search_path="$newlib_search_path $absdir"
+         # Link against this library
+         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+         # ... and its dependency_libs
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           if test "X$duplicate_deps" = "Xyes" ; then
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+           fi
+           tmp_libs="$tmp_libs $deplib"
+         done
+
+         if test "$link_all_deplibs" != no; then
+           # Add the search paths of all dependency libraries
+           for deplib in $dependency_libs; do
+             case $deplib in
+             -L*) path="$deplib" ;;
+             *.la)
+               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+               test "X$dir" = "X$deplib" && dir="."
+               # We need an absolute path.
+               case $dir in
+               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               *)
+                 absdir=`cd "$dir" && pwd`
+                 if test -z "$absdir"; then
+                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+                   absdir="$dir"
+                 fi
+                 ;;
+               esac
+               if grep "^installed=no" $deplib > /dev/null; then
+                 path="$absdir/$objdir"
+               else
+                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+                 if test -z "$libdir"; then
+                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                   exit $EXIT_FAILURE
+                 fi
+                 if test "$absdir" != "$libdir"; then
+                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+                 fi
+                 path="$absdir"
+               fi
+               depdepl=
+               case $host in
+               *-*-darwin*)
+                 # we do not want to link against static libs,
+                 # but need to link against shared
+                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+                 if test -n "$deplibrary_names" ; then
+                   for tmp in $deplibrary_names ; do
+                     depdepl=$tmp
+                   done
+                   if test -f "$path/$depdepl" ; then
+                     depdepl="$path/$depdepl"
+                   fi
+                   # do not add paths which are already there
+                   case " $newlib_search_path " in
+                   *" $path "*) ;;
+                   *) newlib_search_path="$newlib_search_path $path";;
+                   esac
+                 fi
+                 path=""
+                 ;;
+               *)
+                 path="-L$path"
+                 ;;
+               esac
+               ;;
+             -l*)
+               case $host in
+               *-*-darwin*)
+                 # Again, we only want to link against shared libraries
+                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+                 for tmp in $newlib_search_path ; do
+                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
+                     eval depdepl="$tmp/lib$tmp_libs.dylib"
+                     break
+                   fi
+                 done
+                 path=""
+                 ;;
+               *) continue ;;
+               esac
+               ;;
+             *) continue ;;
+             esac
+             case " $deplibs " in
+             *" $path "*) ;;
+             *) deplibs="$path $deplibs" ;;
+             esac
+             case " $deplibs " in
+             *" $depdepl "*) ;;
+             *) deplibs="$depdepl $deplibs" ;;
+             esac
+           done
+         fi # link_all_deplibs != no
+       fi # linkmode = lib
+      done # for deplib in $libs
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+       # Link the dlpreopened libraries before other libraries
+       for deplib in $save_deplibs; do
+         deplibs="$deplib $deplibs"
+       done
+      fi
+      if test "$pass" != dlopen; then
+       if test "$pass" != conv; then
+         # Make sure lib_search_path contains only unique directories.
+         lib_search_path=
+         for dir in $newlib_search_path; do
+           case "$lib_search_path " in
+           *" $dir "*) ;;
+           *) lib_search_path="$lib_search_path $dir" ;;
+           esac
+         done
+         newlib_search_path=
+       fi
+
+       if test "$linkmode,$pass" != "prog,link"; then
+         vars="deplibs"
+       else
+         vars="compile_deplibs finalize_deplibs"
+       fi
+       for var in $vars dependency_libs; do
+         # Add libraries to $var in reverse order
+         eval tmp_libs=\"\$$var\"
+         new_libs=
+         for deplib in $tmp_libs; do
+           # FIXME: Pedantically, this is the right thing to do, so
+           #        that some nasty dependency loop isn't accidentally
+           #        broken:
+           #new_libs="$deplib $new_libs"
+           # Pragmatically, this seems to cause very few problems in
+           # practice:
+           case $deplib in
+           -L*) new_libs="$deplib $new_libs" ;;
+           -R*) ;;
+           *)
+             # And here is the reason: when a library appears more
+             # than once as an explicit dependence of a library, or
+             # is implicitly linked in more than once by the
+             # compiler, it is considered special, and multiple
+             # occurrences thereof are not removed.  Compare this
+             # with having the same library being listed as a
+             # dependency of multiple other libraries: in this case,
+             # we know (pedantically, we assume) the library does not
+             # need to be listed more than once, so we keep only the
+             # last copy.  This is not always right, but it is rare
+             # enough that we require users that really mean to play
+             # such unportable linking tricks to link the library
+             # using -Wl,-lname, so that libtool does not consider it
+             # for duplicate removal.
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
+         done
+         tmp_libs=
+         for deplib in $new_libs; do
+           case $deplib in
+           -L*)
+             case " $tmp_libs " in
+             *" $deplib "*) ;;
+             *) tmp_libs="$tmp_libs $deplib" ;;
+             esac
+             ;;
+           *) tmp_libs="$tmp_libs $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+       case " $predeps $postdeps $compiler_lib_search_path " in
+       *" $i "*)
+         i=""
+         ;;
+       esac
+       if test -n "$i" ; then
+         tmp_libs="$tmp_libs $i"
+       fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$deplibs"; then
+       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+      fi
+
+      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+      fi
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+       eval shared_ext=\"$shrext_cmds\"
+       eval libname=\"$libname_spec\"
+       ;;
+      *)
+       if test "$module" = no; then
+         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       if test "$need_lib_prefix" != no; then
+         # Add the "lib" prefix for modules if required
+         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+         eval shared_ext=\"$shrext_cmds\"
+         eval libname=\"$libname_spec\"
+       else
+         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+       fi
+       ;;
+      esac
+
+      if test -n "$objs"; then
+       if test "$deplibs_check_method" != pass_all; then
+         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+         exit $EXIT_FAILURE
+       else
+         $echo
+         $echo "*** Warning: Linking the shared library $output against the non-libtool"
+         $echo "*** objects $objs is not portable!"
+         libobjs="$libobjs $objs"
+       fi
+      fi
+
+      if test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+      fi
+
+      set dummy $rpath
+      if test "$#" -gt 2; then
+       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+      fi
+      install_libdir="$2"
+
+      oldlibs=
+      if test -z "$rpath"; then
+       if test "$build_libtool_libs" = yes; then
+         # Building a libtool convenience library.
+         # Some compilers have problems with a `.al' extension so
+         # convenience libraries should have the same extension an
+         # archive normally would.
+         oldlibs="$output_objdir/$libname.$libext $oldlibs"
+         build_libtool_libs=convenience
+         build_old_libs=yes
+       fi
+
+       if test -n "$vinfo"; then
+         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
+       fi
+
+       if test -n "$release"; then
+         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+       fi
+      else
+
+       # Parse the version information argument.
+       save_ifs="$IFS"; IFS=':'
+       set dummy $vinfo 0 0 0
+       IFS="$save_ifs"
+
+       if test -n "$8"; then
+         $echo "$modename: too many parameters to \`-version-info'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # convert absolute version numbers to libtool ages
+       # this retains compatibility with .la files and attempts
+       # to make the code below a bit more comprehensible
+
+       case $vinfo_number in
+       yes)
+         number_major="$2"
+         number_minor="$3"
+         number_revision="$4"
+         #
+         # There are really only two kinds -- those that
+         # use the current revision as the major version
+         # and those that subtract age and use age as
+         # a minor version.  But, then there is irix
+         # which has an extra 1 added just for fun
+         #
+         case $version_type in
+         darwin|linux|osf|windows|none)
+           current=`expr $number_major + $number_minor`
+           age="$number_minor"
+           revision="$number_revision"
+           ;;
+         freebsd-aout|freebsd-elf|sunos)
+           current="$number_major"
+           revision="$number_minor"
+           age="0"
+           ;;
+         irix|nonstopux)
+           current=`expr $number_major + $number_minor - 1`
+           age="$number_minor"
+           revision="$number_minor"
+           ;;
+         esac
+         ;;
+       no)
+         current="$2"
+         revision="$3"
+         age="$4"
+         ;;
+       esac
+
+       # Check that each of the things are valid numbers.
+       case $current in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       case $revision in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       case $age in
+       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+       *)
+         $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       if test "$age" -gt "$current"; then
+         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Calculate the version variables.
+       major=
+       versuffix=
+       verstring=
+       case $version_type in
+       none) ;;
+
+       darwin)
+         # Like Linux, but with the current version available in
+         # verstring for coding it into the library header
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         # Darwin ld doesn't like 0 for these options...
+         minor_current=`expr $current + 1`
+         verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+         ;;
+
+       freebsd-aout)
+         major=".$current"
+         versuffix=".$current.$revision";
+         ;;
+
+       freebsd-elf)
+         major=".$current"
+         versuffix=".$current";
+         ;;
+
+       irix | nonstopux)
+         major=`expr $current - $age + 1`
+
+         case $version_type in
+           nonstopux) verstring_prefix=nonstopux ;;
+           *)         verstring_prefix=sgi ;;
+         esac
+         verstring="$verstring_prefix$major.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$revision
+         while test "$loop" -ne 0; do
+           iface=`expr $revision - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring_prefix$major.$iface:$verstring"
+         done
+
+         # Before this point, $major must not contain `.'.
+         major=.$major
+         versuffix="$major.$revision"
+         ;;
+
+       linux)
+         major=.`expr $current - $age`
+         versuffix="$major.$age.$revision"
+         ;;
+
+       osf)
+         major=.`expr $current - $age`
+         versuffix=".$current.$age.$revision"
+         verstring="$current.$age.$revision"
+
+         # Add in all the interfaces that we are compatible with.
+         loop=$age
+         while test "$loop" -ne 0; do
+           iface=`expr $current - $loop`
+           loop=`expr $loop - 1`
+           verstring="$verstring:${iface}.0"
+         done
+
+         # Make executables depend on our current version.
+         verstring="$verstring:${current}.0"
+         ;;
+
+       sunos)
+         major=".$current"
+         versuffix=".$current.$revision"
+         ;;
+
+       windows)
+         # Use '-' rather than '.', since we only want one
+         # extension on DOS 8.3 filesystems.
+         major=`expr $current - $age`
+         versuffix="-$major"
+         ;;
+
+       *)
+         $echo "$modename: unknown library version type \`$version_type'" 1>&2
+         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       # Clear the version info if we defaulted, and they specified a release.
+       if test -z "$vinfo" && test -n "$release"; then
+         major=
+         case $version_type in
+         darwin)
+           # we can't check for "0.0" in archive_cmds due to quoting
+           # problems, so we reset it completely
+           verstring=
+           ;;
+         *)
+           verstring="0.0"
+           ;;
+         esac
+         if test "$need_version" = no; then
+           versuffix=
+         else
+           versuffix=".0.0"
+         fi
+       fi
+
+       # Remove version info from name if versioning should be avoided
+       if test "$avoid_version" = yes && test "$need_version" = no; then
+         major=
+         versuffix=
+         verstring=""
+       fi
+
+       # Check to see if the archive will have undefined symbols.
+       if test "$allow_undefined" = yes; then
+         if test "$allow_undefined_flag" = unsupported; then
+           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+           build_libtool_libs=no
+           build_old_libs=yes
+         fi
+       else
+         # Don't allow undefined symbols.
+         allow_undefined_flag="$no_undefined_flag"
+       fi
+      fi
+
+      if test "$mode" != relink; then
+       # Remove our outputs, but don't remove object files since they
+       # may have been created when compiling PIC objects.
+       removelist=
+       tempremovelist=`$echo "$output_objdir/*"`
+       for p in $tempremovelist; do
+         case $p in
+           *.$objext)
+              ;;
+           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+              if test "X$precious_files_regex" != "X"; then
+                if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+                then
+                  continue
+                fi
+              fi
+              removelist="$removelist $p"
+              ;;
+           *) ;;
+         esac
+       done
+       if test -n "$removelist"; then
+         $show "${rm}r $removelist"
+         $run ${rm}r $removelist
+       fi
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+       oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+       # Transform .lo files to .o files.
+       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+#      for path in $notinst_path; do
+#      lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
+#      deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+#      dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+#      done
+
+      if test -n "$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       temp_xrpath=
+       for libdir in $xrpath; do
+         temp_xrpath="$temp_xrpath -R$libdir"
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+         dependency_libs="$temp_xrpath $dependency_libs"
+       fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+       case " $dlprefiles $dlfiles " in
+       *" $lib "*) ;;
+       *) dlfiles="$dlfiles $lib" ;;
+       esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+       case "$dlprefiles " in
+       *" $lib "*) ;;
+       *) dlprefiles="$dlprefiles $lib" ;;
+       esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+       if test -n "$rpath"; then
+         case $host in
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+           # these systems don't actually have a c library (as such)!
+           ;;
+         *-*-rhapsody* | *-*-darwin1.[012])
+           # Rhapsody C library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
+         *-*-netbsd*)
+           # Don't link with libc until the a.out ld.so is fixed.
+           ;;
+         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+           # Do not include libc due to us having libc/libc_r.
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
+           ;;
+         *)
+           # Add libc to deplibs on all other systems if necessary.
+           if test "$build_libtool_need_lc" = "yes"; then
+             deplibs="$deplibs -lc"
+           fi
+           ;;
+         esac
+       fi
+
+       # Transform deplibs into only deplibs that can be linked in shared.
+       name_save=$name
+       libname_save=$libname
+       release_save=$release
+       versuffix_save=$versuffix
+       major_save=$major
+       # I'm not sure if I'm treating the release correctly.  I think
+       # release should show up in the -l (ie -lgmp5) so we don't want to
+       # add it in twice.  Is that correct?
+       release=""
+       versuffix=""
+       major=""
+       newdeplibs=
+       droppeddeps=no
+       case $deplibs_check_method in
+       pass_all)
+         # Don't check for shared/static.  Everything works.
+         # This might be a little naive.  We might want to check
+         # whether the library exists or not.  But this is on
+         # osf3 & osf4 and I'm not really sure... Just
+         # implementing what was already the behavior.
+         newdeplibs=$deplibs
+         ;;
+       test_compile)
+         # This code stresses the "libraries are programs" paradigm to its
+         # limits. Maybe even breaks it.  We compile a program, linking it
+         # against the deplibs as a proxy for the library.  Then we can check
+         # whether they linked in statically or dynamically with ldd.
+         $rm conftest.c
+         cat > conftest.c <<EOF
+         int main() { return 0; }
+EOF
+         $rm conftest
+      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+           ldd_output=`ldd conftest`
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                 case " $predeps $postdeps " in
+                 *" $i "*)
+                   newdeplibs="$newdeplibs $i"
+                   i=""
+                   ;;
+                 esac
+               fi
+               if test -n "$i" ; then
+                 libname=`eval \\$echo \"$libname_spec\"`
+                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
+                 set dummy $deplib_matches
+                 deplib_match=$2
+                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                   newdeplibs="$newdeplibs $i"
+                 else
+                   droppeddeps=yes
+                   $echo
+                   $echo "*** Warning: dynamic linker does not accept needed library $i."
+                   $echo "*** I have the capability to make that library automatically link in when"
+                   $echo "*** you link to this library.  But I can only do this if you have a"
+                   $echo "*** shared version of the library, which I believe you do not have"
+                   $echo "*** because a test_compile did reveal that the linker did not use it for"
+                   $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+                 fi
+               fi
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         else
+           # Error occurred in the first compile.  Let's try to salvage
+           # the situation: Compile a separate program for each library.
+           for i in $deplibs; do
+             name=`expr $i : '-l\(.*\)'`
+             # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
+               $rm conftest
+               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+                 ldd_output=`ldd conftest`
+                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+                   case " $predeps $postdeps " in
+                   *" $i "*)
+                     newdeplibs="$newdeplibs $i"
+                     i=""
+                     ;;
+                   esac
+                 fi
+                 if test -n "$i" ; then
+                   libname=`eval \\$echo \"$libname_spec\"`
+                   deplib_matches=`eval \\$echo \"$library_names_spec\"`
+                   set dummy $deplib_matches
+                   deplib_match=$2
+                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+                     newdeplibs="$newdeplibs $i"
+                   else
+                     droppeddeps=yes
+                     $echo
+                     $echo "*** Warning: dynamic linker does not accept needed library $i."
+                     $echo "*** I have the capability to make that library automatically link in when"
+                     $echo "*** you link to this library.  But I can only do this if you have a"
+                     $echo "*** shared version of the library, which you do not appear to have"
+                     $echo "*** because a test_compile did reveal that the linker did not use this one"
+                     $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+                   fi
+                 fi
+               else
+                 droppeddeps=yes
+                 $echo
+                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+                 $echo "*** make it link in!  You will probably need to install it or some"
+                 $echo "*** library that it depends on before this library will be fully"
+                 $echo "*** functional.  Installing it before continuing would be even better."
+               fi
+             else
+               newdeplibs="$newdeplibs $i"
+             fi
+           done
+         fi
+         ;;
+       file_magic*)
+         set dummy $deplibs_check_method
+         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name=`expr $a_deplib : '-l\(.*\)'`
+           # If $name is empty we are operating on a -L argument.
+            if test "$name" != "" && test  "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval \\$echo \"$libname_spec\"`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                     # Follow soft links.
+                     if ls -lLd "$potent_lib" 2>/dev/null \
+                        | grep " -> " >/dev/null; then
+                       continue
+                     fi
+                     # The statement above tries to avoid entering an
+                     # endless loop below, in case of cyclic links.
+                     # We might still enter an endless loop, since a link
+                     # loop can be closed while we follow links,
+                     # but so what?
+                     potlib="$potent_lib"
+                     while test -h "$potlib" 2>/dev/null; do
+                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+                       case $potliblink in
+                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+                       *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+                       esac
+                     done
+                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+                        | ${SED} 10q \
+                        | $EGREP "$file_magic_regex" > /dev/null; then
+                       newdeplibs="$newdeplibs $a_deplib"
+                       a_deplib=""
+                       break 2
+                     fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $echo
+               $echo "*** Warning: linker path does not have real file for library $a_deplib."
+               $echo "*** I have the capability to make that library automatically link in when"
+               $echo "*** you link to this library.  But I can only do this if you have a"
+               $echo "*** shared version of the library, which you do not appear to have"
+               $echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $echo "*** with $libname but no candidates were found. (...for file magic test)"
+               else
+                 $echo "*** with $libname and none of the candidates passed a file format test"
+                 $echo "*** using a file magic. Last file checked: $potlib"
+               fi
+             fi
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       match_pattern*)
+         set dummy $deplibs_check_method
+         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+         for a_deplib in $deplibs; do
+           name=`expr $a_deplib : '-l\(.*\)'`
+           # If $name is empty we are operating on a -L argument.
+           if test -n "$name" && test "$name" != "0"; then
+             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+               case " $predeps $postdeps " in
+               *" $a_deplib "*)
+                 newdeplibs="$newdeplibs $a_deplib"
+                 a_deplib=""
+                 ;;
+               esac
+             fi
+             if test -n "$a_deplib" ; then
+               libname=`eval \\$echo \"$libname_spec\"`
+               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 for potent_lib in $potential_libs; do
+                   potlib="$potent_lib" # see symlink-check above in file_magic test
+                   if eval $echo \"$potent_lib\" 2>/dev/null \
+                       | ${SED} 10q \
+                       | $EGREP "$match_pattern_regex" > /dev/null; then
+                     newdeplibs="$newdeplibs $a_deplib"
+                     a_deplib=""
+                     break 2
+                   fi
+                 done
+               done
+             fi
+             if test -n "$a_deplib" ; then
+               droppeddeps=yes
+               $echo
+               $echo "*** Warning: linker path does not have real file for library $a_deplib."
+               $echo "*** I have the capability to make that library automatically link in when"
+               $echo "*** you link to this library.  But I can only do this if you have a"
+               $echo "*** shared version of the library, which you do not appear to have"
+               $echo "*** because I did check the linker path looking for a file starting"
+               if test -z "$potlib" ; then
+                 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+               else
+                 $echo "*** with $libname and none of the candidates passed a file format test"
+                 $echo "*** using a regex pattern. Last file checked: $potlib"
+               fi
+             fi
+           else
+             # Add a -L argument.
+             newdeplibs="$newdeplibs $a_deplib"
+           fi
+         done # Gone through all deplibs.
+         ;;
+       none | unknown | *)
+         newdeplibs=""
+         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+           -e 's/ -[LR][^ ]*//g'`
+         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+           for i in $predeps $postdeps ; do
+             # can't use Xsed below, because $i might contain '/'
+             tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+           done
+         fi
+         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
+           | grep . >/dev/null; then
+           $echo
+           if test "X$deplibs_check_method" = "Xnone"; then
+             $echo "*** Warning: inter-library dependencies are not supported in this platform."
+           else
+             $echo "*** Warning: inter-library dependencies are not known to be supported."
+           fi
+           $echo "*** All declared inter-library dependencies are being dropped."
+           droppeddeps=yes
+         fi
+         ;;
+       esac
+       versuffix=$versuffix_save
+       major=$major_save
+       release=$release_save
+       libname=$libname_save
+       name=$name_save
+
+       case $host in
+       *-*-rhapsody* | *-*-darwin1.[012])
+         # On Rhapsody replace the C library is the System framework
+         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+         ;;
+       esac
+
+       if test "$droppeddeps" = yes; then
+         if test "$module" = yes; then
+           $echo
+           $echo "*** Warning: libtool could not satisfy all declared inter-library"
+           $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+           $echo "*** a static module, that should work as long as the dlopening"
+           $echo "*** application is linked with the -dlopen flag."
+           if test -z "$global_symbol_pipe"; then
+             $echo
+             $echo "*** However, this would only work if libtool was able to extract symbol"
+             $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+             $echo "*** not find such a program.  So, this module is probably useless."
+             $echo "*** \`nm' from GNU binutils and a full rebuild may help."
+           fi
+           if test "$build_old_libs" = no; then
+             oldlibs="$output_objdir/$libname.$libext"
+             build_libtool_libs=module
+             build_old_libs=yes
+           else
+             build_libtool_libs=no
+           fi
+         else
+           $echo "*** The inter-library dependencies that have been dropped here will be"
+           $echo "*** automatically added whenever a program is linked with this library"
+           $echo "*** or is declared to -dlopen it."
+
+           if test "$allow_undefined" = no; then
+             $echo
+             $echo "*** Since this library must not contain undefined symbols,"
+             $echo "*** because either the platform does not support them or"
+             $echo "*** it was explicitly requested with -no-undefined,"
+             $echo "*** libtool will only create a static version of it."
+             if test "$build_old_libs" = no; then
+               oldlibs="$output_objdir/$libname.$libext"
+               build_libtool_libs=module
+               build_old_libs=yes
+             else
+               build_libtool_libs=no
+             fi
+           fi
+         fi
+       fi
+       # Done checking deplibs!
+       deplibs=$newdeplibs
+      fi
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      deplibs="$new_libs"
+
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+       if test "$hardcode_into_libs" = yes; then
+         # Hardcode the library paths
+         hardcode_libdirs=
+         dep_rpath=
+         rpath="$finalize_rpath"
+         test "$mode" != relink && rpath="$compile_rpath$rpath"
+         for libdir in $rpath; do
+           if test -n "$hardcode_libdir_flag_spec"; then
+             if test -n "$hardcode_libdir_separator"; then
+               if test -z "$hardcode_libdirs"; then
+                 hardcode_libdirs="$libdir"
+               else
+                 # Just accumulate the unique libdirs.
+                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+                   ;;
+                 *)
+                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+                   ;;
+                 esac
+               fi
+             else
+               eval flag=\"$hardcode_libdir_flag_spec\"
+               dep_rpath="$dep_rpath $flag"
+             fi
+           elif test -n "$runpath_var"; then
+             case "$perm_rpath " in
+             *" $libdir "*) ;;
+             *) perm_rpath="$perm_rpath $libdir" ;;
+             esac
+           fi
+         done
+         # Substitute the hardcoded libdirs into the rpath.
+         if test -n "$hardcode_libdir_separator" &&
+            test -n "$hardcode_libdirs"; then
+           libdir="$hardcode_libdirs"
+           if test -n "$hardcode_libdir_flag_spec_ld"; then
+             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+           else
+             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+           fi
+         fi
+         if test -n "$runpath_var" && test -n "$perm_rpath"; then
+           # We should set the runpath_var.
+           rpath=
+           for dir in $perm_rpath; do
+             rpath="$rpath$dir:"
+           done
+           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+         fi
+         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+       fi
+
+       shlibpath="$finalize_shlibpath"
+       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+       if test -n "$shlibpath"; then
+         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+       fi
+
+       # Get the real and link names of the library.
+       eval shared_ext=\"$shrext_cmds\"
+       eval library_names=\"$library_names_spec\"
+       set dummy $library_names
+       realname="$2"
+       shift; shift
+
+       if test -n "$soname_spec"; then
+         eval soname=\"$soname_spec\"
+       else
+         soname="$realname"
+       fi
+       if test -z "$dlname"; then
+         dlname=$soname
+       fi
+
+       lib="$output_objdir/$realname"
+       linknames=
+       for link
+       do
+         linknames="$linknames $link"
+       done
+
+       # Use standard objects if they are pic
+       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+       # Prepare the list of exported symbols
+       if test -z "$export_symbols"; then
+         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           cmds=$export_symbols_cmds
+           save_ifs="$IFS"; IFS='~'
+           for cmd in $cmds; do
+             IFS="$save_ifs"
+             eval cmd=\"$cmd\"
+             if len=`expr "X$cmd" : ".*"` &&
+              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+               $show "$cmd"
+               $run eval "$cmd" || exit $?
+               skipped_export=false
+             else
+               # The command line is too long to execute in one step.
+               $show "using reloadable object file for export list..."
+               skipped_export=:
+               # Break out early, otherwise skipped_export may be
+               # set to false by a later but shorter cmd.
+               break
+             fi
+           done
+           IFS="$save_ifs"
+           if test -n "$export_symbols_regex"; then
+             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+             $run eval '$mv "${export_symbols}T" "$export_symbols"'
+           fi
+         fi
+       fi
+
+       if test -n "$export_symbols" && test -n "$include_expsyms"; then
+         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+       fi
+
+       tmp_deplibs=
+       inst_prefix_arg=
+       for test_deplib in $deplibs; do
+               case " $convenience " in
+               *" $test_deplib "*) ;;
+               *)
+                       if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then
+                               inst_prefix_arg="$inst_prefix_arg $test_deplib"
+                       else
+                               tmp_deplibs="$tmp_deplibs $test_deplib"
+                       fi
+                       ;;
+               esac
+       done
+       deplibs="$tmp_deplibs"
+       if test -n "$inst_prefix_arg"; then
+               deplibs="$inst_prefix_arg $deplibs"
+       fi
+
+       if test -n "$convenience"; then
+         if test -n "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+         else
+           gentop="$output_objdir/${outputname}x"
+           generated="$generated $gentop"
+
+           func_extract_archives $gentop $convenience
+           libobjs="$libobjs $func_extract_archives_result"
+         fi
+       fi
+       
+       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+         eval flag=\"$thread_safe_flag_spec\"
+         linker_flags="$linker_flags $flag"
+       fi
+
+       # Make a backup of the uninstalled library when relinking
+       if test "$mode" = relink; then
+         $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+       fi
+
+       # Do each of the archive commands.
+       if test "$module" = yes && test -n "$module_cmds" ; then
+         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+           eval test_cmds=\"$module_expsym_cmds\"
+           cmds=$module_expsym_cmds
+         else
+           eval test_cmds=\"$module_cmds\"
+           cmds=$module_cmds
+         fi
+       else
+       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+         eval test_cmds=\"$archive_expsym_cmds\"
+         cmds=$archive_expsym_cmds
+       else
+         eval test_cmds=\"$archive_cmds\"
+         cmds=$archive_cmds
+         fi
+       fi
+
+       if test "X$skipped_export" != "X:" &&
+          len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         :
+       else
+         # The command line is too long to link in one step, link piecewise.
+         $echo "creating reloadable object files..."
+
+         # Save the value of $output and $libobjs because we want to
+         # use them later.  If we have whole_archive_flag_spec, we
+         # want to use save_libobjs as it was before
+         # whole_archive_flag_spec was expanded, because we can't
+         # assume the linker understands whole_archive_flag_spec.
+         # This may have to be revisited, in case too many
+         # convenience libraries get linked in and end up exceeding
+         # the spec.
+         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+           save_libobjs=$libobjs
+         fi
+         save_output=$output
+         output_la=`$echo "X$output" | $Xsed -e "$basename"`
+
+         # Clear the reloadable object creation command queue and
+         # initialize k to one.
+         test_cmds=
+         concat_cmds=
+         objlist=
+         delfiles=
+         last_robj=
+         k=1
+         output=$output_objdir/$output_la-${k}.$objext
+         # Loop over the list of objects to be linked.
+         for obj in $save_libobjs
+         do
+           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+           if test "X$objlist" = X ||
+              { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+                test "$len" -le "$max_cmd_len"; }; then
+             objlist="$objlist $obj"
+           else
+             # The command $test_cmds is almost too long, add a
+             # command to the queue.
+             if test "$k" -eq 1 ; then
+               # The first file doesn't have a previous command to add.
+               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+             else
+               # All subsequent reloadable object files will link in
+               # the last one created.
+               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+             fi
+             last_robj=$output_objdir/$output_la-${k}.$objext
+             k=`expr $k + 1`
+             output=$output_objdir/$output_la-${k}.$objext
+             objlist=$obj
+             len=1
+           fi
+         done
+         # Handle the remaining objects by creating one last
+         # reloadable object file.  All subsequent reloadable object
+         # files will link in the last one created.
+         test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+         if ${skipped_export-false}; then
+           $show "generating symbol list for \`$libname.la'"
+           export_symbols="$output_objdir/$libname.exp"
+           $run $rm $export_symbols
+           libobjs=$output
+           # Append the command to create the export file.
+           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+         # Set up a command to remove the reloadable object files
+         # after they are used.
+         i=0
+         while test "$i" -lt "$k"
+         do
+           i=`expr $i + 1`
+           delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+         done
+
+         $echo "creating a temporary reloadable object file: $output"
+
+         # Loop through the commands generated above and execute them.
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $concat_cmds; do
+           IFS="$save_ifs"
+           $show "$cmd"
+           $run eval "$cmd" || exit $?
+         done
+         IFS="$save_ifs"
+
+         libobjs=$output
+         # Restore the value of output.
+         output=$save_output
+
+         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+         fi
+         # Expand the library linking commands again to reset the
+         # value of $libobjs for piecewise linking.
+
+         # Do each of the archive commands.
+         if test "$module" = yes && test -n "$module_cmds" ; then
+           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+             cmds=$module_expsym_cmds
+           else
+             cmds=$module_cmds
+           fi
+         else
+         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+           cmds=$archive_expsym_cmds
+         else
+           cmds=$archive_cmds
+           fi
+         fi
+
+         # Append the command to remove the reloadable object files
+         # to the just-reset $cmds.
+         eval cmds=\"\$cmds~\$rm $delfiles\"
+       fi
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $show "$cmd"
+         $run eval "$cmd" || {
+           lt_exit=$?
+
+           # Restore the uninstalled library and exit
+           if test "$mode" = relink; then
+             $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+           fi
+
+           exit $lt_exit
+         }
+       done
+       IFS="$save_ifs"
+
+       # Restore the uninstalled library and exit
+       if test "$mode" = relink; then
+         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+
+         if test -n "$convenience"; then
+           if test -z "$whole_archive_flag_spec"; then
+             $show "${rm}r $gentop"
+             $run ${rm}r "$gentop"
+           fi
+         fi
+
+         exit $EXIT_SUCCESS
+       fi
+
+       # Create links to the real library.
+       for linkname in $linknames; do
+         if test "$realname" != "$linkname"; then
+           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+           $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+         fi
+       done
+
+       # If -module or -export-dynamic was specified, set the dlname.
+       if test "$module" = yes || test "$export_dynamic" = yes; then
+         # On all known operating systems, these are identical.
+         dlname="$soname"
+       fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$deplibs"; then
+       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+      fi
+
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$rpath"; then
+       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$xrpath"; then
+       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+      fi
+
+      case $output in
+      *.lo)
+       if test -n "$objs$old_deplibs"; then
+         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       libobj="$output"
+       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+       ;;
+      *)
+       libobj=
+       obj="$output"
+       ;;
+      esac
+
+      # Delete the old objects.
+      $run $rm $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+       if test -n "$whole_archive_flag_spec"; then
+         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+       else
+         gentop="$output_objdir/${obj}x"
+         generated="$generated $gentop"
+
+         func_extract_archives $gentop $convenience
+         reload_conv_objs="$reload_objs $func_extract_archives_result"
+       fi
+      fi
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      cmds=$reload_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+       IFS="$save_ifs"
+       eval cmd=\"$cmd\"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+       if test -n "$gentop"; then
+         $show "${rm}r $gentop"
+         $run ${rm}r $gentop
+       fi
+
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+       if test -n "$gentop"; then
+         $show "${rm}r $gentop"
+         $run ${rm}r $gentop
+       fi
+
+       # Create an invalid libtool object if no PIC, so that we don't
+       # accidentally link it into a program.
+       # $show "echo timestamp > $libobj"
+       # $run eval "echo timestamp > $libobj" || exit $?
+       exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+       # Only do commands if we really have different PIC objects.
+       reload_objs="$libobjs $reload_conv_objs"
+       output="$libobj"
+       cmds=$reload_cmds
+       save_ifs="$IFS"; IFS='~'
+       for cmd in $cmds; do
+         IFS="$save_ifs"
+         eval cmd=\"$cmd\"
+         $show "$cmd"
+         $run eval "$cmd" || exit $?
+       done
+       IFS="$save_ifs"
+      fi
+
+      if test -n "$gentop"; then
+       $show "${rm}r $gentop"
+       $run ${rm}r $gentop
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+      esac
+      if test -n "$vinfo"; then
+       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+      fi
+
+      if test -n "$release"; then
+       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+      fi
+
+      if test "$preload" = yes; then
+       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+          test "$dlopen_self_static" = unknown; then
+         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+       fi
+      fi
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+       # On Rhapsody replace the C library is the System framework
+       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+       ;;
+      esac
+
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+       case " $new_libs " in
+       *" -L$path/$objdir "*) ;;
+       *)
+         case " $compile_deplibs " in
+         *" -L$path/$objdir "*)
+           new_libs="$new_libs -L$path/$objdir" ;;
+         esac
+         ;;
+       esac
+      done
+      for deplib in $compile_deplibs; do
+       case $deplib in
+       -L*)
+         case " $new_libs " in
+         *" $deplib "*) ;;
+         *) new_libs="$new_libs $deplib" ;;
+         esac
+         ;;
+       *) new_libs="$new_libs $deplib" ;;
+       esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+       # If the user specified any rpath flags, then add them.
+       for libdir in $rpath $xrpath; do
+         # This is the magic to use -rpath.
+         case "$finalize_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_rpath="$finalize_rpath $libdir" ;;
+         esac
+       done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$perm_rpath " in
+         *" $libdir "*) ;;
+         *) perm_rpath="$perm_rpath $libdir" ;;
+         esac
+       fi
+       case $host in
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
+         case :$dllsearchpath: in
+         *":$libdir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$libdir";;
+         esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
+         ;;
+       esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+       if test -n "$hardcode_libdir_flag_spec"; then
+         if test -n "$hardcode_libdir_separator"; then
+           if test -z "$hardcode_libdirs"; then
+             hardcode_libdirs="$libdir"
+           else
+             # Just accumulate the unique libdirs.
+             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+               ;;
+             *)
+               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+               ;;
+             esac
+           fi
+         else
+           eval flag=\"$hardcode_libdir_flag_spec\"
+           rpath="$rpath $flag"
+         fi
+       elif test -n "$runpath_var"; then
+         case "$finalize_perm_rpath " in
+         *" $libdir "*) ;;
+         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+         esac
+       fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+        test -n "$hardcode_libdirs"; then
+       libdir="$hardcode_libdirs"
+       eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+       # Transform all the library objects into standard objects.
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
+
+      dlsyms=
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+       if test -n "$NM" && test -n "$global_symbol_pipe"; then
+         dlsyms="${outputname}S.c"
+       else
+         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+       fi
+      fi
+
+      if test -n "$dlsyms"; then
+       case $dlsyms in
+       "") ;;
+       *.c)
+         # Discover the nlist of each of the dlfiles.
+         nlist="$output_objdir/${outputname}.nm"
+
+         $show "$rm $nlist ${nlist}S ${nlist}T"
+         $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+         # Parse the name list into a source file.
+         $show "creating $output_objdir/$dlsyms"
+
+         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+         if test "$dlself" = yes; then
+           $show "generating symbol list for \`$output'"
+
+           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+           # Add our own program objects to the symbol list.
+           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+           for arg in $progfiles; do
+             $show "extracting global C symbols from \`$arg'"
+             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+           done
+
+           if test -n "$exclude_expsyms"; then
+             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+             $run eval '$mv "$nlist"T "$nlist"'
+           fi
+
+           if test -n "$export_symbols_regex"; then
+             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+             $run eval '$mv "$nlist"T "$nlist"'
+           fi
+
+           # Prepare the list of exported symbols
+           if test -z "$export_symbols"; then
+             export_symbols="$output_objdir/$outputname.exp"
+             $run $rm $export_symbols
+             $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+              case $host in
+              *cygwin* | *mingw* )
+               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+               $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+           else
+             $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+             $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+             $run eval 'mv "$nlist"T "$nlist"'
+              case $host in
+              *cygwin* | *mingw* )
+               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+               $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+                ;;
+              esac
+           fi
+         fi
+
+         for arg in $dlprefiles; do
+           $show "extracting global C symbols from \`$arg'"
+           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+           $run eval '$echo ": $name " >> "$nlist"'
+           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+         done
+
+         if test -z "$run"; then
+           # Make sure we have at least an empty file.
+           test -f "$nlist" || : > "$nlist"
+
+           if test -n "$exclude_expsyms"; then
+             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+             $mv "$nlist"T "$nlist"
+           fi
+
+           # Try sorting and uniquifying the output.
+           if grep -v "^: " < "$nlist" |
+               if sort -k 3 </dev/null >/dev/null 2>&1; then
+                 sort -k 3
+               else
+                 sort +2
+               fi |
+               uniq > "$nlist"S; then
+             :
+           else
+             grep -v "^: " < "$nlist" > "$nlist"S
+           fi
+
+           if test -f "$nlist"S; then
+             eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+           else
+             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
+           fi
+
+           $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+"
+
+           case $host in
+           *cygwin* | *mingw* )
+         $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+             ;;
+           * )
+         $echo >> "$output_objdir/$dlsyms" "\
+const struct {
+"
+             ;;
+           esac
+
+
+         $echo >> "$output_objdir/$dlsyms" "\
+  const char *name;
+  lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+           $echo >> "$output_objdir/$dlsyms" "\
+  {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+         fi
+
+         pic_flag_for_symtable=
+         case $host in
+         # compiling the symbol table file with pic_flag works around
+         # a FreeBSD bug that causes programs to crash when -lm is
+         # linked before any other PIC object.  But we must not use
+         # pic_flag when linking with -static.  The problem exists in
+         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+           case "$compile_command " in
+           *" -static "*) ;;
+           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
+           esac;;
+         *-*-hpux*)
+           case "$compile_command " in
+           *" -static "*) ;;
+           *) pic_flag_for_symtable=" $pic_flag";;
+           esac
+         esac
+
+         # Now compile the dynamic symbol file.
+         $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+         $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+         # Clean up the generated files.
+         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+         # Transform the symbol file into the correct name.
+          case $host in
+          *cygwin* | *mingw* )
+            if test -f "$output_objdir/${outputname}.def" ; then
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            else
+              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+             fi
+            ;;
+          * )
+            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
+            ;;
+          esac
+         ;;
+       *)
+         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+      else
+       # We keep going just in case the user didn't refer to
+       # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+       # really was required.
+
+       # Nullify the symbol file.
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
+      fi
+
+      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+       # Replace the output file specification.
+       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
+       link_command="$compile_command$compile_rpath"
+
+       # We have no uninstalled library dependencies, so finalize right now.
+       $show "$link_command"
+       $run eval "$link_command"
+       exit_status=$?
+
+       # Delete the generated files.
+       if test -n "$dlsyms"; then
+         $show "$rm $output_objdir/${outputname}S.${objext}"
+         $run $rm "$output_objdir/${outputname}S.${objext}"
+       fi
+
+       exit $exit_status
+      fi
+
+      if test -n "$shlibpath_var"; then
+       # We should set the shlibpath_var
+       rpath=
+       for dir in $temp_rpath; do
+         case $dir in
+         [\\/]* | [A-Za-z]:[\\/]*)
+           # Absolute path.
+           rpath="$rpath$dir:"
+           ;;
+         *)
+           # Relative path: add a thisdir entry.
+           rpath="$rpath\$thisdir/$dir:"
+           ;;
+         esac
+       done
+       temp_rpath="$rpath"
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+       if test -n "$perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+       if test -n "$finalize_perm_rpath"; then
+         # We should set the runpath_var.
+         rpath=
+         for dir in $finalize_perm_rpath; do
+           rpath="$rpath$dir:"
+         done
+         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+       fi
+      fi
+
+      if test "$no_install" = yes; then
+       # We don't need to create a wrapper script.
+       link_command="$compile_var$compile_command$compile_rpath"
+       # Replace the output file specification.
+       link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+       # Delete the old output file.
+       $run $rm $output
+       # Link the executable and exit
+       $show "$link_command"
+       $run eval "$link_command" || exit $?
+       exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+       # Fast installation is not supported
+       link_command="$compile_var$compile_command$compile_rpath"
+       relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+       $echo "$modename: \`$output' will be relinked during installation" 1>&2
+      else
+       if test "$fast_install" != no; then
+         link_command="$finalize_var$compile_command$finalize_rpath"
+         if test "$fast_install" = yes; then
+           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
+         else
+           # fast_install is set to needless
+           relink_command=
+         fi
+       else
+         link_command="$compile_var$compile_command$compile_rpath"
+         relink_command="$finalize_var$finalize_command$finalize_rpath"
+       fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      $show "$link_command"
+      $run eval "$link_command" || exit $?
+
+      # Now create the wrapper script.
+      $show "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+       # Preserve any variables that may affect compiler behavior
+       for var in $variables_saved_for_relink; do
+         if eval test -z \"\${$var+set}\"; then
+           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+         elif eval var_value=\$$var; test -z "$var_value"; then
+           relink_command="$var=; export $var; $relink_command"
+         else
+           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+           relink_command="$var=\"$var_value\"; export $var; $relink_command"
+         fi
+       done
+       relink_command="(cd `pwd`; $relink_command)"
+       relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      fi
+
+      # Quote $echo for shipping.
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+       case $progpath in
+       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+       esac
+       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if our run command is non-null.
+      if test -z "$run"; then
+       # win32 will think the script is a binary if it has
+       # a .exe suffix, so we strip it off here.
+       case $output in
+         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
+       esac
+       # test for cygwin because mv fails w/o .exe extensions
+       case $host in
+         *cygwin*)
+           exeext=.exe
+           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
+         *) exeext= ;;
+       esac
+       case $host in
+         *cygwin* | *mingw* )
+            output_name=`basename $output`
+            output_path=`dirname $output`
+            cwrappersource="$output_path/$objdir/lt-$output_name.c"
+            cwrapper="$output_path/$output_name.exe"
+            $rm $cwrappersource $cwrapper
+            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+           cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+           cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS.  */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+            cat >> $cwrappersource <<"EOF"
+  newargz[1] = find_executable(argv[0]);
+  if (newargz[1] == NULL)
+    lt_fatal("Couldn't find %s", argv[0]);
+  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+
+  for (i=0; i<argc+1; i++)
+  {
+    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    ;
+  }
+
+EOF
+
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+              ;;
+            esac
+
+            cat >> $cwrappersource <<"EOF"
+  return 127;
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable(const char * path)
+{
+  struct stat st;
+
+  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0) &&
+      (
+        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+       ((st.st_mode & S_IXUSR) == S_IXUSR))
+      )
+    return 1;
+  else
+    return 0;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
+
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+  {
+    concat_name = xstrdup (wrapper);
+    if (check_executable(concat_name))
+      return concat_name;
+    XFREE(concat_name);
+  }
+  else
+  {
+#endif
+    if (IS_DIR_SEPARATOR (wrapper[0]))
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable(concat_name))
+        return concat_name;
+      XFREE(concat_name);
+    }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+    {
+      has_slash = 1;
+      break;
+    }
+  if (!has_slash)
+  {
+    /* no slashes; search PATH */
+    const char* path = getenv ("PATH");
+    if (path != NULL)
+    {
+      for (p = path; *p; p = p_next)
+      {
+        const char* q;
+        size_t p_len;
+        for (q = p; *q; q++)
+          if (IS_PATH_SEPARATOR(*q))
+            break;
+        p_len = q - p;
+        p_next = (*q == '\0' ? q : q + 1);
+        if (p_len == 0)
+        {
+          /* empty path: current directory */
+          if (getcwd (tmp, LT_PATHMAX) == NULL)
+            lt_fatal ("getcwd failed");
+          tmp_len = strlen(tmp);
+          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, tmp, tmp_len);
+          concat_name[tmp_len] = '/';
+          strcpy (concat_name + tmp_len + 1, wrapper);
+        }
+        else
+        {
+          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+          memcpy (concat_name, p, p_len);
+          concat_name[p_len] = '/';
+          strcpy (concat_name + p_len + 1, wrapper);
+        }
+        if (check_executable(concat_name))
+          return concat_name;
+        XFREE(concat_name);
+      }
+    }
+    /* not found in PATH; assume curdir */
+  }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen(tmp);
+  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable(concat_name))
+    return concat_name;
+  XFREE(concat_name);
+  return NULL;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+          # we should really use a build-platform specific compiler
+          # here, but OTOH, the wrappers (shell script and this C one)
+          # are only useful if you want to execute the "real" binary.
+          # Since the "real" binary is built for $host, then this
+          # wrapper might as well be built for $host, too.
+          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+
+       $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variable:
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$echo are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    echo=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$echo works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$echo will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+       $echo >> $output "\
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+       if test "$fast_install" = yes; then
+         $echo >> $output "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" || \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $mkdir \"\$progdir\"
+    else
+      $rm \"\$progdir/\$file\"
+    fi"
+
+         $echo >> $output "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+       $echo \"\$relink_command_output\" >&2
+       $rm \"\$progdir/\$file\"
+       exit $EXIT_FAILURE
+      fi
+    fi
+
+    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $rm \"\$progdir/\$program\";
+      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $rm \"\$progdir/\$file\"
+  fi"
+       else
+         $echo >> $output "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+       fi
+
+       $echo >> $output "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+       # Export our shlibpath_var if we have one.
+       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+         $echo >> $output "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+       fi
+
+       # fixup the dll searchpath if we need to.
+       if test -n "$dllsearchpath"; then
+         $echo >> $output "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+       fi
+
+       $echo >> $output "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+       case $host in
+       # Backslashes separate directories on plain windows
+       *-*-mingw | *-*-os2*)
+         $echo >> $output "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+         ;;
+
+       *)
+         $echo >> $output "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+         ;;
+       esac
+       $echo >> $output "\
+      \$echo \"\$0: cannot exec \$program \$*\"
+      exit $EXIT_FAILURE
+    fi
+  else
+    # The program doesn't exist.
+    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$echo \"This script is just a wrapper for \$program.\" 1>&2
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi\
+"
+       chmod +x $output
+      fi
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+       oldobjs="$libobjs_save"
+       addlibs="$convenience"
+       build_libtool_libs=no
+      else
+       if test "$build_libtool_libs" = module; then
+         oldobjs="$libobjs_save"
+         build_libtool_libs=no
+       else
+         oldobjs="$old_deplibs $non_pic_objects"
+       fi
+       addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+       gentop="$output_objdir/${outputname}x"
+       generated="$generated $gentop"
+
+       func_extract_archives $gentop $addlibs
+       oldobjs="$oldobjs $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+       cmds=$old_archive_from_new_cmds
+      else
+       # POSIX demands no paths to be encoded in archives.  We have
+       # to avoid creating archives with duplicate basenames if we
+       # might have to extract them afterwards, e.g., when creating a
+       # static archive out of a convenience library, or when linking
+       # the entirety of a libtool archive into another (currently
+       # not supported by libtool).
+       if (for obj in $oldobjs
+           do
+             $echo "X$obj" | $Xsed -e 's%^.*/%%'
+           done | sort | sort -uc >/dev/null 2>&1); then
+         :
+       else
+         $echo "copying selected object files to avoid basename conflicts..."
+
+         if test -z "$gentop"; then
+           gentop="$output_objdir/${outputname}x"
+           generated="$generated $gentop"
+
+           $show "${rm}r $gentop"
+           $run ${rm}r "$gentop"
+           $show "$mkdir $gentop"
+           $run $mkdir "$gentop"
+           exit_status=$?
+           if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+             exit $exit_status
+           fi
+         fi
+
+         save_oldobjs=$oldobjs
+         oldobjs=
+         counter=1
+         for obj in $save_oldobjs
+         do
+           objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+           case " $oldobjs " in
+           " ") oldobjs=$obj ;;
+           *[\ /]"$objbase "*)
+             while :; do
+               # Make sure we don't pick an alternate name that also
+               # overlaps.
+               newobj=lt$counter-$objbase
+               counter=`expr $counter + 1`
+               case " $oldobjs " in
+               *[\ /]"$newobj "*) ;;
+               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+               esac
+             done
+             $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+             $run ln "$obj" "$gentop/$newobj" ||
+             $run cp "$obj" "$gentop/$newobj"
+             oldobjs="$oldobjs $gentop/$newobj"
+             ;;
+           *) oldobjs="$oldobjs $obj" ;;
+           esac
+         done
+       fi
+
+       eval cmds=\"$old_archive_cmds\"
+
+       if len=`expr "X$cmds" : ".*"` &&
+            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+         cmds=$old_archive_cmds
+       else
+         # the command line is too long to link in one step, link in parts
+         $echo "using piecewise archive linking..."
+         save_RANLIB=$RANLIB
+         RANLIB=:
+         objlist=
+         concat_cmds=
+         save_oldobjs=$oldobjs
+
+         # Is there a better way of finding the last object in the list?
+         for obj in $save_oldobjs
+         do
+           last_oldobj=$obj
+         done
+         for obj in $save_oldobjs
+         do
+           oldobjs="$objlist $obj"
+           objlist="$objlist $obj"
+           eval test_cmds=\"$old_archive_cmds\"
+           if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+              test "$len" -le "$max_cmd_len"; then
+             :
+           else
+             # the above command should be used before it gets too long
+             oldobjs=$objlist
+             if test "$obj" = "$last_oldobj" ; then
+               RANLIB=$save_RANLIB
+             fi
+             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+             objlist=
+           fi
+         done
+         RANLIB=$save_RANLIB
+         oldobjs=$objlist
+         if test "X$oldobjs" = "X" ; then
+           eval cmds=\"\$concat_cmds\"
+         else
+           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+         fi
+       fi
+      fi
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+        eval cmd=\"$cmd\"
+       IFS="$save_ifs"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$generated"; then
+      $show "${rm}r$generated"
+      $run ${rm}r$generated
+    fi
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      $show "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+       if eval test -z \"\${$var+set}\"; then
+         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+       elif eval var_value=\$$var; test -z "$var_value"; then
+         relink_command="$var=; export $var; $relink_command"
+       else
+         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+         relink_command="$var=\"$var_value\"; export $var; $relink_command"
+       fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
+      if test "$hardcode_automatic" = yes ; then
+       relink_command=
+      fi
+
+
+      # Only create the output if not a dry run.
+      if test -z "$run"; then
+       for installed in no yes; do
+         if test "$installed" = yes; then
+           if test -z "$install_libdir"; then
+             break
+           fi
+           output="$output_objdir/$outputname"i
+           # Replace all uninstalled libtool libraries with the installed ones
+           newdependency_libs=
+           for deplib in $dependency_libs; do
+             case $deplib in
+             *.la)
+               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               if test -z "$libdir"; then
+                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+                 exit $EXIT_FAILURE
+               fi
+               newdependency_libs="$newdependency_libs $libdir/$name"
+               ;;
+             *) newdependency_libs="$newdependency_libs $deplib" ;;
+             esac
+           done
+           dependency_libs="$newdependency_libs"
+           newdlfiles=
+           for lib in $dlfiles; do
+             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+             if test -z "$libdir"; then
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+             newdlfiles="$newdlfiles $libdir/$name"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+             if test -z "$libdir"; then
+               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+               exit $EXIT_FAILURE
+             fi
+             newdlprefiles="$newdlprefiles $libdir/$name"
+           done
+           dlprefiles="$newdlprefiles"
+         else
+           newdlfiles=
+           for lib in $dlfiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlfiles="$newdlfiles $abs"
+           done
+           dlfiles="$newdlfiles"
+           newdlprefiles=
+           for lib in $dlprefiles; do
+             case $lib in
+               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               *) abs=`pwd`"/$lib" ;;
+             esac
+             newdlprefiles="$newdlprefiles $abs"
+           done
+           dlprefiles="$newdlprefiles"
+         fi
+         $rm $output
+         # place dlname in correct position for cygwin
+         tdlname=$dlname
+         case $host,$output,$installed,$module,$dlname in
+           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+         esac
+         $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+         if test "$installed" = no && test "$need_relink" = yes; then
+           $echo >> $output "\
+relink_command=\"$relink_command\""
+         fi
+       done
+      fi
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool install mode
+  install)
+    modename="$modename: install"
+
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $echo "X$nonopt" | grep shtool > /dev/null; then
+      # Aesthetically quote it.
+      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$arg "
+      arg="$1"
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+    case $arg in
+    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*|"")
+      arg="\"$arg\""
+      ;;
+    esac
+    install_prog="$install_prog$arg"
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+       files="$files $dest"
+       dest=$arg
+       continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f) 
+       case " $install_prog " in
+       *[\\\ /]cp\ *) ;;
+       *) prev=$arg ;;
+       esac
+       ;;
+      -g | -m | -o) prev=$arg ;;
+      -s)
+       stripme=" -s"
+       continue
+       ;;
+      -*)
+       ;;
+      *)
+       # If the previous option needed an argument, then skip it.
+       if test -n "$prev"; then
+         prev=
+       else
+         dest=$arg
+         continue
+       fi
+       ;;
+      esac
+
+      # Aesthetically quote the argument.
+      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+      case $arg in
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
+       arg="\"$arg\""
+       ;;
+      esac
+      install_prog="$install_prog $arg"
+    done
+
+    if test -z "$install_prog"; then
+      $echo "$modename: you must specify an install program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -n "$prev"; then
+      $echo "$modename: the \`$prev' option requires an argument" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+       $echo "$modename: no file or destination specified" 1>&2
+      else
+       $echo "$modename: you must specify a destination" 1>&2
+      fi
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Strip any trailing slash from the destination.
+    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      test "X$destdir" = "X$dest" && destdir=.
+      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files
+      if test "$#" -gt 2; then
+       $echo "$modename: \`$dest' is not a directory" 1>&2
+       $echo "$help" 1>&2
+       exit $EXIT_FAILURE
+      fi
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+       case $file in
+       *.lo) ;;
+       *)
+         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+       # Do the static libraries later.
+       staticlibs="$staticlibs $file"
+       ;;
+
+      *.la)
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       library_names=
+       old_library=
+       relink_command=
+       # If there is no directory component, then add one.
+       case $file in
+       */* | *\\*) . $file ;;
+       *) . ./$file ;;
+       esac
+
+       # Add the libdir to current_libdirs if it is the destination.
+       if test "X$destdir" = "X$libdir"; then
+         case "$current_libdirs " in
+         *" $libdir "*) ;;
+         *) current_libdirs="$current_libdirs $libdir" ;;
+         esac
+       else
+         # Note the libdir as a future libdir.
+         case "$future_libdirs " in
+         *" $libdir "*) ;;
+         *) future_libdirs="$future_libdirs $libdir" ;;
+         esac
+       fi
+
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+       test "X$dir" = "X$file/" && dir=
+       dir="$dir$objdir"
+
+       if test -n "$relink_command"; then
+         # Determine the prefix the user has applied to our future dir.
+         inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+         # Don't allow the user to place us outside of our expected
+         # location b/c this prevents finding dependent libraries that
+         # are installed to the same prefix.
+         # At present, this check doesn't affect windows .dll's that
+         # are installed into $libdir/../bin (currently, that works fine)
+         # but it's something to keep an eye on.
+         if test "$inst_prefix_dir" = "$destdir"; then
+           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         if test -n "$inst_prefix_dir"; then
+           # Stick the inst_prefix_dir data into the link command.
+           relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+         else
+           relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+         fi
+
+         $echo "$modename: warning: relinking \`$file'" 1>&2
+         $show "$relink_command"
+         if $run eval "$relink_command"; then :
+         else
+           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+           exit $EXIT_FAILURE
+         fi
+       fi
+
+       # See the names of the shared library.
+       set dummy $library_names
+       if test -n "$2"; then
+         realname="$2"
+         shift
+         shift
+
+         srcname="$realname"
+         test -n "$relink_command" && srcname="$realname"T
+
+         # Install the shared library and build the symlinks.
+         $show "$install_prog $dir/$srcname $destdir/$realname"
+         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+         if test -n "$stripme" && test -n "$striplib"; then
+           $show "$striplib $destdir/$realname"
+           $run eval "$striplib $destdir/$realname" || exit $?
+         fi
+
+         if test "$#" -gt 0; then
+           # Delete the old symlinks, and create new ones.
+           # Try `ln -sf' first, because the `ln' binary might depend on
+           # the symlink we replace!  Solaris /bin/ln does not understand -f,
+           # so we also need to try rm && ln -s.
+           for linkname
+           do
+             if test "$linkname" != "$realname"; then
+                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
+             fi
+           done
+         fi
+
+         # Do each command in the postinstall commands.
+         lib="$destdir/$realname"
+         cmds=$postinstall_cmds
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $cmds; do
+           IFS="$save_ifs"
+           eval cmd=\"$cmd\"
+           $show "$cmd"
+           $run eval "$cmd" || {
+             lt_exit=$?
+
+             # Restore the uninstalled library and exit
+             if test "$mode" = relink; then
+               $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
+             fi
+
+             exit $lt_exit
+           }
+         done
+         IFS="$save_ifs"
+       fi
+
+       # Install the pseudo-library for information purposes.
+       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+       instname="$dir/$name"i
+       $show "$install_prog $instname $destdir/$name"
+       $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+       # Maybe install the static library, too.
+       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+       ;;
+
+      *.lo)
+       # Install (i.e. copy) a libtool object.
+
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+         destfile="$destdir/$destfile"
+       fi
+
+       # Deduce the name of the destination old-style object file.
+       case $destfile in
+       *.lo)
+         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+         ;;
+       *.$objext)
+         staticdest="$destfile"
+         destfile=
+         ;;
+       *)
+         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+         ;;
+       esac
+
+       # Install the libtool object if requested.
+       if test -n "$destfile"; then
+         $show "$install_prog $file $destfile"
+         $run eval "$install_prog $file $destfile" || exit $?
+       fi
+
+       # Install the old object if enabled.
+       if test "$build_old_libs" = yes; then
+         # Deduce the name of the old-style object file.
+         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+         $show "$install_prog $staticobj $staticdest"
+         $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+       fi
+       exit $EXIT_SUCCESS
+       ;;
+
+      *)
+       # Figure out destination file name, if it wasn't already specified.
+       if test -n "$destname"; then
+         destfile="$destdir/$destname"
+       else
+         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+         destfile="$destdir/$destfile"
+       fi
+
+       # If the file is missing, and there is a .exe on the end, strip it
+       # because it is most likely a libtool script we actually want to
+       # install
+       stripped_ext=""
+       case $file in
+         *.exe)
+           if test ! -f "$file"; then
+             file=`$echo $file|${SED} 's,.exe$,,'`
+             stripped_ext=".exe"
+           fi
+           ;;
+       esac
+
+       # Do a test to see if this is really a libtool program.
+       case $host in
+       *cygwin*|*mingw*)
+           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+           ;;
+       *)
+           wrapper=$file
+           ;;
+       esac
+       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+         notinst_deplibs=
+         relink_command=
+
+         # Note that it is not necessary on cygwin/mingw to append a dot to
+         # foo even if both foo and FILE.exe exist: automatic-append-.exe
+         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+         # `FILE.' does not work on cygwin managed mounts.
+         #
+         # If there is no directory component, then add one.
+         case $wrapper in
+         */* | *\\*) . ${wrapper} ;;
+         *) . ./${wrapper} ;;
+         esac
+
+         # Check the variables that should have been set.
+         if test -z "$notinst_deplibs"; then
+           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+           exit $EXIT_FAILURE
+         fi
+
+         finalize=yes
+         for lib in $notinst_deplibs; do
+           # Check to see that each library is installed.
+           libdir=
+           if test -f "$lib"; then
+             # If there is no directory component, then add one.
+             case $lib in
+             */* | *\\*) . $lib ;;
+             *) . ./$lib ;;
+             esac
+           fi
+           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+           if test -n "$libdir" && test ! -f "$libfile"; then
+             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+             finalize=no
+           fi
+         done
+
+         relink_command=
+         # Note that it is not necessary on cygwin/mingw to append a dot to
+         # foo even if both foo and FILE.exe exist: automatic-append-.exe
+         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
+         # `FILE.' does not work on cygwin managed mounts.
+         #
+         # If there is no directory component, then add one.
+         case $wrapper in
+         */* | *\\*) . ${wrapper} ;;
+         *) . ./${wrapper} ;;
+         esac
+
+         outputname=
+         if test "$fast_install" = no && test -n "$relink_command"; then
+           if test "$finalize" = yes && test -z "$run"; then
+             tmpdir=`func_mktempdir`
+             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
+             outputname="$tmpdir/$file"
+             # Replace the output file specification.
+             relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
+
+             $show "$relink_command"
+             if $run eval "$relink_command"; then :
+             else
+               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+               ${rm}r "$tmpdir"
+               continue
+             fi
+             file="$outputname"
+           else
+             $echo "$modename: warning: cannot relink \`$file'" 1>&2
+           fi
+         else
+           # Install the binary that we compiled earlier.
+           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+         fi
+       fi
+
+       # remove .exe since cygwin /usr/bin/install will append another
+       # one anyway 
+       case $install_prog,$host in
+       */usr/bin/install*,*cygwin*)
+         case $file:$destfile in
+         *.exe:*.exe)
+           # this is ok
+           ;;
+         *.exe:*)
+           destfile=$destfile.exe
+           ;;
+         *:*.exe)
+           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
+           ;;
+         esac
+         ;;
+       esac
+       $show "$install_prog$stripme $file $destfile"
+       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+       test -n "$outputname" && ${rm}r "$tmpdir"
+       ;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      $show "$install_prog $file $oldlib"
+      $run eval "$install_prog \$file \$oldlib" || exit $?
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+       $show "$old_striplib $oldlib"
+       $run eval "$old_striplib $oldlib" || exit $?
+      fi
+
+      # Do each command in the postinstall commands.
+      cmds=$old_postinstall_cmds
+      save_ifs="$IFS"; IFS='~'
+      for cmd in $cmds; do
+       IFS="$save_ifs"
+       eval cmd=\"$cmd\"
+       $show "$cmd"
+       $run eval "$cmd" || exit $?
+      done
+      IFS="$save_ifs"
+    done
+
+    if test -n "$future_libdirs"; then
+      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+    fi
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      test -n "$run" && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool finish mode
+  finish)
+    modename="$modename: finish"
+    libdirs="$nonopt"
+    admincmds=
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+       libdirs="$libdirs $dir"
+      done
+
+      for libdir in $libdirs; do
+       if test -n "$finish_cmds"; then
+         # Do each command in the finish commands.
+         cmds=$finish_cmds
+         save_ifs="$IFS"; IFS='~'
+         for cmd in $cmds; do
+           IFS="$save_ifs"
+           eval cmd=\"$cmd\"
+           $show "$cmd"
+           $run eval "$cmd" || admincmds="$admincmds
+       $cmd"
+         done
+         IFS="$save_ifs"
+       fi
+       if test -n "$finish_eval"; then
+         # Do the single finish_eval.
+         eval cmds=\"$finish_eval\"
+         $run eval "$cmds" || admincmds="$admincmds
+       $cmds"
+       fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit $EXIT_SUCCESS
+
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    $echo "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $echo "   $libdir"
+    done
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
+
+      $echo "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $echo "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+    ;;
+
+  # libtool execute mode
+  execute)
+    modename="$modename: execute"
+
+    # The first argument is the command name.
+    cmd="$nonopt"
+    if test -z "$cmd"; then
+      $echo "$modename: you must specify a COMMAND" 1>&2
+      $echo "$help"
+      exit $EXIT_FAILURE
+    fi
+
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      if test ! -f "$file"; then
+       $echo "$modename: \`$file' is not a file" 1>&2
+       $echo "$help" 1>&2
+       exit $EXIT_FAILURE
+      fi
+
+      dir=
+      case $file in
+      *.la)
+       # Check to see that this really is a libtool archive.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+       else
+         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+         $echo "$help" 1>&2
+         exit $EXIT_FAILURE
+       fi
+
+       # Read the libtool library.
+       dlname=
+       library_names=
+
+       # If there is no directory component, then add one.
+       case $file in
+       */* | *\\*) . $file ;;
+       *) . ./$file ;;
+       esac
+
+       # Skip this library if it cannot be dlopened.
+       if test -z "$dlname"; then
+         # Warn if it was a shared library.
+         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+         continue
+       fi
+
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$dir" = "X$file" && dir=.
+
+       if test -f "$dir/$objdir/$dlname"; then
+         dir="$dir/$objdir"
+       else
+         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+         exit $EXIT_FAILURE
+       fi
+       ;;
+
+      *.lo)
+       # Just add the directory containing the .lo file.
+       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       test "X$dir" = "X$file" && dir=.
+       ;;
+
+      *)
+       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+       continue
+       ;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+       eval "$shlibpath_var=\"\$dir\""
+      else
+       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+       # Do a test to see if this is really a libtool program.
+       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         # If there is no directory component, then add one.
+         case $file in
+         */* | *\\*) . $file ;;
+         *) . ./$file ;;
+         esac
+
+         # Transform arg to wrapped name.
+         file="$progdir/$program"
+       fi
+       ;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+      args="$args \"$file\""
+    done
+
+    if test -z "$run"; then
+      if test -n "$shlibpath_var"; then
+       # Export the shlibpath_var.
+       eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+               $lt_var=\$save_$lt_var; export $lt_var
+             else
+               $lt_unset $lt_var
+             fi"
+      done
+
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+       $echo "export $shlibpath_var"
+      fi
+      $echo "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+    ;;
+
+  # libtool clean and uninstall mode
+  clean | uninstall)
+    modename="$modename: $mode"
+    rm="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) rm="$rm $arg"; rmforce=yes ;;
+      -*) rm="$rm $arg" ;;
+      *) files="$files $arg" ;;
+      esac
+    done
+
+    if test -z "$rm"; then
+      $echo "$modename: you must specify an RM program" 1>&2
+      $echo "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    rmdirs=
+
+    origobjdir="$objdir"
+    for file in $files; do
+      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      if test "X$dir" = "X$file"; then
+       dir=.
+       objdir="$origobjdir"
+      else
+       objdir="$dir/$origobjdir"
+      fi
+      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      test "$mode" = uninstall && objdir="$dir"
+
+      # Remember objdir for removal later, being careful to avoid duplicates
+      if test "$mode" = clean; then
+       case " $rmdirs " in
+         *" $objdir "*) ;;
+         *) rmdirs="$rmdirs $objdir" ;;
+       esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if (test -L "$file") >/dev/null 2>&1 \
+       || (test -h "$file") >/dev/null 2>&1 \
+       || test -f "$file"; then
+       :
+      elif test -d "$file"; then
+       exit_status=1
+       continue
+      elif test "$rmforce" = yes; then
+       continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+       # Possibly a libtool archive, so verify it.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+         . $dir/$name
+
+         # Delete the libtool libraries and symlinks.
+         for n in $library_names; do
+           rmfiles="$rmfiles $objdir/$n"
+         done
+         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+         case "$mode" in
+         clean)
+           case "  $library_names " in
+           # "  " in the beginning catches empty $dlname
+           *" $dlname "*) ;;
+           *) rmfiles="$rmfiles $objdir/$dlname" ;;
+           esac
+            test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+           ;;
+         uninstall)
+           if test -n "$library_names"; then
+             # Do each command in the postuninstall commands.
+             cmds=$postuninstall_cmds
+             save_ifs="$IFS"; IFS='~'
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd"
+               if test "$?" -ne 0 && test "$rmforce" != yes; then
+                 exit_status=1
+               fi
+             done
+             IFS="$save_ifs"
+           fi
+
+           if test -n "$old_library"; then
+             # Do each command in the old_postuninstall commands.
+             cmds=$old_postuninstall_cmds
+             save_ifs="$IFS"; IFS='~'
+             for cmd in $cmds; do
+               IFS="$save_ifs"
+               eval cmd=\"$cmd\"
+               $show "$cmd"
+               $run eval "$cmd"
+               if test "$?" -ne 0 && test "$rmforce" != yes; then
+                 exit_status=1
+               fi
+             done
+             IFS="$save_ifs"
+           fi
+           # FIXME: should reinstall the best remaining shared library.
+           ;;
+         esac
+       fi
+       ;;
+
+      *.lo)
+       # Possibly a libtool object, so verify it.
+       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+         # Read the .lo file
+         . $dir/$name
+
+         # Add PIC object to the list of files to remove.
+         if test -n "$pic_object" \
+            && test "$pic_object" != none; then
+           rmfiles="$rmfiles $dir/$pic_object"
+         fi
+
+         # Add non-PIC object to the list of files to remove.
+         if test -n "$non_pic_object" \
+            && test "$non_pic_object" != none; then
+           rmfiles="$rmfiles $dir/$non_pic_object"
+         fi
+       fi
+       ;;
+
+      *)
+       if test "$mode" = clean ; then
+         noexename=$name
+         case $file in
+         *.exe)
+           file=`$echo $file|${SED} 's,.exe$,,'`
+           noexename=`$echo $name|${SED} 's,.exe$,,'`
+           # $file with .exe has already been added to rmfiles,
+           # add $file without .exe
+           rmfiles="$rmfiles $file"
+           ;;
+         esac
+         # Do a test to see if this is a libtool program.
+         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+           relink_command=
+           . $dir/$noexename
+
+           # note $name still contains .exe if it was in $file originally
+           # as does the version of $file that was added into $rmfiles
+           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+           if test "$fast_install" = yes && test -n "$relink_command"; then
+             rmfiles="$rmfiles $objdir/lt-$name"
+           fi
+           if test "X$noexename" != "X$name" ; then
+             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+           fi
+         fi
+       fi
+       ;;
+      esac
+      $show "$rm $rmfiles"
+      $run $rm $rmfiles || exit_status=1
+    done
+    objdir="$origobjdir"
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+       $show "rmdir $dir"
+       $run rmdir $dir >/dev/null 2>&1
+      fi
+    done
+
+    exit $exit_status
+    ;;
+
+  "")
+    $echo "$modename: you must specify a MODE" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+    ;;
+  esac
+
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit $EXIT_FAILURE
+  fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit $EXIT_FAILURE
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+    --config          show all configuration variables
+    --debug           enable verbose shell tracing
+-n, --dry-run         display commands without modifying any files
+    --features        display basic configuration information and exit
+    --finish          same as \`--mode=finish'
+    --help            display this help message and exit
+    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
+    --quiet           same as \`--silent'
+    --silent          don't print informational messages
+    --tag=TAG         use configuration variables from tag TAG
+    --version         print version information
+
+MODE must be one of the following:
+
+      clean           remove files from the build directory
+      compile         compile a source file into a libtool object
+      execute         automatically set library path, then run a program
+      finish          complete the installation of libtool libraries
+      install         install libraries or executables
+      link            create a library or an executable
+      uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+  exit $EXIT_SUCCESS
+  ;;
+
+clean)
+  $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+compile)
+  $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -static           always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+  ;;
+
+execute)
+  $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+  ;;
+
+finish)
+  $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+  ;;
+
+install)
+  $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+  ;;
+
+link)
+  $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+  ;;
+
+uninstall)
+  $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+  ;;
+
+*)
+  $echo "$modename: invalid operation mode \`$mode'" 1>&2
+  $echo "$help" 1>&2
+  exit $EXIT_FAILURE
+  ;;
+esac
+
+$echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit $?
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+disable_libs=shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+disable_libs=static
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/salome_adm/unix/config_files/missing b/salome_adm/unix/config_files/missing
new file mode 100755 (executable)
index 0000000..1c8ff70
--- /dev/null
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+          sed 's/\.am$/.in/' |
+          while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo "#! /bin/sh"
+       echo "# Created by GNU Automake missing as a replacement of"
+       echo "#  $ $@"
+       echo "exit 0"
+       chmod +x $file
+       exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.y)
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.c
+           fi
+           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" y.tab.h
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f y.tab.h; then
+       echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+       echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+       case $LASTARG in
+       *.l)
+           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+           if test -f "$SRCFILE"; then
+                cp "$SRCFILE" lex.yy.c
+           fi
+         ;;
+       esac
+    fi
+    if test ! -f lex.yy.c; then
+       echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+        you modified a dependency of a manual page.  You may need the
+        \`Help2man' package in order for those modifications to take
+        effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+       touch $file
+    else
+       test -z "$file" || exec >$file
+       echo ".ab help2man is required to generate this page"
+       exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+       /^@setfilename/{
+         s/.* \([^ ]*\) *$/\1/
+         p
+         q
+       }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+       case $firstarg in
+       *o*)
+           firstarg=`echo "$firstarg" | sed s/o//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+       case $firstarg in
+       *h*)
+           firstarg=`echo "$firstarg" | sed s/h//`
+           tar "$firstarg" "$@" && exit 0
+           ;;
+       esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/HEXABLOCK/Hex.cxx b/src/HEXABLOCK/Hex.cxx
new file mode 100755 (executable)
index 0000000..df0eadf
--- /dev/null
@@ -0,0 +1,70 @@
+
+// C++ : La clase principale de Hexa
+
+#include "Hex.hxx"
+
+#include "HexDocument.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Hex::Hex ()
+{
+}
+// ======================================================== Destructeur
+Hex::~Hex ()
+{
+   int nbre = liste_documents.size();
+   for (int nd=0 ; nd<nbre ; nd++) 
+       delete liste_documents [nd];
+}
+// ======================================================== countDocument
+int Hex::countDocument ()
+{
+   return liste_documents.size();
+}
+// ======================================================== getDocument
+Document* Hex::getDocument (int nro)
+{
+   if (nro<0 || nro>=(int)liste_documents.size())
+      return NULL;
+   
+   return liste_documents [nro];
+}
+// ======================================================== removeDocument
+void Hex::removeDocument (Document* doc)
+{
+   int nbre = liste_documents.size();
+   for (int nd=0 ; nd<nbre ; nd++) 
+       {
+       if (doc == liste_documents [nd])
+          {
+          liste_documents.erase (liste_documents.begin()+nd);
+          delete doc;
+          return;
+          }
+       }
+                      // Pas trouve dans la liste. On detruit quand meme
+    delete doc;
+}
+// ======================================================== addDocument
+Document* Hex::addDocument ()
+{
+   char   un_nom [40];
+   cpchar nomdoc = get_temp_name ("HexaTempo%02d.dat", un_nom);
+
+   Document* doc = new Document (nomdoc);
+   
+   liste_documents.push_back (doc);
+   return doc;
+}
+// ======================================================== loadDocument
+Document* Hex::loadDocument (const char* filename)
+{
+   Document* doc = new Document (filename);
+   
+   liste_documents.push_back (doc);
+   doc->loadXml ();
+   return doc;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/Hex.hxx b/src/HEXABLOCK/Hex.hxx
new file mode 100755 (executable)
index 0000000..933367e
--- /dev/null
@@ -0,0 +1,30 @@
+
+// class : La clase principale de Hexa
+
+#ifndef __HEX_H
+#define __HEX_H
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Hex
+{
+public:
+   int       countDocument ();
+   Document* getDocument (int nro);
+   void      removeDocument (Document* doc);
+
+   Document* addDocument ();
+   Document* loadDocument (const char* filename);
+
+             //  Constructeur + destructeur
+    Hex ();
+   ~Hex ();
+
+private:
+   vector <Document*> liste_documents;
+};
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCloner.cxx b/src/HEXABLOCK/HexCloner.cxx
new file mode 100755 (executable)
index 0000000..e6fa6f1
--- /dev/null
@@ -0,0 +1,148 @@
+
+// C++ : Gestion des noeuds
+
+#include "HexCloner.hxx"
+#include "HexMatrix.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexElements.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ============================================================= Constructeur
+Cloner::Cloner  (Matrix* mat)
+{
+   matrice = mat;
+}
+// ============================================================== clonerVertex
+Vertex* Cloner::clonerVertex (Vertex* orig)
+{
+    if (orig == NULL)
+        return orig;
+
+    Vertex* copie = clone_vertex [orig];
+    if (copie != NULL)
+        return copie;
+
+    copie = new Vertex (orig);
+    matrice -> perform (copie);
+    clone_vertex [orig] = copie;
+    return copie;
+}
+// ============================================================== clonerEdge
+Edge* Cloner::clonerEdge (Edge* orig)
+{
+    if (orig == NULL)
+        return orig;
+
+   Edge* copie = clone_edge [orig];
+   if (copie != NULL)
+       return copie;
+
+   copie = new Edge (orig);
+
+   copie->e_vertex [V_AMONT] = clonerVertex (orig->e_vertex [V_AMONT]);
+   copie->e_vertex [V_AVAL]  = clonerVertex (orig->e_vertex [V_AVAL]);
+
+   copie->majReferences ();
+   clone_edge [orig] = copie;
+
+   if (orig->debug())
+      {
+      copie->printName (" est la copie de ");
+      orig ->printName ("\n");
+      }
+
+   return copie;
+}
+// ============================================================== clonerQuad
+Quad* Cloner::clonerQuad (Quad* orig)
+{
+   if (orig == NULL)
+       return orig;
+
+   Quad* copie = clone_quad [orig];
+   if (copie != NULL)
+       return copie;
+
+   copie = new Quad (orig);
+
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       copie->q_edge [nro] = clonerEdge (orig->q_edge [nro]);
+
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       copie->q_vertex [nro] = clonerVertex (orig->q_vertex [nro]);
+
+   copie->majReferences ();
+   clone_quad [orig] = copie;
+   return copie;
+}
+// ============================================================== clonerHexa
+Hexa* Cloner::clonerHexa (Hexa* orig)
+{
+   if (orig == NULL)
+       return orig;
+
+   Hexa* copie = clone_hexa [orig];
+   if (copie != NULL)
+       return copie;
+
+   copie = new Hexa (orig);
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       copie->h_quad [nro] = clonerQuad (orig->h_quad [nro]);
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++) 
+       copie->h_edge [nro] = clonerEdge (orig->h_edge [nro]);
+
+   for (int nro=0 ; nro<HV_MAXI ; nro++) 
+       copie->h_vertex [nro] = clonerVertex (orig->h_vertex [nro]);
+
+   copie->majReferences ();
+   clone_hexa [orig] = copie;
+   return copie;
+}
+// ============================================================== clonerElements
+Elements* Cloner::clonerElements (Elements* orig)
+{
+   Elements* copie = new Elements (orig);
+
+   int nombre = orig->countHexa ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Hexa* elt  = orig->getHexa (nro);
+       Hexa* elt2 = clonerHexa (elt);
+       copie->setHexa (elt2, nro);
+       }
+
+   nombre = orig->countQuad ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Quad* elt  = orig->getQuad (nro);
+       Quad* elt2 = clonerQuad (elt);
+       copie->setQuad (elt2, nro);
+       }
+
+   nombre = orig->countEdge ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Edge* elt  = orig->getEdge (nro);
+       Edge* elt2 = clonerEdge (elt);
+       copie->setEdge (elt2, nro);
+       }
+
+   nombre = orig->countVertex ();
+   for (int nro=0 ; nro<nombre ; nro++)
+       {
+       Vertex* elt  = orig->getVertex (nro);
+       Vertex* elt2 = clonerVertex (elt);
+       copie->setVertex (elt2, nro);
+       }
+
+
+   return copie;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexCloner.hxx b/src/HEXABLOCK/HexCloner.hxx
new file mode 100755 (executable)
index 0000000..acb37dc
--- /dev/null
@@ -0,0 +1,34 @@
+
+// class : Le Reproducteur de blocks
+
+#ifndef __CLONER_H
+#define __CLONER_H
+
+#include "hexa_base.hxx"
+
+#include <map>
+
+BEGIN_NAMESPACE_HEXA
+
+class Cloner 
+{
+public:
+    Cloner (Matrix* mat);
+
+    void erase ();
+
+    Hexa*     clonerHexa     (Hexa*     orig);
+    Quad*     clonerQuad     (Quad*     orig);
+    Edge*     clonerEdge     (Edge*     orig);
+    Vertex*   clonerVertex   (Vertex*   orig);
+    Elements* clonerElements (Elements* orig);
+
+private:
+    Matrix* matrice;
+    std::map <Hexa*,   Hexa*>   clone_hexa;
+    std::map <Quad*,   Quad*>   clone_quad;
+    std::map <Edge*,   Edge*>   clone_edge;
+    std::map <Vertex*, Vertex*> clone_vertex;
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCrossElements.cxx b/src/HEXABLOCK/HexCrossElements.cxx
new file mode 100755 (executable)
index 0000000..2d30e0a
--- /dev/null
@@ -0,0 +1,931 @@
+
+// C++ : Gestion du croisement de cylindres
+
+#include "HexCrossElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexCylinder.hxx"
+
+static bool   db  = false;
+
+static const  int NbrIntCotes = 4;
+static const  int MaxLevel    = 7;
+
+static const double epaiss2 = 0.5;
+
+BEGIN_NAMESPACE_HEXA
+
+double calcul_centre (Vertex* orig, Vertex* inter); 
+// ====================================================== crossCylinders
+CrossElements::CrossElements (Document* doc, EnumGrid type) 
+             : Elements (doc)
+{
+   cross_cyl1   = NULL;
+   cross_cyl1   = NULL;
+   cross_cyl2   = NULL;
+   cross_center = NULL;
+   grid_type    = type;
+}
+// ====================================================== resize
+void CrossElements::resize ()
+{
+   size_hx  = 2;
+   size_hy  = S_MAXI;
+   size_hiy = NbrIntCotes;
+   size_hz [Cyl1] = size_h1z = 6;
+   size_hz [Cyl2] = size_h2z = 4;
+
+   size_vx  = size_hx + 1;
+   size_vy  = size_hy;
+   size_vz[Cyl1] = size_v1z = size_h1z + 1;
+   size_vz[Cyl2] = size_v2z = size_h2z + 1;
+
+   nbr_vertex1 = size_vx*size_vy* size_v1z;
+   nbr_quads1  = nbr_vertex1*DIM3;
+   nbr_edges1  = nbr_quads1;
+   nbr_hexas1  = size_hx * size_hy * size_h1z; 
+
+   nbr_vertex  = nbr_vertex1 + size_vx * size_vy * size_v1z;
+   nbr_quads   = nbr_vertex*DIM3;
+   nbr_edges   = nbr_quads;
+   nbr_hexas   = nbr_hexas1 + size_hx * size_hy * size_h2z;
+
+   tab_hexa  .resize (nbr_hexas*2);
+   tab_quad  .resize (nbr_quads*2);
+   tab_edge  .resize (nbr_edges*2);
+   tab_vertex.resize (nbr_vertex*2);
+
+   for (int nc=0 ; nc< nbr_hexas  ; nc++) tab_hexa   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_quads  ; nc++) tab_quad   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_edges  ; nc++) tab_edge   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_vertex ; nc++) tab_vertex [nc] = NULL;
+}
+// ====================================================== indHexa
+int CrossElements::indHexa (int cyl, int nx, int ny, int nz)
+{
+   if (cyl<0 || cyl>1) 
+       return NOTHING;
+   if (   nx < 0 || nx >= size_hx || ny < 0 || ny >= size_hy 
+       || nz < 0 || nz >= size_hz[cyl]) return NOTHING; 
+
+   int nro = cyl*nbr_hexas1 + nx + size_hx*ny + size_hx*size_hy*nz;
+   return nro;
+}
+// ====================================================== indQuad
+int CrossElements::indQuad (int cyl, int dd, int nx, int ny, int nz)
+{
+   if (cyl<0 || cyl>1 || dd <0 || dd >= DIM3) 
+       return NOTHING;
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz[cyl]) return NOTHING; 
+
+   int nro = cyl*nbr_quads1 + nx + size_vx*ny + size_vx*size_vy*nz 
+                                 + size_vx*size_vy*size_vz[cyl]*dd;
+   return nro;
+}
+// ====================================================== indEdge
+int CrossElements::indEdge (int cyl, int dd, int nx, int ny, int nz)
+{
+   return indQuad (cyl, dd, nx, ny, nz);
+}
+// ====================================================== indVertex
+int CrossElements::indVertex (int cyl, int nx, int ny, int nz)
+{
+   if (cyl<0 || cyl>1) 
+      return NOTHING;
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz[cyl]) 
+      return NOTHING;
+
+   int nro = cyl*nbr_vertex1 + nx + size_vx*ny + size_vx*size_vy*nz;
+   return nro;
+}
+// ------------------------------------------------------------------------
+// ====================================================== getHexaIJK
+Hexa* CrossElements::getHexaIJK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indHexa (cyl, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+
+   return tab_hexa [nro]; 
+}
+// ====================================================== getQuadIJ
+Quad* CrossElements::getQuadIJ (int cyl, int nx, int ny, int nz)
+{
+   int nro = indQuad (cyl, dir_z, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadJK
+Quad* CrossElements::getQuadJK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indQuad (cyl, dir_x, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadIK
+Quad* CrossElements::getQuadIK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indQuad (cyl, dir_y, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_quad [nro]; 
+}
+// ====================================================== getEdgeI
+Edge* CrossElements::getEdgeI (int cyl, int nx, int ny, int nz)
+{
+   int nro = indEdge (cyl, dir_x, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeJ
+Edge* CrossElements::getEdgeJ (int cyl, int nx, int ny, int nz)
+{
+   int nro = indEdge (cyl, dir_y, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeK
+Edge* CrossElements::getEdgeK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indEdge (cyl, dir_z, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_edge [nro]; 
+}
+// ====================================================== getVertexIJK
+Vertex* CrossElements::getVertexIJK (int cyl, int nx, int ny, int nz)
+{
+   int nro = indVertex (cyl, nx, ny, nz);
+   if (nro<0)
+      return NULL;
+   return tab_vertex [nro]; 
+}
+// ------------------------------------------------------------------------
+// ====================================================== setHexa
+void CrossElements::setHexa (Hexa* elt, int cyl, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_hexa [%d, %d,%d,%d] = ", cyl, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indHexa (cyl, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_hexa [nro] = elt;
+}
+// ====================================================== setQuad
+void CrossElements::setQuad (Quad* elt, int cyl, int dd, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_quad [%d,%d, %d,%d,%d] = ", cyl, dd, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indQuad (cyl, dd, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_quad [nro] = elt;
+}
+// ====================================================== setEdge
+void CrossElements::setEdge (Edge* elt, int cyl, int dd, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_edge [%d,%d, %d,%d,%d] = ", cyl, dd, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indEdge (cyl, dd, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_edge [nro] = elt;
+}
+// ====================================================== setVertex
+void CrossElements::setVertex (Vertex* elt, int cyl, int nx, int ny, int nz)
+{
+   if (db)
+      {
+      printf ("tab_vertex [%d, %d,%d,%d] = ", cyl, nx, ny, nz);
+      PrintName (elt);
+      printf ("\n");
+      }
+
+   int nro = indVertex (cyl, nx, ny, nz);
+   if (nro<0) 
+      return;
+   tab_vertex [nro] = elt;
+}
+// ====================================================== setVertex (2)
+void CrossElements::setVertex (int cyl, int nx, int ny, int nz, double px, 
+                                                     double py, double pz)
+{
+   int nro = indVertex (cyl, nx, ny, nz);
+   if (nro<0) 
+      return;
+   Vertex*    node = el_root->addVertex (px, py, pz);
+   setVertex (node, cyl, nx, ny, nz);
+}
+// ------------------------------------------------------------------------
+// ====================================================== copyVertex
+void CrossElements::copyVertex (int i1, int j1, int k1, int i2, int j2, int k2)
+{
+   Vertex*    node = getVertexIJK (Cyl1, i1, j1, k1);
+   setVertex (node, Cyl2, i2, j2, k2);
+}
+// ====================================================== copyEdge
+void CrossElements::copyEdge (int d1, int i1, int j1, int k1, int d2, int i2, 
+                                      int j2, int k2)
+{
+   Edge* edge = NULL;
+   switch (d1) 
+          {
+          case dir_x : edge = getEdgeI (Cyl1, i1, j1, k1);
+                       break;
+          case dir_y : edge = getEdgeJ (Cyl1, i1, j1, k1);
+                       break;
+          case dir_z : edge = getEdgeK (Cyl1, i1, j1, k1);
+                       break;
+          }
+
+   setEdge (edge, Cyl2, d2, i2, j2, k2);
+}
+// ====================================================== copyQuad
+void CrossElements::copyQuad (int d1, int i1, int j1, int k1, int d2, int i2, 
+                                              int j2, int k2)
+{
+   Quad* quad = NULL;
+   switch (d1) 
+          {
+          case dir_x : quad = getQuadJK (Cyl1, i1, j1, k1);
+                       break;
+          case dir_y : quad = getQuadIK (Cyl1, i1, j1, k1);
+                       break;
+          case dir_z : quad = getQuadIJ (Cyl1, i1, j1, k1);
+                       break;
+          }
+
+   setQuad (quad, Cyl2, d2, i2, j2, k2);
+}
+// ====================================================== addEdge
+Edge* CrossElements::addEdge (Vertex* v1, Vertex* v2, int cyl, int dir, 
+                             int nx, int ny, int nz)
+{
+   Edge* edge = NULL;
+   if (v1==NULL || v2==NULL)
+      return NULL;
+
+   else if (cyl==Cyl2) 
+      {
+      edge = findEdge1 (v1, v2);
+      if (edge != NULL) 
+         {
+         printf (" Edge (%d, %d,%d,%d) trouve = ", dir, nx, ny, nz);
+         edge->printName ("\n");
+         }
+      else if (v1->getId () < 122 && v2->getId () < 122)
+         {
+         printf (" Edge anormal = (");
+         v1 ->printName (", ");
+         v2 ->printName (")\n");
+         }
+      }
+
+   if (edge == NULL) 
+      edge = newEdge (v1, v2);
+
+   setEdge (edge, cyl, dir, nx, ny, nz);
+   return edge;
+}
+// ====================================================== addHexa
+Hexa* CrossElements::addHexa (Quad* q1, Quad* q2, Quad* q3, Quad* q4, Quad* q5,
+                            Quad* q6, int cyl, int nx, int ny, int nz)
+{
+/* **************************
+   if (cyl==Cyl1)
+      {
+      if (nx == 0)  return NULL;
+      if (nz != 1)  return NULL;
+      if (ny != 4)  return NULL;
+      return NULL;
+      }
+
+   if (cyl==Cyl2)
+      {
+      if (nz >  2)  return NULL;
+      if (nz <  1)  return NULL;
+      // if (nx == 0)  return NULL;
+      // if (ny != 4)  return NULL;
+      }
+   ************************** */
+
+   Hexa* hexa = NULL;
+   if (cyl==Cyl2) 
+      hexa = findHexa1 (q1, q2);
+
+   if (hexa == NULL) 
+       hexa = newHexa (q1, q2, q3, q4, q5, q6);
+   else if (db)
+      {
+      printf (" Hexa (%d,%d,%d) trouve = ", nx, ny, nz);
+      hexa->printName ("\n");
+      }
+
+   setHexa (hexa, cyl, nx, ny, nz);
+   return   hexa;
+}
+// ====================================================== addQuad
+Quad* CrossElements::addQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4, int cyl, 
+                             int dir, int nx, int ny, int nz)
+{
+   Quad* quad = NULL;
+   if (cyl==Cyl2) 
+      quad = findQuad1 (e1, e3);
+
+   if (quad == NULL) 
+       quad = newQuad (e1, e2, e3, e4);
+   else if (db)
+      {
+      printf (" Quad (%d, %d,%d,%d) trouve = ", dir, nx, ny, nz);
+      quad->printName ("\n");
+      }
+
+   setQuad (quad, cyl, dir, nx, ny, nz);
+   return quad;
+}
+// ====================================================== findEdge1
+Edge* CrossElements::findEdge1 (Vertex* v1, Vertex* v2)
+{
+   for (int nc=0; nc < nbr_edges1 ; nc++)
+       if (tab_edge[nc] != NULL && tab_edge[nc]->definedBy (v1, v2))
+          return tab_edge[nc];
+
+   return NULL;
+}
+// ====================================================== findHexa1
+Hexa* CrossElements::findHexa1 (Quad* e1, Quad* e2)
+{
+   for (int nc=0; nc < nbr_hexas1 ; nc++)
+       if (tab_hexa[nc] != NULL && tab_hexa[nc]->definedBy (e1, e2))
+          return tab_hexa[nc];
+
+   return NULL;
+}
+// ====================================================== findQuad1
+Quad* CrossElements::findQuad1 (Edge* e1, Edge* e2)
+{
+   for (int nc=0; nc < nbr_quads1 ; nc++)
+       if (tab_quad[nc] != NULL && tab_quad[nc]->definedBy (e1, e2))
+          return tab_quad[nc];
+
+   return NULL;
+}
+// ------------------------------------------------------------------------
+// ====================================================== addLittleSlice
+void CrossElements::addLittleSlice (int ni, int nk, double px, double gray, 
+                                    double pray, double h1)
+{
+   setVertex (Cyl1, ni, S_E,  nk,    px,  pray,  0); 
+   setVertex (Cyl1, ni, S_NE, nk,    px,  pray,  h1); 
+   setVertex (Cyl1, ni, S_N,  nk,    px,  0,     gray); 
+   setVertex (Cyl1, ni, S_NW, nk,    px, -pray,  h1); 
+   setVertex (Cyl1, ni, S_W,  nk,    px, -pray,  0); 
+   setVertex (Cyl1, ni, S_SW, nk,    px, -pray, -h1); 
+   setVertex (Cyl1, ni, S_S,  nk,    px,  0,    -gray); 
+   setVertex (Cyl1, ni, S_SE, nk,    px,  pray, -h1); 
+}
+// ====================================================== addBigSlice
+void CrossElements::addBigSlice (int ni, int nk, double pz, double gray, 
+                                 double pray, double h1)
+{
+   setVertex (Cyl2, ni, S_E,  nk,    pray,  0,    pz); 
+   setVertex (Cyl2, ni, S_NE, nk,    pray,  h1,   pz); 
+   setVertex (Cyl2, ni, S_N,  nk,    0,     gray, pz); 
+   setVertex (Cyl2, ni, S_NW, nk,    -pray,  h1,  pz); 
+   setVertex (Cyl2, ni, S_W,  nk,    -pray,  0,   pz); 
+   setVertex (Cyl2, ni, S_SW, nk,    -pray, -h1,  pz); 
+   setVertex (Cyl2, ni, S_S,  nk,    0,    -gray, pz); 
+   setVertex (Cyl2, ni, S_SE, nk,    pray, -h1,   pz); 
+}
+// ====================================================== createBigCyl
+void CrossElements::createBigCyl ()
+{
+   const int ivext = 2;
+   const int ivint = 1;
+   const int iv0   = 0;
+   const int kv_mil = NbrVSlices1 / 2;
+
+   double z0 = - calcul_centre (cross_cyl2->getBase(), cross_center);
+   double z3 = getVertexIJK (Cyl1, ivext, S_NE, kv_mil)->getZ();
+   double z2 = getVertexIJK (Cyl1, ivext, S_E,  kv_mil)->getZ();
+   double z1 = getVertexIJK (Cyl1, ivext, S_SE, kv_mil)->getZ();
+   double z4 = z0 + cross_cyl2->getHeight ();
+
+   const int k0 = 0;
+   const int k1 = 1;
+   const int k2 = 2;
+   const int k3 = 3;
+   const int k4 = NbrVSlices2-1;
+
+   setVertex   (Cyl2, iv0, 0, k0,    0, 0, z0);
+   addBigSlice (ivint, k0, z0, cross_igray2, cross_ipray2, cross_hi2);
+   addBigSlice (ivext, k0, z0, cross_gray2,  cross_pray2,  cross_he2);
+
+   setVertex   (Cyl2, iv0, 0, k4,    0, 0, z4);
+   addBigSlice (ivint, k4, z4, cross_igray2, cross_ipray2, cross_hi2);
+   addBigSlice (ivext, k4, z4, cross_gray2,  cross_pray2,  cross_he2);
+
+   //------------------------------- Points intermediaires :
+
+   double x1 = getVertexIJK (Cyl2, ivext, S_N, k0)->getX();
+   double y1 = getVertexIJK (Cyl2, ivext, S_N, k0)->getY();
+
+   double x2 = getVertexIJK (Cyl2, ivext, S_S, k0)->getX();
+   double y2 = getVertexIJK (Cyl2, ivext, S_S, k0)->getY();
+
+   //------------------------------- Reprise des vertex du cylindre 1
+
+   //------------------------------- Centre
+   if (grid_type != GR_BIPIPE) 
+       copyVertex (ivext, S_S,  3, iv0,   0,    k1);
+
+   //------------------------------- Face k1 externe :
+   setVertex   (Cyl2, ivext, S_N, k1,    x1, y1, z1);
+   setVertex   (Cyl2, ivext, S_S, k1,    x2, y2, z1);
+
+   copyVertex (ivext, S_S,  5,   ivext, S_E,  k1);
+   copyVertex (ivext, S_SE, 5,   ivext, S_NE, k1);
+   copyVertex (ivext, S_SW, 5,   ivext, S_SE, k1);
+
+   copyVertex (ivext, S_S,  1,   ivext, S_W,  k1);
+   copyVertex (ivext, S_SE, 1,   ivext, S_NW, k1);
+   copyVertex (ivext, S_SW, 1,   ivext, S_SW, k1);
+
+   //------------------------------- Face k1 interne :
+   copyVertex (ivext, S_S,  2,   ivint, S_W,  k1);
+   copyVertex (ivext, S_SE, 2,   ivint, S_NW, k1);
+   copyVertex (ivext, S_SW, 2,   ivint, S_SW, k1);
+
+   copyVertex (ivext, S_S,  4,   ivint, S_E,  k1);
+   copyVertex (ivext, S_SE, 4,   ivint, S_NE, k1);
+   copyVertex (ivext, S_SW, 4,   ivint, S_SE, k1);
+
+   copyVertex (ivext, S_SW, 3,   ivint, S_S,  k1);
+   copyVertex (ivext, S_SE, 3,   ivint, S_N,  k1);
+
+   // ------------------------------------------------------------ K2
+   //------------------------------- Centre
+   // copyVertex (iv0, 0,      3,   iv0,   0,    k2);
+   // ------------------------------ Face k2 externe :
+
+   setVertex  (Cyl2, ivext, S_N, k2,  x1, y1, z2);
+   setVertex  (Cyl2, ivext, S_S, k2,  x2, y2, z2);
+
+   // copyVertex (iv0,   0,    5,   ivext, S_E,  k2);
+   copyVertex (ivext, S_E,  5,   ivext, S_NE, k2);
+   copyVertex (ivext, S_W,  5,   ivext, S_SE, k2);
+
+   // copyVertex (iv0,   0,    1,   ivext, S_W,  k2);
+   copyVertex (ivext, S_E,  1,   ivext, S_NW, k2);
+   copyVertex (ivext, S_W,  1,   ivext, S_SW, k2);
+
+   //------------------------------- Face k2 interne :
+   // copyVertex (iv0,   0,    2,   ivint, S_W,  k2);
+   copyVertex (ivext, S_E,  2,   ivint, S_NW, k2);
+   copyVertex (ivext, S_W,  2,   ivint, S_SW, k2);
+
+   //  copyVertex (iv0,   0,    4,   ivint, S_E,  k2);
+   copyVertex (ivext, S_E,  4,   ivint, S_NE, k2);
+   copyVertex (ivext, S_W,  4,   ivint, S_SE, k2);
+
+   copyVertex (ivext, S_W,  3,   ivint, S_S,  k2);
+   copyVertex (ivext, S_E,  3,   ivint, S_N,  k2);
+
+   // ------------------------------------------------------------
+   //------------------------------- Face k3 externe :
+
+   setVertex   (Cyl2, ivext, S_N, k3,    x1, y1, z3);
+   setVertex   (Cyl2, ivext, S_S, k3,    x2, y2, z3);
+
+   //------------------------------- Centre
+   if (grid_type != GR_BIPIPE) 
+       copyVertex (ivext, S_N,  3,   iv0,   0,    k3);
+
+   copyVertex (ivext, S_N,  5,   ivext, S_E,  k3);
+   copyVertex (ivext, S_NE, 5,   ivext, S_NE, k3);
+   copyVertex (ivext, S_NW, 5,   ivext, S_SE, k3);
+
+   copyVertex (ivext, S_N,  1,   ivext, S_W,  k3);
+   copyVertex (ivext, S_NE, 1,   ivext, S_NW, k3);
+   copyVertex (ivext, S_NW, 1,   ivext, S_SW, k3);
+
+   //------------------------------- Face k3 interne :
+   copyVertex (ivext, S_N,  2,   ivint, S_W,  k3);
+   copyVertex (ivext, S_NE, 2,   ivint, S_NW, k3);
+   copyVertex (ivext, S_NW, 2,   ivint, S_SW, k3);
+
+   copyVertex (ivext, S_N,  4,   ivint, S_E,  k3);
+   copyVertex (ivext, S_NE, 4,   ivint, S_NE, k3);
+   copyVertex (ivext, S_NW, 4,   ivint, S_SE, k3);
+
+   copyVertex (ivext, S_NW, 3,   ivint, S_S, k3);
+   copyVertex (ivext, S_NE, 3,   ivint, S_N, k3);
+
+   //------------------------------- Remplissage
+   fillGrid (Cyl2); 
+}
+// ====================================================== createLittleCyl
+void CrossElements::createLittleCyl ()
+{
+   double c1 = calcul_centre (cross_cyl1->getBase(), cross_center);
+
+   double t_haut [MaxLevel] = { -c1,  -cross_pray2,  -cross_ipray2,  
+                                 0,    cross_ipray2,  cross_pray2, 
+                                 cross_cyl1->getHeight () -c1 };
+
+   double b2 = sqrt (cross_igray2*cross_igray2 - cross_ipray2*cross_ipray2);
+
+   for (int nk = 0 ; nk<size_v1z ; nk++)
+       {
+       double px = t_haut [nk]; 
+       if (grid_type != GR_BIPIPE) 
+           setVertex (Cyl1, 0, 0, nk,    px, 0, 0); 
+
+       addLittleSlice (1, nk, px, cross_igray1, cross_ipray1, cross_hi1);
+
+       switch (nk)
+          {
+          case 2 : case 4 : 
+               addLittleSlice (2, nk, px, cross_gray1, b2, cross_he1);
+               break;
+          case 3 : 
+               addLittleSlice (2, nk, px, cross_gray1, cross_igray2, cross_he1);
+               break;
+          default :
+               addLittleSlice (2, nk, px, cross_gray1, cross_pray1, cross_he1);
+               break;
+          }
+       }
+
+   fillGrid (Cyl1);
+}
+// ====================================================== crossCylinders
+int CrossElements::crossCylinders (Cylinder* lun, Cylinder* lautre, bool fill)
+{
+   is_filled = fill;
+   resize ();
+
+   if (lun->getRadius() < lautre->getRadius())
+      {
+      cross_cyl1 = lun;
+      cross_cyl2 = lautre;
+      }
+   else
+      {
+      cross_cyl1 = lautre;
+      cross_cyl2 = lun;
+      }
+
+   cross_center = cross_cyl2->interCylinder (cross_cyl1);
+   if (cross_center==NULL)
+      return HERR;
+                                             // Little
+   cross_gray1  = cross_cyl1->getRadius ();
+   cross_pray1  = cross_gray1 * cos (M_PI/6);
+   cross_he1    = cross_gray1 / 2;
+                                             // Big
+   cross_gray2  = cross_cyl2->getRadius ();
+   cross_pray2  = cross_gray2 * cos (M_PI/6);
+   cross_he2    = cross_pray1; 
+
+   cross_igray2 = cross_gray2 * epaiss2;
+   cross_ipray2 = cross_pray2 * epaiss2;
+   cross_hi2    = cross_he2   * epaiss2;
+
+   cross_ipray1 = 0.75 * cross_hi2;
+   cross_igray1 = cross_gray1 * cross_ipray1 / cross_pray1;
+   cross_hi1    = cross_igray1 / 2;
+
+   if (db) 
+      {
+      Display (cross_gray1);
+      Display (cross_pray1);
+      Display (cross_he1  );
+                                             // Big
+      Display (cross_gray2);
+      Display (cross_pray2);
+      Display (cross_he2  );
+
+      Display (cross_igray2);
+      Display (cross_ipray2);
+      Display (cross_hi2   );
+
+      Display (cross_ipray1);
+      Display (cross_igray1);
+      Display (cross_hi1   );
+      }
+
+   createLittleCyl ();
+   createBigCyl    ();
+
+   Vector* iprim = new Vector (cross_cyl1->getDirection());
+   Vector* kprim = new Vector ((cross_cyl2->getDirection()));
+   Vector* jprim = new Vector (kprim);
+
+   iprim->renormer ();
+   kprim->renormer ();
+   jprim->vectoriel (kprim, iprim);
+
+   transfoVertices (cross_center, iprim, jprim, kprim);
+   return HOK;
+}
+// ====================================================== fillGrid
+void CrossElements::fillGrid (int cyl, int deb, int fin)
+{
+   int nz0 = deb >= 0 ? deb : 0;
+   int nzn = fin >  0 ? fin : size_vz [cyl];
+
+   fillCenter (cyl, nz0, nzn);
+
+   for (int nz=nz0 ; nz<nzn ; nz++)
+       {
+       for (int nx=1 ; nx<size_hx ; nx++)
+           {
+                                 //   Edges horizontaux radiaux
+                                 //   Edges horizontaux // cloisons ext
+           for (int ny=0 ; ny<size_vy ; ny++)
+               {
+               int ny1  = (ny + 1) MODULO size_vy;
+               Vertex* vc = getVertexIJK (cyl, nx,   ny, nz);
+               Vertex* v1 = getVertexIJK (cyl, nx+1, ny, nz);
+               Vertex* v2 = getVertexIJK (cyl, nx+1, ny1,nz);
+
+               addEdge (vc, v1, cyl, dir_x, nx,   ny, nz);
+               addEdge (v1, v2, cyl, dir_y, nx+1, ny, nz);
+               }
+                                 //   Quads horizontaux
+           for (int ny=0 ; ny<size_vy ; ny++)
+               {
+               int ny1  = (ny + 1) MODULO size_vy;
+               Edge* e1 = getEdgeI (cyl, nx,   ny,  nz);
+               Edge* e2 = getEdgeJ (cyl, nx+1, ny,  nz);
+               Edge* e3 = getEdgeI (cyl, nx,   ny1, nz);
+               Edge* e4 = getEdgeJ (cyl, nx,   ny,  nz);
+
+               addQuad (e1, e2, e3, e4, cyl, dir_z, nx, ny, nz);  
+               }
+
+           if (nz>0)
+              {
+                                 //   Edges verticaux + cloisons interieures
+              for (int ny=0 ; ny<size_vy ; ny++)
+                  {
+                  Vertex* vp = getVertexIJK (cyl, nx+1, ny, nz-1);
+                  Vertex* vv = getVertexIJK (cyl, nx+1, ny, nz);
+
+                  Edge* edge = addEdge (vp, vv, cyl, dir_z, nx+1, ny, nz-1);
+
+                  Edge* e0 = getEdgeI (cyl, nx, ny,  nz-1);
+                  Edge* e2 = getEdgeI (cyl, nx, ny,  nz);
+                  Edge* e3 = getEdgeK (cyl, nx, ny,  nz-1);
+
+                  addQuad (e0, edge, e2, e3, cyl, dir_y, nx, ny, nz-1);  
+                  }
+                                 //   Cloisons exterieures ***
+              for (int ny=0 ; ny<size_vy ; ny++)
+                  {
+                  int ny1  = (ny + 1) MODULO size_vy;
+                  Edge* e0 = getEdgeJ (cyl, nx+1, ny,  nz-1);
+                  Edge* e2 = getEdgeJ (cyl, nx+1, ny,  nz);
+
+                  Edge* e1 = getEdgeK (cyl, nx+1, ny,  nz-1);
+                  Edge* e3 = getEdgeK (cyl, nx+1, ny1, nz-1);
+                  addQuad (e0, e1, e2, e3, cyl, dir_x, nx+1, ny, nz-1);  
+                  }
+                                 //   Hexas (8) 
+              if (is_filled || cyl==Cyl2 || (nz!=3 && nz != 4))
+                  {
+                  for (int ny=0 ; ny<size_hy ; ny++)
+                      {
+                      int ny1  = (ny + 1) MODULO size_vy;
+                      // printf (" ---------- Hexa : nz=%d, ny=%d\n", ny, nz);
+                      Quad* qa = getQuadIJ (cyl, nx, ny, nz-1);
+                      Quad* qb = getQuadIJ (cyl, nx, ny, nz);
+
+                      Quad* qc = getQuadJK (cyl, nx+1, ny,  nz-1);
+                      Quad* qd = getQuadJK (cyl, nx,   ny,  nz-1);
+
+                      Quad* qe = getQuadIK (cyl, nx,   ny1, nz-1);
+                      Quad* qf = getQuadIK (cyl, nx,   ny,  nz-1);
+
+                      // Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+                      // setHexa (cell, cyl, nx, ny, nz-1);  
+                      addHexa (qa, qb, qc, qd, qe, qf, cyl, nx, ny, nz-1);  
+                      }
+                  }
+              }
+          }
+       }
+}
+// ====================================================== fillCenter
+void CrossElements::fillCenter (int cyl, int nz0, int nzn)
+{
+   int nx = 0;
+
+   for (int nz=nz0 ; nz<nzn ; nz++)
+       {
+       Vertex* center = getVertexIJK (cyl, 0, 0, nz);
+                                 //   Edges horizontaux // cloisons ext
+           for (int ny=0 ; ny<size_vy ; ny++)
+               {
+               Vertex* v1 = getVertexIJK (cyl, 1, ny, nz);
+               Vertex* v2 = getVertexIJK (cyl, 1, (ny+1) MODULO size_vy, nz);
+               addEdge (v1, v2, cyl, dir_y, nx+1, ny, nz);
+               }
+       if (is_filled)
+          {
+                                 //   Edges horizontaux radiaux
+           for (int nc=0 ; nc<NbrIntCotes ; nc++)
+               {
+               Vertex* vv = getVertexIJK (cyl, 1, 2*nc, nz);
+               addEdge (center, vv, cyl, dir_x, nx, nc, nz);
+               }
+                                 //   Quads horizontaux
+           for (int nc=0; nc<NbrIntCotes ; nc++)
+               {
+               int nc1  = (nc + 1) MODULO NbrIntCotes;
+               Edge* e1 = getEdgeI (cyl, nx, nc,    nz);
+               Edge* e2 = getEdgeJ (cyl, nx+1, 2*nc,  nz);
+               Edge* e3 = getEdgeJ (cyl, nx+1, 2*nc+1, nz);
+               Edge* e4 = getEdgeI (cyl, nx, nc1,    nz);
+
+               addQuad (e1, e2, e3, e4, cyl, dir_z, nx, nc, nz);  
+               }
+          }
+
+       if (nz>0)
+          {
+                                 //   Edges verticaux + cloisons interieures
+          Vertex* vhaut  = getVertexIJK (cyl,nx,0, nz-1);
+          Edge*   pilier = addEdge (center, vhaut, cyl, dir_z, nx, 0, nz-1);
+
+          for (int ny=0 ; ny<size_vy ; ny++)
+              {
+              Vertex* vp = getVertexIJK (cyl, 1, ny, nz-1);
+              Vertex* vv = getVertexIJK (cyl, 1, ny, nz);
+              Edge* edge = addEdge (vp, vv, cyl, dir_z, 1, ny, nz-1);
+              if (is_filled && (ny MODULO 2) == 0)
+                 {
+                 Edge* e0 = getEdgeI (cyl, nx, ny/2,  nz-1);
+                 Edge* e2 = getEdgeI (cyl, nx, ny/2,  nz);
+                 addQuad (e0,edge, e2,pilier, cyl, dir_y, nx, ny/2, nz-1);
+                 }
+              }
+                                 //   Cloisons exterieures
+          for (int ny=0 ; ny<size_vy ; ny++)
+              {
+              int ny1  = (ny + 1) MODULO size_vy;
+              Edge* e0 = getEdgeJ (cyl, 1, ny,  nz-1);
+              Edge* e2 = getEdgeJ (cyl, 1, ny,  nz);
+              Edge* e1 = getEdgeK (cyl, 1, ny,  nz-1);
+              Edge* e3 = getEdgeK (cyl, 1, ny1, nz-1);
+
+              addQuad (e0, e1, e2, e3, cyl, dir_x, 1, ny, nz-1);  
+              }
+                                 //   Hexas (4) 
+          if (is_filled)
+             {
+             for (int nc=0 ; nc < NbrIntCotes ; nc++)
+                 {
+                  // printf (" --------------- Hexa : nz=%d, nc=%d\n", nc, nz);
+                 int nc1  = (nc + 1) MODULO NbrIntCotes;
+                 Quad* qa = getQuadIJ (cyl, 0, nc, nz-1);
+                 Quad* qb = getQuadIJ (cyl, 0, nc, nz);
+
+                 Quad* qc = getQuadJK (cyl, 1, 2*nc,   nz-1);
+                 Quad* qe = getQuadJK (cyl, 1, 2*nc+1, nz-1);
+
+                 Quad* qd = getQuadIK (cyl, 0, nc1, nz-1);
+                 Quad* qf = getQuadIK (cyl, 0, nc,  nz-1);
+
+                  // Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+                  // setHexa (cell, cyl, 0, nc, nz-1);  
+                 addHexa (qa, qb, qc, qd, qe, qf, cyl, nx, nc, nz-1);  
+                 }
+              }
+          }
+       }
+}
+// ====================================================== dump
+void CrossElements::dump ()
+{
+   int sizey [2] = { 4, S_MAXI };
+   for (int cyl=Cyl1 ; cyl<=Cyl2 ; cyl++)
+       {
+       printf (" +++++++++ \n");
+       printf (" +++++++++ Hexas du Cylindre nro %d\n", cyl);
+       printf (" +++++++++ \n");
+       for (int nz=0; nz<size_hz[cyl]; nz++)
+           {
+           for (int nx=0; nx<size_hx; nx++)
+               {
+               printf ("\n");
+               for (int ny=0; ny<sizey[nx]; ny++)
+                   {
+                   Hexa* cell = getHexaIJK (cyl,nx,ny,nz);
+                   int nro = indHexa (cyl, nx, ny, nz);
+                   printf ("tab_hexa[%03d] (%d, %d,%d,%d) = ", 
+                           nro, cyl,nx,ny,nz);
+                   if (cell!=NULL) cell->printName("\n");
+                      else         printf ("NULL\n");
+                   }
+               }
+           }
+       }
+}
+// ====================================================== dumpVertex
+void CrossElements::dumpVertex ()
+{
+   int sizey [3] = { 1, 4, S_MAXI };
+
+   for (int cyl=Cyl1 ; cyl<=Cyl2 ; cyl++)
+       {
+       printf (" +++++++++ \n");
+       printf (" +++++++++ Vertex du Cylindre nro %d\n", cyl);
+       printf (" +++++++++ \n");
+       for (int nz=0; nz<size_vz[cyl]; nz++)
+           {
+           for (int nx=0; nx<size_vx; nx++)
+               {
+               printf ("\n");
+               for (int ny=0; ny<sizey[nx]; ny++)
+                   {
+                   Vertex* node = getVertexIJK (cyl,nx,ny,nz);
+                   int nro = indVertex (cyl, nx, ny, nz);
+                   printf ("tab_vertex[%03d] (%d, %d,%d,%d) = ", 
+                           nro, cyl,nx,ny,nz);
+                   if (node!=NULL) node->printName("\n");
+                      else         printf ("NULL\n");
+                   }
+               }
+           }
+       }
+}
+// ====================================================== dumpHexas
+void CrossElements::dumpHexas ()
+{
+   int sizey [3] = { 1, 4, S_MAXI };
+
+   for (int cyl=Cyl1 ; cyl<=Cyl2 ; cyl++)
+       {
+       printf (" +++++++++ \n");
+       printf (" +++++++++ Hexaedres du Cylindre nro %d\n", cyl);
+       printf (" +++++++++ \n");
+       for (int nz=0; nz<size_hz[cyl]; nz++)
+           {
+           for (int nx=0; nx<size_hx; nx++)
+               {
+               printf ("\n");
+               for (int ny=0; ny<sizey[nx]; ny++)
+                   {
+                   Hexa* elt = getHexaIJK (cyl,nx,ny,nz);
+                   if (elt!=NULL)
+                      {
+                      int nro = indHexa (cyl, nx, ny, nz);
+                      printf ("tab_hexa[%03d] (%d, %d,%d,%d) = ", 
+                              nro, cyl,nx,ny,nz);
+                      elt->printName("\n");
+                      }
+                   }
+               }
+           }
+       }
+}
+// ====================================================== calcul_centre
+double calcul_centre (Vertex* orig, Vertex* inter)
+{
+   double dx = inter->getX () - orig->getX ();
+   double dy = inter->getY () - orig->getY ();
+   double dz = inter->getZ () - orig->getZ ();
+   double dd = sqrt (dx*dx + dy*dy + dz*dz);
+   return dd;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexCrossElements.hxx b/src/HEXABLOCK/HexCrossElements.hxx
new file mode 100755 (executable)
index 0000000..f99cdb0
--- /dev/null
@@ -0,0 +1,94 @@
+
+// Class : Gestion des tutaux en T (like castles in scotland)
+
+#ifndef __CROSS_ELEMENTS_H
+#define __CROSS_ELEMENTS_H
+
+#include "HexElements.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+enum {Cyl1=0, Cyl2=1, NbrSlices1=6, NbrSlices2=4, NbrVSlices1=NbrSlices1+1,
+      NbrVSlices2=NbrSlices2+1 };
+
+class CrossElements : public Elements 
+{
+public:
+   virtual int countHexa   () { return nbr_hexas ; }
+   virtual int countQuad   () { return nbr_quads ; }
+   virtual int countEdge   () { return nbr_edges ; }
+   virtual int countVertex () { return nbr_vertex ; }
+
+public:
+   CrossElements (Document* doc, EnumGrid type=GR_BICYL);
+
+   virtual ~CrossElements () {}
+
+   Hexa*   getHexaIJK   (int part, int nx, int ny, int nz);
+   Quad*   getQuadIJ    (int part, int nx, int ny, int nz);
+   Quad*   getQuadJK    (int part, int nx, int ny, int nz);
+   Quad*   getQuadIK    (int part, int nx, int ny, int nz);
+   Edge*   getEdgeI     (int part, int nx, int ny, int nz);
+   Edge*   getEdgeJ     (int part, int nx, int ny, int nz);
+   Edge*   getEdgeK     (int part, int nx, int ny, int nz);
+   Vertex* getVertexIJK (int part, int nx, int ny, int nz);
+
+                     // Tutaux en T (like castles in scotland)
+   int  crossCylinders (Cylinder* cyl1, Cylinder* cyl2, bool fill=true);
+   void dump ();
+   void dumpVertex ();
+   void dumpHexas  ();
+
+private :
+   void resize ();
+   void fillGrid   (int cyl, int deb=-1, int fin=-1);
+   void fillCenter (int cyl, int deb, int fin);
+   void createLittleCyl ();
+   void createBigCyl    ();
+   void addLittleSlice (int i, int k, double x, double a, double b, double c);
+   void addBigSlice    (int i, int k, double z, double a, double b, double c);
+
+   void copyVertex (int i1, int j1, int k1, int i2, int j2, int k2);
+   void copyEdge (int d1, int i, int j, int k, int d2, int i2, int j2, int k2);
+   void copyQuad (int d1, int i, int j, int k, int d2, int i2, int j2, int k2);
+
+   void setVertex (int cyl, int nx, int ny, int nz, double px, double py, 
+                                                               double pz);
+
+   void setVertex (Vertex* vv, int cyl, int nx, int ny, int nz);
+   void setEdge   (Edge* edge, int cyl, int dir, int nx, int ny, int nz);
+   void setQuad   (Quad* quad, int cyl, int dir, int nx, int ny, int nz);
+   void setHexa   (Hexa* cell, int cyl, int nx, int ny, int nz);
+
+   Edge* addEdge   (Vertex* v1, Vertex* v2, int cyl, int dir, int nx, 
+                                                    int ny, int nz);
+   Quad* addQuad   (Edge* e1, Edge* e2, Edge* e3, Edge* e4, int cyl, int dir, 
+                   int nx, int ny, int nz);
+   Hexa* addHexa   (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf,
+                   int cyl, int nx, int ny, int nz);
+
+   int  indVertex (int cyl, int nx, int ny, int nz);
+   int  indHexa   (int cyl, int nx, int ny, int nz);
+   int  indQuad   (int cyl, int dir, int nx, int ny, int nz);
+   int  indEdge   (int cyl, int dir, int nx, int ny, int nz);
+
+   Hexa* findHexa1 (Quad*   q1, Quad*   q2);
+   Edge* findEdge1 (Vertex* v1, Vertex* v2);
+   Quad* findQuad1 (Edge*   e1, Edge*   e2);
+
+private :
+    bool      is_filled;
+    Cylinder* cross_cyl1;
+    Cylinder* cross_cyl2;
+    Vertex*   cross_center;
+    double    cross_gray1, cross_pray1, cross_igray1, cross_ipray1;
+    double    cross_gray2, cross_pray2, cross_igray2, cross_ipray2;
+    double    cross_he1,   cross_hi1,   cross_he2,    cross_hi2; 
+
+    int  size_hiy, size_h1z, size_h2z, size_v1z, size_v2z;
+    int  size_vz[2], size_hz[2];
+    int  nbr_hexas1, nbr_quads1, nbr_edges1, nbr_vertex1;
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexCylinder.cxx b/src/HEXABLOCK/HexCylinder.cxx
new file mode 100644 (file)
index 0000000..17e767e
--- /dev/null
@@ -0,0 +1,165 @@
+\r
+// C++ : Gestion des cylindres\r
+\r
+#include "HexCylinder.hxx"\r
+#include "HexVertex.hxx"\r
+#include "HexVector.hxx"\r
+\r
+#include <cmath>\r
+\r
+BEGIN_NAMESPACE_HEXA\r
+\r
+bool is_out (double val, double orig, double lg);\r
+\r
+// ======================================================== Constructeur\r
+Cylinder::Cylinder(Vertex* b, Vector* v, double r, double h)\r
+        : EltBase (b->dad())\r
+{\r
+    c_base   = b;\r
+    c_dir    = v;\r
+    c_radius = r;\r
+    c_height = h;\r
+}\r
+// ======================================================== rdiffers\r
+bool rdiffers (double v1, double v2)\r
+{\r
+   double dd = v1-v2;\r
+   return dd*dd > 1e-20;\r
+}\r
+// ======================================================== rdiffers\r
+double norme (double px, double py, double pz)\r
+{\r
+   double res = sqrt (px*px + py*py + pz*pz);\r
+   return res;\r
+}\r
+// ======================================================== interCylinders\r
+///  Intersection de 2 droites (c1,v1) et (c2,v2)\r
+///  Le point M(x,yz) est solutions de 2 equations :\r
+///            (c1,m) = k * v1 \r
+///            (c2,m) vectoriel v2 = 0\r
+///            \r
+///  x = xc1 + k * xv1                  (1)\r
+///  y = yc1 + k * yv1                  (2)\r
+///  z = zc1 + k * zv1                  (3)\r
+///  (x-xc2) * yv2 - (y-yc2) * xv2 = 0  (4)\r
+//  (z-zc2) * yv2 - (y-yc2) * zv2 = 0  (5)\r
+///  (x-xc2) * zv2 - (z-zc2) * xv2 = 0  (6)\r
+///             \r
+///  En substituant les (x,y,z)\r
+///             \r
+///  (k*xv1+xc1-xc2) * yv2 - (k*yv1+yc1-yc2) * xv2 = 0  (4)\r
+///  (k*zv1+zc1-zc2) * yv2 - (k*yv1+yc1-yc2) * zv2 = 0  (5)\r
+///  (k*xv1+xc1-xc2) * zv2 - (k*zv1+zc1-zc2) * xv2 = 0  (6)\r
+///             \r
+///  k * (xv1*yv2 - yv1*xv2) + (xc1-xc2) * yv2 - (yc1-yc2) * xv2 = 0 (4)\r
+///  k * dxy - nxy = 0      (4)\r
+///  k * dzy - nzy = 0      (5)\r
+///  k * dxz - nxz = 0      (6)\r
+///\r
+///  nxy = (xc2-xc1) * yv2 - (yc2-yc1) * xv2\r
+///  dxy =  xv1*yv2 - yv1*xv2\r
+///             \r
+// ======================================================== interCylinders\r
+Vertex* Cylinder::interCylinder(Cylinder* other)\r
+{\r
+    c_base->dump ();\r
+    c_dir-> dump ();\r
+\r
+    other->c_base->dump ();\r
+    other->c_dir-> dump ();\r
+\r
+    double xc1 = c_base->getX(); \r
+    double yc1 = c_base->getY(); \r
+    double zc1 = c_base->getZ(); \r
+\r
+    double xv1 = c_dir->getDx(); \r
+    double yv1 = c_dir->getDy(); \r
+    double zv1 = c_dir->getDz(); \r
+\r
+    double xc2 = other->c_base->getX(); \r
+    double yc2 = other->c_base->getY(); \r
+    double zc2 = other->c_base->getZ(); \r
+\r
+    double xv2 = other->c_dir->getDx(); \r
+    double yv2 = other->c_dir->getDy(); \r
+    double zv2 = other->c_dir->getDz(); \r
+\r
+    double nxyz [DIM3] = { (xc2-xc1) * yv2 - (yc2-yc1) * xv2,\r
+                           (zc2-zc1) * yv2 - (yc2-yc1) * zv2,\r
+                           (xc2-xc1) * zv2 - (zc2-zc1) * xv2 };\r
+\r
+    double dxyz [DIM3] = { xv1*yv2- yv1*xv2, \r
+                           zv1*yv2- yv1*zv2,\r
+                           xv1*zv2- zv1*xv2 };\r
+    double lambda = 0;\r
+    bool   prems  = true;\r
+    for (int dd=0 ; dd<DIM3 ; dd++)\r
+        {\r
+                                      // dxyz!=0 : calcul de lambda\r
+        if (rdiffers (dxyz [dd], ZEROR)) \r
+           {\r
+           double kk = nxyz [dd] / dxyz[dd];\r
+                                      // 1er lambda trouve \r
+           if (prems)\r
+              {\r
+              prems  = false;\r
+              lambda = kk;\r
+              }\r
+                                      // Solutions incompatibles \r
+          else if (rdiffers (kk, lambda))\r
+              return NULL;\r
+                                      // equation O*lamda = 0 : ignoree\r
+       // else ....\r
+           }\r
+                                      // dxyz=0 et nxyz!=0 : Pas de solution\r
+       else if (rdiffers (nxyz [dd], ZEROR)) \r
+           return NULL;\r
+        }\r
+\r
+                                      // Aucune solution trouvee\r
+    if (prems)\r
+       {\r
+       Display (prems);\r
+       return NULL;\r
+       }\r
+                                    // Intersection des droites\r
+    double px = xc1 + lambda * xv1;\r
+    double py = yc1 + lambda * yv1;\r
+    double pz = zc1 + lambda * zv1;\r
+                                    // Appartenance axe 1er cylindre\r
+    double lg = c_dir->norme ();\r
+    if (lambda<0 || lambda*lg > c_height)\r
+       return NULL;\r
+                                    // Appartenance axe 2eme cylindre\r
+    lg = other->c_height / other->c_dir->norme ();\r
+    if (is_out (px, xc2, xc2+xv2*lg ) || is_out (py, yc2, xc2+yv2*lg ) \r
+                                      || is_out (pz, zc2, zc2+zv2*lg ))\r
+        return NULL;\r
+                                    // Verif % rayons \r
+    double lg11 = norme (px-xc1, py-yc1, pz-zc1);\r
+    double lg12 = c_height - lg11;\r
+\r
+    double lg21 = norme (px-xc2, py-yc2, pz-zc2);\r
+    double lg22 = other->c_height - lg21;\r
+\r
+    if (  lg21 < c_radius        || lg22 < c_radius \r
+       || lg11 < other->c_radius || lg12 < other->c_radius)\r
+       return NULL;\r
+\r
+    Vertex* sol = new Vertex (c_base->dad(), px, py, pz);\r
+    return  sol;\r
+}\r
+// ======================================================== is_out\r
+bool is_out (double val, double v1, double v2)\r
+{\r
+   if (v1 < v2)\r
+      return (val < v1 || val > v2) ;\r
+\r
+   else if (v1 > v2) \r
+      return (val < v2 || val > v1) ;\r
+\r
+   else \r
+      return val != v1;\r
+}\r
+END_NAMESPACE_HEXA\r
+\r
diff --git a/src/HEXABLOCK/HexCylinder.hxx b/src/HEXABLOCK/HexCylinder.hxx
new file mode 100755 (executable)
index 0000000..5b9ffc7
--- /dev/null
@@ -0,0 +1,35 @@
+
+// class : Les cylindres
+
+#ifndef __CYLINDER_H_
+#define __CYLINDER_H_
+
+#include "HexEltBase.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Cylinder : public EltBase
+{
+public :
+    Vertex* getBase ()      { return c_base;   }
+    Vector* getDirection () { return c_dir;    }
+    double  getRadius ()    { return c_radius; }
+    double  getHeight ()    { return c_height; }
+
+public :
+    Cylinder (Vertex* b, Vector* v, double r, double h);
+    Vertex* interCylinder (Cylinder* other);
+
+protected:
+    Vertex* c_base;
+    Vector* c_dir;
+
+    double c_radius;
+    double c_height;
+};
+
+// ------------------------------------------- Inlining
+
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexDiagnostics.hxx b/src/HEXABLOCK/HexDiagnostics.hxx
new file mode 100755 (executable)
index 0000000..c9bc9e8
--- /dev/null
@@ -0,0 +1,15 @@
+
+// Incl : Diagnostics
+
+#ifndef _HEX_DIAGNOSTICS_H
+#define _HEX_DIAGNOSTICS_H
+
+#define W_H_NULL_QUAD "new Hexa : La face %s est nulle"
+#define W_H_EQ_QUAD "new Hexa : Les faces %s et %s sont confondues"
+#define W_H_BAD_EDGE "new Hexa : L'arete commune %s n'existe pas"
+#define W_H_BAD_VERTEX "new Hexa : Le sommet commun %s n'existe pas"
+
+#define W_H_NULL_VERTEX "addHexa : Le sommet %s est nul"
+#define W_H_EQ_VERTEX   "addHexa : Les sommets %s et %s sont confondus"
+
+#endif
diff --git a/src/HEXABLOCK/HexDocument.cxx b/src/HEXABLOCK/HexDocument.cxx
new file mode 100755 (executable)
index 0000000..4728e6d
--- /dev/null
@@ -0,0 +1,745 @@
+
+// C++ : La clase principale de Hexa
+
+#include "HexDocument.hxx"
+
+#include "HexEltBase.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexCylinder.hxx"
+#include "HexPipe.hxx"
+#include "HexMatrix.hxx"
+#include "HexCloner.hxx"
+#include "HexPropagation.hxx"
+#include "HexLaw.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexXmlTree.hxx"
+#include "HexGlobale.hxx"
+#include "HexGroups.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Document::Document (cpchar filename)
+{
+   glob = Globale::getInstance ();
+
+   doc_db        = 0;
+   nbr_errors    = 0;
+   doc_modified  = true;
+   doc_name      = filename;
+   doc_tolerance = 1e-6;
+   nbr_laws      = 0;
+   nbr_propagations = 0;
+   maj_propagation  = true;
+
+   addLaw ("DefaultLaw", 0);
+
+   for (EnumElt type = EL_NONE ; type < EL_MAXI ; type=(EnumElt) (type+1))
+       {
+       doc_first_elt [type] = doc_last_elt [type] = new EltBase (); 
+       doc_nbr_elt   [type] = 0;
+       }
+}
+// ======================================================== Destructeur
+Document::~Document ()
+{
+   for (EnumElt type = EL_NONE ; type < EL_MAXI ; type=(EnumElt) (type+1))
+       {
+       //  printf ("____________________________ Type=%d\n", type);
+       EltBase* next = NULL;
+       for (EltBase* elt=doc_first_elt [type] ; elt != NULL ; elt=next) 
+           {
+           //  elt->dump();
+           next = elt->next();
+           //  Display(elt);e0057
+           //  if (type!=EL_NONE) 
+              delete elt;
+           }
+       }
+}
+// ======================================================== addVector
+Vector* Document::addVector (double dx, double dy, double dz)
+{
+   Vector* pv = new Vector (this, dx, dy, dz); 
+   doc_vector.push_back (pv);
+   return  pv;
+}
+// ======================================================== addVectorVertices
+Vector* Document::addVectorVertices (Vertex* va, Vertex* vb)
+{
+   Vector* pv = addVector (vb->getX () - va->getX (),
+                           vb->getY () - va->getY (),
+                           vb->getZ () - va->getZ ());
+   return  pv;
+}
+// ======================================================== addVertex
+Vertex* Document::addVertex (double x, double y, double z)
+{
+   Vertex* pv   = new Vertex (this, x, y, z);
+   doc_modified = true;
+   return pv;
+}
+// ======================================================== addEdge
+Edge* Document::addEdge (Vertex* va, Vertex* vb)
+{
+   if (va==NULL || vb==NULL) 
+      return NULL;
+
+   Edge* arete  = new Edge (va, vb);
+   doc_modified = true;
+   return arete;
+}
+// ======================================================== addEdge (bis)
+Edge* Document::addEdge (Vertex* va, Vector* vec)
+{
+   doc_modified = true;
+   Vertex* vb   = addVertex (va->getX () + vec->getDx(), 
+                             va->getY () + vec->getDy(), 
+                             va->getZ () + vec->getDz());
+
+   Edge*  arete = addEdge (va, vb);
+   return arete;
+}
+// ======================================================== addQuadVertices
+Quad* Document::addQuadVertices (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd)
+{
+   Quad* face   = new Quad (va, vb, vc, vd);
+   doc_modified = true;
+   return face;
+}
+// ======================================================== addQuad
+Quad* Document::addQuad (Edge* ea, Edge* eb, Edge* ec, Edge* ed)
+{
+   Quad* face   = new Quad (ea, eb, ec, ed);
+   doc_modified = true;
+   return face;
+}
+// ======================================================== addHexaVertices
+Hexa* Document::addHexaVertices (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd,
+                                 Vertex* ve, Vertex* vf, Vertex* vg, Vertex* vh)
+{
+   Hexa* pave   = new Hexa (va, vb, vc, vd, ve, vf, vg, vh);
+   doc_modified = true;
+   return pave;
+}
+// ======================================================== addHexa
+Hexa* Document::addHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, 
+                         Quad* qf)
+{
+   Hexa* pave   = new Hexa (qa, qb, qc, qd, qe, qf);
+   doc_modified = true;
+   return pave;
+}
+// ======================================================== addCylinder
+Cylinder* Document::addCylinder (Vertex* b, Vector* d, double r,  double h)
+{
+   doc_modified  = true;
+   Cylinder* cyl = new  Cylinder (b, d, r, h);
+   doc_cylinder.push_back (cyl);
+   return    cyl;
+}
+// ======================================================== addPipe
+Pipe* Document::addPipe (Vertex* b, Vector* d, double ri, double re, double h)
+{
+   doc_modified = true;
+   Pipe*  tuyau = new  Pipe (b, d, ri, re, h);
+   doc_pipe.push_back (tuyau);
+   return tuyau;
+}
+// ======================================================== makeCartesian
+Elements* Document::makeCartesian (Vertex* v, Vector* dir, 
+                            int px, int py, int pz, int mx, int my, int mz)
+{
+   Vector* v1 = new Vector (this, dir->getDx(), 0, 0); 
+   Vector* v2 = new Vector (this, 0, dir->getDy(), 0); 
+   Vector* v3 = new Vector (this, 0,0,  dir->getDz()); 
+   Elements*  grille = new Elements (this);
+   grille->makeCartesianGrid (v, v1, v2, v3, px, py, pz, mx, my, mz);
+   return grille;
+}
+// ======================================================== makeCartesian
+Elements* Document::makeCartesian (Vertex* v, Vector* v1, Vector* v2, 
+                    Vector* v3, int px, int py, int pz, int mx, int my, int mz)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCartesianGrid (v, v1, v2, v3, px, py, pz, mx, my, mz);
+   return grille;
+}
+// ======================================================== makeSpherical
+Elements* Document::makeSpherical (Vertex* c, Vector* dv, int nb, double k)
+{
+   Elements* grille = new Elements (this);
+   grille->makeSphericalGrid (c, dv, nb, k);
+   return grille;
+}
+// ======================================================== makeCylindrical
+Elements* Document::makeCylindrical (Vertex* c, Vector* b, Vector* h, 
+        double dr, double da, double dl, int nr, int na, int nl, bool fill)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCylindricalGrid (c, b, h, dr, da, dl, nr, na, nl, fill);
+   return grille;
+}
+// ======================================================== findVertex
+Vertex* Document::findVertex (double vx, double vy, double vz)
+{
+   double xmin = vx - doc_tolerance;
+   double xmax = vx + doc_tolerance;
+   double ymin = vy - doc_tolerance;
+   double ymax = vy + doc_tolerance;
+   double zmin = vz - doc_tolerance;
+   double zmax = vz + doc_tolerance;
+
+   for (EltBase* elt = doc_first_elt[EL_VERTEX]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt->isHere())
+          { 
+          Vertex* node = static_cast <Vertex*> (elt); 
+          if (node->isin (xmin, xmax, ymin, ymax, zmin, zmax))
+             return node;
+          }
+       }
+   return NULL;
+}
+// ======================================================== findEdge
+Edge* Document::findEdge (Vertex* v1, Vertex* v2)
+{
+   for (EltBase* elt = doc_first_elt[EL_EDGE]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Edge* candidat  = static_cast <Edge*> (elt); 
+       if (candidat->definedBy (v1, v2))
+          return candidat;
+       }
+   return NULL;
+}
+// ======================================================== findQuad
+Quad* Document::findQuad (Vertex* v1, Vertex* v2)
+{
+   for (EltBase* elt = doc_first_elt[EL_QUAD]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Quad* candidat  = static_cast <Quad*> (elt); 
+       if (candidat->definedBy (v1, v2))
+          return candidat;
+       }
+   return NULL;
+}
+// ======================================================== findHexa
+Hexa* Document::findHexa (Vertex* v1, Vertex* v2)
+{
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* candidat  = static_cast <Hexa*> (elt); 
+       if (candidat->definedBy (v1, v2))
+          return candidat;
+       }
+   return NULL;
+}
+// ======================================================== makeCylinder
+int index_tv (Vertex* table[], Vertex* elt)
+{
+   for (int nro=0; nro<QUAD4; nro++)
+        if (elt == table[nro])
+           return nro;
+
+   return NOTHING;
+}
+// ======================================================== mergeQuads
+int Document::mergeQuads (Quad* par, Quad* old, Vertex* v1, Vertex* v2, 
+                                                Vertex* v3, Vertex* v4)
+{
+   update ();
+
+   if (   par==NULL || par->isDeleted() || old==NULL || old->isDeleted() 
+       || v1 ==NULL || v1 ->isDeleted() || v2 ==NULL || v2 ->isDeleted() 
+       || v3 ==NULL || v3 ->isDeleted() || v4 ==NULL || v4 ->isDeleted()) 
+      return HERR;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       if (old->indexVertex (par->getVertex(nro))!= NOTHING)
+          return HERR+nro+1;
+
+   if (debug())
+      {
+      printf ("  ----------------- mergeQuads : \n");
+      HexDump (old);
+      HexDump (par);
+      HexDump (v1);
+      HexDump (v2);
+      HexDump (v3);
+      HexDump (v4);
+      }
+
+   Vertex *tv1 [QUAD4], *tv2 [QUAD4];
+   Edge   *te1 [QUAD4], *te2 [QUAD4];
+
+   int ier1 = par->ordoVertex (v1, v3, tv1);
+   int ier2 = old->ordoVertex (v2, v4, tv2);
+   if (ier1 != HOK)      return ier1;
+   else if (ier2 != HOK) return ier2;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       te1 [nro] = par->getEdge(nro);
+       Vertex* va1 = te1[nro]->getVertex(V_AMONT);
+       Vertex* vb1 = te1[nro]->getVertex(V_AVAL);
+       int na = index_tv  (tv1, va1);
+       int nb = index_tv  (tv1, vb1);
+       if (na==NOTHING || nb==NOTHING)
+          return HERR;
+
+       te2 [nro] = old->findEdge (tv2[na], tv2[nb]);
+       if (te2[nro]==NULL)
+          return HERR;
+       }
+
+   if (debug())
+      {
+      printf ("  ----------------- Correspondances mergeQuads : \n");
+      for (int nro=0 ; nro<QUAD4 ; nro++)
+          {
+          printf ("  %d  : ", nro);
+          tv2 [nro]->printName(" -> ");
+          tv1 [nro]->printName("\n");
+          }
+      for (int nro=0 ; nro<QUAD4 ; nro++)
+          {
+          printf ("  %d  : ", nro);
+          te2 [nro]->printName(" (");
+          te2 [nro]->getVertex(0)->printName(", ");
+          te2 [nro]->getVertex(1)->printName(") -> ");
+          te1 [nro]->printName(" (");
+          te1 [nro]->getVertex(0)->printName(", ");
+          te1 [nro]->getVertex(1)->printName(")\n");
+          }
+      }
+
+   replaceQuad (old, par);
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       replaceEdge   (te2[nro], te1[nro]);
+   for (int nro=0 ; nro<QUAD4 ; nro++) 
+       replaceVertex (tv2[nro], tv1[nro]);
+
+   maj_connection = false;
+   purge_elements = false;
+   return HOK;
+}
+// ======================================================== mergeEdges
+int Document::mergeEdges (Edge* e1, Edge* e2, Vertex* v1, Vertex* v2)
+{
+   if (e1==NULL || e1->isDeleted() || e2==NULL || e2->isDeleted()) 
+      return HERR;
+
+   for (int nro=0 ; nro<V_TWO ; nro++) 
+       if (e1->index (e2->getVertex(nro))!= NOTHING)
+          return HERR+nro+1;
+
+   Vertex *tv1 [V_TWO], *tv2 [V_TWO];
+
+   int ier1 = e1->anaMerge (v1, tv1);
+   int ier2 = e2->anaMerge (v2, tv2);
+
+   if (ier1 != HOK)      return ier1;
+   else if (ier2 != HOK) return ier2;
+
+   replaceEdge (e2, e1);
+   for (int nro=0 ; nro<V_TWO ; nro++) 
+       replaceVertex (tv2[nro], tv1[nro]);
+
+   maj_connection = false;
+   return HOK;
+}
+// ======================================================== mergeVertices
+int Document::mergeVertices (Vertex* v1, Vertex* v2)
+{
+   if (v1==v2 || v1==NULL || v1->isDeleted() 
+              || v2==NULL || v2->isDeleted())
+      return HERR;
+
+   replaceVertex (v2, v1);
+
+   maj_connection = false;
+   return HOK;
+}
+// ======================================================== replaceVertex
+void Document::replaceVertex (Vertex* old, Vertex* par)
+{
+   if (old==par)
+      return;
+
+   for (int type=EL_EDGE ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           if (elt->isHere ())
+               elt->replaceVertex (old, par);
+       }
+   old->suppress ();
+}
+// ======================================================== replaceEdge
+void Document::replaceEdge (Edge* old, Edge* par)
+{
+   if (old==par)
+      return;
+
+   for (int type=EL_QUAD ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           if (elt->isHere ())
+               elt->replaceEdge (old, par);
+       }
+   old->suppress ();
+}
+// ======================================================== replaceQuad
+void Document::replaceQuad (Quad* old, Quad* par)
+{
+   if (old==par)
+      return;
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       if (elt->isHere ())
+          {
+          Hexa* cell = static_cast <Hexa*> (elt);
+          cell->replaceQuad (old, par);
+          }
+   old->suppress ();
+}
+// ======================================================== prismQuad
+Elements* Document::prismQuad  (Quad* start, Vector* dir, int nb)
+{
+   Quads  tstart;
+   tstart.push_back (start);
+
+   update ();
+   Elements* prisme = prismQuads (tstart, dir, nb);
+   return    prisme;
+}
+// ======================================================== prismQuads
+Elements* Document::prismQuads (Quads& tstart, Vector* dir, int nb)
+{
+   if (nb<=0) return NULL;
+
+   Elements*  prisme = new Elements (this);
+   prisme->prismQuads (tstart, dir, nb);
+   return prisme;
+}
+// ======================================================== joinQuads
+Elements* Document::joinQuads (Quads& start, Quad* dest, Vertex* v1, 
+                              Vertex* v2, Vertex* v3, Vertex* v4, int nb)
+{
+   if (nb<=0)      return NULL;
+
+   update ();
+   Elements*  joint = new Elements (this);
+   joint->joinQuads (start, nb, v1, v2, v3, v4, dest);
+   return joint;
+}
+// ======================================================== joinQuad
+Elements* Document::joinQuad (Quad* start, Quad* dest, Vertex* v1, 
+                              Vertex* v2,  Vertex* v3, Vertex* v4, int nb)
+{
+   Quads  tstart;
+   tstart.push_back (start);
+
+   Elements* joint = joinQuads (tstart, dest, v1, v2, v3, v4, nb);
+   return    joint;
+}
+// ========================================================== getHexa
+Hexa* Document::getHexa (int nro) 
+{
+   return static_cast <Hexa*> (getElement (EL_HEXA, nro));
+}
+// ========================================================== getQuad
+Quad* Document::getQuad (int nro) 
+{
+   return static_cast <Quad*> (getElement (EL_QUAD, nro));
+}
+// ========================================================== getEdge
+Edge* Document::getEdge (int nro) 
+{ 
+   return static_cast <Edge*> (getElement (EL_EDGE, nro));
+}
+// ========================================================== getVertex
+Vertex* Document::getVertex (int nro) 
+{ 
+   return static_cast <Vertex*> (getElement (EL_VERTEX, nro)); 
+}
+// ========================================================== countElement
+int Document::countElement (EnumElt type)
+{ 
+   int compteur = 0;
+   for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                 elt = elt->next())
+       if (elt->isHere())
+          compteur ++;
+
+   return compteur;
+}
+// ========================================================== getElement
+EltBase* Document::getElement (EnumElt type, int nro) 
+{ 
+   int compteur = 0;
+   for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       if (elt->isHere())
+          {
+          if (compteur>=nro)
+             return elt;
+          compteur ++;
+          }
+       }
+   return NULL;
+}
+// ========================================================= addLaw
+Law* Document::addLaw (const char* name, int nbnodes)
+{ 
+   Law* loi = new Law (name, nbnodes);
+   doc_laws.push_back (loi);
+   nbr_laws ++;
+   return loi;
+}
+// ========================================================= GetLaw
+Law* Document::getLaw (int nro)
+{ 
+   if (nro <0 || nro>= nbr_laws)
+      return NULL;
+
+   return doc_laws [nro];
+}
+// ========================================================= FindLaw
+Law* Document::findLaw (const char* name)
+{ 
+   std::string nom = name;
+   for (int nro=0 ; nro<nbr_laws; nro++)
+       if (doc_laws [nro]->getName() == nom)
+          return doc_laws [nro];
+
+   return NULL;
+}
+// ========================================================= removeLaw
+int Document::removeLaw (Law* loi)
+{ 
+   for (int nro=1 ; nro<nbr_laws; nro++)
+       if (doc_laws [nro] == loi)
+          {
+          delete doc_laws [nro];
+          doc_laws.erase (doc_laws.begin()+nro);
+          nbr_laws= doc_laws.size();
+          return HOK;
+         }
+
+   return HERR;
+}
+// ========================================================= majPropagation
+void Document::majPropagation ()
+{ 
+   majReferences ();
+   if (purge_elements)
+       purge ();
+
+   for (int nro=0 ; nro<nbr_propagations ; nro++)
+       {
+       delete doc_propagation [nro];
+       }
+
+   doc_propagation.clear ();
+   nbr_propagations = 0;
+   maj_propagation  = false;
+
+   for (EltBase* elt = doc_first_elt[EL_EDGE]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Edge* arete = static_cast <Edge*> (elt);
+       if (arete!=NULL)
+           arete->setPropag (NOTHING, true);
+       }
+
+   //  markAll (NO_COUNTED, EL_EDGE);
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          {
+          for (int ne=0 ; ne<HE_MAXI ; ne++)
+              {
+              Edge* arete = cell->getEdge(ne);
+              if (arete->getPropag()<0)
+                 {
+                 Propagation* prop = new Propagation (); 
+                 doc_propagation.push_back (prop);
+                 arete->propager (prop, nbr_propagations);
+                 nbr_propagations ++;
+                prop->majLaw();
+                 }
+              }
+          }
+       }
+}
+// ======================================================== countPropagation
+int Document::countPropagation ()
+{
+   if (maj_propagation)
+       majPropagation ();
+
+   return nbr_propagations;
+}
+// ======================================================== getPropagation
+Propagation* Document::getPropagation (int nro)
+{
+   if (maj_propagation)
+       majPropagation ();
+
+   if (nro < 0 || nro >= nbr_propagations)
+       return NULL;
+
+   return doc_propagation [nro];
+}
+// ======================================================== findPropagation
+Propagation* Document::findPropagation (Edge* arete)
+{
+   if (arete==NULL) 
+       return NULL;
+
+   if (maj_propagation)
+       majPropagation ();
+
+   return getPropagation (arete->getPropag ());
+}
+// ======================================================== disconnectQuad
+Elements* Document::disconnectQuad (Hexa* cell, Quad* element)
+{
+   if (cell==NULL || element==NULL) 
+      return NULL;
+
+   update ();
+   Elements* crees = cell->disconnectQuad (element);
+
+   if (crees!=NULL) 
+       majReferences ();
+
+   return crees;
+}
+// ======================================================== disconnectEdge
+Elements* Document::disconnectEdge (Hexa* cell, Edge* element)
+{
+   if (cell==NULL || element==NULL) 
+      return NULL;
+
+   update ();
+   Elements* crees = cell->disconnectEdge (element);
+
+   if (crees!=NULL)
+       majReferences ();
+   return crees;
+}
+// ======================================================== disconnectVertex
+Elements* Document::disconnectVertex (Hexa* cell, Vertex* element)
+{
+   if (cell==NULL || element==NULL) 
+      return NULL;
+
+   update ();
+   Elements* crees = cell->disconnectVertex (element);
+
+   if (crees!=NULL) 
+       majReferences ();
+   return crees;
+}
+// ======================================================== cut
+Elements* Document::cut (Edge* edge, int nbcuts)
+{
+   Elements* t_hexas = new Elements (this);
+
+   if (edge==NULL || nbcuts<=0)
+      return t_hexas;
+
+   Propagation* prop    = findPropagation (edge);
+   const Edges& t_edges = prop->getEdges ();
+
+   t_hexas->cutHexas (t_edges, nbcuts);
+
+   majPropagation ();
+   return t_hexas;
+}
+// ======================================================== addGroup
+Group* Document::addGroup    (cpchar name, EnumGroup kind)
+{
+   Group* grp = new Group (name, kind);
+   doc_group.push_back (grp);
+   return grp;
+}
+// ======================================================== findGroup
+Group* Document::findGroup   (cpchar name)
+{
+   int nbre = doc_group.size();
+
+   for (int ng=0 ; ng<nbre ; ng++) 
+       if (Cestegal (doc_group [ng]->getName(), name))
+          return doc_group [ng];
+
+   return NULL;
+}
+// ======================================================== removeGroup
+int Document::removeGroup (Group* grp)
+{
+   int nbre = doc_group.size();
+   for (int ng=0 ; ng<nbre ; ng++) 
+       {
+       if (grp == doc_group [ng])
+          {
+          doc_group.erase (doc_group.begin() + ng);
+          delete grp;
+          return HOK;
+          }
+       }
+                      // Pas trouve dans la liste. On detruit quand meme
+   delete grp;
+   return HERR;
+}// ======================================================== makeCylinder
+Elements* Document::makeCylinder (Cylinder* cyl, Vector* base, int nr, int na, 
+                                                                       int nl)
+{
+   Elements* grille = new Elements (this);
+   grille->makeCylinder (cyl, base, nr, na, nr);
+   return grille;
+}
+// ======================================================== makeCylinders
+CrossElements* Document::makeCylinders (Cylinder* cyl1, Cylinder* cyl2)
+{
+   CrossElements* grille = new CrossElements (this);
+   grille->crossCylinders (cyl1, cyl2, true);
+   return grille;
+}
+
+// ======================================================== makePipe
+Elements* Document::makePipe (Pipe* pipe, Vector* bx, int nr, int na, int nl)
+{
+   Elements* grille = new Elements (this);
+   grille->makePipe (pipe, bx, nr, na, nr);
+   return grille;
+}
+// ======================================================== makePipes
+CrossElements* Document::makePipes (Pipe* pipe1, Pipe* pipe2)
+{
+   CrossElements* grille = new CrossElements (this);
+   grille->crossCylinders (pipe1, pipe2, false);
+   return grille;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexDocument.hxx b/src/HEXABLOCK/HexDocument.hxx
new file mode 100755 (executable)
index 0000000..bcf9006
--- /dev/null
@@ -0,0 +1,240 @@
+
+// class : Document
+
+#ifndef __DOCUMENT_H_
+#define __DOCUMENT_H_
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Document
+{
+                                   // Fonctions utilisateur
+public :
+                                   // Fonctions globales
+   const char* getFile ()              { return doc_name.c_str() ; }
+   bool        isSaved ()              { return NOT doc_modified ; } 
+   int setFile (const char* filename)  { doc_name = filename ; return HOK ; }
+   int saveFile ();
+
+   int  getLevel ()                    { return doc_db ; }
+   void setLevel (int niv)             { doc_db = niv  ; }
+
+   Hexa*   getHexa   (int nro);
+   Quad*   getQuad   (int nro);
+   Edge*   getEdge   (int nro);
+   Vertex* getVertex (int nro);
+
+   int countHexa   ()   { return countElement (EL_HEXA); }
+   int countQuad   ()   { return countElement (EL_QUAD); }
+   int countEdge   ()   { return countElement (EL_EDGE); }
+   int countVertex ()   { return countElement (EL_VERTEX); }
+
+                                   // Creation d'elements
+   Vertex* addVertex (double x=0.0, double y=0.0, double z=0.0);
+   Edge*   addEdge   (Vertex* va, Vertex* vb);
+   Edge*   addEdge   (Vertex* va, Vector* vec);
+
+   Quad*   addQuadVertices   (Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4);
+   Quad*   addQuad   (Edge* v1, Edge* v2, Edge* v3, Edge* v4);
+
+   Hexa*   addHexaVertices   (Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4, 
+                             Vertex* v5, Vertex* v6, Vertex* v7, Vertex* v8);
+   Hexa*   addHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf);
+
+   Vector* addVector (double dx=0.0, double dy=0.0, double dz=0.0);
+   Vector* addVectorVertices (Vertex* va, Vertex* vb);
+
+
+   Elements* makeCartesian   (Vertex* v, Vector* v1, 
+                       int px, int py, int pz, int mx=0, int my=0, int mz=0);
+   Elements* makeCartesian   (Vertex* v, Vector* v1, Vector* v2, Vector* v3, 
+                       int px, int py, int pz, int mx=0, int my=0, int mz=0);
+
+   Elements* makeCylindrical (Vertex* c, Vector* b, Vector* h, double dr, 
+             double da, double dl, int nr, int na, int nl, bool fill=false);
+
+   Elements* makeSpherical   (Vertex* v, Vector* dv, int nb, double k=1);
+
+   Elements* prismQuad  (Quad*  start, Vector* dv, int nb);
+   Elements* prismQuads (Quads& start, Vector* dv, int nb);
+
+   Elements* joinQuad  (Quad*  start, Quad* dest, Vertex* v1, Vertex* v2,  
+                                      Vertex* v3, Vertex* v4, int nb);
+   Elements* joinQuads (Quads& start, Quad* dest, Vertex* v1, Vertex* v2, 
+                                     Vertex* v3, Vertex* v4, int nb);
+
+   Cylinder* addCylinder   (Vertex* b, Vector* d, double r,  double h);
+   Elements* makeCylinder  (Cylinder* cyl, Vector* vx, int nr, int na, int nl);
+   CrossElements* makeCylinders (Cylinder* cyl1, Cylinder* cyl2);
+
+   Pipe*     addPipe   (Vertex* b, Vector* d, double ri, double re, double h);
+   Elements* makePipe  (Pipe* pip, Vector* vx, int nr, int na, int nl);
+   CrossElements* makePipes (Pipe* pipe1, Pipe* pipe2);
+
+   // CrossElements* makePipes (Pipe* pipe1, int nr1, int na1, int nl1, 
+   //                          Pipe* pipe2, int nr2, int na2, int nl2);
+
+   int     removeHexa (Hexa* maille);
+   int     removeConnectedHexa (Hexa* maille);
+
+   Vertex* findVertex (double  vx, double  vy, double vz);
+   Edge*   findEdge   (Vertex* va, Vertex* vb);
+   Quad*   findQuad   (Vertex* va, Vertex* vb);
+   Hexa*   findHexa   (Vertex* va, Vertex* vb);
+
+   int     mergeVertices (Vertex* v1, Vertex* v2);
+   int     mergeEdges    (Edge* e1, Edge* e2, Vertex* v1, Vertex* v2);
+   int     mergeQuads    (Quad* q1, Quad* q2, Vertex* v1, Vertex* v2, 
+                                              Vertex* v3, Vertex* v4);
+
+   Elements* makeTranslation   (Elements* elts, Vector* trans);
+   Elements* makeScale         (Elements* elts, Vertex* ver, double k);
+   Elements* makeRotation      (Elements* elts, Vertex* ver, Vector* vec, 
+                                double angle);
+   Elements* makeSymmetryPoint (Elements* elts, Vertex* ver);
+   Elements* makeSymmetryLine  (Elements* elts, Vertex* ver, Vector* vec);
+   Elements* makeSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec);
+
+   int performTranslation (Elements* elts, Vector* trans);
+   int performScale    (Elements* elts, Vertex* ver, double k);
+   int performRotation (Elements* elts, Vertex* ver, Vector* vec, double angle);
+   int performSymmetryPoint (Elements* elts, Vertex* ver);
+   int performSymmetryLine  (Elements* elts, Vertex* ver, Vector* vec);
+   int performSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec);
+
+   void   setTolerance (double tol) { doc_tolerance = std::max (tol, 0.0); }
+   double getTolerance ()           { return doc_tolerance; }
+
+   Elements* disconnectQuad   (Hexa* maille, Quad*   face);
+   Elements* disconnectEdge   (Hexa* maille, Edge*   arete);
+   Elements* disconnectVertex (Hexa* maille, Vertex* noeud);
+
+   Elements* cut (Edge* edge, int nbcuts);
+
+   Group* addGroup    (cpchar name, EnumGroup kind);
+   Group* getGroup    (int nro)        { return doc_group [nro];  }
+   Group* findGroup   (cpchar name);
+   int    removeGroup (Group* grp);
+   int    countGroup  ()               { return (int) doc_group.size(); }
+
+   // ---------------------------------------------------
+
+   Law* addLaw    (const char* name, int nbnodes);
+   int  countLaw  ()                            { return nbr_laws ; }
+   Law* getLaw    (int nro);
+   Law* findLaw   (const char* name);
+   int  removeLaw (Law* loi);
+
+   // ---------------------------------------------------
+   int          countPropagation ();
+   Propagation* getPropagation   (int nro);
+   Propagation* findPropagation  (Edge* arete);
+   void         dumpPropagation  ();
+
+   int countVector ()              { return doc_vector.size(); }
+   int countCylinder ()            { return doc_cylinder.size(); }
+   int countPipe ()                { return doc_pipe.size(); }
+
+   Vector*   getVector   (int nro)   { return doc_vector [nro]; }
+   Cylinder* getCylinder (int nro)   { return doc_cylinder [nro]; }
+   Pipe*     getPipe     (int nro)   { return doc_pipe [nro]; }
+
+   void  purge ();
+
+public:
+    Document (cpchar filename);
+   ~Document ();
+
+    int loadXml ();
+
+    EltBase* getFirstEltBase (EnumElt type) { return doc_first_elt [type]; }
+    EltBase* getLastEltBase  (EnumElt type) { return doc_last_elt  [type]; }
+    void     setModified ()                 { doc_modified = true; }
+    void     setDeprecated (int level=1);
+
+    void dump ();
+    void markAll (int marque, int type=-1);
+    int  saveVtk  (cpchar nomfic); 
+    int  saveVtk  (cpchar radical, int &nro); 
+
+    void  putError (cpchar mess, cpchar info1=NULL, cpchar info2=NULL);
+    void  majReferences  ();                  // M.A.J relation "utilise par"
+    void  update ()            { if (maj_connection) majReferences (); }
+    bool  debug (int niv=0)    { return doc_db > niv ; }
+
+public:
+   Globale* glob;
+
+private :
+   void  replaceVertex (Vertex* v1, Vertex* v2);
+   void  replaceEdge   (Edge*   e1, Edge* e2);
+   void  replaceQuad   (Quad*   q1, Quad* q2);
+   int   countElement  (EnumElt type);
+   EltBase* getElement (EnumElt type, int nro);
+
+   void  majPropagation ();
+   void  renumeroter ();
+
+   Elements* clonerElements (Elements* table, Matrix* matrice);
+
+private :
+   friend class EltBase;
+
+   bool doc_modified; 
+   bool maj_connection;
+   bool purge_elements;
+   int  doc_db;
+   int  nbr_errors;
+
+   string   doc_name; 
+   EltBase* doc_first_elt [EL_MAXI];
+   EltBase* doc_last_elt  [EL_MAXI];
+   int      doc_nbr_elt   [EL_MAXI];
+   double   doc_tolerance;
+
+   std::vector <Law*> doc_laws;
+   int                nbr_laws;
+
+   int  nbr_propagations;
+   bool maj_propagation;
+
+   std::vector <Propagation*> doc_propagation;
+   std::vector <Group*>       doc_group;
+
+   std::vector <Vector*>      doc_vector;
+   std::vector <Cylinder*>    doc_cylinder;
+   std::vector <Pipe*>        doc_pipe;
+};
+// ========================================================= saveVtk (avec nro)
+inline int Document::saveVtk  (cpchar radical, int &nro)
+{
+   char num[8];
+   sprintf (num, "%d", nro);
+   nro ++;
+
+   string filename = radical;
+   filename += num;
+   filename += ".vtk";
+   int ier = saveVtk (filename.c_str());
+   return ier;
+}
+// ========================================================= setDeprecated
+inline void Document::setDeprecated (int level)
+{
+   switch (level)
+          {                             
+                         // En cas de destruction  : parents invalides
+          case 2 : maj_connection  = true;
+                   purge_elements  = true;
+                         // creation + destruction : propagations a revoir
+          case 1 : maj_propagation = true;
+                         // Par defaut : 
+          default: doc_modified    = true;
+          }
+
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexDocument_Xml.cxx b/src/HEXABLOCK/HexDocument_Xml.cxx
new file mode 100755 (executable)
index 0000000..db201a9
--- /dev/null
@@ -0,0 +1,404 @@
+
+// C++ : Classe Document : methodes internes
+
+#include "HexDocument.hxx"
+
+#include "HexEltBase.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+#include "HexElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexCylinder.hxx"
+#include "HexPipe.hxx"
+#include "HexMatrix.hxx"
+#include "HexCloner.hxx"
+#include "HexPropagation.hxx"
+#include "HexLaw.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexXmlTree.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== get_coords
+int get_coords (const string& chaine, double& x, double& y, double& z)
+{
+   // int nv = sscanf (chaine.c_str (), "%lg %lg %lg", &x, &y, &z);
+   cpchar buffer = chaine.c_str ();
+   int nv = sscanf (buffer, "%lg %lg %lg", &x, &y, &z);
+   if (nv!=3) return HERR;
+   return HOK;
+}
+// ======================================================== get_values
+int get_values (const string& chaine, int size, int table[])
+{
+   int lg  = chaine.size();
+   int nv  = 0;
+   int val = 0;
+   bool encours = false;
+
+   for (int nc=0 ; nc<lg ; nc++)
+       {
+       char car  = chaine[nc];
+       if (car >= '0' && car <= '9')
+          {
+          val = 10* val + car - '0';
+          encours = true;
+          }
+       else if (encours)
+          {
+          table [nv] = val;
+          encours = false;
+          val     = 0;
+          nv++;
+          if (nv >= size) 
+             return nv;
+          }
+       }
+
+   if (encours)
+      table [nv] = val;
+   return nv;
+}
+// ======================================================== get_int
+int get_int (const string& chaine)
+{
+   int val [2] = {0, 0};
+   get_values (chaine, 1, val);
+   return val[0];
+}
+// ======================================================== loadXml
+int Document::loadXml ()
+{
+   XmlTree xml("");
+   xml.parseFile (doc_name + ".xml");
+   xml.dump ();
+
+   vector <Vertex*> t_vertex;
+   vector <Edge*>   t_edge;
+   vector <Quad*>   t_quad;
+   vector <Hexa*>   t_hexa;
+   int table [10];
+
+   XmlTree* rubrique = xml.findChild ("ListVertices");
+   int nbrelts       = rubrique->getNbrChildren ();
+   t_vertex.resize (nbrelts);
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       double px, py, pz;
+       const  string& nom    = node->findValue ("id");
+       const  string& coords = node->findValue ("coord");
+       get_coords (coords, px, py, pz);
+
+       int nver = get_int (nom);
+       t_vertex [nver] = addVertex (px, py, pz);
+       Display  (nver);
+       }
+
+
+   rubrique = xml.findChild ("ListEdges");
+   nbrelts  = rubrique->getNbrChildren ();
+   t_edge.resize (nbrelts);
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       const  string& nom      = node->findValue ("id");
+       const  string& vertices = node->findValue ("vertices");
+       get_values (vertices, V_TWO, table);
+
+       int ned = get_int (nom);
+       t_edge [ned] = new Edge (t_vertex [table[0]], t_vertex [table[1]]);
+       Display  (ned);
+       }
+
+   rubrique = xml.findChild ("ListQuads");
+   nbrelts  = rubrique->getNbrChildren ();
+   t_quad.resize (nbrelts);
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       const string& nom   = node->findValue ("id");
+       const string& edges = node->findValue ("edges");
+       get_values (edges, QUAD4, table);
+
+       int nquad = get_int (nom);
+       t_quad [nquad] = new Quad (t_edge [table[0]], t_edge [table[1]],
+                                  t_edge [table[2]], t_edge [table[3]]);
+       Display  (nquad);
+       }
+
+   rubrique = xml.findChild ("ListHexas");
+   nbrelts  = rubrique->getNbrChildren ();
+   t_hexa.resize (nbrelts);
+
+   for (int nro=0 ; nro < nbrelts ; nro++)
+       {
+       XmlTree* node = rubrique->getChild (nro);
+       const  string& nom   = node->findValue ("id");
+       const  string& quads = node->findValue ("quads");
+       get_values (quads, HQ_MAXI, table);
+
+       int nhexa      = get_int (nom);
+       t_hexa [nhexa] = new Hexa (t_quad [table[0]], t_quad [table[1]],
+                                  t_quad [table[2]], t_quad [table[3]],
+                                  t_quad [table[4]], t_quad [table[5]]);
+       Display  (nhexa);
+       }
+
+
+   return HOK;
+}
+// ======================================================== renumeroter
+void Document::renumeroter ()
+{
+   doc_modified = true;
+                                       // -- 1) Raz numerotation precedente
+   markAll (NO_COUNTED);
+}
+// ======================================================== saveFile
+int Document::saveFile ()
+{
+                                       // -- 1) Raz numerotation precedente
+   renumeroter ();
+   if (maj_propagation)
+       majPropagation ();
+
+   doc_modified = false;
+   XmlWriter xml;
+   xml.openXml  (doc_name);
+   xml.openMark ("Document");
+   xml.addAttribute ("name", doc_name);
+   xml.endMark ();
+
+   cpchar balise [] = {"ListXXX", 
+          "ListVertices", "ListEdges", "ListQuads", "ListHexas", "ListXXXX" };
+
+   for (int type=EL_VERTEX ; type <= EL_HEXA ; type++)
+       {
+       xml.addMark (balise [type]);
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt !=NULL && elt->isHere())
+              elt->saveXml (xml);
+           }
+       xml.closeMark (true);
+       }
+
+   xml.addMark ("ListDicretizationLaws");
+   for (int nro=0 ; nro<nbr_laws ; nro++)
+       doc_laws [nro]->saveXml (xml);
+   xml.closeMark (true);
+
+   xml.addMark ("ListPropagations");
+   for (int nro=0 ; nro<nbr_propagations ; nro++)
+       doc_propagation[nro]->saveXml (xml);
+   xml.closeMark ();
+
+   xml.closeMark ();
+   xml.closeXml  ();
+   return  HOK;
+}
+// ======================================================== markAll
+void Document::markAll (int marque, int type)
+{
+   int debut = EL_VERTEX;
+   int fin   = EL_HEXA;
+   if (type>=0 && type<EL_MAXI)
+      debut = fin = type;
+
+   for (int type=debut ; type <= fin ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           elt->setMark (marque);
+       }
+}
+// ====================================================== saveVtk
+int Document::saveVtk (cpchar nomfic)
+{
+                                           // -- 1) Raz numerotation precedente
+   markAll (NO_COUNTED, EL_VERTEX);
+
+   int nbnodes = 0;
+   int nbcells = 0;
+                                           // -- 2) Comptage
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          {
+          nbcells ++;
+          nbnodes += cell->countNodes ();
+          }
+       }
+
+   pfile    vtk = fopen (nomfic, "w");
+   fprintf (vtk, "# vtk DataFile Version 3.1\n");
+   fprintf (vtk, "%s \n", nomfic);
+   fprintf (vtk, "ASCII\n");
+   fprintf (vtk, "DATASET UNSTRUCTURED_GRID\n");
+   fprintf (vtk, "POINTS %d float\n", nbnodes);
+
+                                           // -- 2) Les noeuds
+   int nronode = 0;
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->printNodes (vtk, nronode);
+       }
+                                           // -- 2) Les hexas
+
+   fprintf (vtk, "CELLS %d %d\n", nbcells, nbcells*(HV_MAXI+1));
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->printHexa (vtk);
+       }
+
+   fprintf (vtk, "CELL_TYPES %d\n", nbcells);
+   for (int nro=0 ; nro<nbcells ; nro++)
+       fprintf (vtk, "%d\n", HE_MAXI);
+
+   fprintf (vtk, "POINT_DATA %d \n", nbnodes);
+   fprintf (vtk, "SCALARS A float\n");
+   fprintf (vtk, "LOOKUP_TABLE default\n");
+
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->colorNodes (vtk);
+       }
+
+   fclose (vtk);
+   return HOK;
+}
+// ====================================================== purge
+void Document::purge ()
+{
+   purge_elements = true;
+                       // ------------------- Raz marques
+   markAll (NO_USED);
+
+                       // ------------------- Marquage elements utilises
+   for (EltBase* elt = doc_first_elt[EL_HEXA]->next (); elt!=NULL;
+                 elt = elt->next())
+       {
+       Hexa* cell = static_cast <Hexa*> (elt);
+       if (cell!=NULL && cell->isHere())
+          cell->markElements (IS_USED);
+       }
+                       // ------------------- Elimination elements inutilises
+   for (int type=EL_VERTEX ; type <= EL_QUAD ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt->getMark  () == NO_USED)
+               elt->suppress ();
+           }
+       }
+                       // ------------------- Sortie elements inutilises
+
+   EltBase* trash = doc_last_elt [EL_REMOVED];
+
+   for (int type=EL_VERTEX ; type <= EL_HEXA ; type++)
+       {
+       doc_nbr_elt [type] = 0;
+       EltBase* last = doc_first_elt [type];
+       for (EltBase* elt = last->next (); elt!=NULL; elt = last->next())
+           {
+           if (elt->isHere  ())
+               {
+               doc_nbr_elt  [type] ++;
+               last = elt;
+               }
+          else
+               {
+               last  -> setNext (elt -> next());
+               trash -> setNext (elt);
+               trash = elt;
+               trash -> setNext (NULL);
+               }
+           }
+       doc_last_elt [type] = last;
+       }
+
+   doc_last_elt [EL_REMOVED] = trash;
+   update ();
+}
+// ======================================================== majReferences
+void Document::majReferences ()
+{
+   maj_connection = false;
+
+   for (int type=EL_VERTEX ; type <= EL_QUAD ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           elt->razReferences ();
+           }
+       }
+
+   for (int type=EL_EDGE ; type <= EL_HEXA ; type++)
+       {
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           if (elt->isHere ())
+               elt->majReferences ();
+           }
+       }
+}
+// ======================================================== dump
+void Document::dump ()
+{
+   cpchar nom_type [] = { "Elments non classes", 
+          "Sommets", "Aretes", "Faces", "Hexaedres", "Elements detruits" };
+
+   for (int type=EL_VERTEX ; type <= EL_HEXA ; type++)
+       {
+       printf ("\n");
+       printf (" ++++ Liste des %s\n", nom_type[type]);
+       printf ("\n");
+
+       for (EltBase* elt = doc_first_elt[type]->next (); elt!=NULL;
+                     elt = elt->next())
+           {
+           elt->dump ();
+           }
+       }
+
+   printf (" ++++ End od dump\n");
+}
+// ======================================================== putError
+void Document::putError (cpchar mess, cpchar info1, cpchar info2)
+{
+     nbr_errors ++;
+     printf (" ********************************************************** \n");
+     printf (" ****  HexaBlocks Error nro %d :\n", nbr_errors);
+     printf (" **** ");
+     printf (mess, info1, info2);
+     printf ("\n");
+     printf (" **** \n");
+     printf (" ********************************************************** \n");
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexDocument_trans.cxx b/src/HEXABLOCK/HexDocument_trans.cxx
new file mode 100755 (executable)
index 0000000..53d3025
--- /dev/null
@@ -0,0 +1,203 @@
+
+// C++ : La clase principale de Hexa
+
+#include "HexDocument.hxx"
+
+#include "HexEltBase.hxx"
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexQuad.hxx"
+#include "HexHexa.hxx"
+
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexVector.hxx"
+#include "HexCylinder.hxx"
+#include "HexPipe.hxx"
+#include "HexMatrix.hxx"
+#include "HexCloner.hxx"
+#include "HexPropagation.hxx"
+#include "HexLaw.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexXmlTree.hxx"
+#include "HexGlobale.hxx"
+#include "HexGroups.hxx"
+
+BEGIN_NAMESPACE_HEXA
+// ========================================================= performTranslation
+int Document::performTranslation (Elements* elts, Vector* trans)
+{ 
+   Matrix matrice;
+   matrice.defTranslation (trans);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performScale
+int Document::performScale (Elements* elts, Vertex* ver, double k)
+{ 
+   Matrix matrice;
+   matrice.defScale (ver, k);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performRotation
+int Document::performRotation (Elements* elts, Vertex* ver, Vector* vec, double angle)
+{ 
+   Matrix matrice;
+   matrice.defRotation (ver, vec, angle);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performSymmetryPoint
+int Document::performSymmetryPoint (Elements* elts, Vertex* ver)
+{ 
+   Matrix matrice;
+   matrice.defSymmetryPoint (ver);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performSymmetryPlane
+int Document::performSymmetryPlane (Elements* elts, Vertex* ver, Vector* vec)    
+{ 
+   Matrix matrice;
+   matrice.defSymmetryPlane (ver, vec);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// ==================================================== performSymmetryLine
+int Document::performSymmetryLine (Elements* elts, Vertex* ver, Vector* vec)
+{ 
+   Matrix matrice;
+   matrice.defSymmetryLine (ver, vec);
+
+   int    ier = elts->transform (&matrice);
+   return ier;
+}
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// ========================================================= clonerElements
+Elements* Document::clonerElements (Elements* table, Matrix* matrice)
+{
+   Cloner    copieur (matrice);
+   Elements* grille = copieur.clonerElements (table);
+   return    grille;
+}
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// -------------------------------------------------------- 
+// ========================================================= makeTranslation
+Elements* Document::makeTranslation (Elements* table, Vector* trans)
+{
+   Matrix  matrice;
+   matrice.defTranslation (trans);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeScale
+Elements* Document::makeScale (Elements* table, Vertex* ver, double k)
+{
+   Matrix  matrice;
+   matrice.defScale (ver, k);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeRotation
+Elements* Document::makeRotation (Elements* table, Vertex* ver, Vector* vec, 
+                                double angle)
+{
+   Matrix  matrice;
+   matrice.defRotation (ver, vec, angle);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeSymmetryPoint
+Elements* Document::makeSymmetryPoint (Elements* table, Vertex* ver)
+{
+   Matrix  matrice;
+   matrice.defSymmetryPoint (ver);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeSymmetryLine
+Elements* Document::makeSymmetryLine (Elements* table, Vertex* ver, Vector* vec)
+{
+   Matrix  matrice;
+   matrice.defSymmetryLine (ver, vec);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ========================================================= makeSymmetryPlane
+Elements* Document::makeSymmetryPlane (Elements* table, Vertex* ver, Vector* vec)
+{
+   Matrix  matrice;
+   matrice.defSymmetryPlane (ver, vec);
+
+   Elements* grille = clonerElements (table, &matrice);
+   return    grille;
+}
+// ----------------------------------------------------------------------
+// ------------ Destroy
+// ----------------------------------------------------------------------
+// ========================================================= removeHexa
+int Document::removeHexa (Hexa* cell)
+{
+   if (cell==NULL)
+      return HERR;
+
+   cell->remove ();
+   return  HOK;
+}
+// ========================================================= removeHexa
+int Document::removeConnectedHexa (Hexa* cell)
+{
+   if (cell==NULL)
+      return HERR;
+
+   update ();
+   cell->removeConnected ();
+   return  HOK;
+}
+// ========================================================= dumpPropagation
+void Document::dumpPropagation ()
+{
+   int nb = countPropagation ();
+
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Propagation*  prop  = getPropagation (nro);
+       const Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+
+           table [ned]->printName (" = ");
+           if (way)
+              {
+              printf (" +(");
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName (")\n");
+              }
+          else
+              {
+              printf (" -(");
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName (")\n");
+              }
+           }
+       }
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexEdge.cxx b/src/HEXABLOCK/HexEdge.cxx
new file mode 100755 (executable)
index 0000000..e313d06
--- /dev/null
@@ -0,0 +1,169 @@
+
+// C++ : Gestion des aretes
+
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+#include "HexQuad.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexXmlWriter.hxx"
+#include "HexShape.hxx"
+
+static int niveau = 0;
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Edge::Edge (Vertex* va, Vertex* vb)
+    : EltBase (va->dad(), EL_EDGE)
+{
+   e_vertex [V_AMONT] = va; 
+   e_vertex [V_AVAL ] = vb;
+
+   e_propag = NOTHING;
+   e_way    = true;
+   e_law    = NULL;
+
+   majReferences ();
+}
+// ======================================================== Constructeur 2
+Edge::Edge (Edge* other)
+    : EltBase (other->dad(), EL_EDGE)
+{
+   e_vertex [V_AMONT] = e_vertex [V_AVAL ] = NULL;
+
+   e_propag = NOTHING;
+   e_way    = true;
+   e_law    = NULL;
+}
+// ======================================================== majReferences
+void Edge::majReferences ()
+{
+   e_vertex [V_AMONT]->addParent (this);
+   e_vertex [V_AVAL ]->addParent (this);
+}
+// ======================================================== anaMerge
+int Edge::anaMerge (Vertex* orig, Vertex* tv1[])
+{
+   tv1 [0] = orig;
+
+   if (orig == e_vertex [V_AMONT])
+      tv1 [1] = e_vertex[V_AVAL];
+   else if (orig == e_vertex [V_AVAL])
+      tv1 [1] = e_vertex[V_AMONT];
+   else 
+      return HERR;
+
+   return HOK;
+}
+// ========================================================= propager 
+void Edge::propager (Propagation* prop, int groupe, int sens)
+{
+   setPropag (groupe, sens>0);
+   prop->addEdge (this);
+
+   niveau ++;
+   int nbquads = getNbrParents ();
+   for (int nq=0 ; nq<nbquads ; nq++)
+       {
+       Quad* quad = getParent (nq);
+       if (quad!=NULL && quad->hasParents())
+          {
+          if (debug (1))
+             {
+             printf ("Prop : niv=%d edge=", niveau);
+             printName ();
+             printf ("parent=%d quad=", nq);
+             quad->printName ("\n");
+            fflush(stdout);
+             }
+
+          int meme = 1;
+          Edge* arete = quad->getOpposEdge (this, meme);
+          if (arete->getPropag () < 0)
+              arete->propager (prop, groupe, meme*sens);
+          }
+       }
+   niveau --;
+}
+// ========================================================= getParent 
+Quad* Edge::getParent  (int nro)
+{
+   return static_cast <Quad*> (getFather (nro));
+}
+// ========================================================= getParent 
+void Edge::saveXml (XmlWriter& xml)
+{
+   char buffer[12];
+   string vertices = e_vertex [V_AMONT]->getName(buffer);
+   vertices += " ";
+   vertices       += e_vertex [V_AVAL ]->getName(buffer);
+
+   xml.openMark     ("Edge");
+   xml.addAttribute ("id",       getName (buffer));
+   xml.addAttribute ("vertices", vertices);
+   if (el_assoc!=NULL)
+      xml.addAttribute ("shape", el_assoc->getBrep ().c_str());
+   xml.closeMark ();
+}
+// ======================================================== replaceVertex
+void Edge::replaceVertex (Vertex* old, Vertex* par)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (e_vertex[nro]==old) 
+           {
+           e_vertex[nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== dump
+void Edge::dump ()
+{
+   printName(" = (");
+   if (NOT isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   e_vertex[V_AMONT]->printName(", ");
+   e_vertex[V_AVAL] ->printName(")");
+   if (e_propag>=0)
+      {
+      char signe = e_way ? '+' : '-';
+      printf (", Prop= %c%d", signe, e_propag);
+      }
+
+   dumpRef ();
+}
+// ======================================================== dumpPlus
+void Edge::dumpPlus ()
+{
+   dump ();
+   for (int nro=0 ; nro < V_TWO ; nro++)
+       {
+       Vertex* pv = e_vertex[nro];
+       printf ( "    ");
+       if (pv!=NULL)
+          {
+          pv->printName ();
+          printf (" (%g, %g, %g)\n", pv->getX(),  pv->getY(),  pv->getZ());
+          }
+       else
+          {
+          printf (" NULL\n");
+          }
+       }
+}
+
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexEdge.hxx b/src/HEXABLOCK/HexEdge.hxx
new file mode 100755 (executable)
index 0000000..3e6f0d3
--- /dev/null
@@ -0,0 +1,128 @@
+
+// class : Gestion des aretes
+
+#ifndef __EDGE_H
+#define __EDGE_H
+
+#include "HexVertex.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Edge : public EltBase 
+{
+public:
+    virtual int     countVertex () { return V_TWO; } 
+    virtual Vertex* getVertex (int  nro);
+    bool    getWay ()              { return e_way ; }
+
+public:
+    Edge (Vertex* va, Vertex* vb);
+    Edge (Edge* other);
+    int  anaMerge  (Vertex* orig, Vertex* couple[]);
+    bool definedBy (Vertex* v1,   Vertex* v2);
+
+    void  propager (Propagation* prop, int nro, int sens=1);
+
+    void  setPropag (int nro, bool sens) { e_propag = nro; e_way=sens; }
+    int   getPropag ()                   { return e_propag ; }
+
+    Quad* getParent (int nro); 
+    virtual void dump ();
+    void         dumpPlus ();
+    virtual void saveXml (XmlWriter& xml);
+    virtual void majReferences();
+
+    int  inter (Edge* other, int& na);
+    int  inter (Edge* other);
+    int  index (Vertex* node);
+    Vertex* commonVertex (Edge* other);
+
+    Vertex* getAmont ()       { return e_vertex [NOT e_way] ; } 
+    Vertex* getAval  ()       { return e_vertex [e_way] ; } 
+
+    Law* getLaw ()            { return e_law ; } 
+    void setLaw (Law* law)    { e_law =  law ; } 
+
+    void setScalar (double valeur);
+    virtual void replaceVertex (Vertex* old, Vertex* nouveau);
+
+    int   addAssociation (Shape* forme); 
+    const std::vector <Shape*> & getAssociations () { return tab_assoc ; }
+
+private:
+    friend class Cloner;
+    Vertex* e_vertex [V_TWO];
+    int     e_propag;
+    bool    e_way;     // Sens de propagation
+    Law*    e_law;     // Le soleil brille, brille, brille
+
+    std::vector <Shape*> tab_assoc;
+};
+
+// ----------------------------------------------- Inlining
+// ========================================================== addAssociation
+inline int Edge::addAssociation (Shape* forme)
+{
+   tab_assoc.push_back (forme);
+   return HOK;
+}
+// =============================================================== getVertex
+inline Vertex* Edge::getVertex(int nro) 
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro < V_TWO  && el_status == HOK
+               && e_vertex [nro]->isValid())
+      elt = e_vertex [nro]; 
+
+   return elt;
+}
+// =============================================================== index
+inline int Edge::index (Vertex* node)
+{
+   return  node == NULL ? NOTHING 
+         : node == e_vertex[V_AMONT] ? V_AMONT
+         : node == e_vertex[V_AVAL ] ? V_AVAL : NOTHING; 
+}
+// ============================================================= commonVertex
+inline Vertex* Edge::commonVertex (Edge* other)
+{
+   int n1;
+   int nro = inter (other, n1);
+   return nro<0 ? NULL : e_vertex[nro];
+}
+// =============================================================== inter
+inline int Edge::inter (Edge* other)
+{
+   int nro;
+   return inter (other, nro);
+}
+// =============================================================== inter
+inline int Edge::inter (Edge* other, int& nro)
+{
+   for (int ni=0 ; ni<V_TWO ; ni++) 
+        for (int nj=0 ; nj<V_TWO ; nj++) 
+            if (e_vertex[ni] == other->e_vertex[nj])
+               {
+               nro =  nj;
+               return ni;
+               }
+   nro =  NOTHING;
+   return NOTHING;
+}
+// =============================================================== definedBy
+inline bool Edge::definedBy  (Vertex* v1, Vertex* v2)
+{
+   bool   rep =    (v1 == e_vertex[V_AMONT] && v2 == e_vertex[V_AVAL ])
+                || (v1 == e_vertex[V_AVAL ] && v2 == e_vertex[V_AMONT]);
+   return rep;
+}
+// =============================================================== setScalar
+inline void Edge::setScalar  (double val)
+{
+   e_vertex [V_AMONT]->setScalar (val);
+   e_vertex [V_AVAL ]->setScalar (val);
+}
+END_NAMESPACE_HEXA
+#endif
+
diff --git a/src/HEXABLOCK/HexElements.cxx b/src/HEXABLOCK/HexElements.cxx
new file mode 100755 (executable)
index 0000000..dafc924
--- /dev/null
@@ -0,0 +1,870 @@
+
+// C++ : Table des noeuds
+
+#include "HexElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+
+#include <cmath>
+
+static bool db=true;
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== Constructeur
+Elements::Elements (Document* doc) : EltBase (doc)
+{
+   glob  = Globale::getInstance ();
+
+   grid_type  = GR_NONE;
+   size_qx = size_ex = size_vx = size_hx = 0;
+   size_qy = size_ey = size_vy = size_hy = 0;
+   size_qz = size_ez = size_vz = size_hz = 0;
+   size_qplus = size_eplus = size_vplus = size_hplus = 0;
+
+   nbr_hexas  = nbr_quads  = nbr_edges  = nbr_vertex = 0;
+   ker_vertex = 0;
+   cyl_closed = false;
+   cyl_fill   = false;
+   cyl_dispo  = CYL_NOFILL;
+}
+// ====================================================== Constructeur
+Elements::Elements (Document* doc, int nx, int ny, int nz) : EltBase (doc)
+{
+   glob  = Globale::getInstance ();
+
+   grid_type  = GR_NONE;
+   size_qx = size_ex = size_vx = size_hx = 0;
+   size_qy = size_ey = size_vy = size_hy = 0;
+   size_qz = size_ez = size_vz = size_hz = 0;
+   size_qplus = size_eplus = size_vplus = size_hplus = 0;
+
+   nbr_hexas  = nbr_quads  = nbr_edges  = nbr_vertex = 0;
+   cyl_closed = true;
+   cyl_fill   = false;
+   cyl_dispo  = CYL_NOFILL;
+
+   resize (GR_CYLINDRIC, nx, ny, nz);
+   cyl_closed = true;
+}
+// ====================================================== Constructeur (clonage)
+Elements::Elements (Elements* orig) : EltBase (orig->el_root)
+{
+   glob = Globale::getInstance ();
+
+   grid_type  = orig->grid_type;
+   cyl_closed = orig->cyl_closed;
+   cyl_fill   = orig->cyl_fill;
+   cyl_dispo  = orig->cyl_dispo;
+
+   size_qx = size_ex = size_vx = size_hx = 0;
+   size_qy = size_ey = size_vy = size_hy = 0;
+   size_qz = size_ez = size_vz = size_hz = 0;
+   size_qplus = size_eplus = size_vplus = size_hplus = 0;
+   nbr_hexas  = nbr_quads  = nbr_edges  = nbr_vertex = 0;
+
+   resize (orig->grid_type, orig->size_hx, orig->size_hy, orig->size_hz);
+   cyl_closed = orig->cyl_closed;
+}
+// ====================================================== resize
+void Elements::resize (EnumGrid type, int nx, int ny, int nz)
+{
+   grid_type = type;
+
+   switch (grid_type)
+      {
+      case GR_CARTESIAN :
+      case GR_CYLINDRIC :
+      default :
+           size_hx = std::max (nx, 1);
+           size_hy = std::max (ny, 1);
+           size_hz = std::max (nz, 1);
+
+           size_qx = size_ex = size_vx = size_hx + 1;
+           size_qy = size_ey = size_vy = size_hy + 1;
+           size_qz = size_ez = size_vz = size_hz + 1;
+
+           nbr_hexas  = size_hx * size_hy * size_hz;
+           nbr_quads  = size_qx * size_qy * size_qz * DIM3;
+           nbr_edges  = size_ex * size_ey * size_ez * DIM3;
+           nbr_vertex = size_vx * size_vy * size_vz;
+           break;
+
+      case GR_SPHERIC :
+           size_qx = size_ex = size_vx = size_hx = 0;
+           size_qy = size_ey = size_vy = size_hy = 0;
+           size_qz = size_ez = size_vz = size_hz = 0;
+           nbr_quads  = nbr_edges  = nbr_vertex = 0;
+           gr_rayon = std::max (nx, 1);
+
+           nbr_hexas = 1 +  gr_rayon*HQ_MAXI;
+           tab_hexa.clear ();
+           ker_vertex = nbr_vertex;
+           return;
+
+      case GR_JOINT :
+           nbr_orig = std::max (nx, 1); 
+           gr_hauteur  = std::max (ny, 1);
+           size_hx  = nbr_orig;
+           size_hy  = 1;
+           size_hz  = gr_hauteur;
+
+           nbr_hexas  = nbr_orig * gr_hauteur;
+           nbr_vertex = nbr_hexas * QUAD4;
+           nbr_vertex = nbr_orig * (gr_hauteur+1)*QUAD4;
+           nbr_quads  = nbr_vertex;
+           nbr_edges  = 2*nbr_vertex;
+           break;
+
+      case GR_BICYL :
+           cyl_closed = true;
+           size_hx = 1;
+           size_hy = 8;
+           size_hz = 4;
+
+           size_qx = size_ex = size_vx = size_hx + 1;
+           size_qy = size_ey = size_vy = size_hy + 1;
+           size_qz = size_ez = size_vz = size_hz + 1;
+
+           nbr_hexas  = size_hx * size_hy * size_hz;
+           nbr_quads  = size_qx * size_qy * size_qz * DIM3;
+           nbr_edges  = size_ex * size_ey * size_ez * DIM3;
+           nbr_vertex = size_vx * size_vy * size_vz;
+           break;
+      }
+
+   tab_hexa  .resize (nbr_hexas);
+   tab_quad  .resize (nbr_quads);
+   tab_edge  .resize (nbr_edges);
+   tab_vertex.resize (nbr_vertex);
+
+   ker_vertex = nbr_vertex;
+
+   for (int nc=0 ; nc< nbr_hexas  ; nc++) tab_hexa   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_quads  ; nc++) tab_quad   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_edges  ; nc++) tab_edge   [nc] = NULL;
+   for (int nc=0 ; nc< nbr_vertex ; nc++) tab_vertex [nc] = NULL;
+}
+
+// ====================================================== makeCartesianGrid
+int Elements::makeCartesianGrid (Vertex* orig, Vector* v1, Vector* v2, 
+                   Vector* v3, int px, int py, int pz, int mx, int my, int mz)
+{
+   resize (GR_CARTESIAN, px+mx, py+my, pz+mz);
+
+   makeCartesianNodes (orig, v1, v2, v3, px, py, pz, mx, my, mz);
+
+   fillGrid ();
+   return HOK;
+}
+// ====================================================== makeCylindricalGrid
+int Elements::makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, 
+         double dr, double da, double dl, int nr, int na, int nl, bool fill)
+{
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = da >= 360.0;
+   makeCylindricalNodes (c, b, h, dr, da, dl, nr, na, nl, fill);
+   fillGrid ();
+   return HOK;
+}
+// ====================================================== makeSphericalGrid
+int Elements::makeSphericalGrid (Vertex* c, Vector* dv, int nb, double  k)
+{
+   resize (GR_SPHERIC, nb);
+
+   if (nb<0) 
+      return HERR;
+   else if (dv->getDx()<=ZEROR || dv->getDy()<=ZEROR || dv->getDz()<=ZEROR)
+      return HERR;
+
+   Vertex* i_node [HV_MAXI];    // Les noeuds de l'hexa englobant
+   Edge*   i_edge [HE_MAXI];    // Les noeuds de l'hexa englobant
+   Quad*   i_quad [HQ_MAXI];    // Les noeuds de l'hexa englobant
+
+   for (int nro=0 ; nro<HV_MAXI; nro++)
+       {
+       double dx = glob->CoordVertex (nro, dir_x) * dv->getDx();
+       double dy = glob->CoordVertex (nro, dir_y) * dv->getDy();
+       double dz = glob->CoordVertex (nro, dir_z) * dv->getDz();
+
+       i_node [nro] = el_root->addVertex (c->getX ()+dx, c->getY ()+dy, 
+                                          c->getZ ()+dz);
+       }
+
+   for (int nro=0 ; nro<HE_MAXI; nro++)
+       i_edge[nro] = newEdge (i_node[glob->EdgeVertex (nro, V_AMONT)], 
+                              i_node[glob->EdgeVertex (nro, V_AVAL) ]);
+        
+   for (int nro=0 ; nro<HQ_MAXI; nro++)
+       i_quad[nro] = newQuad (i_edge[glob->QuadEdge (nro, E_A)], 
+                              i_edge[glob->QuadEdge (nro, E_B)], 
+                              i_edge[glob->QuadEdge (nro, E_C)], 
+                              i_edge[glob->QuadEdge (nro, E_D)]);
+
+   tab_hexa.push_back (newHexa (i_quad[Q_A], i_quad[Q_B], i_quad[Q_C], 
+                                i_quad[Q_D], i_quad[Q_E], i_quad[Q_F]));
+   double lambda  = 1;
+   double dcell   = 1;
+   for (int niv=0; niv<gr_rayon ; niv++)
+       {
+       double lambda0 = lambda;
+       dcell  *= k;
+       lambda += dcell;
+       addStrate (i_quad, i_edge, i_node, c,  lambda/lambda0);
+       }
+       
+   return HOK;
+}
+// ====================================================== addStrate
+int Elements::addStrate (Quad* i_quad[], Edge* i_edge[], Vertex* i_node[], 
+                        Vertex* center,  double lambda)
+{
+   Vertex* e_node [HV_MAXI];    // Les noeuds de l'hexa englobant
+   Edge*   e_edge [HE_MAXI];    // Les noeuds de l'hexa englobant
+   Quad*   e_quad [HQ_MAXI];    // Les noeuds de l'hexa englobant
+
+   Edge*   d_edge [HV_MAXI];    // Les aretes diagonales (1 par sommet)
+   Quad*   d_quad [HE_MAXI];    // Les faces  diagonales (1 par arete)
+
+                                          // Les sommets
+                                          //  + les aretes diagonales
+   for (int nv=0 ; nv<HV_MAXI ; nv++)
+       {
+       double px0 = center->getX ();
+       double py0 = center->getY ();
+       double pz0 = center->getZ ();
+       e_node[nv] = el_root->addVertex (px0+lambda*(i_node[nv]->getX()-px0),
+                                        py0+lambda*(i_node[nv]->getY()-py0),
+                                        pz0+lambda*(i_node[nv]->getZ()-pz0));
+
+       d_edge[nv] = newEdge (i_node[nv], e_node[nv]);
+       }
+                                          // Les aretes exterieures
+                                          //  + les faces diagonales
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       int nv0  = glob->EdgeVertex (nro, V_AMONT);
+       int nv1  = glob->EdgeVertex (nro, V_AVAL );
+       e_edge[nro] = newEdge (e_node [nv0], e_node [nv1]);
+       d_quad[nro] = newQuad (i_edge [nro], d_edge [nv0], 
+                              e_edge [nro], d_edge [nv1]);
+       }
+                                          // Les faces exterieures
+                                          //  + les hexas
+   Hexa* strate = NULL;
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       int ne0 = glob->QuadEdge (nro, E_A);
+       int ne1 = glob->QuadEdge (nro, E_B);
+       int ne2 = glob->QuadEdge (nro, E_C);
+       int ne3 = glob->QuadEdge (nro, E_D);
+
+       e_quad[nro] = newQuad (e_edge[ne0], e_edge[ne1], 
+                              e_edge[ne2], e_edge[ne3]);
+       strate  = newHexa (i_quad[nro], e_quad[nro], d_quad[ne0], 
+                          d_quad[ne2], d_quad[ne1], d_quad[ne3]);
+       tab_hexa.push_back (strate);
+       }
+
+   for (int nv=0 ; nv<HV_MAXI ; nv++) i_node  [nv] = e_node [nv];
+   for (int ns=0 ; ns<HE_MAXI ; ns++) i_edge  [ns] = e_edge [ns];
+   for (int nq=0 ; nq<HE_MAXI ; nq++) i_quad  [nq] = e_quad [nq];
+
+   return HOK;
+}
+// ====================================================== saveVtk
+int Elements::saveVtk (cpchar nomfic)
+{
+                                           // -- 1) Raz numerotation precedente
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+           cell->razNodes ();
+       }
+
+   int nbnodes = 0;
+   int nbcells = 0;
+                                           // -- 2) Comptage
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+          {
+          nbcells ++;
+          nbnodes += cell->countNodes ();
+          }
+       }
+
+   pfile    vtk = fopen (nomfic, "w");
+   fprintf (vtk, "# vtk DataFile Version 3.1\n");
+   fprintf (vtk, "%s \n", nomfic);
+   fprintf (vtk, "ASCII\n");
+   fprintf (vtk, "DATASET UNSTRUCTURED_GRID\n");
+   fprintf (vtk, "POINTS %d float\n", nbnodes);
+
+                                           // -- 2) Les noeuds
+   int nronode = 0;
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+          cell->printNodes (vtk, nronode);
+       }
+                                           // -- 2) Les hexas
+
+   fprintf (vtk, "CELLS %d %d\n", nbcells, nbcells*(HV_MAXI+1));
+
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+          cell->printHexa (vtk);
+       }
+
+   fprintf (vtk, "CELL_TYPES %d\n", nbcells);
+   for (int nro=0 ; nro<nbcells ; nro++)
+       fprintf (vtk, "%d\n", HE_MAXI);
+
+   fclose (vtk);
+   return HOK;
+}
+// ============ = = = = = = = = = Vertices ..........
+// ====================================================== newEdge
+Edge* Elements::newEdge (Vertex* v1, Vertex* v2)
+{
+   if (v1==NULL || v2==NULL) 
+      return NULL;
+
+   Edge* elt = new Edge (v1, v2);
+   return elt;
+}
+// ====================================================== newQuad
+Quad* Elements::newQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4)
+{
+   if (e1==NULL || e2==NULL || e3==NULL|| e4==NULL)
+      return NULL;
+
+   Quad* elt = new Quad (e1, e2, e3, e4);
+   return elt;
+}
+// ====================================================== newHexa
+Hexa* Elements::newHexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, 
+                                             Quad* qe, Quad* qf)
+{
+   if (qa==NULL || qb==NULL || qc==NULL|| qd==NULL || qe==NULL|| qf==NULL)
+      return NULL;
+
+   Hexa*  elt = new Hexa (qa, qb, qc, qd, qe, qf);
+   return elt;
+}
+// ====================================================== joinQuads
+int Elements::joinQuads (Quads& orig, int nb, Vertex* v1, Vertex* v2, 
+                  Vertex* v3, Vertex* v4, Quad* cible)
+{
+   resize (GR_JOINT, orig.size(), nb);
+
+   el_root->markAll (IS_NONE);
+   
+   gr_hauteur  = nb;
+   nbr_orig = orig.size();
+
+   for (int nro=0 ; nro<nbr_orig ; nro++)
+       {
+       Quad* face = orig[nro];
+       if (face==NULL)
+          {
+          printf ("\n");
+          printf (" *** joinQuads : donnees incorrectes\n");
+          printf (" *** le %deme quadrangle de depart est NULL\n", nro);
+          return HERR;
+          }
+       else if (face->getNbrParents()>1)
+          {
+          printf ("\n");
+          printf (" *** joinQuads : donnees incorrectes\n");
+          printf (" *** le %deme quadrangle de depart n'est pas une " 
+                  "face externe\n", nro);
+          face->dump ();        
+          return HERR;
+          }
+       orig [nro]->setMark (nro);
+       tab_orig.push_back (orig[nro]);
+       }
+
+   Edge* e_orig = tab_orig[0] -> findEdge (v1, v3);
+   Edge* e_dest = cible        -> findEdge (v2, v4);
+   HexDump (e_orig);
+   HexDump (e_dest);
+
+   if (e_orig==NULL)
+      {
+      printf ("\n");
+      printf (" *** joinQuads : donnees incorrectes\n");
+      printf (" *** Les vertex v1 et v3 passes en argument ne definissent\n");
+      printf (" *** pas une arete du 1er quadrangle de depart\n");
+      printf ("\n");
+      HexDump (v1);
+      HexDump (v3);
+      HexDump (orig[0]);
+      }
+
+   if (e_dest==NULL)
+      {
+      printf ("\n");
+      printf (" *** joinQuads : donnees incorrectes\n");
+      printf (" *** Les vertex v2 et v4 passes en argument ne definissent\n");
+      printf (" *** pas une arete du quadrangle cible\n");
+      printf ("\n");
+      HexDump (v2);
+      HexDump (v4);
+      HexDump (cible);
+      }
+
+   if (e_orig==NULL || e_dest==NULL)
+      return HERR;
+
+   StrOrient orient (v1, v3, v2, v4);
+   this   ->coupler (0, cible, &orient);
+   orig[0]->coupler (cible, &orient, this);
+   return HOK;
+}
+// ======================================================== coupler
+void Elements::coupler (int nquad, Quad* dest, StrOrient* orient)
+{
+   Quad* orig = tab_orig [nquad];
+
+   setQuad (orig, dir_z, 0, 0, 0);
+   setQuad (dest, dir_z, nquad, 0, 0);
+
+   int n11 = orig->indexVertex (orient->v11);
+   int n12 = orig->indexVertex (orient->v12);
+   int n21 = dest->indexVertex (orient->v21);
+   int n22 = dest->indexVertex (orient->v22);
+   
+   printf ("Quad nro %d : ", nquad);
+   orig->printName (" est couple avec "); 
+   dest->printName (", "); 
+   printf ("Orientation=(%d,%d) (%d,%d)\n", n11, n12, n21, n22);  
+               // ---------------- Les 4 sommets initiaux
+   Vertex* vorig[QUAD4] = { orient->v11, orient->v12, 
+                            orig->getVertex((n11+2) MODULO QUAD4),
+                            orig->getVertex((n12+2) MODULO QUAD4) };
+
+   Vertex* vdest[QUAD4] = { orient->v21, orient->v22, 
+                            dest->getVertex((n21+2) MODULO QUAD4),
+                            dest->getVertex((n22+2) MODULO QUAD4) };
+
+               // ---------------- Les sommets + les aretes verticales
+#define Put(e) if (e) { printf ( " ... " #e " = ") ; e->printName("\n"); } \
+   else printf ( " ... " #e " = 0x0\n")
+#define Putn(e,n) { printf ( " ... " #e "[%d] = ",n) ; if(e[n]) e[n]->printName("\n"); \
+   else printf ( "0x0\n")
+
+   for (int ns=0 ; ns< QUAD4 ; ns++)
+       {
+       Vertex* nd1 = vorig[ns];
+       Vertex* nd2 = vdest[ns];
+       int nref0   = nd1->getMark();
+       tab_vertex [nroVertex (nquad,ns,0)] = nd1;
+
+       if (nref0==IS_NONE)
+          {
+          double px0 = nd1->getX();
+          double py0 = nd1->getY();
+          double pz0 = nd1->getZ();
+
+          double dx = (nd2->getX() - nd1->getX()) / gr_hauteur;
+          double dy = (nd2->getY() - nd1->getY()) / gr_hauteur;
+          double dz = (nd2->getZ() - nd1->getZ()) / gr_hauteur;
+
+          nd1->setMark (indVertex (nquad, ns, 0));
+
+          Vertex* nd = nd1;
+          for (int nh=0 ; nh<gr_hauteur ; nh++)
+              {
+              int nh1 = nh + 1;
+              Vertex* ndp = nd;
+              if (nh == gr_hauteur-1)
+                 nd = nd2 ;
+              else 
+                 nd = el_root->addVertex (px0 + nh1*dx, py0 + nh1*dy,  
+                                          pz0 + nh1*dz);
+              int nv  = indVertex (nquad, ns, nh);
+              tab_vertex [nv] = nd;
+              tab_edge   [nv] = el_root->addEdge (ndp, nd);
+              }
+          }
+       else
+          {
+          for (int nh=0 ; nh<gr_hauteur ; nh++)
+              {
+              int nv  = indVertex (nquad, ns, nh);
+              int nv0 = indVertex (nref0, nh);
+              tab_vertex [nv] = tab_vertex [nv0];
+              tab_edge   [nv] = tab_edge   [nv0];
+              }
+          }
+       }
+               // ---------------- Les quads verticaux + aretes horiz
+   for (int ns=0 ; ns< QUAD4 ; ns++)
+       {
+       int next = (ns+1) MODULO QUAD4;
+       Edge*   arete = orig->findEdge (vorig[ns], vorig[next]);
+       int     nref0 = arete->getMark();
+       int     nref  = indVertex (nquad, ns, 0);
+                                  // Construction des faces & aretes H
+       if (nref0==IS_NONE)
+          {
+          arete->setMark (nref);
+          Edge* ea = arete;
+          Edge *eb, *ec, *ed;
+          int  nva, nvb, nha;
+
+          for (int nh=0 ; nh< gr_hauteur ; nh++)
+              {
+              nva = indVertex (nquad, ns,   nh);
+              nvb = indVertex (nquad, next, nh);
+              nha = nroEdgeH  (nva);
+
+              ed  = tab_edge [nva];
+              ec  = ea;
+              eb  = tab_edge [nvb];
+              if (nh==gr_hauteur-1)
+                 ea = dest->findEdge (vdest[ns], vdest[next]);
+              else 
+                 ea = el_root->addEdge (tab_vertex [nva], tab_vertex [nvb]);
+
+              tab_quad [nva] = newQuad (ea, eb, ec, ed);
+              tab_edge [nha] = ea;
+              }
+          }
+                                  // L'arete a deja ete traitee
+       else
+          {
+          for (int nh=0 ; nh<gr_hauteur ; nh++)
+              {
+              int nva = indVertex (nquad, ns, nh);
+              int nha = nroEdgeH  (nva);
+
+              int nvb = indVertex (nref0, nh);
+              int nhb = nroEdgeH  (nvb);
+
+              tab_quad [nva] = tab_quad [nvb];
+              tab_edge [nha] = tab_edge [nhb];
+              }
+          }
+       }
+               // -------------------------------- Les Hexas
+   Quad *fb = orig;
+   Quad *fa, *fc, *fd, *fe, *ff;
+   for (int nh=0 ; nh< gr_hauteur ; nh++)
+       {
+       fa = fb;
+       if (nh == gr_hauteur-1)
+          fb = dest;
+       else
+          fb = newQuad (tab_edge [nroEdgeH (nquad, E_A, nh)], 
+                        tab_edge [nroEdgeH (nquad, E_B, nh)],
+                        tab_edge [nroEdgeH (nquad, E_C, nh)],
+                        tab_edge [nroEdgeH (nquad, E_D, nh)]);
+
+       fc = tab_quad [indVertex (nquad, E_A, nh)];
+       fd = tab_quad [indVertex (nquad, E_C, nh)];
+       fe = tab_quad [indVertex (nquad, E_B, nh)];
+       ff = tab_quad [indVertex (nquad, E_D, nh)];
+
+       tab_hexa [nroHexa(nquad,nh)] = newHexa (fa,fb,fc,fd,fe,ff);
+       }
+}
+// ====================================================== makeCartesianNodes
+int Elements::makeCartesianNodes (Vertex* orig, Vector* v1, Vector* v2, 
+                   Vector* v3, int px, int py, int pz, int mx, int my, int mz)
+{
+   double dx  = v1->getDx() + v2->getDx() + v3->getDx();
+   double dy  = v1->getDy() + v2->getDy() + v3->getDy();
+   double dz  = v1->getDz() + v2->getDz() + v3->getDz();
+
+   double px0 = orig->getX () - mx * dx;
+   double py0 = orig->getY () - my * dy;
+   double pz0 = orig->getZ () - mz * dz;
+
+   int nbre= 0;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       for (int ny=0 ; ny<size_vy ; ny++)
+           for (int nx=0 ; nx<size_vx ; nx++)
+               {
+               Vertex* node = orig;
+               if (nx!=mx || ny!=my || nz!=mz)
+                  node = el_root->addVertex (px0 + nx*dx,  py0 + ny*dy,  
+                                                          pz0 + nz*dz);
+               setVertex (node, nx, ny, nz);
+               nbre++;
+               }
+   return HOK;
+}
+// ====================================================== makeCylindricalNodes
+int Elements::makeCylindricalNodes (Vertex* orig, Vector* base, Vector* haut, 
+            double dr, double da, double dl, int nr, int na, int nl, bool fill)
+{
+   int ier = makeBasicCylinder (dr, da, dl, nr, na, nl, fill);
+   if (ier!=HOK) 
+       return ier;
+
+   Vector* iprim = new Vector (base);
+   Vector* jprim = new Vector (base);
+   Vector* kprim = new Vector (haut);
+
+   ier = kprim->renormer ();
+   if (ier!=HOK) 
+       return ier;
+
+   jprim->vectoriel (kprim, base);
+   ier = jprim->renormer ();
+   if (ier!=HOK) 
+       return ier;
+
+   iprim->vectoriel (jprim, kprim);
+   transfoVertices  (orig,  iprim, jprim, kprim);
+   return HOK;
+}
+// ====================================================== transfoVertices
+void Elements::transfoVertices (Vertex* orig, Vector* iprim, Vector* jprim, 
+                                Vector* kprim)
+{
+   double matrice[DIM3][DIM3]={{iprim->getDx(),jprim->getDx(),kprim->getDx()},
+                               {iprim->getDy(),jprim->getDy(),kprim->getDy()},
+                               {iprim->getDz(),jprim->getDz(),kprim->getDz()}};
+
+   double matkx = orig->getX();
+   double matky = orig->getY();
+   double matkz = orig->getZ();
+
+   int nbre = tab_vertex.size ();
+   for (int nro=0 ; nro<nbre ; nro++)
+       {
+       if (tab_vertex[nro] != NULL) 
+           tab_vertex[nro]->setMark (NO_USED);
+       }
+
+   for (int nro=0 ; nro<nbre ; nro++)
+       {
+       Vertex* node =  tab_vertex[nro];
+       if (node != NULL  && node->getMark() == NO_USED)
+          {
+          double point [DIM3] = {node->getX(), node->getY(), node->getZ()};
+          double result[DIM3] = {matkx, matky, matkz};
+
+          for (int ni=0 ; ni<DIM3; ni++)
+              for (int nj=0 ; nj<DIM3; nj++)
+                  result [ni] += matrice[ni][nj] * point[nj];
+               
+          node->setCoord (result[dir_x], result[dir_y], result[dir_z]);
+          node->setMark (IS_USED);
+          }
+       }
+}
+// ====================================================== transform
+int Elements::transform (Matrix* matrice)
+{
+                                           // -- 1) Raz Marques
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+           cell->razNodes ();
+       }
+                                           // -- 2) Move Nodes
+   for (int nro=0 ; nro<nbr_hexas ; nro++)
+       {
+       Hexa* cell = tab_hexa[nro];
+       if (cell!=NULL && cell->isHere())
+           cell->moveNodes (matrice);
+       }
+
+   return HOK;
+}
+// ====================================================== cutHexas
+int Elements::cutHexas  (const Edges& t_edges, int nbcuts)
+{
+                                       // 1) marquage des hexas
+   el_root->markAll (NO_USED);
+                                       // 2) Memo noeuds
+   vector <Quad*> q_amont;
+   vector <Quad*> q_aval;
+
+   int nbnodes = t_edges.size();
+   vector <Vertex*> v_amont (nbnodes);
+   vector <Vertex*> v_aval  (nbnodes);
+
+   for (int nro=0; nro<nbnodes ; nro++)
+       {
+       Edge* arete   = t_edges [nro];
+       v_amont [nro] = arete->getAmont ();
+       v_aval  [nro] = arete->getAval  ();
+       int nbcells = arete->getNbrParents ();
+
+       for (int nq=0 ; nq<nbcells ; nq++)
+           {
+           Quad* quad = arete->getParent (nq);
+           if (quad->getMark () != IS_USED)
+              {
+              quad->setMark (IS_USED);
+              int nbcubes = quad->getNbrParents ();
+              for (int nh=0 ; nh<nbcubes ; nh++)
+                  {
+                  Hexa* hexa = quad->getParent (nh);
+                  if (hexa->getMark () != IS_USED)  
+                     {
+                     hexa->setMark (IS_USED);
+                     int namont = hexa->getBase (v_amont[nro], arete);
+                     int naval  = glob->getOpposedQuad (namont);
+                     q_amont.push_back (hexa->getQuad  (namont));
+                     q_aval .push_back (hexa->getQuad  (naval ));
+                     if (db)
+                        {
+                        printf (" Quad = ");
+                        hexa->printName (", ");
+                        printf (" Faces = (");
+                        hexa->getQuad (namont)->printName (", ");
+                        hexa->getQuad (naval )->printName (")\n");
+                        }
+                     }
+                  }
+              }
+           }
+       }
+                   // ------------------- Dimensionnement
+   int nbcells   = q_amont.size ();
+   nbr_vertex    = nbnodes*(nbcuts+2);
+   int nbpiliers = nbnodes*(nbcuts+1);            // aretes verticales
+   int nbpoutres = nbcells*(nbcuts+2)*QUAD4;      // aretes horizontales
+   nbr_edges     = nbpoutres; 
+   nbr_quads     = nbcells*(nbcuts+1)*QUAD4;      // faces Verticales
+   nbr_hexas     = nbcells*(nbcuts+1);
+
+                   // ------------------- Les noeuds et les aretes verticales
+   tab_quad.resize   (nbr_quads);
+   tab_edge.resize   (nbr_edges);
+   tab_hexa.resize   (nbr_hexas);
+   tab_vertex.resize (nbr_vertex);
+   vector <Edge*>    tab_pilier (nbpiliers);
+
+   int nbinter = nbcuts + 1;
+   for (int ned=0; ned<nbnodes ; ned++)
+       {
+       t_edges [ned]->remove ();
+       Vertex* ndamont = v_amont [ned];
+       Vertex* ndaval  = v_aval  [ned];
+
+       double dx = (ndaval->getX() - ndamont->getX()) / nbinter;
+       double dy = (ndaval->getY() - ndamont->getY()) / nbinter;
+       double dz = (ndaval->getZ() - ndamont->getZ()) / nbinter;
+
+       Vertex* nd0 = tab_vertex [ned] = ndamont;
+       for (int nc=0; nc<nbcuts ; nc++)
+           {
+           int nc1 = nc+1;
+           Vertex* nd1 = el_root->addVertex (ndamont->getX() + nc1*dx, 
+                                             ndamont->getY() + nc1*dy, 
+                                             ndamont->getZ() + nc1*dz);
+           tab_vertex [nc1*nbnodes + ned] = nd1;
+           tab_pilier [nc *nbnodes + ned] = newEdge (nd0, nd1);
+           nd0 =  nd1;
+           }
+       tab_vertex [nbinter*nbnodes + ned] = ndaval;
+       tab_pilier [nbcuts *nbnodes + ned] = newEdge (nd0, ndaval);
+       ndamont->setMark (ned);
+       }
+                   // ------------------- Les aretes horizontales
+                   // ------------------- Les faces verticales
+   int sizelig = nbcells*QUAD4;
+   for (int nro=0; nro<nbcells ; nro++)
+       {
+       Quad* sol  = q_amont [nro];
+       Quad* toit = q_aval  [nro];
+       // Display (nro);
+       for (int ns=0; ns<QUAD4 ; ns++)
+           {
+           // Display (ns);
+           Edge* plinthe = sol->getEdge (ns);
+           int   nmur  = nro*QUAD4 + ns;
+           int   nmur0 = plinthe->getMark();
+           if (nmur0 >= 0)
+              {
+              for (int nc=0 ; nc<nbinter ; nc++)
+                  {
+                  tab_edge [nc*sizelig + nmur] = tab_edge [nc*sizelig + nmur0];
+                  tab_quad [nc*sizelig + nmur] = tab_quad [nc *sizelig + nmur0];
+                  printf (" quad_vertical [%02d] = ", nc*sizelig + nmur);
+                  printf (" quad_vertical [%02d]\n",  nc*sizelig + nmur0);
+                  printf ("\n");
+                  }
+              tab_edge [nbinter*sizelig+nmur] = tab_edge[nbinter*sizelig+nmur0];
+              }
+           else
+              {
+              plinthe->setMark (nmur);
+              Vertex* v1  = sol->getVertex (ns);
+              Vertex* v2  = sol->getVertex ((ns+1) MODULO QUAD4);
+              int     nd1 = v1->getMark ();
+              int     nd2 = v2->getMark ();
+              Edge*   ed0 = tab_edge [nmur] = plinthe;
+              Edge*   edtoit = toit->getEdge (ns);
+              for (int nc=0 ; nc<nbinter ; nc++)
+                  {
+                  int   nc1 = nc + 1;
+                  Edge* ed2 = edtoit;
+                  if (nc<nbcuts)
+                     {
+                     v1  = tab_vertex [nc1*nbnodes + nd1];
+                     v2  = tab_vertex [nc1*nbnodes + nd2];
+                     ed2 = newEdge (v1, v2);
+                     }
+                  tab_edge [nc1*sizelig + nmur] = ed2;
+                  tab_quad [nc *sizelig + nmur] = newQuad (ed0,
+                            tab_pilier [nc*nbnodes + nd1], ed2,
+                            tab_pilier [nc*nbnodes + nd2]);
+                  ed0 = ed2;
+                  printf (" quad_vertical [%02d] = ", nc*sizelig + nmur);
+                  PrintName (tab_quad [nc *sizelig + nmur]);
+                  printf ("\n");
+                  }
+              }
+           }
+       }
+                   // ------------------- Les faces horizontales
+                   // ------------------- Les hexas
+   // Rappel : sizelig = nbcells*QUAD4 
+   for (int nro=0; nro<nbcells ; nro++)
+       {
+       Quad* qa = q_amont [nro];
+       for (int nc=0 ; nc<nbinter ; nc++)
+           {
+           int  quadv =  nc*nbcells*QUAD4 + nro*QUAD4;
+           Quad* qb = q_aval[nro];
+           if (nc<nbcuts)
+              {
+              int  edh   = (nc+1)*nbcells*QUAD4 + nro*QUAD4;
+              qb = newQuad (tab_edge[edh],   tab_edge[edh+1], 
+                            tab_edge[edh+2], tab_edge[edh+3]);
+              }
+           Quad* qc = tab_quad [quadv];
+           Quad* qd = tab_quad [quadv + 2];
+           Quad* qe = tab_quad [quadv + 1];
+           Quad* qf = tab_quad [quadv + 3];
+           tab_hexa [nc*nbcells + nro] = newHexa (qa, qb, qc, qd, qe, qf);
+           qa = qb;
+           }
+       }
+   return HOK;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexElements.hxx b/src/HEXABLOCK/HexElements.hxx
new file mode 100755 (executable)
index 0000000..1fd0f57
--- /dev/null
@@ -0,0 +1,352 @@
+
+// Class : Gestion des tableaux d'hexaedres
+
+#ifndef __ELEMENTS_H
+#define __ELEMENTS_H
+
+#include "HexEltBase.hxx"
+#include "HexHexa.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Elements : public EltBase 
+{
+public:
+   virtual Hexa*   getHexa   (int nro);
+   virtual Quad*   getQuad   (int nro);
+   virtual Edge*   getEdge   (int nro);
+   virtual Vertex* getVertex (int nro);
+
+   virtual int countHexa   () { return nbr_hexas ; }
+   virtual int countQuad   () { return nbr_quads ; }
+   virtual int countEdge   () { return nbr_edges ; }
+   virtual int countVertex () { return nbr_vertex ; }
+
+   int findHexa   (Hexa*   elt);
+   int findQuad   (Quad*   elt);
+   int findEdge   (Edge*   elt);
+   int findVertex (Vertex* elt);
+
+public:
+   Elements (Document* doc);
+   Elements (Document* doc, int nx, int ny, int nz);
+   Elements (Elements* orig);
+
+   virtual ~Elements () {}
+   virtual void remove ();
+
+   Hexa*   getStrate (int couche, EnumHQuad face);
+
+   Hexa*   getHexaIJK   (int nx, int ny, int nz);
+   Quad*   getQuadIJ    (int nx, int ny, int nz);
+   Quad*   getQuadJK    (int nx, int ny, int nz);
+   Quad*   getQuadIK    (int nx, int ny, int nz);
+   Edge*   getEdgeI     (int nx, int ny, int nz);
+   Edge*   getEdgeJ     (int nx, int ny, int nz);
+   Edge*   getEdgeK     (int nx, int ny, int nz);
+   Vertex* getVertexIJK (int nx, int ny, int nz);
+
+   void   addHexa (Hexa* element);
+   void   addQuad (Quad* element);
+   void   addEdge (Edge* element);
+   void   addVertex (Vertex* element);
+   int    transform (Matrix* matrice);
+
+   int saveVtk  (cpchar nomfic); 
+   int saveVtk  (cpchar nomfic, int& nro); 
+
+   int makeCartesianGrid (Vertex* orig, Vector* v1, Vector* v2, Vector* v3, 
+                      int px, int py, int pz, int mx=0, int my=0, int mz=0);
+
+   int makeCylinder (Cylinder* cyl, Vector* base, int nr, int na, int nl);
+   int makePipe     (Cylinder* cyl, Vector* base, int nr, int na, int nl);
+
+   int makeCylindricalGrid (Vertex* c, Vector* b, Vector* h, 
+         double dr, double da, double dl, int nr, int na, int nl, bool fill);
+
+   int makeSphericalGrid (Vertex* v, Vector* dv, int nb, double k=1);
+
+   int  joinQuads (Quads& q0, int nb, Vertex* v1, Vertex* v2, Vertex* v3, 
+                   Vertex* v4, Quad* dest);
+   void coupler  (int nro, Quad* other, StrOrient* orient);
+
+   int  prismQuads (Quads& start, Vector* dv, int nb);
+   int  cutHexas   (const Edges& edges, int nbcuts);
+   int  cutHexas0  (const Edges& edges, int nbcuts);
+
+   void setVertex (Vertex* node, int nx, int ny, int nz);
+
+   void transfoVertices (Vertex* orig, Vector* vi, Vector* vj, Vector* vk);
+
+   void setVertex (Vertex* node, int nro);
+   void setEdge   (Edge*   edge, int nro);
+   void setQuad   (Quad*   quad, int nro);
+   void setHexa   (Hexa*   cell, int nro);
+
+   int nroVertex (int nsommet,  int nquad, int nh);
+
+protected :
+   int   fillGrid ();
+
+   void  fillCenter    ();
+   void  fillCenter4   ();
+   void  fillCenter6   ();
+   void  fillCenterOdd ();
+
+   int  pushHexas (int nro, Quad* sol, double dx, double dy, double dz, 
+                   int hauteur, Quad* toit=NULL, int* decal=NULL);
+
+   void setVertex (int nx, int ny, int nz, double px, double py, double pz);
+   void setEdge   (Edge*   edge, EnumCoord dir, int nx, int ny, int nz);
+   void setQuad   (Quad*   quad, EnumCoord dir, int nx, int ny, int nz);
+   void setHexa   (Hexa*   cell, int nx, int ny, int nz);
+
+   Edge* newEdge (Vertex* v1, Vertex* v2);
+   Quad* newQuad (Edge* e1, Edge* e2, Edge* e3, Edge* e4);
+   Hexa* newHexa (Quad* e1, Quad* e2, Quad* e3, Quad* e4, Quad* e5, Quad* e6);
+
+   void resize (EnumGrid type, int nx, int ny=0, int nz=0);
+
+   int makeCartesianNodes (Vertex* orig, Vector* v1, Vector* v2, Vector* v3, 
+                      int px, int py, int pz, int mx=0, int my=0, int mz=0);
+
+   int makeCylindricalNodes (Vertex* c, Vector* b, Vector* h, 
+         double dr, double da, double dl, int nr, int na, int nl, bool fill);
+
+   int makeBasicCylinder (double dr, double da, double dl, int nr, int na, 
+                                                           int nl, bool fill);
+
+   int addStrate (Quad* i_quad[], Edge* i_edge[], Vertex* i_node[], 
+                  Vertex* center,  double lambda);
+
+   int indVertex (int nsommet,  int nquad, int nh);
+   int indVertex (int ref_vert, int nh);
+   int nroEdgeH  (int nvertex);
+   int nroEdgeH  (int nsommet,  int nquad, int nh);
+   int nroHexa   (int nquad, int nh);
+
+   void copyVertex (Elements* other, int px, int py, int pz,  
+                                     int nx, int ny, int nz);
+   void completerGrille  (double hauteur);
+
+protected :
+    Globale* glob;
+    EnumGrid grid_type;
+
+    std::vector<Hexa*>   tab_hexa;
+    std::vector<Quad*>   tab_quad;
+    std::vector<Edge*>   tab_edge;
+    std::vector<Edge*>   tab_pilier;
+    std::vector<Vertex*> tab_vertex;
+
+    std::vector<Quad*>   tab_orig;
+
+    int size_hx, size_hy, size_hz, size_hplus;
+    int size_qx, size_qy, size_qz, size_qplus;
+    int size_ex, size_ey, size_ez, size_eplus;
+    int size_vx, size_vy, size_vz, size_vplus;
+
+    int nbr_hexas, nbr_quads, nbr_edges, nbr_vertex;
+    int nbr_orig, nbr_piliers, ker_vertex;
+
+    int   gr_rayon;              // Spheric
+    int   gr_hauteur;            // Joint
+    int   nbr_secteurs;          // Cyl
+
+    bool     cyl_closed;         // Cyl
+    bool     cyl_fill;           // Cyl
+    EnumCyl  cyl_dispo;          // Cyl
+};
+// =================================================== getStrate
+inline Hexa* Elements::getStrate (int couche, EnumHQuad nroface)
+{ 
+   Hexa* cell = NULL;
+   int   nro  = couche <= 0 ? 0 : (couche-1)*HQ_MAXI + nroface + 1;
+
+   if (nbr_hexas==0 || nro >= nbr_hexas)
+      cell = NULL;
+   else
+      cell = tab_hexa [nro]; 
+
+   return cell; 
+}
+// ============================================================  setHexa
+inline void Elements::setHexa (Hexa* elt, int nro) 
+{
+   if (nro >=0 && nro < nbr_hexas)
+       tab_hexa [nro] = elt;
+}
+// ============================================================  setQuad
+inline void Elements::setQuad (Quad* elt, int nro) 
+{
+   if (nro >=0 && nro < nbr_quads)
+       tab_quad [nro] = elt;
+}
+// ============================================================  setEdge
+inline void Elements::setEdge (Edge* elt, int nro)
+{
+   if (nro >=0 && nro < nbr_edges)
+       tab_edge [nro] = elt;
+}
+// ============================================================  setVertex
+inline void Elements::setVertex (Vertex* elt, int nro)
+{
+   if (nro >=0 && nro < nbr_vertex)
+       tab_vertex [nro] = elt;
+}
+// -----------------------------------------------------------------------
+// -----------------------------------------------------------------------
+// ============================================================  getHexa
+inline Hexa* Elements::getHexa (int nro) 
+{
+   Hexa* elt = NULL;
+   int  nombre=tab_hexa.size();
+   // if (nro >=0 && nro < nbr_hexas && el_status == HOK Abu 2010/05/06
+   if (nro >=0 && nro < nombre && el_status == HOK 
+               && tab_hexa [nro] != NULL && tab_hexa [nro]->isValid())
+      elt = tab_hexa [nro]; 
+
+   return elt;
+}
+// ============================================================  getQuad
+inline Quad* Elements::getQuad (int nro) 
+{
+   Quad* elt = NULL;
+   if (nro >=0 && nro < nbr_quads && el_status == HOK 
+               && tab_quad [nro] != NULL && tab_quad [nro]->isValid())
+      elt = tab_quad [nro]; 
+
+   return elt;
+}
+// ============================================================  getEdge
+inline Edge* Elements::getEdge (int nro)
+{
+   Edge* elt = NULL;
+   if (nro >=0 && nro < nbr_edges && el_status == HOK 
+               && tab_edge [nro] != NULL && tab_edge [nro]->isValid())
+      elt = tab_edge [nro]; 
+
+   return elt;
+}
+// ============================================================  getVertex
+inline Vertex* Elements::getVertex (int nro)
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro <  nbr_vertex && el_status == HOK 
+               && tab_vertex [nro] != NULL && tab_vertex [nro]->isValid())
+      elt = tab_vertex [nro]; 
+
+   return elt;
+}
+// ============================================================  indVertex
+inline int Elements::indVertex (int nquad, int nsommet, int nh)
+{
+   int nro = nsommet  + QUAD4*nquad + nbr_orig*QUAD4*(nh+1);
+   return nro;
+}
+// ============================================================  nroVertex
+inline int Elements::nroVertex (int nquad, int nsommet, int nh)
+{
+   int nro = nsommet  + QUAD4*nquad + nbr_orig*QUAD4*nh;
+   return nro;
+}
+// ============================================================  indVertex
+inline int Elements::indVertex (int ref_edge, int nh)
+{
+   int    nro = ref_edge + nbr_orig*QUAD4*nh;
+   return nro;
+}
+// ============================================================  nroEdgeH
+inline int Elements::nroEdgeH (int nvertex)
+{
+   return QUAD4*nbr_orig*gr_hauteur + nvertex;
+}
+// ============================================================  nroEdgeH
+inline int Elements::nroEdgeH (int nquad, int nsommet, int nh)
+{
+   return QUAD4*nbr_orig*gr_hauteur + indVertex (nquad, nsommet, nh);
+}
+// ============================================================  nroHexa
+inline int Elements::nroHexa (int nquad, int nh)
+{
+   int nro = gr_hauteur*nquad + nh;
+   return nro;
+}
+
+// ============================================================  addHexa
+inline void Elements::addHexa (Hexa* element)
+{
+   tab_hexa.push_back (element);
+   nbr_hexas ++;
+}
+// ============================================================  addQuad
+inline void Elements::addQuad (Quad* element)
+{
+   tab_quad.push_back (element);
+   nbr_quads ++;
+}
+// ============================================================  addEdge
+inline void Elements::addEdge (Edge* element)
+{
+   tab_edge.push_back (element);
+   nbr_edges ++;
+}
+// ============================================================  addVertex
+inline void Elements::addVertex (Vertex* element)
+{
+   tab_vertex.push_back (element);
+   nbr_vertex ++;
+}
+// ============================================================  findHexa
+inline int Elements::findHexa (Hexa* element)
+{
+   int nbre = tab_hexa.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_hexa [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ============================================================  findQuad
+inline int Elements::findQuad (Quad* element)
+{
+   int nbre = tab_quad.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_quad [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ============================================================  findEdge
+inline int Elements::findEdge (Edge* element)
+{
+   int nbre = tab_edge.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_edge [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ============================================================  findVertex
+inline int Elements::findVertex (Vertex* element)
+{
+   int nbre = tab_vertex.size();
+   for (int nro=0 ; nro<nbre ; nro++)
+       if (tab_vertex [nro] == element)
+          return nro;
+   return NOTHING;
+}
+// ========================================================= saveVtk (avec nro)
+inline int Elements::saveVtk  (cpchar radical, int &nro)
+{
+   char num[8];
+   sprintf (num, "%d", nro);
+   nro ++;
+
+   string filename = radical;
+   filename += num;
+   filename += ".vtk";
+   int ier = saveVtk (filename.c_str());
+   return ier;
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexElements_bis.cxx b/src/HEXABLOCK/HexElements_bis.cxx
new file mode 100755 (executable)
index 0000000..fd30415
--- /dev/null
@@ -0,0 +1,392 @@
+
+// C++ : Table d'hexaedres
+
+#include "HexElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexCylinder.hxx"
+
+#include <map>
+
+static bool db=false;
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== getHexaIJK
+Hexa* Elements::getHexaIJK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_hx ||  ny<0 || ny>=size_hy || nz<0 || nz>=size_hz)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_hx*ny + size_hx*size_hy*nz; 
+
+   return tab_hexa [nro]; 
+}
+// ====================================================== getQuadIJ
+Quad* Elements::getQuadIJ (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_qx ||  ny<0 || ny>=size_qy || nz<0 || nz>=size_qz)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_qx*ny + size_qx*size_qy*nz 
+                + size_qx*size_qy*size_qz*dir_z;
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadJK
+Quad* Elements::getQuadJK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_qx ||  ny<0 || ny>=size_qy || nz<0 || nz>=size_qz)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_qx*ny + size_qx*size_qy*nz; // + dir_x*...
+
+   return tab_quad [nro]; 
+}
+// ====================================================== getQuadIK
+Quad* Elements::getQuadIK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_qx ||  ny<0 || ny>=size_qy || nz<0 || nz>=size_qz)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_qx*ny + size_qx*size_qy*nz + size_qx*size_qy*size_qz;
+
+   return tab_quad [nro]; 
+}
+// ====================================================== getEdgeI
+Edge* Elements::getEdgeI (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz;
+
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeJ
+Edge* Elements::getEdgeJ (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz + size_ex*size_ey*size_ez;
+
+   return tab_edge [nro]; 
+}
+// ====================================================== getEdgeK
+Edge* Elements::getEdgeK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz 
+                + size_ex*size_ey*size_ez*dir_z;
+   return tab_edge [nro]; 
+}
+// ====================================================== getVertexIJK
+Vertex* Elements::getVertexIJK (int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_vx ||  ny<0 || ny>=size_vy || nz<0 || nz>=size_vz)
+      return NULL;
+   else if (grid_type != GR_CARTESIAN && grid_type != GR_CYLINDRIC)
+      return NULL;
+
+   int nro = nx + size_vx*ny + size_vx*size_vy*nz; 
+
+   return tab_vertex [nro]; 
+}
+// ====================================================== setVertex
+void Elements::setVertex (Vertex* elt, int nx, int ny, int nz)
+{
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz) return; 
+
+   int nro = nx + size_vx*ny + size_vx*size_vy*nz;
+   tab_vertex [nro] = elt;
+}
+// ====================================================== setVertex (2)
+void Elements::setVertex (int nx, int ny, int nz, double px, double py, 
+                                                  double pz)
+{
+   if (   nx < 0 || nx >= size_vx || ny < 0 || ny >= size_vy 
+       || nz < 0 || nz >= size_vz) return; 
+
+   Vertex*    node = el_root->addVertex (px, py, pz);
+   setVertex (node, nx, ny, nz);
+}
+// ====================================================== setEdge
+void Elements::setEdge (Edge* elt, EnumCoord dir, int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez
+            || dir < dir_x || dir > dir_z )
+      return;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz + size_ex*size_ey*size_ez*dir;
+   tab_edge [nro] = elt; 
+}
+// ====================================================== setQuad
+void Elements::setQuad (Quad* elt, EnumCoord dir, int nx, int ny, int nz)
+{
+   if (nx<0 || nx>=size_ex ||  ny<0 || ny>=size_ey || nz<0 || nz>=size_ez
+            || dir < dir_x || dir > dir_z )
+      return;
+
+   int nro = nx + size_ex*ny + size_ex*size_ey*nz + size_ex*size_ey*size_ez*dir;
+   tab_quad [nro] = elt; 
+}
+// ====================================================== setHexa
+void Elements::setHexa (Hexa* elt, int nx, int ny, int nz)
+{
+   if (   nx < 0 || nx >= size_hx || ny < 0 || ny >= size_hy 
+       || nz < 0 || nz >= size_hz) return; 
+
+   int nro = nx + size_hx*ny + size_hx*size_hy*nz;
+   tab_hexa [nro] = elt;
+}
+// ====================================================== remove
+void Elements::remove ()
+{
+   int nbre=tab_hexa.size ();
+   nbre = nbr_hexas;
+   for (int nh=0 ; nh<nbre ; nh++)
+       if (tab_hexa[nh] != NULL)
+           tab_hexa[nh]->remove();
+}
+// ====================================================== prismQuads
+int Elements::prismQuads (Quads& tstart, Vector* dir, int hauteur)
+{
+   el_root->markAll (NO_USED);
+   int nbcells   = tstart.size ();
+   nbr_vertex    = 0;
+   nbr_edges     = 0;
+
+   nbr_hexas = nbcells*hauteur;
+
+   tab_hexa.resize (nbr_hexas);
+   tab_quad.clear ();          // verticaux
+   tab_edge.clear ();
+   tab_pilier.clear ();
+   tab_vertex.clear ();
+
+   for (int nro=0 ; nro<nbcells ; nro++)
+       {
+       pushHexas (nro, tstart[nro], dir->getDx(), dir->getDy(), dir->getDz(), 
+                  hauteur);
+       }
+   return HOK;
+}
+// ====================================================== pushHexas
+int  Elements::pushHexas (int nro, Quad* qbase, double dx, double dy, 
+                          double dz, int hauteur, Quad* toit, int tcorr[])
+{
+   int ind_node [QUAD4];
+
+           // ----------------------------- Vertex + aretes verticales
+   for (int ns=0 ; ns<QUAD4 ; ns++)
+       {
+       Vertex* vbase = qbase ->getVertex (ns);
+       int     indx  = vbase->getMark ();
+       if (indx<0)
+          {
+          indx = nbr_vertex++;
+          vbase->setMark (indx);
+          Vertex* nd0 = vbase;
+          Vertex* nd1 = NULL;
+          for (int nh=0 ; nh<hauteur ; nh++)
+              {
+              nd1 = el_root->addVertex (nd0->getX() + dx, nd0->getY() + dy,
+                                        nd0->getZ() + dz);
+              tab_vertex.push_back (nd1);
+              tab_pilier.push_back (newEdge (nd0, nd1));
+              nd0 = nd1;
+              }
+          }
+       ind_node [ns] = indx;
+       }
+           // ----------------------------- Aretes horizontales
+           // ----------------------------- + face verticales
+   int ind_poutre [QUAD4];
+   for (int ns=0 ; ns<QUAD4 ; ns++)
+       {
+       Edge* ebase = qbase ->getEdge (ns);
+       int   indx  = ebase->getMark ();
+       if (indx<0)
+          {
+          indx = nbr_edges ++;
+          ebase->setMark (indx);
+          int   nd1 = ind_node [ns];
+          int   nd2 = ind_node [(ns+1) MODULO QUAD4];
+          Edge* ed0 = ebase;
+          Edge *ed1, *ed2, *ed3;
+          for (int nh=0 ; nh<hauteur ; nh++)
+              {
+              ed2 = ed0;
+              ed0 = newEdge (tab_vertex [nd1*hauteur + nh], 
+                             tab_vertex [nd2*hauteur + nh]);
+              ed1 = tab_pilier [nd1*hauteur + nh];
+              ed3 = tab_pilier [nd2*hauteur + nh];
+
+              Quad* mur = newQuad (ed0, ed1, ed2, ed3);
+              tab_edge.push_back (ed0);
+              tab_quad.push_back (mur);
+              }
+          }
+       ind_poutre [ns] = indx;
+       }
+           // ----------------------------- Faces horizontales
+           // ----------------------------- + Hexas
+   Quad* qa = qbase;
+   Quad *qb, *qc, *qd, *qe, *qf;
+   int nv0 = hauteur*ind_poutre [0];
+   int nv1 = hauteur*ind_poutre [1];
+   int nv2 = hauteur*ind_poutre [2];
+   int nv3 = hauteur*ind_poutre [3];
+   for (int nh=0 ; nh<hauteur ; nh++)
+       {
+       qb = newQuad (tab_edge [nh+nv0], tab_edge [nh+nv1], 
+                     tab_edge [nh+nv2], tab_edge [nh+nv3]);
+       qc = tab_quad [nh + nv0];
+       qd = tab_quad [nh + nv2];
+       qe = tab_quad [nh + nv1];
+       qf = tab_quad [nh + nv3];
+
+// *** tab_hexa [nh*hauteur + nro] = newHexa (qa, qb, qc, qd, qe, qf); Abu 
+       tab_hexa [nro*hauteur + nh] = newHexa (qa, qb, qc, qd, qe, qf);
+       qa = qb;
+       }
+   return HOK;
+}
+// ====================================================== cutHexas
+int Elements::cutHexas0 (const Edges& t_edges, int nbcuts)
+{
+                                       // 1) marquage des hexas
+   el_root->markAll (NO_USED);
+                                       // 2) Memo noeuds
+   vector <Quad*> q_amont;
+   vector <Quad*> q_aval;
+
+   int nbnodes = t_edges.size();
+   vector <Vertex*> v_amont (nbnodes);
+   vector <Vertex*> v_aval  (nbnodes);
+
+   std::map <Vertex*, Vertex*> vertex_aval;
+
+   for (int nro=0; nro<nbnodes ; nro++)
+       {
+       Edge*   arete = t_edges [nro];
+       Vertex* amont = arete->getAmont ();
+       v_amont [nro] = amont;
+       vertex_aval [amont] = arete->getAval  ();
+       int nbcells   = arete->getNbrParents ();
+
+       for (int nq=0 ; nq<nbcells ; nq++)
+           {
+           Quad* quad = arete->getParent (nq);
+           if (quad->getMark () != IS_USED)
+              {
+              quad->setMark (IS_USED);
+              int nbcubes = quad->getNbrParents ();
+              for (int nh=0 ; nh<nbcubes ; nh++)
+                  {
+                  Hexa* hexa = quad->getParent (nh);
+                  if (hexa->getMark () != IS_USED)  
+                     {
+                     hexa->setMark (IS_USED);
+                     int namont = hexa->getBase (v_amont[nro], arete);
+                     int naval  = glob->getOpposedQuad (namont);
+                     q_amont.push_back (hexa->getQuad  (namont));
+                     q_aval .push_back (hexa->getQuad  (naval ));
+                     if (db)
+                        {
+                        printf (" Quad = ");
+                        hexa->printName (", ");
+                        printf (" Faces = (");
+                        hexa->getQuad (namont)->printName (", ");
+                        hexa->getQuad (naval )->printName (")\n");
+                        }
+                     }
+                  }
+              }
+           }
+       }
+                   // ------------------- Dimensionnement
+   int hauteur = nbcuts + 1;
+   int nbcells = q_amont.size ();
+   nbr_hexas   = nbcells * hauteur;
+
+   tab_hexa.resize   (nbr_hexas);
+   tab_quad.clear ();          // verticaux
+   tab_edge.clear ();
+   tab_pilier.clear ();
+   tab_vertex.clear ();
+
+   for (int ned=0; ned<nbnodes ; ned++)
+       t_edges [ned]->remove ();
+
+
+   for (int nro=0; nro<nbcells ; nro++)
+       {
+       int tcorr [QUAD4];
+       Quad* sol  = q_amont[nro];
+       Quad* toit = q_aval [nro];
+
+       for (int nv=0; nv<QUAD4 ; nv++)
+           {
+           Vertex* dest = vertex_aval [sol->getVertex(nv)];
+           tcorr [nv] = toit->indexVertex (dest);
+           }
+
+       pushHexas (nro, sol, 0,0,0, hauteur, toit, tcorr);
+       }
+   return HOK;
+}
+// ====================================================== makeCylinder
+int Elements::makeCylinder (Cylinder* cyl, Vector* vx, int nr, int na, int nl)
+{
+   Vertex* orig = cyl->getBase ();
+   Vector* dir  = cyl->getDirection ();
+   double  ray  = cyl->getRadius ();
+   double  haut = cyl->getHeight ();
+   
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = true;
+   makeCylindricalNodes (orig, vx, dir, ray, 360, haut, nr, na, nl, true);
+   fillGrid ();
+   return HOK;
+}
+// ====================================================== makePipe
+int Elements::makePipe (Cylinder* cyl, Vector* vx, int nr, int na, int nl)
+{
+   Vertex* orig = cyl->getBase ();
+   Vector* dir  = cyl->getDirection ();
+   double  ray  = cyl->getRadius ();
+   double  haut = cyl->getHeight ();
+   
+   resize (GR_CYLINDRIC, nr, na, nl);
+   cyl_closed = true;
+   makeCylindricalNodes (orig, vx, dir, ray, 360, haut, nr, na, nl, false);
+   fillGrid ();
+   return HOK;
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexElements_grid.cxx b/src/HEXABLOCK/HexElements_grid.cxx
new file mode 100755 (executable)
index 0000000..b25145e
--- /dev/null
@@ -0,0 +1,462 @@
+
+// C++ : Table des noeuds
+
+#include "HexElements.hxx"
+
+#include "HexDocument.hxx"
+#include "HexVector.hxx"
+#include "HexVertex.hxx"
+#include "HexHexa.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+// ====================================================== makeBasicCylinder
+int Elements::makeBasicCylinder (double dr, double da, double dl, int nr, 
+                                 int na, int nl, bool fill)
+{
+   cyl_dispo = CYL_NOFILL;
+   if (fill && na > 3)
+      {
+      if (cyl_closed)
+         {
+         if (na==4)
+            cyl_dispo = CYL_CL4;
+        else if (na==6)
+            cyl_dispo = CYL_CL6;
+        else if (na MODULO 2 == 0)
+            cyl_dispo = CYL_CLOSED;
+         }
+      else if ((na MODULO 2)==0)
+         cyl_dispo = CYL_PEER;
+      else 
+         cyl_dispo = CYL_ODD;
+      }
+
+   cyl_fill = cyl_dispo != CYL_NOFILL;
+
+   double alpha  = M_PI*da/180;
+   double beta   = alpha / na;
+   double theta  = 0;
+   int    nb_secteurs = cyl_closed ? size_vy-1 : size_vy;
+
+   for (int ny=0 ; ny<nb_secteurs ; ny++)
+       {
+       double cos_theta = cos (theta);
+       double sin_theta = sin (theta);
+       theta += beta;
+
+       for (int nx=0 ; nx<size_vx ; nx++)
+           {
+           double rayon = dr*(nx+1);
+           double px = rayon*cos_theta;
+           double py = rayon*sin_theta;
+
+           for (int nz=0 ; nz<size_vz ; nz++)
+               {
+               double pz = dl*nz;
+               Vertex* node = el_root->addVertex (px, py, pz);
+               setVertex (node, nx, ny, nz);
+               }
+           }
+       }
+
+   if (cyl_closed) 
+      {
+      for (int nx=0 ; nx<size_vx ; nx++)
+          for (int nz=0 ; nz<size_vz ; nz++)
+              {
+              Vertex* node = getVertexIJK (nx, 0, nz);
+              setVertex (node, nx, size_vy-1, nz);
+              }
+      }
+
+                      // Les vertex centraux
+   if (cyl_fill) 
+      {
+      ker_vertex = nbr_vertex;
+      for (int nz=0 ; nz<size_vz ; nz++)
+          {
+          Vertex* node = el_root->addVertex (0, 0, nz*dl);
+          tab_vertex.push_back (node);
+          nbr_vertex ++;
+          }
+      }
+
+   return HOK;
+}
+// ====================================================== fillGrid
+int Elements::fillGrid ()
+{
+   if (cyl_closed)
+      for (int nx=0 ; nx<size_vx ; nx++)
+           for (int nz=0 ; nz<size_vz ; nz++)
+               setVertex (getVertexIJK (nx, 0, nz), nx, size_vy-1, nz);
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       for (int ny=0 ; ny<size_vy ; ny++)
+           for (int nx=0 ; nx<size_vx ; nx++)
+               {
+               Vertex* v0 = getVertexIJK (nx, ny, nz  );
+               Vertex* vx = getVertexIJK (nx+1, ny, nz);
+               Vertex* vy = getVertexIJK (nx, ny+1, nz);
+               Vertex* vz = getVertexIJK (nx, ny, nz+1);
+
+               Edge* e1 = NULL;
+               Edge* e2 = newEdge (v0, vy);
+               Edge* e3 = NULL;
+
+               if (cyl_closed && ny==size_vy-1)
+                  {
+                  e1 = getEdgeI (nx, 0, nz);
+                  e3 = getEdgeK (nx, 0, nz);
+                  }
+               else
+                  {
+                  e3 = newEdge (v0, vz);
+                  e1 = newEdge (v0, vx);
+                  }
+
+               setEdge (e1, dir_x, nx, ny, nz);
+               setEdge (e2, dir_y, nx, ny, nz);
+               setEdge (e3, dir_z, nx, ny, nz);
+               }
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       for (int ny=0 ; ny<size_vy ; ny++)
+           for (int nx=0 ; nx<size_vx ; nx++)
+               {
+               Edge* eae = getEdgeI (nx, ny,   nz);
+               Edge* ebe = getEdgeI (nx, ny,   nz+1);
+               Edge* eaf = getEdgeI (nx, ny+1, nz);
+
+               Edge* eac = getEdgeJ (nx,   ny, nz);
+               Edge* ead = getEdgeJ (nx+1, ny, nz);
+               Edge* ebc = getEdgeJ (nx,   ny, nz+1);
+
+               Edge* ece = getEdgeK (nx,   ny,   nz);
+               Edge* ede = getEdgeK (nx+1, ny,   nz);
+               Edge* ecf = getEdgeK (nx,   ny+1, nz);
+               
+               Quad* q1 = newQuad (eac, eaf, ead, eae);
+               Quad* q2 = newQuad (eac, ecf, ebc, ece);
+               Quad* q3 = NULL;
+               Quad* q30 = getQuadIK (nx, 0 ,nz);
+
+               if (cyl_closed && ny==size_vy-1 && q30!= NULL)
+                  {
+                  q3 = q30;
+                  // Display(q3);
+                  }
+               else
+                  {
+                  q3 = newQuad (eae, ede, ebe, ece);
+                  }
+
+               setQuad (q1, dir_z, nx,ny,nz);
+               setQuad (q2, dir_x, nx,ny,nz);
+               setQuad (q3, dir_y, nx,ny,nz);
+               }
+
+   for (int nz=0 ; nz<size_hz ; nz++)
+       for (int ny=0 ; ny<size_hy ; ny++)
+           for (int nx=0 ; nx<size_hx ; nx++)
+               {
+               Quad* qa = getQuadIJ (nx, ny, nz);
+               Quad* qb = getQuadIJ (nx, ny, nz+1);
+
+               Quad* qc = getQuadIK (nx, ny,   nz);
+               Quad* qd = getQuadIK (nx, ny+1, nz);
+
+               Quad* qe = getQuadJK (nx,   ny, nz);
+               Quad* qf = getQuadJK (nx+1, ny, nz);
+
+               setHexa (newHexa (qa, qb, qc, qd, qe, qf), nx, ny, nz);
+               }
+
+   switch (cyl_dispo)
+      {
+      case CYL_CLOSED :
+      case CYL_PEER   :  fillCenter ();
+           break ; 
+      case CYL_CL4 :     fillCenter4 ();
+           break ; 
+      case CYL_CL6 :     fillCenter6 ();
+           break ; 
+      case CYL_ODD :     fillCenterOdd ();
+           break ; 
+      case CYL_NOFILL  :
+      default : ;
+      }
+
+   return HOK;
+}
+// ====================================================== fillCenter
+// === Remplissage radial
+#define IndElt(nc,nz) (nbrayons*(nz) + nc)
+void Elements::fillCenter ()
+{
+   int nx0 = 0;
+   int nbsecteurs = size_hy / 2;
+   int nbrayons   = cyl_closed ? nbsecteurs : nbsecteurs + 1;
+
+   vector <Edge*> ker_edge  (nbrayons*size_vz);
+   vector <Quad*> ker_hquad (nbrayons*size_vz);
+   vector <Quad*> ker_vquad (nbrayons*size_vz);
+
+   Vertex* pcenter = NULL;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Vertex central
+       Vertex* center = getVertex (ker_vertex+nz);
+                                 //   Edges horizontaux radiaux
+       for (int nc=0 ; nc<nbrayons ; nc++)
+           {
+           Vertex* vv = getVertexIJK (nx0, 2*nc, nz);
+           Edge*   edge = newEdge (center, vv);
+           ker_edge [IndElt(nc,nz)] = edge;
+           }
+                                 //   Quads horizontaux
+       for (int nc=0; nc<nbsecteurs ; nc++)
+           {
+           int nc1  = (nc + 1) MODULO nbrayons;
+           Edge* e1 = ker_edge [IndElt (nc, nz)];
+           Edge* e2 = getEdgeJ (nx0, 2*nc,  nz);
+           Edge* e3 = getEdgeJ (nx0, 2*nc+1,nz);
+           Edge* e4 = ker_edge [IndElt (nc1, nz)];
+
+           ker_hquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, e4);
+           if (debug()) 
+              {
+             printf ("hquad (%d,%d) = ", nc, nz);
+              ker_hquad [IndElt (nc,nz)]->dumpPlus();
+              }
+           }
+
+       if (nz>0)
+          {
+                                 //   Edges verticaux + cloisons interieures
+          Edge*   pilier = newEdge (pcenter, center);
+
+          for (int nc=0 ; nc<nbrayons ; nc++)
+              {
+              Edge* e1 = ker_edge [IndElt (nc, nz)];
+              Edge* e2 = getEdgeK (nx0, 2*nc,  nz-1);
+              Edge* e3 = ker_edge [IndElt (nc, nz-1)];
+              ker_vquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, pilier);
+              if (debug()) 
+                 {
+                printf ("vquad (%d,%d) = ", nc, nz);
+                 ker_vquad [IndElt (nc,nz)]->dumpPlus();
+                 }
+              }
+                                 //   Hexas
+          for (int nc=0 ; nc < nbsecteurs ; nc++)
+              {
+              int nc1  = nc + 1;
+              if (cyl_closed) 
+                  nc1  = nc1 MODULO nbsecteurs;
+              Quad* qa = ker_hquad [IndElt (nc, nz-1)];
+              Quad* qb = ker_hquad [IndElt (nc, nz)];
+
+              Quad* qc = ker_vquad [IndElt (nc, nz)];
+              Quad* qd = getQuadJK (nx0, 2*nc+1, nz-1);
+
+              Quad* qe = getQuadJK (nx0, 2*nc,   nz-1);
+              Quad* qf = ker_vquad [IndElt (nc1,  nz)];
+
+              if (debug()) 
+                 {
+                 printf (" --------------- Hexa : nc=%d, nz=%d\n", nc, nz);
+                HexDump (qa);
+                HexDump (qb);
+                HexDump (qc);
+                HexDump (qd);
+                HexDump (qe);
+                HexDump (qf);
+                 }
+              Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+              tab_hexa.push_back (cell);
+              }
+          }
+       pcenter = center;
+       }
+}
+// ====================================================== fillCenter4
+// === Remplissage radial
+void Elements::fillCenter4 ()
+{
+   int   nx0  = 0;
+   Quad* sol = NULL;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Quad horizontal
+
+       Quad* plafond = newQuad (getEdgeJ (nx0, 0,  nz), getEdgeJ (nx0, 1, nz), 
+                                getEdgeJ (nx0, 2,  nz), getEdgeJ (nx0, 3, nz));
+
+       if (nz>0)
+          {
+          Quad* qc = getQuadJK (nx0, 0, nz-1);
+          Quad* qd = getQuadJK (nx0, 2, nz-1);
+          Quad* qe = getQuadJK (nx0, 1, nz-1);
+          Quad* qf = getQuadJK (nx0, 3, nz-1);
+
+          if (debug()) 
+             {
+             printf (" --------------- Hexa grille4 : nz=%d\n", nz);
+            HexDump (plafond);
+            HexDump (sol);
+            HexDump (qc);
+            HexDump (qd);
+            HexDump (qe);
+            HexDump (qf);
+             }
+          Hexa* cell = newHexa (plafond, sol, qc, qd, qe, qf);
+          tab_hexa.push_back (cell);
+          }
+       sol = plafond;
+       }
+}
+// ====================================================== fillCenter6
+void Elements::fillCenter6 ()
+{
+   int nx0 = 0;
+   int nydemi = size_hy / 2;
+
+   Edge* s_barre = NULL;
+   Quad* sr_quad = NULL;
+   Quad* sl_quad = NULL;
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Edges horizontal radial
+       Edge* p_barre = newEdge (getVertexIJK (nx0, 0,      nz),
+                                getVertexIJK (nx0, nydemi, nz));
+                                 //   Quads horizontaux
+       Edge* e0 = getEdgeJ (nx0, 0,  nz);
+       Edge* e1 = getEdgeJ (nx0, 1,  nz);
+       Edge* e2 = getEdgeJ (nx0, 2,  nz);
+       Edge* e3 = getEdgeJ (nx0, 3,  nz);
+       Edge* e4 = getEdgeJ (nx0, 4,  nz);
+       Edge* e5 = getEdgeJ (nx0, 5,  nz);
+
+       Quad* pl_quad = newQuad (e0, e1, e2, p_barre);
+       Quad* pr_quad = newQuad (e3, e4, e5, p_barre);
+
+       if (nz>0)
+          {
+                                 //   Cloison interieure
+          Quad* cloison = newQuad (p_barre, getEdgeK (nx0, 0,       nz-1), 
+                                   s_barre, getEdgeK (nx0, nydemi,  nz-1));
+                                 //   Hexas
+          Quad* q0 = getQuadJK (nx0, 0, nz-1);
+          Quad* q1 = getQuadJK (nx0, 1, nz-1);
+          Quad* q2 = getQuadJK (nx0, 2, nz-1);
+          Quad* q3 = getQuadJK (nx0, 3, nz-1);
+          Quad* q4 = getQuadJK (nx0, 4, nz-1);
+          Quad* q5 = getQuadJK (nx0, 5, nz-1);
+
+          Hexa* left  = newHexa (sl_quad, pl_quad, q0, q2,  q1, cloison);
+          Hexa* right = newHexa (sr_quad, pr_quad, q3, q5,  q4, cloison);
+          tab_hexa.push_back (left);
+          tab_hexa.push_back (right);
+          }
+       s_barre = p_barre;
+       sr_quad = pr_quad;
+       sl_quad = pl_quad;
+       }
+}
+// ====================================================== fillCenterOdd
+#undef  IndElt
+#define IndElt(nc,nz) (nbsecteurs*(nz) + nc)
+void Elements::fillCenterOdd ()
+{
+   int nx0 = 0;
+   int nbsecteurs = size_hy / 2;
+
+   vector <Edge*> ker_hedge (nbsecteurs*size_vz);
+   vector <Quad*> ker_hquad (nbsecteurs*size_vz);
+   vector <Quad*> ker_vquad (nbsecteurs*size_vz);
+
+   for (int nz=0 ; nz<size_vz ; nz++)
+       {
+                                 //   Edges horizontaux radiaux
+       for (int nc=0 ; nc<nbsecteurs ; nc++)
+           {
+           int nc1 = size_hy - nc;
+           Edge* edge = newEdge (getVertexIJK (nx0, nc,  nz), 
+                                 getVertexIJK (nx0, nc1, nz));
+           ker_hedge [IndElt(nc,nz)] = edge;
+           }
+                                 //   Quads horizontaux
+       for (int nc=0; nc<nbsecteurs ; nc++)
+           {
+           Edge* e1 = ker_hedge [IndElt (nc, nz)];
+           Edge* e2 = getEdgeJ (nx0, nc,           nz);
+           Edge* e4 = getEdgeJ (nx0, size_hy-nc-1, nz);
+
+           Edge* e3 = nc<nbsecteurs-1 ? ker_hedge [IndElt (nc+1, nz)]
+                                      : getEdgeJ (nx0, nbsecteurs, nz);
+
+           ker_hquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, e4);
+           if (debug()) 
+              {
+             printf ("hquad (%d,%d) = ", nc, nz);
+              ker_hquad [IndElt (nc,nz)]->dumpPlus();
+              }
+           }
+
+       if (nz>0)
+          {
+                                 //   Edges verticaux + cloisons interieures
+          for (int nc=0 ; nc<nbsecteurs ; nc++)
+              {
+              int nc1 = size_hy - nc;
+              Edge* e1 = ker_hedge [IndElt (nc, nz)];
+              Edge* e3 = ker_hedge [IndElt (nc, nz-1)];
+              Edge* e2 = getEdgeK (nx0, nc,   nz-1);
+              Edge* e4 = getEdgeK (nx0, nc1,  nz-1);
+              ker_vquad [IndElt (nc,nz)] = newQuad (e1, e2, e3, e4);
+              if (debug()) 
+                 {
+                printf ("vquad (%d,%d) = ", nc, nz);
+                 ker_vquad [IndElt (nc,nz)]->dumpPlus();
+                 }
+              }
+                                 //   Hexas
+          for (int nc=0 ; nc < nbsecteurs ; nc++)
+              {
+              int nc1 = size_hy - nc-1;
+              Quad* qa = ker_hquad [IndElt (nc, nz-1)];
+              Quad* qb = ker_hquad [IndElt (nc, nz)];
+
+              Quad* qc = getQuadJK (nx0, nc,  nz-1);
+              Quad* qd = getQuadJK (nx0, nc1, nz-1);
+
+              Quad* qe = ker_vquad [IndElt (nc, nz)];
+              Quad* qf = nc<nbsecteurs-1 ? ker_vquad [IndElt (nc+1,  nz)]
+                                         : getQuadJK (nx0, nbsecteurs, nz-1);
+              if (debug()) 
+                 {
+                 printf (" --------------- Hexa : nc=%d, nz=%d\n", nc, nz);
+                HexDump (qa);
+                HexDump (qb);
+                HexDump (qc);
+                HexDump (qd);
+                HexDump (qe);
+                HexDump (qf);
+                 }
+              Hexa* cell = newHexa (qa, qb, qc, qd, qe, qf);
+              tab_hexa.push_back (cell);
+              }
+          }
+       }
+}
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexEltBase.cxx b/src/HEXABLOCK/HexEltBase.cxx
new file mode 100755 (executable)
index 0000000..c5aa79e
--- /dev/null
@@ -0,0 +1,70 @@
+
+// C++ : Gestion des noeuds
+
+#include "HexEltBase.hxx"
+#include "HexDocument.hxx"
+
+BEGIN_NAMESPACE_HEXA
+// =================================================== Constructeur
+EltBase::EltBase (Document* doc, EnumElt type)
+{
+   el_root   = doc;
+   el_type   = type;
+   el_id     = el_root->doc_nbr_elt [type];
+
+   el_next   = NULL;
+   el_assoc  = NULL;
+   el_status = HOK;
+   el_mark   = 0;
+
+   el_root->doc_nbr_elt  [type] ++;
+   el_root->doc_last_elt [type] -> el_next = this;
+   el_root->doc_last_elt [type] = this;
+   el_root->setDeprecated (1);
+}
+// =================================================== Destructeur
+EltBase::~EltBase ()
+{
+   //  printf (" delete ");
+   //  dump ();
+}
+// =================================================== Constructeur Bis
+// Utilise uniquement dans le constructeur de Document
+// Creation d'un premier element fictif pour accelerer les chainages
+EltBase::EltBase (EnumElt type)
+{
+   el_root   = NULL;
+   el_type   = type;
+   el_id     = -1;
+
+   el_next   = NULL;
+   el_status = HOK;
+   el_mark   = 0;
+}
+// =================================================== remove
+void EltBase::remove ()
+{
+   if (el_type == EL_REMOVED)
+      return;
+
+   el_root->setDeprecated (2);
+   el_type = EL_REMOVED;
+   int nbp = el_parent.size();
+   for (int nro=0 ; nro<nbp ; nro++)
+       {
+       EltBase* elt = el_parent[nro];
+       if (elt != NULL && elt->isHere())
+          elt->remove ();
+       }          
+}
+// =================================================== suppress
+void EltBase::suppress ()
+{
+   if (el_type == EL_REMOVED)
+      return;
+
+   el_root->setDeprecated (2);
+   el_type = EL_REMOVED;
+}
+END_NAMESPACE_HEXA
+
diff --git a/src/HEXABLOCK/HexEltBase.hxx b/src/HEXABLOCK/HexEltBase.hxx
new file mode 100755 (executable)
index 0000000..0869483
--- /dev/null
@@ -0,0 +1,147 @@
+
+// Class : EltBase de base des Vertex/Edge/Quad, etc... 
+
+#ifndef __ELT_BASE_H
+#define __ELT_BASE_H
+
+#include "hexa_base.hxx"
+#include "HexDocument.hxx"
+#include <vector>
+
+#define HexDump(x) {printf(#x " = "); if (x) x->dump(); else printf("NULL\n");}
+#define PrintName(x) if (x) x->printName(); else printf ("NULL, ")
+#define PutName(x) { printf(#x " = "); if (x) x->printName("\n"); else printf("NULL\n"); }
+
+BEGIN_NAMESPACE_HEXA
+
+class EltBase 
+{
+public :
+   virtual Hexa*   getHexa   (int nro)  { return NULL; }
+   virtual Quad*   getQuad   (int nro)  { return NULL; }
+   virtual Edge*   getEdge   (int nro)  { return NULL; }
+   virtual Vertex* getVertex (int nro)  { return NULL; }
+
+   virtual int     countHexa   ()  { return 0; }
+   virtual int     countQuad   ()  { return 0; }
+   virtual int     countEdge   ()  { return 0; }
+   virtual int     countVertex ()  { return 0; }
+
+   virtual int     getError    ()  { return el_status; }
+   virtual bool    isValid     ()  { return el_status==HOK; }
+
+   virtual void    setAssociation (Shape* forme)  { el_assoc = forme ; }
+   virtual void    removeAssociation ()           { el_assoc = NULL  ; }
+   virtual Shape*  getAssociation ()              { return el_assoc  ; }
+
+public :
+   // virtual void replaceHexa   (Hexa* old, Hexa* nouveau) {}
+   // virtual void replaceQuad   (Quad* old, Quad* nouveau) {}
+   virtual void replaceEdge   (Edge* old, Edge* nouveau) 
+                               { printf ("rep-edge\n") ; }
+   virtual void replaceVertex (Vertex* old, Vertex* nouveau) 
+                               { printf ("rep-vertex\n") ; }
+
+   EltBase (Document* doc, EnumElt type=EL_NONE);
+   EltBase (EnumElt type=EL_NONE);
+
+   virtual ~EltBase ();
+   virtual  void remove ();
+   virtual  void suppress ();
+   virtual  void dump ();
+   virtual  void saveXml (XmlWriter& xml)   {}
+   virtual  void majReferences () { }
+
+   EltBase*  next ()                        { return el_next; }
+   void      setNext (EltBase* suivant)     { el_next = suivant; }
+   int       getId ()                       { return el_id; }
+   void      setId (int ln)                 { el_id = ln; }
+   Document* dad ()                         { return el_root; }
+   EnumElt   getType ()                     { return el_type; }
+   bool      isHere ()                      { return el_type!=EL_REMOVED; }
+   bool      isDeleted ()                   { return el_type==EL_REMOVED; }
+             
+                 // On s'occupe des parents 
+
+   void  razReferences ()         { el_parent.clear() ; }
+   void  addParent (EltBase* dad) { if (dad) el_parent.push_back(dad) ; }
+   int   getNbrParents ()         { return el_parent.size() ; }
+   bool  hasParents ();
+   EltBase* getFather  (int nro);  
+
+   int   getMark ()         { return el_mark; }
+   void  setMark (int ln)   { el_mark = ln ; }
+   char* getName  (pchar nom);
+   void  printName (cpchar sep=" ");
+   void  dumpRef ();
+
+   bool   debug (int niv=0) { return el_root->getLevel() > niv ; } 
+
+protected :
+   EnumElt   el_type;
+   EltBase*  el_next;
+   int       el_id;
+   Document* el_root;
+   Shape*    el_assoc;
+
+   int       el_status;
+   int       el_mark;
+   std::vector <EltBase*> el_parent;
+};
+// ========================================================= getName 
+inline char* EltBase::getName  (pchar nom)
+{
+// EL_NONE, EL_VERTEX, EL_EDGE, EL_QUAD, EL_HEXA, EL_REMOVED
+   cpchar nm_type = "xveqh????";
+
+   sprintf (nom, "%c%04d", nm_type[el_type], el_id);
+   return nom;
+}
+// ========================================================= printName 
+inline void EltBase::printName  (cpchar sep)
+{
+   char nom[12];
+
+   printf ("%s%s", getName(nom), sep);
+}
+// ========================================================= dump
+inline void EltBase::dump ()
+{
+   printf ("Elt%d  Nro=%04d", el_type, el_id);
+   dumpRef() ; 
+}
+// ========================================================= dumpRef 
+inline void EltBase::dumpRef ()
+{
+   int nbp = el_parent.size();
+
+   if (nbp>0)
+      {
+      printf ("\t isin ");
+      for (int nro=0 ; nro<nbp ; nro++)              
+          el_parent[nro]->printName(", ");
+      }
+    printf ("\n");
+}
+// ========================================================= getFather 
+inline EltBase* EltBase::getFather  (int nro)
+{
+   EltBase* elt = NULL;
+   if (nro >= 0 && nro < (int) el_parent.size() && isHere() 
+                && el_parent[nro]->isHere())
+      elt = el_parent[nro];
+
+   return elt;
+}
+// ========================================================= getFather 
+inline bool EltBase::hasParents ()
+{
+   int nbp = el_parent.size();
+   for (int nro=0 ; nro<nbp ; nro++)         
+       if (el_parent[nro]!=NULL && el_parent[nro]->isHere())
+          return true;
+
+   return false;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexGlobale.cxx b/src/HEXABLOCK/HexGlobale.cxx
new file mode 100755 (executable)
index 0000000..8782514
--- /dev/null
@@ -0,0 +1,150 @@
+
+// C++ : Initialisation du singleton
+
+#include "HexGlobale.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+              +----bf-----+
+             /|          /|
+           bc |   B    bd |
+           /  |        /  |
+          +----be-----+   |   
+          |  cf     F |   df
+          | C |       | D |             z
+         ce   | E     de  |             ^
+          |   +----af-|---+             |   y
+          |  /        |  /              |  /
+          | ac    A   | ad              | /
+          |/          |/                |/
+          +----ae-----+                 +----->  x
+                
+ * ----------------------------------------------------- */
+
+Globale* Globale::unique_instance = NULL;
+
+
+// ====================================================== Constructeur
+Globale::Globale  ()
+{
+   setCoordVertex ( V_ACE, 0, 0, 0 );
+   setCoordVertex ( V_ACF, 1, 0, 0 );
+   setCoordVertex ( V_ADF, 0, 1, 0 );
+   setCoordVertex ( V_ADE, 1, 1, 0 );
+
+   setCoordVertex ( V_BCE, 0, 0, 1 );
+   setCoordVertex ( V_BCF, 1, 0, 1 );
+   setCoordVertex ( V_BDF, 1, 1, 1 );
+   setCoordVertex ( V_BDE, 0, 1, 1 );
+   
+   setEdgeVertex ( E_AC, V_ACE, V_ACF );
+   setEdgeVertex ( E_AF, V_ACF, V_ADF );
+   setEdgeVertex ( E_AD, V_ADF, V_ADE );
+   setEdgeVertex ( E_AE, V_ADE, V_ACE );
+
+   setEdgeVertex ( E_BC, V_BCE, V_BCF );
+   setEdgeVertex ( E_BF, V_BCF, V_BDF );
+   setEdgeVertex ( E_BD, V_BDF, V_BDE );
+   setEdgeVertex ( E_BE, V_BDE, V_BCE );
+
+   setEdgeVertex ( E_CE, V_ACE, V_BCE );
+   setEdgeVertex ( E_CF, V_ACF, V_BCF );
+   setEdgeVertex ( E_DF, V_ADF, V_BDF );
+   setEdgeVertex ( E_DE, V_ADE, V_BDE );
+
+   setQuadEdge ( Q_A, E_AC, E_AF, E_AD, E_AE );
+   setQuadEdge ( Q_B, E_BC, E_BF, E_BD, E_BE );
+   setQuadEdge ( Q_C, E_AC, E_CF, E_BC, E_CE );
+   setQuadEdge ( Q_D, E_AD, E_DF, E_BD, E_DE );
+   setQuadEdge ( Q_E, E_AF, E_DF, E_BF, E_CF );
+
+   setOpposedVertex ( V_ACE, V_BDF);
+   setOpposedVertex ( V_ACF, V_BDE);
+   setOpposedVertex ( V_ADF, V_BCE);
+   setOpposedVertex ( V_ADE, V_BCF);
+
+   setOpposedQuad   ( Q_A, Q_B );
+   setOpposedQuad   ( Q_C, Q_D );
+   setOpposedQuad   ( Q_E, Q_F );
+
+#define SetNameHexaVertex(v) h_vertex_name [v] = #v
+#define SetNameHexaEdge(e)   h_edge_name   [e] = #e
+#define SetNameHexaQuad(q)   h_quad_name   [q] = #q
+
+   SetNameHexaVertex ( V_ACE );
+   SetNameHexaVertex ( V_ACF );
+   SetNameHexaVertex ( V_ADF );
+   SetNameHexaVertex ( V_ADE );
+   SetNameHexaVertex ( V_BCE );
+   SetNameHexaVertex ( V_BCF );
+   SetNameHexaVertex ( V_BDF );
+   SetNameHexaVertex ( V_BDE );
+   
+   SetNameHexaEdge ( E_AC );
+   SetNameHexaEdge ( E_AF );
+   SetNameHexaEdge ( E_AD );
+   SetNameHexaEdge ( E_AE );
+   SetNameHexaEdge ( E_BC );
+   SetNameHexaEdge ( E_BF );
+   SetNameHexaEdge ( E_BD );
+   SetNameHexaEdge ( E_BE );
+   SetNameHexaEdge ( E_CE );
+   SetNameHexaEdge ( E_CF );
+   SetNameHexaEdge ( E_DF );
+   SetNameHexaEdge ( E_DE );
+
+   SetNameHexaQuad ( Q_A );
+   SetNameHexaQuad ( Q_B );
+   SetNameHexaQuad ( Q_C );
+   SetNameHexaQuad ( Q_D );
+   SetNameHexaQuad ( Q_E );
+   SetNameHexaQuad ( Q_F );
+}
+// ====================================================== getInstance
+Globale* Globale::getInstance  ()
+{
+   if (unique_instance==NULL) 
+       unique_instance = new Globale ();
+
+   return unique_instance;
+}
+// ====================================================== setCoordVertex
+void Globale::setCoordVertex (EnumHVertex node, int px, int py, int pz)
+{
+    coord_vertex [node] [dir_x] = 2*px-1;
+    coord_vertex [node] [dir_y] = 2*py-1;
+    coord_vertex [node] [dir_z] = 2*pz-1;
+}
+// ====================================================== setEdgeVertex 
+void Globale::setEdgeVertex (EnumHEdge edge, EnumHVertex v1, EnumHVertex v2)
+{
+    edge_vertex [edge] [V_AMONT] = v1;
+    edge_vertex [edge] [V_AVAL ] = v2;
+}
+// ====================================================== setQuadEdge
+void Globale::setQuadEdge (EnumHQuad face, EnumHEdge c1, EnumHEdge c2, 
+                                          EnumHEdge c3, EnumHEdge c4)
+{
+    quad_edge [face] [E_A] = c1;
+    quad_edge [face] [E_B] = c2;
+    quad_edge [face] [E_C] = c3;
+    quad_edge [face] [E_D] = c4;
+}
+// ====================================================== setopposedVertex 
+void Globale::setOpposedVertex (EnumHVertex lun, EnumHVertex lautre)
+{
+    h_opposed_vertex [lun]    = lautre;
+    h_opposed_vertex [lautre] = lun;
+}
+// ====================================================== setopposedQuad 
+void Globale::setOpposedQuad (EnumHQuad lun, EnumHQuad lautre)
+{
+    h_opposed_quad [lun]    = lautre;
+    h_opposed_quad [lautre] = lun;
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexGlobale.hxx b/src/HEXABLOCK/HexGlobale.hxx
new file mode 100755 (executable)
index 0000000..daa0368
--- /dev/null
@@ -0,0 +1,101 @@
+
+// Singleton : Var globales : Disposition sommets/aretes/faces d'un hexaedre
+
+#ifndef _HEX_GLOBALE_H
+#define _HEX_GLOBALE_H
+
+#include "hexa_base.hxx"
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+              +----bf-----+
+             /|          /|
+           bc |   B    bd |
+           /  |        /  |
+          +----be-----+   |   
+          |  cf     F |   df
+          | C |       | D |             z
+         ce   | E     de  |             ^
+          |   +----af-|---+             |   y
+          |  /        |  /              |  /
+          | ac    A   | ad              | /
+          |/          |/                |/
+          +----ae-----+                 +----->  x
+                
+ * ----------------------------------------------------- */
+
+BEGIN_NAMESPACE_HEXA
+
+class Globale
+{
+public :
+   static Globale* getInstance ();
+
+   int CoordVertex (int edge, EnumCoord dim)
+       { return coord_vertex [edge] [dim] ; }
+
+   EnumHVertex EdgeVertex (int edge, EnumVertex sens)
+       { return edge_vertex [edge] [sens] ; }
+
+   EnumHEdge QuadEdge (int face, EnumQuad cote)
+       { return quad_edge [face] [cote] ; }
+
+   cpchar namofHexaEdge   (int arete)   { return h_edge_name   [arete] ; }
+   cpchar namofHexaVertex (int sommet)  { return h_vertex_name [sommet]; }
+   cpchar namofHexaQuad   (int face)    { return h_quad_name   [face];   }
+
+   EnumHQuad getOpposedQuad (int face)  { return h_opposed_quad [face]; }
+
+   void setArgs  (int nbargs, cpchar tabargs[]);
+   int  findArg  (cpchar opt);
+   bool isinArgs (cpchar opt)  { return findArg (opt) >= 0; }
+   cpchar getArg  (int nro)    { return nro>=nbr_args ? NULL : tab_args[nro]; }
+
+
+private :
+   Globale ();         // Constructeur prive
+
+   void setCoordVertex (EnumHVertex node, int px, int py, int pz);
+   void setEdgeVertex  (EnumHEdge edge, EnumHVertex amont, EnumHVertex aval);
+   void setQuadEdge    (EnumHQuad face, EnumHEdge c1, EnumHEdge c2, 
+                                       EnumHEdge c3, EnumHEdge c4);
+   void setOpposedVertex (EnumHVertex lun, EnumHVertex lautre);
+   void setOpposedQuad   (EnumHQuad   lun, EnumHQuad   lautre);
+
+private :
+   int     nbr_args;
+   cpchar* tab_args;
+
+   int         coord_vertex [HV_MAXI] [DIM3];
+   EnumHVertex edge_vertex  [HV_MAXI] [V_TWO];
+   EnumHEdge   quad_edge    [HQ_MAXI] [QUAD4];
+
+   cpchar h_edge_name   [HE_MAXI]; 
+   cpchar h_vertex_name [HV_MAXI];
+   cpchar h_quad_name   [HQ_MAXI]; 
+
+   EnumHVertex  h_opposed_vertex [HV_MAXI];
+   EnumHQuad    h_opposed_quad   [HQ_MAXI];
+
+   static Globale* unique_instance;
+};
+// ===================================================== setArgs
+inline void Globale::setArgs (int nbargs, cpchar tabargs[])
+{
+   nbr_args = nbargs;
+   tab_args = tabargs;
+}
+// ===================================================== findArg
+inline int Globale::findArg (cpchar option)
+{
+   for (int nro=1 ; nro<nbr_args ; nro++)
+       if (Cestegal (option, tab_args[nro]))
+          return nro;
+
+   return NOTHING;
+}
+END_NAMESPACE_HEXA
+
+#endif
diff --git a/src/HEXABLOCK/HexGroups.hxx b/src/HEXABLOCK/HexGroups.hxx
new file mode 100755 (executable)
index 0000000..b570f8f
--- /dev/null
@@ -0,0 +1,77 @@
+
+// Class : Implementation provisoire et symbolique de la classe "shape"
+//
+#ifndef __GROUPS_H
+#define __GROUPS_H
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Group 
+{
+public :
+   Group (cpchar nom, EnumGroup grp);
+  ~Group ()                   {}
+
+   void      setName (cpchar nom)          { grp_name = nom ; }
+   cpchar    getName ()                    { return grp_name.c_str () ; }
+   EnumGroup getKind ()                    { return grp_kind ; }
+   int       addElement    (EltBase* elt);
+   int       removeElement (int nro);
+   EltBase*  getElement    (int nro)       { return grp_table [nro] ; }
+   int       countElement  ()              { return grp_table.size () ; }
+   void      clearElement  ()              { grp_table.clear () ; }
+
+private :
+   EnumGroup   grp_kind;
+   EnumElt     grp_typelt;
+   std::string grp_name;
+   std::vector <EltBase*> grp_table;
+};
+// ======================================================== Constructeur
+inline Group::Group (cpchar nom, EnumGroup grp)  
+{
+   grp_name = nom ; 
+   grp_kind = grp;
+
+   switch (grp_kind)
+      {
+      case HexaCell : case HexaNode :
+           grp_typelt = EL_HEXA;
+           break;
+
+      case QuadCell : case QuadNode :
+           grp_typelt = EL_QUAD;
+           break;
+
+      case EdgeNode : case EdgeCell :
+           grp_typelt = EL_EDGE;
+           break;
+
+      case Vertex_Node : default :
+           grp_typelt = EL_VERTEX;
+      }
+}
+// ======================================================== addElement
+inline int Group::addElement (EltBase* elt)
+{
+   if (grp_typelt != elt->getType())
+      return HERR;
+   grp_table.push_back (elt);
+   return HOK;
+}
+// ======================================================== removeElement
+inline int Group::removeElement (int nro)
+{
+   int nbelts = grp_table.size ();
+
+   if (nro<0 || nro >= nbelts)
+      return HERR;
+   grp_table.erase (grp_table.begin() + nro);
+   return HOK;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexHexa.cxx b/src/HEXABLOCK/HexHexa.cxx
new file mode 100755 (executable)
index 0000000..1262902
--- /dev/null
@@ -0,0 +1,887 @@
+
+// C++ : Gestion des Hexaedres
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+
+#include "HexVertex.hxx"
+#include "HexDocument.hxx"
+#include "HexEdge.hxx"
+
+#include "HexGlobale.hxx"
+#include "HexXmlWriter.hxx"
+#include "HexDiagnostics.hxx"
+#include "HexGlobale.hxx"
+#include "HexMatrix.hxx"
+#include "HexElements.hxx"
+
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Hexa::Hexa (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd,
+            Vertex* ve, Vertex* vf, Vertex* vg, Vertex* vh)
+    : EltBase (va->dad(), EL_HEXA)
+{
+   h_vertex [V_ACE] = va;
+   h_vertex [V_ACF] = vb;
+   h_vertex [V_ADF] = vc;
+   h_vertex [V_ADE] = vd;
+
+   h_vertex [V_BCE] = ve;
+   h_vertex [V_BCF] = vf;
+   h_vertex [V_BDF] = vg;
+   h_vertex [V_BDE] = vh;
+
+   controlerSommets ();
+
+   Globale* glob = Globale::getInstance ();
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       h_edge[nro] = new Edge (h_vertex[glob->EdgeVertex (nro, V_AMONT)], 
+                               h_vertex[glob->EdgeVertex (nro, V_AVAL)]);
+       }
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       h_quad[nro] = new Quad (h_edge [glob->QuadEdge (nro, E_A)],
+                               h_edge [glob->QuadEdge (nro, E_B)],
+                               h_edge [glob->QuadEdge (nro, E_C)],
+                               h_edge [glob->QuadEdge (nro, E_D)]);
+
+       h_quad[nro] -> addParent (this);
+       }
+   majReferences ();
+}
+// ======================================================== Constructeur 2
+Hexa::Hexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf)
+    : EltBase (qa->dad(), EL_HEXA)
+{
+   h_quad [Q_A] = qa;
+   h_quad [Q_B] = qb;
+   h_quad [Q_C] = qc;
+   h_quad [Q_D] = qd;
+   h_quad [Q_E] = qe;
+   h_quad [Q_F] = qf;
+
+   for (int nb=0 ; nb<HE_MAXI ; nb++) h_edge   [nb] = NULL;
+   for (int nb=0 ; nb<HV_MAXI ; nb++) h_vertex [nb] = NULL;
+
+   controlerFaces  ();
+
+   verifierAretes  ();
+   verifierSommets ();
+   majReferences   ();
+
+   if (el_status != HOK)
+      {      
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      printf (" +++ Heaedre impossible \n");
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // el_root->dump ();
+      // printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      dumpFull ();
+      for (int nro=0; nro<HQ_MAXI; nro++) HexDump (h_quad[nro]);
+      for (int nro=0; nro<HE_MAXI; nro++) HexDump (h_edge[nro]);
+      for (int nro=0; nro<HV_MAXI; nro++) HexDump (h_vertex[nro]);
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // exit (1);
+      }
+}
+// =========================================================  Constructeur 3
+// === a utiliser uniquement pour le clonage
+Hexa::Hexa (Hexa* other)
+    : EltBase (other->el_root, EL_HEXA)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++) h_quad   [nro] = NULL;
+   for (int nro=0 ; nro<HE_MAXI ; nro++) h_edge   [nro] = NULL;
+   for (int nro=0 ; nro<HV_MAXI ; nro++) h_vertex [nro] = NULL;
+}
+// ======================================================== majReferences
+void Hexa::majReferences  ()
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       h_quad[nro]->addParent (this);
+}
+// ======================================================== controlerArete
+void Hexa::controlerArete  (int arete, int face1, int face2)
+{
+   h_edge [arete] = h_quad[face1]->commonEdge (h_quad[face2]);
+   if (h_edge [arete]==NULL)
+       {
+       el_root->putError (W_H_BAD_EDGE, 
+                          el_root->glob->namofHexaEdge (arete));
+       el_status = 888;
+       }
+}
+// ======================================================== controlerSomet
+void Hexa::controlerSommet  (int node, int ne1, int ne2, int ne3)
+{
+    if (h_edge[ne1] == NULL || h_edge[ne2] == NULL || h_edge[ne3] == NULL)
+       return;
+
+    Vertex* hv = h_edge[ne1]->commonVertex (h_edge[ne2]);
+    h_vertex [node] = hv;
+    if (hv == NULL)
+       {
+       el_root->putError (W_H_BAD_VERTEX, 
+                          el_root->glob->namofHexaVertex(node));
+       el_status = 888;
+       }
+    else if (hv == NULL || h_edge[ne3]->index (hv)<0)
+       {
+       char b[10];
+       el_root->putError (W_H_BAD_VERTEX, 
+                          el_root->glob->namofHexaVertex(node));
+       el_status = 888;
+       printf ("%s = %s\n", el_root->glob->namofHexaVertex(node), 
+                            hv->getName(b));
+       printf ("%s = %s\n", el_root->glob->namofHexaEdge(ne1), 
+                            h_edge[ne1]->getName(b));
+       printf ("%s = %s\n", el_root->glob->namofHexaEdge(ne2), 
+                            h_edge[ne2]->getName(b));
+       printf ("%s = %s\n", el_root->glob->namofHexaEdge(ne3), 
+                            h_edge[ne3]->getName(b));
+       }
+}
+// ======================================================== controlerFaces
+void Hexa::controlerFaces  ()
+{
+   for (int n1=0 ; n1<HQ_MAXI ; n1++) 
+       {
+       if (h_quad [n1] == NULL)
+          {
+          el_root->putError (W_H_NULL_QUAD, 
+                             el_root->glob->namofHexaQuad (n1));
+          el_status = 886;
+         return;
+          }
+       for (int n2=n1+1 ; n2<HQ_MAXI ; n2++) 
+           if (h_quad [n1] == h_quad[n2])
+              {
+              el_root->putError (W_H_EQ_QUAD, 
+                         el_root->glob->namofHexaQuad (n1), 
+                         el_root->glob->namofHexaQuad (n2));
+              el_status = 888;
+              }
+       }
+}
+// ======================================================== controlerSommets
+void Hexa::controlerSommets  ()
+{
+   for (int n1=0 ; n1<HV_MAXI ; n1++) 
+       {
+       if (h_vertex [n1] == NULL)
+          {
+          el_root->putError (W_H_NULL_QUAD, 
+                             el_root->glob->namofHexaVertex (n1));
+          el_status = 886;
+         return;
+          }
+       for (int n2=n1+1 ; n2<HQ_MAXI ; n2++) 
+           if (h_vertex [n1] == h_vertex[n2])
+              {
+              el_root->putError (W_H_EQ_QUAD, 
+                         el_root->glob->namofHexaVertex (n1), 
+                         el_root->glob->namofHexaVertex (n2));
+              el_status = 888;
+              }
+       }
+}
+// ======================================================== verifierAretes
+void Hexa::verifierAretes  ()
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++) h_edge [nro] = NULL;
+
+   controlerArete ( E_AC, Q_A, Q_C);
+   controlerArete ( E_AF, Q_A, Q_F);
+   controlerArete ( E_AD, Q_A, Q_D);
+   controlerArete ( E_AE, Q_A, Q_E);
+
+   controlerArete ( E_BC, Q_B, Q_C);
+   controlerArete ( E_BF, Q_B, Q_F);
+   controlerArete ( E_BD, Q_B, Q_D);
+   controlerArete ( E_BE, Q_B, Q_E);
+
+   controlerArete ( E_CE, Q_C, Q_E);
+   controlerArete ( E_CF, Q_C, Q_F);
+   controlerArete ( E_DF, Q_D, Q_F);
+   controlerArete ( E_DE, Q_D, Q_E);
+}
+// ======================================================== verifierSommets
+void Hexa::verifierSommets  ()
+{
+   for (int nro=0 ; nro<HV_MAXI ; nro++) h_vertex [nro] = NULL;
+
+   controlerSommet (V_ACE, E_AC, E_AE, E_CE);
+   controlerSommet (V_ACF, E_AC, E_AF, E_CF);
+   controlerSommet (V_ADF, E_AD, E_AF, E_DF);
+   controlerSommet (V_ADE, E_AD, E_AE, E_DE);
+
+   controlerSommet (V_BCE, E_BC, E_BE, E_CE);
+   controlerSommet (V_BCF, E_BC, E_BF, E_CF);
+   controlerSommet (V_BDF, E_BD, E_BF, E_DF);
+   controlerSommet (V_BDE, E_BD, E_BE, E_DE); 
+}
+// ======================================================== Inter
+Quad* Hexa::Inter (Hexa* other)
+{
+   for (int nf1=0 ; nf1 < HQ_MAXI ; nf1++)
+       for (int nf2=0 ; nf2 < HQ_MAXI ; nf2++)
+           if (h_quad[nf1] == other->h_quad[nf2])
+              return h_quad[nf1];
+
+   return NULL;
+}
+// -------------------------------------------------------------------
+//                         Debug
+// -------------------------------------------------------------------
+// ======================================================= razNodes
+void Hexa::razNodes ()
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       h_vertex[nb]->setMark (NO_COUNTED);
+}
+// ======================================================= countNodes
+int Hexa::countNodes ()
+{
+   int nombre = 0;
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark () == NO_COUNTED) 
+          {
+          h_vertex[nb]->setMark (NO_USED);
+          nombre ++;
+          }
+
+   return nombre;
+}
+// ======================================================= printNodes
+void Hexa::printNodes (pfile vtk, int& compteur)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark()==NO_USED)
+          {
+          fprintf (vtk, "%g %g %g\n", h_vertex[nb]->getX(),
+                                      h_vertex[nb]->getY(), 
+                                      h_vertex[nb]->getZ());
+          h_vertex[nb]->setMark (compteur);
+          compteur ++;
+          }
+}
+// ======================================================= colorNodes
+void Hexa::colorNodes (pfile vtk)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark()>=0)
+          {
+          double color = 100*(h_vertex[nb]->getScalar()+1);
+          fprintf (vtk, "%g\n", color);
+          h_vertex[nb]->setMark (NO_COUNTED);
+          }
+}
+// ======================================================= moveNodes
+void Hexa::moveNodes (Matrix* matrice)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       if (h_vertex[nb]->getMark()!=IS_USED)
+          {
+          matrice->perform (h_vertex[nb]);
+          h_vertex[nb]->setMark (IS_USED);
+          }
+}
+// ======================================================= transform
+void Hexa::transform (Matrix* matrice)
+{
+   for (int nb=0 ; nb<HV_MAXI ; nb++) 
+       matrice->perform (h_vertex[nb]);
+}
+// ======================================================= printHexa
+void Hexa::printHexa  (pfile vtk)
+{
+   fprintf (vtk, "%d", HV_MAXI);
+
+   fprintf (vtk, " %d", h_vertex[V_ACE]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_ACF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_ADF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_ADE]->getMark ());
+
+   fprintf (vtk, " %d", h_vertex[V_BCE]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_BCF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_BDF]->getMark ());
+   fprintf (vtk, " %d", h_vertex[V_BDE]->getMark ());
+
+   fprintf (vtk, "\n");
+}
+// ======================================================== hasFreEdges
+bool Hexa::hasFreeEdges ()
+{
+   if (isDeleted())
+       return false;
+
+   for (int nro=0; nro<HE_MAXI ; nro++)
+       if (h_edge[nro]->getMark()<0)
+          return true;
+
+   return false;
+}
+// ======================================================== propager
+void Hexa::propager (Propagation* prop, int nro)
+{
+   if (isDeleted())
+       return;
+
+   for (int nro=0; nro<HE_MAXI ; nro++)
+       if (h_edge[nro]->getMark()<0)
+           h_edge[nro]->propager (prop, nro);
+}
+// ========================================================= saveXml 
+void Hexa::saveXml (XmlWriter& xml)
+{
+   char ident[12];
+   string quads;
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       if (nro>0) quads += " ";
+       quads += h_quad[nro]->getName(ident);
+       }
+
+   getName (ident);
+   xml.openMark     ("Hexa");
+   xml.addAttribute ("id",    ident);
+   xml.addAttribute ("quads", quads);
+   xml.closeMark ();
+}
+// ========================================================= findQuad 
+int Hexa::findQuad (Quad* element)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       if (h_quad[nro]==element)
+          return nro;
+
+   return NOTHING;
+}
+// ========================================================= findEdge 
+int Hexa::findEdge (Edge* element)
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       if (h_edge[nro]==element)
+          return nro;
+
+   return NOTHING;
+}
+// ========================================================= findVertex 
+int Hexa::findVertex (Vertex* element)
+{
+   for (int nro=0 ; nro<HV_MAXI ; nro++)
+       if (h_vertex[nro]==element)
+          return nro;
+
+   return NOTHING;
+}
+// ========================================================= disconnectQuad 
+Elements* Hexa::disconnectQuad (Quad* quad)
+{
+   if (quad==NULL)
+      return NULL;
+
+   if (debug())
+      {
+      printf (" ... Avant disconnectQuad, quad=");
+      quad->printName ("\n");
+      dumpFull ();
+      }
+
+   int nface = findQuad (quad);
+   if (nface==NOTHING)
+      return NULL;
+                                       // Face opposee : replace
+   // int nfopp = (nface MODULO 2==0) ? nface+1 : nface-1;
+
+   int  ind_edge  [QUAD4], ind_node  [QUAD4], ind_opp_quad [QUAD4];
+   bool make_quad [QUAD4], make_edge [QUAD4];
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       make_quad [nro] = make_edge[nro] = false;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       int nro1  = (nro+1) MODULO QUAD4;
+       int pedge = findEdge   (quad->getEdge   (nro));
+       int pnode = findVertex (quad->getVertex (nro));
+       int oppq  = findOpposedQuad (quad, quad->getEdge (nro));
+
+       ind_edge [nro]     = pedge;
+       ind_node [nro]     = pnode;
+       ind_opp_quad [nro] = oppq;
+
+       if (pedge==NOTHING || pnode==NOTHING || oppq==NOTHING)
+          return NULL;
+
+       make_quad [nro]  = h_quad[oppq]->getNbrParents() == 2;
+       make_edge [nro ] = make_edge [nro ] || make_quad [nro];
+       make_edge [nro1] = make_edge [nro1] || make_quad [nro];
+
+       if (debug())
+          {
+          printf (" Sommet nro %d : ", nro);
+          quad->getVertex(nro)->printName (", ");
+          printf (" edge = ");
+          quad->getEdge(nro)->printName (", ");
+          printf (" quad oppose = ");
+          h_quad[oppq]->printName("");
+          if (make_quad [nro])
+             printf (" a dissocier\n");
+          else
+             printf ("\n");
+             
+          }
+       }
+
+   Vertex* new_node     [QUAD4];
+   Edge*   new_opp_edge [QUAD4];
+   Edge*   old_opp_edge [QUAD4];
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       old_opp_edge [nro] = NULL;
+       new_opp_edge [nro] = NULL;
+       Vertex*  o_v0  = quad->getVertex (nro);
+       new_node [nro] = new Vertex (o_v0);
+       if (debug())
+          {
+          printf (" quad.vertex [%d] = ", nro);
+          quad->getVertex (nro)->printName (" --> ");
+          new_node [nro]->printName ("\n");
+          }
+
+       if (make_edge[nro])
+          {
+          Quad*   pface  = h_quad [ind_opp_quad [nro]];
+         int     bid;
+         int     ncut = pface->inter (quad, bid);
+         Edge*   ecut = pface->getEdge ((ncut+1) MODULO QUAD4);  
+         Vertex* vopp = ecut->getVertex(V_AMONT);
+          if (vopp==o_v0)
+              vopp = ecut->getVertex (V_AVAL);
+          else if (o_v0 != ecut->getVertex (V_AVAL));
+              {
+             ecut = pface->getEdge ((ncut+3) MODULO QUAD4);  
+             vopp = ecut->getVertex(V_AMONT);
+              if (vopp==o_v0)
+                  vopp = ecut->getVertex (V_AVAL);
+              else if (o_v0 != ecut->getVertex (V_AVAL))
+                  return NULL;
+              }
+
+          old_opp_edge [nro] = ecut;
+          new_opp_edge [nro] = new Edge (new_node[nro], vopp);
+          if (debug())
+             {
+             printf (" quad.opp_edge [%d] = ", nro);
+             old_opp_edge [nro]->printName (" --> ");
+             new_opp_edge [nro]->printName ("\n");
+             }
+          }
+       }
+
+   Quad* new_quad = new Quad (new_node[0], new_node[1], new_node[2], 
+                                                        new_node[3]);
+
+   Quad* new_opp_quad [QUAD4];
+   Quad* old_opp_quad [QUAD4];
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       old_opp_quad [nro] = NULL;
+       new_opp_quad [nro] = NULL;
+       if (make_quad[nro])
+          {
+          int nro1 = (nro+1) MODULO QUAD4; 
+
+          Edge* n_edge0 = new_quad->getEdge (nro);
+          Edge* n_edge1 = new_opp_edge [nro];
+          Edge* n_edge3 = new_opp_edge [nro1];
+
+          int iv1 = n_edge1->inter (n_edge0);
+          int iv3 = n_edge3->inter (n_edge0);
+          if (iv1 <0 || iv3 <0)
+             return NULL;
+          
+          Quad* o_face = h_quad [ind_opp_quad [nro]];
+          Edge* edge2  = o_face->findEdge (n_edge1->getVertex (1-iv1), 
+                                           n_edge3->getVertex (1-iv3));
+          if (edge2==NULL)
+             return NULL;
+          // Edge* o_edge0 = h_edge [ind_edge     [nro]];
+          // int sens = 1;
+          // Edge* edge2   = o_face->getOpposEdge (o_edge0, sens);
+
+          old_opp_quad [nro] = o_face;
+          if (debug())
+             printf (" -------- Quad oppose nro %d\n", nro);
+          new_opp_quad [nro] = new Quad (n_edge0, n_edge1, edge2, n_edge3);
+          }
+       }
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (make_edge[nro])
+          replaceEdge (old_opp_edge [nro], new_opp_edge [nro]);
+
+       if (make_quad[nro])
+          replaceQuad (old_opp_quad [nro], new_opp_quad [nro]);
+
+       h_edge   [ind_edge[nro]] = new_quad->getEdge   (nro);
+       h_vertex [ind_node[nro]] = new_quad->getVertex (nro);
+       }
+
+   h_quad [nface] = new_quad;
+   if (debug())
+      {
+      printf (" ... Apres disconnectQuad, new_quad=");
+      new_quad->printName ("\n");
+      dumpFull ();
+      }
+
+   Elements* nouveaux  = new Elements (el_root);
+   nouveaux->addQuad   (new_quad);
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       nouveaux->addEdge   (new_quad->getEdge   (nro));
+       nouveaux->addVertex (new_quad->getVertex (nro));
+       if (make_edge[nro])
+          nouveaux->addEdge (new_opp_edge [nro]);
+       if (make_quad[nro])
+          nouveaux->addQuad (new_opp_quad [nro]);
+       }
+   return nouveaux;
+}
+// ========================================================= disconnectEdge 
+Elements* Hexa::disconnectEdge (Edge* arete)
+{
+   int nedge  = findEdge   (arete);
+   int namont = findVertex (arete->getVertex(V_AMONT));
+   int naval  = findVertex (arete->getVertex(V_AVAL ));
+
+   if (nedge==NOTHING || namont==NOTHING || naval==NOTHING)
+      return NULL;
+
+   Vertex*   new_amont = new Vertex (arete->getVertex(V_AMONT));
+   Vertex*   new_aval  = new Vertex (arete->getVertex(V_AVAL ));
+   Edge*     new_edge  = new Edge   (new_amont, new_aval);
+
+   h_vertex [namont]   = new_amont;
+   h_vertex [naval]    = new_aval;
+   h_edge   [nedge]    = new_edge;
+
+   Elements* nouveaux  = new Elements (el_root);
+   nouveaux->addVertex (new_amont);
+   nouveaux->addVertex (new_aval);
+   nouveaux->addEdge   (new_edge);
+
+                // Trouver les 2 faces contigues a l'arete
+                // et verifier si la face est commune a 2 hexas
+   int nf = 0;
+   for (int nq=0 ; nq<HQ_MAXI && nf < V_TWO; nq++)
+       {
+       int nro = h_quad[nq]->indexEdge (arete);
+       if (nro>=0)
+          {
+          nf ++;
+          if (h_quad[nq]->getNbrParents()>1)
+             {
+             Edge* eoppos = h_quad[nq]->getEdge ((nro+2) MODULO QUAD4);
+             Edge* eleft  = h_quad[nq]->getEdge ((nro+3) MODULO QUAD4);
+             Edge* eright = h_quad[nq]->getEdge ((nro+1) MODULO QUAD4);
+             int nl2, nr2;
+             int nl1 = arete->inter (eleft,  nl2);
+             int nr1 = arete->inter (eright, nr2);
+             if (nl1==NOTHING && nr1==NOTHING)
+                return nouveaux;
+
+             Vertex*  new_vleft  = nl1==V_AMONT ? new_amont : new_aval;
+             Vertex*  new_vright = nr1==V_AMONT ? new_amont : new_aval;
+
+             Edge* new_eleft  = new Edge (new_vleft,  eleft ->getVertex(1-nl2));
+             Edge* new_eright = new Edge (new_vright, eright->getVertex(1-nr2));
+             Quad* new_quad   = new Quad (new_edge, new_eleft, eoppos, 
+                                          new_eright);
+             replaceQuad (h_quad[nq], new_quad);
+             replaceEdge (eleft,      new_eleft);
+             replaceEdge (eright,     new_eright);
+
+             nouveaux->addEdge (new_eleft);
+             nouveaux->addEdge (new_eright);
+             nouveaux->addQuad (new_quad);
+             }
+          }
+       }
+
+   return nouveaux;
+}
+// ========================================================= disconnectVertex 
+Elements* Hexa::disconnectVertex (Vertex* noeud)
+{
+   if (debug())
+      {
+      printf (" ... Avant disconnectVertex, vertex=");
+      noeud->printName ("\n");
+      dumpFull ();
+      }
+
+   int node = findVertex (noeud);
+   if (node==NOTHING)
+      return NULL;
+
+   Vertex* new_node = new Vertex (noeud);
+   Quad*   new_quad [HQ_MAXI];
+   Edge*   new_edge [HE_MAXI];
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++) new_edge [nro] = NULL;
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       new_quad [nro] = NULL;
+            // Cete face contient le sommet et est commune a 2 hexas
+       if (   h_quad[nro]->indexVertex(noeud) >= 0 
+           && h_quad[nro]->getNbrParents  ()  >= 2)
+           {
+           int nbmod = 0;
+           Edge* tedge [QUAD4];
+           for (int qed=0 ; qed<QUAD4 ; qed++)
+               {
+               Edge* arete = tedge[qed] = h_quad[nro]->getEdge (qed);
+               int   indv  = arete->index (noeud);
+               if (indv>=0)
+                  {
+                  nbmod++;  
+                  int hed = findEdge (arete);
+                 if (hed<0)
+                     return NULL;
+                 if (new_edge [hed]==NULL)
+                     new_edge [hed] = new Edge (new_node, 
+                                                 arete->getVertex(1-indv));
+                  tedge [qed] = new_edge [hed];
+                  }
+               }
+           if (nbmod!=2)
+              return NULL; 
+           new_quad [nro] = new Quad (tedge[0], tedge[1], tedge[2], tedge[3]);
+           }
+       }
+
+   Elements* nouveaux  = new Elements (el_root);
+   h_vertex [node] = new_node;
+   nouveaux->addVertex (new_node);
+
+   for (int nro=0 ; nro<HE_MAXI ; nro++) 
+       if (new_edge [nro] != NULL)
+          {
+          h_edge [nro] = new_edge [nro];
+          nouveaux->addEdge (new_edge[nro]);
+          }
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++) 
+       if (new_quad [nro] != NULL)
+          {
+          h_quad [nro] = new_quad [nro];
+          nouveaux->addQuad (new_quad[nro]);
+          }
+
+   if (debug())
+      {
+      printf (" ... Apres disconnectVertex");
+      dumpFull ();
+      }
+
+   return nouveaux;
+}
+// ========================================================= getBase 
+int Hexa::getBase (Vertex* orig, Edge* normale)
+{
+   for (int nq=0 ; nq<HQ_MAXI ; nq++)
+       {
+       if (   h_quad[nq]->indexVertex(orig)    >= 0 
+           && h_quad[nq]->indexEdge  (normale) < 0)
+           return nq;
+       }
+   return NOTHING;
+}
+// ======================================================== replaceQuad
+void Hexa::replaceQuad (Quad* old, Quad* par)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       if (h_quad[nro]==old) 
+           {
+           h_quad[nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== replaceEdge
+void Hexa::replaceEdge (Edge* old, Edge* par)
+{
+   for (int nro=0 ; nro<HE_MAXI ; nro++)
+       {
+       if (h_edge[nro]==old) 
+           {
+           h_edge[nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== replaceVertex
+void Hexa::replaceVertex (Vertex* old, Vertex* par)
+{
+   for (int nro=0 ; nro<HV_MAXI ; nro++)
+       {
+       if (h_vertex [nro]==old) 
+           {
+           h_vertex [nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== removeConnected
+void Hexa::removeConnected ()
+{
+   if (el_type == EL_REMOVED)
+      return;
+
+   el_type = EL_REMOVED;
+
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       Quad*  face = h_quad [nro];
+       int nbhexas = face->getNbrParents ();
+       for (int nc=0 ; nc<nbhexas ; nc++)
+           {
+           Hexa* cell = face->getParent(nc);
+           if (cell!=NULL && cell->isValid ())
+              cell->removeConnected ();
+           }
+       }
+}
+// ======================================================== findOpposedQuad
+int Hexa::findOpposedQuad (Quad* face, Edge* arete)
+{
+   for (int nro=0 ; nro<HQ_MAXI ; nro++)
+       {
+       Quad*  quad = h_quad [nro];
+       if (quad!=face && quad->indexEdge (arete) >=0)
+          return nro;
+       }
+
+   return NOTHING;
+}
+// ========================================================= dump
+void Hexa::dump ()
+{
+   printName(" = (");
+   if (NOT isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   for (int nro=0; nro<HQ_MAXI ; nro++)
+        PrintName (h_quad[nro]);
+   printf (")\n");
+
+   printf ("      = (");
+   for (int nro=0; nro<HE_MAXI ; nro++)
+        {
+        PrintName (h_edge[nro]);
+        if (nro==3 || nro ==7) 
+           printf ("\n         ");
+        }
+   printf (")\n");
+
+   printf ("      = (");
+   for (int nro=0; nro<HV_MAXI ; nro++)
+        PrintName (h_vertex[nro]);
+   printf (")\n");
+}
+// ======================================================== dumpPlus
+void Hexa::dumpPlus ()
+{
+   dump ();
+   for (int nro=0 ; nro < HV_MAXI ; nro++)
+       {
+       Vertex* pv = h_vertex[nro];
+       printf ( "    ");
+       if (pv!=NULL)
+          {
+          pv->printName ("");
+          printf ( " (%g, %g, %g)\n", pv->getX(),  pv->getY(),  pv->getZ());
+          }
+       else
+          {
+          printf ( "NULL\n");
+          }
+       }
+}
+// ======================================================== dumpFull
+void Hexa::dumpFull ()
+{
+   dump ();
+   Globale* glob = Globale::getInstance ();
+
+   printf ("\n");
+   for (int nro=0; nro<HQ_MAXI ; nro++)
+       {
+       printf (" quad(%s) = ", glob->namofHexaQuad(nro));
+       if (h_quad[nro] ==NULL)
+           printf (" NULL\n");
+       else
+           {
+           h_quad[nro]->printName (" = (");
+           for (int nc=0; nc<QUAD4 ; nc++)
+                h_quad[nro]->getEdge(nc)->printName ();
+           printf (")\n");
+           printf ("                   = (");
+           for (int nc=0; nc<QUAD4 ; nc++)
+                h_quad[nro]->getVertex(nc)->printName ();
+           printf (")\n");
+           }
+       }
+
+   printf ("\n");
+   for (int nro=0; nro<HE_MAXI ; nro++)
+       {
+       printf (" edge(%s) = ", glob->namofHexaEdge(nro));
+       if (h_edge[nro] ==NULL)
+           printf (" NULL\n");
+       else
+           {
+           h_edge[nro]->printName (" = (");
+           for (int nc=0; nc<V_TWO ; nc++)
+                h_edge[nro]->getVertex(nc)->printName ();
+           printf (")\n");
+           }
+       }
+   printf ("\n");
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexHexa.hxx b/src/HEXABLOCK/HexHexa.hxx
new file mode 100755 (executable)
index 0000000..67fccc7
--- /dev/null
@@ -0,0 +1,175 @@
+
+// class : Les hexaedres
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+
+                   
+              +----bf-----+
+             /|          /|
+           bc |   B    bd |
+           /  |        /  |
+          +----be-----+   |   
+          |  cf     F |   df
+          | C |       | D |             z
+         ce   | E     de  |             ^
+          |   +----af-|---+             |   y
+          |  /        |  /              |  /
+          | ac    A   | ad              | /
+          |/          |/                |/
+          +----ae-----+                 +----->  x
+                
+
+ * ----------------------------------------------------- */
+#ifndef __HEX_HEXA_H_
+#define __HEX_HEXA_H_
+
+#include "HexEltBase.hxx"
+
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Hexa : public EltBase 
+{
+public:
+    virtual Quad*   getQuad   (int  nro);
+    virtual Edge*   getEdge   (int  nro);
+    virtual Vertex* getVertex (int  nro);
+
+    virtual int     countQuad   () { return HQ_MAXI; } 
+    virtual int     countEdge   () { return HE_MAXI; } 
+    virtual int     countVertex () { return HV_MAXI; } 
+
+public:
+    Hexa (Vertex* v1, Vertex* v2, Vertex* v3, Vertex* v4, 
+          Vertex* v5, Vertex* v6, Vertex* v7, Vertex* v8);
+    Hexa (Quad* qa, Quad* qb, Quad* qc, Quad* qd, Quad* qe, Quad* qf);
+    Hexa (Hexa* other);
+    Quad* Inter   (Hexa* other);
+    bool  definedBy  (Vertex* v1, Vertex* v2);
+    bool  definedBy  (Quad*   va, Quad*   v2);
+    virtual void dump ();
+    virtual void dumpPlus ();
+    virtual void dumpFull ();
+  
+    void razNodes ();
+    int  countNodes ();                      // Compte et numerote les noeuds
+    void printNodes (pfile vtk, int& count); // Impression format vtk
+    void colorNodes (pfile vtk);             // Impression scalaires vtk
+    void moveNodes  (Matrix* matrice);       // transfo controlee ds un ensemble
+    void transform  (Matrix* matrice);       // transfo indivituelle
+    void printHexa  (pfile vtk);             // Impression de la cellule 
+    virtual void majReferences();            // M.A.J relation "utilise par"
+
+    bool hasFreeEdges  ();
+    void propager (Propagation* prop, int nro);
+    void setScalar (double valeur);
+
+    virtual void saveXml (XmlWriter& xml);
+
+    Elements*  disconnectQuad   (Quad*   face);
+    Elements*  disconnectEdge   (Edge*   arete);
+    Elements*  disconnectVertex (Vertex* noeud);
+
+    int getBase (Vertex* orig, Edge* normale);
+
+    void replaceQuad   (Quad*   old, Quad* nouveau);
+    void replaceEdge   (Edge*   old, Edge* nouveau);
+    void replaceVertex (Vertex* old, Vertex* nouveau);
+    void removeConnected ();
+    void markElements (int marque);
+
+private:
+    friend class Cloner;
+    void  OrdonnerAretes ();    // obsolete ?
+    void  OrdonnerSommets ();   // obsolete ?
+
+    void  controlerFaces   ();  // Controle primaire des donnees utilisateur   
+    void  controlerSommets ();  // Idem;  
+
+    void  verifierSommets ();   // Controle de coherence des quads
+    void  verifierAretes ();    // Idem
+
+    void  controlerArete (int arete, int face1, int face2);
+    void  controlerSommet (int node, int arete1, int arete2, int arete3);
+
+    int   findQuad   (Quad*   element);
+    int   findEdge   (Edge*   element);
+    int   findVertex (Vertex* element);
+
+    int   findOpposedQuad  (Quad* face, Edge* arete);
+
+private:
+    Quad*   h_quad   [HQ_MAXI];
+    Edge*   h_edge   [HE_MAXI];
+    Vertex* h_vertex [HV_MAXI];
+};
+// ------------------------------------------------------------  inlining
+// ============================================================  getQuad
+inline Quad* Hexa::getQuad (int nro) 
+{
+   Quad* elt = NULL;
+   if (nro >=0 && nro < HQ_MAXI && el_status == HOK && h_quad [nro]->isValid())
+      elt = h_quad [nro]; 
+
+   return elt;
+}
+// ============================================================  getEdge
+inline Edge* Hexa::getEdge (int nro)
+{
+   Edge* elt = NULL;
+   if (nro >=0 && nro < HE_MAXI && el_status == HOK && h_edge [nro]->isValid())
+      elt = h_edge [nro]; 
+
+   return elt;
+}
+// ============================================================  getVertex
+inline Vertex* Hexa::getVertex (int nro)
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro <  HV_MAXI && el_status == HOK && h_vertex [nro]->isValid())
+      elt = h_vertex [nro]; 
+
+   return elt;
+}
+// =============================================================== definedBy
+inline bool Hexa::definedBy  (Vertex* v1, Vertex* v2)
+{
+   for (int n1=0 ; n1< HV_MAXI ; n1++)
+       {
+//              (   Diagonale        )  Dessus
+       int n2 = (n1 + 2) MODULO HV_MAXI + HV_MAXI;
+       if (   (v1 == h_vertex[n1] && v2 == h_vertex[n2])
+           || (v1 == h_vertex[n2] && v2 == h_vertex[n1])) return true;
+       }
+   return false;
+}
+// =============================================================== definedBy
+inline bool Hexa::definedBy  (Quad* qa, Quad* qb)
+{
+   for (int nc=0 ; nc< 3 ; nc++)
+       {
+       if (   (qa == h_quad[2*nc]   && qb == h_quad[2*nc+1])
+           || (qa == h_quad[2*nc+1] && qb == h_quad[2*nc])) return true;
+       }
+   return false;
+}
+// =============================================================== setScalar
+inline void Hexa::setScalar  (double val)
+{
+   for (int nc=0 ; nc< HV_MAXI ; nc++)
+       h_vertex[nc] -> setScalar (val);
+}
+// ============================================================== markElements
+inline void Hexa::markElements  (int marque)
+{
+   for (int nc=0 ; nc< HQ_MAXI ; nc++) h_quad  [nc] -> setMark (marque);
+   for (int nc=0 ; nc< HE_MAXI ; nc++) h_edge  [nc] -> setMark (marque);
+   for (int nc=0 ; nc< HV_MAXI ; nc++) h_vertex[nc] -> setMark (marque);
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexLaw.hxx b/src/HEXABLOCK/HexLaw.hxx
new file mode 100755 (executable)
index 0000000..f274a33
--- /dev/null
@@ -0,0 +1,73 @@
+
+// class : Au nom de la loi
+
+#ifndef __LAW_H
+#define __LAW_H
+
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Law 
+{
+public:
+   const char* getName ()          { return law_name.c_str() ; }
+   int     getNodes ()             { return nbr_nodes ; }
+   double  getCoefficient ()       { return law_coefficient ; }
+   KindLaw getKind ()              { return law_type ;  }
+
+   int     setNodes (int  nbre);
+   int     setCoefficient (double coeff);
+   void    setKind (KindLaw type)  { law_type = type ;  }
+   int     setName (const char* nom);
+
+public:
+    Law (cpchar name, int nbnodes);
+    void saveXml (XmlWriter& xml);
+
+private:
+    std::string law_name;
+    int         nbr_nodes;
+    KindLaw     law_type;
+    double      law_coefficient;
+};
+// ================================================== Constructeur
+inline Law::Law (cpchar name, int nbnodes)
+{
+   nbr_nodes = nbnodes;
+   law_name  = name;
+   law_type  = Uniform;
+   law_coefficient = 0.0;
+}
+// ================================================== setNodes
+inline int Law::setNodes (int  nbre)
+{
+   nbr_nodes = nbre;
+   return HOK;
+}
+// ================================================== setCoefficient
+inline int Law::setCoefficient (double coeff)
+{
+   law_coefficient = coeff;
+   return HOK;
+}
+// ================================================== setName
+inline int Law::setName (const char* name)
+{
+   law_name = name;
+   return HOK;
+}
+// ================================================== saveXml
+inline void Law::saveXml (XmlWriter& xml)
+{
+   cpchar kind_law [] = { "Uniform", "Arithmetic", "Geometric" };
+
+   xml.openMark     ("Law");
+   xml.addAttribute ("id",          getName ());
+   xml.addAttribute ("kind",    kind_law [law_type]);
+   xml.addAttribute ("nodes",   nbr_nodes);
+   xml.addAttribute ("coeff", law_coefficient);
+   xml.closeMark ();
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexMatrix.hxx b/src/HEXABLOCK/HexMatrix.hxx
new file mode 100755 (executable)
index 0000000..dccb5e3
--- /dev/null
@@ -0,0 +1,236 @@
+
+// class : Les matrices
+
+#ifndef __MATRIX_H
+#define __MATRIX_H
+
+#include "HexVertex.hxx"
+#include "HexVector.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+class Matrix 
+{
+public:
+    Matrix ();
+    int defTranslation   (Vector* depl);
+    int defScale         (Vertex* center, double scale);
+    int defRotation      (Vertex* center, Vector* depl, double degres);
+    int defSymmetryPoint (Vertex* center);
+    int defSymmetryLine  (Vertex* center, Vector* dir);
+    int defSymmetryPlane (Vertex* center, Vector* normale);
+
+    int perform (Vertex* noeud);
+
+private:
+    void erase();
+private:
+    double mat11, mat12, mat13, mat14;
+    double mat21, mat22, mat23, mat24;
+    double mat31, mat32, mat33, mat34;
+};
+// ------------------------------------------- Inlining
+// ========================================================= Constructeur
+inline Matrix::Matrix ()
+{
+   erase ();
+}
+// ========================================================= erase
+inline void Matrix::erase ()
+{
+   mat12 = mat13 = mat14 = 0.0;
+   mat21 = mat23 = mat24 = 0.0;
+   mat31 = mat32 = mat34 = 0.0;
+   mat11 = mat22 = mat33 = 1.0;
+}
+// ========================================================= transform
+inline int Matrix::perform (Vertex* noeud)
+{
+   double px, py, pz;
+   px = mat11*noeud->getX()+mat12*noeud->getY()+mat13*noeud->getZ()+mat14;
+   py = mat21*noeud->getX()+mat22*noeud->getY()+mat23*noeud->getZ()+mat24;
+   pz = mat31*noeud->getX()+mat32*noeud->getY()+mat33*noeud->getZ()+mat34;
+
+   noeud->setCoord (px, py, pz);
+   return HOK;
+}
+// ========================================================= defTranlation
+inline int Matrix::defTranslation (Vector* boulevard)
+{
+   erase();
+   mat11 = mat22 = mat33 = 1.0;
+
+   mat14 = boulevard->getDx ();
+   mat24 = boulevard->getDy ();
+   mat34 = boulevard->getDz ();
+
+   return HOK;
+}
+// ========================================================= defScale
+inline int Matrix::defScale (Vertex* center, double scale)
+{
+   erase();
+   mat11 = mat22 = mat33 = scale;
+
+   mat14 = (1-scale) * center->getX ();
+   mat24 = (1-scale) * center->getY ();
+   mat34 = (1-scale) * center->getZ ();
+   return HOK;
+}
+// ========================================================= defRotation
+inline int Matrix::defRotation (Vertex* center, Vector* dir, double degres)
+{
+   erase();
+
+   double normed = dir->norme ();
+   if (normed< 1e-30)
+      return HERR;
+
+   double ux = dir->getDx () / normed;
+   double uy = dir->getDy () / normed;
+   double uz = dir->getDz () / normed;
+
+   double cx = center->getX ();
+   double cy = center->getY ();
+   double cz = center->getZ ();
+
+   double cost = cos (degres*M_PI/180);
+   double sint = sin (degres*M_PI/180);
+
+   mat11 = ux*ux * (1-cost) + cost;
+   mat12 = ux*uy * (1-cost) - uz*sint;
+   mat13 = ux*uz * (1-cost) + uy*sint;
+
+   mat21 = ux*uy * (1-cost) + uz*sint;
+   mat22 = uy*uy * (1-cost) + cost;
+   mat23 = uy*uz * (1-cost) - ux*sint;
+
+   mat31 = ux*uz * (1-cost) - uy*sint;
+   mat32 = uy*uz * (1-cost) + ux*sint;
+   mat33 = uz*uz * (1-cost) + cost;
+
+   mat14 = cx - mat11*cx - mat12*cy - mat13*cz;
+   mat24 = cy - mat21*cx - mat22*cy - mat23*cz;
+   mat34 = cz - mat31*cx - mat32*cy - mat33*cz;
+
+   return HOK;
+}
+// ========================================================= defSymmetryPoint
+inline int Matrix::defSymmetryPoint (Vertex* center)
+{
+   erase();
+
+   mat11 = mat22 = mat33 = -1;
+
+   mat14 = 2 * center->getX();
+   mat24 = 2 * center->getY();
+   mat34 = 2 * center->getZ();
+
+   return HOK;
+}
+// ========================================================= defSymmetryLine
+//     MH.d = 0        (1)
+//     CH  = lambda*d  (2)
+//     MM' = 2MH       (3)
+// 
+// (1) et (2) => lambda = ((x-xc)*xd + (y-yc)*yd + (z-zc)*zd) / norme(d)
+//
+//     MM' = 2MH (3)
+// <=> MO + OM' =  2 (MO + OC + CH) 
+// <=>      OM' =  MO + 2.OC + 2.CH
+// <=>      OM' = -OM + 2.OC + 2.lambda.d   (2) et (3)
+//
+//           x' = -x  + 2*xc + 2*xd*((x-xc)*xd + (y-yc)*yd + (z-zc)*zd)
+//           y' = -y  + 2*yc + 2*yd*((x-xc)*xd + (y-yc)*yd + (z-zc)*zd)
+//           z' = -z  + 2*zc + 2*zd*((x-xc)*xd + (y-yc)*yd + (z-zc)*zd)
+//
+inline int Matrix::defSymmetryLine (Vertex* center, Vector* dir)
+{
+   erase ();
+
+   double normed = dir->norme ();
+   if (normed< 1e-30)
+      return HERR;
+
+   double xc =  center->getX();
+   double yc =  center->getY();
+   double zc =  center->getZ();
+
+   double xd = dir->getDx() / normed;
+   double yd = dir->getDy() / normed;
+   double zd = dir->getDz() / normed;
+
+   mat11 = 2*xd*xd -1;
+   mat12 = 2*xd*yd;
+   mat13 = 2*xd*zd;
+   mat14 = 2*(xc - xd*(xc*xd + yc*yd + zc*zd));
+
+   mat21 = 2*yd*xd;
+   mat22 = 2*yd*yd - 1;
+   mat23 = 2*yd*zd;
+   mat24 = 2*(yc - yd*(xc*xd + yc*yd + zc*zd));
+
+   mat31 = 2*zd*xd;
+   mat32 = 2*zd*yd;
+   mat33 = 2*zd*zd - 1;
+   mat34 = 2*(zc - zd*(xc*xd + yc*yd + zc*zd));
+
+   return HOK;
+}
+// ========================================================= defSymmetryPlane
+//     CH.n = 0         (1)
+//     MH   = lambda*n  (2)
+//     MM'  = 2MH       (3)
+// 
+// (1) et (2) => lambda = ((x-xc)*xn + (y-yc)*yn + (z-zc)*zn) / norme(n)
+//
+//     MM' = 2MH (3)
+// <=> MO + OM' =  2.lambda.n
+// <=>      OM' =  OM + 2.lambda.n
+//
+//           x' = x + 2*lambda*xn
+//           y' = y + 2*lambda*yn
+//           z' = z + 2*lambda*zn
+//
+//           x' = x + 2*xn*((x-xc)*xn + (y-yc)*yn + (z-zc)*zn)
+//           y' = y + 2*yn*((x-xc)*xn + (y-yc)*yn + (z-zc)*zn)
+//           z' = z + 2*zn*((x-xc)*xn + (y-yc)*yn + (z-zc)*zn)
+//
+inline int Matrix::defSymmetryPlane (Vertex* center, Vector* normale)
+{
+   erase ();
+
+   double normed = normale->norme ();
+   if (normed< 1e-30)
+      return HERR;
+
+   double xc =  center->getX();
+   double yc =  center->getY();
+   double zc =  center->getZ();
+
+   double xn = normale->getDx() / normed;
+   double yn = normale->getDy() / normed;
+   double zn = normale->getDz() / normed;
+
+   mat11 = -2*xn*xn + 1;
+   mat12 = -2*xn*yn;
+   mat13 = -2*xn*zn;
+   mat14 =  2*xn*(xc*xn + yc*yn + zc*zn);
+
+   mat21 = -2*yn*xn;
+   mat22 = -2*yn*yn + 1;
+   mat23 = -2*yn*zn;
+   mat24 =  2*yn*(xc*xn + yc*yn + zc*zn);
+
+   mat31 = -2*zn*xn;
+   mat32 = -2*zn*yn;
+   mat33 = -2*zn*zn + 1;
+   mat34 =  2*zn*(xc*xn + yc*yn + zc*zn);
+
+   return HOK;
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexPipe.cxx b/src/HEXABLOCK/HexPipe.cxx
new file mode 100755 (executable)
index 0000000..b835a36
--- /dev/null
@@ -0,0 +1,15 @@
+
+// C++ : Gestion des tuyaux
+
+#include "HexPipe.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Pipe::Pipe (Vertex* b, Vector* v, double ri, double re, double h)
+    : Cylinder (b, v, re, h)
+{
+    c_int_radius = ri;
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexPipe.hxx b/src/HEXABLOCK/HexPipe.hxx
new file mode 100755 (executable)
index 0000000..b53fe35
--- /dev/null
@@ -0,0 +1,26 @@
+
+// class : Les tuyaux (de pipe ...)
+
+#ifndef __PIPE_H
+#define __PIPE_H
+
+#include "HexCylinder.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Pipe : public Cylinder 
+{
+public :
+    double  getInternalRadius () { return c_int_radius; }
+
+public :
+    Pipe (Vertex* b, Vector* v, double ri, double re, double h);
+
+private:
+    double c_int_radius;
+};
+
+// ------------------------------------------- Inlining
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexPropagation.hxx b/src/HEXABLOCK/HexPropagation.hxx
new file mode 100755 (executable)
index 0000000..21c990d
--- /dev/null
@@ -0,0 +1,93 @@
+
+// class : Ensembles de propagation
+
+#ifndef __PROPAGATION_H
+#define __PROPAGATION_H
+
+#include "HexDocument.hxx"
+#include "HexEdge.hxx"
+#include "HexXmlWriter.hxx"
+#include "HexLaw.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Propagation 
+{
+public:
+   const Edges& getEdges ()        { return prop_edges; }
+   Law*  getLaw ();
+   bool  getWay ()                 { return prop_way; }
+
+   void  setWay (bool sens)        { prop_way = sens; }
+   int   setLaw (Law* loi);
+
+public:
+    Propagation  ();
+    void saveXml (XmlWriter& xml);
+    void addEdge (Edge* arete);
+    void majLaw  ();
+
+private:
+    Edges prop_edges;
+    Law*  prop_law;
+    bool  prop_way;
+};
+// =========================================================== Constructeur
+inline Propagation::Propagation ()
+{
+    prop_law = NULL;
+    prop_way = true;
+}
+// =========================================================== getLaw
+inline Law* Propagation::getLaw ()
+{
+    return prop_law; 
+/* **********************************  Modif Abu du 18/10/2010
+    if (prop_law != NULL) 
+       return prop_law; 
+
+    if (prop_edges.size()==0) 
+       return NULL;
+
+    Document* root = prop_edges[0]->dad();
+    return root->getLaw (0);
+   ********************************** */
+}
+// =========================================================== setLaw
+inline int Propagation::setLaw (Law* loi)
+{
+   prop_law = loi; 
+   majLaw ();
+   return HOK;
+}
+// =========================================================== majLaw
+inline void Propagation::majLaw ()
+{
+   int nbre = prop_edges.size();
+   for (int nro=0 ; nro < nbre ; nro++)
+        prop_edges[0]->setLaw (prop_law);
+}
+// =========================================================== addEdge
+inline void Propagation::addEdge (Edge* arete)
+{
+   prop_edges.push_back (arete);
+
+   if (prop_law == NULL)
+       prop_law =  arete->getLaw();
+}
+// =========================================================== saveXml
+inline void Propagation::saveXml (XmlWriter& xml)
+{
+    char   buffer[12];
+    cpchar booleen [] = { "true", "false" };
+    cpchar law = prop_law == NULL ? "default" : prop_law->getName();
+
+    xml.openMark     ("Propagation");
+    xml.addAttribute ("edge", prop_edges[0]->getName (buffer));
+    xml.addAttribute ("law",  law);
+    xml.addAttribute ("way",  booleen [prop_way]);
+    xml.closeMark ();
+}
+END_NAMESPACE_HEXA
+
+#endif
diff --git a/src/HEXABLOCK/HexQuad.cxx b/src/HEXABLOCK/HexQuad.cxx
new file mode 100755 (executable)
index 0000000..32089b2
--- /dev/null
@@ -0,0 +1,427 @@
+
+// C++ : Gestion des Quadrangles
+
+#include "HexQuad.hxx"
+
+#include "HexDocument.hxx"
+#include "HexHexa.hxx"
+#include "HexElements.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexShape.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Quad::Quad (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd)
+    : EltBase (va->dad(), EL_QUAD)
+{
+   q_vertex [E_A] = va;
+   q_vertex [E_B] = vb;
+   q_vertex [E_C] = vc;
+   q_vertex [E_D] = vd;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       q_edge [nro] = new Edge (q_vertex[nro], 
+                                q_vertex[(nro+1) MODULO QUAD4]);
+       }
+
+   majReferences ();
+}
+// ======================================================== Constructeur bis
+Quad::Quad (Edge* ea, Edge* eb, Edge* ec, Edge* ed)
+    : EltBase (ea->dad(), EL_QUAD)
+{
+   q_edge [E_A] = ea;
+   q_edge [E_B] = eb;
+   q_edge [E_C] = ec;
+   q_edge [E_D] = ed;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       int ns = (nro+1) MODULO QUAD4; 
+       Vertex* node = NULL;
+       int nc  = q_edge[nro] -> inter (q_edge[ns]);
+       if (nc>=0)
+          node = q_edge[nro]->getVertex (nc);
+       else  
+          el_status = 888;
+       q_vertex [ns] = node;
+       }
+
+   if (el_status != HOK)
+      {
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      printf (" +++ Quadrangle impossible \n");
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      dump ();
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // el_root->dump ();
+      for (int ned=0; ned<QUAD4; ned++) 
+          {
+          q_edge[ned]->dumpPlus ();
+          }
+      HexDump (q_vertex[0]);
+      HexDump (q_vertex[1]);
+      HexDump (q_vertex[2]);
+      HexDump (q_vertex[3]);
+
+      printf (" +++++++++++++++++++++++++++++++++++++++++++ \n");
+      // exit (1);
+      }
+
+   majReferences ();
+}
+// ======================================================== Constructeur bis
+Quad::Quad (Quad* other)
+    : EltBase (other->dad(), EL_QUAD)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       q_edge   [nro] = NULL;
+       q_vertex [nro] = NULL;
+       }
+}
+// ========================================================= getParent 
+void Quad::majReferences ()
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       q_edge [nro] -> addParent (this);
+}
+// ========================================================= getParent 
+Hexa* Quad::getParent  (int nro)
+{
+   return static_cast <Hexa*> (getFather (nro));
+}
+// ======================================================== anaMerge
+int Quad::anaMerge (Vertex* v1, Vertex* v2, Vertex* tv1[], Edge* te1[])
+{
+   int orig = NOTHING;
+   for (int nro=0 ; orig == NOTHING && nro < QUAD4 ; nro++)
+       if (q_vertex [nro] == v1)
+           orig = nro;
+
+   if (orig==NOTHING)
+      return HERR;
+
+   int nsp1 = (orig+1)       MODULO QUAD4;
+   int nsm1 = (orig+QUAD4-1) MODULO QUAD4;
+
+   if (q_vertex [nsp1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          {
+          tv1 [nro] = q_vertex [(orig+nro) MODULO QUAD4];
+          te1 [nro] = q_edge   [(orig+nro) MODULO QUAD4];
+          }
+      }
+   else if (q_vertex [nsm1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          {
+          tv1 [nro] = q_vertex [(orig+QUAD4-nro) MODULO QUAD4];
+          te1 [nro] = q_edge   [(orig+QUAD4-nro) MODULO QUAD4];
+          }
+      }
+   else 
+      return 588;
+
+   return HOK;
+}
+// ======================================================== ordoVertex
+int Quad::ordoVertex (Vertex* v1, Vertex* v2, Vertex* tv1[])
+{
+   int orig = NOTHING;
+   for (int nro=0 ; orig == NOTHING && nro < QUAD4 ; nro++)
+       if (q_vertex [nro] == v1)
+           orig = nro;
+
+   if (orig==NOTHING)
+      return HERR;
+
+   int nsp1 = (orig+1)       MODULO QUAD4;
+   int nsm1 = (orig+QUAD4-1) MODULO QUAD4;
+
+   if (q_vertex [nsp1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          tv1 [nro] = q_vertex [(orig+nro) MODULO QUAD4];
+      }
+   else if (q_vertex [nsm1] == v2) 
+      {
+      for (int nro=0 ; nro < QUAD4 ; nro++)
+          tv1 [nro] = q_vertex [(orig+QUAD4-nro) MODULO QUAD4];
+      }
+   else 
+      return 588;
+
+   return HOK;
+}
+// ======================================================== getBrother
+Quad* Quad::getBrother (StrOrient* orient)
+{
+/* *****************************
+   printf (" getBrother ");
+   dump ();
+   printf (" .. Base  : ");
+   orient->v21->printName();
+   orient->v22->printName();
+   printf ("dir=%d, arete=", orient->dir);
+  ***************************** */
+
+   int n21 = indexVertex (orient->v21);
+   int n22 = indexVertex (orient->v22);
+
+   int sens  = n22 - n21;
+   if (sens >  1) sens -= QUAD4;
+   if (sens < -1) sens += QUAD4;
+   if (sens*sens !=1) return NULL;
+
+   switch (orient->dir)
+      {
+      case OR_LEFT  : n22 = n21 - sens;
+           break;
+      case OR_RIGHT : n21 = n22 + sens;
+           break;
+      case OR_FRONT : n21 += 2; 
+                      n22 += 2; 
+           break;
+      default : ;
+      }
+
+   n21 = (n21 + QUAD4) MODULO QUAD4;
+   n22 = (n22 + QUAD4) MODULO QUAD4;
+
+   orient->v21 = q_vertex [n21];
+   orient->v22 = q_vertex [n22];
+
+   Edge* arete  = findEdge (orient->v21, orient->v22);
+   arete->printName("\n");
+
+   int nbfreres = arete->getNbrParents ();
+
+   for (int nq = 0 ; nq < nbfreres ; nq++)
+       {
+       Quad* next = arete->getParent (nq);
+       if (next!=NULL && next != this )
+          {
+          int   nbp   = next->getNbrParents();
+          Hexa* dad   = next->getParent(0);
+          int   mark  = next->getMark();
+          int   mark2 = dad ? dad->getMark() : IS_NONE;
+
+          if (nbp  <= 1  && mark2 != IS_MARRIED && mark == IS_NONE)
+             return next;
+          // if (nbp  <= 1  && mark == IS_NONE)
+             // return next;
+          }
+       }
+   return NULL;
+}
+// ======================================================== coupler
+int Quad::coupler (Quad* other, StrOrient* orient, Elements* table)
+{
+   if (other==NULL) 
+      return HERR;
+
+   Hexa* hexa = other->getParent(0);
+
+   setMark (IS_MARRIED);
+   other->setMark (IS_MARRIED);
+   if (hexa != NULL)
+       hexa->setMark (IS_MARRIED);
+
+   for (int ned = 0 ; ned < QUAD4 ; ned++)
+       {
+       Edge* arete  = q_edge[ned]; 
+       int nbfreres = arete ->getNbrParents (); 
+       for (int nq = 0 ; nq < nbfreres ; nq++)
+           {
+           Quad* next = arete->getParent (nq);
+           if (next!=NULL && next != this && next->getMark() > 0)
+              {
+              StrOrient new_ori (orient);
+              new_ori.dir = OR_FRONT;
+              Vertex* va  = arete->getVertex (V_AMONT); 
+              Vertex* vb  = arete->getVertex (V_AVAL); 
+
+//    On voit si un point de repere est conserve
+              if (va == orient->v11)
+                 {
+                 new_ori.v12 = vb;
+                 new_ori.dir += OR_LEFT;
+                 }
+              else if (vb == orient->v11)
+                 {
+                 new_ori.v12 = va;
+                 new_ori.dir += OR_LEFT;
+                 }
+
+              if (va == orient->v12)
+                 {
+                 new_ori.v11 = vb;
+                 new_ori.dir += OR_RIGHT;
+                 }
+              else if (vb == orient->v12)
+                 {
+                 new_ori.v11 = va;
+                 new_ori.dir += OR_RIGHT;
+                 }
+
+              if (new_ori.dir == OR_FRONT)
+                 {
+                 if (definedBy (va, orient->v11))
+                    {
+                    new_ori.v11 = va;
+                    new_ori.v12 = vb;
+                    }
+                 else
+                    {
+                    new_ori.v11 = vb;
+                    new_ori.v12 = va;
+                    }
+                 }
+
+              int nro = next->getMark ();
+              Quad* beauf = other->getBrother (&new_ori);
+              table->coupler (nro, beauf, &new_ori);
+              next->coupler (beauf, &new_ori, table);
+              }
+           }
+       }
+   return HOK;
+}
+// ======================================================== getOpposEdge
+Edge* Quad::getOpposEdge (Edge* start, int& sens)
+{
+   sens = 1;
+   int  na = indexVertex (start->getVertex (V_AMONT));
+   int  nb = indexVertex (start->getVertex (V_AVAL));
+
+   Vertex* vaprim = q_vertex [(nb+2) MODULO QUAD4];
+   Vertex* vbprim = q_vertex [(na+2) MODULO QUAD4];
+
+   for (int ned = 0 ; ned < QUAD4 ; ned++)
+       {
+       if (   q_edge[ned]->getVertex(V_AMONT) == vaprim
+           && q_edge[ned]->getVertex(V_AVAL ) == vbprim)
+           {
+           sens = 1;
+           return q_edge[ned];
+           }
+       else if (   q_edge[ned]->getVertex(V_AMONT) == vbprim
+                && q_edge[ned]->getVertex(V_AVAL ) == vaprim)
+           {
+           sens = -1;
+           return q_edge[ned];
+           }
+       }
+   //             TODO : traiter l'erreur
+   dumpPlus ();
+   for (int ned = 0 ; ned < QUAD4 ; ned++)
+       q_edge[ned]->dump();
+
+   return NULL;
+}
+// ========================================================= getParent 
+void Quad::saveXml (XmlWriter& xml)
+{
+   char buffer[12];
+   string edges;
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (nro>0) edges += " ";
+       edges += q_edge[nro]->getName(buffer);
+       }
+
+   xml.openMark     ("Quad");
+   xml.addAttribute ("id",    getName (buffer));
+   xml.addAttribute ("edges", edges);
+   if (el_assoc!=NULL)
+      xml.addAttribute ("shape", el_assoc->getBrep().c_str());
+   xml.closeMark ();
+}
+// ======================================================== replaceEdge
+void Quad::replaceEdge (Edge* old, Edge* par)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (q_edge[nro]==old) 
+           {
+           q_edge[nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+           }
+       }
+}
+// ======================================================== replaceVertex
+void Quad::replaceVertex (Vertex* old, Vertex* par)
+{
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+       {
+       if (q_vertex [nro]==old) 
+          {
+          q_vertex [nro] = par;
+          if (debug())
+             {
+              printf (" Dans ");
+              printName ();
+              printf (" [%d], ", nro);
+              old->printName (" est remplace par ");
+              par->printName ("\n");
+              }
+          }
+       }
+}
+// ======================================================== dump
+void Quad::dump ()
+{
+   printName(" = (");
+   if (NOT isHere ())
+      {
+      printf ("*** deleted ***)\n");
+      return;
+      }
+
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+        PrintName (q_edge[nro]);
+   printf (")\n" );
+
+   printf ("        (" );
+   for (int nro=0 ; nro<QUAD4 ; nro++)
+        PrintName (q_vertex[nro]);
+   printf (")" );
+
+   dumpRef ();
+}
+// ======================================================== dumpPlus
+void Quad::dumpPlus ()
+{
+   dump ();
+   if (NOT isHere ())
+      return;
+
+   for (int nro=0 ; nro < QUAD4 ; nro++)
+       {
+       Vertex* pv = q_vertex[nro];
+       printf ( "    ");
+       if (pv!=NULL)
+          {
+          pv->printName ("");
+          printf ( " (%g, %g, %g)\n", pv->getX(),  pv->getY(),  pv->getZ());
+          }
+       else
+          {
+          printf ( "NULL\n");
+          }
+       }
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexQuad.hxx b/src/HEXABLOCK/HexQuad.hxx
new file mode 100755 (executable)
index 0000000..0884c63
--- /dev/null
@@ -0,0 +1,192 @@
+
+// class : Les Quadrangles
+
+#ifndef __QUAD_H
+#define __QUAD_H
+
+#include "HexEdge.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+struct StrOrient
+{
+   Vertex* v11;     // 1er sommet 1er quad
+   Vertex* v12;     // 2eme
+   Vertex* v21;     // 1er sommet 2eme quad
+   Vertex* v22;     // 2eme
+   int dir;         // direction element suivant
+
+StrOrient ( Vertex* n11, Vertex* n12, Vertex* n21, Vertex* n22, int d=0)
+    : v11 (n11), v12 (n12), v21 (n21), v22 (n22), dir (d) {}
+
+StrOrient ( StrOrient* s)
+    : v11 (s->v11), v12(s->v12), v21(s->v21), v22(s->v22), dir(s->dir){}
+
+};
+
+class Quad : public EltBase
+{
+public:
+    virtual Edge*   getEdge   (int  nro);
+    virtual Vertex* getVertex (int  nro);
+
+    virtual int countEdge   () { return QUAD4; } 
+    virtual int countVertex () { return QUAD4; } 
+public:
+    Quad (Vertex* va, Vertex* vb, Vertex* vc, Vertex* vd);
+    Quad (Edge* ea, Edge* eb, Edge* ec, Edge* ed);
+    Quad (Quad* other);
+
+    Hexa* getParent (int nro);
+
+    Edge* findEdge   (Vertex* v1, Vertex*v2);
+    Edge* commonEdge (Quad* other);
+    int   anaMerge (Vertex* v1, Vertex* v2, Vertex* tv[], Edge* te[]);
+
+    int   ordoVertex (Vertex* v1, Vertex* v2, Vertex* tv[]);
+    int   prepaMerge (Vertex* tv1[], Vertex* tv2[], Edge* te1[]);
+
+    int   inter     (Quad* other, int& nro);
+    bool  definedBy (Vertex* v1, Vertex* v2);
+    bool  definedBy (Edge*   e1,  Edge*   e2);
+
+    int   indexVertex (Vertex* elt);
+    int   indexEdge   (Edge*   elt);
+
+    int   getOrientation (Vertex* v1, Vertex* v2, int &n1, int& n2);
+    int   accoupler (Quad* other, StrOrient* orient);
+    int   coupler (Quad* other, StrOrient* orient, Elements* table);
+
+    Edge* getOpposEdge (Edge* arete, int &sens);
+
+    virtual void majReferences();            // M.A.J relation "utilise par"
+    virtual void dump ();
+    virtual void dumpPlus ();
+    virtual void saveXml (XmlWriter& xml);
+    void setScalar (double valeur);
+
+    virtual void replaceEdge   (Edge*   old, Edge*   nouveau);
+    virtual void replaceVertex (Vertex* old, Vertex* nouveau);
+
+    int   addAssociation (Shape* forme); 
+    const std::vector <Shape*> & getAssociations () { return tab_assoc ; }
+
+private:
+    friend class Cloner;
+    Quad* getBrother (StrOrient* orient);
+    
+private:
+    Edge*   q_edge   [QUAD4];
+    Vertex* q_vertex [QUAD4];
+
+    std::vector <Shape*> tab_assoc;
+};
+// ----------------------------------------------- Inlining
+// ========================================================== addAssociation
+inline int Quad::addAssociation (Shape* forme)
+{
+   tab_assoc.push_back (forme);
+   return HOK;
+}
+// ============================================================  getEdge
+inline Edge* Quad::getEdge (int nro) 
+{
+   Edge* elt = NULL;
+   if (nro >=0 && nro < QUAD4 && el_status == HOK && q_edge [nro]->isValid())
+      elt = q_edge [nro]; 
+
+   return elt;
+}
+// ============================================================  getVertex
+inline Vertex* Quad::getVertex (int nro) 
+{
+   Vertex* elt = NULL;
+   if (nro >=0 && nro < QUAD4 && el_status == HOK && q_vertex [nro]->isValid())
+      elt = q_vertex [nro]; 
+
+   return elt;
+}
+// ======================================================== commonEdge
+inline Edge* Quad::commonEdge (Quad* other)
+{
+   for (int ne1=0 ; ne1<QUAD4 ; ne1++) 
+       for (int ne2=0 ; ne2<QUAD4 ; ne2++) 
+           if (q_edge [ne1] == other->q_edge [ne2])
+              return q_edge [ne1];
+
+   return NULL;
+}
+
+// ======================================================== Inter
+inline int Quad::inter (Quad* other, int& nro)
+{
+   for (int ne1=0 ; ne1<QUAD4 ; ne1++) 
+       for (int ne2=0 ; ne2<QUAD4 ; ne2++) 
+           if (q_edge [ne1] == other->q_edge [ne2])
+              {
+              nro  = ne2;
+              return ne1;
+              }
+
+   nro  = NOTHING;
+   return NOTHING;
+}
+// ============================================================ definedBy (v)
+inline bool Quad::definedBy  (Vertex* v1, Vertex* v2)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (v1 == q_vertex[n1] && v2 == q_vertex[(n1+2) MODULO QUAD4])
+          return true;
+
+   return false;
+}
+// ============================================================ definedBy (e)
+inline bool Quad::definedBy  (Edge* e1, Edge* e2)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (e1 == q_edge[n1] && e2 == q_edge[(n1+2) MODULO QUAD4])
+          return true;
+
+   return false;
+}
+// =============================================================== findEdge
+inline Edge* Quad::findEdge (Vertex* v1, Vertex* v2)
+{
+   for (int nro=0 ; nro< QUAD4 ; nro++)
+       {
+       Vertex* va = q_edge[nro]->getVertex(V_AMONT) ;
+       Vertex* vb = q_edge[nro]->getVertex(V_AVAL) ;
+       if ((v1==va && v2==vb) || (v1==vb && v2==va))
+           return q_edge [nro];
+       }
+
+   return NULL;
+}
+// =============================================================== indexVertex
+inline int Quad::indexVertex  (Vertex* elt)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (elt == q_vertex[n1]) 
+          return n1;
+
+   return NOTHING;
+}
+// =============================================================== indexEdge
+inline int Quad::indexEdge  (Edge* elt)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       if (elt == q_edge[n1]) 
+          return n1;
+
+   return NOTHING;
+}
+// =============================================================== setScalar
+inline void Quad::setScalar  (double val)
+{
+   for (int n1=0 ; n1< QUAD4 ; n1++)
+       q_vertex[n1] -> setScalar (val);
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexShape.cxx b/src/HEXABLOCK/HexShape.cxx
new file mode 100755 (executable)
index 0000000..cf95dda
--- /dev/null
@@ -0,0 +1,29 @@
+
+// C++ : Gestion des noeuds
+
+#include "HexShape.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// int Shape::nbr_shapes = 0;
+
+// ====================================================== Constructeur
+Shape::Shape  (string brep)
+{
+   b_rep = brep;
+   debut = 0;
+   fin   = 1;
+
+   // nbr_shapes++;
+   // nro_shape = nbr_shapes;
+}
+
+// ========================================================= getName 
+/***************************************************
+char* Shape::getName  (char* buffer)
+{
+   sprintf (buffer, "Shape0x%04d", nro_shape);
+   return   buffer;
+}
+  *************************************************** */
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexShape.hxx b/src/HEXABLOCK/HexShape.hxx
new file mode 100755 (executable)
index 0000000..cec8612
--- /dev/null
@@ -0,0 +1,36 @@
+
+// Class : Implementation provisoire et symbolique de la classe "shape"
+//
+
+// #ifdef  _NO_CASCADE 
+#ifndef __SHAPE_H_
+#define __SHAPE_H_
+
+#include "hexa_base.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Shape 
+{
+public :
+    Shape (string brep);
+    string getBrep ()  { return b_rep; }
+
+public :
+    double debut;   
+    double fin;   
+
+public :
+    // char* getName (char* buffer);
+
+private :
+    // int nro_shape;
+    // static int nbr_shapes;
+    std::string b_rep;
+};
+
+typedef Shape* TopoDS_Shape;
+
+END_NAMESPACE_HEXA
+#endif
+// #endif
diff --git a/src/HEXABLOCK/HexVector.cxx b/src/HEXABLOCK/HexVector.cxx
new file mode 100755 (executable)
index 0000000..53075b1
--- /dev/null
@@ -0,0 +1,63 @@
+
+// C++ : Gestion des aretes
+
+#include "HexVector.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== Constructeur
+Vector::Vector (Document* doc, double dx, double dy, double dz)
+      : EltBase (doc)
+{
+    v_dx = dx;
+    v_dy = dy;
+    v_dz = dz;
+}
+// ======================================================== Constructeur bis
+Vector::Vector (Vector* lautre)
+      : EltBase (lautre->el_root)
+{
+    v_dx = lautre -> v_dx;
+    v_dy = lautre -> v_dy;
+    v_dz = lautre -> v_dz;
+}
+
+// ======================================================== calculNormale
+// === Calcule un vecteur orthogonal et norme
+int Vector::calculNormale (double& nx, double& ny, double& nz)
+{
+    double epsil = (v_dx * v_dx + v_dy * v_dy + v_dz * v_dz)*1e-6;
+    int    forme = 2000;
+    if  (v_dx > epsil || v_dx < -epsil) forme += 100;
+    if  (v_dy > epsil || v_dy < -epsil) forme +=  10;
+    if  (v_dz > epsil || v_dz < -epsil) forme +=   1;
+
+    nx = ny = nz = 0;
+    switch (forme)
+       {
+                             // dx=dy=dz=0 : retour vecteur i + erreur
+       case 2000 : nx = 1; 
+                   return HERR;
+                             // dx = 0 : on prend le vecteur i
+       case 2001 :  
+       case 2010 :  
+       case 2011 : nx = 1;
+                   return HOK;  
+                             // dy = 0 : on prend le vecteur j
+       case 2100 :  
+       case 2101 : ny = 1; 
+                   return HOK;  
+                             // dz = 0 : on prend le vecteur k
+       case 2110 : nz = 1;
+                   return HOK;  
+                             // dx, dy, dy non nuls : cas general;
+       default :;
+       }
+
+   double norme = sqrt (v_dx*v_dx + v_dy*v_dy);
+   nx =  v_dy / norme;
+   ny = -v_dx / norme;
+   return HOK;  
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexVector.hxx b/src/HEXABLOCK/HexVector.hxx
new file mode 100755 (executable)
index 0000000..875a138
--- /dev/null
@@ -0,0 +1,85 @@
+
+// class : Les vecteurs
+
+#ifndef __VECTOR_H
+#define __VECTOR_H
+
+#include "HexEltBase.hxx"
+
+#include <cmath>
+
+BEGIN_NAMESPACE_HEXA
+
+class Vector : public EltBase
+{
+public:
+    double getDx ();
+    double getDy ();
+    double getDz ();
+
+public:
+    Vector (Document* doc, double dx=0, double dy=0, double dz=0);
+    Vector (Vector* lautre);
+    virtual ~Vector () {}
+    virtual void dump ();
+
+    double norme   ()    { return sqrt (v_dx*v_dx + v_dy*v_dy + v_dz*v_dz); }
+    int    renormer ();
+    void   vectoriel  (Vector* a, Vector*b);
+    void   multiplier (double scal);
+    int    calculNormale (double& nx, double& ny, double& nz);
+
+private:
+    double v_dx;
+    double v_dy;
+    double v_dz;
+};
+// ------------------------------------------- Inlining
+inline double Vector::getDx() { return v_dx; }
+inline double Vector::getDy() { return v_dy; }
+inline double Vector::getDz() { return v_dz; }
+
+// ===================================================== renormer
+inline int Vector::renormer() 
+{
+   double dn = norme ();
+   if (dn < 1e-30) 
+      return HERR;
+
+   v_dx /= dn;
+   v_dy /= dn;
+   v_dz /= dn;
+
+   return HOK;
+}
+// ===================================================== vectoriel
+inline void Vector::vectoriel (Vector* a, Vector*b)
+{
+   v_dx =   a->v_dy * b->v_dz - b->v_dy * a->v_dz; 
+   v_dy =   a->v_dz * b->v_dx - b->v_dz * a->v_dx; 
+   v_dz =   a->v_dx * b->v_dy - b->v_dx * a->v_dy; 
+}
+
+// ===================================================== multiplier
+inline void Vector::multiplier (double scalaire)
+{
+   v_dx *= scalaire;
+   v_dy *= scalaire;
+   v_dz *= scalaire;
+}
+// ===================================================== dump
+inline void Vector::dump ()
+{
+   printf ("Vector ");
+   printName (" = ");
+   if (NOT isHere ())
+      {
+      printf ("(*** deleted ***)\n");
+      return;
+      }
+
+   printf ("(%g, %g, %g)\n", v_dx,v_dy,v_dz);
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexVertex.cxx b/src/HEXABLOCK/HexVertex.cxx
new file mode 100755 (executable)
index 0000000..2170896
--- /dev/null
@@ -0,0 +1,59 @@
+
+// C++ : Gestion des noeuds
+
+#include "HexVertex.hxx"
+#include "HexEdge.hxx"
+#include "HexVector.hxx"
+
+#include "HexXmlWriter.hxx"
+#include "HexShape.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+// ====================================================== Constructeur
+Vertex::Vertex  (Document* doc, double x, double y, double z)
+      : EltBase (doc, EL_VERTEX)
+{
+   v_x = x;
+   v_y = y;
+   v_z = z;
+   v_scalar = 0;
+}
+// ========================================================= getParent 
+Edge* Vertex::getParent  (int nro)
+{
+   return static_cast <Edge*> (getFather (nro));
+}
+// ========================================================= saveXml 
+void Vertex::saveXml  (XmlWriter& xml)
+{
+   char buffer[12], coord[80];
+
+   sprintf (coord, "%g %g %g", v_x,v_y,v_z);
+
+   xml.openMark     ("Vertex");
+   xml.addAttribute ("id",    getName (buffer));
+   xml.addAttribute ("coord", coord);
+   if (el_assoc!=NULL)
+      xml.addAttribute ("shape", el_assoc->getBrep().c_str());
+   xml.closeMark ();
+}
+// ========================================================= translate 
+void  Vertex::translate  (Vector* vecteur, double fact)
+{
+    v_x += fact*vecteur->getDx ();
+    v_y += fact*vecteur->getDy ();
+    v_z += fact*vecteur->getDz ();
+}
+// ========================================================= createMiddle 
+Vertex* Vertex::createMiddle  (Vertex* left, Vertex* right)
+{
+    Vertex* milieu = new Vertex (left);
+
+    milieu->v_x = (left->v_x + right->v_x) / 2;
+    milieu->v_y = (left->v_y + right->v_y) / 2;
+    milieu->v_z = (left->v_z + right->v_z) / 2;
+
+    return milieu;
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexVertex.hxx b/src/HEXABLOCK/HexVertex.hxx
new file mode 100755 (executable)
index 0000000..6b534e9
--- /dev/null
@@ -0,0 +1,87 @@
+
+// Class : Gestion des sommets 
+//
+#ifndef __VERTEX_H_
+#define __VERTEX_H_
+
+#include "HexEltBase.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+class Vertex : public EltBase 
+{
+public :
+   double getX()   { return v_x; }
+   double getY()   { return v_y; }
+   double getZ()   { return v_z; }
+
+   void setX (double v)   { v_x = v ; }
+   void setY (double v)   { v_y = v ; }
+   void setZ (double v)   { v_z = v ; }
+
+public :
+   Vertex (Document* prev, double x=0.0, double y=0.0, double z=0.0); 
+   Vertex (Vertex* other);
+   virtual ~Vertex () {}
+   virtual void dump () ;
+   virtual void saveXml (XmlWriter& xml);
+
+   void   setScalar (double val)             { v_scalar = val ; }
+   double getScalar ()                       { return v_scalar ; }
+
+   void setCoord  (double x, double y, double z);
+   bool isin      (double xmin, double xmax, double ymin, double ymax, 
+                                            double zmin, double zmax);
+   Edge* getParent (int nro); 
+   Vertex* makeSymetric (Vertex* other);
+   void    translate  (Vector* vecteur, double fact=1.0);
+
+   static Vertex* createMiddle (Vertex* left, Vertex* right);
+
+private :
+    double v_x;
+    double v_y;
+    double v_z;
+
+    double v_scalar;
+};
+// ========================================================= Constructeur bis 
+inline Vertex::Vertex (Vertex* other)
+      : EltBase (other->dad(), EL_VERTEX)
+{
+   v_x = other->v_x;
+   v_y = other->v_y;
+   v_z = other->v_z;
+   v_scalar = 0;
+}
+// ========================================================= dump 
+inline void Vertex::dump ()
+{
+   printName (" = ");
+   if (NOT isHere ())
+      {
+      printf ("(*** deleted ***)\n");
+      return;
+      }
+
+   printf ("(%g, %g, %g)", v_x,v_y,v_z);
+   dumpRef ();
+}
+// ========================================================= setCoord 
+inline void Vertex::setCoord (double x, double y, double z)
+{
+   v_x = x;
+   v_y = y;
+   v_z = z;
+}
+// ========================================================= isin 
+inline bool Vertex::isin  (double xmin, double xmax, double ymin, double ymax, 
+                                             double zmin, double zmax)
+{
+   bool   rep =   v_x >= xmin && v_x <= xmax
+               && v_y >= ymin && v_y <= ymax
+               && v_z >= zmin && v_z <= zmax;
+   return rep;
+}
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexXmlTree.cxx b/src/HEXABLOCK/HexXmlTree.cxx
new file mode 100755 (executable)
index 0000000..7c28266
--- /dev/null
@@ -0,0 +1,355 @@
+
+// C++ : ParserXml
+
+#include "HexXmlTree.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+enum { HEND_FILE = -2, HEND_LINE = -1, CRLF = 13 };
+
+// ====================================================== Constructeur 
+XmlTree::XmlTree (const string& nom, XmlTree* dad)
+{
+    item_name     = nom;
+    item_vide     = "";
+    xml_parent    = dad;
+    nbr_attributs = 0;
+    nbr_items     = 0;
+
+   fic_buffer  = "";
+   len_buffer  = 0;
+   fic_xml     = NULL;
+   nro_ligne   = 0;
+   fic_pos     = 1988;
+}
+// ====================================================== Destructeur
+XmlTree::~XmlTree ()
+{
+}
+// ====================================================== findChild
+XmlTree* XmlTree::findChild (const string& nom)
+{
+   for (int nro = 0 ; nro<nbr_items ; nro++)
+       {
+       if (nom == tab_items [nro]->item_name)
+           return tab_items [nro];
+       }
+   return NULL;
+}
+// ====================================================== findAttribute
+int XmlTree::findAttribute (const string& nom)
+{
+   for (int nro = 0 ; nro<nbr_attributs ; nro++)
+       {
+       if (nom == tab_attributs [nro])
+          return nro;
+       }
+   return NOTHING;
+}
+// ====================================================== findValue
+const string& XmlTree::findValue (const string& nom)
+{
+   for (int nro = 0 ; nro<nbr_attributs ; nro++)
+       {
+       if (nom == tab_attributs [nro])
+          return  tab_values    [nro];
+       }
+   return item_vide;
+}
+// ====================================================== parseFile
+int XmlTree::parseFile (const string& ficnom)
+{
+   fic_buffer  = "";
+   len_buffer  = 0;
+   nro_ligne   = 0;
+   fic_pos     = 1988;
+
+   fic_xml = fopen (ficnom.c_str(), "r");
+   if (fic_xml==NULL)
+      return HERR;
+
+   enum EnumEtat { M_PREMS, M_BALISE_OUVERTE, M_NEUTRE };
+   EnumEtat etat =  M_PREMS;
+
+   XmlTree* node = this;
+   EnumItem item_lu;
+   string   nom, valeur, foo;
+   while ((item_lu=readItem (nom)) != M_NONE)
+      {
+      switch (item_lu) 
+         {
+         case M_BEGIN :
+              item_lu = getItem (nom, M_IDENT);
+              if (etat==M_PREMS) 
+                 setName (nom);
+              else
+                 node = node -> addChild  (nom);
+              etat = M_BALISE_OUVERTE;
+              break;
+
+         case M_END   :
+              if (etat != M_BALISE_OUVERTE) 
+                 putError (" balise ouverte");
+              etat = M_NEUTRE;
+              break;
+
+         case M_BEGIN_CLOSE :
+              if (etat == M_BALISE_OUVERTE) 
+                 putError (" balise ouverte");
+              getItem (nom, M_IDENT);
+              getItem (foo, M_END);
+              node = node -> getParent ();
+              break;
+
+         case M_CLOSE :
+              if (etat != M_BALISE_OUVERTE) 
+                 putError (" balise deja fermee");
+              node = node -> getParent ();
+              etat = M_NEUTRE;
+              break;
+
+         case M_IDENT :
+              getItem (valeur, M_EQUALS);
+              getItem (valeur, M_STRING);
+              node -> addAttribut (nom, valeur);
+              break;
+
+         case M_COMMENT : goTo ("-->");
+              break;
+
+         case M_PROLOG  : goTo ("?>");
+              break;
+
+         default :
+         case M_EQUALS :
+         case M_STRING :
+         case M_END_COMMENT :
+         case M_END_PROLOG :
+              putError ("Item incorrect");
+         }
+      }
+   return HOK;
+}
+// ====================================================== getItem
+EnumItem XmlTree::getItem (string& value, EnumItem waited)
+{
+   EnumItem item = readItem (value);
+
+   if (item == waited) 
+      return item;
+   putError ("Erreur de sequence");
+   return item;
+}
+// ====================================================== readItem
+EnumItem XmlTree::readItem (string& value)
+{
+   value  = "";
+
+   while (true)
+         {
+         if (fic_pos>=len_buffer)
+            {
+            int ier=readLine ();
+            if (ier==HEND_FILE) 
+               return M_NONE;
+            }
+         else
+            {
+            char  car = fic_buffer [fic_pos++];
+
+            if (car=='=')
+               return M_EQUALS;
+            else if (car=='>')
+               return M_END;
+            else if (car=='"')
+               {
+               getString (value);
+               return M_STRING;
+               }
+            else if (isalpha (car))
+               {
+               getIdent (value);
+               return M_IDENT;
+               }
+
+            char ncar = fic_pos >= len_buffer ? ' ' : fic_buffer [fic_pos];
+            if (car=='/' && ncar == '>')
+               {
+               fic_pos++;
+               return M_CLOSE;
+               }
+            else if (car=='<')
+               {
+               if (ncar=='/') 
+                  {
+                  fic_pos++;
+                  return M_BEGIN_CLOSE;
+                  }
+               else if (ncar=='?') 
+                  {
+                  fic_pos++;
+                  return M_PROLOG;
+                  }
+               else if (ncar=='!') 
+                  {
+                  fic_pos++;
+                  return M_COMMENT;
+                  }
+               else
+                  return M_BEGIN;
+               }
+            }
+         }
+}
+// ====================================================== getIdent
+int XmlTree::getIdent (string& ident)
+{
+   ident = "";
+
+   for (int nc=fic_pos-1; nc<len_buffer ; nc++)
+       {
+       char car = fic_buffer[nc];
+       if (isalnum (car))
+           {
+           ident.push_back (car);
+           }
+       else
+           {
+           fic_pos = nc;
+           return HOK;
+           }
+       }
+
+   fic_pos = len_buffer;
+   return HOK;
+}
+// ====================================================== goTo
+int XmlTree::goTo (cpchar ouca)
+{
+   int nbc = strlen (ouca) - 1;
+   int pos = 0;
+   int car = ' ';
+
+   while ((car = getChar ()) != EOF)
+       {
+       if (car!=ouca[pos])
+          pos = 0;
+       else if (pos<nbc)
+          pos++;
+       else 
+          return HOK;
+       }
+
+   return HERR;
+}
+// ====================================================== getString
+int XmlTree::getString (string& chaine)
+{
+   chaine  = "";
+   int car = ' ';
+
+   while ((car = getChar ()) != EOF)
+       {
+       if (car=='"') 
+          return HOK;
+       chaine.push_back (car); 
+       }
+
+   return HERR;
+}
+// ====================================================== getChar
+int XmlTree::getChar ()
+{
+   while (true)
+         {
+         if (fic_pos<len_buffer)
+            {
+            fic_pos++;
+            return fic_buffer [fic_pos-1];
+            }
+         int ier = readLine ();
+         if (ier==HEND_FILE)
+            return EOF;
+         else
+            return EOL;
+         }
+}
+// ====================================================== readLine
+int XmlTree::readLine ()
+{
+   nro_ligne++;
+   fic_buffer = "";
+   fic_pos    = 0;
+
+   if (fic_xml==NULL || feof (fic_xml))
+       return HEND_FILE;
+
+   len_buffer = 0;
+   int ier = HEND_LINE;
+   while (ier==HEND_LINE)
+         {
+         int carac = fgetc (fic_xml);
+         if (carac==EOL || carac==CRLF)
+            {
+            ier = HOK;
+            }
+         else if (carac!=EOF)
+            {
+            fic_buffer.push_back (carac); 
+            len_buffer ++;
+            }
+         else if (len_buffer > 0)
+            ier = HOK;
+         else 
+            ier = HEND_FILE;
+         }
+   return HOK;
+}
+// ====================================================== putError
+void XmlTree::putError (cpchar mess)
+{
+     printf (" ***** Erreur : %s\n", mess);
+     printf (" +++ Derniere ligne lue : nro %d, %deme caractere\n", 
+               nro_ligne, fic_pos);
+     printf ("%s\n", fic_buffer.c_str());
+     //  exit (102);
+}
+// ====================================================== addChild
+XmlTree* XmlTree::addChild (const string& nom)
+{
+   XmlTree* child = new XmlTree (nom, this);
+   tab_items.push_back (child);
+   nbr_items ++;
+   return child;
+}
+// ====================================================== addAttribut
+void XmlTree::addAttribut (const string& nom, const string& value)
+{
+   tab_attributs.push_back (nom);
+   tab_values   .push_back (value);
+   nbr_attributs ++;
+   // printf (" %s = %s\n", nom.c_str(), value.c_str());
+}
+// ====================================================== dump
+void XmlTree::dump (int niveau)
+{
+   string marge = "";
+   for (int niv=0 ; niv<niveau ; niv++)
+       marge += " | ";
+
+   cout << marge << item_name << endl;
+
+   for (int nc=0 ; nc<nbr_attributs ; nc++)
+       {
+       cout << marge  << " : " 
+            << tab_attributs [nc] << " = '" << tab_values [nc] 
+            << "'" << endl;
+       }
+
+   for (int nc=0 ; nc<nbr_items ; nc++)
+       {
+       tab_items [nc]->dump (niveau+1);
+       }
+
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexXmlTree.hxx b/src/HEXABLOCK/HexXmlTree.hxx
new file mode 100755 (executable)
index 0000000..4b2d48b
--- /dev/null
@@ -0,0 +1,75 @@
+
+// Class : Ecriture d'un fichier XML
+//
+#ifndef __XML_TREE_H_
+#define __XML_TREE_H_
+
+#include "hexa_base.hxx"
+
+#include <vector>
+
+BEGIN_NAMESPACE_HEXA
+
+   enum EnumItem { M_NONE,  M_BEGIN, M_END, M_BEGIN_CLOSE, M_CLOSE,
+                   M_IDENT, M_EQUALS, M_STRING, 
+                   M_COMMENT, M_END_COMMENT, M_PROLOG, M_END_PROLOG,
+                   M_ERROR};
+class XmlTree 
+{
+public :
+   XmlTree (const string& name, XmlTree* dad=NULL);
+  ~XmlTree ();
+
+   int  parseFile (const string& name);
+
+   cpchar getName  ()   { return item_name.c_str() ; }
+   int    getNbrAttributs  ()   { return nbr_attributs ; }
+   int    getNbrChildren   ()   { return nbr_items     ; }
+
+   int           findAttribute (const string& nom);
+   const string& findValue     (const string& nom);
+
+   cpchar   getAttribute  (int nro)    { return tab_attributs [nro].c_str(); }
+   cpchar   getValue      (int nro)    { return tab_values    [nro].c_str(); }
+
+   XmlTree* findChild    (const string& nom);
+   XmlTree* getChild     (int nro)    { return tab_items [nro]; }
+   XmlTree* getParent    ()           { return xml_parent; }
+
+                  // ------------------------- Modifications
+
+   XmlTree* addChild    (const string& nom);
+   void     addAttribut (const string& nom, const string& valeur);
+   void     setName     (const string&  nom)   { item_name = nom; }
+   void     dump        (int niveau=0);
+
+   int      goTo        (cpchar  ouca);
+
+private :
+   int  readLine ();
+   EnumItem  readItem  (string& item);
+   EnumItem  getItem   (string& item, EnumItem waited=M_NONE);
+   int       getString (string& item);
+   int       getIdent  (string& item);
+   int       getChar   ();
+   void      putError  (cpchar why);
+
+private :
+   string   item_name;
+   string   item_vide;
+   int      nbr_attributs;
+   int      nbr_items;
+   XmlTree* xml_parent;
+
+   vector <string>   tab_attributs;
+   vector <string>   tab_values;
+   vector <XmlTree*> tab_items;
+                               // Lecture
+   string   fic_buffer;
+   int      len_buffer;
+   pfile    fic_xml;
+   int      nro_ligne;
+   int      fic_pos;
+};
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/HexXmlWriter.cxx b/src/HEXABLOCK/HexXmlWriter.cxx
new file mode 100755 (executable)
index 0000000..1bdb827
--- /dev/null
@@ -0,0 +1,145 @@
+
+// C++ : Ecriture en XML
+
+#include "HexXmlWriter.hxx"
+
+BEGIN_NAMESPACE_HEXA
+
+enum { M_CLOSED, M_OPEN, M_SAUT };
+
+// ========================================================= Constructeur
+XmlWriter::XmlWriter  ()
+{
+   xml_file  = stdout;
+   xml_level = 0;
+   xml_pos   = 0;
+}
+// ========================================================= openXml 
+int XmlWriter::openXml (cpchar nomfic)
+{
+   xml_level    = 0;
+   xml_pos      = 0;
+   string fname = nomfic;
+
+   fname   += ".xml";
+   xml_file = fopen (fname.c_str(), "w");
+   if (xml_file==NULL)
+      {
+      xml_file = stdout;
+      return HERR;
+      }
+   ecrire ("<?xml version='1.0'?>");
+   return HOK;
+}
+// ========================================================= closeXml 
+void XmlWriter::closeXml ()
+{
+   while (NOT pile_mark.empty())
+       closeMark ();
+
+   if (xml_file!=stdout)
+      fclose (xml_file);
+
+   xml_file = stdout;
+}
+// ========================================================= addMark 
+void XmlWriter::addMark (cpchar balise, bool jump)
+{
+   openMark (balise); 
+   ecrire (">");
+   if (jump) 
+      {
+      alaLigne ();
+      pile_etat.top () = M_SAUT;
+      }
+   else
+      {
+      pile_etat.top () = M_CLOSED;
+      }
+}
+// ========================================================= endMark 
+void XmlWriter::endMark ()
+{
+   ecrire ("> ");
+   pile_etat.top () = M_SAUT;
+}
+// ========================================================= openMark 
+void XmlWriter::openMark (cpchar balise)
+{
+   jumpLine ();
+   string mot = "<";
+   mot +=  balise;
+   ecrire (mot);
+
+   pile_mark.push (balise);
+   pile_etat.push (M_OPEN);
+   xml_level ++;
+}
+// ========================================================= closeMark
+void XmlWriter::closeMark (bool jump)
+{
+   string balise = pile_mark.top ();
+   string mot    = "</";
+   int    etat   = pile_etat.top ();
+
+   xml_level --;
+   switch (etat)
+      {
+      case M_OPEN : ecrire (" />");
+                    break;
+      case M_SAUT : jumpLine ();
+      default :
+           mot += balise;
+           mot += ">";
+           ecrire (mot);
+      }
+
+   pile_mark.pop ();
+   pile_etat.pop ();
+   alaLigne ();
+   if (jump) alaLigne (true);
+}
+// ========================================================= jumpLine 
+void XmlWriter::jumpLine ()
+{
+   if (xml_pos>0)
+      putc ('\n', xml_file);
+
+   xml_pos = xml_level * xml_decal;
+   for (int nc=0 ; nc < xml_pos ; nc++) putc (' ', xml_file);
+}
+// ========================================================= ecrire
+void XmlWriter::ecrire (cpchar mot)
+{
+   int lg   = strlen (mot);
+   xml_pos += lg;
+
+   if (xml_pos >= xml_size)
+       {
+       jumpLine ();
+       xml_pos += lg;
+       }
+
+   fprintf (xml_file, mot);
+}
+// ========================================================= alaLigne
+void XmlWriter::alaLigne (bool force)
+{
+   if (xml_pos==0 && NOT force) 
+      return;
+
+   fprintf (xml_file, "\n");
+   xml_pos = 0;
+}
+// ========================================================= addAttribute 
+void XmlWriter::addAttribute (cpchar cle, cpchar valeur)
+{
+   string phrase = " ";
+   phrase += cle;
+   phrase += " = \"";
+   phrase += valeur;
+   phrase += "\"";
+
+   ecrire (phrase);
+}
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/HexXmlWriter.hxx b/src/HEXABLOCK/HexXmlWriter.hxx
new file mode 100755 (executable)
index 0000000..5afcbdb
--- /dev/null
@@ -0,0 +1,68 @@
+
+// Class : Ecriture d'un fichier XML
+//
+#ifndef __XML_WRITER_H
+#define __XML_WRITER_H
+
+#include "hexa_base.hxx"
+#include <stack>
+#include <vector>
+
+BEGIN_NAMESPACE_HEXA
+
+class XmlWriter 
+{
+public :
+   XmlWriter ();
+  ~XmlWriter ()    { closeXml () ; }
+
+   int  openXml  (string& nom) { return openXml (nom.c_str()); }
+   int  openXml  (cpchar nom);
+   void closeXml ();
+
+   void openMark  (cpchar balise);                 // <Balise .. 
+   void addMark   (cpchar balise, bool jump=true); // <Balise> + eol
+   void closeMark (bool jump=false);               // </Balise> ou  />
+   void endMark ();       //         >
+
+   void addAttribute (cpchar attrib, cpchar  valeur); // attrib="valeur"
+   void addAttribute (cpchar attrib, int     valeur);
+   void addAttribute (cpchar attrib, double  valeur);
+   void addAttribute (cpchar attrib, string& valeur);
+
+private :
+    void jumpLine ();
+    void alaLigne (bool force=false);
+    void ecrire   (cpchar  mot);
+    void ecrire   (string& mot) { ecrire (mot.c_str()) ; }
+
+private :
+    enum  {xml_decal=3, xml_size=80};
+    pfile  xml_file;
+    int    xml_level;
+    int    xml_pos;
+    std::stack <std::string, std::vector <std::string> >  pile_mark; 
+    std::stack <int,         std::vector <int> >          pile_etat; 
+};
+// ====================================================== addAttribute (I)
+inline void XmlWriter::addAttribute (cpchar attrib, int valeur)
+{
+   char buffer [20]; 
+   sprintf (buffer, "%d", valeur);
+   addAttribute (attrib, buffer);
+}
+// ====================================================== addAttribute (R)
+inline void XmlWriter::addAttribute (cpchar attrib, double valeur)
+{
+   char buffer [20]; 
+   sprintf (buffer, "%g", valeur);
+   addAttribute (attrib, buffer);
+}
+// ====================================================== addAttribute (stl)
+inline void XmlWriter::addAttribute (cpchar attrib, string& valeur)
+{
+   addAttribute (attrib, valeur.c_str());
+}
+
+END_NAMESPACE_HEXA
+#endif
diff --git a/src/HEXABLOCK/Makefile.am b/src/HEXABLOCK/Makefile.am
new file mode 100755 (executable)
index 0000000..71c345e
--- /dev/null
@@ -0,0 +1,101 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  SuperVisionTest AddComponent : example of component that adds two numbers
+# ddDIST_SUBDIRS = Test
+# ddSUBDIRS = Test
+#  File   : Makefile.in
+#  Author : , CEA
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+
+
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+#      
+# header files  
+salomeinclude_HEADERS = \
+       HexGroups.hxx \
+       HexCylinder.hxx \
+       HexEdge.hxx \
+       HexGlobale.hxx \
+       HexPropagation.hxx \
+       HexVector.hxx \
+       HexXmlWriter.hxx \
+       hexa_base.hxx \
+       HexDiagnostics.hxx \
+       HexElements.hxx \
+       HexHexa.hxx \
+       HexMatrix.hxx \
+       HexQuad.hxx \
+       HexVertex.hxx \
+       HexLaw.hxx \
+       HexCloner.hxx \
+       HexDocument.hxx \
+       HexEltBase.hxx \
+       Hex.hxx \
+       HexPipe.hxx \
+       HexShape.hxx \
+       HexXmlTree.hxx \
+       HexCrossElements.hxx
+
+
+
+# Libraries targets
+# SD/Propagation/HexPropagation.cxx \
+# SD/Law/HexLaw.cxx \
+#
+lib_LTLIBRARIES = libHEXABLOCKimpl.la
+dist_libHEXABLOCKimpl_la_SOURCES = \
+       hexa_utils.cxx \
+       HexEltBase.cxx \
+       HexGlobale.cxx \
+       HexCloner.cxx   \
+       HexVertex.cxx \
+       HexEdge.cxx \
+       HexQuad.cxx \
+       HexHexa.cxx \
+       HexVector.cxx \
+       HexElements.cxx \
+       HexElements_bis.cxx \
+       HexElements_grid.cxx \
+       HexCylinder.cxx \
+       HexPipe.cxx \
+       HexShape.cxx \
+       HexDocument_trans.cxx \
+       HexDocument_Xml.cxx \
+       HexDocument.cxx \
+       HexXmlTree.cxx \
+       HexXmlWriter.cxx \
+       HexCrossElements.cxx \
+       Hex.cxx
+
+# libHEXABLOCKimpl_la_CPPFLAGS = \
+#      -I$(top_builddir)/salome_adm/unix
+# 
+# libHEXABLOCKimpl_la_LDFLAGS = \
+#      -lOpUtil
\ No newline at end of file
diff --git a/src/HEXABLOCK/hexa_base.hxx b/src/HEXABLOCK/hexa_base.hxx
new file mode 100755 (executable)
index 0000000..b282660
--- /dev/null
@@ -0,0 +1,162 @@
+
+// Incl : Common definitions for HEXA-BLOCK
+
+#ifndef _HEXA_BASE_H_
+#define _HEXA_BASE_H_
+
+#include <cstdio>
+#include <cstring>
+
+                    // Conventions C Ansi compatibles
+typedef char*       pchar;
+typedef const char* cpchar;
+typedef FILE*       pfile;
+
+
+#define Cestegal(c1,c2)      !strcmp(c1,c2)
+#define Cestdifferent(c1,c2)  strcmp(c1,c2)
+#define Cestvide(c1)    !c1[0]
+#define Cestnonvide(c1)  c1[0]
+
+                     // Pour rendre les operateurs plus visibles
+#define NOT    !  
+#define XOR    ^
+#define MODULO %
+#define INOT   `
+// #define IOR    |
+#define IAND   &
+                    // Chaines de bits 
+#define DeuxPuissance(n) (1 << (n))
+
+                     // Codes retour d'une fonction 
+#define HOK  0       // Code retour=0 :  deroulement correct
+#define HERR 1       // Code retour>0 = numero d'erreur, 1 par defaut
+#define NOTHING -1   // Code retour fonction de recherche d'un index
+
+#define EOL '\n'
+#define EOS 0
+#define CHVIDE ""
+                      // Calculs reels en 3D
+typedef double Real;
+#define ZEROR 0.0
+#define UNR   1.0
+#define DEMI  0.5
+#define DIM2  2
+
+// enum EnumCoord { dir_x, dir_y, dir_z, DIM3 };
+
+#ifndef PI
+#define PI    3.1415926535898
+#endif
+                       // Conventions C++
+#include <string>
+#include <vector>
+                       // Impressions de mise au point
+#include <iostream>
+using namespace std;
+
+#define Display(x)      cout << " ... " #x " = " << x << endl
+#define Echo(m)         cout << " _______________ " << m << endl
+
+//  #define Libere(obj)     { if (obj!=NULL) free (obj)      ;  obj=NULL; }
+//  #define Destroy(obj)    { delete obj       ;  obj=NULL   ;            }
+//  #define Deltable(table) { delete [] table  ;  table=NULL ;            }
+
+// ---------------------------------- Definitions propres a HEXA 
+#define HEXA_NS Hex
+#define BEGIN_NAMESPACE_HEXA namespace Hex {
+#define END_NAMESPACE_HEXA   }
+
+/* -----------------------------------------------------
+
+                // ---- Numerotation des faces (%x) 
+                   
+              +----bf-----+
+             /|          /|
+           bc |   B    bd |
+           /  |        /  |
+          +----be-----+   |   
+          |  cf     F |   df
+          | C |       | D |             z
+         ce   | E     de  |             ^
+          |   +----af-|---+             |   y
+          |  /        |  /              |  /
+          | ac    A   | ad              | /
+          |/          |/                |/
+          +----ae-----+                 +----->  x
+                
+ * ----------------------------------------------------- */
+//--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
+BEGIN_NAMESPACE_HEXA
+
+pchar get_temp_name (cpchar format, pchar nomfic);
+
+enum EnumCoord  { dir_x, dir_y, dir_z, DIM3 };
+enum EnumElt    { EL_NONE, EL_VERTEX, EL_EDGE, EL_QUAD, EL_HEXA, 
+                  EL_REMOVED, EL_MAXI };
+
+enum EnumGroup  { HexaCell, QuadCell, EdgeCell, 
+                  HexaNode, QuadNode, EdgeNode, Vertex_Node};
+
+                //  Modes de remplissage des grilles cylindriques
+enum EnumCyl   { CYL_NOFILL, CYL_CL4, CYL_CL6, CYL_CLOSED, CYL_PEER, CYL_ODD};
+enum EnumGrid   { GR_NONE, GR_CARTESIAN, GR_CYLINDRIC, GR_SPHERIC, GR_JOINT, 
+                  GR_BICYL, GR_BIPIPE };
+                //  Sommets de la decomposition canonique du bicylindre
+                // 0    1     2    3     4    5     6    7     8
+enum EnumVCyl   { S_E, S_NE, S_N, S_NW, S_W, S_SW, S_S, S_SE, S_MAXI };
+
+enum KindLaw    { Uniform, Arithmetic, Geometric };
+
+enum EnumOrient { OR_FRONT, OR_LEFT, OR_RIGHT, OR_BACK }; // respecter l'ordre
+enum EnumMark   { IS_NONE=-1,  IS_MARRIED=-2 };
+enum EnumCount  { NO_COUNTED=-3, NO_USED=-2, IS_USED=-1};
+
+enum EnumVertex { V_AMONT, V_AVAL, V_TWO };
+enum EnumQuad   { E_A, E_B, E_C, E_D, QUAD4 };
+
+          //      z=0   z=1   y=0   y=1   x=0  x=1
+enum EnumHQuad   {Q_A,  Q_B,  Q_C,  Q_D,  Q_E, Q_F,  HQ_MAXI};
+
+enum EnumHEdge   {E_AC, E_AD, E_BC, E_BD, 
+                  E_AE, E_AF, E_BE, E_BF,
+                  E_CE, E_CF, E_DE, E_DF,  HE_MAXI };
+
+enum EnumHVertex {V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF, 
+                  HV_MAXI };
+
+class Document;
+class EltBase;
+
+class Hexa;
+class Quad;
+class Edge;
+class Vertex;
+
+class Cylinder;
+class Pipe;
+class Prism;
+
+class Vector;
+class Matrix;
+class Cloner;
+class XmlWriter;
+
+class  Elements;
+class  GridElements;
+class  SphericalGrid;
+class  CrossElements;
+
+typedef std::vector <Quad*> Quads;
+typedef std::vector <Edge*> Edges;
+
+struct  StrOrient;
+struct  Globale;
+class   Shape;
+class   Propagation;
+class   Law;
+class   Group;
+
+END_NAMESPACE_HEXA
+
+#endif
diff --git a/src/HEXABLOCK/hexa_utils.cxx b/src/HEXABLOCK/hexa_utils.cxx
new file mode 100755 (executable)
index 0000000..069694e
--- /dev/null
@@ -0,0 +1,26 @@
+
+// C++ : Fonctions utilitaires de Hexa
+
+#include "hexa_base.hxx"
+
+#include <sys/stat.h>
+
+BEGIN_NAMESPACE_HEXA
+
+// ======================================================== get_temp_name
+pchar get_temp_name (cpchar format, pchar nomfic)
+{
+   int nro = 0;
+   while (true)
+         {
+         nro ++;
+         sprintf (nomfic, format, nro);
+         
+         struct stat buffer;
+         int rep = stat (nomfic, &buffer);
+         if (rep<0) 
+            return nomfic;
+         }
+}
+
+END_NAMESPACE_HEXA
diff --git a/src/HEXABLOCK/test_bielle.cxx b/src/HEXABLOCK/test_bielle.cxx
new file mode 100755 (executable)
index 0000000..98f326d
--- /dev/null
@@ -0,0 +1,644 @@
+
+// C++ : Test bielle (d'apres Karima D.Y)
+
+#include <cmath>
+
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexShape.hxx"
+#include "HexLaw.hxx"
+
+#define DumpElt(x) { printf(" ... "#x " = ") ; if (x) x->dump() ; else printf ("0x\n") ; } 
+
+// ======================================================== test_bielle
+int test_bielle ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+    // =============================
+    //  CREATION DU MODELE
+    // =============================
+
+    // Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres
+
+    //=============================
+    // PARAMETRES
+    //=============================
+
+   double R   = 40.0;
+
+   //  double r_grd = R;
+   //  double r_grd_t = R/2;
+
+   //  double r_pte = R;
+   //  double r_pte_t = R/2;
+
+   double l = 200.0;
+   double h = 40.0;
+
+    // Taille du grand cylindre
+   double dr_grd = R;
+   double da_grd = 360;
+   double dl_grd = h;
+
+   int nr_grd = 1;
+   int na_grd = 6;
+   int nl_grd = 1;
+
+    // Taille du petit cylindre
+   //  double dr_pte = R;
+   //  double da_pte = 360;
+   //  double dl_pte = h;
+
+   //  double nr_pte = 1.0;
+   //  double na_pte = 6.0;
+   //  double nl_pte = 1.0;
+
+
+    //=============================
+    // Creation des vecteurs
+    //=============================
+
+   Hex::Vector* dx = doc->addVector(l, 0, 0);
+   //  Hex::Vector* dy = doc->addVector(0, l, 0);
+   Hex::Vector* dz = doc->addVector(0, 0, l);
+
+    //=================================================
+    // Creation des centres des grilles cylindriques
+    //=================================================
+
+   Hex::Vertex* c_grd = doc->addVertex(0, 0, 0);
+   Hex::Vertex* c_pte = doc->addVertex(2*l, 0, 0);
+   Hex::Vector* dx_prime = doc->addVectorVertices( c_grd, c_pte );
+
+    //=================================================
+    // Creation de la grande grille cylindrique
+    //=================================================
+
+   Hex::Elements* grille_cyl_grd = doc->makeCylindrical (c_grd, dx, dz, 
+                 dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, false);
+
+
+/**************************************************
+   enum {size_ex=2, size_ey=7, size_ez=1};
+   for (int nx=0 ; nx<size_ex; nx++) 
+       for (int ny=0 ; ny<size_ey; ny++) 
+           for (int nz=0 ; nz<size_ez; nz++) 
+              {
+              printf ("tab_edge(dir_z,%d,%d,%d) = ", nx,ny,nz);
+              Hex::Edge* ed = grille_cyl_grd->getEdge (dir_z, nx,ny,nz);
+              if (ed!=NULL) ed->printName ("\n");
+              else          printf ("0x0\n");  
+              }
+    // on obtient une liste qui contient 6 hexaédres éguaux
+
+    // 30° = pi/6
+    // 60° = pi/3
+    // 45° = pi/4
+    // 90° = pi/2
+    // 180° = pi
+
+x1 = doc->findVertex( R, 0, h/2 )
+x2 = doc->findVertex( R, R, -h/2 )
+x3 = doc->findVertex( R, -R, -h/2 )
+x4 = doc->findVertex( R, 0, -h/2 )
+
+quad_11 = doc->findQuad(x1, x2)
+quad_12 = doc->findQuad(x1, x3)
+
+quad_list = [ quad_11 , quad_12 ]
+ **************************************************/
+
+    //=================================================
+    // Creation de la petite grille cylindrique
+    //=================================================
+
+   // Hex::Elements* grille_cyl_pte = 
+   doc->makeTranslation( grille_cyl_grd, dx_prime );
+
+   /*******************
+   Hex::Quad* facea1 = grille_cyl_grd ->getQuad (dir_x, 1,2,0);
+   Hex::Quad* facea2 = grille_cyl_grd ->getQuad (dir_x, 1,3,0);
+
+   Hex::Hexa* hexa12 = grille_cyl_grd ->getHexa (2);
+   Hex::Hexa* hexa13 = grille_cyl_grd ->getHexa (3);
+   Hex::Hexa* hexa20 = grille_cyl_pte ->getHexa (0);
+
+   Quad* qa1 = hexa12->getQuad (Q_D);
+   Quad* qa2 = hexa13->getQuad (Q_D);
+   Quad* qb1 = hexa20->getQuad (Q_D);
+
+   hexa12-> remove ();
+   hexa13-> remove ();
+   hexa20-> remove ();
+   *********************/
+
+   double alpha_x = 2*R*cos(M_PI/3);
+   double alpha_y = 2*R*sin(M_PI/3);
+
+    // on obtient une liste qui contient 6 hexaédres éguaux
+   Hex::Vertex* x1 = doc->findVertex( 2*R, 0, h );
+   Hex::Vertex* x2 = doc->findVertex( alpha_x,  alpha_y, 0 );
+   Hex::Vertex* x3 = doc->findVertex( alpha_x, -alpha_y, 0 );
+   Hex::Vertex* x4 = doc->findVertex( 2*R, 0, 0 );
+
+   Hex::Vertex* y1 = doc->findVertex( 2*l - 2*R , 0 , h );
+   Hex::Vertex* y2 = doc->findVertex( 2*l - alpha_x ,  alpha_y , 0 );
+   Hex::Vertex* y3 = doc->findVertex( 2*l - alpha_x , -alpha_y , 0 );
+   Hex::Vertex* y4 = doc->findVertex( 2*l - 2*R , 0 , 0 );
+
+   DumpElt (x1);
+   DumpElt (x2);
+   DumpElt (x3);
+   DumpElt (x4);
+
+   DumpElt (y1);
+   DumpElt (y2);
+   DumpElt (y3);
+   DumpElt (y4);
+
+   Hex::Quad* quad_11 = doc->findQuad(x1, x2);
+   Hex::Quad* quad_12 = doc->findQuad(x1, x3);
+
+   Hex::Quad* quad_21 = doc->findQuad(y1, y2);
+   Hex::Quad* quad_22 = doc->findQuad(y1, y3);
+
+   Hex::Edge* edge1 = doc->findEdge( x1, x4);
+   Hex::Edge* edge2 = doc->findEdge( y1, y4);
+
+   DumpElt (edge1);
+   DumpElt (edge2);
+   //  doc->addHexa (x1, x2, x3, x4,  y2, y1, y3, y4);
+
+   DumpElt (quad_11);
+   DumpElt (quad_12);
+
+   int n2 = 0;
+   int n1 = quad_11->inter (quad_12, n2); 
+   Display (n1);
+   Display (n2);
+
+
+   DumpElt (quad_21);
+   DumpElt (quad_22);
+
+   Hex::Quads quad_list;
+   quad_list.push_back (quad_11);
+   quad_list.push_back (quad_12);
+
+    //=================================================
+    // Assemblage des deux grilles cylindriques
+    //=================================================
+    doc->dump();
+    // Hex::Elements* model_biell_fin = 
+    doc->joinQuads (quad_list, quad_21, x1, y1, x4, y4, 1);
+
+/*********************
+   for (int nro=0 ; nro< model_biell_fin->countHexa() ; nro++)
+       model_biell_fin->getHexa(nro)->dumpPlus();
+
+   model_biell_fin->getHexa(0)->remove();
+   //doc->saveVtk ("bielle.vtk");
+**************************/
+   doc->saveVtk ("bielle.vtk");
+   return HOK;
+}
+/**************************************************
+    //===================================================================
+    // Recuperation des vertex du model hexa bielle pour l'association
+    //===================================================================
+
+    //# NB:
+    //# h = haut
+    //# b = bas
+    //# g = grand
+    //# p = petit
+    //# t = trou
+
+
+
+    // Face du haut grand trou
+
+x_mod_h_g = doc->findVertex( -R , -R , h/2 )
+y_mod_h_g = doc->findVertex( -R , 0 , h/2 )
+z_mod_h_g = doc->findVertex( -R , R , h/2 )
+
+u_mod_h_g = doc->findVertex( R , -R , h/2 )
+v_mod_h_g = doc->findVertex( R , 0 , h/2 )
+w_mod_h_g = doc->findVertex( R , R , h/2 )
+
+x_mod_h_g_t = doc->findVertex( -R/2 , -R/2 , h/2 )
+y_mod_h_g_t = doc->findVertex( -R/2 , 0 , h/2 )
+z_mod_h_g_t = doc->findVertex( -R/2 , R/2 , h/2 )
+
+u_mod_h_g_t = doc->findVertex( R/2 , -R/2 , h/2 )
+v_mod_h_g_t = doc->findVertex( R/2 , 0 , h/2 )
+w_mod_h_g_t = doc->findVertex( R/2 , R/2 , h/2 )
+
+
+    // Face du haut petit trou
+
+x_mod_h_p = doc->findVertex( l + R , -R , h/2 )
+y_mod_h_p = doc->findVertex( l + R , 0 , h/2 )
+z_mod_h_p = doc->findVertex( l + R , R , h/2 )
+
+u_mod_h_p = doc->findVertex( l - R , -R , h/2 )
+v_mod_h_p = doc->findVertex( l - R , 0 , h/2 )
+w_mod_h_p = doc->findVertex( l - R , R , h/2 )
+
+x_mod_h_p_t = doc->findVertex( l + R/2 , -R/2 , h/2 )
+y_mod_h_p_t = doc->findVertex( l + R/2 , 0 , h/2 )
+z_mod_h_p_t = doc->findVertex( l + R/2 , R/2 , h/2 )
+
+u_mod_h_p_t = doc->findVertex( l - R/2 , -R/2 , h/2 )
+v_mod_h_p_t = doc->findVertex( l - R/2 , 0 , h/2 )
+w_mod_h_p_t = doc->findVertex( l - R/2 , R/2 , h/2 )
+
+
+    // Face du bas grand trou
+
+x_mod_b_g = doc->findVertex( -R , -R , -h/2 )
+y_mod_b_g = doc->findVertex( -R , 0 , -h/2 )
+z_mod_b_g = doc->findVertex( -R , R , -h/2 )
+
+u_mod_b_g = doc->findVertex( R , -R , -h/2 )
+v_mod_b_g = doc->findVertex( R , 0 , -h/2 )
+w_mod_b_g = doc->findVertex( R , R , -h/2 )
+
+x_mod_b_g_t = doc->findVertex( -R/2 , -R/2 , -h/2 )
+y_mod_b_g_t = doc->findVertex( -R/2 , 0 , -h/2 )
+z_mod_b_g_t = doc->findVertex( -R/2 , R/2 , -h/2 )
+
+u_mod_b_g_t = doc->findVertex( R/2 , -R/2 , -h/2 )
+v_mod_b_g_t = doc->findVertex( R/2 , 0 , -h/2 )
+w_mod_b_g_t = doc->findVertex( R/2 , R/2 , -h/2 )
+
+
+    // Face du bas petit trou
+
+x_mod_b_p = doc->findVertex( l + R , -R , -h/2 )
+y_mod_b_p = doc->findVertex( l + R , 0 , -h/2 )
+z_mod_b_p = doc->findVertex( l + R , R , -h/2 )
+
+u_mod_b_p = doc->findVertex( l - R , -R , -h/2 )
+v_mod_b_p = doc->findVertex( l - R , 0 , -h/2 )
+w_mod_b_p = doc->findVertex( l - R , R , -h/2 )
+
+x_mod_b_p_t = doc->findVertex( l + R/2 , -R/2 , -h/2 )
+y_mod_b_p_t = doc->findVertex( l + R/2 , 0 , -h/2 )
+z_mod_b_p_t = doc->findVertex( l + R/2 , R/2 , -h/2 )
+
+u_mod_b_p_t = doc->findVertex( l - R/2 , -R/2 , -h/2 )
+v_mod_b_p_t = doc->findVertex( l - R/2 , 0 , -h/2 )
+w_mod_b_p_t = doc->findVertex( l - R/2 , R/2 , -h/2 )
+
+
+
+    //===================================================================
+    // Recuperation des points de la geometrie bielle pour l'association
+    //===================================================================
+
+
+Bielle_geom = geompy.Import("/export/home/guest/Bureau/Karima/CAO_CEA/crank.stp", "STEP")
+
+geompy.addToStudy(Bielle_geom, "Bielle_geom")
+
+Pt_A = geompy.MakeVertex(0, 0, h/2.)
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)
+
+
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)
+
+
+    // NB:
+    // h = haut
+    // b = bas
+    // g = grand
+    // p = petit
+    // t = trou
+
+
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)
+y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+
+y_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)
+y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)
+
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, y_h_p)
+
+
+
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)
+x_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1)
+z_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)
+x_b_p = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)
+z_b_p = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)
+
+
+
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 147, 148)
+
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)
+
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)
+
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)
+
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)
+
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)
+
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)
+
+
+
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 94, 95)
+
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)
+y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)
+
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)
+z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)
+
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)
+w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)
+
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)
+v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)
+
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)
+u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)
+
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)
+x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)
+
+
+
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 136, 137)
+
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)
+u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)
+
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)
+u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)
+
+
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 131, 132)
+
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)
+w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)
+
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)
+w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)
+
+Edge_v_grd = geompy.MakeLine(u_h_g, w_h_g)
+
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)
+
+
+Edge_v_pte = geompy.MakeLine(u_h_p, w_h_p)
+
+v_h_p = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)
+v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)
+
+
+    //=======================
+    // CREATION ASSOCIATION
+    //=======================
+
+
+    //===========================================
+    // association des sommets de la face du haut
+    //===========================================
+
+    // grand trou
+
+x_mod_h_g.setAssociation( x_h_g )
+y_mod_h_g.setAssociation( y_h_g )
+z_mod_h_g.setAssociation( z_h_g )
+u_mod_h_g.setAssociation( u_h_g )
+v_mod_h_g.setAssociation( v_h_g )
+w_mod_h_g.setAssociation( w_h_g )
+
+x_mod_h_g_t.setAssociation( x_h_g_t )
+y_mod_h_g_t.setAssociation( y_h_g_t )
+z_mod_h_g_t.setAssociation( z_h_g_t )
+u_mod_h_g_t.setAssociation( u_h_g_t )
+v_mod_h_g_t.setAssociation( v_h_g_t )
+w_mod_h_g_t.setAssociation( w_h_g_t )
+
+    // petit trou
+
+x_mod_h_p.setAssociation( x_h_p )
+y_mod_h_p.setAssociation( y_h_p )
+z_mod_h_p.setAssociation( z_h_p )
+u_mod_h_p.setAssociation( u_h_p )
+v_mod_h_p.setAssociation( v_h_p )
+w_mod_h_p.setAssociation( w_h_p )
+
+x_mod_h_p_t.setAssociation( x_h_p_t )
+y_mod_h_p_t.setAssociation( y_h_p_t )
+z_mod_h_p_t.setAssociation( z_h_p_t )
+u_mod_h_p_t.setAssociation( u_h_p_t )
+v_mod_h_p_t.setAssociation( v_h_p_t )
+w_mod_h_p_t.setAssociation( w_h_p_t )
+
+
+    //===========================================
+    // association des sommets de la face du bas
+    //===========================================
+
+    // grand trou
+
+x_mod_b_g.setAssociation( x_b_g )
+y_mod_b_g.setAssociation( y_b_g )
+z_mod_b_g.setAssociation( z_b_g )
+u_mod_b_g.setAssociation( u_b_g )
+v_mod_b_g.setAssociation( v_b_g )
+w_mod_b_g.setAssociation( w_b_g )
+
+x_mod_b_g_t.setAssociation( x_b_g_t )
+y_mod_b_g_t.setAssociation( y_b_g_t )
+z_mod_b_g_t.setAssociation( z_b_g_t )
+u_mod_b_g_t.setAssociation( u_b_g_t )
+v_mod_b_g_t.setAssociation( v_b_g_t )
+w_mod_b_g_t.setAssociation( w_b_g_t )
+
+    // petit trou
+
+x_mod_b_p.setAssociation( x_b_p )
+y_mod_b_p.setAssociation( y_b_p )
+z_mod_b_p.setAssociation( z_b_p )
+u_mod_b_p.setAssociation( u_b_p )
+v_mod_b_p.setAssociation( v_b_p )
+w_mod_b_p.setAssociation( w_b_p )
+
+x_mod_b_p_t.setAssociation( x_b_p_t )
+y_mod_b_p_t.setAssociation( y_b_p_t )
+z_mod_b_p_t.setAssociation( z_b_p_t )
+u_mod_b_p_t.setAssociation( u_b_p_t )
+v_mod_b_p_t.setAssociation( v_b_p_t )
+w_mod_b_p_t.setAssociation( w_b_p_t )
+
+
+
+
+
+    //====================================
+    // CREATION MAILLAGE
+    //====================================
+
+
+    //=================================================
+    // Definir les groupes d'éléments pour le maillage
+    //=================================================
+
+    // On définit 3 groupes de mailles
+
+    // groupe d'edges (arretes)
+
+Edge_grp = doc->addEdgeGroup("Edge_grp")
+
+
+Nbr_Edg = doc->countEdge()
+print Nbr_Edg
+
+
+for i in range(Nbr_Edg):
+       Edge_i = doc->getEdge(i)
+       Edge_grp.addElement(Edge_i)
+
+
+Nbr_elm_edg = Edge_grp.countElement()
+
+if Nbr_elm_edg == Nbr_Edg:
+       print "YES"
+else:
+       print "Review your course"
+
+    // groupe de quads (faces)
+
+Quad_grp = doc->addQuadGroup("Quad_grp")
+
+
+Nbr_Qad = doc->countQuad()
+print Nbr_Qad
+
+
+
+for i in range(Nbr_Qad):
+       Quad_i = doc->getQuad(i)
+       Quad_grp.addElement(Quad_i)
+
+
+
+Nbr_elm_qad = Quad_grp.countElement()
+
+if Nbr_elm_qad == Nbr_Qad:
+       print "YES"
+else:
+       print "Review your course"
+
+
+    // groupe d'hexas (solids)
+
+Hexa_grp = doc->addHexaGroup("Hexa_grp")
+
+
+Nbr_Hex = doc->countHexa()
+print Nbr_Hex
+
+
+
+for i in range(Nbr_Hex):
+       Hexa_i = doc->getHexa(i)
+       Hexa_grp.addElement(Hexa_i)
+
+
+
+Nbr_elm_hex = Hexa_grp.countElement()
+
+if Nbr_elm_hex == Nbr_Hex:
+       print "YES"
+else:
+       print "Review your course"
+
+
+    // groupe de noeuds de vertex pour tout le modéle
+
+Vertex_Nod_Grp = doc->addVertexNodeGroup("Vertex_Nod_Grp")
+
+Nbr_Vx = doc->countVertex()
+print Nbr_Vx
+
+
+
+for i in range(Nbr_Vx):
+       Vertex_i = doc->getVertex(i)
+       Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+Nbr_elm_vex = Vertex_Nod_Grp.countElement()
+
+if Nbr_elm_vex == Nbr_Vx:
+       print "YES"
+else:
+       print "Review your course"
+
+
+
+    //====================================
+    // Definir une loi de discretisation
+    //====================================
+
+
+    // définir une loi: le choix de la loi reste aux utilisateurs
+
+Law = doc->addLaw( "Uniform" , Nbr_Vx )
+
+    //petit test
+n = doc->countLaw()
+print n
+
+    // chercher les propagations du modéle
+
+N_Propa = doc->countPropagation()
+
+for j in range(N_Propa):
+       Propa = doc->getPropagation(j)
+
+    // appliquer la loi de discrétisation sur tout le modéle et générer le maillage
+
+Propa.setLaw( Law )
+
+mesh = smesh.HexaBlocks(doc)
+
+print "Nombre d'hexaédres:", mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:", mesh.NbEdges()
+print "Nombre de noeuds:", mesh.NbNodes()
+***********************************************************************/
diff --git a/src/HEXABLOCK/test_bride.cxx b/src/HEXABLOCK/test_bride.cxx
new file mode 100755 (executable)
index 0000000..bdd3d5c
--- /dev/null
@@ -0,0 +1,421 @@
+
+// C++ : Test bride
+
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexShape.hxx"
+#include "HexLaw.hxx"
+#include "HexMatrix.hxx"
+
+
+// ======================================================== test_bride
+int test_bride ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document*doc = mon_ex.addDocument();
+
+   int h = 70;
+   int nl = 7;
+
+   int R  = 5;
+   int a1 = 45;
+   int l1 = h;
+
+   int nr1 = 4;
+   int na1 = 1;
+   int nl1 = nl = 1;
+
+
+// Taille de la 2eme grille cylindrique
+   // int r2 = 20;
+   // int r2_t = 2;
+
+//r = r2-r2_t
+   int r = 18;
+   int a2 = 180;
+   int l2 = h;
+
+   int nr2 = 5;
+   int na2 = 5;
+   int nl2 = nl = 1;
+
+
+
+//=============================
+// Creation des vecteurs
+//=============================
+
+   Hex::Vector * DX = doc->addVector( h , 0 , 0 );
+   // Hex::Vector * DY = doc->addVector( 0 , h , 0 );
+   Hex::Vector * DZ = doc->addVector( 0 , 0 , h );
+
+
+//=================================================
+// Creation des centres des grilles cylindriques
+//=================================================
+
+   int P = 200;
+   Hex::Vertex* c1 = doc->addVertex( 0 , 0 , 0 );
+   Hex::Vertex* c2 = doc->addVertex( P , 0 , 0 );
+
+
+//=================================================
+// Creation de la 1ere grille cylindrique
+//=================================================
+
+   Hex::Elements* grille_cyl_1 = doc->makeCylindrical( c1 , DX , DZ , R , a1 , l1 , nr1 , na1 , nl1 , false );
+
+
+   Hex::Vertex* vtx_A_1_g1 = grille_cyl_1->getVertexIJK( 4 , 0 , 0 );
+   Hex::Vertex* vtx_A_2_g1 = grille_cyl_1->getVertexIJK( 4 , 1 , 0 );
+
+   Hex::Vertex* vtx_B_1_g1 = grille_cyl_1->getVertexIJK( 3 , 0 , 0 );
+   Hex::Vertex* vtx_B_2_g1 = grille_cyl_1->getVertexIJK( 4 , 0 , 0 );
+
+// reperer les quads
+
+   Hex::Quad* quad_A_g1 = grille_cyl_1->getQuadJK( 4 , 0 , 0 );
+   Hex::Quad* quad_B_g1 = grille_cyl_1->getQuadIK( 3 , 0 , 0 );
+   // Hex::Quad* quad_C_g1 = grille_cyl_1->getQuadIK( 2 , 0 , 0 );
+
+
+// reperer les hexas
+
+   // Hex::Hexa* hexa_A_g1 = grille_cyl_1->getHexaIJK( 3 , 0 , 0 );
+   // Hex::Hexa* hexa_B_g1 = grille_cyl_1->getHexaIJK( 2 , 0 , 0 );
+
+
+   Hex::Elements* grille_cyl_2 = doc->makeCylindrical( c2 , DX , DZ , r , a2 , l2 , nr2 , na2 , nl2 , false );
+
+   Hex::Vertex* vtx_A_1_g2 = grille_cyl_2->getVertexIJK( 4 , 3 , 0 );
+   Hex::Vertex* vtx_A_2_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 0 );
+
+   Hex::Vertex* vtx_B_1_g2 = grille_cyl_2->getVertexIJK( 4 , 3 , 0 );
+   Hex::Vertex* vtx_B_2_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 0 );
+
+// reperer les quads
+
+   Hex::Quad* quad_A_g2 = grille_cyl_2->getQuadIK( 2 , 0 , 0 );
+   // Hex::Quad* quad_B_g2 = grille_cyl_2->getQuadIK( 3 , 0 , 0 );
+
+   Hex::Quad* quad_AB_g2 = grille_cyl_2->getQuadIK( 4 , 3 , 0 );
+
+
+// reperer les hexas
+
+
+   Hex::Hexa* hexa_A_g2 = grille_cyl_2->getHexaIJK( 4 , 2 , 0 );
+   // Hex::Hexa* hexa_B_g2 = grille_cyl_2->getHexaIJK( 4 , 3 , 0 );
+   // Hex::Hexa* hexa_C_g3 = grille_cyl_2->getHexaIJK( 4 , 4 , 0 );
+
+// deconnexion des quads
+//
+   Hex::Elements* nouveaux = doc->disconnectQuad( hexa_A_g2 , quad_AB_g2 );
+   //  quad_A_g2 = doc->disconnectQuad( hexa_A_g2 , quad_AB_g2 );
+   HexDump (quad_A_g2);
+   HexDump (quad_AB_g2);
+
+//quad_B_g2 = doc->disconnectQuad( hexa_B_g2 , quad_AB_g2 );
+
+   vtx_A_1_g2 = grille_cyl_2->getVertexIJK( 4 , 3 , 0 );
+   vtx_A_1_g1 = grille_cyl_1->getVertexIJK( 4 , 0 , 0 );
+   vtx_A_2_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 0 );
+   vtx_A_2_g1 = grille_cyl_1->getVertexIJK( 4 , 1 , 0 );
+
+   vtx_B_1_g2 = grille_cyl_2->getVertexIJK( 4 , 3 , 0 );
+   vtx_B_2_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 0 );
+   vtx_B_1_g1 = grille_cyl_1->getVertexIJK( 3 , 0 , 0 );
+   vtx_B_2_g1 = grille_cyl_1->getVertexIJK( 4 , 0 , 0 );
+
+// fusionner les quads
+
+   Hex::Edge*  arete = grille_cyl_2->getEdgeK( 5 , 0 , 0 );
+   Hex::Propagation* prop  = NULL;
+
+/* *******************************************************************
+   Hex::Propagation* prop  = doc->findPropagation (arete);
+   const Hex::Edges& table = prop->getEdges ();
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+           printf ("  %2d -> ", ned);
+           table [ned]->printName (" : ");
+
+           if (way)
+              {
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName ("\n");
+              }
+          else
+              {
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName ("\n");
+              }
+           }
+
+
+   ******************************************************************* */
+   int fusion_g1_g2_quad_A = doc->mergeQuads( quad_A_g2 , quad_A_g1 , 
+                  vtx_A_1_g2 , vtx_A_1_g1 , vtx_A_2_g2 , vtx_A_2_g1 );
+   Display (fusion_g1_g2_quad_A);
+   HexDump (quad_A_g2);
+   HexDump (quad_AB_g2);
+
+/* *******************************************************************
+   prop  = doc->findPropagation (arete);
+   const Hex::Edges& table2 = prop->getEdges ();
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table2 [ned]->getWay ();
+           printf ("  %2d -> ", ned);
+           table [ned]->printName (" : ");
+
+           if (way)
+              {
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName ("\n");
+              }
+          else
+              {
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName ("\n");
+              }
+           }
+
+   ******************************************************************* */
+   int fusion_g1_g2_quad_B = doc->mergeQuads( quad_AB_g2 , quad_B_g1 , 
+                  vtx_B_1_g2 , vtx_B_2_g1 , vtx_B_2_g2 , vtx_B_1_g1 );
+   Display (fusion_g1_g2_quad_B);
+
+
+   prop  = doc->findPropagation (arete);
+   const Hex::Edges& table3 = prop->getEdges ();
+       for (int ned=0 ; ned<(int)table3.size() ; ned++)
+           {
+           bool way = table3 [ned]->getWay ();
+           printf ("  %2d -> ", ned);
+           table3 [ned]->printName (" : ");
+
+           if (way)
+              {
+              table3 [ned]->getVertex (0)->printName (", ");
+              table3 [ned]->getVertex (1)->printName ("\n");
+              }
+          else
+              {
+              table3 [ned]->getVertex (1)->printName (", ");
+              table3 [ned]->getVertex (0)->printName ("\n");
+              }
+           }
+   exit (0);
+
+   Hex::Vertex* vtx_B_1_h_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 1 );
+   Hex::Vertex* vtx_C_1_h_g1 = grille_cyl_1->getVertexIJK( 3 , 0 , 1 );
+
+   Hex::Edge* edge_B_g2 = grille_cyl_2->getEdgeK( 5 , 3 , 0 );
+   Hex::Edge* edge_C_g1 = grille_cyl_1->getEdgeK( 3 , 0 , 0 );
+
+
+
+   int fusion_g1_g2 = doc->mergeEdges( edge_B_g2 , edge_C_g1 , vtx_B_1_h_g2 , vtx_C_1_h_g1 );
+
+   Display (fusion_g1_g2);
+
+
+// rajouter l hexa qui manque entre les deux grilles
+
+   Hex::Vertex* vtx_C_h_g2 = grille_cyl_2->getVertexIJK( 5 , 5 , 1 );
+   Hex::Vertex* vtx_C_h_g1 = grille_cyl_1->getVertexIJK( 2 , 0 , 1 );
+
+   Hex::Vertex* vtx_C_b_g2 = grille_cyl_2->getVertexIJK( 5 , 5 , 0 );
+   Hex::Vertex* vtx_C_b_g1 = grille_cyl_1->getVertexIJK( 2 , 0 , 0 );
+
+   Hex::Edge* edge_h = doc->addEdge( vtx_C_h_g2 , vtx_C_h_g1 );
+   Hex::Edge* edge_b = doc->addEdge( vtx_C_b_g2 , vtx_C_b_g1 );
+
+   Hex::Edge* edge_B_h_g2 = grille_cyl_2->getEdgeJ( 5 , 3 , 1 );
+   Hex::Edge* edge_C_h_g2 = grille_cyl_2->getEdgeJ( 5 , 4 , 1 );
+
+   Hex::Edge* edge_B_b_g2 = grille_cyl_2->getEdgeJ( 5 , 3 , 0 );
+   Hex::Edge* edge_C_b_g2 = grille_cyl_2->getEdgeJ( 5 , 4 , 0 );
+
+   Hex::Vertex* X_C_h_g1 = grille_cyl_1->getVertexIJK( 2 , 0 , 1 );
+   Hex::Vertex* X_C_h_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 1 );
+   Hex::Edge*   edge_C_h_g1 = doc->findEdge( X_C_h_g1 , X_C_h_g2 );
+
+   Hex::Vertex* X_C_b_g1 = grille_cyl_1->getVertexIJK( 2 , 0 , 0 );
+   Hex::Vertex* X_C_b_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 0 );
+   Hex::Edge*   edge_C_b_g1 = doc->findEdge( X_C_b_g1 , X_C_b_g2 );
+
+
+
+   edge_C_g1 = grille_cyl_1->getEdgeK( 2 , 0 , 0 );
+   Hex::Edge* edge_C_g2 = grille_cyl_2->getEdgeK( 5 , 5 , 0 );
+
+
+
+
+   Hex::Quad* quad_h = doc->addQuad( edge_B_h_g2 , edge_C_h_g2 , edge_h , edge_C_h_g1 );
+   Hex::Quad* quad_b = doc->addQuad( edge_B_b_g2 , edge_C_b_g2 , edge_b , edge_C_b_g1 );
+   Hex::Quad* quad_f = doc->addQuad( edge_b , edge_C_g1 , edge_h , edge_C_g2 );
+   // Hex::Quad* quad_C_g2 = grille_cyl_2->getQuadJK( 5 , 4 , 0 );
+
+   Hex::Vertex* X_B_h_g2 = grille_cyl_2->getVertexIJK( 5 , 3 , 0 );
+   Hex::Vertex* X_A_h_g2 = grille_cyl_2->getVertexIJK( 5 , 4 , 1 );
+   X_C_h_g2 = grille_cyl_2->getVertexIJK( 5 , 5 , 0 );
+
+
+   Hex::Quad* quad_B_prime_g2 = doc->findQuad( X_B_h_g2 , X_A_h_g2 );
+   Hex::Quad* quad_C_prime_g2 = doc->findQuad( X_A_h_g2 , X_C_h_g2 );
+
+   Hex::Quad* quad_C_prime_g1 = doc->findQuad( X_C_h_g1 , X_C_b_g2 );
+
+   Hex::Hexa* hexa_g2_g1 = doc->addHexa( quad_b , quad_h , quad_f , quad_B_prime_g2 , quad_C_prime_g1 , quad_C_prime_g2 );
+
+
+// rajouter trois hexa qui servent au remplissage de la partie centrale de la 2eme grille
+
+   Hex::Vertex* vtx_1_h_g2 = grille_cyl_2->getVertexIJK( 0 , 0 , 1 );
+   // Hex::Vertex* vtx_2_h_g2 = grille_cyl_2->getVertexIJK( 0 , 1 , 1 );
+   Hex::Vertex* vtx_3_h_g2 = grille_cyl_2->getVertexIJK( 0 , 2 , 1 );
+   Hex::Vertex* vtx_4_h_g2 = grille_cyl_2->getVertexIJK( 0 , 3 , 1 );
+   // Hex::Vertex* vtx_5_h_g2 = grille_cyl_2->getVertexIJK( 0 , 4 , 1 );
+   Hex::Vertex* vtx_6_h_g2 = grille_cyl_2->getVertexIJK( 0 , 5 , 1 );
+
+   Hex::Vertex* vtx_1_b_g2 = grille_cyl_2->getVertexIJK( 0 , 0 , 0 );
+   // Hex::Vertex* vtx_2_b_g2 = grille_cyl_2->getVertexIJK( 0 , 1 , 0 );
+   Hex::Vertex* vtx_3_b_g2 = grille_cyl_2->getVertexIJK( 0 , 2 , 0 );
+   Hex::Vertex* vtx_4_b_g2 = grille_cyl_2->getVertexIJK( 0 , 3 , 0 );
+   // Hex::Vertex* vtx_5_b_g2 = grille_cyl_2->getVertexIJK( 0 , 4 , 0 );
+   Hex::Vertex* vtx_6_b_g2 = grille_cyl_2->getVertexIJK( 0 , 5 , 0 );
+
+
+   Hex::Vertex* vtx_7_h_g2 = doc->addVertex( P + 5 , 0 , h );
+   Hex::Vertex* vtx_8_h_g2 = doc->addVertex( P - 5 , 0 , h );
+
+   Hex::Vertex* vtx_7_b_g2 = doc->addVertex( P + 5 , 0 , 0 );
+   Hex::Vertex* vtx_8_b_g2 = doc->addVertex( P - 5 , 0 , 0 );
+
+   // Hex::Vertex* Pt_dtr_1 = doc->addVertex( P , 0 , h );
+   // Hex::Vertex* Pt_dtr_2 = doc->addVertex( P , 0 , 0 );
+
+
+   // Hex::Vector* dtr = doc->addVectorVertices( Pt_dtr_1 , Pt_dtr_2 );
+
+
+   Hex::Edge* edge_1_2_h_g2 = grille_cyl_2->getEdgeJ( 0 , 0 , 1 );
+   Hex::Edge* edge_2_3_h_g2 = grille_cyl_2->getEdgeJ( 0 , 1 , 1 );
+   Hex::Edge* edge_3_4_h_g2 = grille_cyl_2->getEdgeJ( 0 , 2 , 1 );
+   Hex::Edge* edge_4_5_h_g2 = grille_cyl_2->getEdgeJ( 0 , 3 , 1 );
+   Hex::Edge* edge_5_6_h_g2 = grille_cyl_2->getEdgeJ( 0 , 4 , 1 );
+
+   Hex::Edge* edge_1_2_b_g2 = grille_cyl_2->getEdgeJ( 0 , 0 , 0 );
+   Hex::Edge* edge_2_3_b_g2 = grille_cyl_2->getEdgeJ( 0 , 1 , 0 );
+   Hex::Edge* edge_3_4_b_g2 = grille_cyl_2->getEdgeJ( 0 , 2 , 0 );
+   Hex::Edge* edge_4_5_b_g2 = grille_cyl_2->getEdgeJ( 0 , 3 , 0 );
+   Hex::Edge* edge_5_6_b_g2 = grille_cyl_2->getEdgeJ( 0 , 4 , 0 );
+
+   Hex::Edge* edge_1_z_g2 = grille_cyl_2->getEdgeK( 0 , 0 , 0 );
+   // Hex::Edge* edge_2_z_g2 = grille_cyl_2->getEdgeK( 0 , 1 , 0 );
+   Hex::Edge* edge_3_z_g2 = grille_cyl_2->getEdgeK( 0 , 2 , 0 );
+   Hex::Edge* edge_4_z_g2 = grille_cyl_2->getEdgeK( 0 , 3 , 0 );
+   // Hex::Edge* edge_5_z_g2 = grille_cyl_2->getEdgeK( 0 , 4 , 0 );
+   Hex::Edge* edge_6_z_g2 = grille_cyl_2->getEdgeK( 0 , 5 , 0 );
+
+
+//creer les edges manquants
+
+   Hex::Edge* edge_1_7_h_g2 = doc->addEdge( vtx_1_h_g2 , vtx_7_h_g2 );
+   Hex::Edge* edge_3_7_h_g2 = doc->addEdge( vtx_7_h_g2 , vtx_3_h_g2 );
+   Hex::Edge* edge_7_8_h_g2 = doc->addEdge( vtx_8_h_g2 , vtx_7_h_g2 );
+   Hex::Edge* edge_4_8_h_g2 = doc->addEdge( vtx_4_h_g2 , vtx_8_h_g2 );
+   Hex::Edge* edge_6_8_h_g2 = doc->addEdge( vtx_6_h_g2 , vtx_8_h_g2 );
+
+   Hex::Edge* edge_1_7_b_g2 = doc->addEdge( vtx_1_b_g2 , vtx_7_b_g2 );
+   Hex::Edge* edge_3_7_b_g2 = doc->addEdge( vtx_3_b_g2 , vtx_7_b_g2 );
+   Hex::Edge* edge_7_8_b_g2 = doc->addEdge( vtx_7_b_g2 , vtx_8_b_g2 );
+   Hex::Edge* edge_4_8_b_g2 = doc->addEdge( vtx_4_b_g2 , vtx_8_b_g2 );
+   Hex::Edge* edge_6_8_b_g2 = doc->addEdge( vtx_6_b_g2 , vtx_8_b_g2 );
+
+   Hex::Edge* edge_7_h_b_g2 = doc->addEdge( vtx_7_h_g2 , vtx_7_b_g2 );
+   Hex::Edge* edge_8_h_b_g2 = doc->addEdge( vtx_8_h_g2 , vtx_8_b_g2 );
+
+//creer les quads manquants
+
+   Hex::Quad* quad_7_h_g2 = doc->addQuad( edge_1_2_h_g2 , edge_2_3_h_g2 , edge_3_7_h_g2 , edge_1_7_h_g2 );
+//print quad_7_h_g2
+
+   Hex::Quad* quad_7_8_h_g2 = doc->addQuad( edge_3_4_h_g2 , edge_4_8_h_g2 , edge_7_8_h_g2 , edge_3_7_h_g2 );
+//print quad_7_8_h_g2
+
+   Hex::Quad* quad_8_h_g2 = doc->addQuad( edge_4_5_h_g2 , edge_5_6_h_g2 , edge_6_8_h_g2 , edge_4_8_h_g2 );
+//print quad_8_h_g2
+
+   Hex::Quad* quad_7_b_g2 = doc->addQuad( edge_1_2_b_g2 , edge_2_3_b_g2 , edge_3_7_b_g2 , edge_1_7_b_g2 );
+//print quad_7_b_g2
+
+   Hex::Quad* quad_7_8_b_g2 = doc->addQuad( edge_3_4_b_g2 , edge_4_8_b_g2 , edge_7_8_b_g2 , edge_3_7_b_g2 );
+//print quad_7_8_b_g2
+
+   Hex::Quad* quad_8_b_g2 = doc->addQuad( edge_4_5_b_g2 , edge_5_6_b_g2 , edge_6_8_b_g2 , edge_4_8_b_g2 );
+//print quad_8_b_g2
+
+   Hex::Quad* quad_7_f_g2 = doc->addQuad( edge_1_7_h_g2 , edge_7_h_b_g2 , edge_1_7_b_g2 , edge_1_z_g2 );
+//print quad_7_f_g2
+
+   Hex::Quad* quad_7_8_f_g2 = doc->addQuad( edge_7_8_h_g2 , edge_7_h_b_g2 , edge_7_8_b_g2 , edge_8_h_b_g2 );
+//print quad_7_8_f_g2
+
+   Hex::Quad* quad_8_f_g2 = doc->addQuad( edge_6_8_h_g2 , edge_8_h_b_g2 , edge_6_8_b_g2 , edge_6_z_g2 );
+//print quad_8_f_g2
+
+   Hex::Quad* quad_3_7_f_g2 = doc->addQuad( edge_3_z_g2 , edge_3_7_h_g2 , edge_7_h_b_g2 , edge_3_7_b_g2 );
+//print quad_3_7_f_g2
+
+   Hex::Quad* quad_4_8_f_g2 = doc->addQuad( edge_4_z_g2 , edge_4_8_h_g2 , edge_8_h_b_g2 , edge_4_8_b_g2 );
+//print quad_4_8_f_g2
+
+// reperer les quads
+
+   Hex::Quad* quad_1_2_z_g2 = grille_cyl_2->getQuadJK( 0 , 0 , 0 );
+   Hex::Quad* quad_2_3_z_g2 = grille_cyl_2->getQuadJK( 0 , 1 , 0 );
+   Hex::Quad* quad_3_4_z_g2 = grille_cyl_2->getQuadJK( 0 , 2 , 0 );
+   Hex::Quad* quad_4_5_z_g2 = grille_cyl_2->getQuadJK( 0 , 3 , 0 );
+   Hex::Quad* quad_5_6_z_g2 = grille_cyl_2->getQuadJK( 0 , 4 , 0 );
+
+//# creer les hexas manquants
+
+   Hex::Hexa* hexa_rmp_7_g2 = doc->addHexa( quad_7_b_g2 , quad_7_h_g2 ,quad_7_f_g2 , quad_2_3_z_g2 , quad_1_2_z_g2 , quad_3_7_f_g2 );
+   if (hexa_rmp_7_g2 == NULL)
+      return HERR;
+
+//print "Hexa_7"
+//print hexa_rmp_7_g2
+
+   Hex::Hexa* hexa_rmp_7_8_g2 = doc->addHexa( quad_7_8_b_g2 , quad_7_8_h_g2 , quad_7_8_f_g2 , quad_3_4_z_g2 , quad_4_8_f_g2 , quad_3_7_f_g2 );
+   if (hexa_rmp_7_8_g2==NULL)
+      return HERR;
+
+   Hex::Hexa* hexa_rmp_8_g2 = doc->addHexa( quad_8_b_g2 , quad_8_h_g2 , quad_8_f_g2 , quad_4_5_z_g2 , quad_5_6_z_g2 , quad_4_8_f_g2);
+   if (hexa_rmp_8_g2==NULL)
+      return HERR;
+
+
+
+   Hex::Edge* edge_cut = grille_cyl_2->getEdgeK( 5 , 0 , 0 );
+   Hex::Elements* mod_7_couche = doc->cut( edge_cut , 1 );
+   if (mod_7_couche==NULL)
+      return HERR;
+
+   doc->saveVtk ("bride.vtk");
+   return HOK;
+}
diff --git a/src/HEXABLOCK/test_bug1.cxx b/src/HEXABLOCK/test_bug1.cxx
new file mode 100755 (executable)
index 0000000..d665166
--- /dev/null
@@ -0,0 +1,155 @@
+
+// C++ : Construction de la bride
+
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+static const int k0 = 0;
+static const int k1 = 1;
+static const int OPT_INV_EDGE = 1;
+static const int OPT_QUAD_IK = 2;
+
+// ======================================================== sauver_schema
+bool is_here (int masque, int option)
+{
+   bool   rep = (masque IAND option) > 0;
+   return rep;
+}
+// ======================================================== sauver_schema
+void sauver_schema (Hex::Document* doc)
+{
+   static int numero = 0;
+   char nomfic [32];
+   sprintf (nomfic, "essai%d.vtk", numero);
+   numero++;
+
+   doc->saveVtk (nomfic);
+}
+// ======================================================== merge_quads
+void merge_quads (Hex::Document* doc, Hex::Elements* quart, Hex::Elements* demi,
+                  int ni1, int nj1, int ni2, int nj2, int mask=0)
+{
+   int  inv     = is_here (mask, OPT_INV_EDGE);
+   bool quad_ik = is_here (mask, OPT_QUAD_IK);
+   int  iq1     = 0;
+   int  iq3     = 1;
+
+   if (quad_ik || inv) 
+      {
+      iq1 = 1;
+      iq3 = 0;
+      }
+
+   Hex::Quad* orig  = quad_ik ? quart->getQuadIK (ni1, nj1, k0)
+                              : quart->getQuadJK (ni1, nj1, k0);
+   Hex::Quad* dest  = demi->getQuadJK  (ni2, nj2, k0);
+
+   if (quad_ik) orig->dumpPlus();
+
+   Hex::Vertex* v1  = dest->getVertex (iq1);
+   Hex::Vertex* v3  = dest->getVertex (iq3);
+
+   Hex::Vertex* v2  = orig->getVertex (0);
+   Hex::Vertex* v4  = orig->getVertex (1);
+
+   doc->mergeQuads (dest, orig, v1, v2, v3, v4);
+   sauver_schema (doc);
+}
+// ======================================================== test_bug0
+int test_bug0 ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vertex* orig2 = doc->addVertex (7,0,0);
+
+   Hex::Vector* dz = doc->addVector (0,0,1);
+   Hex::Vector* dx = doc->addVector (1,0,0);
+
+   const int dim_z  = 1;
+   double drd = 0.5;
+   double drq = 2*drd;
+   double dl  = 1;
+   int    nrq = 10;
+   int    nrd = 5;
+   int    naq = 4;
+   int    nad = 10;
+                               // Les grilles initiales
+
+   Hex::Elements* quart = doc->makeCylindrical (orig1,dx,dz,drq, 45, 
+                                                dl,nrq,naq,dim_z);
+
+   Hex::Elements* demi  = doc->makeCylindrical (orig2,dx,dz,drd, 180, 
+                                                dl,nrd,nad, dim_z);
+   sauver_schema (doc);
+                               // Creuser les fondations de demi dans quart
+   int jmax= nrq-1;
+   for (int nj= 0; nj<2 ; nj++)
+       {
+       for (int ni=3; ni<jmax-nj ; ni++)
+           {
+           Hex::Hexa* cell = quart->getHexaIJK (ni, nj, k0);
+           cell->remove ();
+           }
+   }
+   sauver_schema (doc);
+   // doc->setLevel (1);
+   // doc->dump ();
+                               // On fusionne les bords
+   merge_quads (doc, quart, demi, 9, 0,   nrd, 0);
+   merge_quads (doc, quart, demi, 8, 1,   nrd, 1, OPT_QUAD_IK);
+   // doc->dump ();
+   doc->countPropagation ();
+   merge_quads (doc, quart, demi, 6, 2,   nrd, 4, OPT_QUAD_IK);
+   //  doc->countPropagation ();
+   merge_quads (doc, quart, demi, 8, 1,   nrd, 2);
+   merge_quads (doc, quart, demi, 7, 2,   nrd, 3, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 6, 2,   nrd, 4, OPT_QUAD_IK);
+
+   merge_quads (doc, quart, demi, 5, 2,   nrd, 5, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 4, 2,   nrd, 6, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 3, 2,   nrd, 7, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 3, 1,   nrd, 8, OPT_INV_EDGE);
+   merge_quads (doc, quart, demi, 3, 0,   nrd, 9, OPT_INV_EDGE);
+
+   return HOK;
+}
+// ======================================================== test_bug1
+int test_bug1 ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+
+   Hex::Vector* vx = doc->addVector (1,0,0);
+   Hex::Vector* vy = doc->addVector (0,1,0);
+   Hex::Vector* vz = doc->addVector (0,0,1);
+
+   Hex::Elements* grid = doc->makeCartesian (orig1, vx,vy,vz, 4,3,2);
+   Hex::Edge*     edge = grid->getEdgeI (0,0,0);
+
+   doc->saveVtk ("bug1.vtk");
+   Hex::Elements* cut  = doc->cut (edge, 1);
+
+   doc->saveVtk ("bug2.vtk");
+   grid->saveVtk ("bug3.vtk");
+
+   int nro=0;
+   cut->saveVtk ("cut.vtk", nro);
+   int nbre = cut->countHexa ();
+   for (int nc=0 ; nc<nbre ; nc++)
+       {
+       cut->getHexa(nc)->remove ();
+       cut->saveVtk ("cut.vtk", nro);
+       }
+
+
+   return HOK;
+}
diff --git a/src/HEXABLOCK/test_debride.cxx b/src/HEXABLOCK/test_debride.cxx
new file mode 100755 (executable)
index 0000000..cedb07e
--- /dev/null
@@ -0,0 +1,150 @@
+
+// C++ : Construction de la bride
+
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+static const int k0 = 0;
+static const int k1 = 1;
+static const int OPT_INV_EDGE = 1;
+static const int OPT_QUAD_IK = 2;
+
+// ======================================================== sauver_schema
+bool is_here (int masque, int option)
+{
+   bool   rep = (masque IAND option) > 0;
+   return rep;
+}
+// ======================================================== sauver_schema
+void sauver_schema (Hex::Document* doc)
+{
+   static int numero = 0;
+   char nomfic [32];
+   sprintf (nomfic, "debride%d.vtk", numero);
+   numero++;
+
+   doc->saveVtk (nomfic);
+}
+// ======================================================== merge_quads
+void merge_quads (Hex::Document* doc, Hex::Elements* quart, Hex::Elements* demi,
+                  int ni1, int nj1, int ni2, int nj2, int mask=0)
+{
+   int  inv     = is_here (mask, OPT_INV_EDGE);
+   bool quad_ik = is_here (mask, OPT_QUAD_IK);
+   int  iq1     = 0;
+   int  iq3     = 1;
+
+   if (quad_ik || inv) 
+      {
+      iq1 = 1;
+      iq3 = 0;
+      }
+
+   Hex::Quad* orig  = quad_ik ? quart->getQuadIK (ni1, nj1, k1)
+                              : quart->getQuadJK (ni1, nj1, k1);
+   Hex::Quad* dest  = demi->getQuadJK  (ni2, nj2, k1);
+
+   if (quad_ik) orig->dumpPlus();
+
+   Hex::Vertex* v1  = dest->getVertex (iq1);
+   Hex::Vertex* v3  = dest->getVertex (iq3);
+
+   Hex::Vertex* v2  = orig->getVertex (0);
+   Hex::Vertex* v4  = orig->getVertex (1);
+
+   doc->mergeQuads (dest, orig, v1, v2, v3, v4);
+   sauver_schema (doc);
+}
+// ======================================================== test_debride
+int test_debride ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vertex* orig2 = doc->addVertex (7,0,0);
+
+   Hex::Vector* dz = doc->addVector (0,0,1);
+   Hex::Vector* dx = doc->addVector (1,0,0);
+
+   const int dim_z  = 5;
+   double drd = 0.5;
+   double drq = 2*drd;
+   double dl  = 1;
+   int    nrq = 10;
+   int    nrd = 5;
+   int    naq = 4;
+   int    nad = 10;
+                               // Les grilles initiales
+
+   Hex::Elements* quart = doc->makeCylindrical (orig1,dx,dz,drq, 45, 
+                                                dl,nrq,naq,dim_z, true);
+
+   Hex::Elements* demi  = doc->makeCylindrical (orig2,dx,dz,drd, 180, 
+                                                dl,nrd,nad, dim_z, true);
+   sauver_schema (doc);
+   for (int nk= 2; nk<dim_z ; nk++)
+       {
+                               // Elagage du quart (de brie)
+       for (int nj= 0; nj<naq ; nj++)
+          {
+          int ideb = nk==dim_z-1 ? 1 : 2;
+          for (int ni=ideb; ni<nrq ; ni++)
+             quart->getHexaIJK (ni, nj, nk)->remove ();
+          }
+                               // Elagage du demi (reblochon)
+       for (int nj= 0; nj<nad ; nj++)
+          for (int ni=nrd-nk; ni<nrd ; ni++)
+             demi->getHexaIJK (ni, nj, nk)->remove ();
+       }
+
+   sauver_schema (doc);
+                               // La semelle
+   for (int nj= 0; nj<naq ; nj++)
+       {
+       for (int ni=2; ni<nrq ; ni++)
+           quart->getHexaIJK (ni, nj, k0)->remove ();
+       }
+   sauver_schema (doc);
+
+                               // Creuser les fondations de demi dans quart
+   int jmax= nrq-1;
+   for (int nj= 0; nj<2 ; nj++)
+       {
+       for (int ni=3; ni<jmax-nj ; ni++)
+           {
+           Hex::Hexa* cell = quart->getHexaIJK (ni, nj, k1);
+           cell->remove ();
+           }
+   }
+   sauver_schema (doc);
+                               // On fusionne les bords
+   merge_quads (doc, quart, demi, 9, 0,   nrd, 0);
+   merge_quads (doc, quart, demi, 8, 1,   nrd, 1, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 8, 1,   nrd, 2);
+   merge_quads (doc, quart, demi, 7, 2,   nrd, 3, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 6, 2,   nrd, 4, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 5, 2,   nrd, 5, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 4, 2,   nrd, 6, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 3, 2,   nrd, 7, OPT_QUAD_IK);
+   merge_quads (doc, quart, demi, 3, 1,   nrd, 8, OPT_INV_EDGE);
+   merge_quads (doc, quart, demi, 3, 0,   nrd, 9, OPT_INV_EDGE);
+
+   //doc->dump ();
+   int nbc = doc->countPropagation ();
+   doc->purge ();
+   //doc->dump ();
+   for (int nro=0 ; nro<doc->countHexa() ; nro++)
+       {
+       printf ( "Hexa[%03d] = ", nro);
+       doc->getHexa(nro)->printName ("\n");
+       }
+
+   sauver_schema (doc);
+   return HOK;
+}
diff --git a/src/HEXABLOCK/test_hexa1.cxx b/src/HEXABLOCK/test_hexa1.cxx
new file mode 100755 (executable)
index 0000000..3763f53
--- /dev/null
@@ -0,0 +1,937 @@
+
+// C++ : Test unitaire
+
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexShape.hxx"
+#include "HexLaw.hxx"
+#include "HexMatrix.hxx"
+
+// ======================================================== print_propagations
+void print_propagations (Hex::Document* doc)
+{
+   int nb = doc->countPropagation ();
+   Display (nb);
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+           Hex::Edge*   edge = table [ned];
+           Hex::Vertex* v0   = edge->getVertex (0);
+           Hex::Vertex* v1   = edge->getVertex (1);
+
+           if (way)
+              {
+              printf ("     (");
+              v0->printName (", ");
+              v1->printName (")\n");
+              }
+          else
+              {
+              v1->printName (", ");
+              v0->printName (")\n");
+              printf ("     (");
+              }
+           }
+       }
+}
+// ======================================================== test_sphere
+int test_sphere ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex*  orig = doc->addVertex (0,0,0);
+
+   int    ncouches = 1;
+   double k = 0.8;
+   Hex::Vector*   decal  = doc->addVector (1,1,1);
+   Hex::Elements* sphere = doc->makeSpherical (orig, decal, ncouches, k);
+
+   for (int nc=0 ; nc <= ncouches ; nc++)
+       {
+       Hex::Hexa* cell = sphere->getStrate (nc, Hex::Q_A);
+       cell->remove ();
+       // sphere->getStrate (nc, Hex::Q_A)->remove ();
+       // sphere->getStrate (nc, Hex::Q_B)->remove ();
+       }
+
+   sphere->saveVtk ("sphere.vtk");
+   return HOK;
+}
+// ======================================================== test_cartesi1
+int test_cartesi1 ()
+{
+   const int size_x = 15;
+   const int size_y = 12;
+   const int size_z = 8;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   //  print_propagations (doc);
+
+   for (int nz=0; nz<size_z ; nz++)
+       for (int ny=nz+1; ny<size_y-nz-1 ; ny++)
+           for (int nx=nz+1; nx<size_x-nz-1 ; nx++)
+               {
+               Hex::Hexa* cell = grid->getHexaIJK (nx, ny, nz);
+               cell->remove ();
+               }
+   
+   doc->setLevel (1);
+   print_propagations (doc);
+   grid->saveVtk ("grid_cart.vtk");
+
+   // doc->dump ();
+   return HOK;
+}
+// ======================================================== afficher
+#define Afficher(elt) afficher (#elt, elt)
+int afficher (cpchar nom, Hex::EltBase* elt)
+{
+   if (elt==NULL)
+      {
+      printf (" .... %s = 0x0\n", nom);
+      return HOK;
+      }
+
+   printf (" .... %s = 0x%08lx = %03d\n", nom, (unsigned long) elt, elt->getId());
+   return HOK;
+}
+// ======================================================== test_find
+int test_find ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   grid->saveVtk ("mini1.vtk");
+   doc->dump ();
+
+   Hex::Vertex *v00, *v02, *v06, *v08, *v10, *v22, *v26;
+
+   Afficher ( v00 = doc->findVertex (0, 0, 0));
+   Afficher ( v02 = doc->findVertex (1, 1, 0));
+   Afficher ( v06 = doc->findVertex (1, 1, 1));
+   Afficher ( v08 = doc->findVertex (2, 1, 0));
+   Afficher ( v10 = doc->findVertex (2, 1, 1));
+   Afficher ( v22 = doc->findVertex (2, 1, 2));
+   Afficher ( v26 = doc->findVertex (2, 2, 2));
+
+   printf ("\n");
+
+   Afficher (doc->findEdge (v06, v10));
+   Afficher (doc->findEdge (v10, v06));
+   printf ("\n");
+
+   Afficher (doc->findQuad (v02, v10));
+   Afficher (doc->findQuad (v06, v08));
+   Afficher (doc->findQuad (v02, v06));
+
+   printf ("\n");
+   Afficher (doc->findHexa (v00, v06));
+   Afficher (doc->findHexa (v06, v26));
+   Afficher (doc->findHexa (v26, v06));
+
+   return HOK;
+}
+// ======================================================== test_joint
+int test_joint ()
+{
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   Hex::Vertex*   orig2 = doc->addVertex  (dimx/2.0,0,8);
+   Hex::Vector*   vectj = doc->addVector (0,1,0);
+   Hex::Vector*   vecti = doc->addVector (1,0,0);
+   Hex::Elements* grid2 = doc->makeCylindrical (orig2, vecti, vectj, 
+                   1, 180, 1,        dimz,dimy,dimx);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quad* cible = grid2->getQuadJK (dimz, mx, my); 
+
+   Hex::Vertex* v1 = prems->getVertex (0);
+   Hex::Vertex* v3 = prems->getVertex (1);
+
+   Hex::Vertex* v2 = cible->getVertex (1);
+   Hex::Vertex* v4 = cible->getVertex (2);
+
+   // v1->setScalar (3);
+   // v2->setScalar (3);
+   // v3->setScalar (6);
+   // v4->setScalar (6);
+
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   const int hauteur = 5;
+   Hex::Elements* joint = doc->joinQuads(liste, cible, v1,v2,v3,v4, hauteur);
+   // for (int nh=0 ; nh<hauteur ; nh++) joint->getHexa(nh)->setScalar (5);
+
+   int nbr_joint_vertex =  joint->countVertex ();
+   int nbr_surf_vertex  =  nbr_joint_vertex/(hauteur+1);
+
+   Display (nbr_joint_vertex);
+   Display (nbr_surf_vertex);
+
+   int indice0 = joint->findVertex (v1);
+   Display (indice0);
+
+   for (int nh=0 ; nh<nbr_surf_vertex ; nh++) 
+       joint->getVertex(nh)->setScalar (5);
+
+   for (int nh=0 ; nh<=hauteur ; nh++) 
+       joint->getVertex(nh*nbr_surf_vertex)->setScalar (3);
+
+   doc->saveVtk ("joint.vtk");
+   return HOK;
+}
+// ======================================================== test_prism
+int test_prism ()
+{
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   Hex::Elements* prisme = doc->prismQuads  (liste, dir, 5);
+   // doc->saveVtk ("prisme.vtk");
+   prisme->saveVtk ("prisme.vtk");
+
+   return HOK;
+}
+// ======================================================== test_hexa1
+int test_hexa1 ()
+{
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->dump ();
+
+   return HOK;
+}
+// ======================================================== test_decoupage
+int test_decoupage ()
+{
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+   Hex::Edge*     arete = grid->getEdgeK (0, 0, 0);
+
+   doc ->dump ();
+   doc ->saveVtk ("no_decoupe.vtk");
+/* Hex::Elements* grid2 = */  doc->cut (arete, 1);
+
+   doc ->dump ();
+   doc ->saveVtk ("decoupe.vtk");
+   // doc ->saveFile ();
+
+   return HOK;
+}
+// ======================================================== test_gen_xml
+int test_gen_xml ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Hexa*   cell    = grid->getHexa (0);
+   Hex::Quad*   face    = cell->getQuad (0);
+   Hex::Edge*   arete   = cell->getEdge (0);
+   Hex::Vertex* noeud   = cell->getVertex (0);
+
+   Hex::Shape* shape1 = new Hex::Shape("riri");
+   Hex::Shape* shape2 = new Hex::Shape("fifi");
+   Hex::Shape* shape3 = new Hex::Shape("loulou");
+
+   noeud->setAssociation (shape1);
+   arete->setAssociation (shape2);
+   face ->setAssociation (shape3);
+
+   Hex::Law* law1 = doc->addLaw("loi1", 1);
+   Hex::Law* law2 = doc->addLaw("loi2", 2);
+   Hex::Law* law3 = doc->addLaw("loi3", 3);
+
+   law1->setKind (Hex::Uniform);
+   law2->setKind (Hex::Arithmetic);
+   law3->setKind (Hex::Geometric);
+
+   Hex::Propagation* prop1 = doc->getPropagation (0);
+   Hex::Propagation* prop2 = doc->getPropagation (1);
+   Hex::Propagation* prop3 = doc->getPropagation (2);
+
+   prop1->setLaw (law1);
+   prop2->setLaw (law2);
+   prop3->setLaw (law3);
+
+   prop1->setWay (true);
+   prop2->setWay (false);
+   prop3->setWay (true);
+
+   doc ->saveVtk ("mini.vtk");
+   doc ->setFile ("Essai");
+   doc ->saveFile ();
+
+   return HOK;
+}
+// ======================================================== test_relecture
+int test_relecture ()
+{
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.loadDocument ("Essai");
+
+   doc ->dump ();
+   doc ->saveVtk ("restore.vtk");
+
+   return HOK;
+}
+// ======================================================== test_clone
+int test_clone ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   bond  = doc->addVector (0, 0, 7);
+   Hex::Elements* grid2 = doc->makeTranslation (grid, bond);
+
+   doc ->saveVtk ("clonage.vtk");
+   doc ->dump();
+
+   HexDump (grid2->getHexa      (1));
+   HexDump (grid2->getHexaIJK   (1,1,1));
+   HexDump (grid2->getVertexIJK (1,1,1));
+
+   return HOK;
+}
+// ======================================================== test_separ
+int test_separ ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->saveVtk ("separ.vtk");
+   doc ->dump();
+
+   return HOK;
+}
+// ======================================================== test_cyl_karima
+int test_cyl_karima ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* c2 = doc->addVertex (0,0,0);
+   Hex::Vector* dz = doc->addVector (0,0,1);
+   Hex::Vector* dx = doc->addVector (1,0,0);
+
+   double dr = 4.12;
+
+   double a2 = 180;
+   int    l2 = 70;
+
+   int nr2 = 5;
+   int na2 = 5;
+   int nl2 = 1;
+
+/* Hex::Elements* cyl2 = */ doc->makeCylindrical (c2, dx, dz, dr, a2, l2, 
+                                                  nr2, na2, nl2, false );
+   doc->saveVtk ("cyl_karima.vtk");
+   // doc->dump ();
+
+   return HOK;
+}
+// ================================================== test_grille_cyl
+int test_grille_cyl ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (10, 0,0);
+
+   Hex::Vertex* orig3 = doc->addVertex ( 0,10,0);
+   Hex::Vertex* orig4 = doc->addVertex (10,10,0);
+
+   Hex::Vertex* orig5 = doc->addVertex ( 0,20,0);
+   Hex::Vertex* orig6 = doc->addVertex (10,20,0);
+
+   Hex::Vector* vz = doc->addVector (0,0,1);
+   Hex::Vector* vx = doc->addVector (1,0,0);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 3;
+
+   Hex::Elements *c1, *c2, *c3, *c4, *c5, *c6;
+
+   c1 = doc->makeCylindrical (orig1, vx,vz,dr, 360, dl,nr, 4, nl, true);
+   c2 = doc->makeCylindrical (orig2, vx,vz,dr, 360, dl,nr, 8, nl, true);
+   c3 = doc->makeCylindrical (orig3, vx,vz,dr, 270, dl,nr, 8, nl, true);
+   c4 = doc->makeCylindrical (orig4, vx,vz,dr, 270, dl,nr, 7, nl, true);
+   c5 = doc->makeCylindrical (orig5, vx,vz,dr, 360, dl,nr, 5, nl, true);
+   c6 = doc->makeCylindrical (orig6, vx,vz,dr, 360, dl,nr, 6, nl, true);
+
+   int base2 = nr*nl*8;
+   c2->getHexa(base2 + 0)->setScalar (5);
+   c2->getHexa(base2 + 1)->setScalar (5);
+   c2->getHexa(base2 + 2)->setScalar (5);
+
+   doc->saveVtk ("cylindres.vtk");
+   // doc->dump ();
+
+   return HOK;
+}
+// ===================================================== test_cylinder
+int test_cylinder ()
+{
+   int    nvtk    = 0;
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (50,0,0);
+   Hex::Vector* vz    = doc->addVector (0,0,1);
+   Hex::Vector* vx    = doc->addVector (1,0,0);
+
+   int nr  = 4;
+   int nri = 3;
+   int nre = nr;
+   int na = 9;
+   int nl = 5;
+
+   Hex::Cylinder* cyl  = doc->addCylinder   (orig1, vz, nr, nl);
+   Hex::Pipe*     pipe = doc->addPipe       (orig2, vz, nri, nre, nl);
+
+   doc->makeCylinder (cyl,  vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   doc->makePipe     (pipe, vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   return HOK;
+}
+// ======================================================== test_croix
+int test_croix ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nr1 = 2;
+   int nl1 = 10;
+   int nr2 = 1;
+   int nl2 = 10;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, nr1, nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, nr2, nl2);
+   Hex::CrossElements* grid = doc->makeCylinders (cyl1, cyl2);
+
+   grid->dump();
+   grid->dumpVertex();
+
+#if 0
+   for (int ny=0; ny<Hex::S_MAXI; ny++)
+       {
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 0)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 1)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 3)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 4)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 5)->remove ();
+
+       grid->getHexaIJK (Hex::Cyl2, 1, ny, 0)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 1, ny, 1)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 1, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl2, 1, ny, 3)->remove ();
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       {
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 0)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 1)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 3)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 4)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 5)->remove ();
+
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 0)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 1)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 2)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 3)->remove ();
+       }
+
+   /*********************************
+   grid->getHexaIJK (Hex::Cyl2, 0, 3, 1)->remove ();
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SE, 2)->remove ();
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SE, 1)->remove ();
+
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 3)->remove ();
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 2)->remove ();
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 1)->remove ();
+    ********************************* */
+#endif
+
+   grid->getVertexIJK (Hex::Cyl1, 2, Hex::S_E, 0)->setScalar (5);
+   grid->getVertexIJK (Hex::Cyl1, 2, Hex::S_E, 1)->setScalar (5);
+
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_E,  0)->setScalar (5);
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SW, 0)->setScalar (5);
+
+   doc->saveVtk ("croix.vtk");
+   //  doc->dump ();
+
+   return HOK;
+}
+// ======================================================== test_pipes
+int test_pipes ()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   double h1  = 10, h2  = 10;
+   double ri1 = 1,  ri2 = 1.5;
+   double re1 = 2,  re2 = 3;
+
+   Hex::Pipe* pipe1  = doc->addPipe (ori1, vz, ri1, re1, h1);
+   Hex::Pipe* pipe2  = doc->addPipe (ori2, vx, ri2, re2, h2);
+   Hex::CrossElements* grid = doc->makePipes (pipe1, pipe2);
+
+   grid->getHexaIJK (0, 1,1,1)->setScalar (3);
+   grid->getHexaIJK (1, 1,1,1)->setScalar (6);
+   grid->dump();
+   grid->dumpHexas();
+
+   doc->saveVtk ("pipes.vtk");
+   /// doc->dump ();
+   return HOK;
+}
+// ======================================================== test_lorraine
+int test_lorraine()
+{
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vertex* ori3 = doc->addVertex ( 0,0,12);
+   Hex::Vertex* ori4 = doc->addVertex (-5,0,17);
+
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nl1 = 10;
+   int nl2 = 10;
+
+   double rsmall = 1;
+   double rmoy   = 2;
+   double rbig   = 3;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, rmoy,   nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, rsmall, nl2);
+
+   Hex::Cylinder* cyl3  = doc->addCylinder (ori3, vz, rmoy, nl1);
+   Hex::Cylinder* cyl4  = doc->addCylinder (ori4, vx, rbig, nl2);
+
+   Hex::CrossElements* grid1 = doc->makeCylinders (cyl1, cyl2);
+   Hex::CrossElements* grid2 = doc->makeCylinders (cyl4, cyl3);
+
+#define Imprimer(x) printf (#x " = ") ; if (x) x->dump() ; else printf ("NULL\n")
+   const int nx_int = 0;
+   const int nx_ext = 1;
+
+   //           vc2 = grid1->getVertexIJK (Hex::Cyl2, 0,0,0);
+   //           vc3 = grid2->getVertexIJK (Hex::Cyl1, 0,0,0);
+                                     //    Cyl     i     j     k
+   Hex::Quad* qb = grid1-> getQuadIJ (Hex::Cyl2, nx_ext, Hex::S_E, 4);
+   Hex::Quad* qh = grid2-> getQuadIJ (Hex::Cyl1, nx_ext, Hex::S_N, 0); 
+
+   Hex::Vertex* vb0 = qb->getVertex (3);
+   Hex::Vertex* vb1 = qb->getVertex (2);
+   Hex::Vertex* vh0 = qh->getVertex (0);
+   Hex::Vertex* vh1 = qh->getVertex (1);
+
+   vb0 = grid1->getVertexIJK (Hex::Cyl2, 2, Hex::S_E,  4);  // cible
+   vb1 = grid1->getVertexIJK (Hex::Cyl2, 2, Hex::S_NE, 4);
+   vh0 = grid2->getVertexIJK (Hex::Cyl1, 2, Hex::S_N,  0);   // depart
+   vh1 = grid2->getVertexIJK (Hex::Cyl1, 2, Hex::S_NW, 0);
+
+   Imprimer (vh0);
+   Imprimer (vh1);
+   Imprimer (vb0);
+   Imprimer (vb1);
+
+   // qb->remove ();
+   // qh->remove ();
+   Hex::Quads hliste;
+
+   hliste.push_back (qh);
+   for (int ny=1; ny<Hex::S_MAXI; ny++)
+       {
+       int ns = (ny + Hex::S_N) MODULO Hex::S_MAXI;
+       hliste.push_back (grid2->getQuadIJ (Hex::Cyl1, nx_ext, ns, 0)); 
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       hliste.push_back (grid2->getQuadIJ (Hex::Cyl1, nx_int, ny, 0)); 
+
+   doc->joinQuads  (hliste, qb, vh0, vb0, vh1, vb1, 5);
+   doc->saveVtk ("lorraine.vtk");
+   // doc->dump ();
+   return HOK;
+}
+// ======================================================== test_disconnect
+int test_disconnect ()
+{
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig1 = doc->addVertex (0,0,0);
+   Hex::Vertex*   orig2 = doc->addVertex (4,0,0);
+   Hex::Vertex*   orig3 = doc->addVertex (8,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z);
+   Hex::Elements* grid2 = doc->makeCartesian (orig2, dir, size_x,size_y,size_z);
+   Hex::Elements* grid3 = doc->makeCartesian (orig3, dir, size_x,size_y,size_z);
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa1 = grid1->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa2 = grid2->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa3 = grid3->getHexaIJK   (1,1,0);
+
+   Hex::Quad* quad  = grid1->getQuadJK  (1,1,0);
+   Hex::Edge* edge  = grid2->getEdgeK   (1,2,0);
+   Hex::Vertex* vertex = grid3->getVertexIJK (1,1,1);
+
+   quad->setScalar   (5);
+   edge->setScalar   (5);
+   vertex->setScalar (5);
+
+   doc->saveVtk ("test_disco", nvtk);
+   doc->disconnectQuad (hexa1, quad);
+
+   hexa1 ->transform (&matrice);
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->disconnectEdge (hexa2, edge);
+
+   hexa2->transform (&matrice);
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->disconnectVertex (hexa3, vertex);
+
+   hexa3->transform (&matrice);
+   doc->saveVtk ("test_disco", nvtk);
+
+   doc->dumpPropagation ();
+   // doc->dump  ();
+
+   return HOK;
+}
+// ======================================================== test_propagation
+int test_propagation ()
+{
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig = doc->addVertex (0,0,0);
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   //  Hex::Elements* grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   int nb = doc->countPropagation ();
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+
+           if (way)
+              {
+              printf ("     (");
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName (")\n");
+              }
+          else
+              {
+              printf ("     (");
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName (")\n");
+              }
+           }
+       }
+
+   doc->dump  ();
+   doc->saveVtk ("test_propagation.vtk");
+   doc->setFile ("test_propagation");
+   doc->saveFile ();
+
+   return HOK;
+}
+// ======================================================== test_move
+int test_move ()
+{
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   enhaut  = doc->addVector (0, 0, 5);
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+   // Hex::Vector*   agauche = doc->addVector (0, 5, 0);
+
+   Hex::Matrix matrice;
+   matrice.defTranslation (enhaut);
+
+   Hex::Hexa* cube    = grid->getHexa (1);
+   Hex::Quad* dessous = cube->getQuad (Hex::Q_A);
+   dessous->dump();
+   
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   /* Hex::Elements* grid3 = doc->makeTranslation (grid, agauche); */
+   Hex::Hexa* cube2     = grid2->getHexa (1);
+
+   doc ->saveVtk ("move0.vtk");
+
+   cube ->disconnectQuad (dessous);
+   cube ->transform (&matrice);
+   cube2->transform (&matrice);
+
+   doc ->saveVtk ("move1.vtk");
+   doc ->dump();
+
+   return HOK;
+}
+// ======================================================== test_move2
+int test_transfo ()
+{
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   int    nvtk    = 0;
+   cpchar fic_vtk = "transfo";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   doc ->setLevel (1);
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x, size_y,
+                                                        size_z);
+   if (grid==NULL)
+      return HERR;
+
+   orig->setScalar(2);
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   if (grid2==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid3  = doc->makeScale (grid2, orig, 2);
+   if (grid3==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid4 = doc->makeRotation (grid2, orig, dir, 45);
+   if (grid4==NULL)
+      return HERR;
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid5 = doc->makeSymmetryPoint (grid4, orig);
+   if (grid5==NULL)
+      return HERR;
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector* dir1  = doc->addVector (1,0,0);
+   Hex::Elements* grid6 = doc->makeSymmetryLine (grid4, orig, dir1);
+   if (grid6==NULL)
+      return HERR;
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(3);
+   grid6->getHexa(0)->getVertex(0)->setScalar(3);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(0);
+   grid6->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid7 = doc->makeSymmetryLine (grid2, orig, dir1);
+   if (grid7==NULL)
+      return HERR;
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid7->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid7->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid8 = doc->makeSymmetryPlane (grid2, orig, dir1);
+   if (grid8==NULL)
+      return HERR;
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid8->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid8->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid9 = doc->makeSymmetryPlane (grid3, orig, dir);
+   if (grid9==NULL)
+      return HERR;
+
+   grid3->getHexa(0)->getVertex(0)->setScalar(4);
+   grid9->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid9->getHexa(0)->removeConnected ();
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   return HOK;
+}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI.cxx
new file mode 100755 (executable)
index 0000000..cc3b245
--- /dev/null
@@ -0,0 +1,149 @@
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+#include "HEXABLOCKGUI.h"
+
+#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SUIT_Desktop.h>
+#include <SalomeApp_Application.h>
+
+#include <SALOME_LifeCycleCORBA.hxx>
+
+// QT Includes
+#include <QInputDialog>
+#include <QIcon>
+
+using namespace std;
+
+// Constructor
+HEXABLOCKGUI::HEXABLOCKGUI() :
+  SalomeApp_Module( "HEXABLOCK" ), // default name
+  LightApp_Module( "HEXABLOCK" )
+{
+}
+
+// Gets an reference to the module's engine
+HEXABLOCK_ORB::HEXABLOCK_Gen_ptr HEXABLOCKGUI::InitHEXABLOCKGen( SalomeApp_Application* app )
+{
+  Engines::Component_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","HEXABLOCK" );
+  HEXABLOCK_ORB::HEXABLOCK_Gen_ptr clr = HEXABLOCK_ORB::HEXABLOCK_Gen::_narrow(comp);
+  ASSERT(!CORBA::is_nil(clr));
+  return clr;
+}
+
+// Module's initialization
+void HEXABLOCKGUI::initialize( CAM_Application* app )
+{
+
+  SalomeApp_Module::initialize( app );
+
+  InitHEXABLOCKGen( dynamic_cast<SalomeApp_Application*>( app ) );
+
+  QWidget* aParent = application()->desktop();
+  SUIT_ResourceMgr* aResourceMgr = app->resourceMgr();
+
+  // create actions
+  createAction( 190, tr( "TLT_MY_NEW_ITEM" ), QIcon(), tr( "MEN_MY_NEW_ITEM" ), tr( "STS_MY_NEW_ITEM" ), 0, aParent, false,
+               this, SLOT( OnMyNewItem() ) );
+  QPixmap aPixmap = aResourceMgr->loadPixmap( "HEXABLOCK",tr( "ICON_GET_BANNER" ) );
+  createAction( 901, tr( "TLT_GET_BANNER" ), QIcon( aPixmap ), tr( "MEN_GET_BANNER" ), tr( "STS_GET_BANNER" ), 0, aParent, false,
+               this, SLOT( OnGetBanner() ) );
+
+  // create menus
+  int aMenuId;
+  aMenuId = createMenu( tr( "MEN_FILE" ), -1, -1 );
+  createMenu( separator(), aMenuId, -1, 10 );
+  aMenuId = createMenu( tr( "MEN_FILE_HEXABLOCK" ), aMenuId, -1, 10 );
+  createMenu( 190, aMenuId );
+
+  aMenuId = createMenu( tr( "MEN_HEXABLOCK" ), -1, -1, 30 );
+  createMenu( 901, aMenuId, 10 );
+
+  // create toolbars
+  int aToolId = createTool ( tr( "TOOL_HEXABLOCK" ) );
+  createTool( 901, aToolId );
+}
+
+// Module's engine IOR
+QString HEXABLOCKGUI::engineIOR() const
+{
+  CORBA::String_var anIOR = getApp()->orb()->object_to_string( InitHEXABLOCKGen( getApp() ) );
+  return QString( anIOR.in() );
+}
+
+// Module's activation
+bool HEXABLOCKGUI::activateModule( SUIT_Study* theStudy )
+{
+  bool bOk = SalomeApp_Module::activateModule( theStudy );
+
+  setMenuShown( true );
+  setToolShown( true );
+
+  return bOk;
+}
+
+// Module's deactivation
+bool HEXABLOCKGUI::deactivateModule( SUIT_Study* theStudy )
+{
+  setMenuShown( false );
+  setToolShown( false );
+
+  return SalomeApp_Module::deactivateModule( theStudy );
+}
+
+// Default windows
+void HEXABLOCKGUI::windows( QMap<int, int>& theMap ) const
+{
+  theMap.clear();
+  theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+  theMap.insert( SalomeApp_Application::WT_PyConsole,     Qt::BottomDockWidgetArea );
+}
+
+// Action slot
+void HEXABLOCKGUI::OnMyNewItem()
+{
+  SUIT_MessageBox::warning( getApp()->desktop(),tr( "INF_HEXABLOCK_BANNER" ), tr( "INF_HEXABLOCK_MENU" ) );
+}
+
+// Action slot
+void HEXABLOCKGUI::OnGetBanner()
+{
+  // Dialog to get the Name
+  bool ok = FALSE;
+  QString myName = QInputDialog::getText( getApp()->desktop(), tr( "QUE_HEXABLOCK_LABEL" ), tr( "QUE_HEXABLOCK_NAME" ),
+                                         QLineEdit::Normal, QString::null, &ok );
+
+  if ( ok && !myName.isEmpty()) // if we got a name, get a HEXABLOCK component and ask for makeBanner
+  {
+//     HEXABLOCK_ORB::HEXABLOCK_Gen_ptr hexablockgen = HEXABLOCKGUI::InitHEXABLOCKGen( getApp() );
+//     QString banner = hexablockgen->makeBanner( (const char*)myName.toLatin1() );
+//     SUIT_MessageBox::information( getApp()->desktop(), tr( "INF_HEXABLOCK_BANNER" ), banner, tr( "BUT_OK" ) );
+  }
+}
+
+// Export the module
+extern "C" {
+  CAM_Module* createModule()
+  {
+    return new HEXABLOCKGUI();
+  }
+}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI.h b/src/HEXABLOCKGUI/HEXABLOCKGUI.h
new file mode 100755 (executable)
index 0000000..08344fa
--- /dev/null
@@ -0,0 +1,55 @@
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//  HEXABLOCKGUI : HEXABLOCK component GUI implemetation 
+//
+#ifndef _HEXABLOCKGUI_H_
+#define _HEXABLOCKGUI_H_
+
+#include <SalomeApp_Module.h>
+
+#include <SALOMEconfig.h>
+#include CORBA_CLIENT_HEADER(HEXABLOCK_Gen)
+
+class SalomeApp_Application;
+class HEXABLOCKGUI: public SalomeApp_Module
+{
+  Q_OBJECT
+
+public:
+  HEXABLOCKGUI();
+
+  void    initialize( CAM_Application* );
+  QString engineIOR() const;
+  void    windows( QMap<int, int>& ) const;
+
+  static HEXABLOCK_ORB::HEXABLOCK_Gen_ptr InitHEXABLOCKGen( SalomeApp_Application* );
+
+public slots:
+  bool    deactivateModule( SUIT_Study* );
+  bool    activateModule( SUIT_Study* );
+
+protected slots:
+  void            OnMyNewItem();
+  void            OnGetBanner();
+};
+
+#endif
diff --git a/src/HEXABLOCKGUI/HEXABLOCK_icons.ts b/src/HEXABLOCKGUI/HEXABLOCK_icons.ts
new file mode 100755 (executable)
index 0000000..b9272a5
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE TS>
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>ICON_GET_BANNER</source>
+            <translation>ExecHEXABLOCK.png</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/HEXABLOCKGUI/HEXABLOCK_msg_en.ts b/src/HEXABLOCKGUI/HEXABLOCK_msg_en.ts
new file mode 100755 (executable)
index 0000000..9d5bca5
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE TS>
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>MEN_FILE</source>
+            <translation>&amp;File</translation>
+        </message>
+        <message>
+            <source>MEN_FILE_HEXABLOCK</source>
+            <translation>Farewell</translation>
+        </message>
+        <message>
+            <source>MEN_GET_BANNER</source>
+            <translation>Get banner</translation>
+        </message>
+        <message>
+            <source>MEN_HEXABLOCK</source>
+            <translation>HEXABLOCK</translation>
+        </message>
+        <message>
+            <source>MEN_MY_NEW_ITEM</source>
+            <translation>My menu item</translation>
+        </message>
+        <message>
+            <source>STS_GET_BANNER</source>
+            <translation>Get HEXABLOCK banner</translation>
+        </message>
+        <message>
+            <source>STS_MY_NEW_ITEM</source>
+            <translation>Call my menu item</translation>
+        </message>
+        <message>
+            <source>TLT_GET_BANNER</source>
+            <translation>Get HEXABLOCK banner</translation>
+        </message>
+        <message>
+            <source>TLT_MY_NEW_ITEM</source>
+            <translation>My menu item</translation>
+        </message>
+        <message>
+            <source>TOOL_HEXABLOCK</source>
+            <translation>HEXABLOCK</translation>
+        </message>
+    </context>
+    <context>
+        <name>HEXABLOCKGUI</name>
+        <message>
+            <source>BUT_OK</source>
+            <translation>OK</translation>
+        </message>
+        <message>
+            <source>INF_HEXABLOCK_BANNER</source>
+            <translation>HEXABLOCK Information</translation>
+        </message>
+        <message>
+            <source>INF_HEXABLOCK_MENU</source>
+            <translation>This is just a test</translation>
+        </message>
+        <message>
+            <source>QUE_HEXABLOCK_LABEL</source>
+            <translation>Name Import</translation>
+        </message>
+        <message>
+            <source>QUE_HEXABLOCK_NAME</source>
+            <translation>Pretty live, isn't it ?</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/HEXABLOCKGUI/HEXABLOCK_msg_fr.ts b/src/HEXABLOCKGUI/HEXABLOCK_msg_fr.ts
new file mode 100755 (executable)
index 0000000..342f5f7
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE TS>
+<!--
+  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+
+  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License as published by the Free Software Foundation; either
+  version 2.1 of the License.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+
+  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+-->
+<TS version="1.1" >
+    <context>
+        <name>@default</name>
+        <message>
+            <source>MEN_FILE</source>
+            <translation>&amp;File</translation>
+        </message>
+        <message>
+            <source>MEN_FILE_HEXABLOCK</source>
+            <translation>Adieu</translation>
+        </message>
+        <message>
+            <source>MEN_GET_BANNER</source>
+            <translation>Get banner</translation>
+        </message>
+        <message>
+            <source>MEN_HEXABLOCK</source>
+            <translation>HEXABLOCK</translation>
+        </message>
+        <message>
+            <source>MEN_MY_NEW_ITEM</source>
+            <translation>My menu item</translation>
+        </message>
+        <message>
+            <source>STS_GET_BANNER</source>
+            <translation>Get HEXABLOCK banner</translation>
+        </message>
+        <message>
+            <source>STS_MY_NEW_ITEM</source>
+            <translation>Call my menu item</translation>
+        </message>
+        <message>
+            <source>TLT_GET_BANNER</source>
+            <translation>Get HEXABLOCK banner</translation>
+        </message>
+        <message>
+            <source>TLT_MY_NEW_ITEM</source>
+            <translation>My menu item</translation>
+        </message>
+        <message>
+            <source>TOOL_HEXABLOCK</source>
+            <translation>HEXABLOCK</translation>
+        </message>
+    </context>
+    <context>
+        <name>HEXABLOCKGUI</name>
+        <message>
+            <source>BUT_OK</source>
+            <translation>OK</translation>
+        </message>
+        <message>
+            <source>INF_HEXABLOCK_BANNER</source>
+            <translation>Information HEXABLOCK</translation>
+        </message>
+        <message>
+            <source>INF_HEXABLOCK_MENU</source>
+            <translation>Ceci est un simple test</translation>
+        </message>
+        <message>
+            <source>QUE_HEXABLOCK_LABEL</source>
+            <translation>Import Prenom</translation>
+        </message>
+        <message>
+            <source>QUE_HEXABLOCK_NAME</source>
+            <translation>Entrez votre prenom, s'il vous plait</translation>
+        </message>
+    </context>
+</TS>
diff --git a/src/HEXABLOCKGUI/Makefile.am b/src/HEXABLOCKGUI/Makefile.am
new file mode 100755 (executable)
index 0000000..1089a42
--- /dev/null
@@ -0,0 +1,70 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+# -* Makefile *- 
+# Author : 
+# Modified by : Alexander BORODIN (OCN) - autotools usage
+# Module : GHS3DPLUGIN
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# header files 
+salomeinclude_HEADERS = \
+       HEXABLOCKGUI.h
+
+# Libraries targets
+lib_LTLIBRARIES = libHEXABLOCK.la
+
+dist_libHEXABLOCK_la_SOURCES = \
+       HEXABLOCKGUI.cxx
+
+# MOC pre-processing
+MOC_FILES = \
+       HEXABLOCKGUI_moc.cxx
+
+nodist_libHEXABLOCK_la_SOURCES = $(MOC_FILES)
+
+libHEXABLOCK_la_CPPFLAGS = \
+       $(QT_INCLUDES) \
+       $(CAS_CPPFLAGS) \
+       $(PYTHON_INCLUDES) \
+       $(BOOST_CPPFLAGS) \
+       $(CORBA_CXXFLAGS) \
+       $(CORBA_INCLUDES) \
+       $(KERNEL_CXXFLAGS) \
+       $(GUI_CXXFLAGS) \
+       $(GEOM_CXXFLAGS) \
+       -I$(srcdir)/../HEXABLOCK \
+       -I$(top_builddir)/idl \
+       -I$(top_builddir)/salome_adm/unix
+
+libHEXABLOCK_la_LDFLAGS  = \
+       ../../idl/libSalomeIDLHEXABLOCK.la \
+       ../HEXABLOCK_I/libHEXABLOCKEngine.la \
+       $(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA \
+       $(GUI_LDFLAGS) \
+       -lSalomeApp
+
+# resources files
+nodist_salomeres_DATA = \
+       HEXABLOCK_msg_en.qm \
+       HEXABLOCK_msg_fr.qm \
+       HEXABLOCK_icons.qm
diff --git a/src/HEXABLOCK_I/HEXABLOCK.cxx b/src/HEXABLOCK_I/HEXABLOCK.cxx
new file mode 100755 (executable)
index 0000000..2dbe4fd
--- /dev/null
@@ -0,0 +1,413 @@
+using namespace std;
+
+#include <TCollection_AsciiString.hxx>
+#include <TopAbs_ShapeEnum.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+
+
+#include <Geom_Curve.hxx>
+
+#include <gp_Pnt.hxx>
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepTools.hxx>
+
+#include "SALOME_NamingService.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
+#include "Utils_SINGLETON.hxx"
+
+#include "HexElements_grid.cxx"
+
+
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include "HexDocument_impl.hxx"
+#include <string>
+
+using namespace HEXABLOCK_ORB;
+
+
+// Static variables definition
+PortableServer::POA_var HEXABLOCK::_poa;
+HEXABLOCK*                   HEXABLOCK::_HEXABLOCKGen = NULL;
+SALOME_LifeCycleCORBA*  HEXABLOCK::_lcc = NULL;
+GEOM::GEOM_Gen_var      HEXABLOCK::_geomGen = GEOM::GEOM_Gen::_nil();
+// GEOM_Client*            HEXABLOCK::_geomClient = NULL;
+CORBA::ORB_var          HEXABLOCK::_orb;
+SALOME_NamingService*   HEXABLOCK::_ns = NULL;
+
+//=============================================================================
+/*!
+ *  standard constructor
+ */
+//=============================================================================
+
+HEXABLOCK::HEXABLOCK(CORBA::ORB_ptr orb,
+       PortableServer::POA_ptr poa,
+       PortableServer::ObjectId * contId, 
+       const char *instanceName, 
+       const char *interfaceName) :
+  Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
+{
+  MESSAGE("activate object");
+  _thisObj = this ;
+  _poa = PortableServer::POA::_duplicate(poa);
+  _orb = CORBA::ORB::_duplicate(orb);
+  _id = _poa->activate_object(_thisObj);
+  _engine_cpp = new HEXA_NS::Hex;
+  _geomClient = NULL;
+  _HEXABLOCKGen = this;
+  MESSAGE("ALRRRRRIGHTTTTT");
+}
+
+//=============================================================================
+/*!
+ *  GetServant [ static ]
+ *
+ *  Get servant of the CORBA object
+ */
+//=============================================================================
+
+PortableServer::ServantBase_var HEXABLOCK::GetServant( CORBA::Object_ptr theObject )
+{
+  if( CORBA::is_nil( theObject ) || CORBA::is_nil( GetPOA() ) )
+    return NULL;
+  try {
+    PortableServer::Servant aServant = GetPOA()->reference_to_servant( theObject );
+    return aServant;
+  } 
+  catch (...) {
+    INFOS( "GetServant - Unknown exception was caught!!!" ); 
+    return NULL;
+  }
+}
+
+
+
+//=============================================================================
+//  destructor
+//=============================================================================
+HEXABLOCK::~HEXABLOCK()
+{
+}
+
+
+void HEXABLOCK::test()
+{
+  MESSAGE("HEEEEEEEEEEEEEEYYYYYYYYYYY");
+}
+
+CORBA::Long HEXABLOCK::countDocument()
+{
+    CORBA::Long nbDocument = _engine_cpp->countDocument();
+//     CORBA::Long nbDocument = 333;
+    return nbDocument;
+}
+
+Document_ptr HEXABLOCK::getDocument(CORBA::Long i)
+{
+    HEXA_NS::Document *doc=_engine_cpp->getDocument(i);
+    Document_impl *servantCorba=new Document_impl(doc);
+    return servantCorba->_this();
+}
+
+void HEXABLOCK::removeDocument(HEXABLOCK_ORB::Document_ptr docIn)
+{
+  Document_impl* docServant = ::DownCast<Document_impl*>( docIn );
+  ASSERT( docServant );
+  if ( docServant ) {
+    HEXA_NS::Document* doc = docServant->GetImpl();
+    _engine_cpp->removeDocument( doc );
+  }
+}
+
+
+Document_ptr HEXABLOCK::addDocument()
+{
+    MESSAGE("ADD1");
+    HEXA_NS::Document *doc=_engine_cpp->addDocument();
+    MESSAGE("ADD2");
+    Document_impl *servantCorba=new Document_impl(doc);
+    MESSAGE("ADD3");
+    return servantCorba->_this();
+}
+
+
+
+Document_ptr HEXABLOCK::loadDocument(const char* xmlFilename)
+{
+    HEXA_NS::Document *doc=_engine_cpp->loadDocument(xmlFilename);
+    Document_impl *servantCorba=new Document_impl(doc);
+    return servantCorba->_this();
+}
+
+GEOM_Client* HEXABLOCK::getGeomClient()
+{
+  // create shape reader if necessary
+  if ( _geomClient == NULL ) 
+    _geomClient = new GEOM_Client(GetContainerRef());
+  ASSERT( _geomClient);
+  return _geomClient;
+}
+
+
+TopoDS_Shape HEXABLOCK::geomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject)
+{
+  TopoDS_Shape S;
+  if ( !theGeomObject->_is_nil() ){
+    _geomClient = getGeomClient();
+
+    if(CORBA::is_nil(_geomGen)) {
+      Engines::Component_ptr temp=GetLCC()->FindOrLoad_Component("FactoryServer","GEOM");
+      _geomGen=GEOM::GEOM_Gen::_narrow(temp);
+    }
+    if ( _geomClient != NULL  && !_geomGen->_is_nil () )
+      S = _geomClient->GetShape( _geomGen, theGeomObject );
+  }
+  return S;
+}
+
+
+
+
+
+// HEXABLOCK_ORB::GEOM_Object_ptr HEXABLOCK::shapeToGeomObject (const TopoDS_Shape& theShape )
+// {
+//   HEXABLOCK_ORB::GEOM_Object_var aShapeObj;
+//   if ( !theShape.IsNull() ) {
+//     _geomClient = getGeomClient();//new GEOM_Client(GetContainerRef());
+//     TCollection_AsciiString IOR;
+//     bool found = _geomClient->Find(theShape, IOR);
+//     if (found){
+//       CORBA::Object_var obj = _orb->string_to_object( IOR.ToCString() );
+//       aShapeObj = HEXABLOCK_ORB::GEOM_Object::_narrow ( obj );
+//     }
+//   }
+//   return aShapeObj._retn();
+// }
+
+
+
+// GEOM::GEOM_Object_ptr HEXABLOCK::_makeFace( const TopoDS_Shape& theShape )
+// {
+//   ASSERT ( theShape.ShapeType() == TopAbs_FACE );
+// 
+//   int theStudyID = 0;
+//   GEOM::GEOM_Object_var result; 
+//   
+// // PrimOp   = self.GetI3DPrimOperations 
+// // GEOM_IShapesOperations
+//   return result._retn();
+// }
+
+// GEOM::GEOM_Object_ptr HEXABLOCK::_makeEdge( const TopoDS_Shape& theShape )
+// {
+//   ASSERT ( theShape.ShapeType() == TopAbs_EDGE );
+//   int theStudyID = 0;
+//   GEOM::GEOM_Object_var result;
+//   GEOM::GEOM_Object_var p1;
+//   GEOM::GEOM_Object_var p2;
+// 
+//   GEOM::GEOM_IBasicOperations_var     aBasicOp  = _geomGen->GetIBasicOperations(theStudyID);
+//   GEOM::GEOM_IShapesOperations_var    aShapesOp = _geomGen->GetIShapesOperations(theStudyID);
+// 
+//   TopoDS_Edge anEdge = TopoDS::Edge( theShape );
+//   double f, l;
+//   Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, f, l);
+// 
+//   gp_Pnt aCurveStart = aCurve->Value( f );
+//   gp_Pnt aCurveEnd   = aCurve->Value( l );
+// 
+//   double x1, y1, z1;
+//   double x2, y2, z2;
+// 
+//   x1 = aCurveStart.X(); y1 = aCurveStart.Y(); z1 = aCurveStart.Z();
+//   x2 = aCurveEnd.X();   y2 = aCurveEnd.Y(); z2 = aCurveEnd.Z();
+//   p1= aBasicOp->MakePointXYZ(x1, y1, z1);
+//   p2= aBasicOp->MakePointXYZ(x2, y2, z2);
+//   result = aShapesOp->MakeEdge(p1, p2);
+// 
+//   return result._retn();
+// }
+
+GEOM::GEOM_Object_ptr HEXABLOCK::_makeVertex( const TopoDS_Shape& theShape )
+{
+  ASSERT ( theShape.ShapeType() == TopAbs_VERTEX );
+
+  int theStudyID = 0;
+  GEOM::GEOM_Object_var result;
+
+  TopoDS_Vertex aPoint;
+  aPoint      = TopoDS::Vertex( theShape );
+  gp_Pnt aPnt = BRep_Tool::Pnt( aPoint );
+  double x = aPnt.X();
+  double y = aPnt.Y();
+  double z = aPnt.Z();
+
+  GEOM::GEOM_IBasicOperations_var aBasicOp = _geomGen->GetIBasicOperations(theStudyID);
+  result = aBasicOp->MakePointXYZ(x, y, z);
+
+  return result._retn();
+}
+
+
+GEOM::GEOM_Object_ptr HEXABLOCK::shapeToGeomObject (const TopoDS_Shape& theShape )
+{
+  GEOM::GEOM_Object_var aShapeObj;
+  if ( !theShape.IsNull() ) {
+    switch ( theShape.ShapeType() ){
+      case TopAbs_VERTEX: aShapeObj = _makeVertex( theShape ); break;
+//       case TopAbs_FACE:   aShapeObj = _makeFace( theShape ); break;
+//       case TopAbs_EDGE:   aShapeObj = _makeEdge( theShape ); break;
+      default: throw (SALOME_Exception(LOCALIZED("shapeToGeomObject : shape type not supported")));
+    }
+  }
+  return aShapeObj._retn();
+}
+
+
+// GEOM::GEOM_Object_ptr HEXABLOCK::shapeToGeomObject (const TopoDS_Shape& theShape )
+// {
+//   GEOM::GEOM_Object_var aShapeObj;
+//   std::cout<<"shapeToGeomObject "<<std::endl;
+//   if ( !theShape.IsNull() ) {
+//     std::cout<<"shapeToGeomObject !theShape.IsNull()"<<std::endl;
+//     _geomClient = getGeomClient();//new GEOM_Client(GetContainerRef());
+//     TCollection_AsciiString IOR;
+//     bool found = _geomClient->Find(theShape, IOR);
+//     std::cout<<"shapeToGeomObject found"<<found<<std::endl;
+//     if (found){
+//       CORBA::Object_var obj = _orb->string_to_object( IOR.ToCString() );
+//       aShapeObj = GEOM::GEOM_Object::_narrow ( obj );
+//     }
+//   }
+//   return aShapeObj._retn();
+// }
+
+
+
+
+
+
+
+
+SALOME_LifeCycleCORBA*  HEXABLOCK::GetLCC() {
+  if ( _lcc == NULL ) {
+    _lcc = new SALOME_LifeCycleCORBA( GetNS() );
+  }
+  return _lcc;
+}
+
+SALOME_NamingService* HEXABLOCK::GetNS()
+{
+  if ( _ns == NULL ) {
+    _ns = SINGLETON_<SALOME_NamingService>::Instance();
+    ASSERT(SINGLETON_<SALOME_NamingService>::IsAlreadyExisting());
+    _ns->init_orb( _orb );
+  }
+  return _ns;
+}
+
+
+
+TopoDS_Shape string2shape( const string& brep )
+{
+  TopoDS_Shape shape;
+
+//   istringstream streamBrep(brep.c_str());
+  istringstream streamBrep(brep);
+//   char* chaine = new char[brep.size()];
+//   strcpy(chaine, brep.c_str()); 
+//   istringstream streamBrep( chaine );
+
+  BRep_Builder aBuilder;
+  BRepTools::Read(shape, streamBrep, aBuilder);
+//   BRepTools::Read(shape, brep, aBuilder);
+  return shape;
+}
+
+// TopoDS_Shape STRING_TO_SHAPE( char* buf, int sizebuf )
+// {
+//   TopoDS_Shape shape;
+//   std::istrstream streamBrep(buf,sizebuf);
+//   BRep_Builder aBuilder;
+//   BRepTools::Read(shape, streamBrep, aBuilder);
+//   return(shape);
+// }
+
+
+
+
+string shape2string( const TopoDS_Shape& aShape )
+{
+  ostringstream streamShape;
+//   string  strShape;
+  BRepTools::Write(aShape, streamShape);
+//   BRepTools::Write(aShape, strShape);
+
+  return streamShape.str();
+}
+
+
+extern "C"
+{
+  PortableServer::ObjectId * HEXABLOCKEngine_factory(
+                              CORBA::ORB_ptr orb,
+                              PortableServer::POA_ptr poa, 
+                              PortableServer::ObjectId * contId,
+                              const char *instanceName, 
+                              const char *interfaceName)
+  {
+    MESSAGE("PortableServer::ObjectId * HEXABLOCKEngine_factory()");
+    SCRUTE(interfaceName);
+    HEXABLOCK * myHEXABLOCK 
+      = new HEXABLOCK(orb, poa, contId, instanceName, interfaceName);
+    return myHEXABLOCK->getId() ;
+  }
+
+}
+
+// //================= Primitives Construction : BasicOperations =================
+// //=============================================================================
+// //  makeBanner: renvoie un message
+// //=============================================================================
+// 
+// 
+// #include "Vertex_impl.hxx"
+// #include "Edge_impl.hh"
+// char* HEXABLOCK::makeBanner(const char* name)
+// {
+//     string banner="Pourquoi?, ";
+//     banner+=name;
+//     return CORBA::string_dup(banner.c_str());
+// }
+// 
+// //=============================================================================
+// //  makeVertex: construit un sommet
+// //=============================================================================
+// 
+// HEXABLOCK_ORB::Vertex_ptr HEXABLOCK::makeVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z)
+// {
+//   Vertex *vert=_engine_cpp->makeVertex(x,y,z);
+//   Vertex_impl *servantCorba=new Vertex_impl(vert);
+//   return servantCorba->_this();
+// }
+// 
+// //=============================================================================
+// //  makeEdge: construit une arrête
+// //=============================================================================
+// 
+// HEXABLOCK_ORB::Edge_ptr HEXABLOCK::makeEdge(HEXABLOCK_ORB::Vertex_ptr va, HEXABLOCK_ORB::Vertex_ptr vb)
+// {
+//   Edge *edg=_engine_cpp->makeEdge(va,vb);
+//   Edge_impl *servantCorba=new Edge_impl(edg);
+//   return servantCorba->_this();
+// }
+// //=============================================================================
+// // 
+// //=============================================================================
+
diff --git a/src/HEXABLOCK_I/HEXABLOCK.hxx b/src/HEXABLOCK_I/HEXABLOCK.hxx
new file mode 100755 (executable)
index 0000000..73f55bd
--- /dev/null
@@ -0,0 +1,154 @@
+#ifndef _HEXABLOCK_HXX_
+#define _HEXABLOCK_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(HEXABLOCK_Gen)
+#include "SALOME_Component_i.hxx"
+
+
+#include <sstream>
+// #include <strstream.h>
+// #include <iostream.h>
+
+
+#include <TopoDS_Shape.hxx>
+#include "GEOM_Client.hxx"
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class SALOME_LifeCycleCORBA;
+class SALOME_NamingService;
+
+
+class HEXABLOCK:
+  public POA_HEXABLOCK_ORB::HEXABLOCK_Gen,
+  public Engines_Component_i 
+{
+
+public:
+    HEXABLOCK( CORBA::ORB_ptr orb,
+           PortableServer::POA_ptr poa,
+           PortableServer::ObjectId * contId, 
+           const char *instanceName, 
+           const char *interfaceName);
+  // Get object of the CORBA reference
+    static PortableServer::POA_var GetPOA() { return _poa;}
+    static PortableServer::ServantBase_var GetServant( CORBA::Object_ptr theObject );
+
+    virtual ~HEXABLOCK();
+
+    void test();
+    ::CORBA::Long countDocument();
+    Document_ptr getDocument(::CORBA::Long i);
+    void removeDocument(Document_ptr d); //CS_TODO
+    Document_ptr addDocument();
+    Document_ptr loadDocument(const char* xmlFilename);
+
+    GEOM_Client* getGeomClient();
+    TopoDS_Shape geomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject);
+    GEOM::GEOM_Object_ptr shapeToGeomObject(const TopoDS_Shape& theShape );
+    static SALOME_LifeCycleCORBA*  GetLCC();
+    static SALOME_NamingService* GetNS();
+    static HEXABLOCK* GetHEXABLOCKGen() { return _HEXABLOCKGen;}
+
+private:
+   HEXA_NS::Hex* _engine_cpp;
+   GEOM_Client*  _geomClient;
+
+
+  static PortableServer::POA_var _poa;// POA reference
+  static GEOM::GEOM_Gen_var      _geomGen;
+  static SALOME_LifeCycleCORBA*  _lcc;
+  static CORBA::ORB_var          _orb;
+  static SALOME_NamingService*   _ns;
+  static HEXABLOCK*                   _HEXABLOCKGen;
+
+  GEOM::GEOM_Object_ptr _makeVertex( const TopoDS_Shape& theShape );
+
+};
+
+extern "C"
+    PortableServer::ObjectId * HEXABLOCKEngine_factory(
+      CORBA::ORB_ptr orb,
+      PortableServer::POA_ptr poa,
+      PortableServer::ObjectId * contId,
+      const char *instanceName,
+      const char *interfaceName
+    );
+
+
+template<class T>
+  T
+  DownCast(CORBA::Object_ptr theArg)
+  {
+    return dynamic_cast<T>(HEXABLOCK::GetServant(theArg).in());
+  }
+
+
+
+
+
+TopoDS_Shape string2shape( const string& brep );
+
+
+string shape2string( const TopoDS_Shape& aShape );
+
+
+
+
+#endif
+
+
+// 1) Séquence de code convertissant une chaîne au format BREP vers un TopoDS_Shape
+// 
+// TopoDS_Shape STRING_TO_SHAPE( char* buf, int sizebuf )
+// {
+//   TopoDS_Shape shape;
+//   std::istrstream streamBrep(buf,sizebuf);
+//   BRep_Builder aBuilder;
+//   BRepTools::Read(shape, streamBrep, aBuilder);
+//   return(shape);
+// }
+// 
+// 2) Séquence de code convertissant un TopoDS_Shape en une chaîne au format BREP
+// 
+// char* SHAPE_TO_STRING( TopoDS_Shape aShape, int& sizebuf )
+// {
+//  ostrstream streamShape;
+//  BRepTools::Write(aShape, streamShape);
+//  sizebuf = streamShape.pcount();
+//  char* buf = new char [sizebuf];
+//  char* valueOfStream = streamShape.str();
+//  memcpy(buf, valueOfStream, size);
+//  return buf;
+// }
+// 
+// 3) Séquence de code accédant aux coordonnées d'un TopoDS_Shape qui est un Vertex
+// 
+// bool SHAPE_TO_COORD(TopoDS_Shape aShape, double& x, double& y, double& z)
+// {
+//   if ( aShape.ShapeType() == TopAbs_VERTEX ) {
+//       TopoDS_Vertex aPoint;
+//        aPoint = TopoDS::Vertex( aShape );
+//       gp_Pnt aPnt = BRep_Tool::Pnt( aPoint );
+//       x = aPnt.X();
+//       y = aPnt.Y();
+//       z = aPnt.Z();
+//        return(1);
+//    } else {
+//        return(0);
+//   };
+// }
+// 
+// 4) Séquence de code créant un TopoDS_Shape à partir de coordonnées
+// 
+// TopoDS_Shape COORD_TO_SHAPE(double x, double y, double z)
+// {
+//       gp_Pnt aPnt(x, y, z);
+//       BRepBuilderAPI_MakeVertex mkVertex (aPnt);
+//      TopoDS_Vertex aVertex = TopoDS::Vertex(mkVertex.Shape());
+//       return aVertex;
+// }
diff --git a/src/HEXABLOCK_I/HexCrossElements_impl.cxx b/src/HEXABLOCK_I/HexCrossElements_impl.cxx
new file mode 100755 (executable)
index 0000000..5ec3f15
--- /dev/null
@@ -0,0 +1,336 @@
+using namespace std;
+#include "hexa_base.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexCylinder_impl.hxx"
+#include "HexCrossElements_impl.hxx"
+#include "HEXABLOCK.hxx"
+
+
+CrossElements_impl::CrossElements_impl( HEXA_NS::CrossElements *ptrCpp ):_crossElements_cpp(ptrCpp)
+{
+}
+
+
+HEXA_NS::CrossElements* CrossElements_impl::GetImpl()
+{
+  return _crossElements_cpp;
+}
+
+
+Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+  HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(part, x, y, z);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(part, x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(part, x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(part, x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(part, x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(part, x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(part, x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+  HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(part, x, y, z);
+  if ( h != NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+::CORBA::Long CrossElements_impl::crossCylinders(Cylinder_ptr c1In, Cylinder_ptr  c2In)
+throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long result;
+  Cylinder_impl* c1InServant = ::DownCast<Cylinder_impl*>( c1In );
+  Cylinder_impl* c2InServant = ::DownCast<Cylinder_impl*>( c2In );
+
+  ASSERT( c1InServant );
+  ASSERT( c2InServant );
+
+  if ( c1InServant &&  c2InServant ) {
+    HEXA_NS::Cylinder* c1 = c1InServant->GetImpl();
+    HEXA_NS::Cylinder* c2 = c2InServant->GetImpl();
+
+    result = _crossElements_cpp->crossCylinders(c1,c2);
+  }
+  return result;
+
+}
+
+
+
+::CORBA::Long CrossElements_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
+  return ret;
+}
+
+
+
+void CrossElements_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _crossElements_cpp->dump();
+}
+
+
+void CrossElements_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _crossElements_cpp->printName();
+}
+
+
+
+
+
+// ::CORBA::Long CrossElements_impl::countVertex() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countVertex();
+//   return n;
+// }
+// 
+// ::CORBA::Long CrossElements_impl::countEdge() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countEdge();
+//   return n;
+// }
+// 
+// ::CORBA::Long CrossElements_impl::countQuad() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countQuad();
+//   return n;
+// }
+// 
+// ::CORBA::Long CrossElements_impl::countHexa() throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long n = _crossElements_cpp->countHexa();
+//   return n;
+// }
+// 
+// 
+// 
+// Vertex_ptr CrossElements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Vertex* v = _crossElements_cpp->getVertex(n);
+//   Vertex_impl* servantCorba = new Vertex_impl(v);
+//   return servantCorba->_this();
+// }
+// 
+// Edge_ptr CrossElements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdge(n);
+//   Edge_impl* servantCorba = new Edge_impl(e);
+//   return servantCorba->_this();
+// }
+// 
+// Quad_ptr CrossElements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuad(n);
+//   Quad_impl* servantCorba = new Quad_impl(q);
+//   return servantCorba->_this();
+// }
+// 
+// Hexa_ptr CrossElements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Hexa* h = _crossElements_cpp->getHexa(n);
+//   Hexa_impl* servantCorba = new Hexa_impl(h);
+//   return servantCorba->_this();
+// }
+// 
+// 
+// 
+// ::CORBA::Long CrossElements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
+//   return ret;
+// }
+// 
+// 
+// 
+// Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Vertex_ptr result = Vertex::_nil();
+// //   HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(x, y,z);
+//   HEXA_NS::Vertex* v = NULL;
+//   _crossElements_cpp->toto();
+//   if ( v != NULL ){
+//     Vertex_impl* servantCorba = new Vertex_impl(v);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(x, y, z);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(x, y, z);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+//   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(x, y, z);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(x, y, z);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(x, y, z);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+//   HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(x, y, z);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+// 
+// 
+// Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
+// {
+//   Hexa_ptr result = Hexa::_nil();
+//   HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(x, y, z);
+//   if ( h != NULL ){
+//     Hexa_impl* servantCorba = new Hexa_impl(h);
+//     result = servantCorba->_this();
+//   }
+//   return result;
+// }
+
+
diff --git a/src/HEXABLOCK_I/HexCrossElements_impl.hxx b/src/HEXABLOCK_I/HexCrossElements_impl.hxx
new file mode 100755 (executable)
index 0000000..4d6874a
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __HexCrossElements_impl__
+#define __HexCrossElements_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(CrossElements)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexCrossElements.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class CrossElements_impl : public POA_HEXABLOCK_ORB::CrossElements,
+                          public SALOME::GenericObj_i
+{
+public:
+    CrossElements_impl(HEXA_NS::CrossElements *ptrCpp);
+    HEXA_NS::CrossElements* GetImpl();
+
+    Vertex_ptr getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Edge_ptr getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Quad_ptr getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Hexa_ptr getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Long crossCylinders(Cylinder_ptr cyl1, Cylinder_ptr cyl2) throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+
+private:
+    HEXA_NS::CrossElements *_crossElements_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexCylinder_impl.cxx b/src/HEXABLOCK_I/HexCylinder_impl.cxx
new file mode 100755 (executable)
index 0000000..5c0c78e
--- /dev/null
@@ -0,0 +1,84 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexCylinder_impl.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexVector_impl.hxx"
+
+Cylinder_impl::Cylinder_impl( HEXA_NS::Cylinder *ptrCpp ):_cylinder_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Cylinder* Cylinder_impl::GetImpl()
+  throw (SALOME::SALOME_Exception)
+{
+  return _cylinder_cpp;
+}
+
+
+Vertex_ptr Cylinder_impl::getBase()
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _cylinder_cpp->getBase();
+  if ( v!= NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+
+  return result;
+}
+
+Vector_ptr Cylinder_impl::getDirection()
+  throw (SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+
+  HEXA_NS::Vector* v = _cylinder_cpp->getDirection();
+  if ( v!= NULL ){
+    Vector_impl* servantCorba = new Vector_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+::CORBA::Double Cylinder_impl::getRadius()
+  throw (SALOME::SALOME_Exception)
+{
+ ::CORBA::Double d = _cylinder_cpp->getRadius();
+  return d;
+}
+
+
+::CORBA::Double Cylinder_impl::getHeight()
+  throw (SALOME::SALOME_Exception)
+{
+ ::CORBA::Double d = _cylinder_cpp->getHeight();
+  return d;
+}
+
+
+void Cylinder_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _cylinder_cpp->dump();
+}
+
+
+void Cylinder_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _cylinder_cpp->printName();
+}
+
+// ::CORBA::Long Cylinder_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
+// {
+//   ::CORBA::Long ret = _cylinder_cpp->saveVtk( fname );
+//   return ret;
+// }
+
+
diff --git a/src/HEXABLOCK_I/HexCylinder_impl.hxx b/src/HEXABLOCK_I/HexCylinder_impl.hxx
new file mode 100755 (executable)
index 0000000..0700eb1
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __HexCylinder_impl__
+#define __HexCylinder_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Cylinder)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexCylinder.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Cylinder_impl : public POA_HEXABLOCK_ORB::Cylinder,
+                   public SALOME::GenericObj_i
+{
+public:
+  Cylinder_impl(HEXA_NS::Cylinder *ptrCpp);
+  HEXA_NS::Cylinder* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Vertex_ptr getBase() throw (SALOME::SALOME_Exception);
+  Vector_ptr getDirection() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getRadius() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getHeight() throw (SALOME::SALOME_Exception);
+
+//   ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Cylinder *_cylinder_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexDocument_impl.cxx b/src/HEXABLOCK_I/HexDocument_impl.cxx
new file mode 100755 (executable)
index 0000000..4f23fd9
--- /dev/null
@@ -0,0 +1,1509 @@
+using namespace std;
+
+#include "utilities.h"
+
+#include <string>
+
+#include "HEXABLOCK.hxx"
+#include "HexDocument_impl.hxx"
+// 
+
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexVector_impl.hxx"
+#include "HexElements_impl.hxx"
+#include "HexCrossElements_impl.hxx"
+#include "HexCylinder_impl.hxx"
+#include "HexPipe_impl.hxx"
+#include "HexLaw_impl.hxx"
+#include "HexPropagation_impl.hxx"
+#include "HexGroup_impl.hxx"
+
+
+using namespace HEXABLOCK_ORB;
+
+Document_impl::Document_impl(HEXA_NS::Document *ptrCpp):_document_cpp(ptrCpp)
+{
+}
+
+::CORBA::Long Document_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _document_cpp->saveVtk( fname );
+  return ret;
+}
+void Document_impl::purge() throw (SALOME::SALOME_Exception)
+{
+  _document_cpp->purge();
+}
+
+HEXA_NS::Document* Document_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp;
+}
+
+
+char* Document_impl::getFile() throw (SALOME::SALOME_Exception)
+{
+  return CORBA::string_dup (_document_cpp->getFile());
+}
+
+void Document_impl::setFile(const char* fileName) throw (SALOME::SALOME_Exception)
+{
+  _document_cpp->setFile(fileName);
+}
+
+::CORBA::Boolean Document_impl::isSavedFile() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->isSaved();
+}
+
+::CORBA::Long Document_impl::saveFile() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->saveFile();
+}
+
+void Document_impl::setTolerance(::CORBA::Double tol) throw (SALOME::SALOME_Exception)
+{
+  _document_cpp->setTolerance(tol);
+}
+
+::CORBA::Double Document_impl::getTolerance() throw (SALOME::SALOME_Exception)
+{
+  return   _document_cpp->getTolerance();
+}
+
+Vertex_ptr Document_impl::addVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z)
+  throw(SALOME::SALOME_Exception)
+{
+  Vertex_ptr result   = Vertex::_nil();
+
+  HEXA_NS::Vertex* v  = _document_cpp->addVertex( x, y, z );
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+::CORBA::Long Document_impl::countVertex() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countVertex();
+}
+
+Vertex_ptr Document_impl::getVertex(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result   = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _document_cpp->getVertex(i);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Vertex_ptr Document_impl::findVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _document_cpp->findVertex( x, y, z);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Document_impl::addEdge(Vertex_ptr v0In, Vertex_ptr v1In)
+  throw(SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+  if ( v0InServant &&  v1InServant ) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Edge* e = _document_cpp->addEdge( v0, v1 );
+    if ( e != NULL ){
+      Edge_impl* servantCorba = new Edge_impl(e);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+::CORBA::Long Document_impl::countEdge() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countEdge();
+}
+
+Edge_ptr Document_impl::getEdge(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  HEXA_NS::Edge* e = _document_cpp->getEdge(i);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Edge_ptr Document_impl::findEdge(Vertex_ptr p0In, Vertex_ptr p1In)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  Vertex_impl* p0InServant = ::DownCast<Vertex_impl*>( p0In );
+  Vertex_impl* p1InServant = ::DownCast<Vertex_impl*>( p1In );
+  ASSERT( p0InServant );
+  ASSERT( p1InServant );
+
+  if ( p0InServant &&  p1InServant ) {
+    HEXA_NS::Vertex* p0 = p0InServant->GetImpl();
+    HEXA_NS::Vertex* p1 = p1InServant->GetImpl();
+    HEXA_NS::Edge* e = _document_cpp->findEdge( p0, p1 );
+
+    if ( e != NULL ){
+      Edge_impl* servantCorba = new Edge_impl(e);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Quad_ptr Document_impl::addQuad(Edge_ptr e0In, Edge_ptr e1In, Edge_ptr e2In, Edge_ptr e3In)
+throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  Edge_impl* e0InServant = ::DownCast<Edge_impl*>( e0In );
+  Edge_impl* e1InServant = ::DownCast<Edge_impl*>( e1In );
+  Edge_impl* e2InServant = ::DownCast<Edge_impl*>( e2In );
+  Edge_impl* e3InServant = ::DownCast<Edge_impl*>( e3In );
+  ASSERT( e0InServant );
+  ASSERT( e1InServant );
+  ASSERT( e2InServant );
+  ASSERT( e3InServant );
+  if ( e0InServant &&  e1InServant && e2InServant &&  e3InServant) {
+    HEXA_NS::Edge* e0 = e0InServant->GetImpl();
+    HEXA_NS::Edge* e1 = e1InServant->GetImpl();
+    HEXA_NS::Edge* e2 = e2InServant->GetImpl();
+    HEXA_NS::Edge* e3 = e3InServant->GetImpl();
+    HEXA_NS::Quad* q = _document_cpp->addQuad( e0, e1, e2, e3 );
+    if ( q !=  NULL ){
+      Quad_impl* servantCorba = new Quad_impl(q);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Quad_ptr Document_impl::addQuadVertices( Vertex_ptr v0In, Vertex_ptr v1In,
+                                 Vertex_ptr v2In, Vertex_ptr v3In )
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2InServant = ::DownCast<Vertex_impl*>( v2In );
+  Vertex_impl* v3InServant = ::DownCast<Vertex_impl*>( v3In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+  ASSERT( v2InServant );
+  ASSERT( v3InServant );
+
+  if ( v0InServant &&  v1InServant && v2InServant &&  v3InServant) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2InServant->GetImpl();
+    HEXA_NS::Vertex* v3 = v3InServant->GetImpl();
+    HEXA_NS::Quad* q = _document_cpp->addQuadVertices( v0, v1, v2, v3 );
+    if ( q !=  NULL ){
+      Quad_impl* servantCorba = new Quad_impl(q);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+::CORBA::Long Document_impl::countQuad() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countQuad();
+}
+
+Quad_ptr Document_impl::getQuad(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  HEXA_NS::Quad* q = _document_cpp->getQuad(i);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr Document_impl::findQuad(Vertex_ptr p0In, Vertex_ptr p1In) throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  Vertex_impl* p0InServant = ::DownCast<Vertex_impl*>( p0In );
+  Vertex_impl* p1InServant = ::DownCast<Vertex_impl*>( p1In );
+  ASSERT( p0InServant );
+  ASSERT( p1InServant );
+
+  if ( p0InServant &&  p1InServant ) {
+    HEXA_NS::Vertex* p0 = p0InServant->GetImpl();
+    HEXA_NS::Vertex* p1 = p1InServant->GetImpl();
+
+    HEXA_NS::Quad* q = _document_cpp->findQuad( p0, p1 );
+    if ( q != NULL ){
+      Quad_impl* servantCorba = new Quad_impl(q);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Hexa_ptr Document_impl::addHexa(Quad_ptr q0In, Quad_ptr q1In, Quad_ptr q2In, Quad_ptr q3In, Quad_ptr q4In, Quad_ptr q5In)
+  throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Quad_impl* q0InServant = ::DownCast<Quad_impl*>( q0In );
+  Quad_impl* q1InServant = ::DownCast<Quad_impl*>( q1In );
+  Quad_impl* q2InServant = ::DownCast<Quad_impl*>( q2In );
+  Quad_impl* q3InServant = ::DownCast<Quad_impl*>( q3In );
+  Quad_impl* q4InServant = ::DownCast<Quad_impl*>( q4In );
+  Quad_impl* q5InServant = ::DownCast<Quad_impl*>( q5In );
+
+  ASSERT( q0InServant );
+  ASSERT( q1InServant );
+  ASSERT( q2InServant );
+  ASSERT( q3InServant );
+  ASSERT( q4InServant );
+  ASSERT( q5InServant );
+
+  if ( q0InServant &&  q1InServant && q2InServant &&  q3InServant
+        && q4InServant &&  q5InServant ){
+    HEXA_NS::Quad* q0 = q0InServant->GetImpl();
+    HEXA_NS::Quad* q1 = q1InServant->GetImpl();
+    HEXA_NS::Quad* q2 = q2InServant->GetImpl();
+    HEXA_NS::Quad* q3 = q3InServant->GetImpl();
+    HEXA_NS::Quad* q4 = q4InServant->GetImpl();
+    HEXA_NS::Quad* q5 = q5InServant->GetImpl();
+    HEXA_NS::Hexa* h = _document_cpp->addHexa( q0, q1, q2, q3, q4, q5 );
+    if ( h != NULL ){
+      Hexa_impl* servantCorba = new Hexa_impl(h);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+Hexa_ptr Document_impl::addHexaVertices( Vertex_ptr v0In, Vertex_ptr v1In, Vertex_ptr v2In, Vertex_ptr v3In, Vertex_ptr v4In, Vertex_ptr v5In, Vertex_ptr v6In, Vertex_ptr v7In )
+  throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2InServant = ::DownCast<Vertex_impl*>( v2In );
+  Vertex_impl* v3InServant = ::DownCast<Vertex_impl*>( v3In );
+  Vertex_impl* v4InServant = ::DownCast<Vertex_impl*>( v4In );
+  Vertex_impl* v5InServant = ::DownCast<Vertex_impl*>( v5In );
+  Vertex_impl* v6InServant = ::DownCast<Vertex_impl*>( v6In );
+  Vertex_impl* v7InServant = ::DownCast<Vertex_impl*>( v7In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+  ASSERT( v2InServant );
+  ASSERT( v3InServant );
+  ASSERT( v4InServant );
+  ASSERT( v5InServant );
+  ASSERT( v6InServant );
+  ASSERT( v7InServant );
+
+  if ( v0InServant &&  v1InServant && v2InServant &&  v3InServant
+        && v4InServant &&  v5InServant && v6InServant &&  v7InServant ){
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2InServant->GetImpl();
+    HEXA_NS::Vertex* v3 = v3InServant->GetImpl();
+    HEXA_NS::Vertex* v4 = v4InServant->GetImpl();
+    HEXA_NS::Vertex* v5 = v5InServant->GetImpl();
+    HEXA_NS::Vertex* v6 = v6InServant->GetImpl();
+    HEXA_NS::Vertex* v7 = v7InServant->GetImpl();
+
+    HEXA_NS::Hexa* h = _document_cpp->addHexaVertices( v0, v1, v2, v3, v4, v5, v6, v7 );
+    if ( h != NULL ){
+      Hexa_impl* servantCorba = new Hexa_impl(h);
+      result =  servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+::CORBA::Long Document_impl::countHexa() throw (SALOME::SALOME_Exception)
+{
+  return  _document_cpp->countHexa();
+}
+
+Hexa_ptr Document_impl::getHexa(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  HEXA_NS::Hexa* h = _document_cpp->getHexa(i);
+  if ( h!= NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Hexa_ptr Document_impl::findHexa(Vertex_ptr p0In, Vertex_ptr p1In) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( p0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( p1In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+
+  if ( v0InServant &&  v1InServant ) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Hexa* h = _document_cpp->findHexa( v0, v1 );
+    if ( h != NULL ){
+      Hexa_impl* servantCorba = new Hexa_impl(h);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+Vector_ptr Document_impl::addVector( ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz )
+    throw(SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+  HEXA_NS::Vector* v = _document_cpp->addVector( dx, dy, dz );
+
+  if ( v != NULL ){
+    Vector_impl* servantCorba = new Vector_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Vector_ptr Document_impl::addVectorVertices( Vertex_ptr v0In, Vertex_ptr v1In )
+    throw(SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+
+  Vertex_impl* v0InServant = ::DownCast<Vertex_impl*>( v0In );
+  Vertex_impl* v1InServant = ::DownCast<Vertex_impl*>( v1In );
+  ASSERT( v0InServant );
+  ASSERT( v1InServant );
+
+  if ( v0InServant &&  v1InServant ) {
+    HEXA_NS::Vertex* v0 = v0InServant->GetImpl();
+    HEXA_NS::Vertex* v1 = v1InServant->GetImpl();
+    HEXA_NS::Vector* v = _document_cpp->addVectorVertices( v0, v1 );
+    if ( v != NULL ){
+      Vector_impl* servantCorba = new Vector_impl(v);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+// ::CORBA::Long Document_impl::countVector() throw (SALOME::SALOME_Exception)
+// {
+//   return  _document_cpp->countVector();
+// }
+// 
+// Vector_ptr Document_impl::getVector(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Vector* h = _document_cpp->getVector(i);
+//   Vector_impl* servantCorba = new Vector_impl(h);
+//   return servantCorba->_this();
+// }
+
+
+Cylinder_ptr Document_impl::addCylinder( Vertex_ptr baseIn, Vector_ptr directionIn,
+      ::CORBA::Double radius, ::CORBA::Double height)
+throw (SALOME::SALOME_Exception)
+{
+  Cylinder_ptr result = Cylinder::_nil();
+
+  Vertex_impl* baseServant      = ::DownCast<Vertex_impl*>( baseIn );
+  Vector_impl* directionServant = ::DownCast<Vector_impl*>( directionIn );
+  ASSERT( baseServant );
+  ASSERT( directionServant );
+
+  if ( baseServant &&  directionServant ) {
+    HEXA_NS::Vertex* base = baseServant->GetImpl();
+    HEXA_NS::Vector* direction = directionServant->GetImpl();
+    HEXA_NS::Cylinder* c = _document_cpp->addCylinder( base, direction, radius, height );
+    if ( c!= NULL ){
+      Cylinder_impl* servantCorba = new Cylinder_impl(c);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+// ::CORBA::Long Document_impl::countCylinder() throw (SALOME::SALOME_Exception)
+// {
+//   return  _document_cpp->countCylinder();
+// }
+// 
+// 
+// Cylinder_ptr Document_impl::getCylinder(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Cylinder* c = _document_cpp->getCylinder(i);
+//   Cylinder_impl* servantCorba = new Cylinder_impl(c);
+//   return servantCorba->_this();
+// }
+
+
+Pipe_ptr Document_impl::addPipe( Vertex_ptr baseIn, Vector_ptr directionIn,
+                  ::CORBA::Double int_radius, ::CORBA::Double ext_radius, ::CORBA::Double height)
+throw (SALOME::SALOME_Exception)
+{
+  Pipe_ptr result = Pipe::_nil();
+
+  Vertex_impl* baseServant      = ::DownCast<Vertex_impl*>( baseIn );
+  Vector_impl* directionServant = ::DownCast<Vector_impl*>( directionIn );
+  ASSERT( baseServant );
+  ASSERT( directionServant );
+
+  if ( baseServant &&  directionServant ) {
+    HEXA_NS::Vertex* base = baseServant->GetImpl();
+    HEXA_NS::Vector* direction = directionServant->GetImpl();
+    HEXA_NS::Pipe* c = _document_cpp->addPipe( base, direction, int_radius, ext_radius, height );
+    if ( c!= NULL ){
+      Pipe_impl* servantCorba = new Pipe_impl(c);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+// ::CORBA::Long Document_impl::countPipe() throw (SALOME::SALOME_Exception)
+// {
+//   return  _document_cpp->countPipe();
+// }
+// 
+// Pipe_ptr Document_impl::getPipe(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_NS::Pipe* p = _document_cpp->getPipe(i);
+//   Pipe_impl* servantCorba = new Pipe_impl(p);
+//   return servantCorba->_this();
+// }
+
+::CORBA::Boolean Document_impl::removeHexa(Hexa_ptr hIn) throw (SALOME::SALOME_Exception)
+{
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hIn );
+  ASSERT( hServant );
+
+  if ( hServant ) {
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    int ok = _document_cpp->removeHexa(h);
+    if ( ok == HOK )
+      return true;
+    else
+      return false;
+  }
+}
+
+
+::CORBA::Boolean Document_impl::removeConnectedHexa(Hexa_ptr hIn) throw (SALOME::SALOME_Exception)
+{
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hIn );
+  ASSERT( hServant );
+
+  if ( hServant ) {
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    int ok = _document_cpp->removeConnectedHexa(h);
+    if ( ok == HOK )
+      return true;
+    else
+      return false; 
+  }
+}
+
+
+Elements_ptr Document_impl::makeCartesian( Vertex_ptr ptIn,
+                            Vector_ptr vxIn, Vector_ptr vyIn, Vector_ptr vzIn,
+                            ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+  throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptInServant = ::DownCast<Vertex_impl*>( ptIn);
+  Vector_impl* vxInServant = ::DownCast<Vector_impl*>( vxIn );
+  Vector_impl* vyInServant = ::DownCast<Vector_impl*>( vyIn );
+  Vector_impl* vzInServant = ::DownCast<Vector_impl*>( vzIn );
+  ASSERT( ptInServant );
+  ASSERT( vxInServant );
+  ASSERT( vyInServant );
+  ASSERT( vzInServant );
+
+  if ( ptInServant &&  vxInServant &&  vyInServant && vzInServant ){
+    HEXA_NS::Vertex* pt = ptInServant->GetImpl();
+    HEXA_NS::Vector* vx = vxInServant->GetImpl();
+    HEXA_NS::Vector* vy = vyInServant->GetImpl();
+    HEXA_NS::Vector* vz = vzInServant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->makeCartesian(
+        pt,
+        vx, vy, vz,
+        nx, ny, nz );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+
+}
+
+
+
+Elements_ptr Document_impl::makeCartesian1(
+    Vertex_ptr vxIn, 
+    Vector_ptr vr1In,
+    ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz,
+    ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz )
+    throw(SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* vxInServant  = ::DownCast<Vertex_impl*>( vxIn );
+  Vector_impl* vr1InServant = ::DownCast<Vector_impl*>( vr1In );
+  ASSERT( vxInServant );
+  ASSERT( vr1InServant );
+
+  if ( vxInServant &&  vr1InServant ){
+    HEXA_NS::Vertex* vx  = vxInServant->GetImpl();
+    HEXA_NS::Vector* vr1 = vr1InServant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->makeCartesian(
+        vx,
+        vr1,
+        px, py, pz,
+        mx, my, mz );
+
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Elements_ptr Document_impl::makeCylindrical( Vertex_ptr ptIn,
+                              Vector_ptr vexIn, Vector_ptr vezIn,
+                              ::CORBA::Double dr, ::CORBA::Double da, ::CORBA::Double dl,
+                              ::CORBA::Long nr,   ::CORBA::Long na, ::CORBA::Long nl,
+                              ::CORBA::Boolean fill)
+  throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptServant = ::DownCast<Vertex_impl*>( ptIn );
+  Vector_impl* vexServant = ::DownCast<Vector_impl*>( vexIn );
+  Vector_impl* vezServant = ::DownCast<Vector_impl*>( vezIn );
+  ASSERT( ptServant );
+  ASSERT( vexServant );
+  ASSERT( vezServant );
+
+  if ( ptServant && vexServant && vezServant) {
+    HEXA_NS::Vertex* pt  = ptServant->GetImpl();
+    HEXA_NS::Vector* vex = vexServant->GetImpl();
+    HEXA_NS::Vector* vez = vezServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->makeCylindrical( pt,
+                                          vex, vez,
+                                          dr, da, dl, nr, na, nl, fill );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+// Elements_ptr Document_impl::makeSpherical( Vertex_ptr ptIn,
+//     ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz,
+//     ::CORBA::Long n)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Vertex_impl* ptServant = ::DownCast<Vertex_impl*>( ptIn );
+//   ASSERT( ptServant );
+// 
+//   if ( ptServant ) {
+//     HEXA_NS::Vertex* pt = ptServant->GetImpl();
+//     HEXA_NS::Elements* l = _document_cpp->makeSpherical( pt,  dx, dy, dz, n );
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+//   }
+// }
+
+Elements_ptr Document_impl::makeSpherical(
+    Vertex_ptr ptIn,
+    Vector_ptr dvIn,
+    ::CORBA::Long n,
+    ::CORBA::Double k )
+  throw (SALOME::SALOME_Exception) //CS_TODO
+{
+  Elements_ptr result = Elements::_nil();
+
+  Vertex_impl* ptServant = ::DownCast<Vertex_impl*>( ptIn );
+  Vector_impl* dvServant = ::DownCast<Vector_impl*>( dvIn );
+  ASSERT( ptServant );
+  ASSERT( dvServant );
+
+  if ( ptServant && dvServant ) {
+    HEXA_NS::Vertex* pt = ptServant->GetImpl();
+    HEXA_NS::Vector* dv = dvServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->makeSpherical( pt, dv, n, k );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+
+  
+
+
+// Elements_ptr Document_impl::makeCylinder(Cylinder_ptr cylIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl)
+Elements_ptr Document_impl::makeCylinder(Cylinder_ptr cylIn, Vector_ptr vrIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl)
+  throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Cylinder_impl* cylServant = ::DownCast<Cylinder_impl*>( cylIn );
+  Vector_impl* vrServant = ::DownCast<Vector_impl*>( vrIn );
+  ASSERT( cylServant );
+  ASSERT( vrServant );
+
+  if ( cylServant && vrServant ) {
+    HEXA_NS::Cylinder* cyl  = cylServant->GetImpl();
+    HEXA_NS::Vector* vr     = vrServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->makeCylinder( cyl, vr,  nr, na, nl );
+    if ( l != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+// Elements_ptr Document_impl::makePipe( Pipe_ptr pIn, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl)
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Pipe_impl* pServant = ::DownCast<Pipe_impl*>( pIn );
+//   ASSERT( pServant );
+// 
+//   if ( pServant ) {
+//     HEXA_NS::Pipe* p= pServant->GetImpl();
+//     HEXA_NS::Elements* l = _document_cpp->makePipe(  p, nr, na, nl );
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+//   }
+// }
+
+
+CrossElements_ptr Document_impl::makeCylinders(Cylinder_ptr c1In, Cylinder_ptr c2In)
+  throw (SALOME::SALOME_Exception)
+{
+  CrossElements_ptr result = CrossElements::_nil();
+
+  Cylinder_impl* c1Servant = ::DownCast<Cylinder_impl*>( c1In );
+  Cylinder_impl* c2Servant = ::DownCast<Cylinder_impl*>( c2In );
+  ASSERT( c1Servant );
+  ASSERT( c2Servant );
+
+  if ( c1Servant && c2Servant ) {
+    HEXA_NS::Cylinder* c1= c1Servant->GetImpl();
+    HEXA_NS::Cylinder* c2= c2Servant->GetImpl();
+
+    HEXA_NS::CrossElements* l = _document_cpp->makeCylinders(c1,c2);
+    if (l != NULL ){
+      CrossElements_impl* servantCorba = new CrossElements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+// Elements_ptr Document_impl::makePipes(
+//             Pipe_ptr p1In, ::CORBA::Long n1r, ::CORBA::Long n1a, ::CORBA::Long n1l,
+//             Pipe_ptr p2In, ::CORBA::Long n2r, ::CORBA::Long n2a, ::CORBA::Long n2l )
+//   throw (SALOME::SALOME_Exception)
+// {
+//   Pipe_impl* p1Servant = ::DownCast<Pipe_impl*>( p1In );
+//   Pipe_impl* p2Servant = ::DownCast<Pipe_impl*>( p2In );
+//   ASSERT( p1Servant );
+//   ASSERT( p2Servant );
+// 
+//   if ( p1Servant && p2Servant ) {
+//     HEXA_NS::Pipe* p1= p1Servant->GetImpl();
+//     HEXA_NS::Pipe* p2= p2Servant->GetImpl();
+// 
+//     HEXA_NS::Elements* l = _document_cpp->makePipes( p1, n1r, n1a, n1l, p2, n2r, n2a, n2l );
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+//   }
+// }
+
+
+
+Elements_ptr Document_impl::prismQuad(Quad_ptr qdIn, Vector_ptr vIn, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Quad_impl* qServant   = ::DownCast<Quad_impl*>( qdIn );
+  Vector_impl* vServant = ::DownCast<Vector_impl*>( vIn );
+  ASSERT( qServant );
+  ASSERT( vServant);
+
+  if ( qServant && vServant ) {
+    HEXA_NS::Quad* qd = qServant->GetImpl();
+    HEXA_NS::Vector* v = vServant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->prismQuad(qd, v, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+//CS_Bruno
+
+// // loop on meshes
+//       for ( int i = 0; i < theMeshesArray.length(); i++) {
+//         SMESH::SMESH_Mesh_var anInitMesh = theMeshesArray[i];
+//         if ( !anInitMesh->_is_nil() ) {
+//           SMESH_Mesh_i* anInitImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( anInitMesh ).in() );
+//           if ( anInitImpl ) {
+//             ::SMESH_Mesh& aInitLocMesh = anInitImpl->GetImpl();
+
+Elements_ptr Document_impl::prismQuads(const Quads& qdsIn, Vector_ptr vIn, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  HEXA_NS::Quads qds;
+  for ( int i = 0; i < qdsIn.length(); i++) {
+    Quad_impl* qServant = ::DownCast<Quad_impl*>( qdsIn[i] );
+    ASSERT( qServant );
+    HEXA_NS::Quad* qd = qServant->GetImpl();
+    qds.push_back(qd);
+  }
+
+  Vector_impl* vServant = ::DownCast<Vector_impl*>( vIn );
+  ASSERT( vServant);
+
+  if ( vServant ) {
+    HEXA_NS::Vector* v = vServant->GetImpl();
+    HEXA_NS::Elements* l = _document_cpp->prismQuads(qds, v, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+Elements_ptr Document_impl::joinQuad(Quad_ptr qaIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Quad_impl* qaServant = ::DownCast<Quad_impl*>( qaIn );
+  Quad_impl* qbServant = ::DownCast<Quad_impl*>( qbIn );
+
+  Vertex_impl* va1Servant = ::DownCast<Vertex_impl*>( va1In );
+  Vertex_impl* vb1Servant = ::DownCast<Vertex_impl*>( vb1In );
+  Vertex_impl* va2Servant = ::DownCast<Vertex_impl*>( va2In );
+  Vertex_impl* vb2Servant = ::DownCast<Vertex_impl*>( vb2In );
+
+  ASSERT( qaServant );
+  ASSERT( qbServant );
+  ASSERT( va1Servant );
+  ASSERT( vb1Servant );
+  ASSERT( va2Servant );
+  ASSERT( vb2Servant );
+
+  if ( qaServant && qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ){
+    HEXA_NS::Quad* qa = qaServant->GetImpl();
+    HEXA_NS::Quad* qb = qbServant->GetImpl();
+    HEXA_NS::Vertex* va1 = va1Servant->GetImpl();
+    HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl();
+    HEXA_NS::Vertex* va2 = va2Servant->GetImpl();
+    HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl();
+
+    HEXA_NS::Elements* l = _document_cpp->joinQuad(qa, qb, va1, vb1, va2, vb2, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+
+Elements_ptr Document_impl::joinQuads(const Quads& qdsIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In, ::CORBA::Long nb) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Quad_impl*   qbServant  = ::DownCast<Quad_impl*>( qbIn );
+  Vertex_impl* va1Servant = ::DownCast<Vertex_impl*>( va1In );
+  Vertex_impl* vb1Servant = ::DownCast<Vertex_impl*>( vb1In );
+  Vertex_impl* va2Servant = ::DownCast<Vertex_impl*>( va2In );
+  Vertex_impl* vb2Servant = ::DownCast<Vertex_impl*>( vb2In );
+
+  ASSERT( qbServant );
+  ASSERT( va1Servant );
+  ASSERT( vb1Servant );
+  ASSERT( va2Servant );
+  ASSERT( vb2Servant );
+
+  if ( qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ) {
+    HEXA_NS::Quad*    qb = qbServant->GetImpl();
+    HEXA_NS::Vertex* va1 = va1Servant->GetImpl();
+    HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl();
+    HEXA_NS::Vertex* va2 = va2Servant->GetImpl();
+    HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl();
+
+//     MESSAGE("joinQuads  AAAAAAAAAAAAA");
+    HEXA_NS::Quads qds;
+    for ( int i = 0; i < qdsIn.length(); i++) {
+      Quad_impl* qServant = ::DownCast<Quad_impl*>( qdsIn[i] );
+      ASSERT( qServant );
+      HEXA_NS::Quad* qd = qServant->GetImpl();
+      qds.push_back(qd);
+    }
+
+    HEXA_NS::Elements* l = _document_cpp->joinQuads(qds, qb, va1, vb1, va2, vb2, nb);
+    if ( l!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(l);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+
+
+
+
+::CORBA::Long Document_impl::mergeQuads(Quad_ptr qaIn, Quad_ptr qbIn, Vertex_ptr va1In, Vertex_ptr vb1In, Vertex_ptr va2In, Vertex_ptr vb2In) throw (SALOME::SALOME_Exception)
+{
+  Quad_impl* qaServant = ::DownCast<Quad_impl*>( qaIn );
+  Quad_impl* qbServant = ::DownCast<Quad_impl*>( qbIn );
+
+  Vertex_impl* va1Servant = ::DownCast<Vertex_impl*>( va1In );
+  Vertex_impl* vb1Servant = ::DownCast<Vertex_impl*>( vb1In );
+  Vertex_impl* va2Servant = ::DownCast<Vertex_impl*>( va2In );
+  Vertex_impl* vb2Servant = ::DownCast<Vertex_impl*>( vb2In );
+
+  ASSERT( qaServant );
+  ASSERT( qbServant );
+  ASSERT( va1Servant );
+  ASSERT( vb1Servant );
+  ASSERT( va2Servant );
+  ASSERT( vb2Servant );
+
+  if ( qaServant && qbServant && va1Servant && vb1Servant && va2Servant && vb2Servant ){
+    HEXA_NS::Quad* qa = qaServant->GetImpl();
+    HEXA_NS::Quad* qb = qbServant->GetImpl();
+    HEXA_NS::Vertex* va1 = va1Servant->GetImpl();
+    HEXA_NS::Vertex* vb1 = vb1Servant->GetImpl();
+    HEXA_NS::Vertex* va2 = va2Servant->GetImpl();
+    HEXA_NS::Vertex* vb2 = vb2Servant->GetImpl();
+
+    return _document_cpp->mergeQuads(qa, qb, va1, vb1, va2, vb2);
+//     HEXA_NS::Elements* l = _document_cpp->mergeQuads(qa, qb, va1, vb1, va2, vb2);
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+  }
+}
+
+
+
+::CORBA::Long Document_impl::mergeEdges(Edge_ptr e1In, Edge_ptr e2In, Vertex_ptr v1In, Vertex_ptr v2In) throw (SALOME::SALOME_Exception)
+{
+  Edge_impl* e1Servant = ::DownCast<Edge_impl*>( e1In );
+  Edge_impl* e2Servant = ::DownCast<Edge_impl*>( e2In );
+
+  Vertex_impl* v1Servant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2Servant = ::DownCast<Vertex_impl*>( v2In );
+
+  ASSERT( e1Servant );
+  ASSERT( e2Servant );
+  ASSERT( v1Servant );
+  ASSERT( v2Servant );
+
+  if ( e1Servant && e2Servant && v1Servant && v2Servant ){
+    HEXA_NS::Edge* e1 = e1Servant->GetImpl();
+    HEXA_NS::Edge* e2 = e2Servant->GetImpl();
+
+    HEXA_NS::Vertex* v1 = v1Servant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2Servant->GetImpl();
+
+//     HEXA_NS::Elements* l = _document_cpp->mergeEdges(e1, e2, v1, v2);
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+
+    return _document_cpp->mergeEdges(e1, e2, v1, v2);
+  }
+}
+
+::CORBA::Long Document_impl::mergeVertices(Vertex_ptr v1In, Vertex_ptr v2In) throw (SALOME::SALOME_Exception)
+{
+  Vertex_impl* v1Servant = ::DownCast<Vertex_impl*>( v1In );
+  Vertex_impl* v2Servant = ::DownCast<Vertex_impl*>( v2In );
+
+  ASSERT( v1Servant );
+  ASSERT( v2Servant );
+
+  if ( v1Servant && v2Servant ){
+    HEXA_NS::Vertex* v1 = v1Servant->GetImpl();
+    HEXA_NS::Vertex* v2 = v2Servant->GetImpl();
+
+//     HEXA_NS::Elements* l = _document_cpp->mergeVertices(v1, v2);
+//     Elements_impl* servantCorba = new Elements_impl(l);
+//     return servantCorba->_this();
+    return _document_cpp->mergeVertices(v1, v2);
+  }
+}
+
+
+Elements_ptr Document_impl::disconnectQuad(Hexa_ptr hexIn, Quad_ptr quadIn) throw (SALOME::SALOME_Exception)
+// ::CORBA::Long Document_impl::disconnectQuad(Hexa_ptr hexIn, Quad_ptr quadIn) throw (SALOME::SALOME_Exception)
+// Quad_ptr Document_impl::disconnectQuad(Hexa_ptr hexIn, Quad_ptr quadIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+//   Quad_ptr result = Quad::_nil();
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hexIn );
+  Quad_impl* qServant = ::DownCast<Quad_impl*>( quadIn );
+
+  ASSERT( hServant );
+  ASSERT( qServant );
+
+  if ( hServant && qServant ){
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    HEXA_NS::Quad* q = qServant->GetImpl();
+
+    HEXA_NS::Elements* elements = _document_cpp->disconnectQuad(h, q);
+    if (elements != NULL ){
+       Elements_impl* servantCorba = new Elements_impl(elements);
+       result = servantCorba->_this();
+    }
+//     HEXA_NS::Quad* qOut = _document_cpp->disconnectQuad(h, q);
+//     if (qOut != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(qOut);
+//     result = servantCorba->_this();
+//     }
+  }
+  return result;
+}
+
+
+// Edge_ptr Document_impl::disconnectEdge(Hexa_ptr hexIn, Edge_ptr edgeIn) throw (SALOME::SALOME_Exception)
+// ::CORBA::Long Document_impl::disconnectEdge(Hexa_ptr hexIn, Edge_ptr edgeIn) throw (SALOME::SALOME_Exception)
+Elements_ptr Document_impl::disconnectEdge(Hexa_ptr hexIn, Edge_ptr edgeIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Hexa_impl* hServant = ::DownCast<Hexa_impl*>( hexIn );
+  Edge_impl* eServant = ::DownCast<Edge_impl*>( edgeIn );
+
+  ASSERT( hServant );
+  ASSERT( eServant );
+
+  if ( hServant && eServant ){
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    HEXA_NS::Edge* e = eServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->disconnectEdge(h, e);
+    if ( r!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+
+//     HEXA_NS::Edge* r = _document_cpp->disconnectEdge(h, e);
+//     Edge_impl* servantCorba = new Edge_impl(r);
+//     return servantCorba->_this();
+
+//     return _document_cpp->disconnectEdge(h, e);
+  }
+  return result;
+}
+
+// Vertex_ptr Document_impl::disconnectVertex(Hexa_ptr hexIn, Vertex_ptr vxIn) throw (SALOME::SALOME_Exception)
+Elements_ptr Document_impl::disconnectVertex(Hexa_ptr hexIn, Vertex_ptr vxIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Hexa_impl* hServant   = ::DownCast<Hexa_impl*>( hexIn );
+  Vertex_impl* vServant = ::DownCast<Vertex_impl*>( vxIn );
+
+  ASSERT( hServant );
+  ASSERT( vServant );
+
+  if ( hServant && vServant ){
+    HEXA_NS::Hexa* h = hServant->GetImpl();
+    HEXA_NS::Vertex* v = vServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->disconnectVertex(h, v);
+    if ( r!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+//     HEXA_NS::Vertex* r = _document_cpp->disconnectVertex(h, v);
+//     Vertex_impl* servantCorba = new Vertex_impl(r);
+//     return servantCorba->_this();
+// //     return _document_cpp->disconnectVertex(h, v);
+  }
+
+  return result;
+}
+
+Elements_ptr Document_impl::cut(Edge_ptr eIn, ::CORBA::Long nb_of_cuts) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Edge_impl* eServant = ::DownCast<Edge_impl*>( eIn );
+  ASSERT( eServant );
+
+  if ( eServant ){
+    HEXA_NS::Edge* e = eServant->GetImpl();
+    HEXA_NS::Elements* r = _document_cpp->cut(e, nb_of_cuts);
+    if ( r!= NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+Elements_ptr Document_impl::makeTranslation(Elements_ptr lIn, Vector_ptr vecIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+  ASSERT( lServant );
+  ASSERT( vecServant );
+
+  if ( lServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeTranslation(l, vec);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+Elements_ptr Document_impl::makeRotation(Elements_ptr lIn, Vertex_ptr pIn, Vector_ptr vecIn, ::CORBA::Double angle) throw (SALOME::SALOME_Exception)
+{
+  Elements_ptr result = Elements::_nil();
+
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+
+    HEXA_NS::Elements* r = _document_cpp->makeRotation(l, p, vec, angle);
+    if ( r != NULL ){
+      Elements_impl* servantCorba = new Elements_impl(r);
+      result = servantCorba->_this();
+    }
+  }
+  return result;
+}
+
+
+void Document_impl::performTranslation(Elements_ptr lIn, Vector_ptr vecIn) throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant  = ::DownCast<Elements_impl*>( lIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( vecServant );
+
+  if ( lServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+    _document_cpp->performTranslation(l, vec);
+  }
+}
+
+
+void Document_impl::performRotation(Elements_ptr lIn, Vertex_ptr pIn, Vector_ptr vecIn, ::CORBA::Double angle) throw (SALOME::SALOME_Exception)
+{
+  Elements_impl* lServant = ::DownCast<Elements_impl*>( lIn );
+  Vertex_impl*   pServant = ::DownCast<Vertex_impl*>( pIn );
+  Vector_impl* vecServant = ::DownCast<Vector_impl*>( vecIn );
+
+  ASSERT( lServant );
+  ASSERT( pServant );
+  ASSERT( vecServant );
+
+  if ( lServant && pServant && vecServant ){
+    HEXA_NS::Elements* l = lServant->GetImpl();
+    HEXA_NS::Vertex*   p = pServant->GetImpl();
+    HEXA_NS::Vector* vec = vecServant->GetImpl();
+    _document_cpp->performRotation(l, p, vec, angle);
+  }
+}
+
+Group_ptr Document_impl::addHexaGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::HexaCell );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addQuadGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::QuadCell );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Group_ptr Document_impl::addEdgeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::EdgeCell );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addHexaNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::HexaNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Group_ptr Document_impl::addQuadNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::QuadNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addEdgeNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::EdgeNode );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::addVertexNodeGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->addGroup( name, HEXA_NS::Vertex_Node );
+  if ( g != NULL ){
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+::CORBA::Long Document_impl::removeGroup(Group_ptr gIn) throw (SALOME::SALOME_Exception)
+{
+  Group_impl* gInServant = ::DownCast<Group_impl*>( gIn );
+  ASSERT( gInServant );
+
+  if ( gInServant ) {
+    HEXA_NS::Group* g = gInServant->GetImpl();
+    int ok = _document_cpp->removeGroup(g);
+    return ok;
+  }
+}
+
+::CORBA::Long Document_impl::countGroup() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->countGroup();
+}
+
+
+Group_ptr Document_impl::getGroup(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result  = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->getGroup(i);
+  if ( g != NULL ){ //CS_TODO 
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Group_ptr Document_impl::findGroup(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Group_ptr result  = Group::_nil();
+  HEXA_NS::Group* g = _document_cpp->findGroup(name);
+  if ( g != NULL ){ //CS_TODO 
+    Group_impl* servantCorba = new Group_impl(g);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Law_ptr Document_impl::addLaw(const char* name, ::CORBA::Long nb_nodes) throw (SALOME::SALOME_Exception)
+{
+  Law_ptr result  = Law::_nil();
+
+  HEXA_NS::Law* l = _document_cpp->addLaw(name, nb_nodes);
+  if ( l != NULL ){
+    Law_impl* servantCorba = new Law_impl(l);
+    result = servantCorba->_this(); 
+  }
+
+  return result;
+}
+
+
+::CORBA::Long Document_impl::countLaw() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->countLaw();
+}
+
+Law_ptr Document_impl::getLaw(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Law_ptr result = Law::_nil();
+
+  HEXA_NS::Law* l = _document_cpp->getLaw(i);
+  if ( l != NULL ){
+    Law_impl* servantCorba = new Law_impl(l);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+void Document_impl::removeLaw(Law_ptr l) throw (SALOME::SALOME_Exception)
+{
+  Law_impl* lServant = ::DownCast<Law_impl*>(l);
+  ASSERT( lServant );
+  if ( lServant ) {
+    HEXA_NS::Law* l = lServant->GetImpl();
+    _document_cpp->removeLaw(l);
+  }
+}
+
+
+
+Law_ptr Document_impl::findLaw(const char* name) throw (SALOME::SALOME_Exception)
+{
+  Law_ptr result  = Law::_nil();
+
+  HEXA_NS::Law* l = _document_cpp->findLaw(name);
+  if ( l != NULL ){
+    Law_impl* servantCorba = new Law_impl(l);
+    result = servantCorba->_this();
+  }
+
+  return result;
+}
+
+
+::CORBA::Long Document_impl::countPropagation() throw (SALOME::SALOME_Exception)
+{
+  return _document_cpp->countPropagation();
+}
+
+
+Propagation_ptr Document_impl::getPropagation(::CORBA::Long i) throw (SALOME::SALOME_Exception)
+{
+  Propagation_ptr result  = Propagation::_nil();
+
+  HEXA_NS::Propagation* p = _document_cpp->getPropagation(i);
+//   //CS_Test
+// 
+//   const HEXA_NS::Edges& edges_cpp = p->getEdges();
+// 
+// //   HEXA_NS::Edges::const_iterator itertest = edges_cpp.begin();
+// //   itertest != edges_cpp.end();
+//   for ( HEXA_NS::Edges::const_iterator iter = edges_cpp.begin();
+//     iter != edges_cpp.end();
+//         ++iter ){
+//     *iter;
+//   }
+//   //CS_Test
+
+  if ( p != NULL ){
+    Propagation_impl* servantCorba = new Propagation_impl(p);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Propagation_ptr Document_impl::findPropagation(Edge_ptr eIn) throw (SALOME::SALOME_Exception)
+{
+  Propagation_ptr result  = Propagation::_nil();
+
+  Edge_impl* eServant = ::DownCast<Edge_impl*>( eIn );
+  ASSERT( eServant );
+
+  if ( eServant ) {
+    HEXA_NS::Edge* e= eServant->GetImpl();
+
+    HEXA_NS::Propagation* p = _document_cpp->findPropagation(e);
+    if ( p != NULL ){
+      Propagation_impl* servantCorba = new Propagation_impl(p);
+      result = servantCorba->_this();
+    }
+  }
+
+  return result;
+}
+
+
+
+
+// HEXA_ORB::HEXA_ORB::Hexas* Document_impl::addCartesian1(HEXA_ORB::Vertex_ptr v, HEXA_ORB::Vector_ptr v1, ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz, ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz)
+//     throw (SALOME::SALOME_Exception)
+// {
+//   HEXA_ORB::HEXA_ORB::Hexas* servantGrid = new HEXA_ORB::HEXA_ORB::Hexas;
+// 
+// //   std::cout<<"v->x()"<< v->x() << std::endl;
+// //   std::cout<<"v->y()"<< v->y() << std::endl;
+// //   std::cout<<"v->z()"<< v->z() << std::endl;
+// //   
+// //   std::cout<<"v1->dx()"<< v1->dx() << std::endl;
+// //   std::cout<<"v1->dy()"<< v1->dy() << std::endl;
+// //   std::cout<<"v1->dz()"<< v1->dz() << std::endl;
+// // 
+// //   HEXA_NS::Vertex* tmpVertex = _document_cpp->vertex( v->x(), v->y(), v->z() );
+// // //   HEXA_NS::Vertex* tmpVertex = new HEXA_NS::Vertex(_document_cpp, v->x(), v->y(), v->z() );
+// //   std::cout<<"tmpVertex OK"<<std::endl;
+// // 
+// // 
+// //   HEXA_NS::Vector* tmpVector = _document_cpp->vector( v1->dx(), v1->dy(), v1->dz() );
+// // //   HEXA_NS::Vector* tmpVector = new HEXA_NS::Vector(_document_cpp, v1->dx(), v1->dy(), v1->dz() );
+// //   std::cout<<"tmpVector OK"<<std::endl;
+// // 
+// // //   HEXA_NS::HEXA_ORB::Hexas* grid = _document_cpp->cartesian( tmpVertex, tmpVector, px, py, pz, mx, my, mz );
+// //   std::cout<<"px->"<<px<<std::endl;
+// //   std::cout<<"py->"<<py<<std::endl;
+// //   std::cout<<"pz->"<<pz<<std::endl;
+// // 
+// //   HEXA_NS::HEXA_ORB::Hexas* grid = _document_cpp->cartesian( tmpVertex, tmpVector, px, py, pz);
+// //   std::cout<<"grid OK"<<std::endl;
+// //   tmpVertex->remove();
+// //   std::cout<<"tmpVertex->remove() OK"<<std::endl;
+// //   tmpVector->remove();
+// //   std::cout<<"tmpVector->remove() OK"<<std::endl;
+// // 
+// // 
+// // 
+// //   HEXA_NS::Hexa *oneHexa = grid->getHexa (0,0,0);
+// //   std::cout<<"grid->getHexa  OK"<<std::endl;
+// // 
+// //   Hexa_impl *servantHexa = new Hexa_impl( oneHexa );
+// //   (*servantGrid)[ 0 ] = servantHexa->_this();
+// // 
+// // // 
+// // //   CORBA::ULong i = 0;
+// // //   for (int nz=0; nz<pz ; nz++){
+// // //     for (int ny=nz+1; ny<py-nz-1 ; ny++){
+// // //       for (int nx=nz+1; nx<px-nz-1 ; nx++){
+// // //         HEXA_NS::Hexa *oneHexa = grid->getHexa (nx, ny, nz);
+// // // //         oneHexa->remove (); CS_TODO ? (not)
+// // //         Hexa_impl *servantHexa = new Hexa_impl( oneHexa );
+// // //         (*servantGrid)[ i++ ] = servantHexa->_this();
+// // //       }
+// // //     }
+// // //   }
+//   return servantGrid;
+// }
+
diff --git a/src/HEXABLOCK_I/HexDocument_impl.hxx b/src/HEXABLOCK_I/HexDocument_impl.hxx
new file mode 100755 (executable)
index 0000000..f21d1a3
--- /dev/null
@@ -0,0 +1,152 @@
+#ifndef __HexDocument_impl__
+#define __HexDocument_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Document)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexDocument.hxx"
+
+
+// #define HEXA_NS Hex
+using namespace HEXABLOCK_ORB;
+
+class Document_impl:
+  public POA_HEXABLOCK_ORB::Document,
+  public SALOME::GenericObj_i
+{
+
+public:
+  Document_impl(HEXA_NS::Document *ptrCpp);
+
+  HEXA_NS::Document* GetImpl() throw (SALOME::SALOME_Exception);
+
+  void purge() throw (SALOME::SALOME_Exception);
+
+  ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+
+  char* getFile() throw (SALOME::SALOME_Exception);
+  void setFile(const char* fileName) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean isSavedFile() throw (SALOME::SALOME_Exception);
+  ::CORBA::Long saveFile() throw (SALOME::SALOME_Exception);
+  void setTolerance(::CORBA::Double tol) throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getTolerance() throw (SALOME::SALOME_Exception);
+  Vertex_ptr addVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countVertex() throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Vertex_ptr findVertex(::CORBA::Double x, ::CORBA::Double y, ::CORBA::Double z) throw (SALOME::SALOME_Exception);
+  Edge_ptr addEdge(Vertex_ptr v0, Vertex_ptr v1) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countEdge() throw (SALOME::SALOME_Exception);
+  Edge_ptr getEdge(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Edge_ptr findEdge(Vertex_ptr p1, Vertex_ptr p2) throw (SALOME::SALOME_Exception);
+  Quad_ptr addQuad(Edge_ptr e0, Edge_ptr e1, Edge_ptr e2, Edge_ptr e3) throw (SALOME::SALOME_Exception);
+  Quad_ptr addQuadVertices(Vertex_ptr v0, Vertex_ptr v1, Vertex_ptr v2, Vertex_ptr v3) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countQuad() throw (SALOME::SALOME_Exception);
+  Quad_ptr getQuad(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Quad_ptr findQuad(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexa(Quad_ptr q0, Quad_ptr q1, Quad_ptr q2, Quad_ptr q3, Quad_ptr q4, Quad_ptr q5) throw (SALOME::SALOME_Exception);
+  Hexa_ptr addHexaVertices(Vertex_ptr v0, Vertex_ptr v1, Vertex_ptr v2, Vertex_ptr v3, Vertex_ptr v4, Vertex_ptr v5, Vertex_ptr v6, Vertex_ptr v7) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countHexa() throw (SALOME::SALOME_Exception);
+  Hexa_ptr getHexa(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Hexa_ptr findHexa(Vertex_ptr p1, Vertex_ptr p2) throw (SALOME::SALOME_Exception);
+  Vector_ptr addVector(::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz) throw (SALOME::SALOME_Exception);
+  Vector_ptr addVectorVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long countVector() throw (SALOME::SALOME_Exception);
+//   Vector_ptr getVector(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Cylinder_ptr addCylinder(Vertex_ptr base, Vector_ptr direction, ::CORBA::Double radius, ::CORBA::Double height) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long countCylinder() throw (SALOME::SALOME_Exception);
+//   Cylinder_ptr getCylinder(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Pipe_ptr addPipe(Vertex_ptr base, Vector_ptr direction, ::CORBA::Double int_radius, ::CORBA::Double ext_radius, ::CORBA::Double height) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long countPipe() throw (SALOME::SALOME_Exception);
+//   Pipe_ptr getPipe(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean removeHexa(Hexa_ptr h) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean removeConnectedHexa(Hexa_ptr h) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeCartesian(Vertex_ptr pt, Vector_ptr vx, Vector_ptr vy, Vector_ptr vz, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeCartesian1(Vertex_ptr v, Vector_ptr v1, ::CORBA::Long px, ::CORBA::Long py, ::CORBA::Long pz, ::CORBA::Long mx, ::CORBA::Long my, ::CORBA::Long mz) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeCylindrical(Vertex_ptr pt, Vector_ptr vex, Vector_ptr vez, ::CORBA::Double dr, ::CORBA::Double da, ::CORBA::Double dl, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl, ::CORBA::Boolean fill) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makeSpherical( Vertex_ptr pt, ::CORBA::Double dx, ::CORBA::Double dy, ::CORBA::Double dz, ::CORBA::Long n ) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeSpherical( Vertex_ptr ptIn,
+    Vector_ptr dvIn,
+    ::CORBA::Long n,
+    ::CORBA::Double k ) throw (SALOME::SALOME_Exception); //CS_TODO
+//   Elements_ptr makeCylinder(Cylinder_ptr cyl, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeCylinder(Cylinder_ptr cyl, Vector_ptr vr, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makePipe(Pipe_ptr p, ::CORBA::Long nr, ::CORBA::Long na, ::CORBA::Long nl) throw (SALOME::SALOME_Exception);
+
+//   Elements_ptr makeCylinders(Cylinder_ptr c1, Cylinder_ptr c2) throw (SALOME::SALOME_Exception);
+    CrossElements_ptr makeCylinders(Cylinder_ptr cyl1, Cylinder_ptr cyl2) throw (SALOME::SALOME_Exception);
+
+//   Elements_ptr makePipes(Pipe_ptr p1, ::CORBA::Long n1r, ::CORBA::Long n1a, ::CORBA::Long n1l, Pipe_ptr p2, ::CORBA::Long n2r, ::CORBA::Long n2a, ::CORBA::Long n2l) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr prismQuad(Quad_ptr qd, Vector_ptr v, ::CORBA::Long nb) throw (SALOME::SALOME_Exception);
+  Elements_ptr prismQuads(const Quads& qds, Vector_ptr v, ::CORBA::Long nb) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr joinQuad(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2, ::CORBA::Long nb) throw (SALOME::SALOME_Exception);
+  Elements_ptr joinQuads(const Quads& qds, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2, ::CORBA::Long nb) throw (SALOME::SALOME_Exception);
+
+//CS_NOT_SPEC
+//   Elements_ptr mergeQuads(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2) throw (SALOME::SALOME_Exception);
+//   Elements_ptr mergeEdges(Edge_ptr e1, Edge_ptr e2, Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+//   Elements_ptr mergeVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+
+
+  ::CORBA::Long mergeQuads(Quad_ptr qa, Quad_ptr qb, Vertex_ptr va1, Vertex_ptr vb1, Vertex_ptr va2, Vertex_ptr vb2) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long mergeEdges(Edge_ptr e1, Edge_ptr e2, Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long mergeVertices(Vertex_ptr v1, Vertex_ptr v2) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr disconnectQuad(Hexa_ptr h, Quad_ptr q) throw (SALOME::SALOME_Exception);
+//   Elements_ptr disconnectEdge(Hexa_ptr h, Edge_ptr e) throw (SALOME::SALOME_Exception);
+//   Elements_ptr disconnectVertex(Hexa_ptr h, Vertex_ptr v) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long disconnectQuad(Hexa_ptr h, Quad_ptr q) throw (SALOME::SALOME_Exception);
+//   Quad_ptr disconnectQuad(Hexa_ptr h, Quad_ptr q) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long disconnectEdge(Hexa_ptr h, Edge_ptr e) throw (SALOME::SALOME_Exception);
+//   Edge_ptr disconnectEdge(Hexa_ptr h, Edge_ptr e) throw (SALOME::SALOME_Exception);
+  Elements_ptr disconnectEdge(Hexa_ptr h, Edge_ptr e) throw (SALOME::SALOME_Exception);
+//   ::CORBA::Long disconnectVertex(Hexa_ptr h, Vertex_ptr v) throw (SALOME::SALOME_Exception);
+  Elements_ptr disconnectVertex(Hexa_ptr h, Vertex_ptr v) throw (SALOME::SALOME_Exception);
+//   Vertex_ptr disconnectVertex(Hexa_ptr h, Vertex_ptr v) throw (SALOME::SALOME_Exception);
+
+  Elements_ptr cut(Edge_ptr e, ::CORBA::Long nb_of_cuts) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makeTranslation(Element_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception);//CS_Bruno
+  Elements_ptr makeTranslation(Elements_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makeScale(Vertex_ptr e, Vertex_ptr ver, ::CORBA::Double k) throw (SALOME::SALOME_Exception);
+  Elements_ptr makeRotation(Elements_ptr l, Vertex_ptr ver, Vector_ptr vec, ::CORBA::Double angle) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makeSymmetryPoint(Element_ptr e, Vertex_ptr ver) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makeSymmetryLine(Element_ptr e, Vertex_ptr ver, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+//   Elements_ptr makeSymmetryPlane(Element_ptr e, Vertex_ptr ver, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+
+//   void performTranslation(Element_ptr e, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+  void performTranslation(Elements_ptr l, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+//   void performScale(Element_ptr e, Vertex_ptr ver, ::CORBA::Double k) throw (SALOME::SALOME_Exception);
+  void performRotation(Elements_ptr l, Vertex_ptr ver, Vector_ptr vec, ::CORBA::Double angle) throw (SALOME::SALOME_Exception);
+//   void performSymmetryPoint(Element_ptr e, Vertex_ptr ver) throw (SALOME::SALOME_Exception);
+//   void performSymmetryLine(Element_ptr e, Vertex_ptr ver, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+//   void performSymmetryPlane(Element_ptr e, Vertex_ptr ver, Vector_ptr vec) throw (SALOME::SALOME_Exception);
+  Group_ptr addHexaGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addQuadGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addEdgeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addHexaNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addQuadNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addEdgeNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  Group_ptr addVertexNodeGroup(const char* name) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long removeGroup(Group_ptr g) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countGroup() throw (SALOME::SALOME_Exception);
+  Group_ptr getGroup(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Group_ptr findGroup(const char* name) throw (SALOME::SALOME_Exception);
+
+  Law_ptr addLaw(const char* name, ::CORBA::Long nb_nodes) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countLaw() throw (SALOME::SALOME_Exception);
+  Law_ptr getLaw(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  void removeLaw(Law_ptr l) throw (SALOME::SALOME_Exception);
+  Law_ptr findLaw(const char* name) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long countPropagation() throw (SALOME::SALOME_Exception);
+  Propagation_ptr getPropagation(::CORBA::Long i) throw (SALOME::SALOME_Exception);
+  Propagation_ptr findPropagation(Edge_ptr e) throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Document *_document_cpp;
+
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexEdge_impl.cxx b/src/HEXABLOCK_I/HexEdge_impl.cxx
new file mode 100755 (executable)
index 0000000..ed1a6b7
--- /dev/null
@@ -0,0 +1,150 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+#include "hexa_base.hxx"
+
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexShape.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+Edge_impl::Edge_impl( HEXA_NS::Edge *ptrCpp ):
+_edge_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Edge* Edge_impl::GetImpl()
+  throw (SALOME::SALOME_Exception)
+{
+  return _edge_cpp;
+}
+
+
+::CORBA::Boolean Edge_impl::getWay() throw (SALOME::SALOME_Exception)
+{
+//   bool way = _edge_cpp->getWay();
+//   if ( way == true ) {
+//     return CORBA::TRUE;
+//   else {
+//     return CORBA::FALSE;
+//   }
+  return _edge_cpp->getWay();
+}
+
+
+Vertex_ptr Edge_impl::getVertex(::CORBA::Long n)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _edge_cpp->getVertex(n);
+  if ( v!= NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result ;
+}
+
+
+void Edge_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->dump();
+}
+
+
+void Edge_impl::printName()throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->printName();
+}
+
+
+
+void Edge_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _edge_cpp->setScalar(val);
+}
+
+
+::CORBA::Long Edge_impl::addAssociation( GEOM::GEOM_Object_ptr geom_object_1D, double debut, double fin )
+  throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ok;
+  TopoDS_Shape aShape = HEXABLOCK::GetHEXABLOCKGen()->geomObjectToShape( geom_object_1D );
+  string strBrep = shape2string( aShape );
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+  s->debut = debut;
+  s->fin   = fin;
+  ok = _edge_cpp->addAssociation( s );
+
+
+  Edge_impl::Assoc assoc;
+  assoc.geomObj = GEOM::GEOM_Object::_duplicate( geom_object_1D );
+  assoc.debut   = debut;
+  assoc.fin     = fin;
+  _associations.push_back(assoc);
+
+  return ok;
+}
+
+
+
+// EdgeAssociations* Edge_impl::getAssociations() //CS_NOT_SPEC
+//   throw (SALOME::SALOME_Exception)
+// {
+//   HEXABLOCK_ORB::EdgeAssociations* result = new HEXABLOCK_ORB::EdgeAssociations;
+//   result->length( _associations.size() );
+// 
+//   HEXABLOCK_ORB::EdgeAssociation assoc;
+//   CORBA::ULong i = 0;
+//   for ( std::vector<Edge_impl::Assoc>::const_iterator iter = _associations.begin();
+//     iter != _associations.end();
+//         ++iter){
+// //       assoc.geomObj = (*iter).geomObj;
+//       assoc.geomObj = GEOM::GEOM_Object::_duplicate( (*iter).geomObj );
+//       assoc.debut = (*iter).debut;
+//       assoc.fin   = (*iter).fin;
+//       (*result)[i++] = assoc;
+//   }
+//   return result;
+// }
+
+
+
+
+EdgeAssociations* Edge_impl::getAssociations ()
+  throw (SALOME::SALOME_Exception)
+{
+  HEXABLOCK_ORB::EdgeAssociations* result = new HEXABLOCK_ORB::EdgeAssociations;
+//   HEXABLOCK_ORB::GEOM_Object_ptr ge;
+//   GEOM::GEOM_Object_ptr ge;
+  TopoDS_Shape aShape;
+  const std::vector<HEXA_NS::Shape*> shapes = _edge_cpp->getAssociations();
+
+  result->length( shapes.size() );
+  HEXABLOCK_ORB::EdgeAssociation assoc;
+  CORBA::ULong i = 0;
+  for ( std::vector<HEXA_NS::Shape*>::const_iterator iter = shapes.begin();
+       iter != shapes.end();
+        ++iter ){
+      aShape = string2shape( (*iter)->getBrep());
+//       ge = GEOM::GEOM_Object::_duplicate(HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape )); 
+//       ge = HEXABLOCK_ORB::GEOM_Edge::_duplicate(HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape ));
+//       ge = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape );
+//       ge->debut( (*iter)->debut );
+//       ge->fin( (*iter)->fin );
+
+//       assoc.geomObj = GEOM::GEOM_Object::_duplicate( (*iter).geomObj );
+      std::cout <<"AAAAAA"<<std::endl;
+      assoc.geomObj = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape );
+      assoc.debut = (*iter)->debut;
+      assoc.fin   = (*iter)->fin;
+      (*result)[ i++ ] = assoc;
+  }
+
+  return result;
+}
+
+
diff --git a/src/HEXABLOCK_I/HexEdge_impl.hxx b/src/HEXABLOCK_I/HexEdge_impl.hxx
new file mode 100755 (executable)
index 0000000..6e41f90
--- /dev/null
@@ -0,0 +1,47 @@
+#ifndef __HexEdge_impl__
+#define __HexEdge_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Edge)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexEdge.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Edge_impl : public POA_HEXABLOCK_ORB::Edge,
+                 public SALOME::GenericObj_i
+{
+  struct Assoc {
+    GEOM::GEOM_Object_ptr geomObj;
+    double debut;
+    double fin;
+  };
+
+public:
+  Edge_impl(HEXA_NS::Edge *ptrCpp);
+  HEXA_NS::Edge* GetImpl() throw (SALOME::SALOME_Exception);
+
+  ::CORBA::Boolean getWay() throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+//   void setAssociation(GEOM::GEOM_Object_ptr geom_object_1D) throw (SALOME::SALOME_Exception);
+//   GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception);
+//   void removeAssociation() throw (SALOME::SALOME_Exception);
+  ::CORBA::Long addAssociation( GEOM::GEOM_Object_ptr geom_object_1D, double debut, double fin ) //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+
+  EdgeAssociations* getAssociations () //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Edge*      _edge_cpp;
+  std::vector<Assoc>  _associations;
+
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexElements_impl.cxx b/src/HEXABLOCK_I/HexElements_impl.cxx
new file mode 100755 (executable)
index 0000000..b68a684
--- /dev/null
@@ -0,0 +1,277 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "hexa_base.hxx"
+#include "HexElements_impl.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+
+
+Elements_impl::Elements_impl( HEXA_NS::Elements *ptrCpp ):_elements_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Elements* Elements_impl::GetImpl()
+{
+  return _elements_cpp;
+}
+
+::CORBA::Long Elements_impl::countVertex() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countVertex();
+  return n;
+}
+
+::CORBA::Long Elements_impl::countEdge() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countEdge();
+  return n;
+}
+
+::CORBA::Long Elements_impl::countQuad() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countQuad();
+  return n;
+}
+
+::CORBA::Long Elements_impl::countHexa() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n = _elements_cpp->countHexa();
+  return n;
+}
+
+::CORBA::Long Elements_impl::findVertex( Vertex_ptr pIn ) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long n;
+  Vertex_impl* pInServant = ::DownCast<Vertex_impl*>( pIn );
+  ASSERT( pInServant );
+  HEXA_NS::Vertex* p = pInServant->GetImpl();
+  n = _elements_cpp->findVertex( p );
+  return n;
+}
+
+
+
+Vertex_ptr Elements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result  = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _elements_cpp->getVertex(n);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Edge_ptr Elements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result  = Edge::_nil();
+
+  HEXA_NS::Edge* e = _elements_cpp->getEdge(n);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr Elements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  HEXA_NS::Quad* q = _elements_cpp->getQuad(n);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Hexa_ptr Elements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+
+  HEXA_NS::Hexa* h = _elements_cpp->getHexa(n);
+  if ( h != NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+::CORBA::Long Elements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ret = _elements_cpp->saveVtk( fname );
+  return ret;
+}
+
+
+void Elements_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _elements_cpp->dump();
+}
+
+
+void Elements_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _elements_cpp->printName();
+}
+
+
+
+
+Vertex_ptr Elements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+  HEXA_NS::Vertex* v = _elements_cpp->getVertexIJK(x, y, z);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Elements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _elements_cpp->getEdgeI(x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Elements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _elements_cpp->getEdgeJ(x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Edge_ptr Elements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+  HEXA_NS::Edge* e = _elements_cpp->getEdgeK(x, y, z);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Quad_ptr Elements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _elements_cpp->getQuadIJ(x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr Elements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _elements_cpp->getQuadIK(x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Quad_ptr Elements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
+  throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+  HEXA_NS::Quad* q = _elements_cpp->getQuadJK(x, y, z);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Hexa_ptr Elements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
+{
+  Hexa_ptr result = Hexa::_nil();
+  HEXA_NS::Hexa* h = _elements_cpp->getHexaIJK(x, y, z);
+  if ( h != NULL ){
+    Hexa_impl* servantCorba = new Hexa_impl(h);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+// Quad_ptr Elements_impl::getQuad1(EnumCoord dirIn, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception)
+// {
+//   Quad_ptr result = Quad::_nil();
+// 
+// //   EnumCoord k;
+// //   HEXA_NS::EnumCoord k_cpp;
+//   HEXA_NS::EnumCoord dir_cpp;
+// 
+//   switch (dirIn) {
+//     case DIR_X : dir_cpp = HEXA_NS::dir_x; break;
+//     case DIR_Y : dir_cpp = HEXA_NS::dir_y; break;
+//     case DIR_Z : dir_cpp = HEXA_NS::dir_z; break;
+//     case DIM3:   dir_cpp = HEXA_NS::DIM3; break;
+//   }
+// 
+//   HEXA_NS::Quad* q = _elements_cpp->getQuad(dir_cpp, nx, ny, nz);
+//   if ( q != NULL ){
+//     Quad_impl* servantCorba = new Quad_impl(q);
+//     result = servantCorba->_this();
+//   }
+// 
+//   return result;
+// }
+// 
+// Edge_ptr Elements_impl::getEdge1(EnumCoord dirIn, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception)
+// {
+//   Edge_ptr result = Edge::_nil();
+// 
+// //   EnumCoord k;
+// //   HEXA_NS::EnumCoord k_cpp;
+//   HEXA_NS::EnumCoord dir_cpp;
+// 
+//   switch (dirIn) {
+//     case DIR_X : dir_cpp = HEXA_NS::dir_x; break;
+//     case DIR_Y : dir_cpp = HEXA_NS::dir_y; break;
+//     case DIR_Z : dir_cpp = HEXA_NS::dir_z; break;
+//     case DIM3:   dir_cpp = HEXA_NS::DIM3; break;
+//   }
+// 
+//   HEXA_NS::Edge* e = _elements_cpp->getEdge(dir_cpp, nx, ny, nz);
+//   if ( e != NULL ){
+//     Edge_impl* servantCorba = new Edge_impl(e);
+//     result = servantCorba->_this();
+//   }
+// 
+//   return result;
+// }
+
diff --git a/src/HEXABLOCK_I/HexElements_impl.hxx b/src/HEXABLOCK_I/HexElements_impl.hxx
new file mode 100755 (executable)
index 0000000..a610933
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __HexElements_impl__
+#define __HexElements_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Elements)
+// #include CORBA_SERVER_HEADER(Vertex)
+// #include CORBA_SERVER_HEADER(Edge)
+// #include CORBA_SERVER_HEADER(Quad)
+// #include CORBA_SERVER_HEADER(Hexa)
+
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexElements.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Elements_impl : public POA_HEXABLOCK_ORB::Elements,
+                     public SALOME::GenericObj_i
+{
+public:
+    Elements_impl(HEXA_NS::Elements *ptrCpp);
+    HEXA_NS::Elements* GetImpl();
+
+    ::CORBA::Long countVertex() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countEdge() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countQuad() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countHexa() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long findVertex( Vertex_ptr p ) throw (SALOME::SALOME_Exception);
+    Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+    Hexa_ptr getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+
+    Vertex_ptr getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Edge_ptr getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Edge_ptr getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Quad_ptr getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+    Quad_ptr getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+    Hexa_ptr getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception);
+
+
+//     Quad_ptr getQuad1(EnumCoord dir, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception);
+// 
+//     Edge_ptr getEdge1(EnumCoord dir, ::CORBA::Long nx, ::CORBA::Long ny, ::CORBA::Long nz)
+//       throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Long saveVtk(const char* fname) throw (SALOME::SALOME_Exception);
+    void dump() throw (SALOME::SALOME_Exception);
+    void printName() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Elements *_elements_cpp;
+//   void *_elements_cpp;
+
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexGroup_impl.cxx b/src/HEXABLOCK_I/HexGroup_impl.cxx
new file mode 100755 (executable)
index 0000000..6206440
--- /dev/null
@@ -0,0 +1,125 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexEltBase.hxx"
+#include "HexGroups.hxx"
+
+#include "HexElements_impl.hxx"
+
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexGroup_impl.hxx"
+
+Group_impl::Group_impl( HEXA_NS::Group *ptrCpp ):_group_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Group* Group_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _group_cpp;
+}
+
+char* Group_impl::getName() throw (SALOME::SALOME_Exception)
+{
+  _group_cpp->getName();
+}
+
+void Group_impl::setName(const char* name) throw (SALOME::SALOME_Exception)
+{
+  _group_cpp->setName( name );
+}
+
+
+GroupKind Group_impl::getKind() throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::EnumGroup k = _group_cpp->getKind();
+
+  switch (k){
+    case HEXA_NS::HexaCell:  return HEXA_GROUP;
+    case HEXA_NS::QuadCell:  return QUAD_GROUP;
+    case HEXA_NS::EdgeCell:  return EDGE_GROUP;
+    case HEXA_NS::HexaNode:  return HEXANODE_GROUP;
+    case HEXA_NS::QuadNode:  return QUADNODE_GROUP;
+    case HEXA_NS::EdgeNode:  return EDGENODE_GROUP;
+    case HEXA_NS::Vertex_Node:  return VERTEXNODE_GROUP;
+    default : ASSERT(false);
+  }
+}
+
+
+::CORBA::Long  Group_impl::addElement(Element_ptr eIn) throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ok;
+  Vertex_impl* vInServant = ::DownCast<Vertex_impl*>( eIn );
+  Edge_impl*   eInServant = ::DownCast<Edge_impl*>( eIn );
+  Quad_impl*   qInServant = ::DownCast<Quad_impl*>( eIn );
+  Hexa_impl*   hInServant = ::DownCast<Hexa_impl*>( eIn );
+
+  ASSERT( vInServant or eInServant or qInServant or hInServant );
+  HEXA_NS::EltBase* e = NULL;
+  if ( vInServant ) {
+    e = vInServant->GetImpl();
+  } else if ( eInServant ) {
+    e = eInServant->GetImpl();
+  } else if ( qInServant ) {
+    e = qInServant->GetImpl();
+  } else if ( hInServant ) {
+    e = hInServant->GetImpl();
+  }
+  ok = _group_cpp->addElement(e);
+
+  return ok;
+}
+
+
+::CORBA::Long Group_impl::countElement() throw (SALOME::SALOME_Exception)
+{
+  return _group_cpp->countElement();
+}
+
+
+Element_ptr Group_impl::getElement(::CORBA::Long index) throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::EltBase* elt = _group_cpp->getElement(index);
+
+  HEXA_NS::Vertex* v = dynamic_cast<HEXA_NS::Vertex*>(elt);
+  HEXA_NS::Edge* e   = dynamic_cast<HEXA_NS::Edge*>(elt);
+  HEXA_NS::Quad* q   = dynamic_cast<HEXA_NS::Quad*>(elt);
+  HEXA_NS::Hexa* h   = dynamic_cast<HEXA_NS::Hexa*>(elt);
+
+  ASSERT( v or e or q or h );
+
+  if (v){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    return servantCorba->_this();
+  } else if (e){
+    Edge_impl*   servantCorba = new Edge_impl(e);
+    return servantCorba->_this();
+  } else if (q){
+    Quad_impl*   servantCorba = new Quad_impl(q);
+    return servantCorba->_this();
+  } else if (h){
+    Hexa_impl*   servantCorba = new Hexa_impl(h);
+    return servantCorba->_this();
+  } else {
+    return Element::_nil();
+  }
+}
+
+
+::CORBA::Long Group_impl::removeElement(::CORBA::Long index) throw (SALOME::SALOME_Exception)
+{
+  return _group_cpp->removeElement(index);
+}
+
+void Group_impl::clearElement() throw (SALOME::SALOME_Exception)
+{
+  _group_cpp->clearElement();
+}
+
diff --git a/src/HEXABLOCK_I/HexGroup_impl.hxx b/src/HEXABLOCK_I/HexGroup_impl.hxx
new file mode 100755 (executable)
index 0000000..5a7f0ab
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef __HexGroup_impl__
+#define __HexGroup_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Group)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexGroups.hxx"
+
+
+using namespace HEXABLOCK_ORB;
+class Group_impl : public POA_HEXABLOCK_ORB::Group,
+                  public SALOME::GenericObj_i
+{
+  public:
+    Group_impl(HEXA_NS::Group *ptrCpp);
+    HEXA_NS::Group* GetImpl() throw (SALOME::SALOME_Exception);
+
+    char* getName() throw (SALOME::SALOME_Exception);
+    void setName(const char* name) throw (SALOME::SALOME_Exception);
+    GroupKind getKind() throw (SALOME::SALOME_Exception);
+    ::CORBA::Long addElement(Element_ptr e) throw (SALOME::SALOME_Exception);
+    ::CORBA::Long countElement() throw (SALOME::SALOME_Exception);
+    Element_ptr getElement(::CORBA::Long index) throw (SALOME::SALOME_Exception);
+    ::CORBA::Long removeElement(::CORBA::Long index) throw (SALOME::SALOME_Exception);
+    void clearElement() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Group *_group_cpp;
+};
+
+
+// class HexaGroup_impl : public Group_impl {};
+// class QuadGroup_impl : public Group_impl {};
+// class EdgeGroup_impl : public Group_impl {};
+// class HexaNodeGroup_impl : public Group_impl {};
+// class QuadNodeGroup_impl : public Group_impl {};
+// class EdgeNodeGroup_impl : public Group_impl {};
+// class VertexNodeGroup_impl : public Group_impl {};
+
+
+#endif
diff --git a/src/HEXABLOCK_I/HexHexa_impl.cxx b/src/HEXABLOCK_I/HexHexa_impl.cxx
new file mode 100755 (executable)
index 0000000..c787b28
--- /dev/null
@@ -0,0 +1,76 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexHexa_impl.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexVertex_impl.hxx"
+
+Hexa_impl::Hexa_impl( HEXA_NS::Hexa *ptrCpp ):_hexa_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Hexa* Hexa_impl::GetImpl()
+    throw (SALOME::SALOME_Exception)
+{
+  return _hexa_cpp;
+}
+
+Quad_ptr Hexa_impl::getQuad(::CORBA::Long n)
+    throw (SALOME::SALOME_Exception)
+{
+  Quad_ptr result = Quad::_nil();
+
+  HEXA_NS::Quad* q = _hexa_cpp->getQuad(n);
+  if ( q != NULL ){
+    Quad_impl* servantCorba = new Quad_impl(q);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Edge_ptr Hexa_impl::getEdge(::CORBA::Long n)
+    throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  HEXA_NS::Edge* e = _hexa_cpp->getEdge(n);
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Vertex_ptr Hexa_impl::getVertex(::CORBA::Long n)
+    throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n);
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+void Hexa_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->setScalar(val);
+}
+
+void Hexa_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->dump();
+}
+
+
+void Hexa_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _hexa_cpp->printName();
+}
diff --git a/src/HEXABLOCK_I/HexHexa_impl.hxx b/src/HEXABLOCK_I/HexHexa_impl.hxx
new file mode 100755 (executable)
index 0000000..4078119
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __HexHexa_impl__
+#define __HexHexa_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Hexa)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexHexa.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Hexa_impl : public POA_HEXABLOCK_ORB::Hexa,
+                   public SALOME::GenericObj_i
+{
+public:
+  Hexa_impl(HEXA_NS::Hexa *ptrCpp);
+  HEXA_NS::Hexa* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Quad_ptr getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val ) throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+private:
+  HEXA_NS::Hexa *_hexa_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexLaw_impl.cxx b/src/HEXABLOCK_I/HexLaw_impl.cxx
new file mode 100755 (executable)
index 0000000..7109c8f
--- /dev/null
@@ -0,0 +1,89 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexLaw_impl.hxx"
+
+Law_impl::Law_impl( HEXA_NS::Law *ptrCpp ):_law_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Law* Law_impl::GetImpl()
+throw (SALOME::SALOME_Exception)
+{
+  return _law_cpp;
+}
+
+// HEXA_NS::Vertex* v = _hexa_cpp->getVertex(n);
+//   Vertex_impl* servantCorba = new Vertex_impl(v);
+//   return servantCorba->_this();
+
+
+void Law_impl::setName(const char* name)
+throw (SALOME::SALOME_Exception)
+{
+  _law_cpp->setName(name);
+}
+
+char* Law_impl::getName()
+throw (SALOME::SALOME_Exception)
+{
+//   string name;
+//   name = _law_cpp->getName();
+//   return  name.c_str();
+    return (char*)_law_cpp->getName();
+}
+
+void Law_impl::setNodes(::CORBA::Long n)
+throw (SALOME::SALOME_Exception)
+{
+  _law_cpp->setNodes(n);
+}
+
+::CORBA::Long Law_impl::getNodes()
+throw (SALOME::SALOME_Exception)
+{
+  return _law_cpp->getNodes();
+}
+
+void Law_impl::setKind( HEXABLOCK_ORB::KindLaw kIn )
+throw (SALOME::SALOME_Exception)
+{
+  HEXA_NS::KindLaw k_impl;
+  switch (kIn) {
+    case HEXABLOCK_ORB::UNIFORM    : k_impl = HEXA_NS::Uniform; break;
+    case HEXABLOCK_ORB::ARITHMETIC : k_impl = HEXA_NS::Arithmetic;  break;
+    case HEXABLOCK_ORB::GEOMETRIC  : k_impl = HEXA_NS::Geometric;   break;
+  }
+  _law_cpp->setKind(k_impl);
+}
+
+HEXABLOCK_ORB::KindLaw Law_impl::getKind()
+throw (SALOME::SALOME_Exception)
+{
+  HEXABLOCK_ORB::KindLaw k;
+  HEXA_NS::KindLaw k_cpp = _law_cpp->getKind();
+  switch (k_cpp) {
+    case HEXA_NS::Uniform :    k = HEXABLOCK_ORB::UNIFORM; break;
+    case HEXA_NS::Arithmetic : k = HEXABLOCK_ORB::ARITHMETIC; break;
+    case HEXA_NS::Geometric :  k = HEXABLOCK_ORB::GEOMETRIC; break;
+    default :                  ASSERT( false ); break;
+  }
+  return k;
+}
+
+
+void Law_impl::setCoefficient(::CORBA::Double c)
+throw (SALOME::SALOME_Exception)
+{
+  _law_cpp->setCoefficient(c);
+}
+
+::CORBA::Double Law_impl::getCoefficient()
+throw (SALOME::SALOME_Exception)
+{
+  return _law_cpp->getCoefficient();
+}
diff --git a/src/HEXABLOCK_I/HexLaw_impl.hxx b/src/HEXABLOCK_I/HexLaw_impl.hxx
new file mode 100755 (executable)
index 0000000..9c4eecc
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef __Law_impl__
+#define __Law_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Law)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexLaw.hxx"
+
+
+using namespace HEXABLOCK_ORB;
+
+class Law_impl : public POA_HEXABLOCK_ORB::Law,
+                   public SALOME::GenericObj_i
+{
+public:
+  Law_impl(HEXA_NS::Law *ptrCpp);
+  HEXA_NS::Law* GetImpl() throw (SALOME::SALOME_Exception);
+
+  void setName(const char* name) throw (SALOME::SALOME_Exception);
+  char* getName() throw (SALOME::SALOME_Exception);
+  void setNodes(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  ::CORBA::Long getNodes() throw (SALOME::SALOME_Exception);
+  void setKind(KindLaw k) throw (SALOME::SALOME_Exception);
+  KindLaw getKind() throw (SALOME::SALOME_Exception);
+  void setCoefficient(::CORBA::Double c) throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getCoefficient() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Law *_law_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexPipe_impl.cxx b/src/HEXABLOCK_I/HexPipe_impl.cxx
new file mode 100755 (executable)
index 0000000..54732c1
--- /dev/null
@@ -0,0 +1,75 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexVector_impl.hxx"
+#include "HexPipe_impl.hxx"
+
+Pipe_impl::Pipe_impl( HEXA_NS::Pipe *ptrCpp ):_pipe_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Pipe* Pipe_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _pipe_cpp;
+}
+
+Vertex_ptr Pipe_impl::getBase() throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _pipe_cpp->getBase();
+  if ( v!= NULL ){  
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+Vector_ptr Pipe_impl::getDirection() throw (SALOME::SALOME_Exception)
+{
+  Vector_ptr result = Vector::_nil();
+
+  HEXA_NS::Vector* v = _pipe_cpp->getDirection();
+
+  if ( v!= NULL ){  
+    Vector_impl* servantCorba = new Vector_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+::CORBA::Double Pipe_impl::getInternal_radius() throw (SALOME::SALOME_Exception)
+{
+//   ::CORBA::Double d = _pipe_cpp->getInternal_radius(); CS_TODO
+  ::CORBA::Double d = _pipe_cpp->getInternalRadius();
+  return d;
+}
+
+::CORBA::Double Pipe_impl::getRadius() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double d = _pipe_cpp->getRadius();
+  return d;
+}
+
+::CORBA::Double Pipe_impl::getHeight() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double d = _pipe_cpp->getHeight();
+  return d;
+}
+
+
+void Pipe_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _pipe_cpp->dump();
+}
+
+
+void Pipe_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _pipe_cpp->printName();
+}
diff --git a/src/HEXABLOCK_I/HexPipe_impl.hxx b/src/HEXABLOCK_I/HexPipe_impl.hxx
new file mode 100755 (executable)
index 0000000..5f0696a
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef __HexPipe_impl__
+#define __HexPipe_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Pipe)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexPipe.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Pipe_impl : public POA_HEXABLOCK_ORB::Pipe,
+                 public SALOME::GenericObj_i
+{
+public:
+  Pipe_impl(HEXA_NS::Pipe *ptrCpp);
+  HEXA_NS::Pipe* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Vertex_ptr getBase() throw (SALOME::SALOME_Exception);
+  Vector_ptr getDirection() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getInternal_radius() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getRadius() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getHeight() throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Pipe *_pipe_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexPropagation_impl.cxx b/src/HEXABLOCK_I/HexPropagation_impl.cxx
new file mode 100755 (executable)
index 0000000..4012032
--- /dev/null
@@ -0,0 +1,113 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+
+#include "hexa_base.hxx"
+#include "HexPropagation_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexLaw_impl.hxx"
+
+Propagation_impl::Propagation_impl( HEXA_NS::Propagation *ptrCpp ):_propagation_cpp(ptrCpp)
+{
+}
+
+
+
+HEXA_NS::Propagation* Propagation_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _propagation_cpp;
+}
+
+
+HEXABLOCK_ORB::Edges* Propagation_impl::getEdges() throw (SALOME::SALOME_Exception)
+{
+  HEXABLOCK_ORB::Edges* result = new HEXABLOCK_ORB::Edges;
+
+  const HEXA_NS::Edges& edges_cpp = _propagation_cpp->getEdges();
+//   HEXA_NS::Edges edges_cpp = _propagation_cpp->getEdges();
+  std::cout<<"XX edges_cpp.size() ->"<<edges_cpp.size()<<std::endl;
+
+  CORBA::ULong i = 0;
+  result->length( edges_cpp.size() );
+//   HEXA_NS::Edges::const_iterator itertest = edges_cpp.begin();
+//   itertest != edges_cpp.end();
+  for ( HEXA_NS::Edges::const_iterator iter = edges_cpp.begin();
+       iter != edges_cpp.end();
+        ++iter){
+//       printf ("     (");
+//       (*iter)->getVertex (0)->printName (", ");
+//       (*iter)->getVertex (1)->printName (")\n");
+      Edge_impl *servantEdge = new Edge_impl( *iter );
+      (*result)[ i++ ] = servantEdge->_this();
+
+  }
+  return result;
+}
+
+
+// HEXABLOCK_ORB::Ways* Propagation_impl::getWays() throw (SALOME::SALOME_Exception)
+// {
+//   HEXABLOCK_ORB::Ways* result = new HEXABLOCK_ORB::Ways;
+//   const vector<bool>& ways_cpp = _propagation_cpp->getWays();
+// 
+//   CORBA::ULong i = 0;
+//   result->length( ways_cpp.size() );
+//   for ( vector<bool>::const_iterator iter = ways_cpp.begin();
+//     iter != ways_cpp.end(); ++iter ){
+//     (*result)[ i++ ] = *iter;
+// //     if (*iter == true ) {
+// //       (*result)[ i++ ] = ::CORBA::TRUE;
+// //     } else {
+// //       (*result)[ i++ ] = ::CORBA::FALSE;
+// //     }
+//   }
+//   return result;
+// 
+// }
+
+void Propagation_impl::setLaw(HEXABLOCK_ORB::Law_ptr lawIn) throw (SALOME::SALOME_Exception)
+{
+  Law_impl* lawInServant = ::DownCast<Law_impl*>( lawIn );
+  ASSERT( lawInServant );
+
+  if ( lawInServant ){
+    HEXA_NS::Law* law = lawInServant->GetImpl();
+    _propagation_cpp->setLaw(law);
+  }
+}
+
+HEXABLOCK_ORB::Law_ptr Propagation_impl::getLaw() throw (SALOME::SALOME_Exception)
+{
+    Law_ptr result = Law::_nil();
+    HEXA_NS::Law* l = _propagation_cpp->getLaw();
+
+    if ( l != NULL ){
+      Law_impl* servantCorba = new Law_impl(l);
+      result = servantCorba->_this();
+    }
+    return result;
+}
+
+
+
+void Propagation_impl::setWay(::CORBA::Boolean w) throw (SALOME::SALOME_Exception)
+{
+  _propagation_cpp->setWay(w);
+}
+
+
+
+::CORBA::Boolean Propagation_impl::getWay() throw (SALOME::SALOME_Exception)
+{
+//   bool way = _propagation_cpp->getWay();
+//   if ( way == true ) {
+//     return CORBA::TRUE;
+//   else {
+//     return CORBA::FALSE;
+//   }
+  return _propagation_cpp->getWay();
+}
+
diff --git a/src/HEXABLOCK_I/HexPropagation_impl.hxx b/src/HEXABLOCK_I/HexPropagation_impl.hxx
new file mode 100755 (executable)
index 0000000..70751e2
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __Propagation_impl__
+#define __Propagation_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Propagation)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexPropagation.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Propagation_impl : public POA_HEXABLOCK_ORB::Propagation,
+                   public SALOME::GenericObj_i
+{
+public:
+  Propagation_impl(HEXA_NS::Propagation *ptrCpp);
+  HEXA_NS::Propagation* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Edges* getEdges() throw (SALOME::SALOME_Exception);
+//   Ways* getWays() throw (SALOME::SALOME_Exception);
+
+  void setLaw(Law_ptr l) throw (SALOME::SALOME_Exception);
+  Law_ptr getLaw() throw (SALOME::SALOME_Exception);
+  void setWay(::CORBA::Boolean w) throw (SALOME::SALOME_Exception);
+  ::CORBA::Boolean getWay() throw (SALOME::SALOME_Exception);
+
+
+private:
+  HEXA_NS::Propagation *_propagation_cpp;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexQuad_impl.cxx b/src/HEXABLOCK_I/HexQuad_impl.cxx
new file mode 100755 (executable)
index 0000000..b5b7b88
--- /dev/null
@@ -0,0 +1,136 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexQuad_impl.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexEdge_impl.hxx"
+#include "HexShape.hxx"
+
+Quad_impl::Quad_impl( HEXA_NS::Quad *ptrCpp ):_quad_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Quad* Quad_impl::GetImpl()
+  throw (SALOME::SALOME_Exception)
+{
+  return _quad_cpp;
+}
+
+Edge_ptr Quad_impl::getEdge(::CORBA::Long n)
+  throw (SALOME::SALOME_Exception)
+{
+  Edge_ptr result = Edge::_nil();
+
+  HEXA_NS::Edge* e = _quad_cpp->getEdge( n );
+  if ( e != NULL ){
+    Edge_impl* servantCorba = new Edge_impl(e);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+Vertex_ptr Quad_impl::getVertex(::CORBA::Long n)
+   throw (SALOME::SALOME_Exception)
+{
+  Vertex_ptr result = Vertex::_nil();
+
+  HEXA_NS::Vertex* v = _quad_cpp->getVertex( n );
+  if ( v != NULL ){
+    Vertex_impl* servantCorba = new Vertex_impl(v);
+    result = servantCorba->_this();
+  }
+  return result;
+}
+
+
+
+
+::CORBA::Long Quad_impl::addAssociation( GEOM::GEOM_Object_ptr geom_object_2D)
+  throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Long ok;
+  TopoDS_Shape aShape = HEXABLOCK::GetHEXABLOCKGen()->geomObjectToShape( geom_object_2D );
+
+  string strBrep = shape2string( aShape );
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+  ok = _quad_cpp->addAssociation( s );
+
+//   _associations.push_back(GEOM::GEOM_Object::_duplicate( geom_object_2D ));
+
+  return ok;
+}
+
+
+GEOM::ListOfGO* Quad_impl::getAssociations() //CS_NOT_SPEC
+  throw (SALOME::SALOME_Exception)
+// {
+//   GEOM::ListOfGO* result = new GEOM::ListOfGO;
+//   result->length( _associations.size() );
+// 
+//   CORBA::ULong i = 0;
+//   for ( std::vector<GEOM::GEOM_Object_ptr>::const_iterator iter = _associations.begin();
+//     iter != _associations.end();
+//         ++iter){
+// //       (*result)[i++] = *iter;
+//       (*result)[i++] = GEOM::GEOM_Object::_duplicate( *iter );
+//   }
+//   return result;
+// }
+{
+  TopoDS_Shape aShape;
+  const std::vector<HEXA_NS::Shape*> shapes = _quad_cpp->getAssociations();
+
+  GEOM::ListOfGO* result = new GEOM::ListOfGO;
+  result->length( shapes.size() );
+
+  HEXABLOCK_ORB::EdgeAssociation assoc;
+  CORBA::ULong i = 0;
+  for ( std::vector<HEXA_NS::Shape*>::const_iterator iter = shapes.begin();
+       iter != shapes.end();
+        ++iter ){
+      aShape = string2shape( (*iter)->getBrep());
+      (*result)[ i++ ] = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject( aShape );
+  }
+
+  return result;
+}
+
+
+
+
+
+
+
+
+// void Quad_impl::setAssociation(GEOM::GEOM_Object_ptr geom_object_2D) throw (SALOME::SALOME_Exception)
+// {
+// }
+// 
+// GEOM::GEOM_Object_ptr Quad_impl::getAssociation() throw (SALOME::SALOME_Exception)
+// {
+// }
+// 
+// void Quad_impl::removeAssociation() throw (SALOME::SALOME_Exception)
+// {
+// }
+
+void Quad_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->setScalar(val);
+}
+
+void Quad_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->dump();
+}
+
+
+void Quad_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _quad_cpp->printName();
+}
diff --git a/src/HEXABLOCK_I/HexQuad_impl.hxx b/src/HEXABLOCK_I/HexQuad_impl.hxx
new file mode 100755 (executable)
index 0000000..633c270
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef __HexQuad_impl__
+#define __HexQuad_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(GEOM_Gen)
+#include CORBA_SERVER_HEADER(Quad)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexQuad.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Quad_impl : public POA_HEXABLOCK_ORB::Quad,
+                 public SALOME::GenericObj_i
+{
+public:
+  Quad_impl(HEXA_NS::Quad *ptrCpp);
+  HEXA_NS::Quad* GetImpl() throw (SALOME::SALOME_Exception);
+
+  Edge_ptr getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+  Vertex_ptr getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception);
+//   void setAssociation(GEOM::GEOM_Object_ptr geom_object_2D) throw (SALOME::SALOME_Exception);
+//   GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception);
+  ::CORBA::Long addAssociation ( GEOM::GEOM_Object_ptr geom_object_2D) //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+  GEOM::ListOfGO* getAssociations () //CS_NOT_SPEC
+      throw (SALOME::SALOME_Exception);
+
+
+//   void removeAssociation() throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception);
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+private:
+  HEXA_NS::Quad *_quad_cpp;
+//   std::vector<GEOM::GEOM_Object_ptr> _associations;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexVector_impl.cxx b/src/HEXABLOCK_I/HexVector_impl.cxx
new file mode 100755 (executable)
index 0000000..e7713f7
--- /dev/null
@@ -0,0 +1,47 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexVector_impl.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+Vector_impl::Vector_impl( HEXA_NS::Vector *ptrCpp ):_vector_cpp(ptrCpp)
+{
+}
+
+HEXA_NS::Vector* Vector_impl::GetImpl() throw (SALOME::SALOME_Exception)
+{
+  return _vector_cpp;
+}
+
+::CORBA::Double Vector_impl::getDX() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double dx = _vector_cpp->getDx();
+  return dx;
+}
+::CORBA::Double Vector_impl::getDY() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double dy = _vector_cpp->getDy();
+  return dy;
+}
+::CORBA::Double Vector_impl::getDZ() throw (SALOME::SALOME_Exception)
+{
+  ::CORBA::Double dz = _vector_cpp->getDz();
+  return dz;
+}
+
+
+void Vector_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _vector_cpp->dump();
+}
+
+
+void Vector_impl::printName() throw (SALOME::SALOME_Exception)
+{
+  _vector_cpp->printName();
+}
diff --git a/src/HEXABLOCK_I/HexVector_impl.hxx b/src/HEXABLOCK_I/HexVector_impl.hxx
new file mode 100755 (executable)
index 0000000..f2b9933
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __HexVector_impl__
+#define __HexVector_impl__
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Vector)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+#include "HexVector.hxx"
+
+using namespace HEXABLOCK_ORB;
+
+class Vector_impl : public POA_HEXABLOCK_ORB::Vector,
+                   public SALOME::GenericObj_i
+{
+  public:
+    Vector_impl(HEXA_NS::Vector *ptrCpp);
+    HEXA_NS::Vector* GetImpl() throw (SALOME::SALOME_Exception);
+
+    ::CORBA::Double getDX() throw(SALOME::SALOME_Exception);
+    ::CORBA::Double getDY() throw(SALOME::SALOME_Exception);
+    ::CORBA::Double getDZ() throw(SALOME::SALOME_Exception);
+   void dump() throw (SALOME::SALOME_Exception);
+   void printName() throw (SALOME::SALOME_Exception);
+  private:
+    HEXA_NS::Vector *_vector_cpp;
+
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/HexVertex_impl.cxx b/src/HEXABLOCK_I/HexVertex_impl.cxx
new file mode 100755 (executable)
index 0000000..4790cb9
--- /dev/null
@@ -0,0 +1,115 @@
+using namespace std;
+#include "HEXABLOCK.hxx"
+#include "utilities.h"
+
+#include <string>
+
+#include "hexa_base.hxx"
+#include "HexVertex_impl.hxx"
+#include "HexShape.hxx"
+
+Vertex_impl::Vertex_impl( HEXA_NS::Vertex *ptrCpp ):
+_vertex_cpp( ptrCpp )
+// _association( GEOM::GEOM_Object::_nil() )
+{
+}
+
+HEXA_NS::Vertex* Vertex_impl::GetImpl()
+{
+  return _vertex_cpp;
+}
+
+CORBA::Double Vertex_impl::getX() throw(SALOME::SALOME_Exception)
+{
+  return _vertex_cpp->getX();
+}
+
+CORBA::Double Vertex_impl::getY() throw(SALOME::SALOME_Exception)
+{
+  return _vertex_cpp->getY();
+}
+
+CORBA::Double Vertex_impl::getZ() throw(SALOME::SALOME_Exception)
+{
+  return _vertex_cpp->getZ();
+}
+
+
+void Vertex_impl::setX( CORBA::Double x ) throw(SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setX(x);
+}
+void Vertex_impl::setY(  CORBA::Double y ) throw(SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setY(y);
+}
+
+void Vertex_impl::setZ(  CORBA::Double z ) throw(SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setY(z);
+}
+
+
+void Vertex_impl::setAssociation(GEOM::GEOM_Object_ptr geom_object_vertex)
+  throw (SALOME::SALOME_Exception)
+{
+//   TopoDS_Shape shape = HEXABLOCK::GetHEXABLOCKGen()->geomObjectToShape(geom_object_vertex);
+  HEXABLOCK::HEXABLOCK* gen = HEXABLOCK::GetHEXABLOCKGen();
+  TopoDS_Shape shape = gen->geomObjectToShape(geom_object_vertex);
+  string strBrep = shape2string( shape );
+  HEXA_NS::Shape* s = new HEXA_NS::Shape( strBrep );
+  _vertex_cpp->setAssociation(s);
+
+//   _association = GEOM::GEOM_Object::_duplicate( geom_object_vertex );
+}
+
+
+GEOM::GEOM_Object_ptr Vertex_impl::getAssociation()
+  throw (SALOME::SALOME_Exception)
+{
+//   GEOM::GEOM_Object_var result = GEOM::GEOM_Object::_nil();
+//   GEOM::GEOM_Object_ptr result = GEOM::GEOM_Object::_nil();
+
+  GEOM::GEOM_Object_var result; // = new GEOM::GEOM_Object;
+
+  HEXA_NS::Shape* s = _vertex_cpp->getAssociation();
+
+  std::cout << "getAssociation ->" << s << std::endl;
+
+  if (s != NULL){
+    string strBrep = s->getBrep();
+    TopoDS_Shape shape = string2shape( strBrep );
+    result = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject(shape);
+  }
+
+// //   _vertex_cpp->getAssociation()->_topo;
+// //   result = HEXABLOCK::GetHEXABLOCKGen()->shapeToGeomObject(_shape);
+
+//   return result;
+  return result._retn();
+//   return GEOM::GEOM_Object::_duplicate( _association );
+}
+
+
+
+// void Vertex_impl::removeAssociation()
+//   throw (SALOME::SALOME_Exception)
+// {
+// }
+
+
+void Vertex_impl::setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->setScalar(val);
+}
+
+void Vertex_impl::dump() throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->dump();
+}
+
+
+void Vertex_impl::printName()throw (SALOME::SALOME_Exception)
+{
+  _vertex_cpp->printName();
+}
diff --git a/src/HEXABLOCK_I/HexVertex_impl.hxx b/src/HEXABLOCK_I/HexVertex_impl.hxx
new file mode 100755 (executable)
index 0000000..0fe1236
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __HexVertex_impl__
+#define __HexVertex_impl__
+
+// #include <TopoDS_Shape.hxx>
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(Vertex)
+#include "SALOME_GenericObj_i.hh"
+
+#include "hexa_base.hxx"
+
+#include "hexa_base.hxx"
+#include "HexVertex.hxx"
+
+class Vertex_impl : public POA_HEXABLOCK_ORB::Vertex,
+                   public SALOME::GenericObj_i
+{
+public:
+  Vertex_impl(HEXA_NS::Vertex *ptrCpp);
+  HEXA_NS::Vertex* GetImpl();
+
+  ::CORBA::Double getX() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getY() throw (SALOME::SALOME_Exception);
+  ::CORBA::Double getZ() throw (SALOME::SALOME_Exception);
+  void setX(::CORBA::Double x) throw (SALOME::SALOME_Exception);
+  void setY(::CORBA::Double y) throw (SALOME::SALOME_Exception);
+  void setZ(::CORBA::Double z) throw (SALOME::SALOME_Exception);
+  void setAssociation(GEOM::GEOM_Object_ptr geom_object_vertex) throw (SALOME::SALOME_Exception);
+  GEOM::GEOM_Object_ptr getAssociation() throw (SALOME::SALOME_Exception);
+//   void removeAssociation() throw (SALOME::SALOME_Exception);
+
+  void setScalar( ::CORBA::Double val )throw (SALOME::SALOME_Exception);
+
+  void dump() throw (SALOME::SALOME_Exception);
+  void printName() throw (SALOME::SALOME_Exception);
+
+private:
+  HEXA_NS::Vertex* _vertex_cpp;
+//   GEOM::GEOM_Object_ptr _association;
+};
+
+#endif
diff --git a/src/HEXABLOCK_I/Makefile.am b/src/HEXABLOCK_I/Makefile.am
new file mode 100755 (executable)
index 0000000..0677d34
--- /dev/null
@@ -0,0 +1,87 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  SuperVisionTest AddComponent : example of component that adds two numbers
+# ddDIST_SUBDIRS = Test
+# ddSUBDIRS = Test
+#  File   : Makefile.in
+#  Author : , CEA
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+
+
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+# header files  
+salomeinclude_HEADERS = \
+       HEXABLOCK.hxx \
+       HexDocument_impl.hxx \
+       HexPropagation_impl.hxx \
+       HexQuad_impl.hxx
+
+# Scripts to be installed
+dist_salomescript_PYTHON = hexablock.py
+
+# Libraries targets
+# SD/Propagation/HexPropagation.cxx \
+# SD/Law/HexLaw.cxx \
+#
+lib_LTLIBRARIES = libHEXABLOCKEngine.la
+dist_libHEXABLOCKEngine_la_SOURCES = \
+       HexVertex_impl.cxx \
+       HexEdge_impl.cxx \
+       HexQuad_impl.cxx \
+       HexHexa_impl.cxx \
+       HexVector_impl.cxx \
+       HexElements_impl.cxx \
+       HexCrossElements_impl.cxx \
+       HexCylinder_impl.cxx \
+       HexPipe_impl.cxx \
+       HexPropagation_impl.cxx \
+       HexLaw_impl.cxx \
+       HexGroup_impl.cxx \
+       HexDocument_impl.cxx \
+       HEXABLOCK.cxx
+
+
+libHEXABLOCKEngine_la_CPPFLAGS = \
+       $(CORBA_CXXFLAGS) \
+       $(CORBA_INCLUDES) \
+       $(KERNEL_CXXFLAGS) \
+       $(GEOM_CXXFLAGS) \
+       $(CAS_CPPFLAGS) \
+       -I$(srcdir)/../HEXABLOCK \
+       -I$(top_builddir)/idl \
+       -I$(top_builddir)/salome_adm/unix
+
+libHEXABLOCKEngine_la_LDFLAGS = \
+       ../../idl/libSalomeIDLHEXABLOCK.la \
+       ../HEXABLOCK/libHEXABLOCKimpl.la \
+       $(KERNEL_LDFLAGS) \
+       $(CAS_LDPATH) \
+       -lSalomeContainer \
+       -lOpUtil \
+       -lSalomeIDLKernel \
+        -lGEOMClient
diff --git a/src/HEXABLOCK_I/hexablock.py b/src/HEXABLOCK_I/hexablock.py
new file mode 100755 (executable)
index 0000000..0e16933
--- /dev/null
@@ -0,0 +1,40 @@
+# -*- coding: latin-1 -*-
+
+# Francis KLOSS - 2009-2010 - CEA-Saclay, DEN, DM2S, SFME, LGLS, F-91191 Gif-sur-Yvette, France
+# =============================================================================================
+
+import salome
+from HEXABLOCK_ORB import *
+import smesh
+import HEXABLOCKPlugin
+
+component = salome.lcc.FindOrLoadComponent("FactoryServer", "HEXABLOCK")
+
+component = component._narrow(HEXABLOCK_Gen)
+
+for k in dir(component):
+    if k[0] == '_':
+        continue
+    globals()[k] = getattr(component, k)
+
+del k
+
+def mesh(name, doc, dim=3):
+    geom = smesh.geompy.MakeBox(0, 0, 0,  1, 1, 1)
+    smesh.geompy.addToStudy(geom, name)
+    mesh = smesh.Mesh(geom)
+
+    so = "libHexaBlockEngine.so"
+
+    algo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(smesh.smesh, "HEXABLOCK_3D", so)
+    mesh.mesh.AddHypothesis(geom, algo)
+
+    hypo = smesh.SMESH._objref_SMESH_Gen.CreateHypothesis(smesh.smesh, "HEXABLOCK_Parameters", so)
+    mesh.mesh.AddHypothesis(geom, hypo)
+
+    hypo.SetDocument(doc)
+    hypo.SetDimension(dim)
+
+    mesh.Compute()
+
+    return mesh
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100755 (executable)
index 0000000..2c9660b
--- /dev/null
@@ -0,0 +1,41 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU Lesser General Public
+#  License as published by the Free Software Foundation; either
+#  version 2.1 of the License.
+#
+#  This library is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+#  File   : Makefile.in
+#  Author : (CEA)
+#  Modified by : Alexander BORODIN (OCN) - autotools usage
+#      
+# TEST_CPP
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+DIST_SUBDIRS = HEXABLOCK \
+       HEXABLOCK_I \
+       HEXABLOCKGUI \
+       TEST_CPP \
+       TEST_PY
+
+SUBDIRS = HEXABLOCK \
+       HEXABLOCK_I \
+       HEXABLOCKGUI \
+       TEST_CPP \
+       TEST_PY
+
diff --git a/src/TEST_CPP/HexEdgeTest.cxx b/src/TEST_CPP/HexEdgeTest.cxx
new file mode 100755 (executable)
index 0000000..e689aa1
--- /dev/null
@@ -0,0 +1,51 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include "hexa_base.hxx"
+#include "HexEdge.hxx"
+#include "HexEdgeTest.hxx"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( EdgeTest );
+
+
+EdgeTest::EdgeTest(void)
+{
+  _myHexEngine = new HEXA_NS::Hex();
+  _myDoc= _myHexEngine->addDocument();
+}
+
+EdgeTest::~EdgeTest(void)
+{
+  delete _myDoc;
+  delete _myHexEngine; //CS_TODO : Bug
+}
+
+
+void EdgeTest::TestGetVertex(void)
+{
+  HEXA_NS::Vertex *myVertex0 = NULL;
+  HEXA_NS::Vertex *myVertex1 = NULL;
+
+  // first vertex of the edge
+//   double x0Value = 1.;
+//   double y0Value = 5.;
+//   double z0Value = 3.;
+//   myVertex0 = _myDoc->addVertex( x0Value, y0Value, z0Value );
+  myVertex0 = _myDoc->addVertex( 1., 5., 3. );
+
+  // second vertex of the edge
+  myVertex1 = _myDoc->addVertex( 8., 4., 6.);
+
+  HEXA_NS::Edge *myEdge = _myDoc->addEdge( myVertex0, myVertex1 );
+
+  // Testing first Vertex
+  HEXA_NS::Vertex *docVertex0 = myEdge->getVertex(0);
+  CPPUNIT_ASSERT(  docVertex0->getX() == myVertex0->getX() );
+  CPPUNIT_ASSERT(  docVertex0->getY() == myVertex0->getY() );
+  CPPUNIT_ASSERT(  docVertex0->getZ() == myVertex0->getZ() );
+
+  // Testing second Vertex
+  HEXA_NS::Vertex *docVertex1 = myEdge->getVertex(1);
+  CPPUNIT_ASSERT(  docVertex1->getX() == myVertex1->getX() );
+  CPPUNIT_ASSERT(  docVertex1->getY() == myVertex1->getY() );
+  CPPUNIT_ASSERT(  docVertex1->getZ() == myVertex1->getZ() );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
diff --git a/src/TEST_CPP/HexEdgeTest.hxx b/src/TEST_CPP/HexEdgeTest.hxx
new file mode 100755 (executable)
index 0000000..24bdd48
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __EdgeTest__
+#define __EdgeTest__
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+
+class EdgeTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( EdgeTest );
+  CPPUNIT_TEST( TestGetVertex );
+  CPPUNIT_TEST_SUITE_END();
+  
+  public:
+    EdgeTest(void);
+    ~EdgeTest(void);
+
+    //~ Call before tests
+    void setUp(void) {}
+    //~ Call after tests
+    void tearDown(void) {}
+    void TestGetVertex(void);
+
+  private:
+    HEXA_NS::Hex *_myHexEngine;
+    HEXA_NS::Document *_myDoc;
+
+};
+
+#endif
diff --git a/src/TEST_CPP/HexVertexTest.cxx b/src/TEST_CPP/HexVertexTest.cxx
new file mode 100755 (executable)
index 0000000..5be7cc9
--- /dev/null
@@ -0,0 +1,54 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include "hexa_base.hxx"
+#include "HexVertex.hxx"
+#include "HexVertexTest.hxx"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( VertexTest );
+
+
+VertexTest::VertexTest(void)
+{
+  _myHexEngine = new HEXA_NS::Hex();
+  _myDoc= _myHexEngine->addDocument();
+}
+
+VertexTest::~VertexTest(void)
+{
+  delete _myDoc;
+  delete _myHexEngine; //CS_TODO : Bug
+}
+
+
+void VertexTest::TestGetX(void)
+{
+  double xValue = 1.;
+//   std::cout<<"Hellllllooooooo TestGetX";
+
+//   HEXA_NS::Vertex myVertex( xValue, 8. ,4. );
+  HEXA_NS::Vertex *myVertex = _myDoc->addVertex( xValue, 8. ,4. );
+
+  CPPUNIT_ASSERT(  myVertex->getX() == xValue );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
+
+void VertexTest::TestGetY(void)
+{
+  double yValue = 8.;
+//   HEXA_NS::Vertex myVertex( 1. ,yValue ,4. );
+  HEXA_NS::Vertex *myVertex = _myDoc->addVertex( 1. ,yValue ,4. );
+
+  CPPUNIT_ASSERT(  myVertex->getY() == yValue );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
+
+
+void VertexTest::TestGetZ(void)
+{
+  double zValue = 1.;
+
+//   HEXA_NS::Vertex myVertex( 1. ,8. ,zValue );
+  HEXA_NS::Vertex *myVertex = _myDoc->addVertex( 1. ,8. ,zValue );
+
+  CPPUNIT_ASSERT(  myVertex->getZ() == zValue );
+//     CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT( myClassa.getVar() == testValue ) );
+}
diff --git a/src/TEST_CPP/HexVertexTest.hxx b/src/TEST_CPP/HexVertexTest.hxx
new file mode 100755 (executable)
index 0000000..cd98a0c
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef __VertexTest__
+#define __VertexTest__
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+
+class VertexTest : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( VertexTest );
+  CPPUNIT_TEST( TestGetX );
+  CPPUNIT_TEST( TestGetY );
+  CPPUNIT_TEST( TestGetZ );
+  CPPUNIT_TEST_SUITE_END();
+  
+  public:
+    VertexTest(void);
+    ~VertexTest(void);
+    //~ Call before tests
+    void setUp(void) {}
+    //~ Call after tests
+    void tearDown(void) {}
+    
+    void TestGetX(void);
+    void TestGetY(void);
+    void TestGetZ(void);
+  private:
+    HEXA_NS::Hex *_myHexEngine;
+    HEXA_NS::Document *_myDoc;
+
+};
+
+#endif
diff --git a/src/TEST_CPP/Makefile.am b/src/TEST_CPP/Makefile.am
new file mode 100755 (executable)
index 0000000..d61d187
--- /dev/null
@@ -0,0 +1,183 @@
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+# header files  
+# salomeinclude_HEADERS= ../SD/VertexTest.hxx
+
+# Scripts to be installed
+
+
+#
+# ===============================================================
+# Local definitions
+# ===============================================================
+#
+
+# This directory defines the subdirectory src in the top source directory.
+# RPATH=../..
+RPATH=..
+
+
+# This local variable defines the list of CPPFLAGS common to all target in this package.
+COMMON_CPPFLAGS = \
+       @CPPUNIT_INCLUDES@ \
+       -I$(srcdir)/$(RPATH)/HEXABLOCK/ \
+       -I$(top_builddir)/idl \
+       @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+
+
+# This local variable defines the list of dependant libraries common to all target in this package.
+COMMON_LIBS =\
+       @CPPUNIT_LIBS@ \
+       $(RPATH)/HEXABLOCK/libHEXABLOCKimpl.la \
+       $(KERNEL_LDFLAGS) \
+       -lSalomeGenericObj
+
+# ===============================================================
+# Libraries targets
+#      HexVertexTest.cxx \
+#      HexEdgeTest.cxx \
+# ===============================================================
+lib_LTLIBRARIES = libHEXABLOCKTest.la
+libHEXABLOCKTest_la_SOURCES  = \
+       ModelTest.cxx
+
+libHEXABLOCKTest_la_CPPFLAGS = $(COMMON_CPPFLAGS)
+libHEXABLOCKTest_la_LDFLAGS  = -no-undefined -version-info=0:0:0
+libHEXABLOCKTest_la_LIBADD    = $(COMMON_LIBS)
+
+
+# ===============================================================
+# Executables targets
+# ===============================================================
+bin_PROGRAMS = Test_HEXABLOCK
+Test_HEXABLOCK_SOURCES  = Test_HEXABLOCK.cxx
+Test_HEXABLOCK_CPPFLAGS = $(COMMON_CPPFLAGS)
+Test_HEXABLOCK_LDADD    = \
+       libHEXABLOCKTest.la \
+       ../HEXABLOCK/libHEXABLOCKimpl.la \
+       $(COMMON_LIBS)
+
+UNIT_TEST_PROG = ./Test_HEXABLOCK
+
+
+# bin_PROGRAMS = bielle 
+#      test_hexa1 \
+#      test_cartesi1 \
+#      test_clone \
+#      test_cyl \
+#      test_decoupage \
+#      test_find \
+#      test_gen_xml \
+#      test_joint \
+#      test_propagation \
+#      test_separ \
+#      tuyau
+#      test_lecture
+
+
+# UNIT TEST
+# test_cartesi1_SOURCES  = test_cartesi1.cpp   
+# test_cartesi1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cartesi1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_clone_SOURCES  = test_clone.cpp
+# test_clone_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_clone_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_cyl_SOURCES  = test_cyl.cpp
+# test_cyl_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cyl_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_decoupage_SOURCES  = test_decoupage.cpp
+# test_decoupage_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_decoupage_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_find_SOURCES  = test_find.cpp
+# test_find_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_find_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_gen_xml_SOURCES  = test_gen_xml.cpp
+# test_gen_xml_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_gen_xml_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_joint_SOURCES  = test_joint.cpp
+# test_joint_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_joint_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_lecture_SOURCES  = test_lecture.cpp
+# test_lecture_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_lecture_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_propagation_SOURCES  = test_propagation.cpp
+# test_propagation_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_propagation_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# 
+# test_separ_SOURCES  = test_separ.cpp
+# test_separ_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_separ_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
+# test_hexa1_SOURCES  = test_hexa1.cpp
+# test_hexa1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_hexa1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# UNIT_TEST_PROG = ./test_hexa1
+
+# libHEXATest.la \
+# USER CASE
+# bielle_SOURCES  = bielle.cpp
+# bielle_CPPFLAGS = $(COMMON_CPPFLAGS)
+# bielle_LDADD    = \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# tuyau_SOURCES  = tuyau.cpp
+# tuyau_CPPFLAGS = $(COMMON_CPPFLAGS)
+# tuyau_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
diff --git a/src/TEST_CPP/Makefile.orig.am b/src/TEST_CPP/Makefile.orig.am
new file mode 100755 (executable)
index 0000000..5a34237
--- /dev/null
@@ -0,0 +1,188 @@
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+#
+# header files  
+# salomeinclude_HEADERS= ../SD/VertexTest.hxx
+
+# Scripts to be installed
+
+
+#
+# ===============================================================
+# Local definitions
+# ===============================================================
+#
+
+# This directory defines the subdirectory src in the top source directory.
+# RPATH=../..
+RPATH=..
+
+
+# This local variable defines the list of CPPFLAGS common to all target in this package.
+COMMON_CPPFLAGS = \
+       @CPPUNIT_INCLUDES@ \
+       -I$(srcdir)/$(RPATH)/HEXA/ \
+       -I$(top_builddir)/idl \
+       @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
+
+
+# This local variable defines the list of dependant libraries common to all target in this package.
+COMMON_LIBS =\
+       @CPPUNIT_LIBS@ \
+       $(RPATH)/HEXA/libHEXAimpl.la \
+       $(KERNEL_LDFLAGS) \
+       -lSalomeGenericObj
+
+# ===============================================================
+# Libraries targets
+# ===============================================================
+#      HexVertexTest.cxx \
+#      HexEdgeTest.cxx
+#
+# lib_LTLIBRARIES = libHEXATest.la
+# libHEXATest_la_SOURCES  = \
+#      test_hexa1.cxx
+# 
+# 
+# libHEXATest_la_CPPFLAGS = $(COMMON_CPPFLAGS)
+# libHEXATest_la_LDFLAGS  = -no-undefined -version-info=0:0:0
+# libHEXATest_la_LIBADD    = $(COMMON_LIBS)
+
+#
+# ===============================================================
+# Executables targets
+# ===============================================================
+#
+# bin_PROGRAMS = TestHEXA
+# TestHEXA_SOURCES  = TestHEXA.cxx
+# TestHEXA_CPPFLAGS = $(COMMON_CPPFLAGS)
+# TestHEXA_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# UNIT_TEST_PROG = ./TestHEXA
+# 
+# 
+
+
+bin_PROGRAMS = bielle 
+#      test_hexa1 \
+#      test_cartesi1 \
+#      test_clone \
+#      test_cyl \
+#      test_decoupage \
+#      test_find \
+#      test_gen_xml \
+#      test_joint \
+#      test_propagation \
+#      test_separ \
+#      tuyau
+#      test_lecture
+
+
+# UNIT TEST
+# test_cartesi1_SOURCES  = test_cartesi1.cpp   
+# test_cartesi1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cartesi1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_clone_SOURCES  = test_clone.cpp
+# test_clone_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_clone_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_cyl_SOURCES  = test_cyl.cpp
+# test_cyl_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_cyl_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_decoupage_SOURCES  = test_decoupage.cpp
+# test_decoupage_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_decoupage_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_find_SOURCES  = test_find.cpp
+# test_find_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_find_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_gen_xml_SOURCES  = test_gen_xml.cpp
+# test_gen_xml_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_gen_xml_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# test_joint_SOURCES  = test_joint.cpp
+# test_joint_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_joint_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_lecture_SOURCES  = test_lecture.cpp
+# test_lecture_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_lecture_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+# test_propagation_SOURCES  = test_propagation.cpp
+# test_propagation_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_propagation_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# 
+# test_separ_SOURCES  = test_separ.cpp
+# test_separ_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_separ_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
+# test_hexa1_SOURCES  = test_hexa1.cpp
+# test_hexa1_CPPFLAGS = $(COMMON_CPPFLAGS)
+# test_hexa1_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+# 
+# UNIT_TEST_PROG = ./test_hexa1
+
+# libHEXATest.la \
+# USER CASE
+bielle_SOURCES  = bielle.cpp
+bielle_CPPFLAGS = $(COMMON_CPPFLAGS)
+bielle_LDADD    = \
+       ../HEXA/libHEXAimpl.la \
+       $(COMMON_LIBS)
+
+# tuyau_SOURCES  = tuyau.cpp
+# tuyau_CPPFLAGS = $(COMMON_CPPFLAGS)
+# tuyau_LDADD    = \
+#      libHEXATest.la \
+#      ../HEXA/libHEXAimpl.la \
+#      $(COMMON_LIBS)
+
+
+
diff --git a/src/TEST_CPP/ModelTest.cxx b/src/TEST_CPP/ModelTest.cxx
new file mode 100755 (executable)
index 0000000..0b6898a
--- /dev/null
@@ -0,0 +1,1068 @@
+#include <cppunit/extensions/HelperMacros.h>
+
+
+#include "hexa_base.hxx"
+#include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexElements.hxx"
+#include "HexCrossElements.hxx"
+
+#include "HexHexa.hxx"
+#include "HexQuad.hxx"
+#include "HexEdge.hxx"
+#include "HexVertex.hxx"
+
+#include "HexPropagation.hxx"
+#include "HexShape.hxx"
+#include "HexLaw.hxx"
+#include "HexMatrix.hxx"
+
+#include "ModelTest.hxx"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( ModelTest );
+
+
+ModelTest::ModelTest(void)
+{
+//   _myHexEngine = new HEXA_NS::Hex();
+//   _myDoc= _myHexEngine->addDocument();
+}
+
+ModelTest::~ModelTest(void)
+{
+//   delete _myDoc;
+//   delete _myHexEngine; //CS_TODO : Crash
+}
+
+
+// ======================================================== print_propagations
+void ModelTest::_print_propagations (Hex::Document* doc)
+{
+   int nb = doc->countPropagation ();
+   Display (nb);
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+           Hex::Edge*   edge = table [ned];
+           Hex::Vertex* v0   = edge->getVertex (0);
+           Hex::Vertex* v1   = edge->getVertex (1);
+
+           if (way)
+              {
+              printf ("     (");
+              v0->printName (", ");
+              v1->printName (")\n");
+              }
+          else
+              {
+              v1->printName (", ");
+              v0->printName (")\n");
+              printf ("     (");
+              }
+           }
+       }
+}
+// // ======================================================== Test_sphere
+// void ModelTest::Test_sphere ()
+// {
+//    Hex::Hex mon_ex;
+//    Hex::Document* doc = mon_ex.addDocument ();
+//    Hex::Vertex*  orig = doc->addVertex (0,0,0);
+// 
+//    int    ncouches = 1;
+//    double k = 0.8;
+//    Hex::Vector*   decal  = doc->addVector (1,1,1);
+//    Hex::Elements* sphere = doc->makeSpherical (orig, decal, ncouches, k);
+// 
+//    for (int nc=0 ; nc <= ncouches ; nc++)
+//        {
+//        Hex::Hexa* cell = sphere->getStrate (nc, Hex::Q_A);
+//        cell->remove ();
+//        // sphere->getStrate (nc, Hex::Q_A)->remove ();
+//        // sphere->getStrate (nc, Hex::Q_B)->remove ();
+//        }
+// 
+//    sphere->saveVtk ("sphere.vtk");
+//    CPPUNIT_ASSERT( true );
+// }
+// ======================================================== Test_cartesi1
+void ModelTest::Test_cartesi1 ()
+{
+   
+   const int size_x = 15;
+   const int size_y = 12;
+   const int size_z = 8;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   //  print_propagations (doc);
+
+   for (int nz=0; nz<size_z ; nz++)
+       for (int ny=nz+1; ny<size_y-nz-1 ; ny++)
+           for (int nx=nz+1; nx<size_x-nz-1 ; nx++)
+               {
+               Hex::Hexa* cell = grid->getHexaIJK (nx, ny, nz);
+               cell->remove ();
+               }
+   
+   doc->setLevel (1);
+   _print_propagations (doc);
+   grid->saveVtk ("grid_cart.vtk");
+
+   // doc->dump ();
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== afficher
+#define Afficher(elt) _afficher (#elt, elt)
+int ModelTest::_afficher (cpchar nom, Hex::EltBase* elt)
+{
+   if (elt==NULL)
+      {
+      printf (" .... %s = 0x0\n", nom);
+      return HOK;
+      }
+
+   printf (" .... %s = 0x%08lx = %03d\n", nom, (unsigned long) elt, elt->getId());
+   return HOK;
+}
+// ======================================================== Test_find
+void ModelTest::Test_find ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   grid->saveVtk ("mini1.vtk");
+   doc->dump ();
+
+   Hex::Vertex *v00, *v02, *v06, *v08, *v10, *v22, *v26;
+
+   Afficher ( v00 = doc->findVertex (0, 0, 0));
+   Afficher ( v02 = doc->findVertex (1, 1, 0));
+   Afficher ( v06 = doc->findVertex (1, 1, 1));
+   Afficher ( v08 = doc->findVertex (2, 1, 0));
+   Afficher ( v10 = doc->findVertex (2, 1, 1));
+   Afficher ( v22 = doc->findVertex (2, 1, 2));
+   Afficher ( v26 = doc->findVertex (2, 2, 2));
+
+   printf ("\n");
+
+   Afficher (doc->findEdge (v06, v10));
+   Afficher (doc->findEdge (v10, v06));
+   printf ("\n");
+
+   Afficher (doc->findQuad (v02, v10));
+   Afficher (doc->findQuad (v06, v08));
+   Afficher (doc->findQuad (v02, v06));
+
+   printf ("\n");
+   Afficher (doc->findHexa (v00, v06));
+   Afficher (doc->findHexa (v06, v26));
+   Afficher (doc->findHexa (v26, v06));
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_joint
+void ModelTest::Test_joint ()
+{
+   
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   Hex::Vertex*   orig2 = doc->addVertex  (dimx/2.0,0,8);
+   Hex::Vector*   vectj = doc->addVector (0,1,0);
+   Hex::Vector*   vecti = doc->addVector (1,0,0);
+   Hex::Elements* grid2 = doc->makeCylindrical (orig2, vecti, vectj, 
+                   1, 180, 1,        dimz,dimy,dimx);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quad* cible = grid2->getQuadJK (dimz, mx, my); 
+
+
+   Hex::Vertex* v1 = prems->getVertex (0);
+   Hex::Vertex* v2 = cible->getVertex (0);
+   Hex::Vertex* v3 = prems->getVertex (1);
+   Hex::Vertex* v4 = cible->getVertex (3);
+
+   Hex::Quads liste;
+   Hex::Quads miroir;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   // Hex::Elements* joint = 
+   //
+   doc->joinQuads  (liste, cible, v1, v2, v3, v4, 5);
+   doc->saveVtk ("joint.vtk");
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_prism
+void ModelTest::Test_prism ()
+{
+   
+   const int dimx = 11;
+   const int dimy = 11;
+   const int dimz = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+   Hex::Vector* dir   = doc->addVector (1,1,1);
+
+   Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+
+   int mx = dimx/2;
+   int my = dimy/2;
+   Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+   Hex::Quads liste;
+
+   liste.push_back (prems);
+   for (int nx=0; nx<dimx; nx++)
+       if (nx!=mx) 
+          liste.push_back (grid1->getQuadIJ (nx, my, dimz)); 
+
+   for (int ny=0; ny<dimy; ny++)
+       if (ny!=my) 
+          liste.push_back (grid1->getQuadIJ (mx, ny, dimz)); 
+
+   doc->prismQuads  (liste, dir, 5);
+   doc->saveVtk ("prisme.vtk");
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+// ======================================================== Test_prism2
+void ModelTest::Test_prism2 ()
+{
+    
+    const int dimx = 11;
+    const int dimy = 11;
+    const int dimz = 2;
+    
+    Hex::Hex mon_ex;
+    Hex::Document* doc = mon_ex.addDocument ();
+    
+    Hex::Vertex* orig1 = doc->addVertex (0,0,0);
+    Hex::Vector* dir   = doc->addVector (1,1,1);
+    
+    Hex::Elements* grid1 = doc->makeCartesian   (orig1, dir, dimx,dimy,dimz);
+    
+    int mx = dimx/2;
+    int my = dimy/2;
+    Hex::Quad* prems = grid1->getQuadIJ (mx, my, dimz); 
+    Hex::Elements*  prism = doc->prismQuad(prems, dir, 5);
+
+    int nbHexa = prism->countHexa();
+    std::cout << "nbHexa " << nbHexa << std::endl;
+    Hex::Hexa*     hp1 = prism->getHexa(1);
+    std::cout << "getHexa(1) " << hp1 << std::endl;
+    Hex::Vertex*   hp1_v0 = hp1->getVertex(0);
+    std::cout << "getVertex ->" << hp1_v0 << std::endl;
+    Hex::Shape* s = new Hex::Shape("la shape");
+    std::cout << "new Hex::Shape->" << s << std::endl;
+    hp1_v0->setAssociation(s);
+    std::cout <<  "setAssociation ->" << std::endl;
+    doc->saveVtk ("prisme2.vtk");
+
+    CPPUNIT_ASSERT( true );
+}
+
+
+
+
+
+
+
+
+// ======================================================== Test_hexa1
+void ModelTest::Test_hexa1 ()
+{
+   
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->dump ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_decoupage
+void ModelTest::Test_decoupage ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+
+   Hex::Elements* grid  = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+   Hex::Edge*     arete = grid->getEdgeK (0, 0, 0);
+
+   doc ->dump ();
+   doc ->saveVtk ("no_decoupe.vtk");
+/* Hex::Elements* grid2 = */  doc->cut (arete, 1);
+
+   doc ->dump ();
+   doc ->saveVtk ("decoupe.vtk");
+   // doc ->saveFile ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_gen_xml
+void ModelTest::Test_gen_xml ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Hexa*   cell    = grid->getHexa (0);
+   Hex::Quad*   face    = cell->getQuad (0);
+   Hex::Edge*   arete   = cell->getEdge (0);
+   Hex::Vertex* noeud   = cell->getVertex (0);
+
+   Hex::Shape* shape1 = new Hex::Shape("riri");
+   Hex::Shape* shape2 = new Hex::Shape("fifi");
+   Hex::Shape* shape3 = new Hex::Shape("loulou");
+
+   noeud->setAssociation (shape1);
+   arete->setAssociation (shape2);
+   face ->setAssociation (shape3);
+
+   Hex::Law* law1 = doc->addLaw("loi1", 1);
+   Hex::Law* law2 = doc->addLaw("loi2", 2);
+   Hex::Law* law3 = doc->addLaw("loi3", 3);
+
+   law1->setKind (Hex::Uniform);
+   law2->setKind (Hex::Arithmetic);
+   law3->setKind (Hex::Geometric);
+
+   Hex::Propagation* prop1 = doc->getPropagation (0);
+   Hex::Propagation* prop2 = doc->getPropagation (1);
+   Hex::Propagation* prop3 = doc->getPropagation (2);
+
+   prop1->setLaw (law1);
+   prop2->setLaw (law2);
+   prop3->setLaw (law3);
+
+   prop1->setWay (true);
+   prop2->setWay (false);
+   prop3->setWay (true);
+
+   doc ->saveVtk ("mini.vtk");
+   doc ->setFile ("Essai");
+   doc ->saveFile ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_relecture
+void ModelTest::Test_relecture ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.loadDocument ("Essai");
+
+   doc ->dump ();
+   doc ->saveVtk ("restore.vtk");
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_clone
+void ModelTest::Test_clone ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   bond  = doc->addVector (0, 0, 7);
+   Hex::Elements* grid2 = doc->makeTranslation (grid, bond);
+
+   doc ->saveVtk ("clonage.vtk");
+   doc ->dump();
+
+   HexDump (grid2->getHexa      (1));
+   HexDump (grid2->getHexaIJK   (1,1,1));
+   HexDump (grid2->getVertexIJK (1,1,1));
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_separ
+void ModelTest::Test_separ ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   //  Hex::Elements*  grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   doc ->saveVtk ("separ.vtk");
+   doc ->dump();
+
+   CPPUNIT_ASSERT( true );
+}
+// // ======================================================== Test_cyl_karima
+// void ModelTest::Test_cyl_karima ()
+// {
+//    
+//    Hex::Hex mon_ex;
+//    Hex::Document* doc = mon_ex.addDocument ();
+// 
+//    Hex::Vertex* c2 = doc->addVertex (0,0,0);
+//    Hex::Vector* dz = doc->addVector (0,0,1);
+//    Hex::Vector* dx = doc->addVector (1,0,0);
+// 
+//    double dr = 4.12;
+// 
+//    double a2 = 180;
+//    int    l2 = 70;
+// 
+//    int nr2 = 5;
+//    int na2 = 5;
+//    int nl2 = 1;
+// 
+// /* Hex::Elements* cyl2 = */ doc->makeCylindrical (c2, dx, dz, dr, a2, l2, 
+//                                                   nr2, na2, nl2, false );
+//    doc->saveVtk ("cyl_karima.vtk");
+//    // doc->dump ();
+// 
+//    CPPUNIT_ASSERT( true );
+// }
+// ================================================== Test_grille_cyl
+void ModelTest::Test_grille_cyl ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex ( 0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (10, 0,0);
+
+   Hex::Vertex* orig3 = doc->addVertex ( 0,10,0);
+   Hex::Vertex* orig4 = doc->addVertex (10,10,0);
+
+   Hex::Vertex* orig5 = doc->addVertex ( 0,20,0);
+   Hex::Vertex* orig6 = doc->addVertex (10,20,0);
+
+   Hex::Vector* vz = doc->addVector (0,0,1);
+   Hex::Vector* vx = doc->addVector (1,0,0);
+
+   double dr = 1;
+   double dl = 1;
+   int    nr = 2;
+   int    nl = 5;
+   nl = 1;
+
+   doc->makeCylindrical(orig1,vx,vz,dr, 360, dl,nr,4,nl, true);
+   doc->makeCylindrical(orig2,vx,vz,dr, 360, dl,nr,8,nl, true);
+   doc->makeCylindrical(orig3,vx,vz,dr, 270, dl,nr,8,nl, true);
+   doc->makeCylindrical(orig6,vx,vz,dr, 360, dl,nr,6,nl, true);
+   doc->makeCylindrical(orig4,vx,vz,dr, 270, dl,nr,7,nl, true);
+   doc->makeCylindrical(orig5,vx,vz,dr, 360, dl,nr,5,nl, true);
+   doc->saveVtk ("cylindres.vtk");
+   // doc->dump ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ===================================================== Test_cylinder
+void ModelTest::Test_cylinder ()
+{
+   
+   int    nvtk    = 0;
+   cpchar fic_vtk = "cylindre";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0, 0,0);
+   Hex::Vertex* orig2 = doc->addVertex (50,0,0);
+   Hex::Vector* vz    = doc->addVector (0,0,1);
+   Hex::Vector* vx    = doc->addVector (1,0,0);
+
+   int nr  = 4;
+   int nri = 3;
+   int nre = nr;
+   int na = 9;
+   int nl = 5;
+
+   Hex::Cylinder* cyl  = doc->addCylinder   (orig1, vz, nr, nl);
+   Hex::Pipe*     pipe = doc->addPipe       (orig2, vz, nri, nre, nl);
+
+   doc->makeCylinder (cyl,  vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   doc->makePipe     (pipe, vx, nr, na, nl);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+
+void ModelTest::myTest_croix ()
+{
+  Hex::Hex mon_ex;
+  Hex::Document* doc = mon_ex.addDocument ();
+
+
+//   Hex::Vector* dx1 = doc->addVector( -1, 0, 0 );
+//   Hex::Vector* dz1 = doc->addVector( 0, 0, 1 );
+//   
+//   Hex::Vertex* c_pte_1 = doc->addVertex ( 195., 0., 220. );
+//   Hex::Vertex* c_grd_1 = doc->addVertex ( 300., 0., 400. );
+//   Hex::Cylinder* cyl_pte_1 = doc->addCylinder( c_pte_1 , dz1 , 25 , 360 );
+//   Hex::Cylinder* cyl_grd_1 = doc->addCylinder( c_grd_1 , dx1 , 50 , 140 );
+//   Hex::CrossElements* cross1 = doc->makeCylinders( cyl_pte_1 , cyl_grd_1 );
+
+  Hex::Vector* dx2 = doc->addVector(-1, 0, 0 );
+  Hex::Vector* dz2 = doc->addVector( 0, 0, 1 );
+  
+  Hex::Vertex* c_pte_2 = doc->addVertex( 110., 0. , 400. );
+  Hex::Vertex* c_grd_2 = doc->addVertex( 0.  , 0. , 0. );
+
+  Hex::Cylinder* cyl_pte_2 = doc->addCylinder( c_pte_2 , dx2 , 50, 220 );
+  Hex::Cylinder* cyl_grd_2 = doc->addCylinder( c_grd_2 , dz2 , 100, 800 );
+  Hex::CrossElements* cross2    = doc->makeCylinders( cyl_pte_2, cyl_grd_2 );
+
+
+/*
+  Hex::Vector* dx2 = doc->addVector( 1, 0, 0 );
+  Hex::Vector* dz2 = doc->addVector( 0, 0, 1 );
+
+  Hex::Vertex* c_pte_2 = doc->addVertex( -130. , 0. , 400. );
+  Hex::Vertex* c_grd_2 = doc->addVertex( 0. , 0. , 0. );
+
+  Hex::Cylinder* cyl_pte_2 = doc->addCylinder( c_pte_2 , dx2 , 50, 260 );
+  Hex::Cylinder* cyl_grd_2 = doc->addCylinder( c_grd_2 , dz2 , 100, 800 );
+
+  Hex::CrossElements* cross2 = doc->makeCylinders( cyl_pte_2, cyl_grd_2 );*/
+  doc->saveVtk ("/tmp/ffffffff.vtk");
+  doc->dump ();
+
+  CPPUNIT_ASSERT( true );
+}
+
+
+
+
+// ======================================================== Test_croix
+void ModelTest::Test_croix ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nr1 = 2;
+   int nl1 = 10;
+   int nr2 = 1;
+   int nl2 = 10;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, nr1, nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, nr2, nl2);
+   Hex::CrossElements* grid = doc->makeCylinders (cyl1, cyl2);
+
+   grid->dump();
+   grid->dumpVertex();
+
+#if 0
+   for (int ny=0; ny<Hex::S_MAXI; ny++)
+       {
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 0)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 1)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 3)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 4)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 1, ny, 5)->remove ();
+
+       grid->getHexaIJK (Hex::Cyl2, 1, ny, 0)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 1, ny, 1)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 1, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl2, 1, ny, 3)->remove ();
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       {
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 0)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 1)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 2)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 3)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 4)->remove ();
+       grid->getHexaIJK (Hex::Cyl1, 0, ny, 5)->remove ();
+
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 0)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 1)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 2)->remove ();
+       // grid->getHexaIJK (Hex::Cyl2, 0, ny, 3)->remove ();
+       }
+
+   /*********************************
+   grid->getHexaIJK (Hex::Cyl2, 0, 3, 1)->remove ();
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SE, 2)->remove ();
+   grid->getHexaIJK (Hex::Cyl2, 1, Hex::S_SE, 1)->remove ();
+
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 3)->remove ();
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 2)->remove ();
+   grid->getHexaIJK (Hex::Cyl1, 1, Hex::S_SE, 1)->remove ();
+    ********************************* */
+#endif
+
+   doc->saveVtk ("croix.vtk");
+   doc->dump ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_pipes
+void ModelTest::Test_pipes ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   double h1  = 10, h2  = 10;
+   double ri1 = 1,  ri2 = 1.5;
+   double re1 = 2,  re2 = 3;
+
+   Hex::Pipe* pipe1  = doc->addPipe (ori1, vz, ri1, re1, h1);
+   Hex::Pipe* pipe2  = doc->addPipe (ori2, vx, ri2, re2, h2);
+   Hex::CrossElements* grid = doc->makePipes (pipe1, pipe2);
+
+   grid->dump();
+   grid->dumpVertex();
+
+   doc->saveVtk ("pipes.vtk");
+   doc->dump ();
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_lorraine
+void ModelTest::Test_lorraine()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* ori1 = doc->addVertex ( 0,0,0);
+   Hex::Vertex* ori2 = doc->addVertex (-5,0,5);
+   Hex::Vertex* ori3 = doc->addVertex ( 0,0,12);
+   Hex::Vertex* ori4 = doc->addVertex (-5,0,17);
+
+   Hex::Vector* vz   = doc->addVector ( 0,0,1);
+   Hex::Vector* vx   = doc->addVector ( 1,0,0);
+
+   int nl1 = 10;
+   int nl2 = 10;
+
+   double rsmall = 1;
+   double rmoy   = 2;
+   double rbig   = 3;
+
+   Hex::Cylinder* cyl1  = doc->addCylinder (ori1, vz, rmoy,   nl1);
+   Hex::Cylinder* cyl2  = doc->addCylinder (ori2, vx, rsmall, nl2);
+
+   Hex::Cylinder* cyl3  = doc->addCylinder (ori3, vz, rmoy, nl1);
+   Hex::Cylinder* cyl4  = doc->addCylinder (ori4, vx, rbig, nl2);
+
+   Hex::CrossElements* grid1 = doc->makeCylinders (cyl1, cyl2);
+   Hex::CrossElements* grid2 = doc->makeCylinders (cyl4, cyl3);
+
+#define Imprimer(x) printf (#x " = ") ; if (x) x->dump() ; else printf ("NULL\n")
+   const int nx_int = 0;
+   const int nx_ext = 1;
+
+   //           vc2 = grid1->getVertexIJK (Hex::Cyl2, 0,0,0);
+   //           vc3 = grid2->getVertexIJK (Hex::Cyl1, 0,0,0);
+                                     //    Cyl     i     j     k
+   Hex::Quad* qb = grid1-> getQuadIJ (Hex::Cyl2, nx_ext, Hex::S_E, 4);
+   Hex::Quad* qh = grid2-> getQuadIJ (Hex::Cyl1, nx_ext, Hex::S_N, 0); 
+
+   Hex::Vertex* vb0 = qb->getVertex (3);
+   Hex::Vertex* vb1 = qb->getVertex (2);
+   Hex::Vertex* vh0 = qh->getVertex (0);
+   Hex::Vertex* vh1 = qh->getVertex (1);
+
+   vb0 = grid1->getVertexIJK (Hex::Cyl2, 2, Hex::S_E,  4);  // cible
+   vb1 = grid1->getVertexIJK (Hex::Cyl2, 2, Hex::S_NE, 4);
+   vh0 = grid2->getVertexIJK (Hex::Cyl1, 2, Hex::S_N,  0);   // depart
+   vh1 = grid2->getVertexIJK (Hex::Cyl1, 2, Hex::S_NW, 0);
+
+   Imprimer (vh0);
+   Imprimer (vh1);
+   Imprimer (vb0);
+   Imprimer (vb1);
+
+   // qb->remove ();
+   // qh->remove ();
+   Hex::Quads hliste;
+
+   hliste.push_back (qh);
+   for (int ny=1; ny<Hex::S_MAXI; ny++)
+       {
+       int ns = (ny + Hex::S_N) MODULO Hex::S_MAXI;
+       hliste.push_back (grid2->getQuadIJ (Hex::Cyl1, nx_ext, ns, 0)); 
+       }
+
+   for (int ny=0; ny<4 ;  ny++)
+       hliste.push_back (grid2->getQuadIJ (Hex::Cyl1, nx_int, ny, 0)); 
+
+   doc->joinQuads  (hliste, qb, vh0, vb0, vh1, vb1, 5);
+   doc->saveVtk ("lorraine.vtk");
+   // doc->dump ();
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_disconnect
+void ModelTest::Test_disconnect ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 2;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig1 = doc->addVertex (0,0,0);
+   Hex::Vertex*   orig2 = doc->addVertex (4,0,0);
+   Hex::Vertex*   orig3 = doc->addVertex (8,0,0);
+
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid1 = doc->makeCartesian (orig1, dir, size_x,size_y,size_z);
+   Hex::Elements* grid2 = doc->makeCartesian (orig2, dir, size_x,size_y,size_z);
+   Hex::Elements* grid3 = doc->makeCartesian (orig3, dir, size_x,size_y,size_z);
+
+   int nvtk = 0;
+   doc->setLevel (1);
+   Hex::Matrix  matrice;
+   Hex::Vector* ecart  = doc->addVector (0.5,0.5,0);
+   matrice.defTranslation (ecart);
+
+   Hex::Hexa* hexa1 = grid1->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa2 = grid2->getHexaIJK (1,1,0);
+   Hex::Hexa* hexa3 = grid3->getHexaIJK   (1,1,0);
+
+   Hex::Quad* quad  = grid1->getQuadJK  (1,1,0);
+   Hex::Edge* edge  = grid2->getEdgeK   (1,2,0);
+   Hex::Vertex* vertex = grid3->getVertexIJK (1,1,1);
+
+   quad->setScalar   (5);
+   edge->setScalar   (5);
+   vertex->setScalar (5);
+
+   doc->saveVtk ("Test_disco", nvtk);
+   doc->disconnectQuad (hexa1, quad);
+
+   hexa1 ->transform (&matrice);
+   doc->saveVtk ("Test_disco", nvtk);
+
+   doc->disconnectEdge (hexa2, edge);
+
+   hexa2->transform (&matrice);
+   doc->saveVtk ("Test_disco", nvtk);
+
+   doc->disconnectVertex (hexa3, vertex);
+
+   hexa3->transform (&matrice);
+   doc->saveVtk ("Test_disco", nvtk);
+
+   doc->dumpPropagation ();
+   // doc->dump  ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_propagation
+void ModelTest::Test_propagation ()
+{
+   
+   const int size_x = 2;
+   const int size_y = 1;
+   const int size_z = 1;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex*   orig = doc->addVertex (0,0,0);
+   Hex::Vector*   dir  = doc->addVector (1,1,1);
+   //  Hex::Elements* grid = 
+   doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   int nb = doc->countPropagation ();
+   for (int nro=0 ; nro<nb ; nro++)
+       {
+       Hex::Propagation*  prop  = doc ->getPropagation (nro);
+       const Hex::Edges&  table = prop->getEdges ();
+       printf (" ____________________________________ Prop nro %d\n", nro);
+       for (int ned=0 ; ned<(int)table.size() ; ned++)
+           {
+           bool way = table [ned]->getWay ();
+
+           if (way)
+              {
+              printf ("     (");
+              table [ned]->getVertex (0)->printName (", ");
+              table [ned]->getVertex (1)->printName (")\n");
+              }
+          else
+              {
+              printf ("     (");
+              table [ned]->getVertex (1)->printName (", ");
+              table [ned]->getVertex (0)->printName (")\n");
+              }
+           }
+       }
+
+   doc->dump  ();
+   doc->saveVtk ("Test_propagation.vtk");
+   doc->setFile ("Test_propagation");
+   doc->saveFile ();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_move
+void ModelTest::Test_move ()
+{
+   
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements*  grid = doc->makeCartesian (orig, dir, size_x,size_y,size_z);
+
+   Hex::Vector*   enhaut  = doc->addVector (0, 0, 5);
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+   // Hex::Vector*   agauche = doc->addVector (0, 5, 0);
+
+   Hex::Matrix matrice;
+   matrice.defTranslation (enhaut);
+
+   Hex::Hexa* cube    = grid->getHexa (1);
+   Hex::Quad* dessous = cube->getQuad (Hex::Q_A);
+   dessous->dump();
+   
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   /* Hex::Elements* grid3 = doc->makeTranslation (grid, agauche); */
+   Hex::Hexa* cube2     = grid2->getHexa (1);
+
+   doc ->saveVtk ("move0.vtk");
+
+   cube ->disconnectQuad (dessous);
+   cube ->transform (&matrice);
+   cube2->transform (&matrice);
+
+   doc ->saveVtk ("move1.vtk");
+   doc ->dump();
+
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_deux_cyl
+void ModelTest::Test_deux_cyl ()
+{
+   
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+
+   Hex::Vertex* orig1 = doc->addVertex (0,0,-5);
+   Hex::Vertex* orig2 = doc->addVertex (-5,0,0);
+
+   Hex::Vector* vx = doc->addVector (1,0,0);
+   Hex::Vector* vy = doc->addVector (0,1,0);
+   Hex::Vector* vz = doc->addVector (0,0,1);
+
+   double dr = 1;
+   double da = 360; // degres
+   double dl = 1.0;
+   int    nr = 2;
+   int    na = 6;
+   int    nl = 10;
+
+   /* Hex::Elements* cyl1 = */ doc->makeCylindrical(orig1, vy,vz, dr, da, 
+                                       dl,nr,na,nl);
+
+   /* Hex::Elements* cyl2 = */ doc->makeCylindrical(orig2, vz,vx, dr/2, da, 
+                                       dl,nr,na,nl);
+   doc->saveVtk ("deux_cylindres.vtk");
+   CPPUNIT_ASSERT( true );
+}
+// ======================================================== Test_move2
+void ModelTest::Test_transfo ()
+{
+   
+   const int size_x = 1;
+   const int size_y = 1;
+   const int size_z = 2;
+
+   int    nvtk    = 0;
+   cpchar fic_vtk = "transfo";
+
+   Hex::Hex mon_ex;
+   Hex::Document* doc = mon_ex.addDocument ();
+   doc ->setLevel (1);
+
+   Hex::Vertex* orig = doc->addVertex (0,0,0);
+   Hex::Vector* dir  = doc->addVector (1,1,1);
+   Hex::Elements* grid = doc->makeCartesian (orig, dir, size_x, size_y,
+                                                        size_z);
+   if (grid==NULL)
+      CPPUNIT_ASSERT( false );
+
+   orig->setScalar(2);
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector*   devant  = doc->addVector (5, 0, 0);
+
+   Hex::Elements* grid2 = doc->makeTranslation (grid, devant);
+   if (grid2==NULL)
+      CPPUNIT_ASSERT( false );
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid3  = doc->makeScale (grid2, orig, 2);
+   if (grid3==NULL)
+      CPPUNIT_ASSERT( false );
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid4 = doc->makeRotation (grid2, orig, dir, 45);
+   if (grid4==NULL)
+      CPPUNIT_ASSERT( false );
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Elements* grid5 = doc->makeSymmetryPoint (grid4, orig);
+   if (grid5==NULL)
+      CPPUNIT_ASSERT( false );
+
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   Hex::Vector* dir1  = doc->addVector (1,0,0);
+   Hex::Elements* grid6 = doc->makeSymmetryLine (grid4, orig, dir1);
+   if (grid6==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(3);
+   grid6->getHexa(0)->getVertex(0)->setScalar(3);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid4->getHexa(0)->getVertex(0)->setScalar(0);
+   grid6->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid7 = doc->makeSymmetryLine (grid2, orig, dir1);
+   if (grid7==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid7->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid7->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid8 = doc->makeSymmetryPlane (grid2, orig, dir1);
+   if (grid8==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid2->getHexa(0)->getVertex(0)->setScalar(4);
+   grid8->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+   grid2->getHexa(0)->getVertex(0)->setScalar(0);
+   grid8->getHexa(0)->getVertex(0)->setScalar(0);
+
+   Hex::Elements* grid9 = doc->makeSymmetryPlane (grid3, orig, dir);
+   if (grid9==NULL)
+      CPPUNIT_ASSERT( false );
+
+   grid3->getHexa(0)->getVertex(0)->setScalar(4);
+   grid9->getHexa(0)->getVertex(0)->setScalar(4);
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   grid9->getHexa(0)->removeConnected ();
+   doc ->saveVtk (fic_vtk, nvtk);
+
+   CPPUNIT_ASSERT( true );
+}
+
+
+
+
+
diff --git a/src/TEST_CPP/ModelTest.hxx b/src/TEST_CPP/ModelTest.hxx
new file mode 100755 (executable)
index 0000000..ef87d18
--- /dev/null
@@ -0,0 +1,83 @@
+#ifndef __ModelTest__
+#define __ModelTest__
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "hexa_base.hxx"
+// #include "Hex.hxx"
+#include "HexDocument.hxx"
+#include "HexEltBase.hxx"
+
+class ModelTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( ModelTest );
+    CPPUNIT_TEST( myTest_croix);
+    CPPUNIT_TEST( Test_croix);
+    CPPUNIT_TEST( Test_disconnect);
+    CPPUNIT_TEST( Test_joint);
+    CPPUNIT_TEST( Test_prism);
+    CPPUNIT_TEST( Test_cylinder);
+    CPPUNIT_TEST( Test_find);
+    CPPUNIT_TEST( Test_lorraine);
+    CPPUNIT_TEST( Test_propagation);
+    CPPUNIT_TEST( Test_cartesi1);
+    CPPUNIT_TEST( Test_decoupage);
+    CPPUNIT_TEST( Test_grille_cyl);
+    CPPUNIT_TEST( Test_pipes);
+    CPPUNIT_TEST( Test_separ);
+    CPPUNIT_TEST( Test_clone);
+    CPPUNIT_TEST( Test_deux_cyl);
+    CPPUNIT_TEST( Test_hexa1);
+    CPPUNIT_TEST( Test_prism2);
+    CPPUNIT_TEST( Test_transfo);
+    CPPUNIT_TEST( Test_hexa1);
+    CPPUNIT_TEST( Test_move);
+    CPPUNIT_TEST( Test_gen_xml);
+    CPPUNIT_TEST( Test_relecture);
+    CPPUNIT_TEST_SUITE_END();
+  
+  public:
+    ModelTest(void);
+    ~ModelTest(void);
+    //~ Call before tests
+    void setUp(void) {}
+    //~ Call after tests
+    void tearDown(void) {}
+
+//     void Test_bielle();
+    void myTest_croix();
+    void Test_croix();
+    void Test_disconnect();
+    void Test_joint();
+    void Test_prism();
+//     void Test_bride();
+    void Test_cylinder();
+    void Test_find();
+    void Test_lorraine();
+    void Test_propagation();
+//     void Test_bug1();
+//     void Test_debride();
+    void Test_gen_xml();
+    void Test_move();
+    void Test_relecture();
+    void Test_cartesi1();
+    void Test_decoupage();
+    void Test_grille_cyl();
+    void Test_pipes();
+    void Test_separ();
+    void Test_clone();
+    void Test_deux_cyl();
+    void Test_hexa1();
+    void Test_prism2();
+    void Test_transfo();
+
+  private:
+    int _afficher (cpchar nom, Hex::EltBase* elt);
+    void _print_propagations (Hex::Document* doc);
+//     HEXA_NS::Hex *_myHexEngine;
+//     HEXA_NS::Document *_myDoc;
+
+};
+
+#endif
diff --git a/src/TEST_CPP/Test_HEXABLOCK.cxx b/src/TEST_CPP/Test_HEXABLOCK.cxx
new file mode 100755 (executable)
index 0000000..7a9d507
--- /dev/null
@@ -0,0 +1,47 @@
+#include <cppunit/BriefTestProgressListener.h>
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/TestResult.h>
+#include <cppunit/TestResultCollector.h>
+#include <cppunit/TestRunner.h>
+#include <cppunit/XmlOutputter.h>
+
+int main(int argc, char* argv[])
+{
+       // Retrieve test path from command line first argument. Default to "" which resolve
+       // to the top level suite.
+       std::string testPath = (argc > 1) ? std::string(argv[1]) : std::string("");
+       
+       // Create the event manager and test controller
+       CPPUNIT_NS::TestResult controller;
+       
+       // Add a listener that collects test result
+       CPPUNIT_NS::TestResultCollector result;
+       
+       controller.addListener( &result );
+       
+       // Add a listener that print dots as test run.
+       CPPUNIT_NS::BriefTestProgressListener progress;
+       
+       controller.addListener( &progress );
+       
+       // Add the top suite to the test runner
+       CPPUNIT_NS::TestRunner runner;
+       runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
+       runner.run( controller );
+       
+       // Print test in a compiler compatible format.
+       CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
+       outputter.write();
+       
+       // Uncomment this for XML output
+       std::ofstream file( "cppunit-report.xml" );
+       
+       CPPUNIT_NS::XmlOutputter xml( &result, file );
+       
+       xml.write();
+       
+       file.close();
+       
+       return result.wasSuccessful() ? 0 : 1;
+}
\ No newline at end of file
diff --git a/src/TEST_PY/BIELLE.py b/src/TEST_PY/BIELLE.py
new file mode 100755 (executable)
index 0000000..b9cd4da
--- /dev/null
@@ -0,0 +1,976 @@
+# -*- coding: latin-1 -*-\r
+\r
+#===============================================\r
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS \r
+#===============================================\r
+\r
+\r
+import os\r
+import GEOM\r
+import geompy\r
+import smesh\r
+import hexablock\r
+import math\r
+import SALOMEDS\r
+\r
+\r
+STEP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/crank.stp")\r
+\r
+\r
+#=============================\r
+# CREATION DOCUMENT\r
+#=============================\r
+\r
+doc = hexablock.addDocument()\r
+\r
+#=============================\r
+# CREATION DU MODELE\r
+#=============================\r
+\r
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres\r
+\r
+#=============================\r
+# PARAMETRES\r
+#=============================\r
+\r
+R = 40.0\r
+\r
+r_grd = R\r
+r_grd_t = R/2\r
+\r
+r_pte = R\r
+r_pte_t = R/2\r
+\r
+l = 200.0\r
+h = 0.019999999553*2\r
+#h = 40.\r
+\r
+# Taille du grand cylindre\r
+dr_grd = R\r
+da_grd = 360\r
+dl_grd = h\r
+\r
+nr_grd = 1\r
+na_grd = 6\r
+nl_grd = 1\r
+\r
+# Taille du petit cylindre\r
+dr_pte = R\r
+da_pte = 360\r
+dl_pte = h\r
+\r
+nr_pte = 1\r
+na_pte = 6\r
+nl_pte = 1\r
+\r
+\r
+#=============================\r
+# Creation des vecteurs\r
+#=============================\r
+\r
+dx = doc.addVector(l, 0, 0)\r
+dy = doc.addVector(0, l, 0)\r
+dz = doc.addVector(0, 0, l)\r
+\r
+#=================================================\r
+# Creation des centres des grilles cylindriques\r
+#=================================================\r
+\r
+c_grd = doc.addVertex(0, 0, 0)\r
+c_pte = doc.addVertex(2*l, 0, 0)\r
+dx_prime = doc.addVectorVertices( c_grd, c_pte )\r
+\r
+#=================================================\r
+# Creation de la grande grille cylindrique\r
+#=================================================\r
+\r
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)\r
+\r
+# on obtient une liste qui contient 6 hexaedres eguaux\r
+\r
+# 30 = pi/6\r
+# 60 = pi/3\r
+# 45 = pi/4\r
+# 90 = pi/2\r
+# 180 = pi\r
+\r
+alpha_x = 2*R*math.cos(math.pi/3)\r
+alpha_y = 2*R*math.sin(math.pi/3)\r
+\r
+x1 = doc.findVertex( 2*R, 0, h )\r
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )\r
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )\r
+x4 = doc.findVertex( 2*R, 0, 0 )\r
+\r
+quad_11 = doc.findQuad(x1, x2)\r
+quad_12 = doc.findQuad(x1, x3)\r
+\r
+quad_list = [ quad_11 , quad_12 ]\r
+\r
+#=================================================\r
+# Creation de la petite grille cylindrique\r
+#=================================================\r
+\r
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )\r
+\r
+# on obtient une liste qui contient 6 hexaedres eguaux\r
+\r
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )\r
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )\r
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )\r
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )\r
+\r
+quad_21 = doc.findQuad(y1, y2)\r
+quad_22 = doc.findQuad(y1, y3)\r
+\r
+#=================================================\r
+# Assemblage des deux grilles cylindriques\r
+#=================================================\r
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )\r
+\r
+\r
+#===================================================================\r
+# Recuperation des vertex du model hexa bielle pour l association\r
+#===================================================================\r
+\r
+# NB:\r
+# h = haut\r
+# b = bas\r
+# g = grand\r
+# p = petit\r
+# t = trou\r
+\r
+alpha_x = 2*R*math.cos(math.pi/3)\r
+alpha_y = 2*R*math.sin(math.pi/3)\r
+\r
+# Face du haut grand trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )\r
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )\r
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )\r
+\r
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )\r
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )\r
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )\r
+\r
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )\r
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )\r
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )\r
+\r
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )\r
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )\r
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )\r
+\r
+\r
+assert x_mod_h_g\r
+assert y_mod_h_g\r
+assert z_mod_h_g\r
+\r
+assert u_mod_h_g\r
+assert v_mod_h_g\r
+assert w_mod_h_g\r
+\r
+assert x_mod_h_g_t\r
+assert y_mod_h_g_t\r
+assert z_mod_h_g_t\r
+\r
+assert u_mod_h_g_t\r
+assert v_mod_h_g_t\r
+assert w_mod_h_g_t #\r
+\r
+\r
+# Face du haut petit trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )\r
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )\r
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )\r
+\r
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )\r
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )\r
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )\r
+\r
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )\r
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )\r
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )\r
+\r
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )\r
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )\r
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )\r
+\r
+\r
+assert x_mod_h_p\r
+assert y_mod_h_p\r
+assert z_mod_h_p\r
+\r
+assert u_mod_h_p\r
+assert v_mod_h_p\r
+assert w_mod_h_p\r
+\r
+assert x_mod_h_p_t\r
+assert y_mod_h_p_t\r
+assert z_mod_h_p_t\r
+\r
+assert u_mod_h_p_t\r
+assert v_mod_h_p_t\r
+assert w_mod_h_p_t\r
+#-----------\r
+\r
+# Face du bas grand trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )\r
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )\r
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )\r
+\r
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )\r
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )\r
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )\r
+\r
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )\r
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )\r
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )\r
+\r
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )\r
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )\r
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )\r
+\r
+assert x_mod_b_g\r
+assert y_mod_b_g\r
+assert z_mod_b_g\r
+\r
+assert u_mod_b_g\r
+assert v_mod_b_g\r
+assert w_mod_b_g\r
+\r
+assert x_mod_b_g_t\r
+assert y_mod_b_g_t\r
+assert z_mod_b_g_t\r
+\r
+assert u_mod_b_g_t\r
+assert v_mod_b_g_t\r
+assert w_mod_b_g_t\r
+\r
+\r
+# Face du bas petit trou\r
+\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )\r
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )\r
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )\r
+\r
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )\r
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )\r
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )\r
+\r
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )\r
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )\r
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )\r
+\r
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )\r
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )\r
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )\r
+\r
+assert x_mod_b_p\r
+assert y_mod_b_p\r
+assert z_mod_b_p\r
+\r
+assert u_mod_b_p\r
+assert v_mod_b_p\r
+assert w_mod_b_p\r
+\r
+assert x_mod_b_p_t\r
+assert y_mod_b_p_t\r
+assert z_mod_b_p_t\r
+\r
+assert u_mod_b_p_t\r
+assert v_mod_b_p_t\r
+assert w_mod_b_p_t\r
+#-----------\r
+\r
+\r
+\r
+#===================================================================\r
+# Recuperation des points de la geometrie bielle pour l association\r
+#===================================================================\r
+# NB:\r
+# h = haut\r
+# b = bas\r
+# g = grand\r
+# p = petit\r
+# t = trou\r
+\r
+Bielle_geom = geompy.Import(STEP_PATH, "STEP")\r
+\r
+geompy.addToStudy(Bielle_geom, "Bielle_geom")\r
+\r
+Pt_A = geompy.MakeVertex(0, 0, h/2.)\r
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)\r
+\r
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)\r
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)\r
+\r
+\r
+# Paramètre pour:\r
+# -récupération des points.\r
+# -et associations.\r
+u_1 = 0.75#0.8\r
+u_2 = 0.5\r
+u_3 = 0.25#0.2\r
+\r
+\r
+\r
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)\r
+y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)\r
+v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)\r
+v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)\r
+\r
+\r
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)\r
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)\r
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)\r
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)\r
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)\r
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)\r
+\r
+\r
+#x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)\r
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, u_3)\r
+x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)\r
+\r
+#z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1.)\r
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, u_1)\r
+z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)\r
+\r
+#w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)\r
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, u_3)\r
+w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)\r
+\r
+#u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)\r
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, u_1)\r
+u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)\r
+\r
+\r
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)\r
+y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)\r
+\r
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)\r
+z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)\r
+\r
+#w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)\r
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.40)\r
+w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)\r
+\r
+\r
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)\r
+v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)\r
+\r
+#u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)\r
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.6)\r
+u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)\r
+\r
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)\r
+x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)\r
+\r
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)\r
+y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)\r
+\r
+#z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)\r
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.1)\r
+z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)\r
+\r
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)\r
+w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)\r
+\r
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)\r
+v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)\r
+\r
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)\r
+u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)\r
+\r
+\r
+\r
+#x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)\r
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.9)\r
+x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)\r
+\r
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)\r
+u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)\r
+\r
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)\r
+x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)\r
+\r
+\r
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)\r
+w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)\r
+\r
+\r
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)\r
+z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)\r
+\r
+\r
+Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)\r
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)\r
+v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)\r
+\r
+Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)\r
+\r
+y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)\r
+y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+#=======================\r
+# CREATION ASSOCIATION\r
+#=======================\r
+\r
+#===========================================\r
+# association des sommets de la face du haut\r
+#===========================================\r
+\r
+# grand trou\r
+\r
+x_mod_h_g.setAssociation( x_h_g )\r
+y_mod_h_g.setAssociation( y_h_g )\r
+z_mod_h_g.setAssociation( z_h_g )\r
+u_mod_h_g.setAssociation( u_h_g )\r
+v_mod_h_g.setAssociation( v_h_g )\r
+w_mod_h_g.setAssociation( w_h_g )\r
+\r
+x_mod_h_g_t.setAssociation( x_h_g_t )\r
+y_mod_h_g_t.setAssociation( y_h_g_t )\r
+z_mod_h_g_t.setAssociation( z_h_g_t )\r
+u_mod_h_g_t.setAssociation( u_h_g_t )\r
+v_mod_h_g_t.setAssociation( v_h_g_t )\r
+w_mod_h_g_t.setAssociation( w_h_g_t )\r
+\r
+# petit trou\r
+\r
+x_mod_h_p.setAssociation( x_h_p )\r
+y_mod_h_p.setAssociation( y_h_p )\r
+z_mod_h_p.setAssociation( z_h_p )\r
+u_mod_h_p.setAssociation( u_h_p )\r
+v_mod_h_p.setAssociation( v_h_p )\r
+w_mod_h_p.setAssociation( w_h_p )\r
+\r
+x_mod_h_p_t.setAssociation( x_h_p_t )\r
+y_mod_h_p_t.setAssociation( y_h_p_t )\r
+z_mod_h_p_t.setAssociation( z_h_p_t )\r
+u_mod_h_p_t.setAssociation( u_h_p_t )\r
+v_mod_h_p_t.setAssociation( v_h_p_t )\r
+w_mod_h_p_t.setAssociation( w_h_p_t )\r
+\r
+\r
+#===========================================\r
+# association des sommets de la face du bas\r
+#===========================================\r
+\r
+# grand trou\r
+\r
+x_mod_b_g.setAssociation( x_b_g )\r
+y_mod_b_g.setAssociation( y_b_g )\r
+z_mod_b_g.setAssociation( z_b_g )\r
+u_mod_b_g.setAssociation( u_b_g )\r
+v_mod_b_g.setAssociation( v_b_g )\r
+w_mod_b_g.setAssociation( w_b_g )\r
+\r
+x_mod_b_g_t.setAssociation( x_b_g_t )\r
+y_mod_b_g_t.setAssociation( y_b_g_t )\r
+z_mod_b_g_t.setAssociation( z_b_g_t )\r
+u_mod_b_g_t.setAssociation( u_b_g_t )\r
+v_mod_b_g_t.setAssociation( v_b_g_t )\r
+w_mod_b_g_t.setAssociation( w_b_g_t )\r
+\r
+# petit trou\r
+\r
+x_mod_b_p.setAssociation( x_b_p )\r
+y_mod_b_p.setAssociation( y_b_p )\r
+z_mod_b_p.setAssociation( z_b_p )\r
+u_mod_b_p.setAssociation( u_b_p )\r
+v_mod_b_p.setAssociation( v_b_p )\r
+w_mod_b_p.setAssociation( w_b_p )\r
+\r
+x_mod_b_p_t.setAssociation( x_b_p_t )\r
+y_mod_b_p_t.setAssociation( y_b_p_t )\r
+z_mod_b_p_t.setAssociation( z_b_p_t )\r
+u_mod_b_p_t.setAssociation( u_b_p_t )\r
+v_mod_b_p_t.setAssociation( v_b_p_t )\r
+w_mod_b_p_t.setAssociation( w_b_p_t )\r
+\r
+\r
+\r
+\r
+#=================================\r
+# Creation association des edges\r
+#=================================\r
+\r
+\r
+All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])\r
+\r
+##------------------\r
+## Arrondies du haut\r
+##------------------\r
+\r
+#geometrie\r
+Edge_Arr_grd_g_h = All_Edges_Bielle[20]\r
+Edge_Arr_grd_d_h = All_Edges_Bielle[22]\r
+Edge_Arr_pte_g_h = All_Edges_Bielle[8]\r
+Edge_Arr_pte_d_h = All_Edges_Bielle[10]\r
+\r
+#model\r
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )\r
+Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )\r
+Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )\r
+Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )\r
+\r
+\r
+\r
+##------------------\r
+## Arrondies du bas\r
+##------------------\r
+# geometrie\r
+Edge_Arr_grd_g_b = All_Edges_Bielle[19]\r
+Edge_Arr_grd_d_b = All_Edges_Bielle[21]\r
+Edge_Arr_pte_g_b = All_Edges_Bielle[7]\r
+Edge_Arr_pte_d_b = All_Edges_Bielle[9]\r
+\r
+\r
+#model\r
+Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )\r
+Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )\r
+Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )\r
+Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )\r
+\r
+\r
+\r
+##------------------\r
+## Grands rayons\r
+##------------------\r
+\r
+# geometrie\r
+Edge_Ray_grd_g_b = All_Edges_Bielle[27]\r
+Edge_Ray_grd_g_h = All_Edges_Bielle[28]\r
+Edge_Ray_grd_d_b = All_Edges_Bielle[0]\r
+Edge_Ray_grd_d_h = All_Edges_Bielle[1]\r
+\r
+\r
+#model\r
+Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )\r
+Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )\r
+Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )\r
+Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )\r
+Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )\r
+Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )\r
+Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )\r
+Edge_Grd_Ray_7_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )\r
+\r
+\r
+\r
+\r
+##------------------\r
+## ASSOCIATIONS : arrondies du haut, arrondies du bas et grands rayons \r
+##------------------\r
+\r
+\r
+#arrondies du haut\r
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )\r
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Ray_grd_g_h, u_1, 1. )#Edge_haut_grd\r
+\r
+\r
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )\r
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Ray_grd_g_h, 0., u_3 )\r
+\r
+\r
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )\r
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Ray_grd_d_h, 0., u_3 )\r
+\r
+\r
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )\r
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Ray_grd_d_h, u_1, 1. )\r
+\r
+\r
+#arrondies du bas\r
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )\r
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Ray_grd_g_b, u_1, 1. )\r
+\r
+\r
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )\r
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Ray_grd_g_b, 0., u_3 )\r
+\r
+\r
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )\r
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Ray_grd_d_b, 0., u_3 )\r
+\r
+\r
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )\r
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Ray_grd_d_b, u_1, 1. )\r
+\r
+\r
+#grands rayon\r
+Edge_Grd_Ray_0_mod.addAssociation( Edge_Ray_grd_d_b, u_3, u_2 )\r
+Edge_Grd_Ray_1_mod.addAssociation( Edge_Ray_grd_d_h, u_3, u_2 )\r
+Edge_Grd_Ray_2_mod.addAssociation( Edge_Ray_grd_d_b, u_2, u_1 )\r
+Edge_Grd_Ray_3_mod.addAssociation( Edge_Ray_grd_d_h, u_2, u_1 )\r
+\r
+Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b, u_2, u_1 )\r
+Edge_Grd_Ray_5_mod.addAssociation( Edge_Ray_grd_g_h, u_2, u_1 )\r
+Edge_Grd_Ray_6_mod.addAssociation( Edge_Ray_grd_g_b, u_3, u_2 )\r
+Edge_Grd_Ray_7_mod.addAssociation( Edge_Ray_grd_g_h, u_3, u_2 )\r
+\r
+\r
+\r
+\r
+# recuperer les rayons des trous de la bielle de la geometrie\r
+Edge_Trou_grd_h = All_Edges_Bielle[26]\r
+Edge_Trou_grd_b = All_Edges_Bielle[25]\r
+Edge_Trou_pte_h = All_Edges_Bielle[3]\r
+Edge_Trou_pte_b = All_Edges_Bielle[2]\r
+\r
+\r
+Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]\r
+Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]\r
+Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]\r
+Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]\r
+Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]\r
+Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]\r
+\r
+\r
+Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )\r
+Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )\r
+Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )\r
+Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )\r
+Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )\r
+Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )\r
+\r
+\r
+Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )\r
+Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )\r
+Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )\r
+Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )\r
+Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )\r
+Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )\r
+\r
+\r
+Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]\r
+Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]\r
+Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]\r
+Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]\r
+Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]\r
+Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]\r
+\r
+\r
+Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )\r
+Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )\r
+Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )\r
+Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )\r
+Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )\r
+Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )\r
+\r
+\r
+Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )\r
+Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )\r
+Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )\r
+Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )\r
+Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )\r
+Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )\r
+\r
+\r
+\r
+Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]\r
+Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]\r
+Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]\r
+Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]\r
+Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]\r
+Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]\r
+\r
+\r
+Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )\r
+Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )\r
+Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )\r
+Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )\r
+Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )\r
+Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )\r
+\r
+\r
+Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )\r
+Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )\r
+Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )\r
+Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )\r
+Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )\r
+Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )\r
+\r
+\r
+Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])\r
+\r
+\r
+Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]\r
+Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]\r
+Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]\r
+Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]\r
+Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]\r
+Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]\r
+\r
+\r
+Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )\r
+Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )\r
+Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )\r
+Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )\r
+Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )\r
+Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )\r
+\r
+Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )\r
+Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )\r
+Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )\r
+Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )\r
+Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )\r
+Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )\r
+\r
+\r
+\r
+#====================================\r
+# CREATION DES FACES DES ARRONDIES\r
+#====================================\r
+All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])\r
+\r
+Face_Arron_1 = All_Face_Arron_Bielle[2]\r
+Face_Arron_2 = All_Face_Arron_Bielle[3]\r
+Face_Arron_3 = All_Face_Arron_Bielle[8]\r
+Face_Arron_4 = All_Face_Arron_Bielle[9]\r
+\r
+Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )\r
+Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )\r
+Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )\r
+Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )\r
+\r
+\r
+\r
+#=================================================\r
+# VERTEX, EDGES, FACES DANS L'ARBRE D'ETUDE SALOME\r
+#=================================================\r
+\r
+geompy.addToStudy( y_h_g , "y_h_g" )\r
+geompy.addToStudy( y_b_g , "y_b_g" )\r
+geompy.addToStudy( v_h_p , "v_h_p" )\r
+geompy.addToStudy( v_b_p , "v_b_p" )\r
+geompy.addToStudy( x_h_g , "x_h_g" )\r
+geompy.addToStudy( x_b_g , "x_b_g" )\r
+geompy.addToStudy( z_h_g , "z_h_g" )\r
+geompy.addToStudy( z_b_g , "z_b_g" )\r
+geompy.addToStudy( w_h_p , "w_h_p" )\r
+geompy.addToStudy( w_b_p , "w_b_p" )\r
+geompy.addToStudy( u_h_p , "u_h_p" )\r
+geompy.addToStudy( u_b_p , "u_b_p" )\r
+geompy.addToStudy(y_h_g_t, "y_h_g_t")\r
+geompy.addToStudy(y_b_g_t, "y_b_g_t")\r
+geompy.addToStudy(z_h_g_t, "z_h_g_t")\r
+geompy.addToStudy(z_b_g_t, "z_b_g_t")\r
+geompy.addToStudy(w_h_g_t, "w_h_g_t")\r
+geompy.addToStudy(w_b_g_t, "w_b_g_t")\r
+geompy.addToStudy(v_h_g_t, "v_h_g_t")\r
+geompy.addToStudy(v_b_g_t, "v_b_g_t")\r
+geompy.addToStudy(u_h_g_t, "u_h_g_t")\r
+geompy.addToStudy(u_b_g_t, "u_b_g_t")\r
+geompy.addToStudy(x_h_g_t, "x_h_g_t")\r
+geompy.addToStudy(x_b_g_t, "x_b_g_t")\r
+geompy.addToStudy(y_h_p_t, "y_h_p_t")\r
+geompy.addToStudy(y_b_p_t, "y_b_p_t")\r
+geompy.addToStudy(z_h_p_t, "z_h_p_t")\r
+geompy.addToStudy(z_b_p_t, "z_b_p_t")\r
+geompy.addToStudy(w_h_p_t, "w_h_p_t")\r
+geompy.addToStudy(w_b_p_t, "w_b_p_t")\r
+geompy.addToStudy(v_h_p_t, "v_h_p_t")\r
+geompy.addToStudy(v_b_p_t, "v_b_p_t")\r
+geompy.addToStudy(u_h_p_t, "u_h_p_t")\r
+geompy.addToStudy(u_b_p_t, "u_b_p_t")\r
+geompy.addToStudy(x_b_p_t, "x_b_p_t")\r
+geompy.addToStudy(u_h_g, "u_h_g")\r
+geompy.addToStudy(u_b_g, "u_b_g")\r
+geompy.addToStudy(x_h_p, "x_h_p")\r
+geompy.addToStudy(x_b_p, "x_b_p")\r
+geompy.addToStudy(w_h_g, "w_h_g")\r
+geompy.addToStudy(w_b_g, "w_b_g")\r
+geompy.addToStudy(z_h_p, "z_h_p")\r
+geompy.addToStudy(z_b_p, "z_b_p")\r
+geompy.addToStudy(v_h_g, "v_h_g")\r
+geompy.addToStudy(v_b_g, "v_b_g")\r
+geompy.addToStudy(y_h_p, "y_h_p")\r
+geompy.addToStudy(y_b_p, "y_b_p")\r
+\r
+\r
+geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )\r
+geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )\r
+geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )\r
+geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )\r
+geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )\r
+geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )\r
+geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )\r
+geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )\r
+geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )\r
+geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )\r
+geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )\r
+geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )\r
+geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )\r
+geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )\r
+geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )\r
+geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )\r
+geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )\r
+geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )\r
+geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )\r
+geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )\r
+geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )\r
+geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )\r
+geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )\r
+geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )\r
+geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )\r
+geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )\r
+geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )\r
+geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )\r
+\r
+geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )\r
+geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )\r
+geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )\r
+geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )\r
+\r
+geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )\r
+geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )\r
+geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )\r
+geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )\r
+\r
+geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )\r
+geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )\r
+geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )\r
+geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )\r
+\r
+\r
+geompy.addToStudy(Face_Arron_1, "Face_Arron_1")\r
+geompy.addToStudy(Face_Arron_2, "Face_Arron_2")\r
+geompy.addToStudy(Face_Arron_3, "Face_Arron_3")\r
+geompy.addToStudy(Face_Arron_4, "Face_Arron_4")\r
+\r
+\r
+geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )\r
+geompy.addToStudy( Partition_Trou_grd_bas ,  "Partition_Trou_grd_bas" )\r
+geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )\r
+geompy.addToStudy( Partition_Trou_pte_bas ,  "Partition_Trou_pte_bas" )\r
+\r
+\r
+\r
+#====================================\r
+# CREATION MAILLAGE\r
+#====================================\r
+\r
+\r
+#=================================================\r
+# Definir les groupes d elements pour le maillage\r
+#=================================================\r
+\r
+# On definit 3 groupes de mailles\r
+\r
+# groupe d edges (arretes)\r
+\r
+Edge_grp = doc.addEdgeGroup("Edge_grp")\r
+Nbr_Edg = doc.countEdge()\r
+#print Nbr_Edg\r
+for i in range(Nbr_Edg):\r
+    Edge_i = doc.getEdge(i)\r
+    Edge_grp.addElement(Edge_i)\r
+\r
+\r
+# groupe de quads (faces)\r
+Quad_grp = doc.addQuadGroup("Quad_grp")\r
+Nbr_Qad = doc.countQuad()\r
+#print Nbr_Qad\r
+for i in range(Nbr_Qad):\r
+    Quad_i = doc.getQuad(i)\r
+    Quad_grp.addElement(Quad_i)\r
+\r
+# groupe d hexas (solids)\r
+Hexa_grp = doc.addHexaGroup("Hexa_grp")\r
+Nbr_Hex = doc.countHexa()\r
+#print Nbr_Hex\r
+for i in range(Nbr_Hex):\r
+    Hexa_i = doc.getHexa(i)\r
+    Hexa_grp.addElement(Hexa_i)\r
+\r
+\r
+\r
+# groupe de noeuds de vertex pour tout le modele \r
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")\r
+Nbr_Vx = doc.countVertex()\r
+#print Nbr_Vx\r
+\r
+for i in range(Nbr_Vx):\r
+    Vertex_i = doc.getVertex(i)\r
+    Vertex_Nod_Grp.addElement(Vertex_i)\r
+\r
+#====================================\r
+# Definir une loi de discretisation\r
+#====================================\r
+# definir une loi: le choix de la loi reste aux utilisateurs\r
+Law = doc.addLaw( "Uniform" , 4 )\r
+\r
+#n = doc.countLaw()\r
+#print n\r
+\r
+# chercher les propagations du modele\r
+N_Propa = doc.countPropagation()\r
+\r
+for j in range(N_Propa):\r
+    Propa = doc.getPropagation(j)\r
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage\r
+\r
+#====================================\r
+# Générer des maillages\r
+#====================================\r
+\r
+print  " --- MAILLAGE HEXAHEDRIQUE --- "\r
+mesh_hexas = hexablock.mesh("Bielle:hexas", doc)\r
+\r
+print "Nombre d hexaedres:"   , mesh_hexas.NbHexas()\r
+print "Nombre de quadrangles:", mesh_hexas.NbQuadrangles()\r
+print "Nombre de segments:"   , mesh_hexas.NbEdges()\r
+print "Nombre de noeuds:"     , mesh_hexas.NbNodes()\r
+\r
+print  " --- MAILLAGE QUADRANGULAIRE --- "\r
+mesh_quads = hexablock.mesh("Bielle:quads", doc, 2)\r
+\r
+print "Nombre d hexaedres:"   , mesh_quads.NbHexas()\r
+print "Nombre de quadrangles:", mesh_quads.NbQuadrangles()\r
+print "Nombre de segments:"   , mesh_quads.NbEdges()\r
+print "Nombre de noeuds:"     , mesh_quads.NbNodes()\r
+\r
+print  " --- MAILLAGE 1D --- "\r
+mesh_edges = hexablock.mesh("Bielle:edges", doc, 1)\r
+\r
+print "Nombre d hexaedres:"   , mesh_edges.NbHexas()\r
+print "Nombre de quadrangles:", mesh_edges.NbQuadrangles()\r
+print "Nombre de segments:"   , mesh_edges.NbEdges()\r
+print "Nombre de noeuds:"     , mesh_edges.NbNodes()\r
+\r
+print  " --- MAILLAGE des sommets --- "\r
+mesh_nodes = hexablock.mesh("Bielle:nodes", doc, 0)\r
+\r
+print "Nombre d hexaedres:"   , mesh_nodes.NbHexas()\r
+print "Nombre de quadrangles:", mesh_nodes.NbQuadrangles()\r
+print "Nombre de segments:"   , mesh_nodes.NbEdges()\r
+print "Nombre de noeuds:"     , mesh_nodes.NbNodes()\r
diff --git a/src/TEST_PY/BRIDE.py b/src/TEST_PY/BRIDE.py
new file mode 100755 (executable)
index 0000000..92774ae
--- /dev/null
@@ -0,0 +1,1903 @@
+# -*- coding: latin-1 -*-
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Dec 2009 in CS 
+#===============================================
+
+
+import geompy
+import smesh
+import hexablock
+import math
+
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument()
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour la bride on doit creer plusieurs grilles cylindriques
+
+#=============================
+# PARAMETRES
+#=============================
+
+h = 70
+nl = 7
+
+# Taille de la 1ere grille cylindrique
+r1 = 12
+r1_t = 7.88
+R = r1-r1_t
+a1 = 45
+l1 = h
+
+nr1 = 4.0
+na1 = 1.0
+nl1 = nl = 1.0
+
+# Taille de la 2eme grille cylindrique
+r2 = 20
+r2_t = 2
+r = r2-r2_t
+a2 = 180
+l2 = h
+
+nr2 = 5.0
+na2 = 5.0
+nl2 = nl = 1.0
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector( h , 0 , 0 )
+dy = doc.addVector( 0 , h , 0 )
+dz = doc.addVector( 0 , 0 , h )
+
+
+#=================================================
+# Creation des centres des grilles cylindriques
+#=================================================
+
+P = 40
+c1 = doc.addVertex( 0 , 0 , h )
+c2 = doc.addVertex( P , 0 , h )
+
+
+#=================================================
+# Creation de la 1ere grille cylindrique
+#=================================================
+
+grille_cyl_1 = doc.makeCylindrical( c1 , dx , dz , R , a1 , l1 , nr1 , na1 , nl1 , False )
+
+
+ni = nr1 = 4
+nj = na1 = 1
+nk = nl1 = 1
+
+0 <= i < ni
+0 <= j < nj
+0 <= k < nk
+
+# reperer les vertex
+
+ni = nr1 = 4
+nj = na1 = 1
+nk = nl1 = 1
+
+0 <= i < ni + 1 = 5
+0 <= j < nj + 1 = 2
+0 <= k < nk + 1 = 2
+
+vtx_B_g1 = grille_cyl_1.getVertexXYZ( 2 , 0 , 0 )
+vtx_B_g1 = grille_cyl_1.getVertexXYZ( 2 , 0 , 0 )
+
+
+# reperer les quads
+
+ni = nr1 = 4
+nj = na1 = 1
+nk = nl1 = 1
+
+0 <= i < ni + 1 = 5
+0 <= j < nj = 1
+0 <= k < nk = 1
+
+quad_A_g1 = grille_cyl_1.getQuadYZ( 5 , 0 , 0 )
+
+0 <= i < ni = 4
+0 <= j < nj + 1 = 2
+0 <= k < nk = 2
+
+quad_B_g1 = grille_cyl_1.getQuadXZ( 3 , 0 , 0 )
+quad_C_g1 = grille_cyl_1.getQuadXZ( 2 , 0 , 0 )
+
+
+# reperer les hexas
+
+ni = nr1 = 4
+nj = na1 = 1
+nk = nl1 = 1
+
+0 <= i < ni = 4
+0 <= j < nj = 1
+0 <= k < nk = 1
+
+hexa_A_g1 = grille_cyl_1.getHexaXYZ( 3 , 0 , 0 )
+hexa_B_g1 = grille_cyl_1.getHexaXYZ( 2 , 0 , 0 )
+
+
+
+
+#=================================================
+# Creation de la 2eme grille cylindrique
+#=================================================
+
+grille_cyl_2 = doc.makeCylindrical( c2 , dx , dz , r , a2 , l2 , nr2 , na2 , nl2 , False )
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni
+0 <= j < nj
+0 <= k < nk
+
+# reperer les vertex
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni + 1 = 5
+0 <= j < nj + 1 = 2
+0 <= k < nk + 1 = 2
+
+vtx_B_g2 = grille_cyl_2.getVertexXYZ( 2 , 0 , 0 )
+vtx_B_g2 = grille_cyl_2.getVertexXYZ( 2 , 0 , 0 )
+
+
+# reperer les quads
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni = 4
+0 <= j < nj + 1 = 2
+0 <= k < nk = 2
+
+quad_A_g2 = grille_cyl_2.getQuadXZ( 2 , 0 , 0 )
+quad_B_g2 = grille_cyl_2.getQuadXZ( 3 , 0 , 0 )
+
+0 <= i < ni + 1 = 5
+0 <= j < nj = 1
+0 <= k < nk = 1
+
+quad_AB_g2 = grille_cyl_2.getQuadXZ( 4 , 3 , 0 )
+
+
+# reperer les hexas
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni = 4
+0 <= j < nj = 1
+0 <= k < nk = 1
+
+hexa_A_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 0 )
+hexa_B_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 0 )
+hexa_C_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 0 )
+
+# deconnexion des quads
+
+quad_A_g2 = doc.disconnectQuad( hexa_A_g2 , quad_AB_g2 )
+quad_B_g2 = doc.disconnectQuad( hexa_B_g2 , quad_AB_g2 )
+
+
+
+# fusionner les quads
+
+fusion_g1_g2_quad_A = doc.mergeQuads( quad_A_g2 , quad_A_g1 , vtx_A_1_g2 , vtx_A_1_g1 , vtx_A_2_g2 , vtx_A_2_g1 )
+fusion_g1_g2_quad_B = doc.mergeQuads( quad_B_g2 , quad_B_g1 , vtx_B_1_g2 , vtx_B_1_g1 , vtx_B_2_g2 , vtx_B_2_g1 )
+
+fusion_g1_g2 = doc.mergeEdges( edge_B_g2 , edge_C_g1 , vtx_B_h_g2 , vtx_C_h_g1 )
+
+
+
+# rajouter l hexa qui manque entre les deux grilles
+
+edge_h = doc.addEdge( vtx_C_h_g2 , vtx_C_h_g1 )
+edge_b = doc.addEdge( vtx_C_b_g2 , vtx_C_b_g1 )
+
+quad_h = doc.addQuad( edge_B_h_g2 , edge_C_h_g2 , edge_h , edge_C_h_g1 )
+quad_b = doc.addQuad( edge_B_b_g2 , edge_C_b_g2 , edge_b , edge_C_b_g1 )
+quad_f = doc.addQuad( edge_h , edge_C_g2 , edge_C_g1 , edge_b )
+
+hexa_g2_g1 = doc.addHexa( quad_B_g2 , quad_C_g2 , quad_f , quad_C_g1 , quad_h , quad_b )
+
+
+#========================================================================================
+# rajouter trois hexa qui servent au remplissage de la partie centrale de la 2eme grille
+#========================================================================================
+
+
+# reperer les vertex
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni + 1 = 6
+0 <= j < nj + 1 = 6
+0 <= k < nk + 1 = 2
+
+vtx_1_h_g2 = grille_cyl_2.getVertexXYZ( 0 , 0 , 1 )
+vtx_2_h_g2 = grille_cyl_2.getVertexXYZ( 0 , 1 , 1 )
+vtx_3_h_g2 = grille_cyl_2.getVertexXYZ( 0 , 2 , 1 )
+vtx_4_h_g2 = grille_cyl_2.getVertexXYZ( 0 , 3 , 1 )
+vtx_5_h_g2 = grille_cyl_2.getVertexXYZ( 0 , 4 , 1 )
+vtx_6_h_g2 = grille_cyl_2.getVertexXYZ( 0 , 5 , 1 )
+
+vtx_1_b_g2 = grille_cyl_2.getVertexXYZ( 0 , 0 , 0 )
+vtx_2_b_g2 = grille_cyl_2.getVertexXYZ( 0 , 1 , 0 )
+vtx_3_b_g2 = grille_cyl_2.getVertexXYZ( 0 , 2 , 0 )
+vtx_4_b_g2 = grille_cyl_2.getVertexXYZ( 0 , 3 , 0 )
+vtx_5_b_g2 = grille_cyl_2.getVertexXYZ( 0 , 4 , 0 )
+vtx_6_b_g2 = grille_cyl_2.getVertexXYZ( 0 , 5 , 0 )
+
+
+vtx_7_h_g2 = doc.addVertex( P + 0.5 , 0 , h )
+vtx_8_h_g2 = doc.addVertex( P - 0.5 , 0 , h )
+
+Pt_dtr_1 = doc.makeVertex( P , 0 , h )
+Pt_dtr_2 = doc.makeVertex( P , 0 , 0 )
+
+dtr = doc.makeVectorVertices( Pt_dtr_2 , Pt_dtr_1 )
+
+vtx_7_b_g2 = doc.makeTranslation( vtx_1_b_g2 , dtr )
+vtx_8_b_g2 = doc.makeTranslation( vtx_6_b_g2 , dtr )
+
+
+
+# reperer les edges
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+# edge Y
+
+0 <= i < ni + 1 = 6
+0 <= j < nj = 5
+0 <= k < nk + 1 = 2
+
+edge_1_2_h_g2 = grille_cyl_2.getEdgeY( 0 , 0 , 1 )
+edge_2_3_h_g2 = grille_cyl_2.getEdgeY( 1 , 0 , 1 )
+edge_3_4_h_g2 = grille_cyl_2.getEdgeY( 2 , 0 , 1 )
+edge_4_5_h_g2 = grille_cyl_2.getEdgeY( 3 , 0 , 1 )
+edge_5_6_h_g2 = grille_cyl_2.getEdgeY( 4 , 0 , 1 )
+
+edge_1_2_b_g2 = grille_cyl_2.getEdgeY( 0 , 0 , 0 )
+edge_2_3_b_g2 = grille_cyl_2.getEdgeY( 1 , 0 , 0 )
+edge_3_4_b_g2 = grille_cyl_2.getEdgeY( 2 , 0 , 0 )
+edge_4_5_b_g2 = grille_cyl_2.getEdgeY( 3 , 0 , 0 )
+edge_5_6_b_g2 = grille_cyl_2.getEdgeY( 4 , 0 , 0 )
+
+# edge Z
+
+0 <= i < ni + 1 = 6
+0 <= j < nj + 1 = 6
+0 <= k < nk = 1
+
+edge_1_z_g2 = grille_cyl_2.getEdgeZ( 0 , 0 , 0 )
+edge_2_z_g2 = grille_cyl_2.getEdgeZ( 0 , 1 , 0 )
+edge_3_z_g2 = grille_cyl_2.getEdgeZ( 0 , 2 , 0 )
+edge_4_z_g2 = grille_cyl_2.getEdgeZ( 0 , 3 , 0 )
+edge_5_z_g2 = grille_cyl_2.getEdgeZ( 0 , 4 , 0 )
+edge_6_z_g2 = grille_cyl_2.getEdgeZ( 0 , 5 , 0 )
+
+
+# creer les edges manquants
+
+edge_1_7_h_g2 = doc.addEdge( vtx_1_h_g2 , vtx_7_h_g2 )
+edge_3_7_h_g2 = doc.addEdge( vtx_7_h_g2 , vtx_3_h_g2 )
+edge_7_8_h_g2 = doc.addEdge( vtx_7_h_g2 , vtx_8_h_g2 )
+edge_4_8_h_g2 = doc.addEdge( vtx_4_h_g2 , vtx_8_h_g2 )
+edge_6_8_h_g2 = doc.addEdge( vtx_6_h_g2 , vtx_8_h_g2 )
+
+edge_1_7_b_g2 = doc.addEdge( vtx_1_b_g2 , vtx_7_b_g2 )
+edge_3_7_b_g2 = doc.addEdge( vtx_7_b_g2 , vtx_3_b_g2 )
+edge_7_8_b_g2 = doc.addEdge( vtx_7_b_g2 , vtx_8_b_g2 )
+edge_4_8_b_g2 = doc.addEdge( vtx_4_b_g2 , vtx_8_b_g2 )
+edge_6_8_b_g2 = doc.addEdge( vtx_6_b_g2 , vtx_8_b_g2 )
+
+edge_7_h_b_g2 = doc.addEdge( vtx_7_h_g2 , vtx_7_b_g2 )
+edge_8_h_b_g2 = doc.addEdge( vtx_8_h_g2 , vtx_8_b_g2 )
+
+
+# creer les quads manquants
+
+quad_7_h_g2 = doc.addQuad( edge_1_2_h_g2 , edge_2_3_h_g2 , edge_3_7_h_g2 , edge_1_7_h_g2 )
+quad_7_8_h_g2 = doc.addQuad( edge_3_4_h_g2 , edge_4_8_h_g2 , edge_7_8_h_g2 , edge_3_7_h_g2 )
+quad_8_h_g2 = doc.addQuad( edge_4_5_h_g2 , edge_5_6_h_g2 , edge_6_8_h_g2 , edge_4_8_h_g2 )
+
+quad_7_b_g2 = doc.addQuad( edge_1_2_b_g2 , edge_2_3_b_g2 , edge_3_7_b_g2 , edge_1_7_b_g2 )
+quad_7_8_b_g2 = doc.addQuad( edge_3_4_b_g2 , edge_4_8_b_g2 , edge_7_8_b_g2 , edge_3_7_b_g2 )
+quad_8_b_g2 = doc.addQuad( edge_4_5_b_g2 , edge_5_6_b_g2 , edge_6_8_b_g2 , edge_4_8_b_g2 )
+
+quad_7_f_g2 = doc.addQuad( edge_1_7_h_g2 , edge_1_z_g2 , edge_1_7_b_g2 , edge_7_h_b_g2 )
+quad_7_8_f_g2 = doc.addQuad( edge_7_8_h_g2 , edge_7_h_b_g2 , edge_7_8_b_g2 , edge_8_h_b_g2 )
+quad_8_f_g2 = doc.addQuad( edge_6_8_h_g2 , edge_6_z_g2 , edge_6_8_b_g2 , edge_8_h_b_g2 )
+
+quad_3_7_f_g2 = doc.addQuad( edge_3_z_g2 , edge_3_7_h_g2 , edge_7_h_b_g2 , edge_3_7_b_g2 )
+quad_4_8_f_g2 = doc.addQuad( edge_4_z_g2 , edge_4_8_h_g2 , edge_8_h_b_g2 , edge_4_8_b_g2 )
+
+
+
+# reperer les quads
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni + 1 = 6
+0 <= j < nj = 5
+0 <= k < nk = 1
+
+quad_1_2_z_g2 = grille_cyl_2.getQuadYZ( 0 , 0 , 0 )
+quad_2_3_z_g2 = grille_cyl_2.getQuadYZ( 0 , 1 , 0 )
+quad_3_4_z_g2 = grille_cyl_2.getQuadYZ( 0 , 2 , 0 )
+quad_4_5_z_g2 = grille_cyl_2.getQuadYZ( 0 , 3 , 0 )
+quad_5_6_z_g2 = grille_cyl_2.getQuadYZ( 0 , 4 , 0 )
+
+
+
+
+# creer les hexas manquants
+
+hexa_rmp_7_g2 = doc.addHexa( quad_1_2_z_g2 , quad_2_3_z_g2 , quad_3_7_f_g2 , quad_7_f_g2 , quad_7_h_g2 , quad_7_b_g2 )
+
+hexa_rmp_7_8_g2 = doc.addHexa( quad_3_7_f_g2 , quad_3_4_z_g2 , quad_4_8_f_g2 , quad_7_8_f_g2 , quad_7_8_h_g2 , quad_7_8_b_g2 )
+
+hexa_rmp_8_g2 = doc.addHexa( quad_4_8_f_g2 , quad_4_5_z_g2 , quad_5_6_z_g2 , quad_8_f_g2 , quad_8_h_g2 , quad_8_b_g2 )
+
+
+#=======================================
+# couper le modele pour avoir 7 couches
+#=======================================
+
+# repérer l'edge qui sert à l'opération cut
+
+0 <= i < ni + 1 = 6
+0 <= j < nj + 1 = 6
+0 <= k < nk = 1
+
+edge_cut = grille_cyl_2.getEdgeZ( 5 , 0 , 0 )
+
+mod_7_couche = doc.cut( edge_cut , 7 )
+
+
+#===============================================
+# reperer les hexas en plus pour les supprimer
+#===============================================
+
+# reperer les hexas
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 1
+
+0 <= i < ni = 4
+0 <= j < nj = 1
+0 <= k < nk = 1
+
+# 1ere grille
+
+ni = nr1 = 4
+nj = na1 = 1
+nk = nl1 = 7
+
+0 <= i < ni = 4
+0 <= j < nj = 1
+0 <= k < nk = 1
+
+hexa_1_x_3_z_g1 = grille_cyl_1.getHexaXYZ( 1 , 0 , 3 )
+hexa_1_x_4_z_g1 = grille_cyl_1.getHexaXYZ( 1 , 0 , 4 )
+hexa_1_x_5_z_g1 = grille_cyl_1.getHexaXYZ( 1 , 0 , 5 )
+hexa_1_x_6_z_g1 = grille_cyl_1.getHexaXYZ( 1 , 0 , 6 )
+
+hexa_2_x_3_z_g1 = grille_cyl_1.getHexaXYZ( 2 , 0 , 3 )
+hexa_2_x_4_z_g1 = grille_cyl_1.getHexaXYZ( 2 , 0 , 4 )
+hexa_2_x_5_z_g1 = grille_cyl_1.getHexaXYZ( 2 , 0 , 5 )
+hexa_2_x_6_z_g1 = grille_cyl_1.getHexaXYZ( 2 , 0 , 6 )
+
+hexa_3_x_3_z_g1 = grille_cyl_1.getHexaXYZ( 3 , 0 , 3 )
+hexa_3_x_4_z_g1 = grille_cyl_1.getHexaXYZ( 3 , 0 , 4 )
+hexa_3_x_5_z_g1 = grille_cyl_1.getHexaXYZ( 3 , 0 , 5 )
+hexa_3_x_6_z_g1 = grille_cyl_1.getHexaXYZ( 3 , 0 , 6 )
+
+
+hexa_list_g1 = [ hexa_1_x_3_z_g1 , hexa_1_x_4_z_g1 , hexa_1_x_5_z_g1 , hexa_1_x_6_z_g1 , hexa_2_x_3_z_g1 , hexa_2_x_4_z_g1 , hexa_2_x_5_z_g1 , hexa_2_x_6_z_g1 , hexa_3_x_3_z_g1 , hexa_3_x_4_z_g1 , hexa_3_x_5_z_g1 , hexa_3_x_6_z_g1 ]
+
+for hexa_i in range(hexa_list_g1):
+       doc.removeHexa(hexa_i)
+
+
+# 2eme grille
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 7
+
+0 <= i < ni = 5
+0 <= j < nj = 5
+0 <= k < nk = 7
+
+# 1er range x = 0
+
+hexa_0_x_0_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 0 , 0 , 6 )
+hexa_0_x_1_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 0 , 1 , 6 )
+hexa_0_x_2_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 0 , 2 , 6 )
+hexa_0_x_3_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 0 , 3 , 6 )
+hexa_0_x_4_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 0 , 4 , 6 )
+
+
+hexa_list_x_0_g2 = [ hexa_0_x_0_y_6_z_g2 , hexa_0_x_1_y_6_z_g2 , hexa_0_x_2_y_6_z_g2 , hexa_0_x_3_y_6_z_g2 , hexa_0_x_4_y_6_z_g2 ]
+
+for hexa_i in range(hexa_list_x_0_g2):
+       doc.removeHexa(hexa_i)
+
+# 2eme range x = 1
+
+hexa_1_x_0_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 0 , 0 )
+hexa_1_x_1_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 1 , 0 )
+hexa_1_x_2_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 2 , 0 )
+hexa_1_x_3_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 3 , 0 )
+hexa_1_x_4_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 4 , 0 )
+
+hexa_1_x_0_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 0 , 1 )
+hexa_1_x_1_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 1 , 1 )
+hexa_1_x_2_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 2 , 1 )
+hexa_1_x_3_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 3 , 1 )
+hexa_1_x_4_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 4 , 1 )
+
+hexa_1_x_0_y_2_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 0 , 2 )
+hexa_1_x_1_y_2_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 1 , 2 )
+hexa_1_x_2_y_2_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 2 , 2 )
+hexa_1_x_3_y_2_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 3 , 2 )
+hexa_1_x_4_y_2_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 4 , 2 )
+
+hexa_1_x_0_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 0 , 3 )
+hexa_1_x_1_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 1 , 3 )
+hexa_1_x_2_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 2 , 3 )
+hexa_1_x_3_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 3 , 3 )
+hexa_1_x_4_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 4 , 3 )
+
+hexa_1_x_0_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 0 , 5 )
+hexa_1_x_1_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 1 , 5 )
+hexa_1_x_2_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 2 , 5 )
+hexa_1_x_3_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 3 , 5 )
+hexa_1_x_4_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 4 , 5 )
+
+hexa_1_x_0_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 0 , 6 )
+hexa_1_x_1_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 1 , 6 )
+hexa_1_x_2_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 2 , 6 )
+hexa_1_x_3_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 3 , 6 )
+hexa_1_x_4_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 1 , 4 , 6 )
+
+
+hexa_list_x_1_g2 = [ hexa_1_x_0_y_0_z_g2 , hexa_1_x_1_y_0_z_g2 , hexa_1_x_2_y_0_z_g2 , hexa_1_x_3_y_0_z_g2 , hexa_1_x_4_y_0_z_g2 , hexa_1_x_0_y_1_z_g2 , hexa_1_x_1_y_1_z_g2 , hexa_1_x_2_y_1_z_g2 , hexa_1_x_3_y_1_z_g2 , hexa_1_x_4_y_1_z_g2 , hexa_1_x_0_y_2_z_g2 , hexa_1_x_1_y_2_z_g2 , hexa_1_x_2_y_2_z_g2 , hexa_1_x_3_y_2_z_g2 , hexa_1_x_4_y_2_z_g2 , hexa_1_x_0_y_3_z_g2 , hexa_1_x_1_y_3_z_g2 , hexa_1_x_2_y_3_z_g2 , hexa_1_x_3_y_3_z_g2 , hexa_1_x_4_y_3_z_g2 , hexa_1_x_0_y_5_z_g2 , hexa_1_x_1_y_5_z_g2 , hexa_1_x_2_y_5_z_g2 , hexa_1_x_3_y_5_z_g2 , hexa_1_x_4_y_5_z_g2 , hexa_1_x_0_y_6_z_g2 , hexa_1_x_1_y_6_z_g2 , hexa_1_x_2_y_6_z_g2 , hexa_1_x_3_y_6_z_g2 , hexa_1_x_4_y_6_z_g2 ]
+
+for hexa_i in range(hexa_list_x_1_g2):
+       doc.removeHexa(hexa_i)
+
+
+# 3eme range x = 2
+
+hexa_2_x_0_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 0 , 0 )
+hexa_2_x_1_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 1 , 0 )
+hexa_2_x_2_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 2 , 0 )
+hexa_2_x_3_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 3 , 0 )
+hexa_2_x_4_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 4 , 0 )
+
+hexa_2_x_0_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 0 , 1 )
+hexa_2_x_1_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 1 , 1 )
+hexa_2_x_2_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 2 , 1 )
+hexa_2_x_3_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 3 , 1 )
+hexa_2_x_4_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 4 , 1 )
+
+hexa_2_x_0_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 0 , 5 )
+hexa_2_x_1_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 1 , 5 )
+hexa_2_x_2_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 2 , 5 )
+hexa_2_x_3_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 3 , 5 )
+hexa_2_x_4_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 4 , 5 )
+
+hexa_2_x_0_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 0 , 6 )
+hexa_2_x_1_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 1 , 6 )
+hexa_2_x_2_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 2 , 6 )
+hexa_2_x_3_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 3 , 6 )
+hexa_2_x_4_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 2 , 4 , 6 )
+
+
+hexa_list_x_2_g2 = [ hexa_2_x_0_y_0_z_g2 , hexa_2_x_1_y_0_z_g2 , hexa_2_x_2_y_0_z_g2 , hexa_2_x_3_y_0_z_g2 , hexa_2_x_4_y_0_z_g2 , hexa_2_x_0_y_1_z_g2 , hexa_2_x_1_y_1_z_g2 , hexa_2_x_2_y_1_z_g2 , hexa_2_x_3_y_1_z_g2 , hexa_2_x_4_y_1_z_g2 , hexa_2_x_0_y_5_z_g2 , hexa_2_x_1_y_5_z_g2 , hexa_2_x_2_y_5_z_g2 , hexa_2_x_3_y_5_z_g2 , hexa_2_x_4_y_5_z_g2 , hexa_2_x_0_y_6_z_g2 , hexa_2_x_1_y_6_z_g2 , hexa_2_x_2_y_6_z_g2 , hexa_2_x_3_y_6_z_g2 , hexa_2_x_4_y_6_z_g2 ]
+
+for hexa_i in range(hexa_list_x_2_g2):
+       doc.removeHexa(hexa_i)
+
+
+
+# 4eme range x = 3
+
+hexa_3_x_0_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 0 , 0 )
+hexa_3_x_1_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 1 , 0 )
+hexa_3_x_2_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 2 , 0 )
+hexa_3_x_3_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 3 , 0 )
+hexa_3_x_4_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 4 , 0 )
+
+hexa_3_x_0_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 0 , 1 )
+hexa_3_x_1_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 1 , 1 )
+hexa_3_x_2_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 2 , 1 )
+hexa_3_x_3_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 3 , 1 )
+hexa_3_x_4_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 4 , 1 )
+
+hexa_3_x_0_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 0 , 4 )
+hexa_3_x_1_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 1 , 4 )
+hexa_3_x_2_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 2 , 4 )
+hexa_3_x_3_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 3 , 4 )
+hexa_3_x_4_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 4 , 4 )
+
+hexa_3_x_0_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 0 , 5 )
+hexa_3_x_1_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 1 , 5 )
+hexa_3_x_2_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 2 , 5 )
+hexa_3_x_3_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 3 , 5 )
+hexa_3_x_4_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 4 , 5 )
+
+hexa_3_x_0_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 0 , 6 )
+hexa_3_x_1_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 1 , 6 )
+hexa_3_x_2_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 2 , 6 )
+hexa_3_x_3_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 3 , 6 )
+hexa_3_x_4_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 3 , 4 , 6 )
+
+
+hexa_list_x_3_g2 = [ hexa_3_x_0_y_0_z_g2 , hexa_3_x_1_y_0_z_g2 , hexa_3_x_2_y_0_z_g2 , hexa_3_x_3_y_0_z_g2 , hexa_3_x_4_y_0_z_g2 , hexa_3_x_0_y_1_z_g2 , hexa_3_x_1_y_1_z_g2 , hexa_3_x_2_y_1_z_g2 , hexa_3_x_3_y_1_z_g2 , hexa_3_x_4_y_1_z_g2 , hexa_3_x_0_y_4_z_g2 , hexa_3_x_1_y_4_z_g2 , hexa_3_x_2_y_4_z_g2 , hexa_3_x_3_y_4_z_g2 , hexa_3_x_4_y_4_z_g2 , hexa_3_x_0_y_5_z_g2 , hexa_3_x_1_y_5_z_g2 , hexa_3_x_2_y_5_z_g2 , hexa_3_x_3_y_5_z_g2 , hexa_3_x_4_y_5_z_g2 , hexa_3_x_0_y_6_z_g2 , hexa_3_x_1_y_6_z_g2 , hexa_3_x_2_y_6_z_g2 , hexa_3_x_3_y_6_z_g2 , hexa_3_x_4_y_6_z_g2 ]
+
+for hexa_i in range(hexa_list_x_3_g2):
+       doc.removeHexa(hexa_i)
+
+
+# 5eme range x = 4
+
+hexa_4_x_0_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 0 , 0 )
+hexa_4_x_1_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 1 , 0 )
+hexa_4_x_2_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 0 )
+hexa_4_x_3_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 0 )
+hexa_4_x_4_y_0_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 0 )
+
+hexa_4_x_0_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 0 , 1 )
+hexa_4_x_1_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 1 , 1 )
+hexa_4_x_2_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 1 )
+hexa_4_x_3_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 1 )
+hexa_4_x_4_y_1_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 1 )
+
+hexa_4_x_0_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 0 , 3 )
+hexa_4_x_1_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 1 , 3 )
+hexa_4_x_2_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 3 )
+hexa_4_x_3_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 3 )
+hexa_4_x_4_y_3_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 3 )
+
+hexa_4_x_0_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 0 , 4 )
+hexa_4_x_1_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 1 , 4 )
+hexa_4_x_2_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 4 )
+hexa_4_x_3_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 4 )
+hexa_4_x_4_y_4_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 4 )
+
+hexa_4_x_0_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 0 , 5 )
+hexa_4_x_1_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 1 , 5 )
+hexa_4_x_2_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 5 )
+hexa_4_x_3_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 5 )
+hexa_4_x_4_y_5_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 5 )
+
+hexa_4_x_0_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 0 , 6 )
+hexa_4_x_1_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 1 , 6 )
+hexa_4_x_2_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 2 , 6 )
+hexa_4_x_3_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 3 , 6 )
+hexa_4_x_4_y_6_z_g2 = grille_cyl_2.getHexaXYZ( 4 , 4 , 6 )
+
+
+hexa_list_x_4_g2 = [ hexa_4_x_0_y_0_z_g2 , hexa_4_x_1_y_0_z_g2 , hexa_4_x_2_y_0_z_g2 , hexa_4_x_3_y_0_z_g2 , hexa_4_x_4_y_0_z_g2 , hexa_4_x_0_y_1_z_g2 , hexa_4_x_1_y_1_z_g2 , hexa_4_x_2_y_1_z_g2 , hexa_4_x_3_y_1_z_g2 , hexa_4_x_4_y_1_z_g2 , hexa_4_x_0_y_3_z_g2 , hexa_4_x_1_y_3_z_g2 , hexa_4_x_2_y_3_z_g2 , hexa_4_x_3_y_3_z_g2 , hexa_4_x_4_y_3_z_g2 , hexa_4_x_0_y_4_z_g2 , hexa_4_x_1_y_4_z_g2 , hexa_4_x_2_y_4_z_g2 , hexa_4_x_3_y_4_z_g2 , hexa_4_x_4_y_4_z_g2 , hexa_4_x_0_y_5_z_g2 , hexa_4_x_1_y_5_z_g2 , hexa_4_x_2_y_5_z_g2 , hexa_4_x_3_y_5_z_g2 , hexa_4_x_4_y_5_z_g2 , hexa_4_x_0_y_6_z_g2 , hexa_4_x_1_y_6_z_g2 , hexa_4_x_2_y_6_z_g2 , hexa_4_x_3_y_6_z_g2 , hexa_4_x_4_y_6_z_g2 ]
+
+for hexa_i in range(hexa_list_x_4_g2):
+       doc.removeHexa(hexa_i)
+
+
+# c est pas fini on doit supprimer encore qlqs couches des hexas deja crees
+
+z0 = 0
+z1 = 1*h
+#z1 = 1*(h/7)
+#z2 = 2*(h/7)
+#z3 = 3*(h/7)
+#z4 = 4*(h/7)
+#z5 = 5*(h/7)
+#z6 = 6*(h/7)
+#z7 = 7*(h/7) = h
+
+# reperer les vertex
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 7
+
+0 <= i < ni + 1 = 6
+0 <= j < nj + 1 = 6
+0 <= k < nk + 1 = 8
+
+vtx_2_h_ng2 = grille_cyl_2.getVertexXYZ( 0 , 1 , 7 )
+vtx_4_h_ng2 = grille_cyl_2.getVertexXYZ( 0 , 3 , 7 )
+vtx_6_h_ng2 = grille_cyl_2.getVertexXYZ( 0 , 5 , 6 )
+
+vtx_7_h_ng2 = doc.addVertex( P + 0.5 , 0 , (6*h)/7 )
+
+
+hexa_rempl_7 = doc.findHexa( vtx_2_h_ng2 , vtx_7_h_ng2 )
+hexa_rempl_7_8 = doc.findHexa( vtx_7_h_ng2 , vtx_4_h_ng2 )
+hexa_rempl_8 = doc.findHexa( vtx_4_h_ng2 , vtx_6_h_ng2 )
+
+
+hexa_list_rempl_g2 = [ hexa_rempl_7 , hexa_rempl_7_8 , hexa_rempl_8 ]
+
+for hexa_i in range(hexa_list_rempl_g2):
+       doc.removeHexa(hexa_i)
+
+
+
+# reperer les vertex
+
+z0 = 0
+z1 = 1*h
+#z1 = 1*(h/7)
+#z2 = 2*(h/7)
+#z3 = 3*(h/7)
+#z4 = 4*(h/7)
+#z5 = 5*(h/7)
+#z6 = 6*(h/7)
+#z7 = 7*(h/7) = h
+
+ni = nr1 = 4
+nj = na1 = 1
+nk = nl1 = 7
+
+0 <= i < ni + 1 = 5
+0 <= j < nj + 1 = 2
+0 <= k < nk + 1 = 8
+
+ni = nr2 = 5
+nj = na2 = 5
+nk = nl2 = 7
+
+0 <= i < ni + 1 = 6
+0 <= j < nj + 1 = 6
+0 <= k < nk + 1 = 8
+
+vtx_7_z_ng2 = grille_cyl_2.getVertexXYZ( 5 , 5 , 7 )
+vtx_5_z_ng2 = grille_cyl_2.getVertexXYZ( 5 , 5 , 5 )
+
+vtx_6_z_ng1 = grille_cyl_2.getVertexXYZ( 2 , 0 , 6 )
+vtx_4_z_ng1 = grille_cyl_2.getVertexXYZ( 2 , 0 , 4 )
+
+
+hexa_7_z_g1_g2 = doc.findHexa( vtx_7_z_ng2 , vtx_6_z_ng1 )
+hexa_6_z_g1_g2 = doc.findHexa( vtx_6_z_ng1 , vtx_5_z_ng2 )
+hexa_5_z_g1_g2 = doc.findHexa( vtx_5_z_ng2 , vtx_4_z_ng1 )
+
+
+hexa_list_rempl_g1_g2 = [ hexa_7_z_g1_g2 , hexa_6_z_g1_g2 , hexa_5_z_g1_g2 ]
+
+for hexa_i in range(hexa_list_rempl_g1_g2):
+       doc.removeHexa(hexa_i)
+
+
+
+# on doit compter le nombre des pts qui contient le document
+
+nbr_vtx = doc.countVertex()
+
+
+#==========================
+# CREATION ASSOCIATION
+#==========================
+
+Bride_geom = geompy.Import("/export/home/guest/Bureau/Karima/CAO_CEA/bride.brep", "BREP")
+
+geompy.addToStudy(Bride_geom, "Bride_geom")
+
+Pt_A = geompy.MakeVertex( 0 , 0 , 0 )
+DZ = geompy.MakeVector( 0 , 0 , 1 )
+
+
+#==============================================
+# Recuperation des pts pour la 1ere grille
+#==============================================
+
+
+z0 = -1
+z1 = 0
+z2 = 1.5
+z3 = 21.5
+z4 = 24
+z5 = 36
+z6 = 46.5
+z7 = 66.5
+
+#geom
+vx_g1_1c_y0_z0 = geompy.MakeVertex( r1_t , 0 , z0 )
+vx_g1_1c_y0_z1 = geompy.MakeVertex( r1_t , 0 , z1 )
+vx_g1_1c_y0_z2 = geompy.MakeVertex( r1_t , 0 , z2 )
+vx_g1_1c_y0_z3 = geompy.MakeVertex( r1_t , 0 , z3 )
+vx_g1_1c_y0_z4 = geompy.MakeVertex( r1_t , 0 , z4 )
+vx_g1_1c_y0_z5 = geompy.MakeVertex( r1_t , 0 , z5 )
+vx_g1_1c_y0_z6 = geompy.MakeVertex( r1_t , 0 , z6 )
+vx_g1_1c_y0_z7 = geompy.MakeVertex( r1_t , 0 , z7 )
+#8
+
+#modele
+vx_g1_x0_y0_z0_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 0 )
+vx_g1_x0_y0_z1_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 1 )
+vx_g1_x0_y0_z2_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 2 )
+vx_g1_x0_y0_z3_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 3 )
+vx_g1_x0_y0_z4_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 4 )
+vx_g1_x0_y0_z5_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 5 )
+vx_g1_x0_y0_z6_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 6 )
+vx_g1_x0_y0_z7_mod = grille_cyl_1.getVertexXYZ( 0 , 0 , 7 )
+
+#association
+vx_g1_x0_y0_z0_mod.setAssociation( vx_g1_1c_y0_z0 )
+vx_g1_x0_y0_z1_mod.setAssociation( vx_g1_1c_y0_z1 )
+vx_g1_x0_y0_z2_mod.setAssociation( vx_g1_1c_y0_z2 )
+vx_g1_x0_y0_z3_mod.setAssociation( vx_g1_1c_y0_z3 )
+vx_g1_x0_y0_z4_mod.setAssociation( vx_g1_1c_y0_z4 )
+vx_g1_x0_y0_z5_mod.setAssociation( vx_g1_1c_y0_z5 )
+vx_g1_x0_y0_z6_mod.setAssociation( vx_g1_1c_y0_z6 )
+vx_g1_x0_y0_z7_mod.setAssociation( vx_g1_1c_y0_z7 )
+
+
+#geom
+vx_g1_1c_y1_z0 = geompy.MakeRotation( vx_g1_1c_y0_z0 , DZ , math.pi/4 )
+vx_g1_1c_y1_z1 = geompy.MakeRotation( vx_g1_1c_y0_z1 , DZ , math.pi/4 )
+vx_g1_1c_y1_z2 = geompy.MakeRotation( vx_g1_1c_y0_z2 , DZ , math.pi/4 )
+vx_g1_1c_y1_z3 = geompy.MakeRotation( vx_g1_1c_y0_z3 , DZ , math.pi/4 )
+vx_g1_1c_y1_z4 = geompy.MakeRotation( vx_g1_1c_y0_z4 , DZ , math.pi/4 )
+vx_g1_1c_y1_z5 = geompy.MakeRotation( vx_g1_1c_y0_z5 , DZ , math.pi/4 )
+vx_g1_1c_y1_z6 = geompy.MakeRotation( vx_g1_1c_y0_z6 , DZ , math.pi/4 )
+vx_g1_1c_y1_z7 = geompy.MakeRotation( vx_g1_1c_y0_z7 , DZ , math.pi/4 )
+#8
+
+#modele
+vx_g1_x0_y1_z0_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 0 )
+vx_g1_x0_y1_z1_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 1 )
+vx_g1_x0_y1_z2_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 2 )
+vx_g1_x0_y1_z3_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 3 )
+vx_g1_x0_y1_z4_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 4 )
+vx_g1_x0_y1_z5_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 5 )
+vx_g1_x0_y1_z6_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 6 )
+vx_g1_x0_y1_z7_mod = grille_cyl_1.getVertexXYZ( 0 , 1 , 7 )
+
+#association
+vx_g1_x0_y1_z0_mod.setAssociation( vx_g1_1c_y1_z0 )
+vx_g1_x0_y1_z1_mod.setAssociation( vx_g1_1c_y1_z1 )
+vx_g1_x0_y1_z2_mod.setAssociation( vx_g1_1c_y1_z2 )
+vx_g1_x0_y1_z3_mod.setAssociation( vx_g1_1c_y1_z3 )
+vx_g1_x0_y1_z4_mod.setAssociation( vx_g1_1c_y1_z4 )
+vx_g1_x0_y1_z5_mod.setAssociation( vx_g1_1c_y1_z5 )
+vx_g1_x0_y1_z6_mod.setAssociation( vx_g1_1c_y1_z6 )
+vx_g1_x0_y1_z7_mod.setAssociation( vx_g1_1c_y1_z7 )
+
+
+#geom
+vx_g1_2c_y0_z0 = geompy.MakeVertex( 19 , 0 , z0 )
+vx_g1_2c_y0_z1 = geompy.MakeVertex( 19 , 0 , z1 )
+vx_g1_2c_y0_z2 = geompy.MakeVertex( 19 , 0 , z2 )
+vx_g1_2c_y0_z3 = geompy.MakeVertex( 19 , 0 , z3 )
+vx_g1_2c_y0_z4 = geompy.MakeVertex( 18.165 , 0 , z4 )
+vx_g1_2c_y0_z5 = geompy.MakeVertex( 14.157 , 0 , z5 )
+vx_g1_2c_y0_z6 = geompy.MakeVertex( 10.65 , 0 , z6 )
+vx_g1_2c_y0_z7 = geompy.MakeVertex( 10.65 , 0 , z7 )
+#8
+
+#modele
+vx_g1_x1_y0_z0_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 0 )
+vx_g1_x1_y0_z1_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 1 )
+vx_g1_x1_y0_z2_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 2 )
+vx_g1_x1_y0_z3_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 3 )
+vx_g1_x1_y0_z4_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 4 )
+vx_g1_x1_y0_z5_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 5 )
+vx_g1_x1_y0_z6_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 6 )
+vx_g1_x1_y0_z7_mod = grille_cyl_1.getVertexXYZ( 1 , 0 , 7 )
+
+#association
+vx_g1_x1_y0_z0_mod.setAssociation( vx_g1_2c_y0_z0 )
+vx_g1_x1_y0_z1_mod.setAssociation( vx_g1_2c_y0_z1 )
+vx_g1_x1_y0_z2_mod.setAssociation( vx_g1_2c_y0_z2 )
+vx_g1_x1_y0_z3_mod.setAssociation( vx_g1_2c_y0_z3 )
+vx_g1_x1_y0_z4_mod.setAssociation( vx_g1_2c_y0_z4 )
+vx_g1_x1_y0_z5_mod.setAssociation( vx_g1_2c_y0_z5 )
+vx_g1_x1_y0_z6_mod.setAssociation( vx_g1_2c_y0_z6 )
+vx_g1_x1_y0_z7_mod.setAssociation( vx_g1_2c_y0_z7 )
+
+
+
+#geom
+vx_g1_2c_y1_z0 = geompy.MakeRotation( vx_g1_2c_y0_z0 , DZ , math.pi/4 )
+vx_g1_2c_y1_z1 = geompy.MakeRotation( vx_g1_2c_y0_z1 , DZ , math.pi/4 )
+vx_g1_2c_y1_z2 = geompy.MakeRotation( vx_g1_2c_y0_z2 , DZ , math.pi/4 )
+vx_g1_2c_y1_z3 = geompy.MakeRotation( vx_g1_2c_y0_z3 , DZ , math.pi/4 )
+vx_g1_2c_y1_z4 = geompy.MakeRotation( vx_g1_2c_y0_z4 , DZ , math.pi/4 )
+vx_g1_2c_y1_z5 = geompy.MakeRotation( vx_g1_2c_y0_z5 , DZ , math.pi/4 )
+vx_g1_2c_y1_z6 = geompy.MakeRotation( vx_g1_2c_y0_z6 , DZ , math.pi/4 )
+vx_g1_2c_y1_z7 = geompy.MakeRotation( vx_g1_2c_y0_z7 , DZ , math.pi/4 )
+#8
+
+#modele
+vx_g1_x1_y1_z0_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 0 )
+vx_g1_x1_y1_z1_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 1 )
+vx_g1_x1_y1_z2_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 2 )
+vx_g1_x1_y1_z3_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 3 )
+vx_g1_x1_y1_z4_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 4 )
+vx_g1_x1_y1_z5_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 5 )
+vx_g1_x1_y1_z6_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 6 )
+vx_g1_x1_y1_z7_mod = grille_cyl_1.getVertexXYZ( 1 , 1 , 7 )
+
+#association
+vx_g1_x1_y1_z0_mod.setAssociation( vx_g1_2c_y1_z0 )
+vx_g1_x1_y1_z1_mod.setAssociation( vx_g1_2c_y1_z1 )
+vx_g1_x1_y1_z2_mod.setAssociation( vx_g1_2c_y1_z2 )
+vx_g1_x1_y1_z3_mod.setAssociation( vx_g1_2c_y1_z3 )
+vx_g1_x1_y1_z4_mod.setAssociation( vx_g1_2c_y1_z4 )
+vx_g1_x1_y1_z5_mod.setAssociation( vx_g1_2c_y1_z5 )
+vx_g1_x1_y1_z6_mod.setAssociation( vx_g1_2c_y1_z6 )
+vx_g1_x1_y1_z7_mod.setAssociation( vx_g1_2c_y1_z7 )
+
+
+
+
+
+#geom
+vx_g1_3c_y0_z0 = geompy.MakeVertex( 21 , 0 , z0 )
+vx_g1_3c_y0_z1 = geompy.MakeVertex( 21 , 0 , z1 )
+vx_g1_3c_y0_z2 = geompy.MakeVertex( 21 , 0 , z2 )
+vx_g1_3c_y0_z3 = geompy.MakeVertex( 21 , 0 , z3 )
+vx_g1_3c_y0_z4 = geompy.MakeVertex( 21 , 0 , z4 )
+#5
+
+#modele
+vx_g1_x2_y0_z0_mod = grille_cyl_1.getVertexXYZ( 2 , 0 , 0 )
+vx_g1_x2_y0_z1_mod = grille_cyl_1.getVertexXYZ( 2 , 0 , 1 )
+vx_g1_x2_y0_z2_mod = grille_cyl_1.getVertexXYZ( 2 , 0 , 2 )
+vx_g1_x2_y0_z3_mod = grille_cyl_1.getVertexXYZ( 2 , 0 , 3 )
+vx_g1_x2_y0_z4_mod = grille_cyl_1.getVertexXYZ( 2 , 0 , 4 )
+
+#association
+vx_g1_x2_y0_z0_mod.setAssociation( vx_g1_3c_y0_z0 )
+vx_g1_x2_y0_z1_mod.setAssociation( vx_g1_3c_y0_z1 )
+vx_g1_x2_y0_z2_mod.setAssociation( vx_g1_3c_y0_z2 )
+vx_g1_x2_y0_z3_mod.setAssociation( vx_g1_3c_y0_z3 )
+vx_g1_x2_y0_z4_mod.setAssociation( vx_g1_3c_y0_z4 )
+
+
+
+
+#geom
+vx_g1_3c_y1_z0 = geompy.MakeRotation( vx_g1_3c_y0_z0 , DZ , math.pi/4 )
+vx_g1_3c_y1_z1 = geompy.MakeRotation( vx_g1_3c_y0_z1 , DZ , math.pi/4 )
+vx_g1_3c_y1_z2 = geompy.MakeRotation( vx_g1_3c_y0_z2 , DZ , math.pi/4 )
+vx_g1_3c_y1_z3 = geompy.MakeRotation( vx_g1_3c_y0_z3 , DZ , math.pi/4 )
+#4
+
+#modele
+vx_g1_x2_y1_z0_mod = grille_cyl_1.getVertexXYZ( 2 , 1 , 0 )
+vx_g1_x2_y1_z1_mod = grille_cyl_1.getVertexXYZ( 2 , 1 , 1 )
+vx_g1_x2_y1_z2_mod = grille_cyl_1.getVertexXYZ( 2 , 1 , 2 )
+vx_g1_x2_y1_z3_mod = grille_cyl_1.getVertexXYZ( 2 , 1 , 3 )
+
+#association
+vx_g1_x2_y1_z0_mod.setAssociation( vx_g1_3c_y1_z0 )
+vx_g1_x2_y1_z1_mod.setAssociation( vx_g1_3c_y1_z1 )
+vx_g1_x2_y1_z2_mod.setAssociation( vx_g1_3c_y1_z2 )
+vx_g1_x2_y1_z3_mod.setAssociation( vx_g1_3c_y1_z3 )
+
+
+
+
+
+Circle_1_g1 = geompy.MakeCircle( Pt_A , DZ , 22.5 )
+Circle_2_g1 = geompy.MakeCircle( Pt_A , DZ , 24 )
+Circle_1_g2 = geompy.MakeCircle( Pt_A , DZ , 12.5 )
+
+
+#geom
+vx_g1_4c_y0_z1 = geompy.MakeVertexOnLinesIntersection( Circle_1_g1 , Circle_1_g2 )
+vx_g1_4c_y0_z0 = geompy.MakeTranslation( vx_g1_4c_y0_z1 , 0 , 0 , z0 )
+vx_g1_4c_y0_z2 = geompy.MakeTranslation( vx_g1_4c_y0_z1 , 0 , 0 , z2 )
+vx_g1_4c_y0_z3 = geompy.MakeTranslation( vx_g1_4c_y0_z1 , 0 , 0 , z3 )
+vx_g1_4c_y0_z4 = geompy.MakeTranslation( vx_g1_4c_y0_z1 , 0 , 0 , z4 )
+#5
+
+#modele
+vx_g1_x3_y0_z0_mod = grille_cyl_1.getVertexXYZ( 3 , 0 , 0 )
+vx_g1_x3_y0_z1_mod = grille_cyl_1.getVertexXYZ( 3 , 0 , 1 )
+vx_g1_x3_y0_z2_mod = grille_cyl_1.getVertexXYZ( 3 , 0 , 2 )
+vx_g1_x3_y0_z3_mod = grille_cyl_1.getVertexXYZ( 3 , 0 , 3 )
+vx_g1_x3_y0_z4_mod = grille_cyl_1.getVertexXYZ( 3 , 0 , 4 )
+
+#association
+vx_g1_x3_y0_z0_mod.setAssociation( vx_g1_4c_y0_z0 )
+vx_g1_x3_y0_z1_mod.setAssociation( vx_g1_4c_y0_z1 )
+vx_g1_x3_y0_z2_mod.setAssociation( vx_g1_4c_y0_z2 )
+vx_g1_x3_y0_z3_mod.setAssociation( vx_g1_4c_y0_z3 )
+vx_g1_x3_y0_z4_mod.setAssociation( vx_g1_4c_y0_z4 )
+
+
+
+#geom
+vx_g1_4c_y1_z0 = geompy.MakeRotation( vx_g1_4c_y0_z0 , DZ , (math.pi*32.5852370)/180 )
+vx_g1_4c_y1_z1 = geompy.MakeRotation( vx_g1_4c_y0_z1 , DZ , (math.pi*32.5852370)/180 )
+vx_g1_4c_y1_z2 = geompy.MakeRotation( vx_g1_4c_y0_z2 , DZ , (math.pi*32.5852370)/180 )
+vx_g1_4c_y1_z3 = geompy.MakeRotation( vx_g1_4c_y0_z3 , DZ , (math.pi*32.5852370)/180 )
+#4
+
+#modele
+vx_g1_x3_y1_z0_mod = grille_cyl_1.getVertexXYZ( 3 , 1 , 0 )
+vx_g1_x3_y1_z1_mod = grille_cyl_1.getVertexXYZ( 3 , 1 , 1 )
+vx_g1_x3_y1_z2_mod = grille_cyl_1.getVertexXYZ( 3 , 1 , 2 )
+vx_g1_x3_y1_z3_mod = grille_cyl_1.getVertexXYZ( 3 , 1 , 3 )
+
+#association
+vx_g1_x3_y1_z0_mod.setAssociation( vx_g1_4c_y1_z0 )
+vx_g1_x3_y1_z1_mod.setAssociation( vx_g1_4c_y1_z1 )
+vx_g1_x3_y1_z2_mod.setAssociation( vx_g1_4c_y1_z2 )
+vx_g1_x3_y1_z3_mod.setAssociation( vx_g1_4c_y1_z3 )
+
+
+
+
+#geom
+vx_g1_5c_y0_z1 = geompy.MakeVertexOnLinesIntersection( Circle_2_g1 , Circle_1_g2 )
+vx_g1_5c_y0_z0 = geompy.MakeTranslation( vx_g1_5c_y0_z1 , 0 , 0 , z0 )
+vx_g1_5c_y0_z2 = geompy.MakeTranslation( vx_g1_5c_y0_z1 , 0 , 0 , z2 )
+vx_g1_5c_y0_z3 = geompy.MakeTranslation( vx_g1_5c_y0_z1 , 0 , 0 , z3 )
+vx_g1_5c_y0_z4 = geompy.MakeTranslation( vx_g1_5c_y0_z1 , 0 , 0 , z4 )
+#5
+
+#modele
+vx_g1_x4_y0_z0_mod = grille_cyl_1.getVertexXYZ( 4 , 0 , 0 )
+vx_g1_x4_y0_z1_mod = grille_cyl_1.getVertexXYZ( 4 , 0 , 1 )
+vx_g1_x4_y0_z2_mod = grille_cyl_1.getVertexXYZ( 4 , 0 , 2 )
+vx_g1_x4_y0_z3_mod = grille_cyl_1.getVertexXYZ( 4 , 0 , 3 )
+vx_g1_x4_y0_z4_mod = grille_cyl_1.getVertexXYZ( 4 , 0 , 4 )
+
+#association
+vx_g1_x4_y0_z0_mod.setAssociation( vx_g1_5c_y0_z0 )
+vx_g1_x4_y0_z1_mod.setAssociation( vx_g1_5c_y0_z1 )
+vx_g1_x4_y0_z2_mod.setAssociation( vx_g1_5c_y0_z2 )
+vx_g1_x4_y0_z3_mod.setAssociation( vx_g1_5c_y0_z3 )
+vx_g1_x4_y0_z4_mod.setAssociation( vx_g1_5c_y0_z4 )
+
+
+
+#geom
+vx_g1_5c_y1_z0 = geompy.MakeRotation( vx_g1_5c_y0_z0 , DZ , (math.pi*32.5852370)/180 )
+vx_g1_5c_y1_z1 = geompy.MakeRotation( vx_g1_5c_y0_z1 , DZ , (math.pi*32.5852370)/180 )
+vx_g1_5c_y1_z2 = geompy.MakeRotation( vx_g1_5c_y0_z2 , DZ , (math.pi*32.5852370)/180 )
+vx_g1_5c_y1_z3 = geompy.MakeRotation( vx_g1_5c_y0_z3 , DZ , (math.pi*32.5852370)/180 )
+#4
+
+#modele
+vx_g1_x4_y1_z0_mod = grille_cyl_1.getVertexXYZ( 4 , 1 , 0 )
+vx_g1_x4_y1_z1_mod = grille_cyl_1.getVertexXYZ( 4 , 1 , 1 )
+vx_g1_x4_y1_z2_mod = grille_cyl_1.getVertexXYZ( 4 , 1 , 2 )
+vx_g1_x4_y1_z3_mod = grille_cyl_1.getVertexXYZ( 4 , 1 , 3 )
+
+#association
+vx_g1_x4_y1_z0_mod.setAssociation( vx_g1_5c_y1_z0 )
+vx_g1_x4_y1_z1_mod.setAssociation( vx_g1_5c_y1_z1 )
+vx_g1_x4_y1_z2_mod.setAssociation( vx_g1_5c_y1_z2 )
+vx_g1_x4_y1_z3_mod.setAssociation( vx_g1_5c_y1_z3 )
+
+
+
+
+
+#==============================================
+# Recuperation des pts pour la 2eme grille
+#==============================================
+
+z0 = -1
+z1 = 0
+z2 = 1.5
+z3 = 21.5
+z4 = 24
+z5 = 36
+z6 = 41.5
+
+
+f0 = 0
+f1 = 0.2
+f2 = 0.4
+f3 = 0.6
+f4 = 0.8
+f5 = 1
+
+
+Pt_B_1 = geompy.MakeVertex( 33.5 , 6 , 0 )
+Edge_B_1 = geompy.MakeEdgeNearPoint( Bride_geom , Pt_B_1 )
+
+#geom
+vx_g2_2c_f0_z1 = geompy.MakeVertexOnCurve( Edge_B_1 , f0 )
+vx_g2_2c_f1_z1 = geompy.MakeVertexOnCurve( Edge_B_1 , f1 )
+vx_g2_2c_f2_z1 = geompy.MakeVertexOnCurve( Edge_B_1 , f2 )
+vx_g2_2c_f3_z1 = geompy.MakeVertexOnCurve( Edge_B_1 , f3 )
+vx_g2_2c_f4_z1 = geompy.MakeVertexOnCurve( Edge_B_1 , f4 )
+vx_g2_2c_f5_z1 = geompy.MakeVertexOnCurve( Edge_B_1 , f5 )
+
+#modele
+vx_g2_x1_y0_z1_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 1 )
+vx_g2_x1_y1_z1_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 1 )
+vx_g2_x1_y2_z1_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 1 )
+vx_g2_x1_y3_z1_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 1 )
+vx_g2_x1_y4_z1_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 1 )
+vx_g2_x1_y5_z1_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 1 )
+
+#association
+vx_g2_x1_y0_z1_mod.setAssociation( vx_g2_2c_f0_z1 )
+vx_g2_x1_y1_z1_mod.setAssociation( vx_g2_2c_f1_z1 )
+vx_g2_x1_y2_z1_mod.setAssociation( vx_g2_2c_f2_z1 )
+vx_g2_x1_y3_z1_mod.setAssociation( vx_g2_2c_f3_z1 )
+vx_g2_x1_y4_z1_mod.setAssociation( vx_g2_2c_f4_z1 )
+vx_g2_x1_y5_z1_mod.setAssociation( vx_g2_2c_f5_z1 )
+
+
+
+
+#geom
+vx_g2_2c_f0_z0 = geompy.MakeTranslation( vx_g2_2c_f0_z1 , 0 , 0 , z0  )
+vx_g2_2c_f1_z0 = geompy.MakeTranslation( vx_g2_2c_f1_z1 , 0 , 0 , z0  )
+vx_g2_2c_f2_z0 = geompy.MakeTranslation( vx_g2_2c_f2_z1 , 0 , 0 , z0  )
+vx_g2_2c_f3_z0 = geompy.MakeTranslation( vx_g2_2c_f3_z1 , 0 , 0 , z0  )
+vx_g2_2c_f4_z0 = geompy.MakeTranslation( vx_g2_2c_f4_z1 , 0 , 0 , z0  )
+vx_g2_2c_f5_z0 = geompy.MakeTranslation( vx_g2_2c_f5_z1 , 0 , 0 , z0  )
+
+#modele
+vx_g2_x1_y0_z0_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 0 )
+vx_g2_x1_y1_z0_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 0 )
+vx_g2_x1_y2_z0_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 0 )
+vx_g2_x1_y3_z0_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 0 )
+vx_g2_x1_y4_z0_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 0 )
+vx_g2_x1_y5_z0_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 0 )
+
+#association
+vx_g2_x1_y0_z0_mod.setAssociation( vx_g2_2c_f0_z0 )
+vx_g2_x1_y1_z0_mod.setAssociation( vx_g2_2c_f1_z0 )
+vx_g2_x1_y2_z0_mod.setAssociation( vx_g2_2c_f2_z0 )
+vx_g2_x1_y3_z0_mod.setAssociation( vx_g2_2c_f3_z0 )
+vx_g2_x1_y4_z0_mod.setAssociation( vx_g2_2c_f4_z0 )
+vx_g2_x1_y5_z0_mod.setAssociation( vx_g2_2c_f5_z0 )
+
+
+#geom
+vx_g2_2c_f0_z2 = geompy.MakeTranslation( vx_g2_2c_f0_z1 , 0 , 0 , z2  )
+vx_g2_2c_f1_z2 = geompy.MakeTranslation( vx_g2_2c_f1_z1 , 0 , 0 , z2  )
+vx_g2_2c_f2_z2 = geompy.MakeTranslation( vx_g2_2c_f2_z1 , 0 , 0 , z2  )
+vx_g2_2c_f3_z2 = geompy.MakeTranslation( vx_g2_2c_f3_z1 , 0 , 0 , z2  )
+vx_g2_2c_f4_z2 = geompy.MakeTranslation( vx_g2_2c_f4_z1 , 0 , 0 , z2  )
+vx_g2_2c_f5_z2 = geompy.MakeTranslation( vx_g2_2c_f5_z1 , 0 , 0 , z2  )
+
+#modele
+vx_g2_x1_y0_z2_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 2 )
+vx_g2_x1_y1_z2_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 2 )
+vx_g2_x1_y2_z2_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 2 )
+vx_g2_x1_y3_z2_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 2 )
+vx_g2_x1_y4_z2_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 2 )
+vx_g2_x1_y5_z2_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 2 )
+
+#association
+vx_g2_x1_y0_z2_mod.setAssociation( vx_g2_2c_f0_z2 )
+vx_g2_x1_y1_z2_mod.setAssociation( vx_g2_2c_f1_z2 )
+vx_g2_x1_y2_z2_mod.setAssociation( vx_g2_2c_f2_z2 )
+vx_g2_x1_y3_z2_mod.setAssociation( vx_g2_2c_f3_z2 )
+vx_g2_x1_y4_z2_mod.setAssociation( vx_g2_2c_f4_z2 )
+vx_g2_x1_y5_z2_mod.setAssociation( vx_g2_2c_f5_z2 )
+
+
+#geom
+vx_g2_2c_f0_z3 = geompy.MakeTranslation( vx_g2_2c_f0_z1 , 0 , 0 , z3  )
+vx_g2_2c_f1_z3 = geompy.MakeTranslation( vx_g2_2c_f1_z1 , 0 , 0 , z3  )
+vx_g2_2c_f2_z3 = geompy.MakeTranslation( vx_g2_2c_f2_z1 , 0 , 0 , z3  )
+vx_g2_2c_f3_z3 = geompy.MakeTranslation( vx_g2_2c_f3_z1 , 0 , 0 , z3  )
+vx_g2_2c_f4_z3 = geompy.MakeTranslation( vx_g2_2c_f4_z1 , 0 , 0 , z3  )
+vx_g2_2c_f5_z3 = geompy.MakeTranslation( vx_g2_2c_f5_z1 , 0 , 0 , z3  )
+
+#modele
+vx_g2_x1_y0_z3_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 3 )
+vx_g2_x1_y1_z3_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 3 )
+vx_g2_x1_y2_z3_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 3 )
+vx_g2_x1_y3_z3_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 3 )
+vx_g2_x1_y4_z3_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 3 )
+vx_g2_x1_y5_z3_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 3 )
+
+#association
+vx_g2_x1_y0_z3_mod.setAssociation( vx_g2_2c_f0_z3 )
+vx_g2_x1_y1_z3_mod.setAssociation( vx_g2_2c_f1_z3 )
+vx_g2_x1_y2_z3_mod.setAssociation( vx_g2_2c_f2_z3 )
+vx_g2_x1_y3_z3_mod.setAssociation( vx_g2_2c_f3_z3 )
+vx_g2_x1_y4_z3_mod.setAssociation( vx_g2_2c_f4_z3 )
+vx_g2_x1_y5_z3_mod.setAssociation( vx_g2_2c_f5_z3 )
+
+
+
+#geom
+vx_g2_2c_f0_z4 = geompy.MakeTranslation( vx_g2_2c_f0_z1 , 0 , 0 , z4  )
+vx_g2_2c_f1_z4 = geompy.MakeTranslation( vx_g2_2c_f1_z1 , 0 , 0 , z4  )
+vx_g2_2c_f2_z4 = geompy.MakeTranslation( vx_g2_2c_f2_z1 , 0 , 0 , z4  )
+vx_g2_2c_f3_z4 = geompy.MakeTranslation( vx_g2_2c_f3_z1 , 0 , 0 , z4  )
+vx_g2_2c_f4_z4 = geompy.MakeTranslation( vx_g2_2c_f4_z1 , 0 , 0 , z4  )
+vx_g2_2c_f5_z4 = geompy.MakeTranslation( vx_g2_2c_f5_z1 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x1_y0_z4_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 4 )
+vx_g2_x1_y1_z4_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 4 )
+vx_g2_x1_y2_z4_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 4 )
+vx_g2_x1_y3_z4_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 4 )
+vx_g2_x1_y4_z4_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 4 )
+vx_g2_x1_y5_z4_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 4 )
+
+#association
+vx_g2_x1_y0_z4_mod.setAssociation( vx_g2_2c_f0_z4 )
+vx_g2_x1_y1_z4_mod.setAssociation( vx_g2_2c_f1_z4 )
+vx_g2_x1_y2_z4_mod.setAssociation( vx_g2_2c_f2_z4 )
+vx_g2_x1_y3_z4_mod.setAssociation( vx_g2_2c_f3_z4 )
+vx_g2_x1_y4_z4_mod.setAssociation( vx_g2_2c_f4_z4 )
+vx_g2_x1_y5_z4_mod.setAssociation( vx_g2_2c_f5_z4 )
+
+
+#geom
+vx_g2_2c_f0_z5 = geompy.MakeTranslation( vx_g2_2c_f0_z1 , 0 , 0 , z5  )
+vx_g2_2c_f1_z5 = geompy.MakeTranslation( vx_g2_2c_f1_z1 , 0 , 0 , z5  )
+vx_g2_2c_f2_z5 = geompy.MakeTranslation( vx_g2_2c_f2_z1 , 0 , 0 , z5  )
+vx_g2_2c_f3_z5 = geompy.MakeTranslation( vx_g2_2c_f3_z1 , 0 , 0 , z5  )
+vx_g2_2c_f4_z5 = geompy.MakeTranslation( vx_g2_2c_f4_z1 , 0 , 0 , z5  )
+vx_g2_2c_f5_z5 = geompy.MakeTranslation( vx_g2_2c_f5_z1 , 0 , 0 , z5  )
+
+#modele
+vx_g2_x1_y0_z5_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 5 )
+vx_g2_x1_y1_z5_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 5 )
+vx_g2_x1_y2_z5_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 5 )
+vx_g2_x1_y3_z5_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 5 )
+vx_g2_x1_y4_z5_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 5 )
+vx_g2_x1_y5_z5_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 5 )
+
+#association
+vx_g2_x1_y0_z5_mod.setAssociation( vx_g2_2c_f0_z5 )
+vx_g2_x1_y1_z5_mod.setAssociation( vx_g2_2c_f1_z5 )
+vx_g2_x1_y2_z5_mod.setAssociation( vx_g2_2c_f2_z5 )
+vx_g2_x1_y3_z5_mod.setAssociation( vx_g2_2c_f3_z5 )
+vx_g2_x1_y4_z5_mod.setAssociation( vx_g2_2c_f4_z5 )
+vx_g2_x1_y5_z5_mod.setAssociation( vx_g2_2c_f5_z5 )
+
+
+#geom
+vx_g2_2c_f0_z6 = geompy.MakeTranslation( vx_g2_2c_f0_z1 , 0 , 0 , z6  )
+vx_g2_2c_f1_z6 = geompy.MakeTranslation( vx_g2_2c_f1_z1 , 0 , 0 , z6  )
+vx_g2_2c_f2_z6 = geompy.MakeTranslation( vx_g2_2c_f2_z1 , 0 , 0 , z6  )
+vx_g2_2c_f3_z6 = geompy.MakeTranslation( vx_g2_2c_f3_z1 , 0 , 0 , z6  )
+vx_g2_2c_f4_z6 = geompy.MakeTranslation( vx_g2_2c_f4_z1 , 0 , 0 , z6  )
+vx_g2_2c_f5_z6 = geompy.MakeTranslation( vx_g2_2c_f5_z1 , 0 , 0 , z6  )
+
+#modele
+vx_g2_x1_y0_z6_mod = grille_cyl_2.getVertexXYZ( 1 , 0 , 6 )
+vx_g2_x1_y1_z6_mod = grille_cyl_2.getVertexXYZ( 1 , 1 , 6 )
+vx_g2_x1_y2_z6_mod = grille_cyl_2.getVertexXYZ( 1 , 2 , 6 )
+vx_g2_x1_y3_z6_mod = grille_cyl_2.getVertexXYZ( 1 , 3 , 6 )
+vx_g2_x1_y4_z6_mod = grille_cyl_2.getVertexXYZ( 1 , 4 , 6 )
+vx_g2_x1_y5_z6_mod = grille_cyl_2.getVertexXYZ( 1 , 5 , 6 )
+
+#association
+vx_g2_x1_y0_z6_mod.setAssociation( vx_g2_2c_f0_z6 )
+vx_g2_x1_y1_z6_mod.setAssociation( vx_g2_2c_f1_z6 )
+vx_g2_x1_y2_z6_mod.setAssociation( vx_g2_2c_f2_z6 )
+vx_g2_x1_y3_z6_mod.setAssociation( vx_g2_2c_f3_z6 )
+vx_g2_x1_y4_z6_mod.setAssociation( vx_g2_2c_f4_z6 )
+vx_g2_x1_y5_z6_mod.setAssociation( vx_g2_2c_f5_z6 )
+
+
+
+
+Pt_B_2 = geompy.MakeVertex( 33.5 , 7 , 1.5 )
+Edge_B_2 = geompy.MakeEdgeNearPoint( Bride_geom , Pt_B_2 )
+
+#geom
+vx_g2_3c_f0_z2 = geompy.MakeVertexOnCurve( Edge_B_2 , f0 )
+vx_g2_3c_f1_z2 = geompy.MakeVertexOnCurve( Edge_B_2 , f1 )
+vx_g2_3c_f2_z2 = geompy.MakeVertexOnCurve( Edge_B_2 , f2 )
+vx_g2_3c_f3_z2 = geompy.MakeVertexOnCurve( Edge_B_2 , f3 )
+vx_g2_3c_f4_z2 = geompy.MakeVertexOnCurve( Edge_B_2 , f4 )
+vx_g2_3c_f5_z2 = geompy.MakeVertexOnCurve( Edge_B_2 , f5 )
+
+#modele
+vx_g2_x2_y0_z2_mod = grille_cyl_2.getVertexXYZ( 2 , 0 , 2 )
+vx_g2_x2_y1_z2_mod = grille_cyl_2.getVertexXYZ( 2 , 1 , 2 )
+vx_g2_x2_y2_z2_mod = grille_cyl_2.getVertexXYZ( 2 , 2 , 2 )
+vx_g2_x2_y3_z2_mod = grille_cyl_2.getVertexXYZ( 2 , 3 , 2 )
+vx_g2_x2_y4_z2_mod = grille_cyl_2.getVertexXYZ( 2 , 4 , 2 )
+vx_g2_x2_y5_z2_mod = grille_cyl_2.getVertexXYZ( 2 , 5 , 2 )
+
+#association
+vx_g2_x2_y0_z2_mod.setAssociation( vx_g2_3c_f0_z2 )
+vx_g2_x2_y1_z2_mod.setAssociation( vx_g2_3c_f1_z2 )
+vx_g2_x2_y2_z2_mod.setAssociation( vx_g2_3c_f2_z2 )
+vx_g2_x2_y3_z2_mod.setAssociation( vx_g2_3c_f3_z2 )
+vx_g2_x2_y4_z2_mod.setAssociation( vx_g2_3c_f4_z2 )
+vx_g2_x2_y5_z2_mod.setAssociation( vx_g2_3c_f5_z2 )
+
+
+#geom
+vx_g2_3c_f0_z3 = geompy.MakeTranslation( vx_g2_3c_f0_z2 , 0 , 0 , z3  )
+vx_g2_3c_f1_z3 = geompy.MakeTranslation( vx_g2_3c_f1_z2 , 0 , 0 , z3  )
+vx_g2_3c_f2_z3 = geompy.MakeTranslation( vx_g2_3c_f2_z2 , 0 , 0 , z3  )
+vx_g2_3c_f3_z3 = geompy.MakeTranslation( vx_g2_3c_f3_z2 , 0 , 0 , z3  )
+vx_g2_3c_f4_z3 = geompy.MakeTranslation( vx_g2_3c_f4_z2 , 0 , 0 , z3  )
+vx_g2_3c_f5_z3 = geompy.MakeTranslation( vx_g2_3c_f5_z2 , 0 , 0 , z3  )
+
+#modele
+vx_g2_x2_y0_z3_mod = grille_cyl_2.getVertexXYZ( 2 , 0 , 3 )
+vx_g2_x2_y1_z3_mod = grille_cyl_2.getVertexXYZ( 2 , 1 , 3 )
+vx_g2_x2_y2_z3_mod = grille_cyl_2.getVertexXYZ( 2 , 2 , 3 )
+vx_g2_x2_y3_z3_mod = grille_cyl_2.getVertexXYZ( 2 , 3 , 3 )
+vx_g2_x2_y4_z3_mod = grille_cyl_2.getVertexXYZ( 2 , 4 , 3 )
+vx_g2_x2_y5_z3_mod = grille_cyl_2.getVertexXYZ( 2 , 5 , 3 )
+
+#association
+vx_g2_x2_y0_z3_mod.setAssociation( vx_g2_3c_f0_z3 )
+vx_g2_x2_y1_z3_mod.setAssociation( vx_g2_3c_f1_z3 )
+vx_g2_x2_y2_z3_mod.setAssociation( vx_g2_3c_f2_z3 )
+vx_g2_x2_y3_z3_mod.setAssociation( vx_g2_3c_f3_z3 )
+vx_g2_x2_y4_z3_mod.setAssociation( vx_g2_3c_f4_z3 )
+vx_g2_x2_y5_z3_mod.setAssociation( vx_g2_3c_f5_z3 )
+
+
+#geom
+vx_g2_3c_f0_z4 = geompy.MakeTranslation( vx_g2_3c_f0_z2 , 0 , 0 , z4  )
+vx_g2_3c_f1_z4 = geompy.MakeTranslation( vx_g2_3c_f1_z2 , 0 , 0 , z4  )
+vx_g2_3c_f2_z4 = geompy.MakeTranslation( vx_g2_3c_f2_z2 , 0 , 0 , z4  )
+vx_g2_3c_f3_z4 = geompy.MakeTranslation( vx_g2_3c_f3_z2 , 0 , 0 , z4  )
+vx_g2_3c_f4_z4 = geompy.MakeTranslation( vx_g2_3c_f4_z2 , 0 , 0 , z4  )
+vx_g2_3c_f5_z4 = geompy.MakeTranslation( vx_g2_3c_f5_z2 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x2_y0_z4_mod = grille_cyl_2.getVertexXYZ( 2 , 0 , 4 )
+vx_g2_x2_y1_z4_mod = grille_cyl_2.getVertexXYZ( 2 , 1 , 4 )
+vx_g2_x2_y2_z4_mod = grille_cyl_2.getVertexXYZ( 2 , 2 , 4 )
+vx_g2_x2_y3_z4_mod = grille_cyl_2.getVertexXYZ( 2 , 3 , 4 )
+vx_g2_x2_y4_z4_mod = grille_cyl_2.getVertexXYZ( 2 , 4 , 4 )
+vx_g2_x2_y5_z4_mod = grille_cyl_2.getVertexXYZ( 2 , 5 , 4 )
+
+#association
+vx_g2_x2_y0_z4_mod.setAssociation( vx_g2_3c_f0_z4 )
+vx_g2_x2_y1_z4_mod.setAssociation( vx_g2_3c_f1_z4 )
+vx_g2_x2_y2_z4_mod.setAssociation( vx_g2_3c_f2_z4 )
+vx_g2_x2_y3_z4_mod.setAssociation( vx_g2_3c_f3_z4 )
+vx_g2_x2_y4_z4_mod.setAssociation( vx_g2_3c_f4_z4 )
+vx_g2_x2_y5_z4_mod.setAssociation( vx_g2_3c_f5_z4 )
+
+
+#geom
+vx_g2_3c_f0_z5 = geompy.MakeTranslation( vx_g2_3c_f0_z2 , 0 , 0 , z5  )
+vx_g2_3c_f1_z5 = geompy.MakeTranslation( vx_g2_3c_f1_z2 , 0 , 0 , z5  )
+vx_g2_3c_f2_z5 = geompy.MakeTranslation( vx_g2_3c_f2_z2 , 0 , 0 , z5  )
+vx_g2_3c_f3_z5 = geompy.MakeTranslation( vx_g2_3c_f3_z2 , 0 , 0 , z5  )
+vx_g2_3c_f4_z5 = geompy.MakeTranslation( vx_g2_3c_f4_z2 , 0 , 0 , z5  )
+vx_g2_3c_f5_z5 = geompy.MakeTranslation( vx_g2_3c_f5_z2 , 0 , 0 , z5  )
+
+#modele
+vx_g2_x2_y0_z5_mod = grille_cyl_2.getVertexXYZ( 2 , 0 , 5 )
+vx_g2_x2_y1_z5_mod = grille_cyl_2.getVertexXYZ( 2 , 1 , 5 )
+vx_g2_x2_y2_z5_mod = grille_cyl_2.getVertexXYZ( 2 , 2 , 5 )
+vx_g2_x2_y3_z5_mod = grille_cyl_2.getVertexXYZ( 2 , 3 , 5 )
+vx_g2_x2_y4_z5_mod = grille_cyl_2.getVertexXYZ( 2 , 4 , 5 )
+vx_g2_x2_y5_z5_mod = grille_cyl_2.getVertexXYZ( 2 , 5 , 5 )
+
+#association
+vx_g2_x2_y0_z5_mod.setAssociation( vx_g2_3c_f0_z5 )
+vx_g2_x2_y1_z5_mod.setAssociation( vx_g2_3c_f1_z5 )
+vx_g2_x2_y2_z5_mod.setAssociation( vx_g2_3c_f2_z5 )
+vx_g2_x2_y3_z5_mod.setAssociation( vx_g2_3c_f3_z5 )
+vx_g2_x2_y4_z5_mod.setAssociation( vx_g2_3c_f4_z5 )
+vx_g2_x2_y5_z5_mod.setAssociation( vx_g2_3c_f5_z5 )
+
+
+
+
+Pt_B_3 = geompy.MakeVertex( 33.5 , 9 , 1.5 )
+Edge_B_3 = geompy.MakeEdgeNearPoint( Bride_geom , Pt_B_3 )
+
+#geom
+vx_g2_4c_f0_z2 = geompy.MakeVertexOnCurve( Edge_B_3 , f0 )
+vx_g2_4c_f1_z2 = geompy.MakeVertexOnCurve( Edge_B_3 , f1 )
+vx_g2_4c_f2_z2 = geompy.MakeVertexOnCurve( Edge_B_3 , f2 )
+vx_g2_4c_f3_z2 = geompy.MakeVertexOnCurve( Edge_B_3 , f3 )
+vx_g2_4c_f4_z2 = geompy.MakeVertexOnCurve( Edge_B_3 , f4 )
+vx_g2_4c_f5_z2 = geompy.MakeVertexOnCurve( Edge_B_3 , f5 )
+
+#modele
+vx_g2_x3_y0_z2_mod = grille_cyl_2.getVertexXYZ( 3 , 0 , 2 )
+vx_g2_x3_y1_z2_mod = grille_cyl_2.getVertexXYZ( 3 , 1 , 2 )
+vx_g2_x3_y2_z2_mod = grille_cyl_2.getVertexXYZ( 3 , 2 , 2 )
+vx_g2_x3_y3_z2_mod = grille_cyl_2.getVertexXYZ( 3 , 3 , 2 )
+vx_g2_x3_y4_z2_mod = grille_cyl_2.getVertexXYZ( 3 , 4 , 2 )
+vx_g2_x3_y5_z2_mod = grille_cyl_2.getVertexXYZ( 3 , 5 , 2 )
+
+#association
+vx_g2_x3_y0_z2_mod.setAssociation( vx_g2_4c_f0_z2 )
+vx_g2_x3_y1_z2_mod.setAssociation( vx_g2_4c_f1_z2 )
+vx_g2_x3_y2_z2_mod.setAssociation( vx_g2_4c_f2_z2 )
+vx_g2_x3_y3_z2_mod.setAssociation( vx_g2_4c_f3_z2 )
+vx_g2_x3_y4_z2_mod.setAssociation( vx_g2_4c_f4_z2 )
+vx_g2_x3_y5_z2_mod.setAssociation( vx_g2_4c_f5_z2 )
+
+
+#geom
+vx_g2_4c_f0_z3 = geompy.MakeTranslation( vx_g2_4c_f0_z2 , 0 , 0 , z3  )
+vx_g2_4c_f1_z3 = geompy.MakeTranslation( vx_g2_4c_f1_z2 , 0 , 0 , z3  )
+vx_g2_4c_f2_z3 = geompy.MakeTranslation( vx_g2_4c_f2_z2 , 0 , 0 , z3  )
+vx_g2_4c_f3_z3 = geompy.MakeTranslation( vx_g2_4c_f3_z2 , 0 , 0 , z3  )
+vx_g2_4c_f4_z3 = geompy.MakeTranslation( vx_g2_4c_f4_z2 , 0 , 0 , z3  )
+vx_g2_4c_f5_z3 = geompy.MakeTranslation( vx_g2_4c_f5_z2 , 0 , 0 , z3  )
+
+#modele
+vx_g2_x3_y0_z3_mod = grille_cyl_2.getVertexXYZ( 3 , 0 , 3 )
+vx_g2_x3_y1_z3_mod = grille_cyl_2.getVertexXYZ( 3 , 1 , 3 )
+vx_g2_x3_y2_z3_mod = grille_cyl_2.getVertexXYZ( 3 , 2 , 3 )
+vx_g2_x3_y3_z3_mod = grille_cyl_2.getVertexXYZ( 3 , 3 , 3 )
+vx_g2_x3_y4_z3_mod = grille_cyl_2.getVertexXYZ( 3 , 4 , 3 )
+vx_g2_x3_y5_z3_mod = grille_cyl_2.getVertexXYZ( 3 , 5 , 3 )
+
+#association
+vx_g2_x3_y0_z3_mod.setAssociation( vx_g2_4c_f0_z3 )
+vx_g2_x3_y1_z3_mod.setAssociation( vx_g2_4c_f1_z3 )
+vx_g2_x3_y2_z3_mod.setAssociation( vx_g2_4c_f2_z3 )
+vx_g2_x3_y3_z3_mod.setAssociation( vx_g2_4c_f3_z3 )
+vx_g2_x3_y4_z3_mod.setAssociation( vx_g2_4c_f4_z3 )
+vx_g2_x3_y5_z3_mod.setAssociation( vx_g2_4c_f5_z3 )
+
+
+#geom
+vx_g2_4c_f0_z4 = geompy.MakeTranslation( vx_g2_4c_f0_z2 , 0 , 0 , z4  )
+vx_g2_4c_f1_z4 = geompy.MakeTranslation( vx_g2_4c_f1_z2 , 0 , 0 , z4  )
+vx_g2_4c_f2_z4 = geompy.MakeTranslation( vx_g2_4c_f2_z2 , 0 , 0 , z4  )
+vx_g2_4c_f3_z4 = geompy.MakeTranslation( vx_g2_4c_f3_z2 , 0 , 0 , z4  )
+vx_g2_4c_f4_z4 = geompy.MakeTranslation( vx_g2_4c_f4_z2 , 0 , 0 , z4  )
+vx_g2_4c_f5_z4 = geompy.MakeTranslation( vx_g2_4c_f5_z2 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x3_y0_z4_mod = grille_cyl_2.getVertexXYZ( 3 , 0 , 4 )
+vx_g2_x3_y1_z4_mod = grille_cyl_2.getVertexXYZ( 3 , 1 , 4 )
+vx_g2_x3_y2_z4_mod = grille_cyl_2.getVertexXYZ( 3 , 2 , 4 )
+vx_g2_x3_y3_z4_mod = grille_cyl_2.getVertexXYZ( 3 , 3 , 4 )
+vx_g2_x3_y4_z4_mod = grille_cyl_2.getVertexXYZ( 3 , 4 , 4 )
+vx_g2_x3_y5_z4_mod = grille_cyl_2.getVertexXYZ( 3 , 5 , 4 )
+
+#association
+vx_g2_x3_y0_z4_mod.setAssociation( vx_g2_4c_f0_z4 )
+vx_g2_x3_y1_z4_mod.setAssociation( vx_g2_4c_f1_z4 )
+vx_g2_x3_y2_z4_mod.setAssociation( vx_g2_4c_f2_z4 )
+vx_g2_x3_y3_z4_mod.setAssociation( vx_g2_4c_f3_z4 )
+vx_g2_x3_y4_z4_mod.setAssociation( vx_g2_4c_f4_z4 )
+vx_g2_x3_y5_z4_mod.setAssociation( vx_g2_4c_f5_z4 )
+
+
+#geom
+vx_g2_4c_f0_z5 = geompy.MakeTranslation( vx_g2_4c_f0_z2 , 0 , 0 , z5  )
+vx_g2_4c_f1_z5 = geompy.MakeTranslation( vx_g2_4c_f1_z2 , 0 , 0 , z5  )
+vx_g2_4c_f2_z5 = geompy.MakeTranslation( vx_g2_4c_f2_z2 , 0 , 0 , z5  )
+vx_g2_4c_f3_z5 = geompy.MakeTranslation( vx_g2_4c_f3_z2 , 0 , 0 , z5  )
+vx_g2_4c_f4_z5 = geompy.MakeTranslation( vx_g2_4c_f4_z2 , 0 , 0 , z5  )
+vx_g2_4c_f5_z5 = geompy.MakeTranslation( vx_g2_4c_f5_z2 , 0 , 0 , z5  )
+
+#modele
+vx_g2_x3_y0_z5_mod = grille_cyl_2.getVertexXYZ( 3 , 0 , 5 )
+vx_g2_x3_y1_z5_mod = grille_cyl_2.getVertexXYZ( 3 , 1 , 5 )
+vx_g2_x3_y2_z5_mod = grille_cyl_2.getVertexXYZ( 3 , 2 , 5 )
+vx_g2_x3_y3_z5_mod = grille_cyl_2.getVertexXYZ( 3 , 3 , 5 )
+vx_g2_x3_y4_z5_mod = grille_cyl_2.getVertexXYZ( 3 , 4 , 5 )
+vx_g2_x3_y5_z5_mod = grille_cyl_2.getVertexXYZ( 3 , 5 , 5 )
+
+#association
+vx_g2_x3_y0_z5_mod.setAssociation( vx_g2_4c_f0_z5 )
+vx_g2_x3_y1_z5_mod.setAssociation( vx_g2_4c_f1_z5 )
+vx_g2_x3_y2_z5_mod.setAssociation( vx_g2_4c_f2_z5 )
+vx_g2_x3_y3_z5_mod.setAssociation( vx_g2_4c_f3_z5 )
+vx_g2_x3_y4_z5_mod.setAssociation( vx_g2_4c_f4_z5 )
+vx_g2_x3_y5_z5_mod.setAssociation( vx_g2_4c_f5_z5 )
+
+
+
+
+Pt_B_4 = geompy.MakeVertex( 33.5 , 12.5 , 1.5 )
+Edge_B_4 = geompy.MakeEdgeNearPoint( Bride_geom , Pt_B_4 )
+
+#geom
+vx_g2_5c_f0_z2 = geompy.MakeVertexOnCurve( Edge_B_4 , f0 )
+vx_g2_5c_f1_z2 = geompy.MakeVertexOnCurve( Edge_B_4 , f1 )
+vx_g2_5c_f2_z2 = geompy.MakeVertexOnCurve( Edge_B_4 , f2 )
+
+#modele
+vx_g2_x4_y0_z2_mod = grille_cyl_2.getVertexXYZ( 4 , 0 , 2 )
+vx_g2_x4_y1_z2_mod = grille_cyl_2.getVertexXYZ( 4 , 1 , 2 )
+vx_g2_x4_y2_z2_mod = grille_cyl_2.getVertexXYZ( 4 , 2 , 2 )
+
+#association
+vx_g2_x4_y0_z2_mod.setAssociation( vx_g2_5c_f0_z2 )
+vx_g2_x4_y1_z2_mod.setAssociation( vx_g2_5c_f1_z2 )
+vx_g2_x4_y2_z2_mod.setAssociation( vx_g2_5c_f2_z2 )
+
+
+#geom
+vx_g2_5c_f0_z3 = geompy.MakeTranslation( vx_g2_5c_f0_z2 , 0 , 0 , z3  )
+vx_g2_5c_f1_z3 = geompy.MakeTranslation( vx_g2_5c_f1_z2 , 0 , 0 , z3  )
+vx_g2_5c_f2_z3 = geompy.MakeTranslation( vx_g2_5c_f2_z2 , 0 , 0 , z3  )
+
+#modele
+vx_g2_x4_y0_z3_mod = grille_cyl_2.getVertexXYZ( 4 , 0 , 3 )
+vx_g2_x4_y1_z3_mod = grille_cyl_2.getVertexXYZ( 4 , 1 , 3 )
+vx_g2_x4_y2_z3_mod = grille_cyl_2.getVertexXYZ( 4 , 2 , 3 )
+
+#association
+vx_g2_x4_y0_z3_mod.setAssociation( vx_g2_5c_f0_z3 )
+vx_g2_x4_y1_z3_mod.setAssociation( vx_g2_5c_f1_z3 )
+vx_g2_x4_y2_z3_mod.setAssociation( vx_g2_5c_f2_z3 )
+
+
+#geom
+vx_g2_5c_f0_z4 = geompy.MakeTranslation( vx_g2_5c_f0_z2 , 0 , 0 , z4  )
+vx_g2_5c_f1_z4 = geompy.MakeTranslation( vx_g2_5c_f1_z2 , 0 , 0 , z4  )
+vx_g2_5c_f2_z4 = geompy.MakeTranslation( vx_g2_5c_f2_z2 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x4_y0_z4_mod = grille_cyl_2.getVertexXYZ( 4 , 0 , 4 )
+vx_g2_x4_y1_z4_mod = grille_cyl_2.getVertexXYZ( 4 , 1 , 4 )
+vx_g2_x4_y2_z4_mod = grille_cyl_2.getVertexXYZ( 4 , 2 , 4 )
+
+#association
+vx_g2_x4_y0_z4_mod.setAssociation( vx_g2_5c_f0_z4 )
+vx_g2_x4_y1_z4_mod.setAssociation( vx_g2_5c_f1_z4 )
+vx_g2_x4_y2_z4_mod.setAssociation( vx_g2_5c_f2_z4 )
+
+
+#geom
+vx_g2_5c_f5_z1 = geompy.MakeVertex( 22.5 , 0 , z1 )
+vx_g2_5c_f5_z0 = geompy.MakeTranslation( vx_g2_5c_f5_z1 , 0 , 0 , z0  )
+vx_g2_5c_f5_z2 = geompy.MakeTranslation( vx_g2_5c_f5_z1 , 0 , 0 , z2  )
+vx_g2_5c_f5_z3 = geompy.MakeTranslation( vx_g2_5c_f5_z1 , 0 , 0 , z3  )
+vx_g2_5c_f5_z4 = geompy.MakeTranslation( vx_g2_5c_f5_z1 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x4_y5_z0_mod = grille_cyl_2.getVertexXYZ( 4 , 5 , 0 )
+vx_g2_x4_y5_z1_mod = grille_cyl_2.getVertexXYZ( 4 , 5 , 1 )
+vx_g2_x4_y5_z2_mod = grille_cyl_2.getVertexXYZ( 4 , 5 , 2 )
+vx_g2_x4_y5_z3_mod = grille_cyl_2.getVertexXYZ( 4 , 5 , 3 )
+vx_g2_x4_y5_z4_mod = grille_cyl_2.getVertexXYZ( 4 , 5 , 4 )
+
+#association
+vx_g2_x4_y5_z0_mod.setAssociation( vx_g2_5c_f5_z0 )
+vx_g2_x4_y5_z1_mod.setAssociation( vx_g2_5c_f5_z1 )
+vx_g2_x4_y5_z2_mod.setAssociation( vx_g2_5c_f5_z2 )
+vx_g2_x4_y5_z3_mod.setAssociation( vx_g2_5c_f5_z3 )
+vx_g2_x4_y5_z4_mod.setAssociation( vx_g2_5c_f5_z4 )
+
+
+#geom
+vx_g2_5c_f4_z0 = geompy.MakeRotation( vx_g2_5c_f5_z0 , DZ , (math.pi*6)/180 )
+vx_g2_5c_f4_z1 = geompy.MakeRotation( vx_g2_5c_f5_z1 , DZ , (math.pi*6)/180 )
+vx_g2_5c_f4_z2 = geompy.MakeRotation( vx_g2_5c_f5_z2 , DZ , (math.pi*6)/180 )
+vx_g2_5c_f4_z3 = geompy.MakeRotation( vx_g2_5c_f5_z3 , DZ , (math.pi*6)/180 )
+vx_g2_5c_f4_z4 = geompy.MakeRotation( vx_g2_5c_f5_z4 , DZ , (math.pi*6)/180 )
+
+#modele
+vx_g2_x4_y4_z0_mod = grille_cyl_2.getVertexXYZ( 4 , 4 , 0 )
+vx_g2_x4_y4_z1_mod = grille_cyl_2.getVertexXYZ( 4 , 4 , 1 )
+vx_g2_x4_y4_z2_mod = grille_cyl_2.getVertexXYZ( 4 , 4 , 2 )
+vx_g2_x4_y4_z3_mod = grille_cyl_2.getVertexXYZ( 4 , 4 , 3 )
+vx_g2_x4_y4_z4_mod = grille_cyl_2.getVertexXYZ( 4 , 4 , 4 )
+
+#association
+vx_g2_x4_y4_z0_mod.setAssociation( vx_g2_5c_f4_z0 )
+vx_g2_x4_y4_z1_mod.setAssociation( vx_g2_5c_f4_z1 )
+vx_g2_x4_y4_z2_mod.setAssociation( vx_g2_5c_f4_z2 )
+vx_g2_x4_y4_z3_mod.setAssociation( vx_g2_5c_f4_z3 )
+vx_g2_x4_y4_z4_mod.setAssociation( vx_g2_5c_f4_z4 )
+
+
+#geom
+vx_g2_6c_f0_z2 = geompy.MakeVertex( 47.5 , 0 , z2 )
+vx_g2_6c_f0_z3 = geompy.MakeVertex( 47.5 , 0 , z3 )
+
+#modele
+vx_g2_x5_y0_z2_mod = grille_cyl_2.getVertexXYZ( 5 , 0 , 2 )
+vx_g2_x5_y0_z3_mod = grille_cyl_2.getVertexXYZ( 5 , 0 , 3 )
+
+#association
+vx_g2_x5_y0_z2_mod.setAssociation( vx_g2_6c_f0_z2 )
+vx_g2_x5_y0_z3_mod.setAssociation( vx_g2_6c_f0_z3 )
+
+
+#geom
+vx_g2_6c_f1_z2 = geompy.MakeRotation( vx_g2_6c_f0_z2 , DZ , math.pi/8 )
+vx_g2_6c_f1_z3 = geompy.MakeRotation( vx_g2_6c_f0_z3 , DZ , math.pi/8 )
+
+#modele
+vx_g2_x5_y1_z2_mod = grille_cyl_2.getVertexXYZ( 5 , 1 , 2 )
+vx_g2_x5_y1_z3_mod = grille_cyl_2.getVertexXYZ( 5 , 1 , 3 )
+
+#association
+vx_g2_x5_y1_z2_mod.setAssociation( vx_g2_6c_f1_z2 )
+vx_g2_x5_y1_z3_mod.setAssociation( vx_g2_6c_f1_z3 )
+
+
+#geom
+vx_g2_6c_f2_z2 = geompy.MakeRotation( vx_g2_6c_f0_z2 , DZ , math.pi/4 )
+vx_g2_6c_f2_z3 = geompy.MakeRotation( vx_g2_6c_f0_z3 , DZ , math.pi/4 )
+
+#modele
+vx_g2_x5_y2_z2_mod = grille_cyl_2.getVertexXYZ( 5 , 2 , 2 )
+vx_g2_x5_y2_z3_mod = grille_cyl_2.getVertexXYZ( 5 , 2 , 3 )
+
+#association
+vx_g2_x5_y2_z2_mod.setAssociation( vx_g2_6c_f2_z2 )
+vx_g2_x5_y2_z3_mod.setAssociation( vx_g2_6c_f2_z3 )
+
+
+#geom
+vx_g2_6c_f5_z1 = geompy.MakeVertex( 24 , 0 , z1 )
+vx_g2_6c_f5_z0 = geompy.MakeTranslation( vx_g2_6c_f5_z1 , 0 , 0 , z0  )
+vx_g2_6c_f5_z2 = geompy.MakeTranslation( vx_g2_6c_f5_z1 , 0 , 0 , z2  )
+vx_g2_6c_f5_z3 = geompy.MakeTranslation( vx_g2_6c_f5_z1 , 0 , 0 , z3  )
+vx_g2_6c_f5_z4 = geompy.MakeTranslation( vx_g2_6c_f5_z1 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x5_y5_z0_mod = grille_cyl_2.getVertexXYZ( 5 , 5 , 0 )
+vx_g2_x5_y5_z1_mod = grille_cyl_2.getVertexXYZ( 5 , 5 , 1 )
+vx_g2_x5_y5_z2_mod = grille_cyl_2.getVertexXYZ( 5 , 5 , 2 )
+vx_g2_x5_y5_z3_mod = grille_cyl_2.getVertexXYZ( 5 , 5 , 3 )
+vx_g2_x5_y5_z4_mod = grille_cyl_2.getVertexXYZ( 5 , 5 , 4 )
+
+#association
+vx_g2_x5_y5_z0_mod.setAssociation( vx_g2_6c_f5_z0 )
+vx_g2_x5_y5_z1_mod.setAssociation( vx_g2_6c_f5_z1 )
+vx_g2_x5_y5_z2_mod.setAssociation( vx_g2_6c_f5_z2 )
+vx_g2_x5_y5_z3_mod.setAssociation( vx_g2_6c_f5_z3 )
+vx_g2_x5_y5_z4_mod.setAssociation( vx_g2_6c_f5_z4 )
+
+
+#geom
+vx_g2_6c_f4_z0 = geompy.MakeRotation( vx_g2_6c_f5_z0 , DZ , (math.pi*8)/180 )
+vx_g2_6c_f4_z1 = geompy.MakeRotation( vx_g2_6c_f5_z1 , DZ , (math.pi*8)/180 )
+vx_g2_6c_f4_z2 = geompy.MakeRotation( vx_g2_6c_f5_z2 , DZ , (math.pi*8)/180 )
+vx_g2_6c_f4_z3 = geompy.MakeRotation( vx_g2_6c_f5_z3 , DZ , (math.pi*8)/180 )
+vx_g2_6c_f4_z4 = geompy.MakeRotation( vx_g2_6c_f5_z4 , DZ , (math.pi*8)/180 )
+
+#modele
+vx_g2_x5_y4_z0_mod = grille_cyl_2.getVertexXYZ( 5 , 4 , 0 )
+vx_g2_x5_y4_z1_mod = grille_cyl_2.getVertexXYZ( 5 , 4 , 1 )
+vx_g2_x5_y4_z2_mod = grille_cyl_2.getVertexXYZ( 5 , 4 , 2 )
+vx_g2_x5_y4_z3_mod = grille_cyl_2.getVertexXYZ( 5 , 4 , 3 )
+vx_g2_x5_y4_z4_mod = grille_cyl_2.getVertexXYZ( 5 , 4 , 4 )
+
+#association
+vx_g2_x5_y4_z0_mod.setAssociation( vx_g2_6c_f4_z0 )
+vx_g2_x5_y4_z1_mod.setAssociation( vx_g2_6c_f4_z1 )
+vx_g2_x5_y4_z2_mod.setAssociation( vx_g2_6c_f4_z2 )
+vx_g2_x5_y4_z3_mod.setAssociation( vx_g2_6c_f4_z3 )
+vx_g2_x5_y4_z4_mod.setAssociation( vx_g2_6c_f4_z4 )
+
+
+
+# les hexas de remplissage de la 2eme grille
+
+#geom
+vx_g2_1c_f0_z1 = geompy.MakeVertex( 35.5 , 0 , z1 )
+vx_g2_1c_f1_z1 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 1.5 , 0  )
+vx_g2_1c_f7_z1 = geompy.MakeVertex( 34.5 , 0 , z1 )
+vx_g2_1c_f2_z1 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 1.5 , 0  )
+vx_g2_1c_f8_z1 = geompy.MakeVertex( 33.5 , 0 , z1 )
+vx_g2_1c_f3_z1 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 1.5 , 0  )
+vx_g2_1c_f5_z1 = geompy.MakeVertex( 32.5 , 0 , z1 )
+vx_g2_1c_f4_z1 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 1.5 , 0  )
+
+
+#modele
+vx_g2_x0_y0_z1_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 1 )
+vx_g2_x0_y1_z1_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 1 )
+vx_g2_x0_y2_z1_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 1 )
+vx_g2_x0_y3_z1_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 1 )
+vx_g2_x0_y4_z1_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 1 )
+vx_g2_x0_y5_z1_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 1 )
+vx_g2_x0_y7_z1_mod = doc.findVertex( P + 0.5 , 0 , h/7 )
+vx_g2_x0_y8_z1_mod = doc.findVertex( P - 0.5 , 0 , h/7 )
+
+#association
+vx_g2_x0_y0_z1_mod.setAssociation( vx_g2_1c_f0_z1 )
+vx_g2_x0_y1_z1_mod.setAssociation( vx_g2_1c_f1_z1 )
+vx_g2_x0_y2_z1_mod.setAssociation( vx_g2_1c_f2_z1 )
+vx_g2_x0_y3_z1_mod.setAssociation( vx_g2_1c_f3_z1 )
+vx_g2_x0_y4_z1_mod.setAssociation( vx_g2_1c_f4_z1 )
+vx_g2_x0_y5_z1_mod.setAssociation( vx_g2_1c_f5_z1 )
+vx_g2_x0_y7_z1_mod.setAssociation( vx_g2_1c_f7_z1 )
+vx_g2_x0_y8_z1_mod.setAssociation( vx_g2_1c_f8_z1 )
+
+
+
+
+#geom
+vx_g2_1c_f0_z0 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 0 , z0  )
+vx_g2_1c_f1_z0 = geompy.MakeTranslation( vx_g2_1c_f1_z1 , 0 , 0 , z0  )
+vx_g2_1c_f2_z0 = geompy.MakeTranslation( vx_g2_1c_f2_z1 , 0 , 0 , z0  )
+vx_g2_1c_f3_z0 = geompy.MakeTranslation( vx_g2_1c_f3_z1 , 0 , 0 , z0  )
+vx_g2_1c_f4_z0 = geompy.MakeTranslation( vx_g2_1c_f4_z1 , 0 , 0 , z0  )
+vx_g2_1c_f5_z0 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 0 , z0  )
+vx_g2_1c_f7_z0 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 0 , z0  )
+vx_g2_1c_f8_z0 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 0 , z0  )
+
+#modele
+vx_g2_x0_y0_z0_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 0 )
+vx_g2_x0_y1_z0_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 0 )
+vx_g2_x0_y2_z0_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 0 )
+vx_g2_x0_y3_z0_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 0 )
+vx_g2_x0_y4_z0_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 0 )
+vx_g2_x0_y5_z0_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 0 )
+vx_g2_x0_y7_z0_mod = doc.findVertex( P + 0.5 , 0 , 0 )
+vx_g2_x0_y8_z0_mod = doc.findVertex( P - 0.5 , 0 , 0 )
+
+#association
+vx_g2_x0_y0_z0_mod.setAssociation( vx_g2_1c_f0_z0 )
+vx_g2_x0_y1_z0_mod.setAssociation( vx_g2_1c_f1_z0 )
+vx_g2_x0_y2_z0_mod.setAssociation( vx_g2_1c_f2_z0 )
+vx_g2_x0_y3_z0_mod.setAssociation( vx_g2_1c_f3_z0 )
+vx_g2_x0_y4_z0_mod.setAssociation( vx_g2_1c_f4_z0 )
+vx_g2_x0_y5_z0_mod.setAssociation( vx_g2_1c_f5_z0 )
+vx_g2_x0_y7_z0_mod.setAssociation( vx_g2_1c_f7_z0 )
+vx_g2_x0_y8_z0_mod.setAssociation( vx_g2_1c_f8_z0 )
+
+
+
+#geom
+vx_g2_1c_f0_z2 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 0 , z2  )
+vx_g2_1c_f1_z2 = geompy.MakeTranslation( vx_g2_1c_f1_z1 , 0 , 0 , z2  )
+vx_g2_1c_f2_z2 = geompy.MakeTranslation( vx_g2_1c_f2_z1 , 0 , 0 , z2  )
+vx_g2_1c_f3_z2 = geompy.MakeTranslation( vx_g2_1c_f3_z1 , 0 , 0 , z2  )
+vx_g2_1c_f4_z2 = geompy.MakeTranslation( vx_g2_1c_f4_z1 , 0 , 0 , z2  )
+vx_g2_1c_f5_z2 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 0 , z2  )
+vx_g2_1c_f7_z2 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 0 , z2  )
+vx_g2_1c_f8_z2 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 0 , z2  )
+
+#modele
+vx_g2_x0_y0_z2_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 2 )
+vx_g2_x0_y1_z2_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 2 )
+vx_g2_x0_y2_z2_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 2 )
+vx_g2_x0_y3_z2_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 2 )
+vx_g2_x0_y4_z2_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 2 )
+vx_g2_x0_y5_z2_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 2 )
+vx_g2_x0_y7_z2_mod = doc.findVertex( P + 0.5 , 0 , 2*h/7 )
+vx_g2_x0_y8_z2_mod = doc.findVertex( P - 0.5 , 0 , 2*h/7 )
+
+#association
+vx_g2_x0_y0_z2_mod.setAssociation( vx_g2_1c_f0_z2 )
+vx_g2_x0_y1_z2_mod.setAssociation( vx_g2_1c_f1_z2 )
+vx_g2_x0_y2_z2_mod.setAssociation( vx_g2_1c_f2_z2 )
+vx_g2_x0_y3_z2_mod.setAssociation( vx_g2_1c_f3_z2 )
+vx_g2_x0_y4_z2_mod.setAssociation( vx_g2_1c_f4_z2 )
+vx_g2_x0_y5_z2_mod.setAssociation( vx_g2_1c_f5_z2 )
+vx_g2_x0_y7_z2_mod.setAssociation( vx_g2_1c_f7_z2 )
+vx_g2_x0_y8_z2_mod.setAssociation( vx_g2_1c_f8_z2 )
+
+
+
+#geom
+vx_g2_1c_f0_z3 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 0 , z3  )
+vx_g2_1c_f1_z3 = geompy.MakeTranslation( vx_g2_1c_f1_z1 , 0 , 0 , z3  )
+vx_g2_1c_f2_z3 = geompy.MakeTranslation( vx_g2_1c_f2_z1 , 0 , 0 , z3  )
+vx_g2_1c_f3_z3 = geompy.MakeTranslation( vx_g2_1c_f3_z1 , 0 , 0 , z3  )
+vx_g2_1c_f4_z3 = geompy.MakeTranslation( vx_g2_1c_f4_z1 , 0 , 0 , z3  )
+vx_g2_1c_f5_z3 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 0 , z3  )
+vx_g2_1c_f7_z3 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 0 , z3  )
+vx_g2_1c_f8_z3 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 0 , z3  )
+
+#modele
+vx_g2_x0_y0_z3_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 3 )
+vx_g2_x0_y1_z3_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 3 )
+vx_g2_x0_y2_z3_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 3 )
+vx_g2_x0_y3_z3_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 3 )
+vx_g2_x0_y4_z3_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 3 )
+vx_g2_x0_y5_z3_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 3 )
+vx_g2_x0_y7_z3_mod = doc.findVertex( P + 0.5 , 0 , 3*h/7 )
+vx_g2_x0_y8_z3_mod = doc.findVertex( P - 0.5 , 0 , 3*h/7 )
+
+#association
+vx_g2_x0_y0_z3_mod.setAssociation( vx_g2_1c_f0_z3 )
+vx_g2_x0_y1_z3_mod.setAssociation( vx_g2_1c_f1_z3 )
+vx_g2_x0_y2_z3_mod.setAssociation( vx_g2_1c_f2_z3 )
+vx_g2_x0_y3_z3_mod.setAssociation( vx_g2_1c_f3_z3 )
+vx_g2_x0_y4_z3_mod.setAssociation( vx_g2_1c_f4_z3 )
+vx_g2_x0_y5_z3_mod.setAssociation( vx_g2_1c_f5_z3 )
+vx_g2_x0_y7_z3_mod.setAssociation( vx_g2_1c_f7_z3 )
+vx_g2_x0_y8_z3_mod.setAssociation( vx_g2_1c_f8_z3 )
+
+
+
+#geom
+vx_g2_1c_f0_z4 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 0 , z4  )
+vx_g2_1c_f1_z4 = geompy.MakeTranslation( vx_g2_1c_f1_z1 , 0 , 0 , z4  )
+vx_g2_1c_f2_z4 = geompy.MakeTranslation( vx_g2_1c_f2_z1 , 0 , 0 , z4  )
+vx_g2_1c_f3_z4 = geompy.MakeTranslation( vx_g2_1c_f3_z1 , 0 , 0 , z4  )
+vx_g2_1c_f4_z4 = geompy.MakeTranslation( vx_g2_1c_f4_z1 , 0 , 0 , z4  )
+vx_g2_1c_f5_z4 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 0 , z4  )
+vx_g2_1c_f7_z4 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 0 , z4  )
+vx_g2_1c_f8_z4 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 0 , z4  )
+
+#modele
+vx_g2_x0_y0_z4_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 4 )
+vx_g2_x0_y1_z4_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 4 )
+vx_g2_x0_y2_z4_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 4 )
+vx_g2_x0_y3_z4_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 4 )
+vx_g2_x0_y4_z4_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 4 )
+vx_g2_x0_y5_z4_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 4 )
+vx_g2_x0_y7_z4_mod = doc.findVertex( P + 0.5 , 0 , 4*h/7 )
+vx_g2_x0_y8_z4_mod = doc.findVertex( P - 0.5 , 0 , 4*h/7 )
+
+#association
+vx_g2_x0_y0_z4_mod.setAssociation( vx_g2_1c_f0_z4 )
+vx_g2_x0_y1_z4_mod.setAssociation( vx_g2_1c_f1_z4 )
+vx_g2_x0_y2_z4_mod.setAssociation( vx_g2_1c_f2_z4 )
+vx_g2_x0_y3_z4_mod.setAssociation( vx_g2_1c_f3_z4 )
+vx_g2_x0_y4_z4_mod.setAssociation( vx_g2_1c_f4_z4 )
+vx_g2_x0_y5_z4_mod.setAssociation( vx_g2_1c_f5_z4 )
+vx_g2_x0_y7_z4_mod.setAssociation( vx_g2_1c_f7_z4 )
+vx_g2_x0_y8_z4_mod.setAssociation( vx_g2_1c_f8_z4 )
+
+
+
+#geom
+vx_g2_1c_f0_z5 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 0 , z5  )
+vx_g2_1c_f1_z5 = geompy.MakeTranslation( vx_g2_1c_f1_z1 , 0 , 0 , z5  )
+vx_g2_1c_f2_z5 = geompy.MakeTranslation( vx_g2_1c_f2_z1 , 0 , 0 , z5  )
+vx_g2_1c_f3_z5 = geompy.MakeTranslation( vx_g2_1c_f3_z1 , 0 , 0 , z5  )
+vx_g2_1c_f4_z5 = geompy.MakeTranslation( vx_g2_1c_f4_z1 , 0 , 0 , z5  )
+vx_g2_1c_f5_z5 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 0 , z5  )
+vx_g2_1c_f7_z5 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 0 , z5  )
+vx_g2_1c_f8_z5 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 0 , z5  )
+
+#modele
+vx_g2_x0_y0_z5_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 5 )
+vx_g2_x0_y1_z5_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 5 )
+vx_g2_x0_y2_z5_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 5 )
+vx_g2_x0_y3_z5_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 5 )
+vx_g2_x0_y4_z5_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 5 )
+vx_g2_x0_y5_z5_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 5 )
+vx_g2_x0_y7_z5_mod = doc.findVertex( P + 0.5 , 0 , 5*h/7 )
+vx_g2_x0_y8_z5_mod = doc.findVertex( P - 0.5 , 0 , 5*h/7 )
+
+#association
+vx_g2_x0_y0_z5_mod.setAssociation( vx_g2_1c_f0_z5 )
+vx_g2_x0_y1_z5_mod.setAssociation( vx_g2_1c_f1_z5 )
+vx_g2_x0_y2_z5_mod.setAssociation( vx_g2_1c_f2_z5 )
+vx_g2_x0_y3_z5_mod.setAssociation( vx_g2_1c_f3_z5 )
+vx_g2_x0_y4_z5_mod.setAssociation( vx_g2_1c_f4_z5 )
+vx_g2_x0_y5_z5_mod.setAssociation( vx_g2_1c_f5_z5 )
+vx_g2_x0_y7_z5_mod.setAssociation( vx_g2_1c_f7_z5 )
+vx_g2_x0_y8_z5_mod.setAssociation( vx_g2_1c_f8_z5 )
+
+
+
+#geom
+vx_g2_1c_f0_z6 = geompy.MakeTranslation( vx_g2_1c_f0_z1 , 0 , 0 , z6  )
+vx_g2_1c_f1_z6 = geompy.MakeTranslation( vx_g2_1c_f1_z1 , 0 , 0 , z6  )
+vx_g2_1c_f2_z6 = geompy.MakeTranslation( vx_g2_1c_f2_z1 , 0 , 0 , z6  )
+vx_g2_1c_f3_z6 = geompy.MakeTranslation( vx_g2_1c_f3_z1 , 0 , 0 , z6  )
+vx_g2_1c_f4_z6 = geompy.MakeTranslation( vx_g2_1c_f4_z1 , 0 , 0 , z6  )
+vx_g2_1c_f5_z6 = geompy.MakeTranslation( vx_g2_1c_f5_z1 , 0 , 0 , z6  )
+vx_g2_1c_f7_z6 = geompy.MakeTranslation( vx_g2_1c_f7_z1 , 0 , 0 , z6  )
+vx_g2_1c_f8_z6 = geompy.MakeTranslation( vx_g2_1c_f8_z1 , 0 , 0 , z6  )
+
+#modele
+vx_g2_x0_y0_z6_mod = grille_cyl_2.getVertexXYZ( 0 , 0 , 6 )
+vx_g2_x0_y1_z6_mod = grille_cyl_2.getVertexXYZ( 0 , 1 , 6 )
+vx_g2_x0_y2_z6_mod = grille_cyl_2.getVertexXYZ( 0 , 2 , 6 )
+vx_g2_x0_y3_z6_mod = grille_cyl_2.getVertexXYZ( 0 , 3 , 6 )
+vx_g2_x0_y4_z6_mod = grille_cyl_2.getVertexXYZ( 0 , 4 , 6 )
+vx_g2_x0_y5_z6_mod = grille_cyl_2.getVertexXYZ( 0 , 5 , 6 )
+vx_g2_x0_y7_z6_mod = doc.findVertex( P + 0.5 , 0 , 6*h/7 )
+vx_g2_x0_y8_z6_mod = doc.findVertex( P - 0.5 , 0 , 6*h/7 )
+
+#association
+vx_g2_x0_y0_z6_mod.setAssociation( vx_g2_1c_f0_z6 )
+vx_g2_x0_y1_z6_mod.setAssociation( vx_g2_1c_f1_z6 )
+vx_g2_x0_y2_z6_mod.setAssociation( vx_g2_1c_f2_z6 )
+vx_g2_x0_y3_z6_mod.setAssociation( vx_g2_1c_f3_z6 )
+vx_g2_x0_y4_z6_mod.setAssociation( vx_g2_1c_f4_z6 )
+vx_g2_x0_y5_z6_mod.setAssociation( vx_g2_1c_f5_z6 )
+vx_g2_x0_y7_z6_mod.setAssociation( vx_g2_1c_f7_z6 )
+vx_g2_x0_y8_z6_mod.setAssociation( vx_g2_1c_f8_z6 )
+
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+
+
+# définir une loi: le choix de la loi reste aux utilisateurs
+
+Law = doc.addLaw( "Uniform" , 4 )
+
+#petit test
+n = doc.countLaw()
+print n
+
+# chercher les propagations du modele
+
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+       Propa = doc.getPropagation(j)
+       Propa.setLaw( Law )# appliquer la loi de discrétisation sur tout le modele et generer le maillage
+
+mesh = hexablock.mesh("BRIDE", doc)
+
+print "Nombre d'hexaédres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/TEST_PY/INTER_3_CYLINDRE.py b/src/TEST_PY/INTER_3_CYLINDRE.py
new file mode 100755 (executable)
index 0000000..db1359b
--- /dev/null
@@ -0,0 +1,397 @@
+# -*- coding: latin-1 -*-
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import os
+import SALOME
+import geompy
+import smesh
+import hexablock
+import math
+
+
+
+# chemin du fichier BREP contenant la CAO
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/tees.brep")
+#===================================================================
+#               LE MODELE:
+#===================================================================
+
+
+#=============================
+# PARAMETRES
+#=============================
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+doc = hexablock.addDocument()
+
+#=============================
+# CREATION DU MODELE
+#=============================
+CYL1 = 0
+CYL2 = 1
+
+
+S_E    = 0
+S_NE   = 1
+S_N    = 2
+S_NW   = 3
+S_W    = 4
+S_SW   = 5
+S_S    = 6
+S_SE   = 7
+S_MAXI = 8
+
+##dy = doc.addVector ( 0, 1, 0 )
+dx1 = doc.addVector( -1, 0, 0 )
+dz1 = doc.addVector( 0, 0, 1 )
+
+
+c_pte_1 = doc.addVertex ( 190., 0., 220. )
+c_grd_1 = doc.addVertex ( 300., 0., 400. )
+cyl_pte_1 = doc.addCylinder( c_pte_1 , dz1 , 20 , 360 ) #580-220
+cyl_grd_1 = doc.addCylinder( c_grd_1 , dx1 , 50 , 140 )
+cross1 = doc.makeCylinders( cyl_pte_1 , cyl_grd_1 )
+
+
+dx2 = doc.addVector( -1, 0, 0 )
+dz2 = doc.addVector( 0, 0, 1 )
+c_pte_2 = doc.addVertex( 110. , 0. , 400. )
+c_grd_2 = doc.addVertex( 0. , 0. , 0. )
+
+cyl_pte_2 = doc.addCylinder( c_pte_2 , dx2 , 50, 220 )
+cyl_grd_2 = doc.addCylinder( c_grd_2 , dz2 , 100, 800 )
+cross2    = doc.makeCylinders( cyl_pte_2, cyl_grd_2 )
+
+# Qq constantes
+coul1 = 5
+coul2 = 3
+
+# Pour les bicylindres
+xhint   = 0   # indice x pour les hexa interieurs
+xhext   = 1   # indice x pour les hexa exterieurs
+xvint   = 0   # indice x pour les vertex interieurs
+xvext   = 2   # indice x pour les vertex exterieurs
+zbas    = 0
+zhhaut1  = 5   # hauteur max quad  petit cylindre
+zhhaut2  = 3   # hauteur max quad  gros cylindre
+zvhaut1  = 6   # hauteur max vertex du petit  cylindre
+zvhaut2  = 4   # hauteur max vertex du gros  cylindre
+
+# La jointure
+hQuads = []
+for ny in range(8):
+    hQuads+=[cross2.getQuadIJ(CYL1, xhext, ny, zbas)]
+
+for ny in range(4):
+    hQuads+=[cross2.getQuadIJ(CYL1, xhint, ny, zbas)]
+
+qstart0 = cross2.getQuadIJ (CYL1, xhext, S_E, zbas)
+qtarget = cross1.getQuadIJ (CYL2, xhext, S_S, zvhaut2)
+
+vb0 = qtarget.getVertex (0)
+vb1 = qtarget.getVertex (1)
+vh0 = qstart0.getVertex (0)
+vh1 = qstart0.getVertex (1)
+
+hauteur = 3
+joint = doc.joinQuads (hQuads, qtarget, vh0,vb0, vh1,vb1, hauteur)
+
+# Elimination bout en trop
+for ny in range(8):
+    h = cross2.getHexaIJK (CYL1, xhext, ny, zhhaut1)
+    doc.removeHexa(h)
+    if ny<4:
+        h = cross2.getHexaIJK (CYL1, xhint, ny, zhhaut1)
+        doc.removeHexa(h)
+
+
+#===================================================================
+# Recuperation edges du model pour l'association
+#===================================================================
+
+##=========================
+##       EDGES
+##=========================
+### BIG CYLINDER
+top_BIG    = []
+bottom_BIG = []
+for ny in range(8):
+    bottom_BIG += [ cross2.getEdgeJ(CYL2, 2, ny, 0) ]
+
+for ny in range(8):
+    top_BIG += [ cross2.getEdgeJ(CYL2, 2, ny, zvhaut2) ]
+
+### MEDIUM CYLINDER
+left_MEDIUM_BIG = []
+right_MEDIUM    = []
+
+for ny in range(8):
+    left_MEDIUM_BIG += [cross2.getEdgeJ (CYL1, 2, ny, 1)]
+
+for ny in range(8):
+    right_MEDIUM += [ cross1.getEdgeJ (CYL2, 2, ny, 0) ]
+
+### SMALL CYLINDER
+top_SMALL           = []
+top_SMALL_MEDIUM    = []
+bottom_SMALL_MEDIUM = []
+bottom_SMALL        = []
+
+for ny in range(8):
+    top_SMALL += [ cross1.getEdgeJ(CYL1, 2, ny, zvhaut1) ]
+for ny in range(8):
+    top_SMALL_MEDIUM += [ cross1.getEdgeJ(CYL1, 2, ny, zvhaut1-1) ]
+for ny in range(8):
+    bottom_SMALL_MEDIUM += [ cross1.getEdgeJ(CYL1, 2, ny, 1) ]
+for ny in range(8):
+    bottom_SMALL += [ cross1.getEdgeJ(CYL1, 2, ny, 0) ]
+
+
+#===================================================================
+#               LA GEOMETRIE
+#===================================================================
+
+#===================================================================
+# Recuperation des éléments de la geometrie tuyau pour l'association
+#===================================================================
+tees_ = geompy.Import(BREP_PATH, "BREP")
+
+##=========================
+##       EDGES
+##=========================
+all_edges_ = geompy.SubShapeAllSorted( tees_ , geompy.ShapeType["EDGE"] )
+
+### BIG CYLINDER
+top_BIG_    = all_edges_[1]
+bottom_BIG_ = all_edges_[0]
+
+### MEDIUM CYLINDER
+left_MEDIUM_BIG_ = [ all_edges_[3], all_edges_[5] , all_edges_[4], all_edges_[2], ]
+right_MEDIUM_    = all_edges_[20]
+
+### SMALL CYLINDER
+top_SMALL_            = all_edges_[13]
+top_SMALL_MEDIUM_     = [ all_edges_[11], all_edges_[16] ]
+bottom_SMALL_MEDIUM_  = [ all_edges_[10], all_edges_[9], all_edges_[14], all_edges_[15] ]
+bottom_SMALL_         = all_edges_[12]
+
+
+#==========================================================
+#               LES ASSOCIATIONS
+#==========================================================
+
+##===========================================
+##          EDGES
+##===========================================
+def associateEdges( edges, edges_, i_assoc, oppositeWay = False ):
+    nb_points = float( len(i_assoc) )
+    #print "nb_points ", nb_points
+    for i, i_ in i_assoc.items():
+        e  = edges[i]
+        e0 = e.getVertex(0)
+        e1 = e.getVertex(1)
+
+        if oppositeWay:
+            u0 = (i_+1.)/nb_points
+            u1 = i_/nb_points
+            e.addAssociation( edges_ , u1, u0 )
+        else:
+            u0 = i_/nb_points
+            u1 = (i_+1.)/nb_points
+            e.addAssociation( edges_ , u0, u1 )
+
+        e0_ = geompy.MakeVertexOnCurve( edges_, u0 )
+        e1_ = geompy.MakeVertexOnCurve( edges_, u1 )
+        e0.setAssociation( e0_ )
+        e1.setAssociation( e1_ )
+
+
+
+## BIG CYLINDER
+assoc   = { 4:0, 5:1, 6:2, 7:3, 0:4, 1:5, 2:6, 3:7 }
+associateEdges( top_BIG   , top_BIG_,    assoc )
+associateEdges( bottom_BIG, bottom_BIG_, assoc )
+
+## SMALL CYLINDER
+assoc = { 4:6, 5:7, 6:0, 7:1, 0:2, 1:3, 2:4, 3:5 }
+associateEdges( top_SMALL   , top_SMALL_,    assoc )
+associateEdges( bottom_SMALL, bottom_SMALL_, assoc )
+
+
+## SMALL-MEDIUM CYLINDER
+
+### Top ( un peu 'touchy' )
+e = top_SMALL_MEDIUM[0]
+e_0  = e.getVertex(0)
+e_0_ = geompy.MakeVertexOnCurve( top_SMALL_MEDIUM_[0], 0.)
+e_0.setAssociation( e_0_ )
+top_SMALL_MEDIUM_0_vertices_ = [ e_0_ ]
+
+for i, e in enumerate( top_SMALL_MEDIUM[0:6] ):
+    e_1 = e.getVertex(1)
+    e_1_ = geompy.MakeVertexOnCurve( top_SMALL_MEDIUM_[0], (i+1.)/6.)
+    e_1.setAssociation( e_1_ )
+    top_SMALL_MEDIUM_0_vertices_ += [ e_1_ ]
+
+partition_ = geompy.MakePartition( [ top_SMALL_MEDIUM_[0] ],
+    top_SMALL_MEDIUM_0_vertices_, [], [], geompy.ShapeType["EDGE"], 0, [], 0 )
+top_SMALL_MEDIUM_0_edges_ = geompy.SubShapeAllSorted( partition_, geompy.ShapeType["EDGE"] )
+
+
+assoc = { 0:2, 1:0, 2:1, 3:3, 4:4, 5:5 }
+for i,i_ in assoc.items():
+    e  = top_SMALL_MEDIUM[i]
+    e_ = top_SMALL_MEDIUM_0_edges_[i_]
+    e.addAssociation( e_, 0., 1. )
+
+assoc = { 6:0, 7:1 }
+associateEdges( top_SMALL_MEDIUM, top_SMALL_MEDIUM_[1], assoc )
+
+
+### Bottom
+assocs = [ { 0:1, 1:0  }, { 2:1, 3:0 },  { 4:0, 5:1 }, { 6:0, 7:1 } ] # 4 edges
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[0], assocs[0], True )
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[1], assocs[1], True )
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[2], assocs[2] )
+associateEdges( bottom_SMALL_MEDIUM, bottom_SMALL_MEDIUM_[3], assocs[3] )
+
+
+
+## MEDIUM CYLINDER
+assocs = [ { 0:0, 1:1  }, { 2:0, 3:1 },  { 4:1, 5:0 }, { 6:1, 7:0 } ]
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[0], assocs[0] )
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[1], assocs[1] )
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[2], assocs[2], True )
+associateEdges( left_MEDIUM_BIG, left_MEDIUM_BIG_[3], assocs[3], True )
+
+assoc = { 0:3, 1:2, 2:1, 3:0, 4:7, 5:6, 6:5, 7:4 }
+associateEdges( right_MEDIUM, right_MEDIUM_,  assoc , True )
+
+
+
+#allfaces_ = geompy.SubShapeAllSorted(tees_, geompy.ShapeType["FACE"])
+#for i,f in enumerate( allfaces_ ):
+    #geompy.addToStudy( f,   "allfaces"+str(i) )
+
+#for ny in range(8):
+    #q = cross2.getQuadJK(CYL2,2,ny,0)
+    #q.addAssociation( allfaces_[2] )
+
+#for ny in range(8):
+    #q = cross2.getQuadJK(CYL2,2,ny,1)
+    #if q:
+        #q.addAssociation( allfaces_[2] )
+
+
+
+
+##==========================================================
+##       LA GEOMETRIE DANS L'ARBRE D'ETUDE SALOME
+##==========================================================
+geompy.addToStudy( tees_,           "Tees" )
+
+#### BIG CYLINDER
+geompy.addToStudy( top_BIG_,        "top_BIG" )
+geompy.addToStudy( bottom_BIG_,     "bottom_BIG" )
+
+#### SMALL CYLINDER
+geompy.addToStudy( top_SMALL_,       "top_SMALL" )
+for i,e in enumerate(top_SMALL_MEDIUM_):
+    geompy.addToStudy( e, "top_SMALL_MEDIUM"+str(i) )
+for i,e in enumerate(top_SMALL_MEDIUM_0_edges_):
+    geompy.addToStudy( e, "top_SMALL_MEDIUM_0_edges_"+str(i) )
+for i,e in enumerate(bottom_SMALL_MEDIUM_):
+    geompy.addToStudy( e, "bottom_SMALL_MEDIUM"+str(i) )
+geompy.addToStudy( bottom_SMALL_,    "bottom_SMALL" )
+
+#### MEDIUM CYLINDER
+geompy.addToStudy( right_MEDIUM_,    "right_MEDIUM" )
+for i,e in enumerate(left_MEDIUM_BIG_):
+    geompy.addToStudy( e,   "left_MEDIUM_BIG"+str(i) )
+
+
+
+#====================================
+# CREATION GROUPES DU MAILLAGE
+#====================================
+
+#On definit 3 groupes de mailles
+
+#groupe d edges (aretes)
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+
+##====================================
+## CREATION MAILLAGE
+##====================================
+
+
+##====================================
+## Definir une loi de discretisation
+##====================================
+
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+Law = doc.addLaw( "Uniform" , 4 )
+#Law = doc.addLaw( "Uniform" , 8 )
+
+# chercher les propagations du modele
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+    Propa = doc.getPropagation(j)
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+try:
+    mesh = hexablock.mesh("Inter_3_Cylindre", doc)
+#    mesh = .hexablock.mesh("Inter_3_Cylindre:quads", doc, 2)
+except SALOME.SALOME_Exception, ex:
+    print "Mesh computation failed, exception caught:"
+    print "    ", ex.details.text
+except:
+    import traceback
+    print "Mesh computation failed, exception caught:"
+    traceback.print_exc()
+
+
+print "Nombre d'hexaedres:", mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:", mesh.NbEdges()
+print "Nombre de noeuds:", mesh.NbNodes()
+
+
+
+
+
+
diff --git a/src/TEST_PY/Makefile.am b/src/TEST_PY/Makefile.am
new file mode 100755 (executable)
index 0000000..a443daa
--- /dev/null
@@ -0,0 +1,27 @@
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+#
+# ===============================================================
+# Files to be installed
+# ===============================================================
+
+# Scripts to be installed
+# dist_salomescript_PYTHON = TestHEXA.py
+dist_salomescript_PYTHON = \
+       BIELLE.py \
+       test_BIELLE_no_assoc.py \
+       test_BIELLE_bad_assoc.py \
+       TUYAU_COURBE.py \
+       test_TUYAU_COURBE_no_assoc.py \
+       test_TUYAU_COURBE_weird_assoc.py \
+       INTER_3_CYLINDRE.py \
+       test_INTER_3_CYLINDRE_no_assoc.py \
+       Test_HEXABLOCK.py \
+       test_HEXABLOCK.py
+
+nodist_salomescript_DATA = \
+       tees.brep \
+       tuyau.brep \
+       crank.stp
+
diff --git a/src/TEST_PY/TUYAU_COURBE.py b/src/TEST_PY/TUYAU_COURBE.py
new file mode 100755 (executable)
index 0000000..409d9cc
--- /dev/null
@@ -0,0 +1,772 @@
+# -*- coding: latin-1 -*-
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+import os
+import geompy
+import smesh
+import hexablock
+import math
+
+# chemin du fichier BREP contenant la CAO
+BREP_PATH = os.path.expandvars("$HEXABLOCK_ROOT_DIR/bin/salome/tuyau.brep")
+
+
+
+
+#===================================================================
+#               LE MODELE:
+#   (Pour le tuyau on doit creer une grille cylindrique)
+#===================================================================
+
+
+#=============================
+# PARAMETRES
+#=============================
+R = 4.5
+r = 4.5
+r_t = 3.6
+h = 75.0
+
+
+#=================================================
+# Creation du document
+#=================================================
+doc = hexablock.addDocument()
+
+#=================================================
+# Creation du tuyau (grille cylindrique) dans le document
+#=================================================
+# centre de la grille cylindrique
+c = doc.addVertex(0, 0, 0) 
+
+# vecteurs de la grille cylindrique
+dx = doc.addVector(h, 0, 0)
+dy = doc.addVector(0, h, 0)
+dz = doc.addVector(0, 0, h)
+
+# taille du cylindre
+dr = R
+da = 360
+dl = h
+
+nr = 1
+na = 4
+nl = 1
+
+model_tuyau_fin = doc.makeCylindrical(c, dx, dz, dr, da, dl, nr, na, nl, False)
+# note: on obtient une liste qui contient 4 hexaedres eguaux
+
+
+#===================================================================
+# Recuperation des vertex,edges et quads du model pour l'association
+#
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+#===================================================================
+
+#=========================
+#       VERTEX
+#=========================
+
+# Face du haut 
+#   grand rayon
+x_mod_h = doc.findVertex( 2*R , 0 , h )
+y_mod_h = doc.findVertex( 0 , 2*R , h )
+z_mod_h = doc.findVertex( -2*R , 0 , h )
+u_mod_h = doc.findVertex( 0 , -2*R , h )
+
+#   petit rayon
+x_mod_h_t = doc.findVertex( R , 0 , h )
+y_mod_h_t = doc.findVertex( 0 , R , h )
+z_mod_h_t = doc.findVertex( -R , 0 , h )
+u_mod_h_t = doc.findVertex( 0 , -R , h )
+
+# Face du bas
+#   grand rayon
+x_mod_b = doc.findVertex( 2*R , 0 , 0 )
+y_mod_b = doc.findVertex( 0 , 2*R , 0 )
+z_mod_b = doc.findVertex( -2*R , 0 , 0 )
+u_mod_b = doc.findVertex( 0 , -2*R , 0 )
+
+#   petit rayon
+x_mod_b_t = doc.findVertex( R , 0 , 0 )
+y_mod_b_t = doc.findVertex( 0 , R , 0 )
+z_mod_b_t = doc.findVertex( -R , 0 , 0 )
+u_mod_b_t = doc.findVertex( 0 , -R , 0 )
+
+
+# vérifications
+assert x_mod_h
+assert y_mod_h
+assert z_mod_h
+assert u_mod_h
+
+assert x_mod_h_t
+assert y_mod_h_t
+assert z_mod_h_t
+assert u_mod_h_t
+
+assert x_mod_b
+assert y_mod_b
+assert z_mod_b
+assert u_mod_b
+
+assert x_mod_b_t
+assert y_mod_b_t
+assert z_mod_b_t
+assert u_mod_b_t
+
+
+#=========================
+#       EDGES
+#=========================
+
+# Face du haut
+
+#   grand rayon
+edge_mod_face_h_1_1 = doc.findEdge( y_mod_h , z_mod_h )
+edge_mod_face_h_1_2 = doc.findEdge( z_mod_h , u_mod_h )
+edge_mod_face_h_2_1 = doc.findEdge( y_mod_h,  x_mod_h )
+edge_mod_face_h_2_2 = doc.findEdge( x_mod_h,  u_mod_h )
+
+#   petit rayon
+edge_mod_t_face_h_1_1 = doc.findEdge( y_mod_h_t , z_mod_h_t )
+edge_mod_t_face_h_1_2 = doc.findEdge( z_mod_h_t , u_mod_h_t )
+edge_mod_t_face_h_2_1 = doc.findEdge( y_mod_h_t,  x_mod_h_t )
+edge_mod_t_face_h_2_2 = doc.findEdge( x_mod_h_t,  u_mod_h_t )
+
+
+# Face du bas
+
+#   grand rayon
+edge_mod_face_b_1_1 = doc.findEdge( y_mod_b , z_mod_b )
+edge_mod_face_b_1_2 = doc.findEdge( z_mod_b , u_mod_b )
+edge_mod_face_b_2_1 = doc.findEdge( y_mod_b,  x_mod_b )
+edge_mod_face_b_2_2 = doc.findEdge( x_mod_b,  u_mod_b )
+
+#   petit rayon
+edge_mod_t_face_b_1_1 = doc.findEdge( y_mod_b_t , z_mod_b_t )
+edge_mod_t_face_b_1_2 = doc.findEdge( z_mod_b_t , u_mod_b_t )
+edge_mod_t_face_b_2_1 = doc.findEdge( y_mod_b_t,  x_mod_b_t )
+edge_mod_t_face_b_2_2 = doc.findEdge( x_mod_b_t,  u_mod_b_t )
+
+
+
+# Joignant faces haut et du bas
+Edge_Mod_ext_h = doc.findEdge( y_mod_h , y_mod_b )
+Edge_Mod_int_h = doc.findEdge( y_mod_h_t , y_mod_b_t )
+
+Edge_Mod_int_b = doc.findEdge( u_mod_h_t , u_mod_b_t )
+Edge_Mod_ext_b = doc.findEdge( u_mod_h , u_mod_b )
+
+Edge_Mod_ext_g = doc.findEdge( x_mod_h , x_mod_b )
+Edge_Mod_int_g = doc.findEdge( x_mod_h_t , x_mod_b_t )
+
+Edge_Mod_int_d = doc.findEdge( z_mod_h_t , z_mod_b_t )
+Edge_Mod_ext_d = doc.findEdge( z_mod_h , z_mod_b )
+
+
+# vérifications
+assert edge_mod_face_h_1_1
+assert edge_mod_face_h_1_2
+assert edge_mod_face_h_2_1
+assert edge_mod_face_h_2_2
+
+assert edge_mod_t_face_h_1_1
+assert edge_mod_t_face_h_1_2
+assert edge_mod_t_face_h_2_1
+assert edge_mod_t_face_h_2_2
+
+assert edge_mod_face_b_1_1
+assert edge_mod_face_b_1_2
+assert edge_mod_face_b_2_1
+assert edge_mod_face_b_2_2
+
+assert edge_mod_t_face_b_1_1
+assert edge_mod_t_face_b_1_2
+assert edge_mod_t_face_b_2_1
+assert edge_mod_t_face_b_2_2
+
+
+assert Edge_Mod_ext_h
+assert Edge_Mod_int_h
+
+assert Edge_Mod_int_b
+assert Edge_Mod_ext_b
+
+assert Edge_Mod_ext_g
+assert Edge_Mod_int_g
+
+assert Edge_Mod_int_d
+assert Edge_Mod_ext_d
+
+
+
+#=========================
+#       QUADS
+#=========================
+Quad_mod_0 = model_tuyau_fin.getQuadJK( 1 , 0 , 0 )
+Quad_mod_1 = model_tuyau_fin.getQuadJK( 1 , 1 , 0 )
+Quad_mod_2 = model_tuyau_fin.getQuadJK( 1 , 2 , 0 )
+Quad_mod_3 = model_tuyau_fin.getQuadJK( 1 , 3 , 0 )
+
+
+
+#===================================================================
+#               LA GEOMETRIE
+#===================================================================
+
+#===================================================================
+# Recuperation des points de la geometrie tuyau pour l'association
+#
+#===================================================================
+Tuyau_geom = geompy.Import(BREP_PATH, "BREP")
+
+
+#=========================
+#       SOMMETS
+#=========================
+Pt_A = geompy.MakeVertex( h , 20 , 4.5 )
+Pt_B = geompy.MakeVertex( h , 20 , 3.6 )
+Pt_C = geompy.MakeVertex( h , 20 , -4.5 )
+Pt_D = geompy.MakeVertex( h , 20 , -3.6 )
+Pt_E = geompy.MakeVertex( 0 , 0 , 2 )
+Pt_F = geompy.MakeVertex( 0 , 0 , 1.6 )
+Pt_G = geompy.MakeVertex( 0 , 0 , -2 )
+Pt_H = geompy.MakeVertex( 0 , 0 , -1.6 )
+
+# Face du bas
+Edge_bas_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_E)
+Edge_bas_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_F)
+Edge_bas_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_G)
+Edge_bas_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_H)
+## Grand rayon
+x_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 0.5)
+y_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 1)
+z_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0.5)
+u_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0)
+
+## Petit rayon
+x_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 0.5)
+y_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 1)
+z_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0.5)
+u_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0)
+
+
+# Face du haut
+Edge_haut_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_A)
+Edge_haut_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_B)
+Edge_haut_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_C)
+Edge_haut_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_D)
+## Grand rayon
+x_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 0.5)
+y_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 1)
+z_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0.5)
+u_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0)
+
+## Petit rayon
+x_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 0.5)
+y_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 1)
+z_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0.5)
+u_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0)
+
+
+
+#=========================
+#       EDGES
+#=========================
+All_Edges_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["EDGE"] )
+
+# Face du haut
+## Grand rayon
+edge_face_h_1   = All_Edges_Tuy_1[11]
+edge_face_h_2   = All_Edges_Tuy_1[14]
+## Petit rayon
+edge_t_face_h_1 = All_Edges_Tuy_1[12]
+edge_t_face_h_2 = All_Edges_Tuy_1[13]
+
+
+# Face du bas
+## Grand rayon
+edge_face_b_1   = All_Edges_Tuy_1[1]
+edge_face_b_2   = All_Edges_Tuy_1[4]
+##  Petit rayon
+edge_t_face_b_1 = All_Edges_Tuy_1[2]
+edge_t_face_b_2 = All_Edges_Tuy_1[3]
+
+
+# Joignant les 2 faces
+
+## edges complètes
+Edge_Tuy_ext_h = All_Edges_Tuy_1[6]
+Edge_Tuy_int_h = All_Edges_Tuy_1[7]
+Edge_Tuy_int_b = All_Edges_Tuy_1[8]
+Edge_Tuy_ext_b = All_Edges_Tuy_1[9]
+
+Pt_Z = geompy.MakeVertex( 75 , 20 , 0 )
+Pt_Z_1 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , 10 )
+Pt_Z_2 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , -10 )
+Line_Z1_Z2 = geompy.MakeLineTwoPnt( Pt_Z_1 , Pt_Z_2 )
+
+
+All_Edge_Tuy_ext_h = geompy.SubShapeAllSorted( Edge_Tuy_ext_h , geompy.ShapeType["VERTEX"] )
+
+Vx_Edg_Tuy_ext_h_1 = All_Edge_Tuy_ext_h[0]
+Vx_Edg_Tuy_ext_h_2 = All_Edge_Tuy_ext_h[1]
+
+Vx_Edg_Tuy_ext_h_1_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_1 , -10 , -10 , 0 )
+Vx_Edg_Tuy_ext_h_2_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_2 , 10 , 0 , 0 )
+
+Line_1 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_1, Vx_Edg_Tuy_ext_h_1_trans)
+Line_2 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_2, Vx_Edg_Tuy_ext_h_2_trans)
+
+Wire = geompy.MakeWire([Line_1, Line_2, Edge_Tuy_ext_h])
+Pipe_Z = geompy.MakePipe( Line_Z1_Z2 , Wire )
+Pipe_Ztt = geompy.MakePipe( Line_Z1_Z2 , Edge_Tuy_ext_h )
+Partition_Ztt = geompy.MakePartition([Tuyau_geom], [Pipe_Ztt], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+All_Edges_Tuy_2tt = geompy.SubShapeAllSorted( Partition_Ztt , geompy.ShapeType["EDGE"] )
+
+Edge_Tuy_ext_g = All_Edges_Tuy_2tt[12]
+Edge_Tuy_int_g = All_Edges_Tuy_2tt[13]
+Edge_Tuy_ext_d = All_Edges_Tuy_2tt[10]
+Edge_Tuy_int_d = All_Edges_Tuy_2tt[11]
+
+## une edge en plusieurs(4) morceaux : Edge_Tuy_ext_h
+X_pln1 = geompy.MakeVertexWithRef( Pt_Z , -20 , 0 , 0 )
+Vec_X = geompy.MakeVectorDXDYDZ( 1 , 0 , 0 )
+
+Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )
+Plan2 = geompy.MakeTranslation( Plan1 , -20 , 0 , 0 )
+Plan3 = geompy.MakeTranslation( Plan1 , -40 , 0 , 0 )
+
+Partition_Edge_g_d_h_b = geompy.MakePartition([
+    Edge_Tuy_ext_h,
+    Edge_Tuy_int_h,
+    Edge_Tuy_ext_b,
+    Edge_Tuy_int_b,
+    Edge_Tuy_ext_g,
+    Edge_Tuy_int_g,
+    Edge_Tuy_ext_d,
+    Edge_Tuy_int_d], 
+    [Plan1, Plan2, Plan3], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+
+All_Edge_g_d_h_b = geompy.SubShapeAllSorted( Partition_Edge_g_d_h_b , geompy.ShapeType["EDGE"] )
+Edge_Tuy_ext_h_1 = All_Edge_g_d_h_b[0]
+Edge_Tuy_ext_h_2 = All_Edge_g_d_h_b[15]
+Edge_Tuy_ext_h_3 = All_Edge_g_d_h_b[23]
+Edge_Tuy_ext_h_4 = All_Edge_g_d_h_b[31]
+
+
+
+#=========================
+#       FACES
+#=========================
+All_Faces_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["FACE"] )
+
+Face_Tuy_ext_1 = All_Faces_Tuy_1[4]
+Face_Tuy_ext_2 = All_Faces_Tuy_1[5]
+
+Partition_Face = geompy.MakePartition([ Face_Tuy_ext_1 , Face_Tuy_ext_2 ], [ Plan1 , Plan2 , Plan3 , Pipe_Z ], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+
+
+All_Faces_Partition_Face = geompy.SubShapeAllSorted( Partition_Face , geompy.ShapeType["FACE"] )
+
+## -------------------------------------
+Face_0 = All_Faces_Partition_Face[0]
+Face_6 = All_Faces_Partition_Face[6]
+Face_10 = All_Faces_Partition_Face[10]
+Face_14 = All_Faces_Partition_Face[14]
+
+## -------------------------------------
+Face_1 = All_Faces_Partition_Face[1]
+Face_7 = All_Faces_Partition_Face[7]
+Face_11 = All_Faces_Partition_Face[11]
+Face_15 = All_Faces_Partition_Face[15]
+
+## -------------------------------------
+Face_2 = All_Faces_Partition_Face[2]
+Face_4 = All_Faces_Partition_Face[4]
+Face_8 = All_Faces_Partition_Face[8]
+Face_12 = All_Faces_Partition_Face[12]
+
+## -------------------------------------
+Face_3 = All_Faces_Partition_Face[3]
+Face_5 = All_Faces_Partition_Face[5]
+Face_9 = All_Faces_Partition_Face[9]
+Face_13 = All_Faces_Partition_Face[13]
+
+
+
+
+
+#==========================================================
+#               LES ASSOCIATIONS
+#==========================================================
+
+##===========================================
+##          VERTEX
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+x_mod_h.setAssociation( x_h )
+y_mod_h.setAssociation( y_h )
+z_mod_h.setAssociation( z_h )
+u_mod_h.setAssociation( u_h )
+
+## Petit rayon
+x_mod_h_t.setAssociation( x_h_t )
+y_mod_h_t.setAssociation( y_h_t )
+z_mod_h_t.setAssociation( z_h_t )
+u_mod_h_t.setAssociation( u_h_t )
+
+
+# Face du bas
+
+## Grand rayon
+x_mod_b.setAssociation( x_b )
+y_mod_b.setAssociation( y_b )
+z_mod_b.setAssociation( z_b )
+u_mod_b.setAssociation( u_b )
+
+## Petit rayon
+x_mod_b_t.setAssociation( x_b_t )
+y_mod_b_t.setAssociation( y_b_t )
+z_mod_b_t.setAssociation( z_b_t )
+u_mod_b_t.setAssociation( u_b_t )
+
+
+##===========================================
+##          EDGES
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+edge_mod_face_h_1_1.addAssociation( edge_face_h_1, 0.5, 1. )
+edge_mod_face_h_1_2.addAssociation( edge_face_h_1, 0., 0.5 )
+edge_mod_face_h_2_1.addAssociation( edge_face_h_2, 0.5, 1. )
+edge_mod_face_h_2_2.addAssociation( edge_face_h_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_h_1_1.addAssociation( edge_t_face_h_1, 0.5, 1. )
+edge_mod_t_face_h_1_2.addAssociation( edge_t_face_h_1, 0., 0.5 )
+edge_mod_t_face_h_2_1.addAssociation( edge_t_face_h_2, 0.5, 1. )
+edge_mod_t_face_h_2_2.addAssociation( edge_t_face_h_2, 0., 0.5 )
+
+# Face du bas
+
+## Grand rayon
+edge_mod_face_b_1_1.addAssociation( edge_face_b_1, 0.5, 1. )
+edge_mod_face_b_1_2.addAssociation( edge_face_b_1, 0., 0.5 )
+edge_mod_face_b_2_1.addAssociation( edge_face_b_2, 0.5, 1. )
+edge_mod_face_b_2_2.addAssociation( edge_face_b_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_b_1_1.addAssociation( edge_t_face_b_1, 0.5, 1. )
+edge_mod_t_face_b_1_2.addAssociation( edge_t_face_b_1, 0., 0.5 )
+edge_mod_t_face_b_2_1.addAssociation( edge_t_face_b_2, 0.5, 1. )
+edge_mod_t_face_b_2_2.addAssociation( edge_t_face_b_2, 0., 0.5 )
+
+
+
+# Joignant les 2 faces
+#Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_1, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_2, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_3, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_4, 0., 1. )
+Edge_Mod_int_h.addAssociation( Edge_Tuy_int_h, 0., 1. )
+
+Edge_Mod_int_b.addAssociation( Edge_Tuy_int_b, 0., 1. )
+Edge_Mod_ext_b.addAssociation( Edge_Tuy_ext_b, 0., 1. )
+
+Edge_Mod_ext_g.addAssociation( Edge_Tuy_ext_g, 0., 1. )
+Edge_Mod_int_g.addAssociation( Edge_Tuy_int_g, 0., 1. )
+
+Edge_Mod_int_d.addAssociation( Edge_Tuy_int_d, 0., 1. )
+Edge_Mod_ext_d.addAssociation( Edge_Tuy_ext_d, 0., 1. )
+
+
+#Quad_mod_1.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_1.addAssociation( Face_0 )
+Quad_mod_1.addAssociation( Face_6 )
+Quad_mod_1.addAssociation( Face_10 )
+Quad_mod_1.addAssociation( Face_14 )
+
+#Quad_mod_0.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_0.addAssociation( Face_1 )
+Quad_mod_0.addAssociation( Face_7 )
+Quad_mod_0.addAssociation( Face_11 )
+Quad_mod_0.addAssociation( Face_15 )
+
+#Quad_mod_2.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_2.addAssociation( Face_2 )
+Quad_mod_2.addAssociation( Face_4 )
+Quad_mod_2.addAssociation( Face_8 )
+Quad_mod_2.addAssociation( Face_12 )
+
+#Quad_mod_3.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_3.addAssociation( Face_3 )
+Quad_mod_3.addAssociation( Face_5 )
+Quad_mod_3.addAssociation( Face_9 )
+Quad_mod_3.addAssociation( Face_13 )
+
+
+
+#==========================================================
+#       LA GEOMETRIE DANS L'ARBRE D'ETUDE SALOME
+#==========================================================
+#for i,e in enumerate(All_Edges_Tuy_1): geompy.addToStudy( e, "edge_"+str(i) )
+geompy.addToStudy(Tuyau_geom, "Tuyau_geom")
+geompy.addToStudy( x_h, "x_h" )
+geompy.addToStudy( y_h, "y_h" )
+geompy.addToStudy( z_h, "z_h" )
+geompy.addToStudy( u_h, "u_h" )
+geompy.addToStudy( x_h_t, "x_h_t")
+geompy.addToStudy( y_h_t, "y_h_t" )
+geompy.addToStudy( z_h_t, "z_h_t" )
+geompy.addToStudy( u_h_t, "u_h_t" )
+
+geompy.addToStudy( x_b, "x_b")
+geompy.addToStudy( y_b, "y_b" )
+geompy.addToStudy( z_b, "z_b" )
+geompy.addToStudy( u_b, "u_b")
+geompy.addToStudy( x_b_t, "x_b_t" )
+geompy.addToStudy( y_b_t, "y_b_t" )
+geompy.addToStudy( z_b_t, "z_b_t" )
+geompy.addToStudy( u_b_t, "u_b_t" )
+
+
+#geompy.addToStudy(Line_Z1_Z2, "Line_Z1_Z2")
+#geompy.addToStudy(Pipe_Ztt, "Pipe_Ztt")
+#geompy.addToStudy( Partition_Ztt , "Partition_Ztt" )
+geompy.addToStudy( Edge_Tuy_ext_h , "Edge_Tuy_ext_h" )
+geompy.addToStudy( Edge_Tuy_int_h , "Edge_Tuy_int_h" )
+geompy.addToStudy( Edge_Tuy_int_b , "Edge_Tuy_int_b" )
+geompy.addToStudy( Edge_Tuy_ext_b , "Edge_Tuy_ext_b" )
+geompy.addToStudy( Edge_Tuy_ext_g , "Edge_Tuy_ext_g" )
+geompy.addToStudy( Edge_Tuy_int_g , "Edge_Tuy_int_g" )
+geompy.addToStudy( Edge_Tuy_ext_d , "Edge_Tuy_ext_d" )
+geompy.addToStudy( Edge_Tuy_int_d , "Edge_Tuy_int_d" )
+#geompy.addToStudy( Partition_Edge_g_d_h_b , "Partition_Edge_g_d_h_b" )
+geompy.addToStudy( Face_Tuy_ext_1 , "Face_Tuy_ext_1" )
+geompy.addToStudy( Face_Tuy_ext_2 , "Face_Tuy_ext_2" )
+#geompy.addToStudy( Partition_Face , "Partition_Face" )
+geompy.addToStudy( Face_0 , "Face_0" )
+geompy.addToStudy( Face_1 , "Face_1" )
+geompy.addToStudy( Face_2 , "Face_2" )
+geompy.addToStudy( Face_3 , "Face_3" )
+geompy.addToStudy( Face_4 , "Face_4" )
+geompy.addToStudy( Face_5 , "Face_5" )
+geompy.addToStudy( Face_6 , "Face_6" )
+geompy.addToStudy( Face_7 , "Face_7" )
+geompy.addToStudy( Face_8 , "Face_8" )
+geompy.addToStudy( Face_9 , "Face_9" )
+geompy.addToStudy( Face_10 , "Face_10" )
+geompy.addToStudy( Face_11 , "Face_11" )
+geompy.addToStudy( Face_12 , "Face_12" )
+geompy.addToStudy( Face_13 , "Face_13" )
+geompy.addToStudy( Face_14 , "Face_14" )
+geompy.addToStudy( Face_15 , "Face_15" )
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+##=================================================
+## Definir les groupes d'elements pour le maillage
+##=================================================
+
+# groupe de Hexa(volumes) 
+Hexa_grp = doc.addHexaGroup("Hexa_all_grp")
+Nbr_Hex = doc.countHexa()
+print "doc.countHexa()->",Nbr_Hex
+
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+#Nbr_elm_hex = Hexa_grp.countElement()
+#print "Hexa_all_grp  countElement() ->",Nbr_elm_hex
+
+for i in range(Nbr_Hex):
+    Hexa_grp = doc.addHexaGroup("Hexa_grp"+str(i))
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+# groupe de quads (faces)
+Quad_grp_haut = doc.addQuadGroup("Quad_grp_haut")
+Quad_h_1 = doc.findQuad( x_mod_h , y_mod_h_t )
+Quad_h_2 = doc.findQuad( y_mod_h_t , z_mod_h )
+Quad_h_3 = doc.findQuad( z_mod_h , u_mod_h_t )
+Quad_h_4 = doc.findQuad( u_mod_h_t , x_mod_h )
+
+assert Quad_h_1
+assert Quad_h_2
+assert Quad_h_3
+assert Quad_h_4
+
+for Quad_h_i in [ Quad_h_1 , Quad_h_2 , Quad_h_3 , Quad_h_4 ]:
+    Quad_grp_haut.addElement(Quad_h_i)
+
+
+Quad_grp_bas = doc.addQuadGroup("Quad_grp_bas")
+Quad_b_1 = doc.findQuad( x_mod_b , y_mod_b_t )
+Quad_b_2 = doc.findQuad( y_mod_b_t , z_mod_b )
+Quad_b_3 = doc.findQuad( z_mod_b , u_mod_b_t )
+Quad_b_4 = doc.findQuad( u_mod_b_t , x_mod_b )
+
+
+assert Quad_b_1
+assert Quad_b_2
+assert Quad_b_3
+assert Quad_b_4
+
+for Quad_b_i in [ Quad_b_1 , Quad_b_2 , Quad_b_3 , Quad_b_4 ]:
+    Quad_grp_bas.addElement(Quad_b_i)
+
+#Nbr_elm_qad_bas = Quad_grp_bas.countElement()
+#print "Nbr_elm_qad_bas->",Nbr_elm_qad_bas
+
+
+
+# groupe de Edges
+Edge_Grp_haut = doc.addEdgeGroup("Edge_Grp_haut")
+Edge_Grp_haut.addElement(Edge_Mod_ext_h)
+Edge_Grp_haut.addElement(Edge_Mod_int_h)
+
+Edge_Grp_gauche = doc.addEdgeGroup("Edge_Grp_gauche")
+Edge_Grp_gauche.addElement(Edge_Mod_ext_g)
+Edge_Grp_gauche.addElement(Edge_Mod_int_g)
+
+Edge_Grp_bas = doc.addEdgeGroup("Edge_Grp_bas")
+Edge_Grp_bas.addElement(Edge_Mod_int_b)
+Edge_Grp_bas.addElement(Edge_Mod_ext_b)
+
+Edge_Grp_droit = doc.addEdgeGroup("Edge_Grp_droit")
+Edge_Grp_droit.addElement(Edge_Mod_int_d)
+Edge_Grp_droit.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de Hexa 
+Hexa_Nod_Grp = doc.addHexaNodeGroup("Hexa_Nod_Grp")
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_Nod_Grp.addElement(Hexa_i)
+
+# groupe de noeuds de Quad 
+Quad_Nod_Grp_h_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_h_1")
+Quad_Nod_Grp_h_1.addElement(Quad_h_1)
+
+Quad_Nod_Grp_b_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_b_1")
+Quad_Nod_Grp_b_1.addElement(Quad_b_1)
+
+# groupe de noeuds de Edge 
+Edge_Nod_Grp_b = doc.addEdgeNodeGroup("Edge_Nod_Grp_b")
+Edge_Nod_Grp_b.addElement(Edge_Mod_int_b)
+Edge_Nod_Grp_b.addElement(Edge_Mod_ext_b)
+
+Edge_Nod_Grp_h = doc.addEdgeNodeGroup("Edge_Nod_Grp_h")
+Edge_Nod_Grp_h.addElement(Edge_Mod_int_d)
+Edge_Nod_Grp_h.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de vertex pour tout le modele
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+bp_law = doc.getLaw(0)
+bp_law.setNodes(4)
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+#Law_X = doc.addLaw( "Uniform" , 4 )
+#Law_Y = doc.addLaw( "Arithmetic" , 2 )
+#Law_Z = doc.addLaw( "Geometric" , 3 )
+Law_X = doc.addLaw( "Arithmetic" , 5 )
+Law_X.setKind(hexablock.ARITHMETIC)
+Law_X.setCoefficient(0.1)
+
+Law_Y = doc.addLaw( "Arithmetic" , 3 )
+Law_Y.setKind(hexablock.ARITHMETIC)
+Law_Y.setCoefficient(0.1)
+
+#Law_Z = doc.addLaw( "Geometric" , 4 )
+Law_Z = doc.addLaw( "Arithmetic" , 5 )
+Law_Z.setKind(hexablock.ARITHMETIC)
+Law_Z.setCoefficient(0.05)
+
+
+# chercher les propagations du modele
+Edge_Law_X = doc.findEdge( x_mod_h , x_mod_h_t )
+Edge_Law_Y = doc.findEdge( y_mod_h , y_mod_h_t )
+Edge_Law_Z = doc.findEdge( y_mod_h , y_mod_b )
+
+Propa_X = doc.findPropagation( Edge_Law_X )
+Propa_Y = doc.findPropagation( Edge_Law_Y )
+Propa_Z = doc.findPropagation( Edge_Law_Z )
+
+# appliquer la loi de discretisation sur tout le modele et generer le maillage
+Propa_X.setLaw( Law_X )
+Propa_Y.setLaw( Law_Y )
+Propa_Z.setLaw( Law_Z )
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh = hexablock.mesh("TUYAU_COURBE", doc)
+
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+salome.sg.updateObjBrowser(1)
+
+#Nombre d hexaedres: 480
+#Nombre de quadrangles: 496
+#Nombre de segments: 160
+#Nombre de noeuds: 700
+
+allGroups = mesh.GetGroups()
+print  " --- GROUPES --- "
+for aGroup in allGroups:
+    print "\nNOM:", aGroup.GetName()
+    print "IDS:", aGroup.GetIDs()
+
+
+
+## --------------------
+## Maillage hexaédrique
+## --------------------
+#mesh = mesh.ExportMED( "tuyau.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "tuyau.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  " --- MAILLAGE HEXAHEDRIQUE --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
diff --git a/src/TEST_PY/Test_HEXABLOCK.py b/src/TEST_PY/Test_HEXABLOCK.py
new file mode 100755 (executable)
index 0000000..83a2c43
--- /dev/null
@@ -0,0 +1,262 @@
+# -*- coding: latin-1 -*-
+
+import hexablock
+
+# ======================================================== test_sphere
+def test_sphere():
+   doc = hexablock.addDocument()
+   orig = doc.addVertex (0,0,0)
+
+   ncouches = 1
+   k = 0.8
+   decal  = doc.addVector (1,1,1)
+   sphere = doc.makeSpherical(orig, decal, ncouches, k)
+
+   sphere.saveVtk ("test_sphere.vtk")
+   # doc.dump ()
+   print "test_sphere OK"
+   
+   
+# ======================================================== test_cartesi1
+def test_cartesi1():
+  size_x = 15
+  size_y = 12
+  size_z = 8
+
+  doc  = hexablock.addDocument()
+  orig = doc.addVertex (0,0,0)
+  direc= doc.addVector (1,1,1)
+  grid = doc.makeCartesian1(orig, direc, size_x,size_y,size_z,0,0,0)
+  grid.saveVtk ("test_cartesi1.vtk")
+  # doc.dump ()
+  print "test_cartesi1 OK"
+
+
+
+#// ======================================================== test_find
+def test_find():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc  = hexablock.addDocument()
+   
+   orig = doc.addVertex(0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid = doc.makeCartesian1 (orig, direc, size_x,size_y,size_z,0,0,0)
+
+   grid.saveVtk ("mini1.vtk")
+   #doc.dump ().
+
+   v00 = doc.findVertex (0, 0, 0)   
+   v02 = doc.findVertex (1, 1, 0)
+   v06 = doc.findVertex (1, 1, 1)
+   v08 = doc.findVertex (2, 1, 0)
+   v10 = doc.findVertex (2, 1, 1)
+   v22 = doc.findVertex (2, 1, 2)
+   v26 = doc.findVertex (2, 2, 2)
+
+   assert v00
+   assert v02
+   assert v06
+   assert v08
+   assert v10
+   assert v22
+   assert v26
+
+   assert doc.findEdge (v06, v10)
+   assert doc.findEdge (v10, v06)
+
+   assert doc.findQuad (v02, v10)
+   assert doc.findQuad (v06, v08)
+   assert not doc.findQuad (v02, v06)  #CS_FAILS
+   
+   assert doc.findHexa (v00, v06)
+   assert doc.findHexa (v06, v26)
+   assert doc.findHexa (v26, v06)
+   print "test_find OK"
+
+#// ======================================================== test_joint
+def test_joint():
+   import HEXA_ORB
+   dimx = 11
+   dimy = 11
+   dimz = 2
+
+   doc = hexablock.addDocument()
+
+   orig1 = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+
+   grid1 = doc.makeCartesian1(orig1, direc, dimx, dimy, dimz, 0, 0, 0 )
+
+   orig2 = doc.addVertex  (dimx/2.0,0,8)
+   vectj = doc.addVector (0,1,0)
+   vecti = doc.addVector (1,0,0)
+   grid2 = doc.makeCylindrical (orig2, vecti, vectj, 1, 180, 1,dimz,dimy,dimx, False)
+
+   mx = dimx/2
+   my = dimy/2
+   prems = grid1.getQuad1 (HEXA_ORB.DIR_Z, mx, my, dimz)
+   cible = grid2.getQuad1 (HEXA_ORB.DIR_X, dimz, mx, my)
+
+
+   v1 = prems.getVertex (0)
+   v2 = cible.getVertex (0)
+   v3 = prems.getVertex (1)
+   v4 = cible.getVertex (3)
+
+   liste = []
+   miroir = []
+
+   liste.append(prems)
+   
+   for nx in range(dimx):
+      if ( nx != mx ):
+        liste.append(grid1.getQuad1 (HEXA_ORB.DIR_Z, nx, my, dimz))
+   
+   #for (int nx=0. nx<dimx. nx++)
+       #if (nx!=mx) 
+          #liste.append(grid1.getQuad (dir_z, nx, my, dimz)). 
+
+   for ny in range(dimy):
+      if ( ny != my ):
+        liste.append(grid1.getQuad1 (HEXA_ORB.DIR_Z, mx, ny, dimz))
+   #for (int ny=0. ny<dimy. ny++)
+       #if (ny!=my) 
+          #liste.push_back (grid1.getQuad (dir_z, mx, ny, dimz)). 
+
+   joint = doc.joinQuads  (liste, cible, v1, v2, v3, v4, 5)
+
+   joint.saveVtk ("test_joint.vtk")
+   print "test_joint OK"
+
+#// ======================================================== test_mini
+def test_mini():  
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument ()
+
+   orig  = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid  = doc.makeCartesian1( orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   orig2 = doc.addVertex (0,0,5)
+   grid2 = doc.makeCartesian1( orig2, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   #doc.saveVtk ("mini.vtk").
+   grid2.saveVtk ("test_mini.vtk")
+   print "test_mini OK"
+
+#// ======================================================== test_clone
+def test_clone():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument()
+
+   orig = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid1 = doc.makeCartesian1(orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   bond = doc.addVector (0, 0, 7)
+   grid2 = doc.makeTranslation(grid1, bond)
+
+   grid1.saveVtk ("test_clone.grid1.vtk")
+   grid2.saveVtk ("test_clone.grid2.vtk")
+   #doc .saveVtk ("clonage.vtk").
+   #doc .dump().
+   print "test_clone OK"
+
+#// ======================================================== test_separ
+def test_separ():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument()
+
+   orig = doc.addVertex (0,0,0)
+   direc = doc.addVector (1,1,1)
+   grid = doc.makeCartesian1(orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   grid.saveVtk ("test_separ.vtk")
+   #doc .saveVtk ("separ.vtk").
+   #doc .dump().
+   print "test_separ OK"
+
+#// ======================================================== test_cyl
+def test_cyl():
+   doc = hexablock.addDocument()
+
+   orig = doc.addVertex (0,0,0)
+   haut = doc.addVector (0,0,1)
+   base = doc.addVector (1,0,0)
+
+   dr = 1
+   #// double da = 360. // degres
+   dl = 1
+   nr = 2
+   na = 9
+   nl = 5
+
+   cyl1 = doc.makeCylindrical(orig,base,haut,dr, 360,  dl,nr,na,nl, False )
+   cyl1.saveVtk ("test_cyl.full.vtk")
+
+   cyl2 = doc.makeCylindrical(orig,haut,base,dr, 270, dl,nr,na,nl, False )
+   cyl2.saveVtk ("test_cyl.34.vtk")
+
+   #// doc.dump ()
+   print "test_cyl OK"
+
+
+#// ======================================================== test_propagation
+def test_propagation():
+   size_x = 2
+   size_y = 1
+   size_z = 1
+
+   doc = hexablock.addDocument()
+
+   orig  = doc.addVertex(0,0,0)
+   direc = doc.addVector(1,1,1)
+   grid  = doc.makeCartesian1(orig, direc, size_x,size_y,size_z, 0, 0, 0 )
+
+   #doc.dump  ().
+   nb = doc.countPropagation()
+
+   for nro in range(nb):
+       prop  = doc.getPropagation (nro)
+       edges = prop.getEdges()
+       #ways  = prop.getWays()
+       
+       for i, anEdge in enumerate(edges):
+         if anEdge.getWay():
+          print "( ", anEdge.getVertex (0), ",", anEdge.getVertex (1), " )"
+        else:
+          print "( ", anEdge.getVertex (1), ",", anEdge.getVertex (0), " )"
+           
+   print "test_propagation OK"
+
+
+
+
+
+
+
+
+
+
+#test_sphere()
+#test_cartesi1()
+#test_find()
+#test_joint()
+#test_mini()  
+#test_clone()
+#test_separ()
+#test_cyl()
+#test_propagation()
+
diff --git a/src/TEST_PY/crank.stp b/src/TEST_PY/crank.stp
new file mode 100755 (executable)
index 0000000..0aef5e4
--- /dev/null
@@ -0,0 +1,1178 @@
+ISO-10303-21;\r
+HEADER;\r
+ FILE_DESCRIPTION(('a Product shape'),'1');\r
+ FILE_NAME('Euclid  Shape Model','1998-12-23T10:04:46',('Author Name'),(\r
+    'MATRA-DATAVISION'),'OL-2.0D','EUCLID','Authorisation status');\r
+ FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }'));\r
+ENDSEC;\r
+DATA;\r
+#1 = PRODUCT_TYPE('part',$,(#2));\r
+#2 = PRODUCT('the product name','the product name','void',(#3));\r
+#3 = MECHANICAL_CONTEXT('Mechanical',#4,'Assembly');\r
+#4 = APPLICATION_CONTEXT('EUCLID');\r
+#5 = APPLICATION_PROTOCOL_DEFINITION('CommitteeDraft',\r
+  'automotive_design',1997,#4);\r
+#6 = SHAPE_DEFINITION_REPRESENTATION(#7,#11);\r
+#7 = PRODUCT_DEFINITION_SHAPE('void','void',#8);\r
+#8 = PRODUCT_DEFINITION('void','void',#9,#10);\r
+#9 = PRODUCT_DEFINITION_FORMATION('ID','void',#2);\r
+#10 = PRODUCT_DEFINITION_CONTEXT('as proposed',#4,'First_Design');\r
+#11 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#12),#866);\r
+#12 = MANIFOLD_SOLID_BREP('',#13);\r
+#13 = CLOSED_SHELL('',(#14,#338,#415,#466,#518,#566,#617,#668,#720,#747,\r
+    #798,#849));\r
+#14 = ADVANCED_FACE('',(#15,#270,#304),#30,.F.);\r
+#15 = FACE_BOUND('',#16,.T.);\r
+#16 = EDGE_LOOP('',(#17,#56,#88,#120,#148,#180,#212,#244));\r
+#17 = ORIENTED_EDGE('',*,*,#18,.T.);\r
+#18 = EDGE_CURVE('',#19,#21,#23,.T.);\r
+#19 = VERTEX_POINT('',#20);\r
+#20 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    -19.99999955296));\r
+#21 = VERTEX_POINT('',#22);\r
+#22 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    -19.99999955296));\r
+#23 = SURFACE_CURVE('',#24,(#29,#45),.PCURVE_S2.);\r
+#24 = CIRCLE('',#25,74.466478447737);\r
+#25 = AXIS2_PLACEMENT_3D('',#26,#27,#28);\r
+#26 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    -19.99999955296));\r
+#27 = DIRECTION('',(0.,0.,1.));\r
+#28 = DIRECTION('',(1.,0.,0.));\r
+#29 = PCURVE('',#30,#35);\r
+#30 = PLANE('',#31);\r
+#31 = AXIS2_PLACEMENT_3D('',#32,#33,#34);\r
+#32 = CARTESIAN_POINT('',(0.,0.,-19.99999955296));\r
+#33 = DIRECTION('',(0.,0.,1.));\r
+#34 = DIRECTION('',(1.,0.,0.));\r
+#35 = DEFINITIONAL_REPRESENTATION('',(#36),#44);\r
+#36 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#37,#38,#39,#40,#41,#42,#43),\r
+.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#37 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#38 = CARTESIAN_POINT('',(132.42991054761,231.16639046259));\r
+#39 = CARTESIAN_POINT('',(20.730192876013,166.67652839648));\r
+#40 = CARTESIAN_POINT('',(-90.96952479559,102.18666633037));\r
+#41 = CARTESIAN_POINT('',(20.730192876013,37.696804264271));\r
+#42 = CARTESIAN_POINT('',(132.42991054761,-26.79305780183));\r
+#43 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#44 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#45 = PCURVE('',#46,#51);\r
+#46 = CYLINDRICAL_SURFACE('',#47,74.466478447737);\r
+#47 = AXIS2_PLACEMENT_3D('',#48,#49,#50);\r
+#48 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    -19.99999955296));\r
+#49 = DIRECTION('',(0.,0.,1.));\r
+#50 = DIRECTION('',(1.,0.,0.));\r
+#51 = DEFINITIONAL_REPRESENTATION('',(#52),#55);\r
+#52 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#53,#54),.UNSPECIFIED.,.F.,.F.,(2,\r
+    2),(4.788278205588,5.209840138517),.PIECEWISE_BEZIER_KNOTS.);\r
+#53 = CARTESIAN_POINT('',(4.788278205588,0.));\r
+#54 = CARTESIAN_POINT('',(5.209840138517,0.));\r
+#55 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#56 = ORIENTED_EDGE('',*,*,#57,.T.);\r
+#57 = EDGE_CURVE('',#21,#58,#60,.T.);\r
+#58 = VERTEX_POINT('',#59);\r
+#59 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    -19.99999955296));\r
+#60 = SURFACE_CURVE('',#61,(#66,#77),.PCURVE_S2.);\r
+#61 = CIRCLE('',#62,44.68116165083);\r
+#62 = AXIS2_PLACEMENT_3D('',#63,#64,#65);\r
+#63 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,-19.99999955296\r
+    ));\r
+#64 = DIRECTION('',(0.,0.,-1.));\r
+#65 = DIRECTION('',(1.,0.,0.));\r
+#66 = PCURVE('',#30,#67);\r
+#67 = DEFINITIONAL_REPRESENTATION('',(#68),#76);\r
+#68 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#69,#70,#71,#72,#73,#74,#75),\r
+.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#69 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#70 = CARTESIAN_POINT('',(159.50031829025,-79.91052324495));\r
+#71 = CARTESIAN_POINT('',(92.478575814005,-41.21550218473));\r
+#72 = CARTESIAN_POINT('',(25.45683333776,-2.52048112452));\r
+#73 = CARTESIAN_POINT('',(92.478575814005,36.174539935697));\r
+#74 = CARTESIAN_POINT('',(159.50031829025,74.869560995915));\r
+#75 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#76 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#77 = PCURVE('',#78,#83);\r
+#78 = CYLINDRICAL_SURFACE('',#79,44.68116165083);\r
+#79 = AXIS2_PLACEMENT_3D('',#80,#81,#82);\r
+#80 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,-19.99999955296\r
+    ));\r
+#81 = DIRECTION('',(0.,0.,-1.));\r
+#82 = DIRECTION('',(1.,0.,0.));\r
+#83 = DEFINITIONAL_REPRESENTATION('',(#84),#87);\r
+#84 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#85,#86),.UNSPECIFIED.,.F.,.F.,(2,\r
+    2),(4.214937822253,8.351432792106),.PIECEWISE_BEZIER_KNOTS.);\r
+#85 = CARTESIAN_POINT('',(4.214937822253,0.));\r
+#86 = CARTESIAN_POINT('',(8.351432792106,0.));\r
+#87 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#88 = ORIENTED_EDGE('',*,*,#89,.T.);\r
+#89 = EDGE_CURVE('',#58,#90,#92,.T.);\r
+#90 = VERTEX_POINT('',#91);\r
+#91 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#92 = SURFACE_CURVE('',#93,(#98,#109),.PCURVE_S2.);\r
+#93 = CIRCLE('',#94,84.24770250966);\r
+#94 = AXIS2_PLACEMENT_3D('',#95,#96,#97);\r
+#95 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    -19.99999955296));\r
+#96 = DIRECTION('',(0.,0.,1.));\r
+#97 = DIRECTION('',(1.,0.,0.));\r
+#98 = PCURVE('',#30,#99);\r
+#99 = DEFINITIONAL_REPRESENTATION('',(#100),#108);\r
+#100 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#101,#102,#103,#104,#105,#106\r
+,#107),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#101 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#102 = CARTESIAN_POINT('',(137.54366003376,30.097916354281));\r
+#103 = CARTESIAN_POINT('',(11.172106269272,-42.86273422955));\r
+#104 = CARTESIAN_POINT('',(-115.1994474952,-115.8233848133));\r
+#105 = CARTESIAN_POINT('',(11.172106269272,-188.7840353972));\r
+#106 = CARTESIAN_POINT('',(137.54366003376,-261.744685981));\r
+#107 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#108 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#109 = PCURVE('',#110,#115);\r
+#110 = CYLINDRICAL_SURFACE('',#111,84.24770250966);\r
+#111 = AXIS2_PLACEMENT_3D('',#112,#113,#114);\r
+#112 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    -19.99999955296));\r
+#113 = DIRECTION('',(0.,0.,1.));\r
+#114 = DIRECTION('',(1.,0.,0.));\r
+#115 = DEFINITIONAL_REPRESENTATION('',(#116),#119);\r
+#116 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#117,#118),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.073345168663,1.501387093594),.PIECEWISE_BEZIER_KNOTS.);\r
+#117 = CARTESIAN_POINT('',(1.073345168663,0.));\r
+#118 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#119 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#120 = ORIENTED_EDGE('',*,*,#121,.T.);\r
+#121 = EDGE_CURVE('',#90,#122,#124,.T.);\r
+#122 = VERTEX_POINT('',#123);\r
+#123 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    -19.99999955296));\r
+#124 = SURFACE_CURVE('',#125,(#129,#136),.PCURVE_S2.);\r
+#125 = LINE('',#126,#127);\r
+#126 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#127 = VECTOR('',#128,1.);\r
+#128 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#129 = PCURVE('',#30,#130);\r
+#130 = DEFINITIONAL_REPRESENTATION('',(#131),#135);\r
+#131 = LINE('',#132,#133);\r
+#132 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384));\r
+#133 = VECTOR('',#134,1.);\r
+#134 = DIRECTION('',(-0.997592146088,6.935351515554E-02));\r
+#135 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#136 = PCURVE('',#137,#142);\r
+#137 = PLANE('',#138);\r
+#138 = AXIS2_PLACEMENT_3D('',#139,#140,#141);\r
+#139 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#140 = DIRECTION('',(-6.935351515554E-02,-0.997592146088,0.));\r
+#141 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#142 = DEFINITIONAL_REPRESENTATION('',(#143),#147);\r
+#143 = LINE('',#144,#145);\r
+#144 = CARTESIAN_POINT('',(0.,-3.552713678801E-14));\r
+#145 = VECTOR('',#146,1.);\r
+#146 = DIRECTION('',(1.,0.));\r
+#147 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#148 = ORIENTED_EDGE('',*,*,#149,.T.);\r
+#149 = EDGE_CURVE('',#122,#150,#152,.T.);\r
+#150 = VERTEX_POINT('',#151);\r
+#151 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    -19.99999955296));\r
+#152 = SURFACE_CURVE('',#153,(#158,#169),.PCURVE_S2.);\r
+#153 = CIRCLE('',#154,24.565238684828);\r
+#154 = AXIS2_PLACEMENT_3D('',#155,#156,#157);\r
+#155 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    -19.99999955296));\r
+#156 = DIRECTION('',(0.,0.,1.));\r
+#157 = DIRECTION('',(1.,0.,0.));\r
+#158 = PCURVE('',#30,#159);\r
+#159 = DEFINITIONAL_REPRESENTATION('',(#160),#168);\r
+#160 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#161,#162,#163,#164,#165,#166\r
+,#167),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#161 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#162 = CARTESIAN_POINT('',(-49.56097374539,-4.590120590624));\r
+#163 = CARTESIAN_POINT('',(-86.40883177263,-25.86424134171));\r
+#164 = CARTESIAN_POINT('',(-123.2566897998,-47.1383620928));\r
+#165 = CARTESIAN_POINT('',(-86.40883177263,-68.41248284389));\r
+#166 = CARTESIAN_POINT('',(-49.56097374539,-89.68660359498));\r
+#167 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#168 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#169 = PCURVE('',#170,#175);\r
+#170 = CYLINDRICAL_SURFACE('',#171,24.565238684828);\r
+#171 = AXIS2_PLACEMENT_3D('',#172,#173,#174);\r
+#172 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    -19.99999955296));\r
+#173 = DIRECTION('',(0.,0.,1.));\r
+#174 = DIRECTION('',(1.,0.,0.));\r
+#175 = DEFINITIONAL_REPRESENTATION('',(#176),#179);\r
+#176 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#177,#178),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.501387093594,2.196658099744),.PIECEWISE_BEZIER_KNOTS.);\r
+#177 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#178 = CARTESIAN_POINT('',(2.196658099744,0.));\r
+#179 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#180 = ORIENTED_EDGE('',*,*,#181,.T.);\r
+#181 = EDGE_CURVE('',#150,#182,#184,.T.);\r
+#182 = VERTEX_POINT('',#183);\r
+#183 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    -19.99999955296));\r
+#184 = SURFACE_CURVE('',#185,(#190,#201),.PCURVE_S2.);\r
+#185 = CIRCLE('',#186,29.778387016109);\r
+#186 = AXIS2_PLACEMENT_3D('',#187,#188,#189);\r
+#187 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    -19.99999955296));\r
+#188 = DIRECTION('',(0.,0.,-1.));\r
+#189 = DIRECTION('',(1.,0.,0.));\r
+#190 = PCURVE('',#30,#191);\r
+#191 = DEFINITIONAL_REPRESENTATION('',(#192),#200);\r
+#192 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#193,#194,#195,#196,#197,#198\r
+,#199),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#193 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#194 = CARTESIAN_POINT('',(-76.18209971851,-54.67278270711));\r
+#195 = CARTESIAN_POINT('',(-120.8496802426,-28.88394306744));\r
+#196 = CARTESIAN_POINT('',(-165.5172607668,-3.095103427768));\r
+#197 = CARTESIAN_POINT('',(-120.8496802426,22.693736211908));\r
+#198 = CARTESIAN_POINT('',(-76.18209971851,48.482575851583));\r
+#199 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#200 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#201 = PCURVE('',#202,#207);\r
+#202 = CYLINDRICAL_SURFACE('',#203,29.778387016109);\r
+#203 = AXIS2_PLACEMENT_3D('',#204,#205,#206);\r
+#204 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    -19.99999955296));\r
+#205 = DIRECTION('',(0.,0.,-1.));\r
+#206 = DIRECTION('',(1.,0.,0.));\r
+#207 = DEFINITIONAL_REPRESENTATION('',(#208),#211);\r
+#208 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#209,#210),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.944934553846,5.338250753333),.PIECEWISE_BEZIER_KNOTS.);\r
+#209 = CARTESIAN_POINT('',(0.944934553846,0.));\r
+#210 = CARTESIAN_POINT('',(5.338250753333,0.));\r
+#211 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#212 = ORIENTED_EDGE('',*,*,#213,.T.);\r
+#213 = EDGE_CURVE('',#182,#214,#216,.T.);\r
+#214 = VERTEX_POINT('',#215);\r
+#215 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#216 = SURFACE_CURVE('',#217,(#222,#233),.PCURVE_S2.);\r
+#217 = CIRCLE('',#218,20.41914254867);\r
+#218 = AXIS2_PLACEMENT_3D('',#219,#220,#221);\r
+#219 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    -19.99999955296));\r
+#220 = DIRECTION('',(0.,0.,1.));\r
+#221 = DIRECTION('',(1.,0.,0.));\r
+#222 = PCURVE('',#30,#223);\r
+#223 = DEFINITIONAL_REPRESENTATION('',(#224),#232);\r
+#224 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#225,#226,#227,#228,#229,#230\r
+,#231),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#225 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#226 = CARTESIAN_POINT('',(-56.13583608896,72.954908319219));\r
+#227 = CARTESIAN_POINT('',(-86.76454991196,55.271412148575));\r
+#228 = CARTESIAN_POINT('',(-117.3932637349,37.587915977932));\r
+#229 = CARTESIAN_POINT('',(-86.76454991196,19.904419807288));\r
+#230 = CARTESIAN_POINT('',(-56.13583608896,2.220923636644));\r
+#231 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#232 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#233 = PCURVE('',#234,#239);\r
+#234 = CYLINDRICAL_SURFACE('',#235,20.41914254867);\r
+#235 = AXIS2_PLACEMENT_3D('',#236,#237,#238);\r
+#236 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    -19.99999955296));\r
+#237 = DIRECTION('',(0.,0.,1.));\r
+#238 = DIRECTION('',(1.,0.,0.));\r
+#239 = DEFINITIONAL_REPRESENTATION('',(#240),#243);\r
+#240 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#241,#242),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.086527207436,4.916177873213),.PIECEWISE_BEZIER_KNOTS.);\r
+#241 = CARTESIAN_POINT('',(4.086527207436,0.));\r
+#242 = CARTESIAN_POINT('',(4.916177873213,0.));\r
+#243 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#244 = ORIENTED_EDGE('',*,*,#245,.T.);\r
+#245 = EDGE_CURVE('',#214,#19,#246,.T.);\r
+#246 = SURFACE_CURVE('',#247,(#251,#258),.PCURVE_S2.);\r
+#247 = LINE('',#248,#249);\r
+#248 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#249 = VECTOR('',#250,1.);\r
+#250 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#251 = PCURVE('',#30,#252);\r
+#252 = DEFINITIONAL_REPRESENTATION('',(#253),#257);\r
+#253 = LINE('',#254,#255);\r
+#254 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011));\r
+#255 = VECTOR('',#256,1.);\r
+#256 = DIRECTION('',(0.997121794488,7.581640296081E-02));\r
+#257 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#258 = PCURVE('',#259,#264);\r
+#259 = PLANE('',#260);\r
+#260 = AXIS2_PLACEMENT_3D('',#261,#262,#263);\r
+#261 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#262 = DIRECTION('',(-7.581640296081E-02,0.997121794488,0.));\r
+#263 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#264 = DEFINITIONAL_REPRESENTATION('',(#265),#269);\r
+#265 = LINE('',#266,#267);\r
+#266 = CARTESIAN_POINT('',(0.,-3.552713678801E-14));\r
+#267 = VECTOR('',#268,1.);\r
+#268 = DIRECTION('',(1.,0.));\r
+#269 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#270 = FACE_BOUND('',#271,.F.);\r
+#271 = EDGE_LOOP('',(#272));\r
+#272 = ORIENTED_EDGE('',*,*,#273,.T.);\r
+#273 = EDGE_CURVE('',#274,#274,#276,.T.);\r
+#274 = VERTEX_POINT('',#275);\r
+#275 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    -19.99999955296));\r
+#276 = SURFACE_CURVE('',#277,(#282,#293),.PCURVE_S2.);\r
+#277 = CIRCLE('',#278,15.057678156153);\r
+#278 = AXIS2_PLACEMENT_3D('',#279,#280,#281);\r
+#279 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    -19.99999955296));\r
+#280 = DIRECTION('',(0.,0.,-1.));\r
+#281 = DIRECTION('',(0.,1.,0.));\r
+#282 = PCURVE('',#30,#283);\r
+#283 = DEFINITIONAL_REPRESENTATION('',(#284),#292);\r
+#284 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#285,#286,#287,#288,#289,#290\r
+,#291),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#285 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#286 = CARTESIAN_POINT('',(-80.39135177038,12.24837806876));\r
+#287 = CARTESIAN_POINT('',(-93.43168357562,-10.33813916546));\r
+#288 = CARTESIAN_POINT('',(-106.4720153808,-32.92465639969));\r
+#289 = CARTESIAN_POINT('',(-119.512347186,-10.33813916546));\r
+#290 = CARTESIAN_POINT('',(-132.5526789913,12.24837806876));\r
+#291 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#292 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#293 = PCURVE('',#294,#299);\r
+#294 = CYLINDRICAL_SURFACE('',#295,15.057678156153);\r
+#295 = AXIS2_PLACEMENT_3D('',#296,#297,#298);\r
+#296 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    -40.00019910593));\r
+#297 = DIRECTION('',(0.,0.,1.));\r
+#298 = DIRECTION('',(1.,0.,0.));\r
+#299 = DEFINITIONAL_REPRESENTATION('',(#300),#303);\r
+#300 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#301,#302),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#301 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#302 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#303 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#304 = FACE_BOUND('',#305,.F.);\r
+#305 = EDGE_LOOP('',(#306));\r
+#306 = ORIENTED_EDGE('',*,*,#307,.T.);\r
+#307 = EDGE_CURVE('',#308,#308,#310,.T.);\r
+#308 = VERTEX_POINT('',#309);\r
+#309 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    -19.99999955296));\r
+#310 = SURFACE_CURVE('',#311,(#316,#327),.PCURVE_S2.);\r
+#311 = CIRCLE('',#312,23.40416683412);\r
+#312 = AXIS2_PLACEMENT_3D('',#313,#314,#315);\r
+#313 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    -19.99999955296));\r
+#314 = DIRECTION('',(0.,0.,-1.));\r
+#315 = DIRECTION('',(0.,1.,0.));\r
+#316 = PCURVE('',#30,#317);\r
+#317 = DEFINITIONAL_REPRESENTATION('',(#318),#326);\r
+#318 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#319,#320,#321,#322,#323,#324\r
+,#325),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#319 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#320 = CARTESIAN_POINT('',(159.10966469035,18.797406727139));\r
+#321 = CARTESIAN_POINT('',(138.84106165759,-16.30884352404));\r
+#322 = CARTESIAN_POINT('',(118.57245862484,-51.41509377522));\r
+#323 = CARTESIAN_POINT('',(98.303855592083,-16.30884352404));\r
+#324 = CARTESIAN_POINT('',(78.035252559326,18.797406727139));\r
+#325 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#326 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#327 = PCURVE('',#328,#333);\r
+#328 = CYLINDRICAL_SURFACE('',#329,23.40416683412);\r
+#329 = AXIS2_PLACEMENT_3D('',#330,#331,#332);\r
+#330 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    -40.00019910593));\r
+#331 = DIRECTION('',(0.,0.,1.));\r
+#332 = DIRECTION('',(1.,0.,0.));\r
+#333 = DEFINITIONAL_REPRESENTATION('',(#334),#337);\r
+#334 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#335,#336),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#335 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#336 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#337 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#338 = ADVANCED_FACE('',(#339),#46,.F.);\r
+#339 = FACE_BOUND('',#340,.T.);\r
+#340 = EDGE_LOOP('',(#341,#363,#395,#414));\r
+#341 = ORIENTED_EDGE('',*,*,#342,.T.);\r
+#342 = EDGE_CURVE('',#19,#343,#345,.T.);\r
+#343 = VERTEX_POINT('',#344);\r
+#344 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    19.999999552965));\r
+#345 = SURFACE_CURVE('',#346,(#350,#356),.PCURVE_S2.);\r
+#346 = LINE('',#347,#348);\r
+#347 = CARTESIAN_POINT('',(63.609212636948,27.934517711401,\r
+    -19.99999955296));\r
+#348 = VECTOR('',#349,1.);\r
+#349 = DIRECTION('',(0.,0.,1.));\r
+#350 = PCURVE('',#46,#351);\r
+#351 = DEFINITIONAL_REPRESENTATION('',(#352),#355);\r
+#352 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#353,#354),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#353 = CARTESIAN_POINT('',(4.788278205588,0.));\r
+#354 = CARTESIAN_POINT('',(4.788278205588,39.99999910593));\r
+#355 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#356 = PCURVE('',#259,#357);\r
+#357 = DEFINITIONAL_REPRESENTATION('',(#358),#362);\r
+#358 = LINE('',#359,#360);\r
+#359 = CARTESIAN_POINT('',(136.42439686482,0.));\r
+#360 = VECTOR('',#361,1.);\r
+#361 = DIRECTION('',(0.,-1.));\r
+#362 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#363 = ORIENTED_EDGE('',*,*,#364,.T.);\r
+#364 = EDGE_CURVE('',#343,#365,#367,.T.);\r
+#365 = VERTEX_POINT('',#366);\r
+#366 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    19.999999552965));\r
+#367 = SURFACE_CURVE('',#368,(#373,#379),.PCURVE_S2.);\r
+#368 = CIRCLE('',#369,74.466478447737);\r
+#369 = AXIS2_PLACEMENT_3D('',#370,#371,#372);\r
+#370 = CARTESIAN_POINT('',(57.963432099881,102.18666633037,\r
+    19.999999552965));\r
+#371 = DIRECTION('',(0.,0.,1.));\r
+#372 = DIRECTION('',(1.,0.,0.));\r
+#373 = PCURVE('',#46,#374);\r
+#374 = DEFINITIONAL_REPRESENTATION('',(#375),#378);\r
+#375 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#376,#377),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.788278205588,5.209840138517),.PIECEWISE_BEZIER_KNOTS.);\r
+#376 = CARTESIAN_POINT('',(4.788278205588,39.99999910593));\r
+#377 = CARTESIAN_POINT('',(5.209840138517,39.99999910593));\r
+#378 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#379 = PCURVE('',#380,#385);\r
+#380 = PLANE('',#381);\r
+#381 = AXIS2_PLACEMENT_3D('',#382,#383,#384);\r
+#382 = CARTESIAN_POINT('',(0.,0.,19.999999552965));\r
+#383 = DIRECTION('',(0.,0.,1.));\r
+#384 = DIRECTION('',(1.,0.,0.));\r
+#385 = DEFINITIONAL_REPRESENTATION('',(#386),#394);\r
+#386 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#387,#388,#389,#390,#391,#392\r
+,#393),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#387 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#388 = CARTESIAN_POINT('',(132.42991054761,231.16639046259));\r
+#389 = CARTESIAN_POINT('',(20.730192876013,166.67652839648));\r
+#390 = CARTESIAN_POINT('',(-90.96952479559,102.18666633037));\r
+#391 = CARTESIAN_POINT('',(20.730192876013,37.696804264271));\r
+#392 = CARTESIAN_POINT('',(132.42991054761,-26.79305780183));\r
+#393 = CARTESIAN_POINT('',(132.42991054761,102.18666633037));\r
+#394 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#395 = ORIENTED_EDGE('',*,*,#396,.F.);\r
+#396 = EDGE_CURVE('',#21,#365,#397,.T.);\r
+#397 = SURFACE_CURVE('',#398,(#402,#408),.PCURVE_S2.);\r
+#398 = LINE('',#399,#400);\r
+#399 = CARTESIAN_POINT('',(93.497879803181,36.745399236679,\r
+    -19.99999955296));\r
+#400 = VECTOR('',#401,1.);\r
+#401 = DIRECTION('',(0.,0.,1.));\r
+#402 = PCURVE('',#46,#403);\r
+#403 = DEFINITIONAL_REPRESENTATION('',(#404),#407);\r
+#404 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#405,#406),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#405 = CARTESIAN_POINT('',(5.209840138517,0.));\r
+#406 = CARTESIAN_POINT('',(5.209840138517,39.99999910593));\r
+#407 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#408 = PCURVE('',#78,#409);\r
+#409 = DEFINITIONAL_REPRESENTATION('',(#410),#413);\r
+#410 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#411,#412),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#411 = CARTESIAN_POINT('',(4.214937822253,0.));\r
+#412 = CARTESIAN_POINT('',(4.214937822253,-39.99999910593));\r
+#413 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#414 = ORIENTED_EDGE('',*,*,#18,.F.);\r
+#415 = ADVANCED_FACE('',(#416),#78,.T.);\r
+#416 = FACE_BOUND('',#417,.T.);\r
+#417 = EDGE_LOOP('',(#418,#419,#446,#465));\r
+#418 = ORIENTED_EDGE('',*,*,#396,.T.);\r
+#419 = ORIENTED_EDGE('',*,*,#420,.T.);\r
+#420 = EDGE_CURVE('',#365,#421,#423,.T.);\r
+#421 = VERTEX_POINT('',#422);\r
+#422 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    19.999999552965));\r
+#423 = SURFACE_CURVE('',#424,(#429,#435),.PCURVE_S2.);\r
+#424 = CIRCLE('',#425,44.68116165083);\r
+#425 = AXIS2_PLACEMENT_3D('',#426,#427,#428);\r
+#426 = CARTESIAN_POINT('',(114.81915663942,-2.52048112452,\r
+    19.999999552965));\r
+#427 = DIRECTION('',(0.,0.,-1.));\r
+#428 = DIRECTION('',(1.,0.,0.));\r
+#429 = PCURVE('',#78,#430);\r
+#430 = DEFINITIONAL_REPRESENTATION('',(#431),#434);\r
+#431 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#432,#433),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.214937822253,8.351432792106),.PIECEWISE_BEZIER_KNOTS.);\r
+#432 = CARTESIAN_POINT('',(4.214937822253,-39.99999910593));\r
+#433 = CARTESIAN_POINT('',(8.351432792106,-39.99999910593));\r
+#434 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#435 = PCURVE('',#380,#436);\r
+#436 = DEFINITIONAL_REPRESENTATION('',(#437),#445);\r
+#437 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#438,#439,#440,#441,#442,#443\r
+,#444),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#438 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#439 = CARTESIAN_POINT('',(159.50031829025,-79.91052324495));\r
+#440 = CARTESIAN_POINT('',(92.478575814005,-41.21550218473));\r
+#441 = CARTESIAN_POINT('',(25.45683333776,-2.52048112452));\r
+#442 = CARTESIAN_POINT('',(92.478575814005,36.174539935697));\r
+#443 = CARTESIAN_POINT('',(159.50031829025,74.869560995915));\r
+#444 = CARTESIAN_POINT('',(159.50031829025,-2.52048112452));\r
+#445 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#446 = ORIENTED_EDGE('',*,*,#447,.F.);\r
+#447 = EDGE_CURVE('',#58,#421,#448,.T.);\r
+#448 = SURFACE_CURVE('',#449,(#453,#459),.PCURVE_S2.);\r
+#449 = LINE('',#450,#451);\r
+#450 = CARTESIAN_POINT('',(93.497879803181,-41.78636148572,\r
+    -19.99999955296));\r
+#451 = VECTOR('',#452,1.);\r
+#452 = DIRECTION('',(0.,0.,1.));\r
+#453 = PCURVE('',#78,#454);\r
+#454 = DEFINITIONAL_REPRESENTATION('',(#455),#458);\r
+#455 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#456,#457),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#456 = CARTESIAN_POINT('',(8.351432792106,0.));\r
+#457 = CARTESIAN_POINT('',(8.351432792106,-39.99999910593));\r
+#458 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#459 = PCURVE('',#110,#460);\r
+#460 = DEFINITIONAL_REPRESENTATION('',(#461),#464);\r
+#461 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#462,#463),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#462 = CARTESIAN_POINT('',(1.073345168663,0.));\r
+#463 = CARTESIAN_POINT('',(1.073345168663,39.99999910593));\r
+#464 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#465 = ORIENTED_EDGE('',*,*,#57,.F.);\r
+#466 = ADVANCED_FACE('',(#467),#110,.F.);\r
+#467 = FACE_BOUND('',#468,.T.);\r
+#468 = EDGE_LOOP('',(#469,#470,#497,#517));\r
+#469 = ORIENTED_EDGE('',*,*,#447,.T.);\r
+#470 = ORIENTED_EDGE('',*,*,#471,.T.);\r
+#471 = EDGE_CURVE('',#421,#472,#474,.T.);\r
+#472 = VERTEX_POINT('',#473);\r
+#473 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    19.999999552965));\r
+#474 = SURFACE_CURVE('',#475,(#480,#486),.PCURVE_S2.);\r
+#475 = CIRCLE('',#476,84.24770250966);\r
+#476 = AXIS2_PLACEMENT_3D('',#477,#478,#479);\r
+#477 = CARTESIAN_POINT('',(53.295957524102,-115.8233848133,\r
+    19.999999552965));\r
+#478 = DIRECTION('',(0.,0.,1.));\r
+#479 = DIRECTION('',(1.,0.,0.));\r
+#480 = PCURVE('',#110,#481);\r
+#481 = DEFINITIONAL_REPRESENTATION('',(#482),#485);\r
+#482 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#483,#484),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.073345168663,1.501387093594),.PIECEWISE_BEZIER_KNOTS.);\r
+#483 = CARTESIAN_POINT('',(1.073345168663,39.99999910593));\r
+#484 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#485 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#486 = PCURVE('',#380,#487);\r
+#487 = DEFINITIONAL_REPRESENTATION('',(#488),#496);\r
+#488 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#489,#490,#491,#492,#493,#494\r
+,#495),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#489 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#490 = CARTESIAN_POINT('',(137.54366003376,30.097916354281));\r
+#491 = CARTESIAN_POINT('',(11.172106269272,-42.86273422955));\r
+#492 = CARTESIAN_POINT('',(-115.1994474952,-115.8233848133));\r
+#493 = CARTESIAN_POINT('',(11.172106269272,-188.7840353972));\r
+#494 = CARTESIAN_POINT('',(137.54366003376,-261.744685981));\r
+#495 = CARTESIAN_POINT('',(137.54366003376,-115.8233848133));\r
+#496 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#497 = ORIENTED_EDGE('',*,*,#498,.F.);\r
+#498 = EDGE_CURVE('',#90,#472,#499,.T.);\r
+#499 = SURFACE_CURVE('',#500,(#504,#510),.PCURVE_S2.);\r
+#500 = LINE('',#501,#502);\r
+#501 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    -19.99999955296));\r
+#502 = VECTOR('',#503,1.);\r
+#503 = DIRECTION('',(0.,0.,1.));\r
+#504 = PCURVE('',#110,#505);\r
+#505 = DEFINITIONAL_REPRESENTATION('',(#506),#509);\r
+#506 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#507,#508),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#507 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#508 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#509 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#510 = PCURVE('',#137,#511);\r
+#511 = DEFINITIONAL_REPRESENTATION('',(#512),#516);\r
+#512 = LINE('',#513,#514);\r
+#513 = CARTESIAN_POINT('',(0.,0.));\r
+#514 = VECTOR('',#515,1.);\r
+#515 = DIRECTION('',(0.,-1.));\r
+#516 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#517 = ORIENTED_EDGE('',*,*,#89,.F.);\r
+#518 = ADVANCED_FACE('',(#519),#137,.T.);\r
+#519 = FACE_BOUND('',#520,.T.);\r
+#520 = EDGE_LOOP('',(#521,#522,#545,#565));\r
+#521 = ORIENTED_EDGE('',*,*,#498,.T.);\r
+#522 = ORIENTED_EDGE('',*,*,#523,.T.);\r
+#523 = EDGE_CURVE('',#472,#524,#526,.T.);\r
+#524 = VERTEX_POINT('',#525);\r
+#525 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    19.999999552965));\r
+#526 = SURFACE_CURVE('',#527,(#531,#538),.PCURVE_S2.);\r
+#527 = LINE('',#528,#529);\r
+#528 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384,\r
+    19.999999552965));\r
+#529 = VECTOR('',#530,1.);\r
+#530 = DIRECTION('',(-0.997592146088,6.935351515554E-02,0.));\r
+#531 = PCURVE('',#137,#532);\r
+#532 = DEFINITIONAL_REPRESENTATION('',(#533),#537);\r
+#533 = LINE('',#534,#535);\r
+#534 = CARTESIAN_POINT('',(0.,-39.99999910593));\r
+#535 = VECTOR('',#536,1.);\r
+#536 = DIRECTION('',(1.,0.));\r
+#537 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#538 = PCURVE('',#380,#539);\r
+#539 = DEFINITIONAL_REPRESENTATION('',(#540),#544);\r
+#540 = LINE('',#541,#542);\r
+#541 = CARTESIAN_POINT('',(59.138831836925,-31.77853846384));\r
+#542 = VECTOR('',#543,1.);\r
+#543 = DIRECTION('',(-0.997592146088,6.935351515554E-02));\r
+#544 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#545 = ORIENTED_EDGE('',*,*,#546,.F.);\r
+#546 = EDGE_CURVE('',#122,#524,#547,.T.);\r
+#547 = SURFACE_CURVE('',#548,(#552,#559),.PCURVE_S2.);\r
+#548 = LINE('',#549,#550);\r
+#549 = CARTESIAN_POINT('',(-72.42252677679,-22.63227291405,\r
+    -19.99999955296));\r
+#550 = VECTOR('',#551,1.);\r
+#551 = DIRECTION('',(0.,0.,1.));\r
+#552 = PCURVE('',#137,#553);\r
+#553 = DEFINITIONAL_REPRESENTATION('',(#554),#558);\r
+#554 = LINE('',#555,#556);\r
+#555 = CARTESIAN_POINT('',(131.87890374807,0.));\r
+#556 = VECTOR('',#557,1.);\r
+#557 = DIRECTION('',(0.,-1.));\r
+#558 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#559 = PCURVE('',#170,#560);\r
+#560 = DEFINITIONAL_REPRESENTATION('',(#561),#564);\r
+#561 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#562,#563),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#562 = CARTESIAN_POINT('',(1.501387093594,0.));\r
+#563 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#564 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#565 = ORIENTED_EDGE('',*,*,#121,.F.);\r
+#566 = ADVANCED_FACE('',(#567),#170,.F.);\r
+#567 = FACE_BOUND('',#568,.T.);\r
+#568 = EDGE_LOOP('',(#569,#570,#597,#616));\r
+#569 = ORIENTED_EDGE('',*,*,#546,.T.);\r
+#570 = ORIENTED_EDGE('',*,*,#571,.T.);\r
+#571 = EDGE_CURVE('',#524,#572,#574,.T.);\r
+#572 = VERTEX_POINT('',#573);\r
+#573 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    19.999999552965));\r
+#574 = SURFACE_CURVE('',#575,(#580,#586),.PCURVE_S2.);\r
+#575 = CIRCLE('',#576,24.565238684828);\r
+#576 = AXIS2_PLACEMENT_3D('',#577,#578,#579);\r
+#577 = CARTESIAN_POINT('',(-74.12621243021,-47.1383620928,\r
+    19.999999552965));\r
+#578 = DIRECTION('',(0.,0.,1.));\r
+#579 = DIRECTION('',(1.,0.,0.));\r
+#580 = PCURVE('',#170,#581);\r
+#581 = DEFINITIONAL_REPRESENTATION('',(#582),#585);\r
+#582 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#583,#584),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.501387093594,2.196658099744),.PIECEWISE_BEZIER_KNOTS.);\r
+#583 = CARTESIAN_POINT('',(1.501387093594,39.99999910593));\r
+#584 = CARTESIAN_POINT('',(2.196658099744,39.99999910593));\r
+#585 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#586 = PCURVE('',#380,#587);\r
+#587 = DEFINITIONAL_REPRESENTATION('',(#588),#596);\r
+#588 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#589,#590,#591,#592,#593,#594\r
+,#595),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#589 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#590 = CARTESIAN_POINT('',(-49.56097374539,-4.590120590624));\r
+#591 = CARTESIAN_POINT('',(-86.40883177263,-25.86424134171));\r
+#592 = CARTESIAN_POINT('',(-123.2566897998,-47.1383620928));\r
+#593 = CARTESIAN_POINT('',(-86.40883177263,-68.41248284389));\r
+#594 = CARTESIAN_POINT('',(-49.56097374539,-89.68660359498));\r
+#595 = CARTESIAN_POINT('',(-49.56097374539,-47.1383620928));\r
+#596 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#597 = ORIENTED_EDGE('',*,*,#598,.F.);\r
+#598 = EDGE_CURVE('',#150,#572,#599,.T.);\r
+#599 = SURFACE_CURVE('',#600,(#604,#610),.PCURVE_S2.);\r
+#600 = LINE('',#601,#602);\r
+#601 = CARTESIAN_POINT('',(-88.51642906665,-27.22925320267,\r
+    -19.99999955296));\r
+#602 = VECTOR('',#603,1.);\r
+#603 = DIRECTION('',(0.,0.,1.));\r
+#604 = PCURVE('',#170,#605);\r
+#605 = DEFINITIONAL_REPRESENTATION('',(#606),#609);\r
+#606 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#607,#608),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#607 = CARTESIAN_POINT('',(2.196658099744,0.));\r
+#608 = CARTESIAN_POINT('',(2.196658099744,39.99999910593));\r
+#609 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#610 = PCURVE('',#202,#611);\r
+#611 = DEFINITIONAL_REPRESENTATION('',(#612),#615);\r
+#612 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#613,#614),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#613 = CARTESIAN_POINT('',(0.944934553846,0.));\r
+#614 = CARTESIAN_POINT('',(0.944934553846,-39.99999910593));\r
+#615 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#616 = ORIENTED_EDGE('',*,*,#149,.F.);\r
+#617 = ADVANCED_FACE('',(#618),#202,.T.);\r
+#618 = FACE_BOUND('',#619,.T.);\r
+#619 = EDGE_LOOP('',(#620,#621,#648,#667));\r
+#620 = ORIENTED_EDGE('',*,*,#598,.T.);\r
+#621 = ORIENTED_EDGE('',*,*,#622,.T.);\r
+#622 = EDGE_CURVE('',#572,#623,#625,.T.);\r
+#623 = VERTEX_POINT('',#624);\r
+#624 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    19.999999552965));\r
+#625 = SURFACE_CURVE('',#626,(#631,#637),.PCURVE_S2.);\r
+#626 = CIRCLE('',#627,29.778387016109);\r
+#627 = AXIS2_PLACEMENT_3D('',#628,#629,#630);\r
+#628 = CARTESIAN_POINT('',(-105.9604867346,-3.095103427768,\r
+    19.999999552965));\r
+#629 = DIRECTION('',(0.,0.,-1.));\r
+#630 = DIRECTION('',(1.,0.,0.));\r
+#631 = PCURVE('',#202,#632);\r
+#632 = DEFINITIONAL_REPRESENTATION('',(#633),#636);\r
+#633 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#634,#635),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.944934553846,5.338250753333),.PIECEWISE_BEZIER_KNOTS.);\r
+#634 = CARTESIAN_POINT('',(0.944934553846,-39.99999910593));\r
+#635 = CARTESIAN_POINT('',(5.338250753333,-39.99999910593));\r
+#636 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#637 = PCURVE('',#380,#638);\r
+#638 = DEFINITIONAL_REPRESENTATION('',(#639),#647);\r
+#639 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#640,#641,#642,#643,#644,#645\r
+,#646),.UNSPECIFIED.,.T.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#640 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#641 = CARTESIAN_POINT('',(-76.18209971851,-54.67278270711));\r
+#642 = CARTESIAN_POINT('',(-120.8496802426,-28.88394306744));\r
+#643 = CARTESIAN_POINT('',(-165.5172607668,-3.095103427768));\r
+#644 = CARTESIAN_POINT('',(-120.8496802426,22.693736211908));\r
+#645 = CARTESIAN_POINT('',(-76.18209971851,48.482575851583));\r
+#646 = CARTESIAN_POINT('',(-76.18209971851,-3.095103427768));\r
+#647 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#648 = ORIENTED_EDGE('',*,*,#649,.F.);\r
+#649 = EDGE_CURVE('',#182,#623,#650,.T.);\r
+#650 = SURFACE_CURVE('',#651,(#655,#661),.PCURVE_S2.);\r
+#651 = LINE('',#652,#653);\r
+#652 = CARTESIAN_POINT('',(-88.51642906665,21.039046347141,\r
+    -19.99999955296));\r
+#653 = VECTOR('',#654,1.);\r
+#654 = DIRECTION('',(0.,0.,1.));\r
+#655 = PCURVE('',#202,#656);\r
+#656 = DEFINITIONAL_REPRESENTATION('',(#657),#660);\r
+#657 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#658,#659),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#658 = CARTESIAN_POINT('',(5.338250753333,0.));\r
+#659 = CARTESIAN_POINT('',(5.338250753333,-39.99999910593));\r
+#660 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#661 = PCURVE('',#234,#662);\r
+#662 = DEFINITIONAL_REPRESENTATION('',(#663),#666);\r
+#663 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#664,#665),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#664 = CARTESIAN_POINT('',(4.086527207436,0.));\r
+#665 = CARTESIAN_POINT('',(4.086527207436,39.99999910593));\r
+#666 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#667 = ORIENTED_EDGE('',*,*,#181,.F.);\r
+#668 = ADVANCED_FACE('',(#669),#234,.F.);\r
+#669 = FACE_BOUND('',#670,.T.);\r
+#670 = EDGE_LOOP('',(#671,#672,#699,#719));\r
+#671 = ORIENTED_EDGE('',*,*,#649,.T.);\r
+#672 = ORIENTED_EDGE('',*,*,#673,.T.);\r
+#673 = EDGE_CURVE('',#623,#674,#676,.T.);\r
+#674 = VERTEX_POINT('',#675);\r
+#675 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    19.999999552965));\r
+#676 = SURFACE_CURVE('',#677,(#682,#688),.PCURVE_S2.);\r
+#677 = CIRCLE('',#678,20.41914254867);\r
+#678 = AXIS2_PLACEMENT_3D('',#679,#680,#681);\r
+#679 = CARTESIAN_POINT('',(-76.55497863763,37.587915977932,\r
+    19.999999552965));\r
+#680 = DIRECTION('',(0.,0.,1.));\r
+#681 = DIRECTION('',(1.,0.,0.));\r
+#682 = PCURVE('',#234,#683);\r
+#683 = DEFINITIONAL_REPRESENTATION('',(#684),#687);\r
+#684 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#685,#686),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(4.086527207436,4.916177873213),.PIECEWISE_BEZIER_KNOTS.);\r
+#685 = CARTESIAN_POINT('',(4.086527207436,39.99999910593));\r
+#686 = CARTESIAN_POINT('',(4.916177873213,39.99999910593));\r
+#687 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#688 = PCURVE('',#380,#689);\r
+#689 = DEFINITIONAL_REPRESENTATION('',(#690),#698);\r
+#690 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#691,#692,#693,#694,#695,#696\r
+,#697),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#691 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#692 = CARTESIAN_POINT('',(-56.13583608896,72.954908319219));\r
+#693 = CARTESIAN_POINT('',(-86.76454991196,55.271412148575));\r
+#694 = CARTESIAN_POINT('',(-117.3932637349,37.587915977932));\r
+#695 = CARTESIAN_POINT('',(-86.76454991196,19.904419807288));\r
+#696 = CARTESIAN_POINT('',(-56.13583608896,2.220923636644));\r
+#697 = CARTESIAN_POINT('',(-56.13583608896,37.587915977932));\r
+#698 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#699 = ORIENTED_EDGE('',*,*,#700,.F.);\r
+#700 = EDGE_CURVE('',#214,#674,#701,.T.);\r
+#701 = SURFACE_CURVE('',#702,(#706,#712),.PCURVE_S2.);\r
+#702 = LINE('',#703,#704);\r
+#703 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    -19.99999955296));\r
+#704 = VECTOR('',#705,1.);\r
+#705 = DIRECTION('',(0.,0.,1.));\r
+#706 = PCURVE('',#234,#707);\r
+#707 = DEFINITIONAL_REPRESENTATION('',(#708),#711);\r
+#708 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#709,#710),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(0.,39.99999910593),.PIECEWISE_BEZIER_KNOTS.);\r
+#709 = CARTESIAN_POINT('',(4.916177873213,0.));\r
+#710 = CARTESIAN_POINT('',(4.916177873213,39.99999910593));\r
+#711 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#712 = PCURVE('',#259,#713);\r
+#713 = DEFINITIONAL_REPRESENTATION('',(#714),#718);\r
+#714 = LINE('',#715,#716);\r
+#715 = CARTESIAN_POINT('',(0.,0.));\r
+#716 = VECTOR('',#717,1.);\r
+#717 = DIRECTION('',(0.,-1.));\r
+#718 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#719 = ORIENTED_EDGE('',*,*,#213,.F.);\r
+#720 = ADVANCED_FACE('',(#721),#259,.T.);\r
+#721 = FACE_BOUND('',#722,.T.);\r
+#722 = EDGE_LOOP('',(#723,#724,#745,#746));\r
+#723 = ORIENTED_EDGE('',*,*,#700,.T.);\r
+#724 = ORIENTED_EDGE('',*,*,#725,.T.);\r
+#725 = EDGE_CURVE('',#674,#343,#726,.T.);\r
+#726 = SURFACE_CURVE('',#727,(#731,#738),.PCURVE_S2.);\r
+#727 = LINE('',#728,#729);\r
+#728 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011,\r
+    19.999999552965));\r
+#729 = VECTOR('',#730,1.);\r
+#730 = DIRECTION('',(0.997121794488,7.581640296081E-02,0.));\r
+#731 = PCURVE('',#259,#732);\r
+#732 = DEFINITIONAL_REPRESENTATION('',(#733),#737);\r
+#733 = LINE('',#734,#735);\r
+#734 = CARTESIAN_POINT('',(0.,-39.99999910593));\r
+#735 = VECTOR('',#736,1.);\r
+#736 = DIRECTION('',(1.,0.));\r
+#737 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#738 = PCURVE('',#380,#739);\r
+#739 = DEFINITIONAL_REPRESENTATION('',(#740),#744);\r
+#740 = LINE('',#741,#742);\r
+#741 = CARTESIAN_POINT('',(-72.42252677679,17.591310665011));\r
+#742 = VECTOR('',#743,1.);\r
+#743 = DIRECTION('',(0.997121794488,7.581640296081E-02));\r
+#744 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#745 = ORIENTED_EDGE('',*,*,#342,.F.);\r
+#746 = ORIENTED_EDGE('',*,*,#245,.F.);\r
+#747 = ADVANCED_FACE('',(#748),#294,.F.);\r
+#748 = FACE_BOUND('',#749,.T.);\r
+#749 = EDGE_LOOP('',(#750,#771,#796,#797));\r
+#750 = ORIENTED_EDGE('',*,*,#751,.T.);\r
+#751 = EDGE_CURVE('',#274,#752,#754,.T.);\r
+#752 = VERTEX_POINT('',#753);\r
+#753 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    19.999999552965));\r
+#754 = SEAM_CURVE('',#755,(#759,#765),.PCURVE_S2.);\r
+#755 = LINE('',#756,#757);\r
+#756 = CARTESIAN_POINT('',(-91.4143372247,-2.809300087392,\r
+    -40.00019910593));\r
+#757 = VECTOR('',#758,1.);\r
+#758 = DIRECTION('',(0.,0.,1.));\r
+#759 = PCURVE('',#294,#760);\r
+#760 = DEFINITIONAL_REPRESENTATION('',(#761),#764);\r
+#761 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#762,#763),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#762 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#763 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#764 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#765 = PCURVE('',#294,#766);\r
+#766 = DEFINITIONAL_REPRESENTATION('',(#767),#770);\r
+#767 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#768,#769),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#768 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#769 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#770 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#771 = ORIENTED_EDGE('',*,*,#772,.F.);\r
+#772 = EDGE_CURVE('',#752,#752,#773,.T.);\r
+#773 = SURFACE_CURVE('',#774,(#779,#785),.PCURVE_S2.);\r
+#774 = CIRCLE('',#775,15.057678156153);\r
+#775 = AXIS2_PLACEMENT_3D('',#776,#777,#778);\r
+#776 = CARTESIAN_POINT('',(-106.4720153808,-2.809300087392,\r
+    19.999999552965));\r
+#777 = DIRECTION('',(0.,0.,-1.));\r
+#778 = DIRECTION('',(0.,1.,0.));\r
+#779 = PCURVE('',#294,#780);\r
+#780 = DEFINITIONAL_REPRESENTATION('',(#781),#784);\r
+#781 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#782,#783),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#782 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#783 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#784 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#785 = PCURVE('',#380,#786);\r
+#786 = DEFINITIONAL_REPRESENTATION('',(#787),#795);\r
+#787 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#788,#789,#790,#791,#792,#793\r
+,#794),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#788 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#789 = CARTESIAN_POINT('',(-80.39135177038,12.24837806876));\r
+#790 = CARTESIAN_POINT('',(-93.43168357562,-10.33813916546));\r
+#791 = CARTESIAN_POINT('',(-106.4720153808,-32.92465639969));\r
+#792 = CARTESIAN_POINT('',(-119.512347186,-10.33813916546));\r
+#793 = CARTESIAN_POINT('',(-132.5526789913,12.24837806876));\r
+#794 = CARTESIAN_POINT('',(-106.4720153808,12.24837806876));\r
+#795 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#796 = ORIENTED_EDGE('',*,*,#751,.F.);\r
+#797 = ORIENTED_EDGE('',*,*,#273,.T.);\r
+#798 = ADVANCED_FACE('',(#799),#328,.F.);\r
+#799 = FACE_BOUND('',#800,.T.);\r
+#800 = EDGE_LOOP('',(#801,#822,#847,#848));\r
+#801 = ORIENTED_EDGE('',*,*,#802,.T.);\r
+#802 = EDGE_CURVE('',#308,#803,#805,.T.);\r
+#803 = VERTEX_POINT('',#804);\r
+#804 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    19.999999552965));\r
+#805 = SEAM_CURVE('',#806,(#810,#816),.PCURVE_S2.);\r
+#806 = LINE('',#807,#808);\r
+#807 = CARTESIAN_POINT('',(141.97662545896,-4.606760106981,\r
+    -40.00019910593));\r
+#808 = VECTOR('',#809,1.);\r
+#809 = DIRECTION('',(0.,0.,1.));\r
+#810 = PCURVE('',#328,#811);\r
+#811 = DEFINITIONAL_REPRESENTATION('',(#812),#815);\r
+#812 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#813,#814),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#813 = CARTESIAN_POINT('',(0.,20.000199552965));\r
+#814 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#815 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#816 = PCURVE('',#328,#817);\r
+#817 = DEFINITIONAL_REPRESENTATION('',(#818),#821);\r
+#818 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#819,#820),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(20.000199552965,60.000198658895),.PIECEWISE_BEZIER_KNOTS.);\r
+#819 = CARTESIAN_POINT('',(6.28318530718,20.000199552965));\r
+#820 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#821 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#822 = ORIENTED_EDGE('',*,*,#823,.F.);\r
+#823 = EDGE_CURVE('',#803,#803,#824,.T.);\r
+#824 = SURFACE_CURVE('',#825,(#830,#836),.PCURVE_S2.);\r
+#825 = CIRCLE('',#826,23.40416683412);\r
+#826 = AXIS2_PLACEMENT_3D('',#827,#828,#829);\r
+#827 = CARTESIAN_POINT('',(118.57245862484,-4.606760106981,\r
+    19.999999552965));\r
+#828 = DIRECTION('',(0.,0.,-1.));\r
+#829 = DIRECTION('',(0.,1.,0.));\r
+#830 = PCURVE('',#328,#831);\r
+#831 = DEFINITIONAL_REPRESENTATION('',(#832),#835);\r
+#832 = B_SPLINE_CURVE_WITH_KNOTS('',1,(#833,#834),.UNSPECIFIED.,.F.,.F.,\r
+  (2,2),(1.570796326795,7.853981633974),.PIECEWISE_BEZIER_KNOTS.);\r
+#833 = CARTESIAN_POINT('',(6.28318530718,60.000198658895));\r
+#834 = CARTESIAN_POINT('',(0.,60.000198658895));\r
+#835 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#836 = PCURVE('',#380,#837);\r
+#837 = DEFINITIONAL_REPRESENTATION('',(#838),#846);\r
+#838 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#839,#840,#841,#842,#843,#844\r
+,#845),.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(\r
+    -2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,\r
+8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM() \r
+RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(\r
+  '') );\r
+#839 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#840 = CARTESIAN_POINT('',(159.10966469035,18.797406727139));\r
+#841 = CARTESIAN_POINT('',(138.84106165759,-16.30884352404));\r
+#842 = CARTESIAN_POINT('',(118.57245862484,-51.41509377522));\r
+#843 = CARTESIAN_POINT('',(98.303855592083,-16.30884352404));\r
+#844 = CARTESIAN_POINT('',(78.035252559326,18.797406727139));\r
+#845 = CARTESIAN_POINT('',(118.57245862484,18.797406727139));\r
+#846 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2) \r
+PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''\r
+  ) );\r
+#847 = ORIENTED_EDGE('',*,*,#802,.F.);\r
+#848 = ORIENTED_EDGE('',*,*,#307,.T.);\r
+#849 = ADVANCED_FACE('',(#850,#860,#863),#380,.T.);\r
+#850 = FACE_BOUND('',#851,.F.);\r
+#851 = EDGE_LOOP('',(#852,#853,#854,#855,#856,#857,#858,#859));\r
+#852 = ORIENTED_EDGE('',*,*,#364,.T.);\r
+#853 = ORIENTED_EDGE('',*,*,#420,.T.);\r
+#854 = ORIENTED_EDGE('',*,*,#471,.T.);\r
+#855 = ORIENTED_EDGE('',*,*,#523,.T.);\r
+#856 = ORIENTED_EDGE('',*,*,#571,.T.);\r
+#857 = ORIENTED_EDGE('',*,*,#622,.T.);\r
+#858 = ORIENTED_EDGE('',*,*,#673,.T.);\r
+#859 = ORIENTED_EDGE('',*,*,#725,.T.);\r
+#860 = FACE_BOUND('',#861,.T.);\r
+#861 = EDGE_LOOP('',(#862));\r
+#862 = ORIENTED_EDGE('',*,*,#772,.T.);\r
+#863 = FACE_BOUND('',#864,.T.);\r
+#864 = EDGE_LOOP('',(#865));\r
+#865 = ORIENTED_EDGE('',*,*,#823,.T.);\r
+#866 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) \r
+GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#869)) GLOBAL_UNIT_ASSIGNED_CONTEXT\r
+((#867,#868)) REPRESENTATION_CONTEXT('Context #1',\r
+  '3D Context with UNIT and UNCERTAINTY') );\r
+#867 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) );\r
+#868 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );\r
+#869 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-04),#867,\r
+  'distance_accuracy_value','Confusion accuracy');\r
+ENDSEC;\r
+END-ISO-10303-21;\r
+\r
diff --git a/src/TEST_PY/tees.brep b/src/TEST_PY/tees.brep
new file mode 100755 (executable)
index 0000000..9caa182
--- /dev/null
@@ -0,0 +1,648 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 8
+1
+1.11022302462516e-16               0               1               0 
+              0               1               0               0 
+             -1               0 1.11022302462516e-16             400 
+1
+              1               0               0             190 
+              0               1               0               0 
+              0               0               1             380 
+1
+              1               0               0             190 
+              0               1               0               0 
+              0               0               1             220 
+2  1 -1 0
+2  2 -1 0
+2  2 1 3 -1 0
+2  3 -1 0
+2  3 1 2 -1 0
+Curve2ds 38
+1 0 800 1 0 
+2 0 0 1 0 -0 1 100
+7 0 0  8 23 4  5.7595865315812871 400  5.7595865315812871 396.4531264233774  5.7629069293083175 392.92833608277681  5.7694749436140853 389.51230084494648  5.7788372822703087 386.24424709027198  5.7905468978363102 383.14348794697975  5.8042009023008854 380.21545709727701  5.8195042660091962 377.45508725218542  5.8543892203674739 372.04985730479018  5.8742056575325181 369.42820567367704  5.89564313364939 366.96284011636072  5.9186431153591617 364.64644480202827  5.9431911157077195 362.47799188863092  5.969306315324145 360.46051727651405  5.997060367620036 358.60197280754011  6.0537021647479774 355.37514358939779  6.082311505809308 353.97770142062154  6.1125302711814751 352.74076825489283  6.1443482006914323 351.69171562635694  6.1776550181455665 350.86267948835513  6.212224813535169 350.28862243838159  6.2476523776714217 350.00000035532935  6.2831853071795862 350 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+7 0 0  8 23 4  4.7123889803846897 86.602540378443834  4.7833264519171417 86.602540378443834  4.8538221133434041 86.768554360301735  4.9226876586617614 87.096991301102832  4.9896492478955832 87.559643674082267  5.0546217349220237 88.124612677936994  5.1177137403899753 88.763476885346691  5.1791713917111073 89.453947255999054  5.3042530285650589 90.961452312325122  5.3677102240744938 91.784169844339971  5.4305599185356694 92.631457510690808  5.4932602887666402 93.488642372673752  5.5562165742572436 94.341495300176803  5.6198260616794098 95.175736723592024  5.6845162320744418 95.976668732951339  5.8116848841313695 97.413920783548804  5.8739248236055932 98.05887438439521  5.9379452637785519 98.646808131231438  6.0038837402756018 99.157716247916923  6.071712633333922 99.568620170602287  6.1412648768472247 99.855699662295933  6.2121194481632589 99.999999822335369  6.2831853071795862 100 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 100
+7 0 0  8 23 4  0 350  0.033576530560921469 349.99999966423474  0.067082892452182463 350.25770810060493  0.099869308879887875 350.77111458667099  0.13156628624254196 351.51570531988671  0.16195866809536152 352.46209608878792  0.19093398028496456 353.58237755135616  0.21846654983792213 354.85222820605424  0.27426368959368119 357.84920888955003  0.3021491186068328 359.61622715531161  0.32842484744605827 361.54040041871144  0.35316416580412735 363.61204164396673  0.37639683220717668 365.8264229027584  0.39812537333505649 368.18305324271273  0.41831630740511905 370.68769525783222  0.4557439761033848 376.0736018517199  0.47292011875991768 378.9594576910697  0.48830018181480117 382.03427944841542  0.50156023379092929 385.30662787333353  0.51222803597861422 388.77333266748747  0.51976991720685906 392.41514581060738  0.52359877559829915 396.1912597343462  0.52359877559829915 400 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  -8.8817841970012523e-16 100  0.06715306112184205 100.00000016788263  0.13416540811772926 99.871153979566813  0.2000859947170639 99.614413693494853  0.26450877997241218 99.244989236204376  0.32725315809820543 98.782719490159323  0.38826782246932368 98.247314081382243  0.44764126817363259 97.656293340043064  0.57139795897359669 96.305069830741061  0.63542889192342944 95.53220561073141  0.69827952069100885 94.722154327366113  0.76035187352387279 93.8895784161206  0.82202051989645941 93.048311226451347  0.8836693219130547 92.211706870163411  0.9457321983952216 91.393072001530811  1.0730247241787252 89.809460344875689  1.138267311008704 89.045865019642434  1.2052426425872236 88.333353522290537  1.2742871129404838 87.697209384435382  1.3455881079195908 87.171127692761559  1.4190994971417732 86.793973628457834  1.4946215214818199 86.602540378443862  1.5707963267948957 86.602540378443862 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  0 450  0.033576535464432844 450  0.06708288862795353 449.74229256882165  0.099869310240679354 449.22888491692595  0.13156628503243795 448.48429456674455  0.16195866455356001 447.53790447273542  0.19093398418656715 446.41762209624159  0.21846654988386938 445.14777179147779  0.27426368959368741 442.15079111044957  0.3021491186068106 440.38377284469061  0.32842484744608935 438.45959958128537  0.3531641658041238 436.38795835603389  0.37639683220714382 434.17357709724484  0.39812537333508846 431.81694675728357  0.41831630740511105 429.31230474216915  0.45574397610337858 423.92639814828101  0.4729201187599914 421.04054230892496  0.48830018181460044 417.96572055159834  0.50156023379119397 414.6933721266472  0.51222803597843036 411.22666733252822  0.51976991720691501 407.58485418938534  0.52359877559829915 403.80874026565544  0.52359877559829915 400 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  3.1415926535897931 100  3.0744395826609292 100  3.0074272532690807 99.871154312247398  2.9415066557379972 99.614413450152753  2.8770838762873723 99.24498917729909  2.8143395030913991 98.782719765237147  2.7533248227475049 98.247313911151892  2.6939513853142487 97.656293338930354  2.5701946946161791 96.305069830740877  2.5061637616664392 95.532205610732049  2.4433131328986759 94.722154327365189  2.3812407800659359 93.889578416120742  2.319572133693443 93.048311226452213  2.257923331676631 92.211706870162374  2.195860455194603 91.393072001531209  2.0685679294110897 89.809460344875959  2.003325342581054 89.04586501964134  1.9363500110025664 88.333353522292768  1.8673055406493542 87.697209384432796  1.7960045456701803 87.171127692763221  1.7224931564479862 86.793973628457351  1.6469711321080045 86.602540378443862  1.5707963267948963 86.602540378443862 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  5.7595865315812871 400  5.7595865315812871 403.54687357661732  5.7629069293083264 407.0716639172436  5.7694749436140578 410.487699155016  5.7788372822703495 413.75575290976724  5.7905468978362755 416.85651205299661  5.804200902300904 419.78454290273055  5.8195042660091909 422.54491274781367  5.8543892203674712 427.95014269520948  5.874205657532519 430.57179432632284  5.8956431336493971 433.03715988364036  5.9186431153591563 435.35355519797133  5.9431911157077124 437.52200811136817  5.9693063153241566 439.53948272348691  5.9970603676200325 441.39802719245961  6.0537021647981906 444.62485641346274  6.0823115099356198 446.02229896119849  6.1125302674090722 447.25923114449233  6.1443481994298761 448.30828448674504  6.1776550195756252 449.13732104001321  6.2122248094106727 449.71137685489032  6.2476523829853585 450  6.2831853071795862 450 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 23 4  4.7123889803846897 86.602540378443834  4.6414515088523443 86.602540378443834  4.5709558474254868 86.76855436030219  4.5020903021086447 87.096991301101312  4.4351287128726282 87.559643674084498  4.3701562258480955 88.124612677935161  4.3070642203791722 88.7634768853476  4.2456065690582925 89.453947255998813  4.1205249322043267 90.961452312325036  4.0570677366948757 91.784169844340013  3.9942180422337055 92.631457510690936  3.9315176720027551 93.48864237267361  3.8685613865121442 94.341495300176661  3.8049518990899482 95.175736723592308  3.7402617286949473 95.976668732951225  3.6130930765252778 97.413920784822892  3.5508531282366924 98.058874567884871  3.4868327051487182 98.646807838009721  3.4208942233135531 99.157716307234637  3.3530653240854145 99.568620428735727  3.2835130923467619 99.855699311460796  3.2126585019782485 100  3.1415926535897931 100 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 86 13  2.7300758075223057 190  2.7300758075223057 188.76161711057227  2.73198839472064 187.55133668015193  2.7356595879105567 186.40804485479049  2.7406522245640779 185.33795497726547  2.7466665999124618 184.34258844053036  2.7534345015999824 183.4162771353935  2.7608247966701325 182.54924607309326  2.7805106679886924 180.5313877921306  2.7934228662572296 179.44012090542088  2.8074042576548592 178.42489439075112  2.8224021612079322 177.47714125871727  2.8383853128399443 176.58765276942751  2.8553986657883739 175.75234570339671  2.8735299500160485 174.96696097018872  2.9096367995004702 173.60217638596475  2.927074703391964 173.01544757903642  2.9455701846587412 172.46336132523098  2.9653382299711857 171.94696597602535  2.9865550769566158 171.47070368601692  3.0094637838744882 171.044924719389  3.0342362135094789 170.68192128165288  3.0846904814586811 170.16788483391167  3.110457736212882 169.98675095042276  3.1373772459573144 169.90241768877223  3.1644097931300808 169.92983296212577  3.1907387356792545 170.06246027525333  3.2157117427758561 170.28378283343829  3.2387860886964592 170.56795276727468  3.2857128896829386 171.28490034470798  3.3095267559518353 171.75813983885746  3.3315889559519829 172.28669212661248  3.3520793566732001 172.86264456356133  3.3712426139199891 173.47925753251525  3.3892171781517373 174.13467786991569  3.4061709628706178 174.82956714675092  3.4315765607080646 176.00111900189935  3.4406202276953 176.44739232078726  3.4493683641263591 176.90942117645849  3.4578076048696391 177.38676190073474  3.4659242604470752 177.87897923803828  3.473704317034132 178.38564634539176  3.4811334364598099 178.90634479241825  3.4952602825731667 179.97496970201598  3.5019582387828598 180.52299721930251  3.5082759977769666 181.08420673921333  3.5141984025436779 181.65818491571483  3.5197099661181288 182.24464543072799  3.5247948715823951 182.84342899412766  3.5294369720654961 183.45450334374323  3.5385783136065494 184.81704385450712  3.5430774304692174 185.60147540318962  3.5470027815210834 186.43393805468477  3.550193052094881 187.31387149619184  3.552464823959987 188.23647567906212  3.553634828362437 189.1915419192367  3.5535877444215225 190.16041200836165  3.5507263605782593 192.52143481281828  3.5466264819059488 193.84478773876532  3.540673500034889 195.06679581640853  3.5333903287665258 196.19442250073351  3.5251084225945828 197.2339901412731  3.516072019876451 198.19784034352128  3.5063476353219669 199.100910190511  3.4816461951625191 201.11765616922102  3.4662615750150878 202.17669187279171  3.4497197612770401 203.16359594026292  3.4319965274128248 204.08585426002017  3.4130562502099866 204.9499797977617  3.3927629809540236 205.75731315708825  3.370961354722068 206.5085724462667  3.3350837042681274 207.55059273349855  3.3227385987925833 207.87877699148535  3.3101400373711489 208.18373555748497  3.2973072930831178 208.46471177911445  3.2842597447996993 208.72099547901203  3.2710176981806867 208.95192203202214  3.2576032066711278 209.15687144238044  3.2326080049219881 209.48565334621975  3.2207392065634544 209.6214488622964  3.2084220832166892 209.74086778055747  3.1956632541851522 209.841223344334  3.1824987868080563 209.9195218531847  3.1690046109869345 209.9730562872202  3.1553069337122155 209.99999993142859  3.1415926535897936 210 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 86 13  1.5707963267948968 65.825756949558411  1.6327154712662824 65.825756949558411  1.6932291717524472 65.864006867500905  1.7507575795202066 65.937442892223871  1.8052712051910964 66.036312569896907  1.856761496125801 66.15335170344234  1.9055415063953094 66.282483552944811  1.952099936317812 66.420471346860978  2.0629161296348029 66.778932482089601  2.1250872198225084 67.006800398456491  2.1853339544706767 67.244156185569551  2.2442620112456466 67.487414231305635  2.3025351264202438 67.733314062545347  2.3606629110135016 67.979402450812643  2.4192472016931634 68.223500209089394  2.5302050784324877 68.667615336463385  2.5817194923431264 68.866839100938464  2.6345541235314025 69.06107511247879  2.6893439271069774 69.248614551513228  2.746579728106743 69.426477008510119  2.8069200610078164 69.589274370436641  2.8708713445249514 69.730508107268591  2.9992017060969078 69.932606288496331  3.0640476966405026 70.004909868877107  3.1311719850682302 70.039355662624061  3.1983917367763195 70.028318240219718  3.2641727172498611 69.974453483590707  3.3272181349982342 69.886050094789667  3.3862870149554607 69.774683728264634  3.5081798163713582 69.498670248443474  3.5714250919605042 69.319625207022071  3.6315898963777626 69.124464927538256  3.6892108940849053 68.918088997427191  3.7449840031488155 68.70476714178713  3.7993700099136132 68.486956905337252  3.8529595443561395 68.266363258980974  3.937551875106212 67.914511323779521  3.9686270521261031 67.784481815413258  3.9997344878372516 67.654297451190075  4.0308853739217598 67.524679509972557  4.0620919606083179 67.396357443356322  4.0933675566722023 67.270068875670106  4.124726529435276 67.146559603975803  4.1876412188668342 66.906610876783731  4.2192025058601512 66.790155974378578  4.2508767385050721 66.677978633765278  4.2826801747989798 66.570823982696439  4.3146367579775191 66.469422533765098  4.346778116514594 66.374490184404721  4.3791435641223728 66.286728216889173  4.4504690845129815 66.11210000381476  4.491002003142964 66.024851515159256  4.5335175110851669 65.947703969718717  4.5780101363095511 65.884232047726371  4.6242947661492 65.838676004199897  4.671990288798467 65.815204415050005  4.7203649033722543 65.816217123196935  4.8385980686239742 65.873356695599171  4.9051850188102994 65.955074132754632  4.9674898644093322 66.072897682052684  5.0260608936826561 66.214413321800095  5.0812532833458581 66.371581754615221  5.1336879948128482 66.538559525712174  5.1841437822594489 66.713161178984919  5.3004316740301887 67.141550836337416  5.3644149845568734 67.397608881735124  5.4271937142726046 67.659694988105471  5.4894601011457427 67.92460429403188  5.5518865820242498 68.189151454086755  5.6151397004226302 68.450150063818768  5.6799108441584014 68.704352379472581  5.7820106096441055 69.070516194378229  5.8164404445381965 69.188355493726078  5.850946054836804 69.299959962125172  5.8855291296563488 69.404507511993899  5.9201917940156994 69.501233167507081  5.9549345429758302 69.589436335509944  5.9897541757794714 69.668488076432126  6.0540515696396966 69.796299944449615  6.084361898704401 69.849526935371983  6.1156117040988267 69.896686629941101  6.1478015408718143 69.936560691373231  6.1808677843451756 69.967806999600143  6.2146568822517638 69.989221486740504  6.2488996068735307 69.999999972571445  6.2831853071795862 70 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 23 4  3.1415926535897931 210  3.1210614961277394 210.00000010265583  3.1005291311075647 209.93977343220345  3.0802162982823336 209.81934542997405  3.060284995992693 209.64146807704995  3.0408510042354786 209.41030407615489  3.0219936054749454 209.13045541836325  3.0037625031966315 208.80633633462796  2.9570088239511896 207.83713099429386  2.9296594696116953 207.12197755130393  2.9040228867397606 206.31025246004447  2.8800610357605061 205.41069337265455  2.8577522026420392 204.42944864183883  2.8371056950111546 203.36899179251105  2.8181483011816177 202.22871149661322  2.7852216827921472 199.8723811516461  2.7709760875281595 198.67075640785762  2.7583507212744514 197.39099658337528  2.7475970196832398 196.03237707895312  2.739053731187802 194.5987376061355  2.7330886214394798 193.09989869850125  2.7300758075223053 191.554374056744  2.7300758075223053 190 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  8 23 4  0 70  0.051327893655133572 70.000000041062307  0.1026585095332937 69.975913030090624  0.1536145142233849 69.927731557706068  0.20396142023838504 69.856930569898694  0.25355894084285602 69.765831025734656  0.30232997965063024 69.65711085521778  0.35024725499271447 69.533463217305211  0.47547900793230546 69.171622753195393  0.55125596438760471 68.911912620840965  0.62536924204793554 68.628209581487553  0.69830566983646758 68.329050162545343  0.77052910495163474 68.022247356855743  0.84253146084878594 67.71504812589032  0.91487134073599652 67.414277104885272  1.0559406020423046 66.864292017065196  1.1244501887663443 66.612974265628466  1.1944986103494166 66.379922852188102  1.2663529078851745 66.17381782714574  1.340143255040398 66.005326901049187  1.4158015554213002 65.886011034309178  1.4930776239576975 65.825756949558411  1.5707963267948966 65.825756949558411 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  7 20 4  5.8716684611120975 190  5.8716684611120975 188.40529526822812  5.8749059028716166 186.81699263164407  5.8813321069643507 185.28146610968872  5.8904651265717982 183.8194733092634  5.9018780409367047 182.44087859992891  5.9151979318998391 181.14756859074458  5.9462084611711727 178.64894098900859  5.9641289663954833 177.45327801148096  5.9838251760732435 176.34076071834318  6.0052210062401752 175.31033358514742  6.0282871279818746 174.36355769593391  6.0530414572620703 173.50466322258802  6.1044269515590086 172.03087512917583  6.1308375000050619 171.40311466706285  6.1588814209752867 170.86877872094436  6.1884827860001463 170.44450690892319  6.2194178500469297 170.14859873510889  6.2512650406347934 170  6.2831853071795862 170 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+7 0 0  7 20 4  4.7123889803846897 134.17424305044165  4.6326537437960944 134.17424305044165  4.5532394662454161 134.10950158823803  4.4756303392982897 133.98093441747497  4.4000913717954164 133.80144025823813  4.3266832464327729 133.58463698586775  4.2551915157717408 133.34204238483454  4.1106230834163906 132.80607638506953  4.0376765392582641 132.51031302161269  3.9653735469234719 132.20408324999829  3.8931647386010106 131.89522935165351  3.8205023141418311 131.591632576276  3.7468598154328787 131.30105579191766  3.6010565258622278 130.78164824019552  3.5290824764252773 130.54984232049199  3.4551199134103063 130.34511406165251  3.3790487521878019 130.1778232028887  3.3010107446235413 130.05943531939073  3.2213933199517744 130  3.1415926535897931 130 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+7 0 0  7 20 4  0 170  0.030225785850175768 170  0.060403942208535177 170.13323829157676  0.089809656452376707 170.39892023771003  0.11805541204867875 170.78166224300142  0.14492818020641529 171.26570088958786  0.17034350106111606 171.83645995042141  0.22097719814426409 173.20566738156501  0.24587007505197889 174.02300961145505  0.26911311729308007 174.92708234710466  0.29073064043857233 175.91279129804428  0.31070894112663172 176.97782263526184  0.32899625972681701 178.12264337007468  0.36230785920280351 180.61524721177804  0.37725325445837399 181.9676846606753  0.39011764872841503 183.41728858328361  0.40046937309713293 184.96339172675098  0.40780791812416606 186.59601333953287  0.41151684606748784 188.29315701982478  0.41151684606748784 190 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  3.1415926535897931 130  3.0660281889643519 130  2.990583169127206 130.05329228421115  2.9164748151389448 130.15958274693631  2.8440992178683127 130.31074365945841  2.7736158232905277 130.49706344959191  2.70495819896867 130.70955796991018  2.5631379941723229 131.19840252074181  2.490285660793738 131.47942926704206  2.4185365367169682 131.77519479638855  2.3473926232230196 132.07805706842547  2.2763352439147004 132.38049995237745  2.2048371881245359 132.67525479805303  2.0576203695522826 133.23927066004759  1.9818085176967826 133.50790196241167  1.9039233721279634 133.75038739924142  1.8236483193528268 133.95324155007785  1.7409942942068719 134.10007506789546  1.6561384758036586 134.17424305044159  1.5707963267948966 134.17424305044159 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  0 210  0.030225781949774877 210.00000015112892  0.060403947046212103 209.86676130590678  0.089809652021665798 209.60108031223749  0.11805541820573318 209.218337305402  0.14492817656264201 208.73429928613263  0.17034350101405416 208.16354005084071  0.22097719814238648 206.79433261849749  0.24587007505078695 205.97699038859366  0.26911311729224341 205.07291765293593  0.29073064043839469 204.0872087019697  0.31070894112672143 203.02217736473835  0.32899625972729307 201.87735662989815  0.36230785920336483 199.38475278817143  0.37725325445872215 198.03231533928286  0.390117648728741 196.58271141667572  0.40046937309720754 195.03660827322122  0.40780791812423445 193.40398666044547  0.41151684606748784 191.70684298016479  0.41151684606748784 190 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+7 0 0  7 20 4  0 130  0.075564454874439413 129.99999993954845  0.15100949674968245 130.05329244438005  0.22511782661739943 130.15958252985621  0.29749345235156621 130.31074383584001  0.36797682046048319 130.49706338173036  0.43663445448953642 130.70955796945879  0.57845465941195773 131.19840252072038  0.65130699279232651 131.47942926702643  0.72305611686996407 131.77519479637638  0.79420003036601372 132.07805706842194  0.86525740967521614 132.38049995237844  0.9367554654670105 132.67525479806048  1.083972284040347 133.23927066005763  1.1597841358952055 133.50790196241874  1.237669281464072 133.75038739924679  1.3179443342382484 133.95324155008026  1.4005983593840572 134.10007506789648  1.4854541777866581 134.17424305044159  1.5707963267948966 134.17424305044159 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+1 0 300 1 0 
+2 0 0 1 0 -0 1 50
+7 0 0  7 20 4  5.8716684611120975 190  5.8716684611120975 191.59470473177032  5.8749059028716193 193.18300736835764  5.8813321069643223 194.71853389030395  5.8904651265718124 196.18052669073927  5.9018780409366576 197.55912140006541  5.9151979318998142 198.85243140925283  5.9462084611708423 201.35105901096543  5.9641289663948038 202.54672198847359  5.9838251760721368 203.65923928159609  6.0052210062386386 204.68966641477729  6.0282871279797714 205.63644230398049  6.0530414572594031 206.49533677731949  6.1044269515080547 207.96912486937774  6.1308374961490646 208.59688514306879  6.1588814275196162 209.13122176228288  6.1884827812567487 209.55549250885861  6.2194178552699579 209.85140168924835  6.2512650364101381 209.99999984039866  6.2831853071795862 210 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+7 0 0  7 20 4  4.7123889803846897 134.17424305044165  4.792124216973205 134.17424305044165  4.871538494524069 134.109501588238  4.9491476214706687 133.98093441747562  5.0246865889741397 133.80144025823762  5.0980947143362885 133.58463698586883  5.1695864449974964 133.342042384835  5.3141548773514753 132.80607638507519  5.3871014215083353 132.51031302162392  5.4594044138419315 132.20408325001534  5.5316132221631182 131.89522935167579  5.60427564662095 131.59163257630365  5.677918145328567 131.30105579194895  5.8237214347629163 130.78164824070652  5.8956954738428466 130.54984239343437  5.9696580651840625 130.34511387364307  6.0457291958282866 130.17782343218008  6.1237672294309933 130.05943515068626  6.2033846302559654 130.00000006384056  6.2831853071795862 130 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+1 6.2831853071795862 -0 0 1 
+1 0 -0 0 1 
+1 0 200 1 0 
+2 0 0 1 0 -0 1 20
+1 0 40 1 0 
+1 0 0 1 0 
+2 0 0 1 0 -0 1 20
+1 0 160 1 0 
+Curves 18
+2 0 0 800 0 0 1 1 0 -0 -0 1 0 100
+7 0 0  8 23 4  86.602540378443834 -50.000000000000043 400  86.602540378443834 -50.000000000000043 396.4531264233774  86.768554360301678 -49.712441623392252 392.92833608277681  87.096991301103003 -49.143655969881841 389.51230084494648  87.559643674082039 -48.329700648459557 386.24424709027198  88.124612677937151 -47.303758601946697 383.14348794697975  88.763476885346648 -46.096633933969066 380.21545709727701  89.453947255999054 -44.730534623268426 377.45508725218542  90.961452312325122 -41.584580251230875 372.04985730479018  91.784169844339857 -39.781402281845395 369.42820567367704  92.631457510690922 -37.81125762107866 366.96284011636072  93.48864237267378 -35.675359427746407 364.64644480202827  94.341495300176689 -33.371375094216411 362.47799188863092  95.175736723592081 -30.894400229760695 360.46051727651405  95.976668732951339 -28.235197605551782 358.60197280754011  97.413920783548775 -22.756398616550438 355.37514358939779  98.05887438439548 -19.967859727516355 353.97770142062154  98.646808131230941 -17.001060903351803 352.74076825489283  99.157716247916952 -13.856554777440659 351.69171562635694  99.568620170602742 -10.546176703746648 350.86267948835513  99.855699662295592 -7.0960544318152783 350.28862243838159  99.999999822335354 -3.55329295081635 350.00000035532935  100 0 350 
+ 0 9 0.32715155003298801 7 0.67848367377663077 7 1 9
+1 100 -2.4492127076447545e-14 0 0 0 1 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 100
+7 0 0  8 23 4  100 0 350  100.00000016788265 3.357653056092063 349.99999966423474  99.871153979567325 6.7082922507060294 350.25770810060493  99.614413693494157 9.9811535532793023 350.77111458667099  99.244989236204319 13.133667254014087 351.51570531988671  98.782719490160005 16.14106204554367 352.46209608878792  98.247314081381845 18.991065369133018 353.58237755135616  97.656293340043064 21.681267443995591 354.85222820605424  96.305069830741061 27.094898672399299 357.84920888955003  95.532205610731751 29.776083412862121 359.61622715531161  94.722154327365587 32.277992523382729 361.54040041871144  93.889578416120571 34.609753071732321 363.61204164396673  93.048311226451844 36.776998731952766 365.8264229027584  92.211706870163113 38.783329440035715 368.18305324271273  91.393072001530825 40.629443402342417 370.68769525783222  89.809460344875703 44.020678864939597 376.0736018517199  89.045865019642378 45.559762660744155 378.9594576910697  88.333353522290722 46.923337441037496 382.03427944841542  87.697209384435155 48.087216148864847 385.30662787333353  87.171127692761729 49.015295205844701 388.77333266748747  86.793973628457792 49.668405227687359 392.41514581060738  86.602540378443862 50 396.1912597343462  86.602540378443862 50 400 
+ 0 9 0.30404471865854837 7 0.64918916271671423 7 1 9
+7 0 0  8 23 4  100 0 450  100 3.3576535464432191 450  99.871154312247143 6.7082918702808545 449.74229256882165  99.614413450153194 9.9811536835594623 449.22888491692595  99.244989177299104 13.133667136739369 448.48429456674455  98.782719765236706 16.141061698735722 447.53790447273542  98.247313911152233 18.991065751063456 446.41762209624159  97.656293338930354 21.681267448453593 445.14777179147779  96.305069830740891 27.09489867239995 442.15079111044957  95.532205610732319 29.776083412860999 440.38377284469061  94.722154327364748 32.277992523383702 438.45959958128537  93.88957841612077 34.609753071732086 436.38795835603389  93.048311226452682 36.776998731951778 434.17357709724484  92.211706870162118 38.783329440037349 431.81694675728357  91.393072001531223 40.629443402341558 429.31230474216915  89.809460344875973 44.020678864939015 423.92639814828101  89.045865019641511 45.559762660746543 421.04054230892496  88.333353522292256 46.923337441033972 417.96572055159834  87.697209384433535 48.087216148866737 414.6933721266472  87.17112769276271 49.015295205845263 411.22666733252822  86.793973628457522 49.668405227686577 407.58485418938534  86.602540378443862 50 403.80874026565544  86.602540378443862 50 400 
+ 0 9 0.30404471828653629 7 0.64918916252934122 7 1 9
+7 0 0  8 23 4  86.602540378443834 -50.000000000000043 400  86.602540378443834 -50.000000000000043 403.54687357661732  86.768554360302232 -49.712441623391754 407.0716639172436  87.09699130110117 -49.143655969883547 410.487699155016  87.559643674084654 -48.329700648456935 413.75575290976724  88.124612677935062 -47.303758601949092 416.85651205299661  88.763476885347615 -46.096633933967624 419.78454290273055  89.453947255998813 -44.730534623268937 422.54491274781367  90.961452312325036 -41.584580251231031 427.95014269520948  91.784169844340013 -39.781402281845253 430.57179432632284  92.631457510690936 -37.811257621078354 433.03715988364036  93.488642372673581 -35.675359427746841 435.35355519797133  94.341495300176646 -33.37137509421671 437.52200811136817  95.175736723592308 -30.89440022975991 439.53948272348691  95.976668732951225 -28.235197605552226 441.39802719245961  97.413920784822892 -22.756398611693562 444.62485641346274  98.058874567884601 -19.967859324472435 446.02229896119849  98.646807838010218 -17.001061271986877 447.25923114449233  99.157716307234622 -13.856554899211012 448.30828448674504  99.568620428735201 -10.546176567483982 449.13732104001321  99.855699311461152 -7.0960548419637099 449.71137685489032  100 -3.5532924194227782 450  100 0 450 
+ 0 9 0.32715154983796968 7 0.67848367337201809 7 1 9
+7 0 0  8 86 13  190 20 445.82575694955841  188.76161711057227 20 445.82575694955841  187.55133668015193 19.91235337387026 445.86400686750096  186.40804485479049 19.744123905050216 445.93744289222383  185.33795497726547 19.514902285540977 446.03631256989695  184.34258844053036 19.237873159851539 446.15335170344235  183.4162771353935 18.925064118927583 446.28248355294483  182.54924607309326 18.582260868803356 446.42047134686101  180.5313877921306 17.665560569655433 446.7789324820896  179.44012090542088 17.061450737150739 447.00680039845656  178.42489439075112 16.40377787695131 447.2441561855693  177.47714125871727 15.694221315276218 447.4874142313061  176.58765276942751 14.933544392727526 447.73331406254499  175.75234570339671 14.118946812391625 447.97940245081276  174.96696097018872 13.245592454199262 448.22350020908942  173.60217638596475 11.495728687255017 448.66761533646343  173.01544757903642 10.646755069979088 448.86683910093825  172.46336132523098 9.7423084173559129 449.0610751124795  171.94696597602535 8.771423029278985 449.24861455151228  171.47070368601692 7.7249441623440038 449.42647700851086  171.044924719389 6.5904239412074901 449.58927437043644  170.68192128165288 5.3591604830220598 449.73050810726863  170.16788483391167 2.8445553031042996 449.93260628849634  169.98675095042276 1.5578500753039846 450.00490986887729  169.90241768877223 0.21126482985045633 450.03935566262362  169.92983296212577 -1.1418347912938847 450.02831824022019  170.06246027525333 -2.4583899354909087 449.97445348359048  170.28378283343829 -3.704622003922788 449.88605009478971  170.56795276727468 -4.8532125714778402 449.77468372826468  171.28490034470798 -7.1832615379201048 449.49867024844349  171.75813983885746 -8.3610693252848058 449.31962520702172  172.28669212661248 -9.4474000731872163 449.12446492753941  172.86264456356133 -10.451521549066081 448.91808899742563  173.47925753251525 -11.386037243846355 448.70476714178824  174.13467786991569 -12.258255622356449 448.48695690533697  174.82956714675092 -13.076870757778455 448.26636325898102  176.00111900189935 -14.297448989351548 447.91451132377955  176.44739232078726 -14.730560988794394 447.78448181541324  176.90942117645849 -15.148186634249697 447.65429745119013  177.38676190073474 -15.549790747042026 447.5246795099726  177.87897923803828 -15.934838498820188 447.39635744335635  178.38564634539176 -16.302795411557238 447.27006887567012  178.90634479241825 -16.653127357550481 447.14655960397596  179.97496970201598 -17.317464667277328 446.90661087678365  180.52299721930251 -17.631473643437698 446.79015597437859  181.08420673921333 -17.926789246506338 446.67797863376529  181.65818491571483 -18.202858939283349 446.57082398269648  182.24464543072799 -18.459115888765186 446.469422533765  182.84342899412766 -18.694978966144653 446.37449018440464  183.45450334374323 -18.909852746810909 446.28672821688906  184.81704385450712 -19.332245100108075 446.1121000038147  185.60147540318962 -19.539596822360508 446.02485151515918  186.43393805468477 -19.720072090406671 445.94770396971876  187.31387149619184 -19.866415718649087 445.8842320477263  188.23647567906212 -19.970468445414252 445.83867600419984  189.1915419192367 -20.02405348878451 445.81520441504995  190.16041200836165 -20.021926857902038 445.81621712319691  192.52143481281828 -19.89076336064802 445.87335669559917  193.84478773876532 -19.702761135389348 445.95507413275465  195.06679581640853 -19.429423733772833 446.07289768205271  196.19442250073351 -19.093863615052797 446.21441332180007  197.2339901412731 -18.710705503299977 446.37158175461525  198.19784034352128 -18.29082509447235 446.53855952571217  199.100910190511 -17.836992814585784 446.71316117898493  201.11765616922102 -16.678595142648216 447.14155083633744  202.17669187279171 -15.953143137007794 447.39760888173515  203.16359594026292 -15.168455096124706 447.6596949881054  204.08585426002017 -14.322479844337014 447.92460429403201  204.9499797977617 -13.41268261852915 448.1891514540867  205.75731315708825 -12.431663425542878 448.4501500638188  206.5085724462667 -11.371142075518817 448.7043523794726  207.55059273349855 -9.6150274534363902 449.07051619437817  207.87877699148535 -9.0090680862683605 449.18835549372614  208.18373555748497 -8.3889992621684186 449.29995996212511  208.46471177911445 -7.7557979054120896 449.40450751199393  208.72099547901203 -7.1104820307283623 449.50123316750705  208.95192203202214 -6.4541494263144097 449.5894363355099  209.15687144238044 -5.7880163368502879 449.66848807643208  209.48565334621975 -4.5448090320959809 449.7962999444498  209.6214488622964 -3.9537215627022064 449.84952693537196  209.74086778055747 -3.3395736896957944 449.89668662994114  209.841223344334 -2.702739282198082 449.93656069137319  209.9195218531847 -2.0451075411731523 449.9678069996001  209.9730562872202 -1.3706044135127382 449.98922148674052  209.99999993142859 -0.68571400612111455 449.9999999725714  210 -9.1940344226770776e-17 450 
+ 0 9 0.073876687960228921 7 0.18146279930185341 7 0.27297502317927325 7 0.35146796836731969 7 0.45078644852611266 7 0.50839166691615778 7 0.56599530822916722 7 0.63428155117843577 7 0.73589383894819183 7 0.87241439129297038 7 0.94164192250558687 7 1 9
+7 0 0  8 23 4  210 0 450  210.00000010265583 1.0265578731026479 450.00000004106238  209.93977343220345 2.0531775184097456 449.97591303009051  209.81934542997405 3.0681562548346761 449.92773155770618  209.64146807704995 4.0627445455190339 449.85693056989879  209.41030407615489 5.0306400381813221 449.76583102573477  209.13045541836325 5.967555357915689 449.65711085521787  208.80633633462796 6.8708596524406813 449.53346321730521  207.83713099429386 9.18036994382215 449.17162275319538  207.12197755130393 10.523829394329878 448.91191262084078  206.31025246004447 11.774932713181144 448.62820958148819  205.41069337265455 12.936028214861254 448.32905016254443  204.42944864183883 14.00912988520586 448.02224735685644  203.36899179251105 14.995089694532629 447.71504812589012  202.22871149661322 15.894132086087689 447.41427710488529  199.8723811516461 17.445880100292989 446.86429201706522  198.67075640785762 18.112500879287495 446.61297426562851  197.39099658337528 18.699329061251035 446.37992285218809  196.03237707895312 19.196046924645117 446.17381782714585  194.5987376061355 19.588584661696704 446.00532690104916  193.09989869850125 19.861934582966615 445.88601103430921  191.554374056744 20 445.82575694955841  190 20 445.82575694955841 
+ 0 9 0.23911948610599457 7 0.63591333721726562 7 1 9
+7 0 0  7 20 4  190 -20.000000000000004 354.17424305044159  188.40529526822812 -20.000000000000004 354.17424305044159  186.81699263164407 -19.85163748421305 354.10950158823778  185.28146610968872 -19.557176296119984 353.98093441747551  183.8194733092634 -19.137252010782827 353.80144025823751  182.44087859992891 -18.609272595736567 353.58463698586797  181.14756859074458 -17.988894519498103 353.34204238483449  178.64894098900859 -16.533946836137474 352.8060763850695  177.45327801148096 -15.688010730209923 352.51031302161272  176.34076071834318 -14.751671354023641 352.20408324999806  175.31033358514742 -13.726821040656557 351.89522935165371  174.36355769593391 -12.613431647889318 351.59163257627586  173.50466322258802 -11.409602762233769 351.30105579191763  172.03087512917583 -8.8933777413809842 350.78164824019547  171.40311466706285 -7.5928607668802197 350.54984232049196  170.86877872094436 -6.2046298165562233 350.34511406165245  170.44450690892319 -4.7324669523921434 350.1778232028887  170.14859873510889 -3.188373618690417 350.05943531939067  170 -1.5960133272396184 349.99999999999994  170 0 349.99999999999994 
+ 0 8 0.32749647483565042 6 0.67535626432716744 6 1 8
+1 50 -1.2246063538223773e-14 0 0 0 1 
+7 0 0  7 20 4  170 0 350  170 1.5112892925088235 350  170.13323829157676 3.0201974972875441 350.05329228421118  170.39892023771003 4.4882262522719127 350.15958274693634  170.78166224300142 5.8937836338085239 350.31074365945841  171.26570088958786 7.2253835508502897 350.49706344959191  171.83645995042141 8.4787047126246602 350.70955796991018  173.20566738156501 10.962745615245275 351.19840252074181  174.02300961145505 12.175956849896046 351.47942926704201  174.92708234710466 13.300618833567951 351.77519479638875  175.91279129804428 14.338824970520468 352.07805706842532  176.97782263526184 15.29122457343451 352.38049995237753  178.12264337007468 16.156924091174648 352.67525479805306  180.61524721177804 17.724100774430205 353.23927066004762  181.9676846606753 18.42161104257076 353.50790196241178  183.41728858328361 19.017546268068447 353.75038739924128  184.96339172675098 19.493771560366365 353.95324155007802  186.59601333953287 19.830029166827707 354.10007506789543  188.29315701982478 19.999999999999982 354.17424305044159  190 19.999999999999982 354.17424305044159 
+ 0 8 0.30759457669048318 6 0.64982227833657946 6 1 8
+7 0 0  7 20 4  210 0 350  210.00000015112892 1.5112890974887772 349.99999993954845  209.86676130590678 3.0201977385758565 350.05329244438008  209.60108031223749 4.4882260331561916 350.15958252985627  209.218337305402 5.8937839375949101 350.31074383584001  208.73429928613263 7.2253833710765241 350.49706338173036  208.16354005084071 8.4787047103152631 350.70955796945879  206.79433261849749 10.962745615153812 351.19840252072038  205.97699038859366 12.175956849838967 351.47942926702643  205.07291765293593 13.300618833526656 351.77519479637635  204.0872087019697 14.338824970513437 352.07805706842197  203.02217736473835 15.291224573438482 352.38049995237844  201.87735662989815 16.156924091197233 352.67525479806051  199.38475278817143 17.724100774456375 353.23927066005763  198.03231533928286 18.421611042587735 353.50790196241871  196.58271141667572 19.017546268081134 353.75038739924679  195.03660827322122 19.493771560372139 353.95324155008029  193.40398666044547 19.830029166829849 354.10007506789646  191.70684298016479 19.999999999999982 354.17424305044159  190 19.999999999999982 354.17424305044159 
+ 0 8 0.30759457708374965 6 0.64982227853976171 6 1 8
+2 0 0 300 0 0 1 1 0 -0 -0 1 0 50
+7 0 0  7 20 4  190 -20.000000000000004 354.17424305044159  191.59470473177032 -20.000000000000004 354.17424305044165  193.18300736835764 -19.851637484212873 354.10950158823789  194.71853389030395 -19.557176296121398 353.98093441747574  196.18052669073927 -19.13725201078212 353.80144025823745  197.55912140006541 -18.609272595738776 353.58463698586883  198.85243140925283 -17.988894519499269 353.34204238483494  201.35105901096543 -16.533946836152985 352.80607638507519  202.54672198847359 -15.688010730242384 352.51031302162386  203.65923928159609 -14.751671354075334 352.2040832500154  204.68966641477729 -13.726821040731068 351.89522935167571  205.63644230398049 -12.613431647990538 351.59163257630365  206.49533677731949 -11.409602762363491 351.30105579194895  207.96912486937774 -8.8933777438768757 350.78164824070649  208.59688514306879 -7.592860956872455 350.54984239343435  209.13122176228288 -6.2046294940723943 350.34511387364302  209.55549250885861 -4.7324671867573436 350.17782343218005  209.85140168924835 -3.1883733582241396 350.05943515068623  209.99999984039866 -1.5960135384724008 350.0000000638405  210 0 349.99999999999994 
+ 0 8 0.32749647504072238 6 0.67535626474437049 6 1 8
+1 20 -4.898425415289509e-15 0 0 0 1 
+2 0 0 200 0 0 1 1 0 -0 -0 1 0 20
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 20
+Polygon3D 0
+PolygonOnTriangulations 42
+37 73 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 74 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0801396424729663 0.160279284945933 0.240418927418899 0.344059678311254 0.464269142020703 0.584478605730153 0.692667123068657 0.790036788673312 0.887406454277966 0.943703227138983 1 
+12 57 58 59 60 61 62 63 64 65 66 67 56 
+p 3.2000000008 1 0 0.0801396424729663 0.160279284945933 0.240418927418899 0.344059678311254 0.464269142020703 0.584478605730153 0.692667123068657 0.790036788673312 0.887406454277966 0.943703227138983 1 
+2 13 2 
+p 3.2000000008 1 0 350 
+2 14 50 
+p 3.2000000008 1 0 350 
+37 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 13 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 50 52 53 54 55 56 57 58 59 60 61 51 
+p 3.2000000008 1 0 0.0888380629088787 0.177676125817757 0.266514188726636 0.355352251635515 0.467860989729305 0.587792374656292 0.695730621090579 0.803668867524867 0.900813289315726 0.950406644657863 1 
+12 90 91 92 93 94 95 96 97 98 99 100 79 
+p 3.2000000008 1 0 0.0888380629088787 0.177676125817757 0.266514188726636 0.355352251635515 0.467860989729305 0.587792374656292 0.695730621090579 0.803668867524867 0.900813289315726 0.950406644657863 1 
+12 62 63 64 65 66 67 68 69 70 71 72 51 
+p 3.2000000008 1 0 0.088838293672055 0.17767658734411 0.266514881016165 0.35535317468822 0.467862075455604 0.587793771912878 0.695732298724425 0.803670825535972 0.900815499666364 0.950407749833182 1 
+12 68 80 81 82 83 84 85 86 87 88 89 79 
+p 3.2000000008 1 0 0.088838293672055 0.17767658734411 0.266514881016165 0.35535317468822 0.467862075455604 0.587793771912878 0.695732298724425 0.803670825535972 0.900815499666364 0.950407749833182 1 
+2 110 74 
+p 3.2000000008 1 450 800 
+2 62 73 
+p 3.2000000008 1 450 800 
+12 1 111 112 113 114 115 116 117 118 119 120 110 
+p 3.2000000008 1 0 0.0801396424251088 0.160279284850218 0.240418927275326 0.344059678105756 0.46426914174342 0.584478605381083 0.69266712265498 0.790036788201487 0.887406453747994 0.943703226873997 1 
+12 57 69 70 71 72 73 74 75 76 77 78 68 
+p 3.2000000008 1 0 0.0801396424251088 0.160279284850218 0.240418927275326 0.344059678105756 0.46426914174342 0.584478605381083 0.69266712265498 0.790036788201487 0.887406453747994 0.943703226873997 1 
+33 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2 
+p 3.2000000008 1 0 0.0231285091459492 0.0462570182918985 0.0759211946456314 0.110613958364555 0.145306722083479 0.179999485802403 0.214692249521327 0.245915736868358 0.274016875480686 0.296778797756672 0.317854651715919 0.338930505675165 0.366113007484298 0.397726788423167 0.429340569362036 0.460954350300906 0.492568131239775 0.524181912178644 0.555795693117514 0.587409474056383 0.615861876901365 0.64146903946185 0.667076202022334 0.700055159658209 0.738465903498935 0.776876647339662 0.815287391180388 0.853698135021114 0.892108878861841 0.930519622702567 0.965259811351283 1 
+33 2 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 50 
+p 3.2000000008 1 0 0.0231285091459492 0.0462570182918985 0.0759211946456314 0.110613958364555 0.145306722083479 0.179999485802403 0.214692249521327 0.245915736868358 0.274016875480686 0.296778797756672 0.317854651715919 0.338930505675165 0.366113007484298 0.397726788423167 0.429340569362036 0.460954350300906 0.492568131239775 0.524181912178644 0.555795693117514 0.587409474056383 0.615861876901365 0.64146903946185 0.667076202022334 0.700055159658209 0.738465903498935 0.776876647339662 0.815287391180388 0.853698135021114 0.892108878861841 0.930519622702567 0.965259811351283 1 
+12 2 34 35 36 37 38 39 40 41 42 43 1 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354638225555721 0.467138225555721 0.568388225555721 0.669638225555721 0.770888225555721 0.872138225555721 0.936069112777861 1 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354638225555721 0.467138225555721 0.568388225555721 0.669638225555721 0.770888225555721 0.872138225555721 0.936069112777861 1 
+12 44 46 47 48 49 50 51 52 53 54 55 45 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.355492542195797 0.467992542195797 0.569242542195797 0.670492542195797 0.771742542195797 0.872992542195797 0.936496271097899 1 
+12 1 73 74 75 76 77 78 79 80 81 82 62 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.355492542195797 0.467992542195797 0.569242542195797 0.670492542195797 0.771742542195797 0.872992542195797 0.936496271097899 1 
+2 56 45 
+p 3.2000000008 1 100 170 
+2 90 101 
+p 3.2000000008 1 100 170 
+12 101 103 104 105 106 107 108 109 110 111 112 102 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354547464712528 0.467047464712528 0.568297464712528 0.669547464712528 0.770797464712528 0.872047464712528 0.936023732356264 1 
+12 62 63 64 65 66 67 68 69 70 71 72 51 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.354547464712528 0.467047464712528 0.568297464712528 0.669547464712528 0.770797464712528 0.872047464712528 0.936023732356264 1 
+12 113 114 115 116 117 118 119 120 121 122 123 102 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35454746277783 0.46704746277783 0.56829746277783 0.66954746277783 0.77079746277783 0.87204746277783 0.936023731388915 1 
+12 50 52 53 54 55 56 57 58 59 60 61 51 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35454746277783 0.46704746277783 0.56829746277783 0.66954746277783 0.77079746277783 0.87204746277783 0.936023731388915 1 
+2 161 125 
+p 3.2000000008 1 210 300 
+2 113 124 
+p 3.2000000008 1 210 300 
+37 124 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 125 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+12 44 162 163 164 165 166 167 168 169 170 171 161 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35549254222606 0.46799254222606 0.56924254222606 0.67049254222606 0.77174254222606 0.87299254222606 0.93649627111303 1 
+12 1 3 4 5 6 7 8 9 10 11 12 2 
+p 3.2000000008 1 0 0.0833333333333333 0.166666666666667 0.25 0.35549254222606 0.46799254222606 0.56924254222606 0.67049254222606 0.77174254222606 0.87299254222606 0.93649627111303 1 
+2 50 14 
+p 3.2000000008 1 70 200 
+2 1 13 
+p 3.2000000008 1 70 200 
+37 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 14 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+2 13 2 
+p 3.2000000008 1 0 130 
+2 14 50 
+p 3.2000000008 1 0 130 
+37 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 13 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+37 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 1 
+p 3.2000000008 1 0 0.174532925199433 0.349065850398866 0.523598775598299 0.698131700797732 0.872664625997165 1.0471975511966 1.22173047639603 1.39626340159546 1.5707963267949 1.74532925199433 1.91986217719376 2.0943951023932 2.26892802759263 2.44346095279206 2.61799387799149 2.79252680319093 2.96705972839036 3.14159265358979 3.31612557878922 3.49065850398866 3.66519142918809 3.83972435438752 4.01425727958696 4.18879020478639 4.36332312998582 4.53785605518525 4.71238898038469 4.88692190558412 5.06145483078355 5.23598775598299 5.41052068118242 5.58505360638185 5.75958653158128 5.93411945678072 6.10865238198015 6.28318530717959 
+Surfaces 8
+1 0 0 800 0 0 1 1 0 -0 -0 1 0 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 100
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 50
+1 0 0 0 0 0 1 1 0 -0 -0 1 0 
+2 0 0 0 0 0 1 1 0 -0 -0 1 0 20
+1 0 0 300 0 0 1 1 0 -0 -0 1 0 
+1 0 0 200 0 0 1 1 0 -0 -0 1 0 
+1 0 0 0 0 0 1 1 0 -0 -0 1 0 
+Triangulations 9
+37 36 1 0
+100 -2.44921270764475e-14 800 98.4807753012208 17.364817766693 800 93.9692620785908 34.2020143325669 800 86.6025403784439 50 800 76.6044443118978 64.2787609686539 800 64.2787609686539 76.6044443118978 800 50 86.6025403784439 800 34.2020143325669 93.9692620785908 800 17.364817766693 98.4807753012208 800 6.12303176911189e-15 100 800 -17.364817766693 98.4807753012208 800 -34.2020143325669 93.9692620785908 800 -50 86.6025403784439 800 -64.2787609686539 76.6044443118978 800 -76.6044443118978 64.278760968654 800 -86.6025403784438 50.0000000000001 800 -93.9692620785908 34.202014332567 800 -98.4807753012208 17.3648177666932 800 -100 1.45472826493243e-13 800 -98.4807753012208 -17.3648177666929 800 -93.9692620785909 -34.2020143325667 800 -86.602540378444 -49.9999999999998 800 -76.604444311898 -64.2787609686538 800 -64.2787609686541 -76.6044443118977 800 -50.0000000000002 -86.6025403784437 800 -34.2020143325671 -93.9692620785908 800 -17.3648177666933 -98.4807753012208 800 -2.84822621217373e-13 -100 800 17.3648177666927 -98.4807753012209 800 34.2020143325666 -93.969262078591 800 49.9999999999997 -86.602540378444 800 64.2787609686536 -76.604444311898 800 76.6044443118976 -64.2787609686542 800 86.6025403784437 -50.0000000000004 800 93.9692620785907 -34.2020143325673 800 98.4807753012207 -17.3648177666935 800 0 0 800 100 0 98.4807753012208 17.364817766693 93.9692620785908 34.2020143325669 86.6025403784439 50 76.6044443118978 64.2787609686539 64.278760968654 76.6044443118978 50 86.6025403784438 34.2020143325669 93.9692620785908 17.364817766693 98.4807753012208 0 100 -17.364817766693 98.4807753012208 -34.2020143325669 93.9692620785908 -50 86.6025403784439 -64.2787609686539 76.6044443118979 -76.6044443118978 64.278760968654 -86.6025403784438 50.0000000000001 -93.9692620785908 34.202014332567 -98.4807753012208 17.3648177666932 -100 1.4210854715202e-13 -98.4807753012208 -17.3648177666929 -93.9692620785909 -34.2020143325667 -86.602540378444 -49.9999999999998 -76.604444311898 -64.2787609686538 -64.2787609686541 -76.6044443118977 -50.0000000000002 -86.6025403784437 -34.2020143325671 -93.9692620785908 -17.3648177666933 -98.4807753012208 -2.8421709430404e-13 -100 17.3648177666927 -98.4807753012209 34.2020143325666 -93.969262078591 49.9999999999997 -86.602540378444 64.2787609686536 -76.604444311898 76.6044443118976 -64.2787609686542 86.6025403784437 -50.0000000000004 93.9692620785907 -34.2020143325673 98.4807753012207 -17.3648177666935 0 0 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 
+512 902 1 1.36386965972777
+86.6025403784438 -50 400 100 -1.83690953073357e-14 350 86.8732667031317 -49.5281290308752 393.146938099824 87.6235772593243 -48.1882631494736 386.662410602174 88.7290516622297 -46.1210945615935 380.690815213948 90.4840004397121 -42.5751772682387 373.782555238023 92.7428861391894 -37.3999606121917 366.815019461706 95.0372320329239 -31.11148437027 360.858265526469 96.9671604229308 -24.4411486760561 356.380850902333 98.4525657430885 -17.52405054016 353.171507010994 99.5231396908821 -9.75421483502655 350.960675236214 99.8776181649079 -4.94584264829443 350.245215525427 100 -2.44921270764475e-14 0 100 -2.44921270764475e-14 0 98.4807753012208 17.364817766693 0 93.9692620785908 34.2020143325669 0 86.6025403784439 50 0 76.6044443118978 64.2787609686539 0 64.2787609686539 76.6044443118978 0 50 86.6025403784439 0 34.2020143325669 93.9692620785908 0 17.364817766693 98.4807753012208 0 6.12303176911189e-15 100 0 -17.364817766693 98.4807753012208 0 -34.2020143325669 93.9692620785908 0 -50 86.6025403784439 0 -64.2787609686539 76.6044443118978 0 -76.6044443118978 64.278760968654 0 -86.6025403784438 50.0000000000001 0 -93.9692620785908 34.202014332567 0 -98.4807753012208 17.3648177666932 0 -100 1.45472826493243e-13 0 -98.4807753012208 -17.3648177666929 0 -93.9692620785909 -34.2020143325667 0 -86.602540378444 -49.9999999999998 0 -76.604444311898 -64.2787609686538 0 -64.2787609686541 -76.6044443118977 0 -50.0000000000002 -86.6025403784437 0 -34.2020143325671 -93.9692620785908 0 -17.3648177666933 -98.4807753012208 0 -2.84822621217373e-13 -100 0 17.3648177666927 -98.4807753012209 0 34.2020143325666 -93.969262078591 0 49.9999999999997 -86.602540378444 0 64.2787609686536 -76.604444311898 0 76.6044443118976 -64.2787609686542 0 86.6025403784437 -50.0000000000004 0 93.9692620785907 -34.2020143325673 0 98.4807753012207 -17.3648177666935 0 100 -1.83690953073357e-14 350 86.6025403784439 50 400 99.6995364250708 7.74612569392024 350.60366789119 98.8633045221148 15.0348597287602 352.314017004824 97.6290308111529 21.6465307979184 354.928638859964 96.1385098653288 27.5206644597269 358.255381554833 94.0483026744096 33.9840672064279 363.324622594048 91.7501351704928 39.7732665735241 369.700044024682 89.7799093309045 44.0405258154732 376.326552497693 88.0846161813635 47.3402622878728 383.90964254567 87.0125364098992 49.2830451608201 391.563087645832 86.7079761092912 49.8169333693719 395.72529258068 100 -2.44921270764475e-14 450 99.6995349038219 7.74614536115343 449.396329038004 98.8632990204773 15.0348959199349 447.685971589172 97.6290200022516 21.6465795167683 445.071337728308 96.1384934421685 27.5207218309807 441.744580622317 94.0482819113588 33.9841246665353 436.675324162327 91.7501087080715 39.7733276178202 430.299875845487 89.779880280166 44.0405850374743 423.673337329156 88.0845894011337 47.3403121169944 416.090210848718 87.0125187464446 49.2830763468782 408.43673018339 86.7079714631656 49.8169414560564 404.274613176575 100 -2.44921270764475e-14 800 100 -2.44921270764475e-14 800 98.4807753012208 17.364817766693 800 93.9692620785908 34.2020143325669 800 86.6025403784439 50 800 76.6044443118978 64.2787609686539 800 64.2787609686539 76.6044443118978 800 50 86.6025403784439 800 34.2020143325669 93.9692620785908 800 17.364817766693 98.4807753012208 800 6.12303176911189e-15 100 800 -17.364817766693 98.4807753012208 800 -34.2020143325669 93.9692620785908 800 -50 86.6025403784439 800 -64.2787609686539 76.6044443118978 800 -76.6044443118978 64.278760968654 800 -86.6025403784438 50.0000000000001 800 -93.9692620785908 34.202014332567 800 -98.4807753012208 17.3648177666932 800 -100 1.45472826493243e-13 800 -98.4807753012208 -17.3648177666929 800 -93.9692620785909 -34.2020143325667 800 -86.602540378444 -49.9999999999998 800 -76.604444311898 -64.2787609686538 800 -64.2787609686541 -76.6044443118977 800 -50.0000000000002 -86.6025403784437 800 -34.2020143325671 -93.9692620785908 800 -17.3648177666933 -98.4807753012208 800 -2.84822621217373e-13 -100 800 17.3648177666927 -98.4807753012209 800 34.2020143325666 -93.969262078591 800 49.9999999999997 -86.602540378444 800 64.2787609686536 -76.604444311898 800 76.6044443118976 -64.2787609686542 800 86.6025403784437 -50.0000000000004 800 93.9692620785907 -34.2020143325673 800 98.4807753012207 -17.3648177666935 800 100 -2.44921270764475e-14 450 86.8732667031312 -49.5281290308762 406.853061900168 87.6235772593223 -48.1882631494772 413.337589397812 88.7290516622257 -46.1210945616012 419.309184786033 90.484000439705 -42.5751772682538 426.217444761952 92.7428861391805 -37.3999606122139 433.184980538269 95.0372320329138 -31.1114843703007 439.141734473506 96.9671604293251 -24.4411486612818 443.619149110997 98.4525657314274 -17.5240505708509 446.828492965207 99.5231396846886 -9.7542149066232 449.039324751509 99.877618163893 -4.94584257239082 449.754784472325 -40.169542465297 -91.5773326655057 730.434782608696 -40.169542465297 -91.5773326655057 695.652173913043 -8.25793454723327 -99.658449300667 695.652173913043 -40.1695424652969 91.5773326655057 278.260869565217 -8.25793454723323 99.658449300667 278.260869565217 -40.1695424652969 91.5773326655057 243.478260869565 54.6948158122427 -83.7166478262529 139.130434782609 54.6948158122427 -83.7166478262529 104.347826086957 78.9140509396393 -61.4212712689668 104.347826086957 -67.7281571625741 -73.5723910673132 765.217391304348 -87.9473751206489 -47.5947393037073 765.217391304348 24.5485487140799 -96.9400265939331 139.130434782609 -67.7281571625741 -73.5723910673132 730.434782608696 -87.9473751206489 47.5947393037074 591.304347826087 -87.9473751206489 47.5947393037074 556.521739130435 -98.6361303402722 16.4594590280734 556.521739130435 -67.7281571625741 73.5723910673132 591.304347826087 -67.7281571625741 73.5723910673132 556.521739130435 24.5485487140799 -96.9400265939331 173.913043478261 -8.25793454723323 99.658449300667 313.04347826087 24.5485487140799 96.940026593933 278.260869565217 -8.25793454723327 -99.658449300667 139.130434782609 94.5817241700635 -32.4699469204684 591.304347826087 78.9140509396393 -61.4212712689668 556.521739130435 94.5817241700635 -32.4699469204684 556.521739130435 -8.25793454723327 -99.658449300667 173.913043478261 78.9140509396393 -61.4212712689668 591.304347826087 24.5485487140799 96.940026593933 313.04347826087 -67.7281571625741 73.5723910673132 626.086956521739 -40.1695424652969 91.5773326655057 591.304347826087 -40.1695424652969 91.5773326655057 626.086956521739 -8.25793454723327 -99.658449300667 208.695652173913 -40.169542465297 -91.5773326655057 208.695652173913 78.9140509396393 -61.4212712689668 626.086956521739 54.6948158122427 -83.7166478262529 626.086956521739 24.5485487140799 96.940026593933 347.826086956522 54.6948158122427 83.7166478262529 347.826086956522 -40.169542465297 -91.5773326655057 243.478260869565 -67.7281571625741 -73.5723910673132 243.478260869565 54.6948158122427 -83.7166478262529 660.869565217391 24.5485487140799 -96.9400265939331 660.869565217391 -67.7281571625741 -73.5723910673132 278.260869565217 -87.9473751206489 -47.5947393037073 243.478260869565 54.6948158122427 83.7166478262529 382.608695652174 78.9140509396394 61.4212712689668 347.826086956522 -40.1695424652969 91.5773326655057 660.869565217391 -8.25793454723323 99.658449300667 660.869565217391 -87.9473751206489 -47.5947393037073 278.260869565217 78.9140509396394 61.4212712689668 382.608695652174 24.5485487140799 -96.9400265939331 695.652173913043 -8.25793454723327 -99.658449300667 660.869565217391 -8.25793454723323 99.658449300667 695.652173913043 24.5485487140799 96.940026593933 660.869565217391 -87.9473751206489 -47.5947393037073 313.04347826087 -98.6361303402722 -16.4594590280734 313.04347826087 -98.6361303402722 -16.4594590280734 278.260869565217 24.5485487140799 96.940026593933 695.652173913043 -8.25793454723327 -99.658449300667 730.434782608696 -40.169542465297 -91.5773326655057 765.217391304348 78.9140509396394 61.4212712689668 417.391304347826 24.5485487140799 96.940026593933 730.434782608696 54.6948158122427 83.7166478262529 730.434782608696 54.6948158122427 83.7166478262529 765.217391304348 78.9140509396394 61.4212712689668 765.217391304348 78.9140509396394 61.4212712689668 730.434782608696 -98.6361303402722 -16.4594590280734 347.826086956522 -98.6361303402722 16.4594590280734 347.826086956522 94.5817241700635 -32.4699469204684 626.086956521739 94.5817241700635 -32.4699469204684 278.260869565217 94.5817241700635 -32.4699469204684 243.478260869565 78.9140509396393 -61.4212712689668 278.260869565217 78.9140509396393 -61.4212712689668 243.478260869565 -98.6361303402722 16.4594590280734 382.608695652174 -87.9473751206489 47.5947393037074 382.608695652174 94.5817241700635 32.4699469204683 452.173913043478 78.9140509396393 -61.4212712689668 660.869565217391 78.9140509396393 -61.4212712689668 313.04347826087 54.6948158122427 -83.7166478262529 313.04347826087 -87.9473751206489 47.5947393037074 417.391304347826 -67.7281571625741 73.5723910673132 417.391304347826 54.6948158122427 -83.7166478262529 695.652173913043 54.6948158122427 -83.7166478262529 347.826086956522 24.5485487140799 -96.9400265939331 347.826086956522 -67.7281571625741 73.5723910673132 452.173913043478 -40.1695424652969 91.5773326655057 452.173913043478 -40.1695424652969 91.5773326655057 417.391304347826 24.5485487140799 -96.9400265939331 730.434782608696 -8.25793454723327 -99.658449300667 34.7826086956522 -40.169542465297 -91.5773326655057 34.7826086956522 94.5817241700635 32.4699469204683 34.7826086956522 24.5485487140799 -96.9400265939331 382.608695652174 -8.25793454723327 -99.658449300667 347.826086956522 -8.25793454723327 -99.658449300667 765.217391304348 -8.25793454723327 -99.658449300667 382.608695652174 -40.1695424652969 91.5773326655057 486.956521739131 -8.25793454723323 99.658449300667 486.956521739131 94.5817241700635 -32.4699469204684 660.869565217391 78.9140509396394 61.4212712689668 34.7826086956522 -8.25793454723327 -99.658449300667 417.391304347826 -40.169542465297 -91.5773326655057 417.391304347826 -40.169542465297 -91.5773326655057 69.5652173913043 -67.7281571625741 -73.5723910673132 34.7826086956522 -67.7281571625741 -73.5723910673132 69.5652173913043 -8.25793454723323 99.658449300667 521.739130434783 24.5485487140799 96.940026593933 486.956521739131 24.5485487140799 96.940026593933 521.739130434783 78.9140509396393 -61.4212712689668 695.652173913043 -40.169542465297 -91.5773326655057 452.173913043478 -67.7281571625741 -73.5723910673132 452.173913043478 -67.7281571625741 -73.5723910673132 104.347826086957 -87.9473751206489 -47.5947393037073 104.347826086957 -87.9473751206489 -47.5947393037073 69.5652173913043 94.5817241700635 32.4699469204683 69.5652173913043 54.6948158122427 -83.7166478262529 730.434782608696 -67.7281571625741 -73.5723910673132 486.956521739131 -87.9473751206489 -47.5947393037073 486.956521739131 -87.9473751206489 -47.5947393037073 452.173913043478 -87.9473751206489 -47.5947393037073 139.130434782609 -98.6361303402722 -16.4594590280734 104.347826086957 24.5485487140799 -96.9400265939331 765.217391304348 24.5485487140799 96.940026593933 556.521739130435 54.6948158122427 83.7166478262529 556.521739130435 -98.6361303402722 -16.4594590280734 139.130434782609 54.6948158122427 83.7166478262529 34.7826086956522 -87.9473751206489 -47.5947393037073 521.739130434783 -98.6361303402722 -16.4594590280734 486.956521739131 94.5817241700635 -32.4699469204684 695.652173913043 54.6948158122427 83.7166478262529 591.304347826087 78.9140509396394 61.4212712689668 556.521739130435 -98.6361303402722 -16.4594590280734 173.913043478261 -98.6361303402722 16.4594590280734 173.913043478261 -98.6361303402722 -16.4594590280734 521.739130434783 78.9140509396394 61.4212712689668 591.304347826087 -98.6361303402722 16.4594590280734 208.695652173913 78.9140509396394 61.4212712689668 69.5652173913043 -87.9473751206489 47.5947393037074 208.695652173913 -98.6361303402722 -16.4594590280734 556.521739130435 78.9140509396393 -61.4212712689668 730.434782608696 54.6948158122427 -83.7166478262529 765.217391304348 -87.9473751206489 47.5947393037074 243.478260869565 -67.7281571625741 73.5723910673132 208.695652173913 -98.6361303402722 16.4594590280734 591.304347826087 78.9140509396394 61.4212712689668 626.086956521739 94.5817241700635 32.4699469204683 591.304347826087 -67.7281571625741 73.5723910673132 243.478260869565 94.5817241700635 32.4699469204683 626.086956521739 94.5817241700635 32.4699469204683 660.869565217391 94.5817241700635 -32.4699469204684 730.434782608696 94.5817241700635 32.4699469204683 104.347826086957 24.5485487140799 96.940026593933 34.7826086956522 78.9140509396393 -61.4212712689668 765.217391304348 -67.7281571625741 73.5723910673132 278.260869565217 -87.9473751206489 47.5947393037074 626.086956521739 94.5817241700635 -32.4699469204684 104.347826086957 78.9140509396393 -61.4212712689668 69.5652173913043 94.5817241700635 -32.4699469204684 69.5652173913043 94.5817241700635 -32.4699469204684 765.217391304348 -40.1695424652969 91.5773326655057 313.04347826087 -67.7281571625741 73.5723910673132 660.869565217391 78.9140509396393 -61.4212712689668 139.130434782609 -8.25793454723323 99.658449300667 347.826086956522 54.6948158122427 83.7166478262529 69.5652173913043 78.9140509396394 61.4212712689668 104.347826086957 54.6948158122427 -83.7166478262529 173.913043478261 24.5485487140799 -96.9400265939331 208.695652173913 -40.1695424652969 91.5773326655057 695.652173913043 -8.25793454723323 99.658449300667 730.434782608696 94.5817241700635 32.4699469204683 139.130434782609 24.5485487140799 96.940026593933 382.608695652174 24.5485487140799 96.940026593933 765.217391304348 -8.25793454723327 -99.658449300667 243.478260869565 -8.25793454723323 99.658449300667 34.7826086956522 54.6948158122427 83.7166478262529 417.391304347826 94.5817241700635 -32.4699469204684 313.04347826087 -40.169542465297 -91.5773326655057 278.260869565217 78.9140509396394 61.4212712689668 452.173913043478 -67.7281571625741 -73.5723910673132 313.04347826087 78.9140509396393 -61.4212712689668 347.826086956522 24.5485487140799 96.940026593933 69.5652173913043 54.6948158122427 83.7166478262529 104.347826086957 54.6948158122427 -83.7166478262529 382.608695652174 -87.9473751206489 -47.5947393037073 347.826086956522 94.5817241700635 32.4699469204683 486.956521739131 24.5485487140799 -96.9400265939331 417.391304347826 -98.6361303402722 -16.4594590280734 382.608695652174 78.9140509396394 61.4212712689668 139.130434782609 -98.6361303402722 16.4594590280734 417.391304347826 94.5817241700635 32.4699469204683 173.913043478261 -8.25793454723327 -99.658449300667 452.173913043478 24.5485487140799 -96.9400265939331 34.7826086956522 -40.169542465297 -91.5773326655057 486.956521739131 -87.9473751206489 47.5947393037074 452.173913043478 -40.1695424652969 91.5773326655057 34.7826086956522 -67.7281571625741 -73.5723910673132 521.739130434783 -8.25793454723327 -99.658449300667 69.5652173913043 -67.7281571625741 73.5723910673132 486.956521739131 -40.169542465297 -91.5773326655057 104.347826086957 -87.9473751206489 -47.5947393037073 556.521739130435 -8.25793454723323 99.658449300667 69.5652173913043 -40.1695424652969 91.5773326655057 521.739130434783 -67.7281571625741 -73.5723910673132 139.130434782609 24.5485487140799 96.940026593933 104.347826086957 -98.6361303402722 -16.4594590280734 591.304347826087 -87.9473751206489 -47.5947393037073 173.913043478261 -8.25793454723323 99.658449300667 556.521739130435 54.6948158122427 83.7166478262529 139.130434782609 -98.6361303402722 16.4594590280734 626.086956521739 -98.6361303402722 -16.4594590280734 208.695652173913 24.5485487140799 96.940026593933 591.304347826087 -87.9473751206489 47.5947393037074 660.869565217391 -98.6361303402722 16.4594590280734 243.478260869565 78.9140509396394 61.4212712689668 173.913043478261 94.5817241700635 32.4699469204683 208.695652173913 54.6948158122427 83.7166478262529 626.086956521739 -87.9473751206489 47.5947393037074 278.260869565217 -67.7281571625741 73.5723910673132 695.652173913043 -67.7281571625741 73.5723910673132 34.7826086956522 78.9140509396394 61.4212712689668 660.869565217391 -67.7281571625741 73.5723910673132 313.04347826087 -40.1695424652969 91.5773326655057 730.434782608696 -40.1695424652969 91.5773326655057 69.5652173913043 -8.25793454723323 99.658449300667 765.217391304348 94.5817241700635 32.4699469204683 695.652173913043 -40.1695424652969 91.5773326655057 347.826086956522 94.5817241700635 -32.4699469204684 347.826086956522 -8.25793454723323 99.658449300667 104.347826086957 94.5817241700635 -32.4699469204684 139.130434782609 -8.25793454723323 99.658449300667 382.608695652174 78.9140509396393 -61.4212712689668 382.608695652174 78.9140509396393 -61.4212712689668 173.913043478261 54.6948158122427 -83.7166478262529 208.695652173913 54.6948158122427 -83.7166478262529 417.391304347826 24.5485487140799 96.940026593933 417.391304347826 24.5485487140799 96.940026593933 139.130434782609 54.6948158122427 83.7166478262529 173.913043478261 24.5485487140799 -96.9400265939331 452.173913043478 24.5485487140799 -96.9400265939331 243.478260869565 78.9140509396394 61.4212712689668 208.695652173913 54.6948158122427 83.7166478262529 452.173913043478 94.5817241700635 32.4699469204683 243.478260869565 -8.25793454723327 -99.658449300667 486.956521739131 -8.25793454723327 -99.658449300667 278.260869565217 78.9140509396394 61.4212712689668 486.956521739131 -40.169542465297 -91.5773326655057 313.04347826087 -87.9473751206489 47.5947393037074 34.7826086956522 -40.169542465297 -91.5773326655057 521.739130434783 -67.7281571625741 -73.5723910673132 347.826086956522 -67.7281571625741 -73.5723910673132 556.521739130435 94.5817241700635 32.4699469204683 521.739130434783 -87.9473751206489 -47.5947393037073 382.608695652174 -67.7281571625741 73.5723910673132 69.5652173913043 -87.9473751206489 -47.5947393037073 591.304347826087 54.6948158122427 -83.7166478262529 34.7826086956522 -98.6361303402722 -16.4594590280734 417.391304347826 -40.1695424652969 91.5773326655057 104.347826086957 -98.6361303402722 -16.4594590280734 626.086956521739 -98.6361303402722 16.4594590280734 452.173913043478 24.5485487140799 -96.9400265939331 69.5652173913043 -8.25793454723323 99.658449300667 139.130434782609 -98.6361303402722 16.4594590280734 660.869565217391 -8.25793454723327 -99.658449300667 104.347826086957 -87.9473751206489 47.5947393037074 486.956521739131 24.5485487140799 96.940026593933 173.913043478261 -87.9473751206489 47.5947393037074 695.652173913043 54.6948158122427 83.7166478262529 208.695652173913 -67.7281571625741 73.5723910673132 521.739130434783 -40.169542465297 -91.5773326655057 139.130434782609 -67.7281571625741 73.5723910673132 730.434782608696 78.9140509396394 61.4212712689668 243.478260869565 -67.7281571625741 -73.5723910673132 173.913043478261 -40.1695424652969 91.5773326655057 765.217391304348 -40.1695424652969 91.5773326655057 556.521739130435 -87.9473751206489 -47.5947393037073 208.695652173913 94.5817241700635 32.4699469204683 278.260869565217 78.9140509396393 -61.4212712689668 417.391304347826 -8.25793454723323 99.658449300667 591.304347826087 -98.6361303402722 16.4594590280734 34.7826086956522 -98.6361303402722 -16.4594590280734 243.478260869565 -98.6361303402722 16.4594590280734 278.260869565217 54.6948158122427 -83.7166478262529 452.173913043478 24.5485487140799 96.940026593933 626.086956521739 54.6948158122427 83.7166478262529 660.869565217391 24.5485487140799 -96.9400265939331 486.956521739131 -87.9473751206489 47.5947393037074 69.5652173913043 -87.9473751206489 47.5947393037074 313.04347826087 -67.7281571625741 73.5723910673132 104.347826086957 78.9140509396394 61.4212712689668 695.652173913043 -8.25793454723327 -99.658449300667 521.739130434783 -67.7281571625741 73.5723910673132 347.826086956522 -40.1695424652969 91.5773326655057 139.130434782609 -40.169542465297 -91.5773326655057 556.521739130435 94.5817241700635 32.4699469204683 730.434782608696 -8.25793454723323 99.658449300667 173.913043478261 -40.1695424652969 91.5773326655057 382.608695652174 94.5817241700635 -32.4699469204684 173.913043478261 -67.7281571625741 -73.5723910673132 591.304347826087 -8.25793454723323 99.658449300667 417.391304347826 78.9140509396393 -61.4212712689668 208.695652173913 -87.9473751206489 -47.5947393037073 626.086956521739 24.5485487140799 96.940026593933 208.695652173913 54.6948158122427 83.7166478262529 243.478260869565 54.6948158122427 -83.7166478262529 243.478260869565 -98.6361303402722 -16.4594590280734 660.869565217391 24.5485487140799 96.940026593933 452.173913043478 24.5485487140799 -96.9400265939331 278.260869565217 78.9140509396394 61.4212712689668 278.260869565217 -98.6361303402722 16.4594590280734 695.652173913043 54.6948158122427 83.7166478262529 486.956521739131 94.5817241700635 32.4699469204683 313.04347826087 -8.25793454723327 -99.658449300667 313.04347826087 -87.9473751206489 47.5947393037074 730.434782608696 78.9140509396394 61.4212712689668 521.739130434783 -98.6361303402722 -16.4594590280734 34.7826086956522 -40.169542465297 -91.5773326655057 347.826086956522 -67.7281571625741 73.5723910673132 765.217391304348 -67.7281571625741 -73.5723910673132 382.608695652174 78.9140509396393 -61.4212712689668 452.173913043478 -98.6361303402722 16.4594590280734 69.5652173913043 -87.9473751206489 -47.5947393037073 417.391304347826 94.5817241700635 32.4699469204683 556.521739130435 54.6948158122427 -83.7166478262529 486.956521739131 78.9140509396393 -61.4212712689668 34.7826086956522 -87.9473751206489 47.5947393037074 104.347826086957 -98.6361303402722 -16.4594590280734 452.173913043478 -67.7281571625741 73.5723910673132 139.130434782609 54.6948158122427 -83.7166478262529 69.5652173913043 24.5485487140799 -96.9400265939331 521.739130434783 -98.6361303402722 16.4594590280734 486.956521739131 -40.1695424652969 91.5773326655057 173.913043478261 24.5485487140799 -96.9400265939331 104.347826086957 -8.25793454723323 99.658449300667 208.695652173913 -87.9473751206489 47.5947393037074 521.739130434783 -8.25793454723327 -99.658449300667 556.521739130435 -40.169542465297 -91.5773326655057 591.304347826087 -40.169542465297 -91.5773326655057 173.913043478261 24.5485487140799 96.940026593933 243.478260869565 -67.7281571625741 -73.5723910673132 626.086956521739 -67.7281571625741 -73.5723910673132 208.695652173913 54.6948158122427 83.7166478262529 278.260869565217 -87.9473751206489 -47.5947393037073 660.869565217391 -98.6361303402722 -16.4594590280734 695.652173913043 -8.25793454723323 99.658449300667 626.086956521739 78.9140509396394 61.4212712689668 313.04347826087 94.5817241700635 32.4699469204683 347.826086956522 -98.6361303402722 16.4594590280734 313.04347826087 -98.6361303402722 16.4594590280734 730.434782608696 -87.9473751206489 -47.5947393037073 34.7826086956522 -87.9473751206489 47.5947393037074 765.217391304348 54.6948158122427 83.7166478262529 695.652173913043 -87.9473751206489 47.5947393037074 347.826086956522 94.5817241700635 -32.4699469204684 452.173913043478 -98.6361303402722 -16.4594590280734 69.5652173913043 -67.7281571625741 73.5723910673132 382.608695652174 78.9140509396393 -61.4212712689668 486.956521739131 -98.6361303402722 16.4594590280734 104.347826086957 94.5817241700635 32.4699469204683 765.217391304348 94.5817241700635 -32.4699469204684 208.695652173913 54.6948158122427 -83.7166478262529 521.739130434783 -87.9473751206489 47.5947393037074 139.130434782609 -8.25793454723323 99.658449300667 452.173913043478 24.5485487140799 -96.9400265939331 556.521739130435 -67.7281571625741 73.5723910673132 173.913043478261 54.6948158122427 -83.7166478262529 278.260869565217 -40.1695424652969 91.5773326655057 208.695652173913 -8.25793454723327 -99.658449300667 591.304347826087 -40.169542465297 -91.5773326655057 626.086956521739 -8.25793454723323 99.658449300667 243.478260869565 24.5485487140799 -96.9400265939331 313.04347826087 54.6948158122427 83.7166478262529 521.739130434783 -67.7281571625741 -73.5723910673132 660.869565217391 -87.9473751206489 -47.5947393037073 695.652173913043 54.6948158122427 83.7166478262529 313.04347826087 -40.169542465297 -91.5773326655057 382.608695652174 -67.7281571625741 -73.5723910673132 417.391304347826 -98.6361303402722 -16.4594590280734 730.434782608696 -98.6361303402722 16.4594590280734 765.217391304348 94.5817241700635 -32.4699469204684 34.7826086956522 94.5817241700635 -32.4699469204684 486.956521739131 78.9140509396393 -61.4212712689668 521.739130434783 54.6948158122427 -83.7166478262529 556.521739130435 -98.6361303402722 16.4594590280734 521.739130434783 24.5485487140799 -96.9400265939331 591.304347826087 -8.25793454723327 -99.658449300667 626.086956521739 -98.6361303402722 16.4594590280734 139.130434782609 -40.169542465297 -91.5773326655057 660.869565217391 -87.9473751206489 47.5947393037074 173.913043478261 -67.7281571625741 -73.5723910673132 695.652173913043 -87.9473751206489 -47.5947393037073 730.434782608696 -98.6361303402722 -16.4594590280734 765.217391304348 94.5817241700635 -32.4699469204684 521.739130434783 54.6948158122427 -83.7166478262529 591.304347826087 24.5485487140799 -96.9400265939331 626.086956521739 5.75958653158129 400 6.28318530717959 350 5.76502671255203 393.146938099824 5.78038331643331 386.662410602174 5.80382582325277 380.690815213948 5.84339274904795 373.782555238023 5.89986744204557 366.815019461706 5.9668194398655 360.858265526469 6.03627258275022 356.380850902333 6.10703525710988 353.171507010994 6.18548781435823 350.960675236214 6.23370669596795 350.245215525427 6.28318530717959 0 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 350 0.523598775598299 400 0.077538932748348 350.60366789119 0.1509208682896 352.314017004824 0.218192472586135 354.928638859964 0.278804640762612 358.255381554833 0.346747481674073 363.324622594048 0.409044313017844 369.700044024682 0.456050013115963 376.326552497693 0.493149687318882 383.90964254567 0.51533969042131 391.563087645832 0.521486191917156 395.72529258068 0 450 0.0775391300147876 449.396329038004 0.15092123436146 447.685971589172 0.218192971604858 445.071337728308 0.278805237518871 441.744580622317 0.346748092637934 436.675324162327 0.409044978349884 430.299875845487 0.456050672751564 423.673337329156 0.493150253015108 416.090210848718 0.51534004882998 408.43673018339 0.521486285180745 404.274613176575 0 800 6.28318530717959 800 0.174532925199433 800 0.349065850398866 800 0.523598775598299 800 0.698131700797732 800 0.872664625997165 800 1.0471975511966 800 1.22173047639603 800 1.39626340159546 800 1.5707963267949 800 1.74532925199433 800 1.91986217719376 800 2.0943951023932 800 2.26892802759263 800 2.44346095279206 800 2.61799387799149 800 2.79252680319093 800 2.96705972839036 800 3.14159265358979 800 3.31612557878922 800 3.49065850398866 800 3.66519142918809 800 3.83972435438752 800 4.01425727958696 800 4.18879020478639 800 4.36332312998582 800 4.53785605518525 800 4.71238898038469 800 4.88692190558412 800 5.06145483078355 800 5.23598775598299 800 5.41052068118242 800 5.58505360638185 800 5.75958653158128 800 5.93411945678072 800 6.10865238198015 800 6.28318530717959 450 5.76502671255202 406.853061900168 5.78038331643326 413.337589397812 5.80382582325268 419.309184786033 5.84339274904778 426.217444761952 5.89986744204533 433.184980538269 5.96681943986518 439.141734473506 6.03627258290147 443.619149110997 6.10703525679861 446.828492965207 6.18548781364045 449.039324751509 6.23370669672657 449.754784472325 4.29902152596498 730.434782608696 4.29902152596498 695.652173913043 4.62971548950075 695.652173913043 1.98416378121461 278.260869565217 1.65346981767884 278.260869565217 1.98416378121461 243.478260869565 5.29110341657228 139.130434782609 5.29110341657228 104.347826086957 5.62179738010805 104.347826086957 3.96832756242921 765.217391304348 3.63763359889344 765.217391304348 4.96040945303652 139.130434782609 3.96832756242921 730.434782608696 2.64555170828614 591.304347826087 2.64555170828614 556.521739130435 2.97624567182191 556.521739130435 2.31485774475037 591.304347826087 2.31485774475037 556.521739130435 4.96040945303652 173.913043478261 1.65346981767884 313.04347826087 1.32277585414307 278.260869565217 4.62971548950075 139.130434782609 5.95249134364382 591.304347826087 5.62179738010805 556.521739130435 5.95249134364382 556.521739130435 4.62971548950075 173.913043478261 5.62179738010805 591.304347826087 1.32277585414307 313.04347826087 2.31485774475037 626.086956521739 1.98416378121461 591.304347826087 1.98416378121461 626.086956521739 4.62971548950075 208.695652173913 4.29902152596498 208.695652173913 5.62179738010805 626.086956521739 5.29110341657228 626.086956521739 1.32277585414307 347.826086956522 0.992081890607303 347.826086956522 4.29902152596498 243.478260869565 3.96832756242921 243.478260869565 5.29110341657228 660.869565217391 4.96040945303652 660.869565217391 3.96832756242921 278.260869565217 3.63763359889344 243.478260869565 0.992081890607303 382.608695652174 0.661387927071535 347.826086956522 1.98416378121461 660.869565217391 1.65346981767884 660.869565217391 3.63763359889344 278.260869565217 0.661387927071535 382.608695652174 4.96040945303652 695.652173913043 4.62971548950075 660.869565217391 1.65346981767884 695.652173913043 1.32277585414307 660.869565217391 3.63763359889344 313.04347826087 3.30693963535768 313.04347826087 3.30693963535768 278.260869565217 1.32277585414307 695.652173913043 4.62971548950075 730.434782608696 4.29902152596498 765.217391304348 0.661387927071535 417.391304347826 1.32277585414307 730.434782608696 0.992081890607303 730.434782608696 0.992081890607303 765.217391304348 0.661387927071535 765.217391304348 0.661387927071535 730.434782608696 3.30693963535768 347.826086956522 2.97624567182191 347.826086956522 5.95249134364382 626.086956521739 5.95249134364382 278.260869565217 5.95249134364382 243.478260869565 5.62179738010805 278.260869565217 5.62179738010805 243.478260869565 2.97624567182191 382.608695652174 2.64555170828614 382.608695652174 0.330693963535768 452.173913043478 5.62179738010805 660.869565217391 5.62179738010805 313.04347826087 5.29110341657228 313.04347826087 2.64555170828614 417.391304347826 2.31485774475037 417.391304347826 5.29110341657228 695.652173913043 5.29110341657228 347.826086956522 4.96040945303652 347.826086956522 2.31485774475037 452.173913043478 1.98416378121461 452.173913043478 1.98416378121461 417.391304347826 4.96040945303652 730.434782608696 4.62971548950075 34.7826086956522 4.29902152596498 34.7826086956522 0.330693963535768 34.7826086956522 4.96040945303652 382.608695652174 4.62971548950075 347.826086956522 4.62971548950075 765.217391304348 4.62971548950075 382.608695652174 1.98416378121461 486.956521739131 1.65346981767884 486.956521739131 5.95249134364382 660.869565217391 0.661387927071535 34.7826086956522 4.62971548950075 417.391304347826 4.29902152596498 417.391304347826 4.29902152596498 69.5652173913043 3.96832756242921 34.7826086956522 3.96832756242921 69.5652173913043 1.65346981767884 521.739130434783 1.32277585414307 486.956521739131 1.32277585414307 521.739130434783 5.62179738010805 695.652173913043 4.29902152596498 452.173913043478 3.96832756242921 452.173913043478 3.96832756242921 104.347826086957 3.63763359889344 104.347826086957 3.63763359889344 69.5652173913043 0.330693963535768 69.5652173913043 5.29110341657228 730.434782608696 3.96832756242921 486.956521739131 3.63763359889344 486.956521739131 3.63763359889344 452.173913043478 3.63763359889344 139.130434782609 3.30693963535768 104.347826086957 4.96040945303652 765.217391304348 1.32277585414307 556.521739130435 0.992081890607303 556.521739130435 3.30693963535768 139.130434782609 0.992081890607303 34.7826086956522 3.63763359889344 521.739130434783 3.30693963535768 486.956521739131 5.95249134364382 695.652173913043 0.992081890607303 591.304347826087 0.661387927071535 556.521739130435 3.30693963535768 173.913043478261 2.97624567182191 173.913043478261 3.30693963535768 521.739130434783 0.661387927071535 591.304347826087 2.97624567182191 208.695652173913 0.661387927071535 69.5652173913043 2.64555170828614 208.695652173913 3.30693963535768 556.521739130435 5.62179738010805 730.434782608696 5.29110341657228 765.217391304348 2.64555170828614 243.478260869565 2.31485774475037 208.695652173913 2.97624567182191 591.304347826087 0.661387927071535 626.086956521739 0.330693963535768 591.304347826087 2.31485774475037 243.478260869565 0.330693963535768 626.086956521739 0.330693963535768 660.869565217391 5.95249134364382 730.434782608696 0.330693963535768 104.347826086957 1.32277585414307 34.7826086956522 5.62179738010805 765.217391304348 2.31485774475037 278.260869565217 2.64555170828614 626.086956521739 5.95249134364382 104.347826086957 5.62179738010805 69.5652173913043 5.95249134364382 69.5652173913043 5.95249134364382 765.217391304348 1.98416378121461 313.04347826087 2.31485774475037 660.869565217391 5.62179738010805 139.130434782609 1.65346981767884 347.826086956522 0.992081890607303 69.5652173913043 0.661387927071535 104.347826086957 5.29110341657228 173.913043478261 4.96040945303652 208.695652173913 1.98416378121461 695.652173913043 1.65346981767884 730.434782608696 0.330693963535768 139.130434782609 1.32277585414307 382.608695652174 1.32277585414307 765.217391304348 4.62971548950075 243.478260869565 1.65346981767884 34.7826086956522 0.992081890607303 417.391304347826 5.95249134364382 313.04347826087 4.29902152596498 278.260869565217 0.661387927071535 452.173913043478 3.96832756242921 313.04347826087 5.62179738010805 347.826086956522 1.32277585414307 69.5652173913043 0.992081890607303 104.347826086957 5.29110341657228 382.608695652174 3.63763359889344 347.826086956522 0.330693963535768 486.956521739131 4.96040945303652 417.391304347826 3.30693963535768 382.608695652174 0.661387927071535 139.130434782609 2.97624567182191 417.391304347826 0.330693963535768 173.913043478261 4.62971548950075 452.173913043478 4.96040945303652 34.7826086956522 4.29902152596498 486.956521739131 2.64555170828614 452.173913043478 1.98416378121461 34.7826086956522 3.96832756242921 521.739130434783 4.62971548950075 69.5652173913043 2.31485774475037 486.956521739131 4.29902152596498 104.347826086957 3.63763359889344 556.521739130435 1.65346981767884 69.5652173913043 1.98416378121461 521.739130434783 3.96832756242921 139.130434782609 1.32277585414307 104.347826086957 3.30693963535768 591.304347826087 3.63763359889344 173.913043478261 1.65346981767884 556.521739130435 0.992081890607303 139.130434782609 2.97624567182191 626.086956521739 3.30693963535768 208.695652173913 1.32277585414307 591.304347826087 2.64555170828614 660.869565217391 2.97624567182191 243.478260869565 0.661387927071535 173.913043478261 0.330693963535768 208.695652173913 0.992081890607303 626.086956521739 2.64555170828614 278.260869565217 2.31485774475037 695.652173913043 2.31485774475037 34.7826086956522 0.661387927071535 660.869565217391 2.31485774475037 313.04347826087 1.98416378121461 730.434782608696 1.98416378121461 69.5652173913043 1.65346981767884 765.217391304348 0.330693963535768 695.652173913043 1.98416378121461 347.826086956522 5.95249134364382 347.826086956522 1.65346981767884 104.347826086957 5.95249134364382 139.130434782609 1.65346981767884 382.608695652174 5.62179738010805 382.608695652174 5.62179738010805 173.913043478261 5.29110341657228 208.695652173913 5.29110341657228 417.391304347826 1.32277585414307 417.391304347826 1.32277585414307 139.130434782609 0.992081890607303 173.913043478261 4.96040945303652 452.173913043478 4.96040945303652 243.478260869565 0.661387927071535 208.695652173913 0.992081890607303 452.173913043478 0.330693963535768 243.478260869565 4.62971548950075 486.956521739131 4.62971548950075 278.260869565217 0.661387927071535 486.956521739131 4.29902152596498 313.04347826087 2.64555170828614 34.7826086956522 4.29902152596498 521.739130434783 3.96832756242921 347.826086956522 3.96832756242921 556.521739130435 0.330693963535768 521.739130434783 3.63763359889344 382.608695652174 2.31485774475037 69.5652173913043 3.63763359889344 591.304347826087 5.29110341657228 34.7826086956522 3.30693963535768 417.391304347826 1.98416378121461 104.347826086957 3.30693963535768 626.086956521739 2.97624567182191 452.173913043478 4.96040945303652 69.5652173913043 1.65346981767884 139.130434782609 2.97624567182191 660.869565217391 4.62971548950075 104.347826086957 2.64555170828614 486.956521739131 1.32277585414307 173.913043478261 2.64555170828614 695.652173913043 0.992081890607303 208.695652173913 2.31485774475037 521.739130434783 4.29902152596498 139.130434782609 2.31485774475037 730.434782608696 0.661387927071535 243.478260869565 3.96832756242921 173.913043478261 1.98416378121461 765.217391304348 1.98416378121461 556.521739130435 3.63763359889344 208.695652173913 0.330693963535768 278.260869565217 5.62179738010805 417.391304347826 1.65346981767884 591.304347826087 2.97624567182191 34.7826086956522 3.30693963535768 243.478260869565 2.97624567182191 278.260869565217 5.29110341657228 452.173913043478 1.32277585414307 626.086956521739 0.992081890607303 660.869565217391 4.96040945303652 486.956521739131 2.64555170828614 69.5652173913043 2.64555170828614 313.04347826087 2.31485774475037 104.347826086957 0.661387927071535 695.652173913043 4.62971548950075 521.739130434783 2.31485774475037 347.826086956522 1.98416378121461 139.130434782609 4.29902152596498 556.521739130435 0.330693963535768 730.434782608696 1.65346981767884 173.913043478261 1.98416378121461 382.608695652174 5.95249134364382 173.913043478261 3.96832756242921 591.304347826087 1.65346981767884 417.391304347826 5.62179738010805 208.695652173913 3.63763359889344 626.086956521739 1.32277585414307 208.695652173913 0.992081890607303 243.478260869565 5.29110341657228 243.478260869565 3.30693963535768 660.869565217391 1.32277585414307 452.173913043478 4.96040945303652 278.260869565217 0.661387927071535 278.260869565217 2.97624567182191 695.652173913043 0.992081890607303 486.956521739131 0.330693963535768 313.04347826087 4.62971548950075 313.04347826087 2.64555170828614 730.434782608696 0.661387927071535 521.739130434783 3.30693963535768 34.7826086956522 4.29902152596498 347.826086956522 2.31485774475037 765.217391304348 3.96832756242921 382.608695652174 5.62179738010805 452.173913043478 2.97624567182191 69.5652173913043 3.63763359889344 417.391304347826 0.330693963535768 556.521739130435 5.29110341657228 486.956521739131 5.62179738010805 34.7826086956522 2.64555170828614 104.347826086957 3.30693963535768 452.173913043478 2.31485774475037 139.130434782609 5.29110341657228 69.5652173913043 4.96040945303652 521.739130434783 2.97624567182191 486.956521739131 1.98416378121461 173.913043478261 4.96040945303652 104.347826086957 1.65346981767884 208.695652173913 2.64555170828614 521.739130434783 4.62971548950075 556.521739130435 4.29902152596498 591.304347826087 4.29902152596498 173.913043478261 1.32277585414307 243.478260869565 3.96832756242921 626.086956521739 3.96832756242921 208.695652173913 0.992081890607303 278.260869565217 3.63763359889344 660.869565217391 3.30693963535768 695.652173913043 1.65346981767884 626.086956521739 0.661387927071535 313.04347826087 0.330693963535768 347.826086956522 2.97624567182191 313.04347826087 2.97624567182191 730.434782608696 3.63763359889344 34.7826086956522 2.64555170828614 765.217391304348 0.992081890607303 695.652173913043 2.64555170828614 347.826086956522 5.95249134364382 452.173913043478 3.30693963535768 69.5652173913043 2.31485774475037 382.608695652174 5.62179738010805 486.956521739131 2.97624567182191 104.347826086957 0.330693963535768 765.217391304348 5.95249134364382 208.695652173913 5.29110341657228 521.739130434783 2.64555170828614 139.130434782609 1.65346981767884 452.173913043478 4.96040945303652 556.521739130435 2.31485774475037 173.913043478261 5.29110341657228 278.260869565217 1.98416378121461 208.695652173913 4.62971548950075 591.304347826087 4.29902152596498 626.086956521739 1.65346981767884 243.478260869565 4.96040945303652 313.04347826087 0.992081890607303 521.739130434783 3.96832756242921 660.869565217391 3.63763359889344 695.652173913043 0.992081890607303 313.04347826087 4.29902152596498 382.608695652174 3.96832756242921 417.391304347826 3.30693963535768 730.434782608696 2.97624567182191 765.217391304348 5.95249134364382 34.7826086956522 5.95249134364382 486.956521739131 5.62179738010805 521.739130434783 5.29110341657228 556.521739130435 2.97624567182191 521.739130434783 4.96040945303652 591.304347826087 4.62971548950075 626.086956521739 2.97624567182191 139.130434782609 4.29902152596498 660.869565217391 2.64555170828614 173.913043478261 3.96832756242921 695.652173913043 3.63763359889344 730.434782608696 3.30693963535768 765.217391304348 5.95249134364382 521.739130434783 5.29110341657228 591.304347826087 4.96040945303652 626.086956521739 121 122 123 124 125 126 127 128 129 130 96 131 127 132 128 130 133 121 134 135 136 130 131 133 130 97 96 134 137 138 130 98 97 134 138 135 139 132 127 140 141 125 139 142 132 143 144 145 139 146 142 143 147 144 140 148 141 143 145 110 140 125 124 149 150 137 149 151 150 152 153 146 154 155 147 156 157 148 158 159 153 158 153 152 160 161 155 160 155 154 162 163 159 164 165 157 166 167 151 162 168 163 164 169 165 170 123 171 170 171 161 172 167 166 170 161 160 172 173 167 174 175 176 174 176 168 172 177 173 178 121 123 174 168 162 164 157 156 179 130 121 180 51 169 179 98 130 179 121 178 181 182 177 180 69 70 179 99 98 183 79 184 180 70 71 179 100 99 183 185 182 180 71 72 186 187 175 180 72 51 183 182 181 183 184 185 183 80 79 188 110 74 183 81 80 188 143 110 188 147 143 189 190 2 188 154 147 189 191 192 189 192 190 193 187 186 193 194 187 195 64 65 195 65 66 196 160 154 197 198 191 195 66 67 199 200 194 201 170 160 201 160 196 202 203 198 204 205 206 207 178 123 202 198 197 208 209 40 207 123 170 204 206 200 210 14 15 207 170 201 208 40 41 210 15 16 210 16 17 211 212 203 213 179 178 211 214 212 213 100 179 211 203 202 213 101 100 215 216 205 217 154 188 218 17 18 217 196 154 218 18 19 219 220 214 221 222 209 217 188 74 221 209 208 221 223 222 224 225 216 218 210 17 224 216 215 224 226 225 227 201 196 228 220 219 228 229 220 230 231 232 233 14 210 230 232 223 234 207 201 234 201 227 235 236 237 238 231 230 238 239 231 240 103 102 241 242 226 238 243 239 240 213 178 235 237 229 244 19 20 240 178 207 244 20 21 240 101 213 240 207 234 240 102 101 245 246 236 247 217 74 245 236 235 248 242 241 248 249 242 250 251 243 245 252 246 248 253 249 247 196 217 247 227 196 244 218 19 254 251 250 255 233 210 254 256 251 255 210 218 257 136 252 258 234 227 259 104 103 259 105 104 259 240 234 260 261 256 259 103 240 262 134 136 259 234 258 263 264 253 260 265 261 262 136 257 263 266 264 260 256 254 267 73 266 268 247 74 268 227 247 268 258 227 269 14 233 270 21 22 271 106 105 272 265 260 270 22 23 271 107 106 272 124 126 273 134 262 271 105 259 273 137 134 272 126 265 273 149 137 271 259 258 274 275 276 277 108 107 277 109 108 278 140 124 270 244 21 277 74 109 274 129 275 277 268 74 274 276 13 277 107 271 277 258 268 277 271 258 279 166 151 280 127 129 281 148 140 282 218 244 281 156 148 279 151 149 281 140 278 282 255 218 282 244 270 283 255 282 284 139 127 284 127 280 285 146 139 283 269 233 286 172 166 283 233 255 287 177 172 285 152 146 287 181 177 288 14 269 285 139 284 287 172 286 289 164 156 290 81 183 290 82 81 291 158 152 290 83 82 292 23 24 293 180 169 293 164 289 290 183 181 294 191 189 294 189 2 295 158 291 292 270 23 294 12 11 295 159 158 294 2 12 294 197 191 295 162 159 293 169 164 296 195 67 297 162 295 298 7 6 296 69 180 296 67 68 298 202 197 296 68 69 297 174 162 299 282 270 300 283 282 301 211 202 302 186 175 301 202 298 302 175 174 303 64 195 304 211 301 303 62 63 300 282 299 303 63 64 305 193 186 306 269 283 304 219 214 304 214 211 307 194 193 306 288 269 308 14 288 308 50 14 307 199 194 309 228 219 307 193 305 310 208 41 310 41 42 310 42 43 311 228 309 312 200 199 313 292 24 313 24 25 312 199 307 313 25 26 311 235 229 312 204 200 311 229 228 314 235 311 315 221 208 314 245 235 316 204 312 317 221 315 316 215 205 317 230 223 316 205 204 318 257 252 318 245 314 317 223 221 319 292 313 318 252 245 319 270 292 320 224 215 319 299 270 321 230 317 321 238 230 322 300 299 323 262 257 324 243 238 324 250 243 325 224 320 326 283 300 325 226 224 324 238 321 326 306 283 325 241 226 327 273 262 327 262 323 328 254 250 326 300 322 329 248 241 330 273 327 331 254 328 331 260 254 332 288 306 332 308 288 330 279 149 330 149 273 333 50 308 334 263 253 334 253 248 335 272 260 334 248 329 336 166 279 336 286 166 337 26 27 337 27 28 338 266 263 338 267 266 339 124 272 339 278 124 337 313 26 340 287 286 341 319 313 342 287 340 342 84 83 343 73 267 344 281 278 342 83 290 342 181 287 342 290 181 345 7 298 345 8 7 345 9 8 345 10 9 346 299 319 345 11 10 347 274 13 345 294 11 348 281 344 345 197 294 347 129 274 348 156 281 346 319 341 345 298 197 347 280 129 349 3 1 349 4 3 349 5 4 349 6 5 346 322 299 349 298 6 349 301 298 350 284 280 351 285 284 348 289 156 352 304 301 353 293 289 354 326 322 352 301 349 351 284 350 355 306 326 356 219 304 357 291 152 357 152 285 356 304 352 355 326 354 355 332 306 357 285 351 358 333 308 359 296 180 356 309 219 358 308 332 360 50 333 361 311 309 362 295 291 359 180 293 359 293 353 363 195 296 363 303 195 364 297 295 364 295 362 365 28 29 365 29 30 366 311 361 367 174 297 366 314 311 367 302 174 368 318 314 369 62 303 370 186 302 365 337 28 368 314 366 370 305 186 371 337 365 370 302 367 371 341 313 372 318 368 371 313 337 372 257 318 373 310 43 372 323 257 374 307 305 373 43 44 373 44 45 375 346 341 376 327 323 377 307 374 378 208 310 377 312 307 379 346 375 380 327 376 378 310 373 380 330 327 379 322 346 379 354 322 378 315 208 381 317 315 382 316 312 383 355 354 384 330 380 384 336 279 384 279 330 385 358 332 385 355 383 386 215 316 387 321 317 386 320 215 387 317 381 388 286 336 385 332 355 388 340 286 389 360 333 390 324 321 391 342 340 392 325 320 390 321 387 391 84 342 389 333 358 391 85 84 391 86 85 393 250 324 394 50 360 395 1 111 393 328 250 395 111 112 395 112 113 393 324 390 395 113 114 396 241 325 396 329 241 395 349 1 395 352 349 396 325 392 397 30 31 398 331 328 397 31 32 399 331 398 400 356 352 399 335 260 400 352 395 397 365 30 399 260 331 401 334 329 402 334 401 403 309 356 403 361 309 404 371 365 405 335 399 405 339 272 403 356 400 405 272 335 402 263 334 402 338 263 406 371 404 407 267 338 406 341 371 407 343 267 408 366 361 409 344 278 406 375 341 409 339 405 410 379 375 409 278 339 411 366 408 411 368 366 412 73 343 413 354 379 414 348 344 413 383 354 415 13 2 416 372 368 415 347 13 415 280 347 415 350 280 416 368 411 413 379 410 417 289 348 417 353 289 418 351 350 419 372 416 417 348 414 419 376 323 419 323 372 420 385 383 421 358 385 421 389 358 422 357 351 423 380 376 422 351 418 424 359 353 421 385 420 425 357 422 426 360 389 427 384 380 425 291 357 425 362 291 428 363 296 427 380 423 428 359 424 428 296 359 426 394 360 429 50 394 429 52 50 429 53 52 430 364 362 431 336 384 431 388 336 431 384 427 432 369 303 432 303 363 433 32 33 434 364 430 433 33 34 434 367 297 435 340 388 434 297 364 435 86 391 435 391 340 435 87 86 435 88 87 436 367 434 437 114 115 433 397 32 438 365 397 436 370 367 437 395 114 437 400 395 439 374 305 438 397 433 438 404 365 439 305 370 440 62 369 441 400 437 442 45 46 442 46 47 443 406 404 441 403 400 444 377 374 442 373 45 445 375 406 446 373 442 447 403 441 446 378 373 445 410 375 447 408 361 448 377 444 447 361 403 448 382 312 449 413 410 448 312 377 450 378 446 450 315 378 450 381 315 451 420 383 452 382 448 453 411 408 452 386 316 142 387 381 452 316 382 451 413 449 454 416 411 451 383 413 454 411 453 455 387 142 456 421 420 457 419 416 138 392 320 455 390 387 457 416 454 138 320 386 458 393 390 459 426 389 458 390 455 459 421 456 459 389 421 460 419 457 460 423 376 163 328 393 460 376 419 150 396 392 163 393 458 163 398 328 461 427 423 462 401 329 463 429 394 462 329 396 463 394 426 462 396 150 176 399 398 464 53 429 464 54 53 465 405 399 464 55 54 466 427 461 465 399 176 464 56 55 466 431 427 173 402 401 467 433 34 467 34 35 467 35 36 468 431 466 468 88 435 468 435 388 468 89 88 469 338 402 468 90 89 469 407 338 468 388 431 470 409 405 471 115 116 471 116 117 471 117 118 471 118 119 472 438 433 469 402 173 473 414 344 471 437 115 185 343 407 185 412 343 474 441 437 473 344 409 475 438 472 476 73 412 476 75 73 476 76 75 206 417 414 475 404 438 476 77 76 475 443 404 477 418 350 478 441 474 479 443 475 478 447 441 479 445 406 479 406 443 477 415 2 477 350 415 480 424 353 192 422 418 481 408 447 480 417 206 481 447 478 480 353 417 482 449 410 481 453 408 482 410 445 483 425 422 484 451 449 485 454 453 483 422 192 486 457 454 486 454 485 487 451 484 225 428 424 487 456 420 488 362 425 489 428 225 488 430 362 487 420 451 490 457 486 488 425 483 489 363 428 490 460 457 489 432 363 212 434 430 249 369 432 491 460 490 141 459 456 491 423 460 492 459 141 493 434 212 493 436 434 491 461 423 249 440 369 264 62 440 492 426 459 494 439 370 492 463 426 494 370 436 165 57 56 165 58 57 495 466 461 496 466 495 496 90 468 496 91 90 496 468 466 165 429 463 496 92 91 237 439 494 165 464 429 165 56 464 237 444 374 497 47 48 498 437 471 497 48 49 498 119 120 237 374 439 497 49 13 222 36 37 498 120 110 222 37 38 498 471 119 497 442 47 498 474 437 275 446 442 499 478 474 246 448 444 222 467 36 128 450 446 128 446 275 232 472 433 500 481 478 501 452 448 501 448 246 232 433 467 500 478 499 132 142 381 132 450 128 132 381 450 135 138 386 239 475 472 502 453 481 502 485 453 135 452 501 146 455 142 502 481 500 135 386 452 503 486 485 504 475 239 504 479 475 137 392 138 153 455 146 153 458 455 137 150 392 505 486 503 505 490 486 159 458 153 506 482 445 506 479 504 506 445 479 159 163 458 507 491 490 151 462 150 507 490 505 261 449 482 261 484 449 168 398 163 168 176 398 508 495 461 508 461 491 167 462 151 508 491 507 167 401 462 126 487 484 175 465 176 509 496 495 167 173 401 187 465 175 509 92 496 125 141 456 509 93 92 509 94 93 177 469 173 187 405 465 125 487 126 510 498 110 125 456 487 187 470 405 510 474 498 182 407 469 510 499 474 182 185 407 182 469 177 194 470 187 194 409 470 144 500 499 194 473 409 184 77 476 184 78 77 148 492 141 184 79 78 184 412 185 184 476 412 200 414 473 157 165 463 190 418 477 200 206 414 157 463 492 511 502 500 200 473 194 157 492 148 511 500 144 512 502 511 190 477 2 190 192 418 512 503 485 205 480 206 512 485 502 169 59 58 169 60 59 191 483 192 169 61 60 169 51 61 171 505 503 169 58 165 209 222 38 198 488 483 216 480 205 198 483 191 216 424 480 122 505 171 122 507 505 216 225 424 209 38 39 209 39 40 203 488 198 133 507 122 203 430 488 133 508 507 203 212 430 226 489 225 223 467 222 131 509 495 131 495 508 214 493 212 131 508 133 223 232 467 131 94 509 131 95 94 231 239 472 131 96 95 242 249 432 220 493 214 220 494 436 242 489 226 242 432 489 145 510 110 145 499 510 231 472 232 145 144 499 220 436 493 253 440 249 229 237 494 253 264 440 243 504 239 147 511 144 229 494 220 155 512 511 155 511 147 266 62 264 236 444 237 251 506 504 266 73 62 251 504 243 236 246 444 161 503 512 256 482 506 256 261 482 161 512 155 276 275 442 161 171 503 252 501 246 276 442 497 256 506 251 276 497 13 123 122 171 265 484 261 129 128 275 265 126 484 136 501 252 121 133 122 136 135 501 
+379 587 1 0.681934829863914
+190 20 445.825756949558 210 -4.89842541528951e-15 450 187.024366020417 19.7774012963438 445.922264725258 184.397529800585 19.1992796277918 446.166954243274 181.546913604686 18.125819553687 446.59886977596 178.752969008674 16.5379654738046 447.185757348038 176.369667096977 14.6360522075901 447.809894135463 174.309971315007 12.4025399755702 448.437351320804 172.548649956894 9.76987059841766 449.036207207027 171.242034340645 6.93820726756652 449.51627283167 170.380301086729 3.88167696084131 449.849098129506 170.023096521915 0.960898368304993 449.990765883617 170.086043866562 -1.8531982436549 449.965644740411 170.509841698291 -4.48706231247217 449.798255709213 171.398299667707 -7.34688690845968 449.457287186436 172.743857915231 -10.1106660571351 448.967075069423 174.347888840505 -12.4503589683746 448.425082205426 176.192341023654 -14.4688795692552 447.86074933687 178.295746540249 -16.2176006194872 447.296825505482 180.640667676887 -17.6748961416399 446.7717611852 183.205669615023 -18.8105768661047 446.326693427354 186.059267040101 -19.6079226714758 445.994884340429 189.05297923185 -19.9775663053321 445.835541404226 191.895773051283 -19.9099477889329 445.864953696004 194.48438891673 -19.4907734771899 446.044649514275 197.343898776281 -18.6028803528253 446.410482031254 200.13477025801 -17.2419961803721 446.933075375945 202.522803249016 -15.5942105252608 447.506005983989 204.599616537762 -13.6693524360872 448.095205754853 206.410620564223 -11.4320396201158 448.675542899776 207.946109646233 -8.82820037172931 449.214457777936 209.086918743382 -5.97406825644437 449.641821815127 209.747291812357 -3.16934437217016 449.899454557652 209.797702468142 2.83742874189979 449.91942504134 209.215264429107 5.5473956609573 449.69131111379 208.306916927762 8.05337150161281 449.347170220943 206.788174560315 10.8700135987294 448.804126907314 204.754879178687 13.5016125308194 448.142563877523 202.602997991452 15.5294700803301 447.527208622277 200.14641042884 17.2351489960208 446.935590404877 197.364149940715 18.5948729149583 446.413690924525 194.262428648985 19.5405143016412 446.023562404914 192.165572916192 19.8824116982837 445.876897309791 190 -20 354.174243050442 170 -1.22460635382238e-14 350 187.19152395552 -19.8018301993616 354.088263569037 184.516885484041 -19.2337057450191 353.84737773106 182.039994698179 -18.347706288844 353.488047941608 179.223163623154 -16.8481398588458 352.924101793932 176.597079044967 -14.8445852697679 352.254442215956 174.551494560294 -12.7021125979118 351.640343987994 172.81733759401 -10.2350434370622 351.058771097833 171.42920242427 -7.42465406707688 350.554327671198 170.463556231093 -4.28104719934824 350.183610769691 170.118264986057 -2.17177622757773 350.047188396748 100 -1.83690953073357e-14 350 86.6025403784438 -50 400 86.8732667031317 -49.5281290308752 393.146938099824 87.6235772593243 -48.1882631494736 386.662410602174 88.7290516622297 -46.1210945615935 380.690815213948 90.4840004397121 -42.5751772682387 373.782555238023 92.7428861391894 -37.3999606121917 366.815019461706 95.0372320329239 -31.11148437027 360.858265526469 96.9671604229308 -24.4411486760561 356.380850902333 98.4525657430885 -17.52405054016 353.171507010994 99.5231396908821 -9.75421483502655 350.960675236214 99.8776181649079 -4.94584264829443 350.245215525427 100 -2.44921270764475e-14 450 86.8732667031312 -49.5281290308762 406.853061900168 87.6235772593223 -48.1882631494772 413.337589397812 88.7290516622257 -46.1210945616012 419.309184786033 90.484000439705 -42.5751772682538 426.217444761952 92.7428861391805 -37.3999606122139 433.184980538269 95.0372320329138 -31.1114843703007 439.141734473506 96.9671604293251 -24.4411486612818 443.619149110997 98.4525657314274 -17.5240505708509 446.828492965207 99.5231396846886 -9.7542149066232 449.039324751509 99.877618163893 -4.94584257239082 449.754784472325 86.6025403784439 50 400 99.6995349038219 7.74614536115343 449.396329038004 98.8632990204773 15.0348959199349 447.685971589172 97.6290200022516 21.6465795167683 445.071337728308 96.1384934421685 27.5207218309807 441.744580622317 94.0482819113588 33.9841246665353 436.675324162327 91.7501087080715 39.7733276178202 430.299875845487 89.779880280166 44.0405850374743 423.673337329156 88.0845894011337 47.3403121169944 416.090210848718 87.0125187464446 49.2830763468782 408.43673018339 86.7079714631656 49.8169414560564 404.274613176575 100 -1.83690953073357e-14 350 99.6995364250708 7.74612569392024 350.60366789119 98.8633045221148 15.0348597287602 352.314017004824 97.6290308111529 21.6465307979184 354.928638859964 96.1385098653288 27.5206644597269 358.255381554833 94.0483026744096 33.9840672064279 363.324622594048 91.7501351704928 39.7732665735241 369.700044024682 89.7799093309045 44.0405258154732 376.326552497693 88.0846161813635 47.3402622878728 383.90964254567 87.0125364098992 49.2830451608201 391.563087645832 86.7079761092912 49.8169333693719 395.72529258068 170 -1.22460635382238e-14 350 190 20 354.174243050442 170.202464309206 2.83858896354278 350.080640925493 170.784931061703 5.54807359953334 350.308764553975 171.694405902748 8.05637777047583 350.653320494305 173.214340920064 10.8738982856126 351.196738417424 175.24816387627 13.5049376869178 351.858368714932 177.401364011892 15.5330088161513 352.473947838002 179.857848980619 17.237654925444 353.065330165529 182.637652604668 18.5955872197421 353.586595055644 185.737201868648 19.5404341367349 353.976403390908 187.834463425865 19.8824152894209 354.123104387754 210 -8.57224447675664e-15 350 209.797535684556 2.83858895721841 350.080640928023 209.215068935606 5.54807361321558 350.308764554953 208.305594113848 8.05637773956749 350.653320488076 206.785659117562 10.8738982275306 351.196738404482 204.751836168062 13.5049376384928 351.858368701347 202.598636037752 15.5330087758858 352.473947824842 200.142151074243 17.2376548931651 353.065330153674 197.362347455423 18.5955871959507 353.586595046112 194.262798195698 19.5404341226978 353.976403384948 192.165536607703 19.8824152857648 354.123104386169 300 -1.22460635382238e-14 350 300 -1.22460635382238e-14 350 300 8.68240888334652 350.75961234939 300 17.1010071662834 353.015368960705 300 25 356.698729810778 300 32.139380484327 361.697777844051 300 38.3022221559489 367.860619515673 300 43.3012701892219 375 300 46.9846310392954 382.898992833717 300 49.2403876506104 391.317591116653 300 50 400 300 49.2403876506104 408.682408883347 300 46.9846310392954 417.101007166283 300 43.3012701892219 425 300 38.3022221559489 432.139380484327 300 32.139380484327 438.302222155949 300 25 443.301270189222 300 17.1010071662835 446.984631039295 300 8.68240888334658 449.24038765061 300 7.27364132466213e-14 450 300 -8.68240888334644 449.24038765061 300 -17.1010071662833 446.984631039295 300 -24.9999999999999 443.301270189222 300 -32.1393804843269 438.302222155949 300 -38.3022221559488 432.139380484327 300 -43.3012701892219 425 300 -46.9846310392954 417.101007166284 300 -49.2403876506104 408.682408883347 300 -50 400 300 -49.2403876506104 391.317591116654 300 -46.9846310392955 382.898992833717 300 -43.301270189222 375 300 -38.302222155949 367.860619515673 300 -32.1393804843271 361.697777844051 300 -25.0000000000002 356.698729810778 300 -17.1010071662836 353.015368960705 300 -8.68240888334674 350.75961234939 210 -8.57224447675664e-15 350 192.808476042752 -19.8018301996066 354.088263569143 195.483114512722 -19.2337057459418 353.847377731445 197.960005297371 -18.3477062907747 353.48804794237 200.776836372029 -16.8481398619274 352.924101795035 203.402920949326 -14.8445852749198 352.254442217558 205.448505433598 -12.7021126053398 351.640343989945 207.182662399942 -10.2350434472155 351.058771099956 208.570797574629 -7.42465408034023 350.554327671456 209.536443767991 -4.28104718451168 350.183610770056 209.881735017624 -2.17177625553873 350.047188395291 119.43291878176 45.7886663327529 420.084771232648 135.848107983418 49.8292246503335 404.128967273617 119.43291878176 49.8292246503335 404.128967273617 185.093675588393 -45.7886663327528 420.084771232649 201.508864790051 -36.7861955336566 433.864078581287 185.093675588393 -36.7861955336566 433.864078581287 103.017729580102 45.7886663327529 420.084771232648 267.169621596684 30.7106356344834 360.54297453018 267.169621596684 16.2349734602341 352.709137914968 250.754432395026 16.2349734602341 352.709137914968 250.754432395026 30.7106356344834 360.54297453018 168.678486386735 -45.7886663327528 420.084771232649 152.263297185077 -49.8292246503335 404.128967273617 152.263297185077 -45.7886663327528 420.084771232649 234.339243193367 41.8583239131264 372.652592093879 217.924053991709 30.7106356344834 360.54297453018 217.924053991709 41.8583239131264 372.652592093879 135.848107983418 -49.8292246503335 404.128967273617 234.339243193367 30.7106356344834 360.54297453018 201.508864790051 48.4700132969665 387.72572564296 201.508864790051 41.8583239131264 372.652592093879 119.43291878176 -48.4700132969665 387.72572564296 103.017729580102 -49.8292246503335 404.128967273617 103.017729580102 -48.4700132969665 387.72572564296 119.43291878176 -49.8292246503335 404.128967273617 185.093675588393 48.4700132969665 387.72572564296 267.169621596684 -23.7973696518536 443.973687560324 250.754432395026 -8.22972951403665 449.318065170136 250.754432395026 -23.7973696518536 443.973687560324 267.169621596684 -8.22972951403665 449.318065170136 168.678486386735 49.8292246503335 404.128967273617 168.678486386735 48.4700132969665 387.72572564296 152.263297185077 48.4700132969665 387.72572564296 234.339243193367 -36.7861955336566 433.864078581287 234.339243193367 -23.7973696518536 443.973687560324 217.924053991709 -36.7861955336566 433.864078581287 152.263297185077 49.8292246503335 404.128967273617 201.508864790051 -45.7886663327528 420.084771232649 135.848107983418 45.7886663327529 420.084771232648 103.017729580102 36.7861955336566 433.864078581287 168.678486386735 -49.8292246503335 404.128967273617 283.584810798342 30.7106356344834 360.54297453018 283.584810798342 16.2349734602341 352.709137914968 250.754432395026 41.8583239131264 372.652592093879 135.848107983418 -48.4700132969665 387.72572564296 217.924053991709 48.4700132969665 387.72572564296 103.017729580102 -41.8583239131265 372.652592093879 283.584810798342 -23.7973696518536 443.973687560324 283.584810798342 -8.22972951403665 449.318065170136 185.093675588393 49.8292246503335 404.128967273617 250.754432395026 -36.7861955336566 433.864078581287 217.924053991709 -45.7886663327528 420.084771232649 152.263297185077 45.7886663327529 420.084771232648 185.093675588393 -49.8292246503335 404.128967273617 119.43291878176 36.7861955336566 433.864078581287 152.263297185077 -48.4700132969665 387.72572564296 267.169621596684 41.8583239131264 372.652592093879 234.339243193367 48.4700132969665 387.72572564296 119.43291878176 -41.8583239131265 372.652592093879 201.508864790051 49.8292246503335 404.128967273617 267.169621596684 -36.7861955336566 433.864078581287 234.339243193367 -45.7886663327528 420.084771232649 168.678486386735 45.7886663327529 420.084771232648 201.508864790051 -49.8292246503335 404.128967273617 135.848107983418 36.7861955336566 433.864078581287 168.678486386735 -48.4700132969665 387.72572564296 103.017729580102 23.7973696518537 443.973687560324 283.584810798342 41.8583239131264 372.652592093879 135.848107983418 -41.8583239131265 372.652592093879 250.754432395026 48.4700132969665 387.72572564296 103.017729580102 -30.7106356344834 360.54297453018 283.584810798342 -36.7861955336566 433.864078581287 217.924053991709 49.8292246503335 404.128967273617 250.754432395026 -45.7886663327528 420.084771232649 185.093675588393 45.7886663327529 420.084771232648 217.924053991709 -49.8292246503335 404.128967273617 152.263297185077 36.7861955336566 433.864078581287 185.093675588393 -48.4700132969665 387.72572564296 119.43291878176 23.7973696518537 443.973687560324 152.263297185077 -41.8583239131265 372.652592093879 267.169621596684 48.4700132969665 387.72572564296 119.43291878176 -30.7106356344834 360.54297453018 234.339243193367 49.8292246503335 404.128967273617 201.508864790051 45.7886663327529 420.084771232648 267.169621596684 -45.7886663327528 420.084771232649 234.339243193367 -49.8292246503335 404.128967273617 201.508864790051 -48.4700132969665 387.72572564296 168.678486386735 36.7861955336566 433.864078581287 168.678486386735 -41.8583239131265 372.652592093879 135.848107983418 23.7973696518537 443.973687560324 135.848107983418 -30.7106356344834 360.54297453018 103.017729580102 8.22972951403675 449.318065170136 283.584810798342 48.4700132969665 387.72572564296 250.754432395026 49.8292246503335 404.128967273617 103.017729580102 -16.2349734602342 352.709137914968 283.584810798342 -45.7886663327528 420.084771232649 217.924053991709 45.7886663327529 420.084771232648 250.754432395026 -49.8292246503335 404.128967273617 185.093675588393 36.7861955336566 433.864078581287 217.924053991709 -48.4700132969665 387.72572564296 152.263297185077 23.7973696518537 443.973687560324 185.093675588393 -41.8583239131265 372.652592093879 119.43291878176 8.22972951403675 449.318065170136 152.263297185077 -30.7106356344834 360.54297453018 267.169621596684 49.8292246503335 404.128967273617 119.43291878176 -16.2349734602342 352.709137914968 234.339243193367 45.7886663327529 420.084771232648 267.169621596684 -49.8292246503335 404.128967273617 201.508864790051 36.7861955336566 433.864078581287 234.339243193367 -48.4700132969665 387.72572564296 168.678486386735 23.7973696518537 443.973687560324 201.508864790051 -41.8583239131265 372.652592093879 168.678486386735 -30.7106356344834 360.54297453018 135.848107983418 8.22972951403675 449.318065170136 103.017729580102 -8.22972951403665 449.318065170136 135.848107983418 -16.2349734602342 352.709137914968 283.584810798342 49.8292246503335 404.128967273617 250.754432395026 45.7886663327529 420.084771232648 283.584810798342 -49.8292246503335 404.128967273617 250.754432395026 -48.4700132969665 387.72572564296 217.924053991709 36.7861955336566 433.864078581287 217.924053991709 -41.8583239131265 372.652592093879 185.093675588393 23.7973696518537 443.973687560324 185.093675588393 -30.7106356344834 360.54297453018 152.263297185077 8.22972951403675 449.318065170136 152.263297185077 -16.2349734602342 352.709137914968 119.43291878176 -8.22972951403665 449.318065170136 267.169621596684 -48.4700132969665 387.72572564296 267.169621596684 45.7886663327529 420.084771232648 234.339243193367 -41.8583239131265 372.652592093879 234.339243193367 36.7861955336566 433.864078581287 201.508864790051 -30.7106356344834 360.54297453018 201.508864790051 23.7973696518537 443.973687560324 168.678486386735 -16.2349734602342 352.709137914968 168.678486386735 8.22972951403675 449.318065170136 283.584810798342 -48.4700132969665 387.72572564296 250.754432395026 -41.8583239131265 372.652592093879 135.848107983418 -8.22972951403665 449.318065170136 217.924053991709 -30.7106356344834 360.54297453018 103.017729580102 -23.7973696518536 443.973687560324 283.584810798342 45.7886663327529 420.084771232648 267.169621596684 -41.8583239131265 372.652592093879 250.754432395026 36.7861955336566 433.864078581287 217.924053991709 23.7973696518537 443.973687560324 234.339243193367 -30.7106356344834 360.54297453018 283.584810798342 -41.8583239131265 372.652592093879 103.017729580102 16.2349734602341 352.709137914968 152.263297185077 -8.22972951403665 449.318065170136 119.43291878176 16.2349734602341 352.709137914968 250.754432395026 -30.7106356344834 360.54297453018 217.924053991709 -16.2349734602342 352.709137914968 119.43291878176 -23.7973696518536 443.973687560324 135.848107983418 16.2349734602341 352.709137914968 267.169621596684 36.7861955336566 433.864078581287 267.169621596684 -30.7106356344834 360.54297453018 234.339243193367 -16.2349734602342 352.709137914968 234.339243193367 23.7973696518537 443.973687560324 103.017729580102 30.7106356344834 360.54297453018 152.263297185077 16.2349734602341 352.709137914968 168.678486386735 -8.22972951403665 449.318065170136 283.584810798342 -30.7106356344834 360.54297453018 135.848107983418 -23.7973696518536 443.973687560324 250.754432395026 -16.2349734602342 352.709137914968 119.43291878176 30.7106356344834 360.54297453018 267.169621596684 -16.2349734602342 352.709137914968 103.017729580102 -36.7861955336566 433.864078581287 168.678486386735 16.2349734602341 352.709137914968 283.584810798342 -16.2349734602342 352.709137914968 283.584810798342 36.7861955336566 433.864078581287 250.754432395026 23.7973696518537 443.973687560324 135.848107983418 30.7106356344834 360.54297453018 217.924053991709 8.22972951403675 449.318065170136 103.017729580102 41.8583239131264 372.652592093879 152.263297185077 -23.7973696518536 443.973687560324 152.263297185077 30.7106356344834 360.54297453018 119.43291878176 -36.7861955336566 433.864078581287 267.169621596684 23.7973696518537 443.973687560324 119.43291878176 41.8583239131264 372.652592093879 168.678486386735 30.7106356344834 360.54297453018 234.339243193367 8.22972951403675 449.318065170136 168.678486386735 -23.7973696518536 443.973687560324 135.848107983418 41.8583239131264 372.652592093879 135.848107983418 -36.7861955336566 433.864078581287 103.017729580102 48.4700132969665 387.72572564296 103.017729580102 -45.7886663327528 420.084771232649 217.924053991709 16.2349734602341 352.709137914968 283.584810798342 23.7973696518537 443.973687560324 250.754432395026 8.22972951403675 449.318065170136 185.093675588393 30.7106356344834 360.54297453018 217.924053991709 -8.22972951403665 449.318065170136 185.093675588393 -23.7973696518536 443.973687560324 152.263297185077 41.8583239131264 372.652592093879 119.43291878176 48.4700132969665 387.72572564296 152.263297185077 -36.7861955336566 433.864078581287 234.339243193367 16.2349734602341 352.709137914968 119.43291878176 -45.7886663327528 420.084771232649 201.508864790051 30.7106356344834 360.54297453018 267.169621596684 8.22972951403675 449.318065170136 168.678486386735 41.8583239131264 372.652592093879 234.339243193367 -8.22972951403665 449.318065170136 201.508864790051 -23.7973696518536 443.973687560324 135.848107983418 48.4700132969665 387.72572564296 168.678486386735 -36.7861955336566 433.864078581287 103.017729580102 49.8292246503335 404.128967273617 135.848107983418 -45.7886663327528 420.084771232649 283.584810798342 8.22972951403675 449.318065170136 185.093675588393 41.8583239131264 372.652592093879 217.924053991709 -23.7973696518536 443.973687560324 2.73007580752231 190 3.14159265358979 210 2.73492819040754 187.024366020417 2.7474837119525 184.397529800585 2.77062611730711 181.546913604686 2.80448459564326 178.752969008674 2.84452135903044 176.369667096977 2.89092500251957 174.309971315007 2.94492999675158 172.548649956894 3.00237927612647 171.242034340645 3.06388091972185 170.380301086729 3.122373502916 170.023096521915 3.17866510933174 170.086043866562 3.23145479350909 170.509841698291 3.28906434405541 171.398299667707 3.34521005871398 172.743857915231 3.39324766316843 174.347888840505 3.43516921781859 176.192341023654 3.47191925165955 178.295746540249 3.50290053040403 180.640667676887 3.52729664313396 183.205669615023 3.54456948047501 186.059267040101 3.55262000752568 189.05297923185 3.5511452401824 191.895773051283 3.54202385575198 194.48438891673 3.52281744034578 197.343898776281 3.49366089659563 200.13477025801 3.45876817080794 202.522803249016 3.41850512342417 204.599616537762 3.37227391533675 206.410620564223 3.31908716723907 207.946109646233 3.26136014184309 209.086918743382 3.20502207417703 209.747291812357 3.08481357338775 209.797702468142 3.03041585385138 209.215264429107 2.97982054446045 208.306916927762 2.92244240721551 206.788174560315 2.86816612733564 204.754879178687 2.82577961636135 202.602997991452 2.78967029998251 200.14641042884 2.76054039635132 197.364149940715 2.74008093006067 194.262428648985 2.73264036238492 192.165572916192 5.8716684611121 190 6.28318530717959 170 5.87598882340341 187.19152395552 5.88833055967778 184.516885484041 5.9074527029433 182.039994698179 5.93949613715545 179.223163623154 5.98174936926212 176.597079044967 6.0263279675771 174.551494560294 6.07702721219688 172.81733759401 6.1341410212019 171.42920242427 6.19745940274944 170.463556231093 6.23973611320879 170.118264986057 6.28318530717959 100 4.71238898038469 86.6025403784438 4.84988302442822 86.8732667031317 4.9824100965315 87.6235772593243 5.10887970344934 88.7290516622296 5.26433924207639 90.4840004397121 5.43814296926353 92.7428861391894 5.61159756603283 95.0372320329239 5.77244529009577 96.9671604229308 5.92510064538493 98.4525657430886 6.08684189351647 99.5231396908821 6.1841064433386 99.8776181649079 3.14159265358979 100 4.57489493634131 86.8732667031312 4.44236786423814 87.6235772593223 4.31589825732044 88.7290516622257 4.16043871869357 90.484000439705 3.98663499150652 92.7428861391805 3.81318039473733 95.0372320329138 3.65233267034643 96.9671604293251 3.49967731603553 98.4525657314274 3.33793606869753 99.5231396846886 3.24067151591787 99.877618163893 1.5707963267949 86.6025403784439 2.98604321659331 99.6995349038218 2.836168301898 98.8632990204774 2.69385026307151 97.6290200022515 2.55873212415881 96.1384934421685 2.39426299109247 94.0482819113587 2.22181558536708 91.7501087080715 2.06401881848322 89.779880280166 1.89843078523084 88.0845894011336 1.74034205381637 87.0125187464446 1.65639307408664 86.7079714631655 -8.88178419700125e-16 100 0.155549038831779 99.6995364250708 0.30542359275373 98.8633045221148 0.44774130960487 97.6290308111529 0.582859155090544 96.1385098653288 0.747328095775065 94.0483026744097 0.919775053556721 91.7501351704929 1.07757133347658 89.7799093309045 1.24315877151204 88.0846161813635 1.40124690335627 87.0125364098992 1.48519768772147 86.7079761092912 1.84889274661175e-32 170 0.411516846067488 190 0.0568023201262033 170.202464309206 0.111190443861577 170.784931061703 0.161833030143797 171.694405902748 0.219229844709802 173.214340920064 0.273495595887875 175.24816387627 0.315887495176125 177.401364011892 0.351975748365346 179.857848980619 0.381067644864545 182.637652604668 0.40150997985239 185.737201868648 0.408952371081965 187.834463425865 1.84889274661175e-32 210 0.0568023199990197 209.797535684556 0.111190444137581 209.215068935606 0.16183302951732 208.305594113848 0.219229843519676 206.785659117562 0.273495594881989 204.751836168062 0.315887494328895 202.598636037752 0.351975747677605 200.142151074243 0.381067644351949 197.362347455423 0.40150997954739 194.262798195698 0.408952371002272 192.165536607703 1.84889274661175e-32 300 6.28318530717959 300 0.174532925199433 300 0.349065850398866 300 0.523598775598299 300 0.698131700797732 300 0.872664625997165 300 1.0471975511966 300 1.22173047639603 300 1.39626340159546 300 1.5707963267949 300 1.74532925199433 300 1.91986217719376 300 2.0943951023932 300 2.26892802759263 300 2.44346095279206 300 2.61799387799149 300 2.79252680319093 300 2.96705972839036 300 3.14159265358979 300 3.31612557878922 300 3.49065850398866 300 3.66519142918809 300 3.83972435438752 300 4.01425727958696 300 4.18879020478639 300 4.36332312998582 300 4.53785605518525 300 4.71238898038469 300 4.88692190558412 300 5.06145483078355 300 5.23598775598299 300 5.41052068118242 300 5.58505360638185 300 5.75958653158128 300 5.93411945678072 300 6.10865238198015 300 6.28318530717959 210 5.87598882339807 192.808476042752 5.88833055965779 195.483114512722 5.90745270290179 197.960005297371 5.93949613708999 200.776836372029 5.98174936915421 203.402920949326 6.0263279674235 205.448505433598 6.07702721198942 207.182662399942 6.13414102093299 208.570797574629 6.19745940304688 209.536443767991 6.23973611264938 209.881735017624 1.98416378121461 119.43291878176 1.65346981767884 135.848107983418 1.65346981767884 119.43291878176 4.29902152596498 185.093675588393 3.96832756242921 201.508864790051 3.96832756242921 185.093675588393 1.98416378121461 103.017729580102 0.661387927071534 267.169621596684 0.330693963535767 267.169621596684 0.330693963535767 250.754432395026 0.661387927071534 250.754432395026 4.29902152596498 168.678486386735 4.62971548950075 152.263297185077 4.29902152596498 152.263297185077 0.992081890607302 234.339243193367 0.661387927071534 217.924053991709 0.992081890607302 217.924053991709 4.62971548950075 135.848107983418 0.661387927071534 234.339243193367 1.32277585414307 201.508864790051 0.992081890607302 201.508864790051 4.96040945303651 119.43291878176 4.62971548950075 103.017729580102 4.96040945303651 103.017729580102 4.62971548950075 119.43291878176 1.32277585414307 185.093675588393 3.63763359889344 267.169621596684 3.30693963535768 250.754432395026 3.63763359889344 250.754432395026 3.30693963535768 267.169621596684 1.65346981767884 168.678486386735 1.32277585414307 168.678486386735 1.32277585414307 152.263297185077 3.96832756242921 234.339243193367 3.63763359889344 234.339243193367 3.96832756242921 217.924053991709 1.65346981767884 152.263297185077 4.29902152596498 201.508864790051 1.98416378121461 135.848107983418 2.31485774475037 103.017729580102 4.62971548950075 168.678486386735 0.661387927071534 283.584810798342 0.330693963535767 283.584810798342 0.992081890607302 250.754432395026 4.96040945303651 135.848107983418 1.32277585414307 217.924053991709 5.29110341657228 103.017729580102 3.63763359889344 283.584810798342 3.30693963535768 283.584810798342 1.65346981767884 185.093675588393 3.96832756242921 250.754432395026 4.29902152596498 217.924053991709 1.98416378121461 152.263297185077 4.62971548950075 185.093675588393 2.31485774475037 119.43291878176 4.96040945303651 152.263297185077 0.992081890607302 267.169621596684 1.32277585414307 234.339243193367 5.29110341657228 119.43291878176 1.65346981767884 201.508864790051 3.96832756242921 267.169621596684 4.29902152596498 234.339243193367 1.98416378121461 168.678486386735 4.62971548950075 201.508864790051 2.31485774475037 135.848107983418 4.96040945303651 168.678486386735 2.64555170828614 103.017729580102 0.992081890607302 283.584810798342 5.29110341657228 135.848107983418 1.32277585414307 250.754432395026 5.62179738010805 103.017729580102 3.96832756242921 283.584810798342 1.65346981767884 217.924053991709 4.29902152596498 250.754432395026 1.98416378121461 185.093675588393 4.62971548950075 217.924053991709 2.31485774475037 152.263297185077 4.96040945303651 185.093675588393 2.64555170828614 119.43291878176 5.29110341657228 152.263297185077 1.32277585414307 267.169621596684 5.62179738010805 119.43291878176 1.65346981767884 234.339243193367 1.98416378121461 201.508864790051 4.29902152596498 267.169621596684 4.62971548950075 234.339243193367 4.96040945303651 201.508864790051 2.31485774475037 168.678486386735 5.29110341657228 168.678486386735 2.64555170828614 135.848107983418 5.62179738010805 135.848107983418 2.97624567182191 103.017729580102 1.32277585414307 283.584810798342 1.65346981767884 250.754432395026 5.95249134364382 103.017729580102 4.29902152596498 283.584810798342 1.98416378121461 217.924053991709 4.62971548950075 250.754432395026 2.31485774475037 185.093675588393 4.96040945303651 217.924053991709 2.64555170828614 152.263297185077 5.29110341657228 185.093675588393 2.97624567182191 119.43291878176 5.62179738010805 152.263297185077 1.65346981767884 267.169621596684 5.95249134364382 119.43291878176 1.98416378121461 234.339243193367 4.62971548950075 267.169621596684 2.31485774475037 201.508864790051 4.96040945303651 234.339243193367 2.64555170828614 168.678486386735 5.29110341657228 201.508864790051 5.62179738010805 168.678486386735 2.97624567182191 135.848107983418 3.30693963535768 103.017729580102 5.95249134364382 135.848107983418 1.65346981767884 283.584810798342 1.98416378121461 250.754432395026 4.62971548950075 283.584810798342 4.96040945303651 250.754432395026 2.31485774475037 217.924053991709 5.29110341657228 217.924053991709 2.64555170828614 185.093675588393 5.62179738010805 185.093675588393 2.97624567182191 152.263297185077 5.95249134364382 152.263297185077 3.30693963535768 119.43291878176 4.96040945303651 267.169621596684 1.98416378121461 267.169621596684 5.29110341657228 234.339243193367 2.31485774475037 234.339243193367 5.62179738010805 201.508864790051 2.64555170828614 201.508864790051 5.95249134364382 168.678486386735 2.97624567182191 168.678486386735 4.96040945303651 283.584810798342 5.29110341657228 250.754432395026 3.30693963535768 135.848107983418 5.62179738010805 217.924053991709 3.63763359889344 103.017729580102 1.98416378121461 283.584810798342 5.29110341657228 267.169621596684 2.31485774475037 250.754432395026 2.64555170828614 217.924053991709 5.62179738010805 234.339243193367 5.29110341657228 283.584810798342 0.330693963535767 103.017729580102 3.30693963535768 152.263297185077 0.330693963535767 119.43291878176 5.62179738010805 250.754432395026 5.95249134364382 217.924053991709 3.63763359889344 119.43291878176 0.330693963535767 135.848107983418 2.31485774475037 267.169621596684 5.62179738010805 267.169621596684 5.95249134364382 234.339243193367 2.64555170828614 234.339243193367 0.661387927071534 103.017729580102 0.330693963535767 152.263297185077 3.30693963535768 168.678486386735 5.62179738010805 283.584810798342 3.63763359889344 135.848107983418 5.95249134364382 250.754432395026 0.661387927071534 119.43291878176 5.95249134364382 267.169621596684 3.96832756242921 103.017729580102 0.330693963535767 168.678486386735 5.95249134364382 283.584810798342 2.31485774475037 283.584810798342 2.64555170828614 250.754432395026 0.661387927071534 135.848107983418 2.97624567182191 217.924053991709 0.992081890607302 103.017729580102 3.63763359889344 152.263297185077 0.661387927071534 152.263297185077 3.96832756242921 119.43291878176 2.64555170828614 267.169621596684 0.992081890607302 119.43291878176 0.661387927071534 168.678486386735 2.97624567182191 234.339243193367 3.63763359889344 168.678486386735 0.992081890607302 135.848107983418 3.96832756242921 135.848107983418 1.32277585414307 103.017729580102 4.29902152596498 103.017729580102 0.330693963535767 217.924053991709 2.64555170828614 283.584810798342 2.97624567182191 250.754432395026 0.661387927071534 185.093675588393 3.30693963535768 217.924053991709 3.63763359889344 185.093675588393 0.992081890607302 152.263297185077 1.32277585414307 119.43291878176 3.96832756242921 152.263297185077 0.330693963535767 234.339243193367 4.29902152596498 119.43291878176 0.661387927071534 201.508864790051 2.97624567182191 267.169621596684 0.992081890607302 168.678486386735 3.30693963535768 234.339243193367 3.63763359889344 201.508864790051 1.32277585414307 135.848107983418 3.96832756242921 168.678486386735 1.65346981767884 103.017729580102 4.29902152596498 135.848107983418 2.97624567182191 283.584810798342 0.992081890607302 185.093675588393 3.63763359889344 217.924053991709 172 173 174 175 176 177 172 174 178 179 180 181 179 181 182 175 177 183 184 183 185 186 187 188 184 185 189 186 190 187 191 188 192 193 194 195 193 196 194 191 192 197 198 199 200 198 201 199 202 203 204 205 200 206 205 206 207 202 204 208 209 176 175 209 207 176 210 173 172 210 208 173 211 178 85 212 183 184 211 84 83 211 85 84 213 129 128 213 130 129 212 175 183 213 180 179 213 128 214 213 214 180 215 182 190 216 196 193 216 189 196 215 190 186 217 186 188 218 60 61 218 61 62 218 195 60 218 193 195 219 146 145 217 188 191 219 147 146 219 220 201 219 145 220 221 203 202 219 201 198 221 197 203 222 198 200 222 200 205 223 207 209 224 202 208 223 205 207 224 208 210 225 209 175 226 211 83 226 172 178 226 178 211 225 175 212 227 184 189 227 189 216 228 182 215 228 179 182 229 186 217 229 215 186 230 216 193 231 197 221 230 193 218 232 219 198 231 191 197 232 198 222 233 222 205 233 205 223 234 221 202 234 202 224 235 223 209 235 209 225 236 210 172 236 172 226 237 212 184 238 82 81 238 83 82 239 179 228 237 184 227 239 131 130 239 132 131 240 227 216 239 213 179 239 130 213 241 228 215 240 216 230 242 218 62 241 215 229 242 230 218 242 62 63 242 63 64 243 219 232 243 148 147 243 149 148 243 147 219 244 217 191 244 191 231 245 232 222 246 221 234 246 231 221 245 222 233 247 233 223 247 223 235 248 210 236 248 224 210 249 212 237 250 226 83 250 238 81 250 236 226 249 225 212 250 83 238 251 227 240 251 237 227 252 228 241 252 239 228 253 242 64 254 229 217 253 240 230 253 230 242 254 217 244 255 231 246 256 243 232 256 232 245 257 233 247 255 244 231 257 245 233 258 235 225 259 224 248 259 234 224 258 225 249 260 237 251 261 236 250 261 248 236 260 249 237 262 251 240 263 80 68 263 81 80 264 132 239 264 133 132 264 134 133 264 239 252 262 240 253 265 241 229 266 64 65 266 65 66 265 229 254 267 150 149 268 244 255 267 151 150 267 243 256 267 149 243 269 256 245 269 245 257 268 254 244 270 246 234 270 234 259 271 235 258 272 8 7 271 247 235 272 259 248 273 258 249 272 248 261 273 249 260 274 250 81 275 251 262 274 263 68 274 261 250 274 81 263 276 252 241 275 260 251 276 241 265 277 253 64 277 64 266 277 266 66 277 66 67 278 254 268 279 267 256 278 265 254 280 255 246 279 256 269 281 247 271 281 257 247 280 246 270 282 6 5 283 271 258 282 7 6 283 258 273 282 270 259 282 259 272 282 272 7 284 273 260 284 260 275 284 48 47 285 261 274 285 272 261 286 77 76 286 78 77 287 45 55 288 135 134 287 253 277 287 56 45 288 134 264 288 264 252 287 67 56 288 252 276 287 277 67 287 262 253 289 276 265 290 151 267 290 267 279 290 152 151 289 265 278 291 269 257 292 268 255 291 257 281 293 271 283 292 255 280 294 3 1 293 281 271 294 4 3 294 5 4 294 282 5 294 1 43 294 280 270 295 46 44 294 270 282 295 47 46 295 273 284 295 284 47 296 12 11 295 283 273 296 8 272 296 272 285 297 53 52 297 54 53 297 55 54 297 275 262 298 274 68 297 287 55 297 262 287 298 68 78 298 285 274 298 286 76 298 78 286 299 279 269 300 276 289 299 269 291 301 281 293 300 288 276 302 268 292 301 291 281 303 44 162 303 162 163 303 163 164 302 278 268 303 293 283 303 295 44 304 41 40 303 283 295 304 42 41 304 43 42 305 284 275 304 292 280 305 49 48 304 280 294 305 50 49 305 51 50 304 294 43 305 52 51 306 9 8 305 297 52 306 10 9 305 48 284 306 11 10 305 275 297 306 8 296 307 153 152 306 296 11 307 154 153 307 279 299 307 290 279 307 152 290 308 299 291 308 291 301 309 296 285 309 285 298 310 293 303 310 301 293 311 75 74 311 76 75 312 288 300 312 135 288 312 136 135 312 137 136 310 303 164 313 307 299 314 278 302 313 299 308 314 289 278 315 292 304 316 301 310 315 39 38 316 308 301 315 40 39 317 307 313 315 302 292 317 154 307 315 304 40 318 91 92 317 155 154 319 13 12 318 92 93 317 156 155 319 14 13 319 296 309 320 91 318 321 308 316 320 318 93 319 12 296 321 313 308 320 90 91 322 164 165 323 76 311 322 165 166 323 311 74 322 166 167 322 167 168 324 103 101 322 168 169 323 298 76 322 310 164 325 289 314 326 313 321 326 317 313 325 300 289 324 90 320 324 101 90 327 322 169 328 302 315 327 310 322 329 93 94 329 94 95 327 169 170 328 314 302 330 104 103 327 170 171 331 15 14 330 105 104 327 171 161 331 16 15 330 106 105 327 316 310 331 17 16 332 156 317 331 319 17 331 14 319 332 157 156 332 158 157 333 309 298 332 317 326 330 103 324 334 327 161 333 298 323 335 320 93 334 316 327 334 161 125 335 93 329 334 321 316 336 326 321 336 334 125 337 73 72 337 74 73 338 107 106 336 321 334 338 108 107 339 332 326 338 109 108 339 326 336 340 137 312 338 110 109 339 158 332 339 336 125 340 138 137 338 106 330 339 159 158 340 300 325 339 160 159 340 139 138 339 125 160 340 312 300 341 325 314 342 324 320 342 320 335 341 314 328 343 328 315 343 315 38 343 34 2 343 35 34 343 36 35 343 37 36 343 38 37 344 329 95 344 95 96 345 319 309 344 96 97 345 18 17 346 330 324 345 17 319 345 309 333 346 324 342 347 333 323 347 74 337 347 323 74 348 340 325 349 329 344 349 335 329 350 111 110 348 325 341 351 328 343 351 343 2 351 341 328 350 330 346 350 338 330 350 110 338 352 18 345 352 19 18 353 335 349 352 20 19 352 21 20 353 342 335 354 333 347 355 344 97 355 349 344 354 345 333 355 97 98 355 98 99 356 337 72 355 99 100 357 116 117 357 117 118 356 71 70 357 118 119 356 72 71 357 119 120 356 347 337 357 120 121 358 140 139 358 141 140 358 139 340 358 340 348 359 341 351 360 112 111 360 102 112 359 348 341 360 123 102 360 111 350 361 30 29 361 31 30 361 32 31 361 33 32 361 2 33 362 22 21 363 346 342 362 23 22 362 24 23 362 21 352 363 342 353 364 349 355 364 353 349 365 345 354 366 113 114 366 114 115 366 115 116 365 352 345 367 347 356 367 354 347 366 116 357 368 121 122 368 122 123 368 123 360 369 358 348 369 348 359 370 346 363 371 351 2 371 2 361 371 359 351 370 350 346 372 25 24 372 26 25 373 353 364 372 27 26 373 363 353 372 24 362 374 362 352 375 88 87 375 89 88 375 79 89 375 355 100 374 352 365 375 100 79 181 124 113 181 113 366 376 365 354 376 354 367 194 367 356 194 57 58 187 121 368 187 357 121 194 69 57 194 70 69 194 356 70 377 142 141 377 143 142 377 141 358 378 350 370 377 358 369 378 360 350 199 359 371 204 370 363 199 369 359 204 363 373 379 28 27 379 29 28 174 364 355 174 355 375 379 27 372 379 361 29 177 362 374 177 372 362 180 124 181 185 365 376 185 374 365 190 357 187 190 366 357 192 368 360 196 376 367 196 367 194 192 360 378 192 187 368 201 377 369 201 369 199 203 378 370 203 370 204 173 364 174 206 361 379 173 373 364 206 371 361 176 372 177 178 375 87 178 86 85 178 174 375 176 379 372 178 87 86 214 126 124 214 127 126 214 128 127 214 124 180 183 374 185 182 181 366 183 177 374 189 376 196 182 366 190 188 187 192 189 185 376 195 58 59 195 59 60 195 194 58 220 143 377 220 144 143 220 145 144 220 377 201 200 371 206 197 192 378 200 199 371 197 378 203 208 373 173 207 379 176 207 206 379 208 204 373 
+37 36 1 0
+100 -2.44921270764475e-14 0 98.4807753012208 17.364817766693 0 93.9692620785908 34.2020143325669 0 86.6025403784439 50 0 76.6044443118978 64.2787609686539 0 64.2787609686539 76.6044443118978 0 50 86.6025403784439 0 34.2020143325669 93.9692620785908 0 17.364817766693 98.4807753012208 0 6.12303176911189e-15 100 0 -17.364817766693 98.4807753012208 0 -34.2020143325669 93.9692620785908 0 -50 86.6025403784439 0 -64.2787609686539 76.6044443118978 0 -76.6044443118978 64.278760968654 0 -86.6025403784438 50.0000000000001 0 -93.9692620785908 34.202014332567 0 -98.4807753012208 17.3648177666932 0 -100 1.45472826493243e-13 0 -98.4807753012208 -17.3648177666929 0 -93.9692620785909 -34.2020143325667 0 -86.602540378444 -49.9999999999998 0 -76.604444311898 -64.2787609686538 0 -64.2787609686541 -76.6044443118977 0 -50.0000000000002 -86.6025403784437 0 -34.2020143325671 -93.9692620785908 0 -17.3648177666933 -98.4807753012208 0 -2.84822621217373e-13 -100 0 17.3648177666927 -98.4807753012209 0 34.2020143325666 -93.969262078591 0 49.9999999999997 -86.602540378444 0 64.2787609686536 -76.604444311898 0 76.6044443118976 -64.2787609686542 0 86.6025403784437 -50.0000000000004 0 93.9692620785907 -34.2020143325673 0 98.4807753012207 -17.3648177666935 0 0 0 0 100 -2.8421709430404e-14 98.4807753012208 17.364817766693 93.9692620785908 34.2020143325669 86.6025403784439 50 76.6044443118978 64.2787609686539 64.278760968654 76.6044443118978 50 86.6025403784438 34.2020143325669 93.9692620785908 17.364817766693 98.4807753012208 0 100 -17.364817766693 98.4807753012208 -34.2020143325669 93.9692620785908 -50 86.6025403784439 -64.2787609686539 76.6044443118979 -76.6044443118978 64.278760968654 -86.6025403784438 50.0000000000001 -93.9692620785908 34.202014332567 -98.4807753012208 17.3648177666932 -100 1.4210854715202e-13 -98.4807753012208 -17.3648177666929 -93.9692620785909 -34.2020143325667 -86.602540378444 -49.9999999999998 -76.604444311898 -64.2787609686538 -64.2787609686541 -76.6044443118977 -50.0000000000002 -86.6025403784437 -34.2020143325671 -93.9692620785908 -17.3648177666933 -98.4807753012208 -2.8421709430404e-13 -100 17.3648177666927 -98.4807753012209 34.2020143325666 -93.969262078591 49.9999999999997 -86.602540378444 64.2787609686536 -76.604444311898 76.6044443118976 -64.2787609686542 86.6025403784437 -50.0000000000004 93.9692620785907 -34.2020143325673 98.4807753012207 -17.3648177666935 0 0 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 
+81 79 1 0.08806932591171
+210 -4.89842541528951e-15 450 190 20 445.825756949558 209.797702468142 2.83742874189979 449.91942504134 209.215264429107 5.5473956609573 449.69131111379 208.306916927762 8.05337150161281 449.347170220943 206.788174560315 10.8700135987294 448.804126907314 204.754879178687 13.5016125308194 448.142563877523 202.602997991452 15.5294700803301 447.527208622277 200.14641042884 17.2351489960208 446.935590404877 197.364149940715 18.5948729149583 446.413690924525 194.262428648985 19.5405143016412 446.023562404914 192.165572916192 19.8824116982837 445.876897309791 210 -4.89842541528951e-15 580 210 -4.89842541528951e-15 580 209.696155060244 3.47296355333861 580 208.793852415718 6.84040286651337 580 207.320508075689 10 580 205.32088886238 12.8557521937308 580 202.855752193731 15.3208888623796 580 200 17.3205080756888 580 196.840402866513 18.7938524157182 580 193.472963553339 19.6961550602442 580 190 20 580 186.527036446661 19.6961550602442 580 183.159597133487 18.7938524157182 580 180 17.3205080756888 580 177.144247806269 15.3208888623796 580 174.67911113762 12.8557521937308 580 172.679491924311 10 580 171.206147584282 6.84040286651339 580 170.303844939756 3.47296355333863 580 170 2.90945652986485e-14 580 170.303844939756 -3.47296355333857 580 171.206147584282 -6.84040286651334 580 172.679491924311 -9.99999999999996 580 174.67911113762 -12.8557521937308 580 177.144247806269 -15.3208888623795 580 180 -17.3205080756887 580 183.159597133487 -18.7938524157181 580 186.527036446661 -19.6961550602442 580 190 -20 580 193.472963553339 -19.6961550602442 580 196.840402866513 -18.7938524157182 580 200 -17.3205080756888 580 202.855752193731 -15.3208888623796 580 205.32088886238 -12.8557521937308 580 207.320508075689 -10.0000000000001 580 208.793852415718 -6.84040286651346 580 209.696155060244 -3.4729635533387 580 210 -4.89842541528951e-15 450 187.024366020417 19.7774012963438 445.922264725258 184.397529800585 19.1992796277918 446.166954243274 181.546913604686 18.125819553687 446.59886977596 178.752969008674 16.5379654738046 447.185757348038 176.369667096977 14.6360522075901 447.809894135463 174.309971315007 12.4025399755702 448.437351320804 172.548649956894 9.76987059841766 449.036207207027 171.242034340645 6.93820726756652 449.51627283167 170.380301086729 3.88167696084131 449.849098129506 170.023096521915 0.960898368304993 449.990765883617 170.086043866562 -1.8531982436549 449.965644740411 170.509841698291 -4.48706231247217 449.798255709213 171.398299667707 -7.34688690845968 449.457287186436 172.743857915231 -10.1106660571351 448.967075069423 174.347888840505 -12.4503589683746 448.425082205426 176.192341023654 -14.4688795692552 447.86074933687 178.295746540249 -16.2176006194872 447.296825505482 180.640667676887 -17.6748961416399 446.7717611852 183.205669615023 -18.8105768661047 446.326693427354 186.059267040101 -19.6079226714758 445.994884340429 189.05297923185 -19.9775663053321 445.835541404226 191.895773051283 -19.9099477889329 445.864953696004 194.48438891673 -19.4907734771899 446.044649514275 197.343898776281 -18.6028803528253 446.410482031254 200.13477025801 -17.2419961803721 446.933075375945 202.522803249016 -15.5942105252608 447.506005983989 204.599616537762 -13.6693524360872 448.095205754853 206.410620564223 -11.4320396201158 448.675542899776 207.946109646233 -8.82820037172931 449.214457777936 209.086918743382 -5.97406825644437 449.641821815127 209.747291812357 -3.16934437217016 449.899454557652 0 70 1.5707963267949 65.8257569495584 0.142351747122082 69.9194250413404 0.281055375999813 69.6913111137899 0.414430358933343 69.347170220943 0.57460191467716 68.8041269073138 0.74107398002479 68.1425638775227 0.889050078939067 67.5272086222772 1.03872370599815 66.9355904048767 1.19371599529568 66.4136909245251 1.35602764574802 66.0235624049143 1.46230497436568 65.8768973097914 0 200 6.28318530717959 200 0.174532925199433 200 0.349065850398866 200 0.523598775598299 200 0.698131700797732 200 0.872664625997165 200 1.0471975511966 200 1.22173047639603 200 1.39626340159546 200 1.5707963267949 200 1.74532925199433 200 1.91986217719376 200 2.0943951023932 200 2.26892802759263 200 2.44346095279206 200 2.61799387799149 200 2.79252680319093 200 2.96705972839036 200 3.14159265358979 200 3.31612557878922 200 3.49065850398866 200 3.66519142918809 200 3.83972435438752 200 4.01425727958696 200 4.18879020478639 200 4.36332312998582 200 4.53785605518525 200 4.71238898038469 200 4.88692190558412 200 5.06145483078355 200 5.23598775598299 200 5.41052068118242 200 5.58505360638185 200 5.75958653158128 200 5.93411945678072 200 6.10865238198015 200 6.28318530717959 70 1.72013247146725 65.9222647252579 1.85471909915631 66.1669542432741 2.00716842603721 66.5988697759599 2.1680232039098 67.1857573480384 2.32062944411443 67.8098941354628 2.47268807187481 68.4373513208037 2.63123021656973 69.0362072070267 2.78731777911728 69.5162728316698 2.94626920198406 69.8490981295058 3.09352922962378 69.9907658836172 3.23438566536289 69.965644740411 3.36787183147278 69.7982557092127 3.51774477754683 69.4572871864363 3.67159260869899 68.9670750694232 3.81354864144537 68.4250822054262 3.95037073077329 67.8607493368701 4.08724665603431 67.2968255054819 4.22540029705421 66.7717611852004 4.3657735702699 66.3266934273543 4.5140545776344 65.9948843404291 4.66502022222132 65.8355414042262 4.8073201484896 65.864953696004 4.93853099433839 66.0446495142749 5.08838047165455 66.4104820312536 5.24378635980383 66.9330753759453 5.38898193691902 67.5060059839887 5.53068286483151 68.0952057548532 5.67472839418684 68.6755428997765 5.82601583894822 69.2144577779357 5.97985154473146 69.6418218151269 6.12404711892915 69.8994545576524 13 1 3 15 3 4 15 13 3 16 4 5 16 15 4 17 5 6 17 16 5 18 6 7 18 17 6 19 7 8 19 18 7 20 8 9 20 19 8 21 9 10 21 10 11 21 20 9 22 11 12 22 21 11 23 12 2 23 2 51 23 22 12 24 23 51 24 51 52 25 24 52 25 52 53 26 25 53 26 53 54 27 26 54 27 54 55 28 55 56 28 56 57 28 27 55 29 28 57 29 57 58 30 58 59 30 29 58 31 30 59 31 59 60 32 60 61 32 31 60 33 61 62 33 32 61 34 62 63 34 33 62 35 63 64 35 34 63 36 64 65 36 65 66 36 35 64 37 66 67 37 36 66 38 67 68 38 37 67 39 38 68 39 68 69 40 39 69 40 69 70 40 70 71 41 71 72 41 40 71 42 41 72 42 72 73 43 42 73 43 73 74 43 74 75 44 43 75 44 75 76 45 44 76 45 76 77 46 45 77 46 77 78 47 46 78 47 78 79 48 47 79 48 79 80 49 48 80 49 80 81 14 49 81 14 81 50 
+82 80 1 0.0850572428380306
+190 -20 354.174243050442 210 -8.57224447675664e-15 350 192.808476042752 -19.8018301996066 354.088263569143 195.483114512722 -19.2337057459418 353.847377731445 197.960005297371 -18.3477062907747 353.48804794237 200.776836372029 -16.8481398619274 352.924101795035 203.402920949326 -14.8445852749198 352.254442217558 205.448505433598 -12.7021126053398 351.640343989945 207.182662399942 -10.2350434472155 351.058771099956 208.570797574629 -7.42465408034023 350.554327671456 209.536443767991 -4.28104718451168 350.183610770056 209.881735017624 -2.17177625553873 350.047188395291 210 -4.89842541528951e-15 220 210 -4.89842541528951e-15 220 209.696155060244 3.47296355333861 220 208.793852415718 6.84040286651337 220 207.320508075689 10 220 205.32088886238 12.8557521937308 220 202.855752193731 15.3208888623796 220 200 17.3205080756888 220 196.840402866513 18.7938524157182 220 193.472963553339 19.6961550602442 220 190 20 220 186.527036446661 19.6961550602442 220 183.159597133487 18.7938524157182 220 180 17.3205080756888 220 177.144247806269 15.3208888623796 220 174.67911113762 12.8557521937308 220 172.679491924311 10 220 171.206147584282 6.84040286651339 220 170.303844939756 3.47296355333863 220 170 2.90945652986485e-14 220 170.303844939756 -3.47296355333857 220 171.206147584282 -6.84040286651334 220 172.679491924311 -9.99999999999996 220 174.67911113762 -12.8557521937308 220 177.144247806269 -15.3208888623795 220 180 -17.3205080756887 220 183.159597133487 -18.7938524157181 220 186.527036446661 -19.6961550602442 220 190 -20 220 193.472963553339 -19.6961550602442 220 196.840402866513 -18.7938524157182 220 200 -17.3205080756888 220 202.855752193731 -15.3208888623796 220 205.32088886238 -12.8557521937308 220 207.320508075689 -10.0000000000001 220 208.793852415718 -6.84040286651346 220 209.696155060244 -3.4729635533387 220 210 -8.57224447675664e-15 350 190 20 354.174243050442 209.797535684556 2.83858895721841 350.080640928023 209.215068935606 5.54807361321558 350.308764554953 208.305594113848 8.05637773956749 350.653320488076 206.785659117562 10.8738982275306 351.196738404482 204.751836168062 13.5049376384928 351.858368701347 202.598636037752 15.5330087758858 352.473947824842 200.142151074243 17.2376548931651 353.065330153674 197.362347455423 18.5955871959507 353.586595046112 194.262798195698 19.5404341226978 353.976403384948 192.165536607703 19.8824152857648 354.123104386169 170 -1.22460635382238e-14 350 170.202464309206 2.83858896354278 350.080640925493 170.784931061703 5.54807359953334 350.308764553975 171.694405902748 8.05637777047583 350.653320494305 173.214340920064 10.8738982856126 351.196738417424 175.24816387627 13.5049376869178 351.858368714932 177.401364011892 15.5330088161513 352.473947838002 179.857848980619 17.237654925444 353.065330165529 182.637652604668 18.5955872197421 353.586595055644 185.737201868648 19.5404341367349 353.976403390908 187.834463425865 19.8824152894209 354.123104387754 187.19152395552 -19.8018301993616 354.088263569037 184.516885484041 -19.2337057450191 353.84737773106 182.039994698179 -18.347706288844 353.488047941608 179.223163623154 -16.8481398588458 352.924101793932 176.597079044967 -14.8445852697679 352.254442215956 174.551494560294 -12.7021125979118 351.640343987994 172.81733759401 -10.2350434370622 351.058771097833 171.42920242427 -7.42465406707688 350.554327671198 170.463556231093 -4.28104719934824 350.183610769691 170.118264986057 -2.17177622757773 350.047188396748 4.71238898038469 134.174243050442 6.28318530717959 130 4.85327844788595 134.088263569143 4.99010063715277 133.847377731445 5.12172498674817 133.48804794237 5.28145061948999 132.924101795035 5.44679451827606 132.254442217558 5.59504002539476 131.640343989945 5.74596228873161 131.058771099956 5.90284904650619 130.554327671456 6.0674637066173 130.183610770056 6.1743819504377 130.047188395291 6.28318530717959 0 0 0 0.174532925199433 0 0.349065850398866 0 0.523598775598299 0 0.698131700797732 0 0.872664625997165 0 1.0471975511966 0 1.22173047639603 0 1.39626340159546 0 1.5707963267949 0 1.74532925199433 0 1.91986217719376 0 2.0943951023932 0 2.26892802759263 0 2.44346095279206 0 2.61799387799149 0 2.79252680319093 0 2.96705972839036 0 3.14159265358979 0 3.31612557878922 0 3.49065850398866 0 3.66519142918809 0 3.83972435438752 0 4.01425727958696 0 4.18879020478639 0 4.36332312998582 0 4.53785605518525 0 4.71238898038469 0 4.88692190558412 0 5.06145483078355 0 5.23598775598299 0 5.41052068118242 0 5.58505360638185 0 5.75958653158128 0 5.93411945678072 0 6.10865238198015 0 0 130 1.5707963267949 134.174243050442 0.142410335941526 130.080640928023 0.281090663049982 130.308764554953 0.414594571639405 130.653320488076 0.574833310501752 131.196738404482 0.741299351798358 131.858368701347 0.889330920856856 132.473947824842 1.03897085878836 133.065330153674 1.19381290142985 133.586595046112 1.35600871415747 133.976403384948 1.46230681760685 134.123104386169 3.14159265358979 130 2.99918231731974 130.080640925493 2.86050199126434 130.308764553975 2.72699808025909 130.653320494305 2.56675933962782 131.196738417424 2.4002932985088 131.858368714932 2.25226172953692 132.473947838002 2.10262179161877 133.065330165529 1.94777974892844 133.586595055644 1.78558393613939 133.976403390908 1.67928583429461 134.123104387754 4.57149951279621 134.088263569037 4.43467732344834 133.847377731061 4.30305297377866 133.488047941608 4.14332734099344 132.924101793932 3.97798344210894 132.254442215957 3.8297379348938 131.640343987994 3.67881567144687 131.058771097833 3.52192891353577 130.554327671198 3.35731425490409 130.183610769691 3.25039600893176 130.047188396748 52 14 15 52 50 14 53 15 16 53 52 15 54 53 16 54 16 17 55 17 18 55 54 17 56 55 18 56 18 19 57 56 19 57 19 20 58 20 21 58 57 20 59 58 21 60 21 22 60 59 21 61 22 23 61 60 22 51 61 23 72 23 24 72 51 23 71 24 25 71 72 24 70 71 25 69 25 26 69 70 25 68 26 27 68 69 26 67 27 28 67 68 27 66 28 29 66 67 28 65 29 30 65 66 29 64 30 31 64 65 30 63 31 32 63 64 31 62 63 32 82 32 33 82 62 32 81 33 34 81 82 33 80 34 35 80 81 34 79 35 36 79 80 35 78 36 37 78 79 36 77 78 37 76 37 38 76 77 37 75 76 38 75 38 39 74 75 39 74 39 40 73 74 40 73 40 41 1 73 41 3 1 41 3 41 42 4 3 42 4 42 43 5 4 43 5 43 44 6 5 44 6 44 45 7 6 45 8 7 45 8 45 46 9 8 46 9 46 47 10 9 47 10 47 48 11 10 48 11 48 49 12 11 49 12 49 13 2 12 13 
+37 36 1 0
+50 -1.22460635382238e-14 300 49.2403876506104 8.68240888334652 300 46.9846310392954 17.1010071662834 300 43.3012701892219 25 300 38.3022221559489 32.139380484327 300 32.139380484327 38.3022221559489 300 25 43.3012701892219 300 17.1010071662834 46.9846310392954 300 8.68240888334654 49.2403876506104 300 -2.35367281220533e-14 50 300 -8.68240888334653 49.2403876506104 300 -17.1010071662834 46.9846310392954 300 -25 43.3012701892219 300 -32.1393804843269 38.3022221559489 300 -38.3022221559489 32.139380484327 300 -43.3012701892219 25 300 -46.9846310392954 17.1010071662835 300 -49.2403876506104 8.68240888334658 300 -50 7.27364132466213e-14 300 -49.2403876506104 -8.68240888334644 300 -46.9846310392955 -17.1010071662833 300 -43.301270189222 -24.9999999999999 300 -38.3022221559489 -32.1393804843269 300 -32.1393804843271 -38.3022221559488 300 -25.0000000000001 -43.3012701892219 300 -17.1010071662835 -46.9846310392954 300 -8.68240888334665 -49.2403876506104 300 -1.37223565843669e-13 -50 300 8.68240888334637 -49.2403876506104 300 17.1010071662833 -46.9846310392955 300 24.9999999999999 -43.301270189222 300 32.1393804843268 -38.302222155949 300 38.3022221559488 -32.1393804843271 300 43.3012701892218 -25.0000000000002 300 46.9846310392954 -17.1010071662836 300 49.2403876506104 -8.68240888334674 300 -2.35367281220533e-14 0 300 50 0 49.2403876506104 8.68240888334652 46.9846310392954 17.1010071662834 43.3012701892219 25 38.3022221559489 32.139380484327 32.139380484327 38.3022221559489 25 43.3012701892219 17.1010071662834 46.9846310392954 8.68240888334652 49.2403876506104 0 50 -8.68240888334651 49.2403876506104 -17.1010071662834 46.9846310392954 -25 43.3012701892219 -32.1393804843269 38.3022221559489 -38.3022221559489 32.139380484327 -43.3012701892219 25 -46.9846310392954 17.1010071662835 -49.2403876506104 8.68240888334658 -50 7.105427357601e-14 -49.2403876506104 -8.68240888334644 -46.9846310392955 -17.1010071662834 -43.301270189222 -24.9999999999999 -38.302222155949 -32.1393804843269 -32.139380484327 -38.3022221559488 -25.0000000000001 -43.3012701892219 -17.1010071662836 -46.9846310392954 -8.68240888334665 -49.2403876506104 -1.4210854715202e-13 -50 8.68240888334637 -49.2403876506104 17.1010071662833 -46.9846310392955 24.9999999999999 -43.301270189222 32.1393804843268 -38.302222155949 38.3022221559488 -32.1393804843271 43.3012701892218 -25.0000000000002 46.9846310392954 -17.1010071662836 49.2403876506104 -8.68240888334674 0 0 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 
+37 36 1 0
+20 -4.89842541528951e-15 200 19.6961550602442 3.47296355333861 200 18.7938524157182 6.84040286651337 200 17.3205080756888 10 200 15.3208888623795 12.8557521937308 200 12.8557521937308 15.3208888623796 200 10 17.3205080756888 200 6.84040286651339 18.7938524157182 200 3.47296355333862 19.6961550602442 200 0 20 200 -3.47296355333862 19.6961550602442 200 -6.84040286651339 18.7938524157182 200 -10 17.3205080756888 200 -12.8557521937308 15.3208888623796 200 -15.3208888623795 12.8557521937308 200 -17.3205080756888 10 200 -18.7938524157182 6.84040286651339 200 -19.6961550602442 3.47296355333863 200 -20 2.90945652986485e-14 200 -19.6961550602442 -3.47296355333857 200 -18.7938524157182 -6.84040286651334 200 -17.3205080756888 -9.99999999999996 200 -15.3208888623796 -12.8557521937308 200 -12.8557521937308 -15.3208888623795 200 -10 -17.3205080756887 200 -6.84040286651341 -18.7938524157181 200 -3.47296355333867 -19.6961550602442 200 -5.6843418860808e-14 -20 200 3.47296355333856 -19.6961550602442 200 6.8404028665133 -18.7938524157182 200 9.99999999999994 -17.3205080756888 200 12.8557521937307 -15.3208888623796 200 15.3208888623795 -12.8557521937308 200 17.3205080756887 -10.0000000000001 200 18.7938524157181 -6.84040286651346 200 19.6961550602441 -3.4729635533387 200 0 0 200 20 0 19.6961550602442 3.47296355333861 18.7938524157182 6.84040286651337 17.3205080756888 10 15.3208888623796 12.8557521937308 12.8557521937308 15.3208888623796 10 17.3205080756888 6.84040286651338 18.7938524157182 3.47296355333861 19.6961550602442 0 20 -3.47296355333861 19.6961550602442 -6.84040286651337 18.7938524157182 -10 17.3205080756888 -12.8557521937308 15.3208888623796 -15.3208888623796 12.8557521937308 -17.3205080756888 10 -18.7938524157182 6.84040286651339 -19.6961550602442 3.47296355333863 -20 2.8421709430404e-14 -19.6961550602442 -3.47296355333857 -18.7938524157182 -6.84040286651334 -17.3205080756888 -9.99999999999996 -15.3208888623796 -12.8557521937308 -12.8557521937308 -15.3208888623795 -10 -17.3205080756887 -6.84040286651342 -18.7938524157181 -3.47296355333866 -19.6961550602442 -5.6843418860808e-14 -20 3.47296355333854 -19.6961550602442 6.84040286651332 -18.7938524157182 9.99999999999994 -17.3205080756888 12.8557521937307 -15.3208888623796 15.3208888623795 -12.8557521937308 17.3205080756887 -10.0000000000001 18.7938524157181 -6.84040286651346 19.6961550602441 -3.47296355333869 0 0 37 15 16 37 16 17 37 17 18 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 
+37 36 1 0
+20 -4.89842541528951e-15 0 19.6961550602442 3.47296355333861 0 18.7938524157182 6.84040286651337 0 17.3205080756888 10 0 15.3208888623795 12.8557521937308 0 12.8557521937308 15.3208888623796 0 10 17.3205080756888 0 6.84040286651339 18.7938524157182 0 3.47296355333862 19.6961550602442 0 0 20 0 -3.47296355333862 19.6961550602442 0 -6.84040286651339 18.7938524157182 0 -10 17.3205080756888 0 -12.8557521937308 15.3208888623796 0 -15.3208888623795 12.8557521937308 0 -17.3205080756888 10 0 -18.7938524157182 6.84040286651339 0 -19.6961550602442 3.47296355333863 0 -20 2.90945652986485e-14 0 -19.6961550602442 -3.47296355333857 0 -18.7938524157182 -6.84040286651334 0 -17.3205080756888 -9.99999999999996 0 -15.3208888623796 -12.8557521937308 0 -12.8557521937308 -15.3208888623795 0 -10 -17.3205080756887 0 -6.84040286651341 -18.7938524157181 0 -3.47296355333867 -19.6961550602442 0 -5.6843418860808e-14 -20 0 3.47296355333856 -19.6961550602442 0 6.8404028665133 -18.7938524157182 0 9.99999999999994 -17.3205080756888 0 12.8557521937307 -15.3208888623796 0 15.3208888623795 -12.8557521937308 0 17.3205080756887 -10.0000000000001 0 18.7938524157181 -6.84040286651346 0 19.6961550602441 -3.4729635533387 0 0 0 0 20 -3.5527136788005e-15 19.6961550602442 3.47296355333861 18.7938524157182 6.84040286651337 17.3205080756888 10 15.3208888623796 12.8557521937308 12.8557521937308 15.3208888623796 10 17.3205080756888 6.84040286651338 18.7938524157182 3.47296355333861 19.6961550602442 0 20 -3.47296355333861 19.6961550602442 -6.84040286651337 18.7938524157182 -10 17.3205080756888 -12.8557521937308 15.3208888623796 -15.3208888623796 12.8557521937308 -17.3205080756888 10 -18.7938524157182 6.84040286651339 -19.6961550602442 3.47296355333863 -20 2.8421709430404e-14 -19.6961550602442 -3.47296355333857 -18.7938524157182 -6.84040286651334 -17.3205080756888 -9.99999999999996 -15.3208888623796 -12.8557521937308 -12.8557521937308 -15.3208888623795 -10 -17.3205080756887 -6.84040286651342 -18.7938524157181 -3.47296355333866 -19.6961550602442 -5.6843418860808e-14 -20 3.47296355333854 -19.6961550602442 6.84040286651332 -18.7938524157182 9.99999999999994 -17.3205080756888 12.8557521937307 -15.3208888623796 15.3208888623795 -12.8557521937308 17.3205080756887 -10.0000000000001 18.7938524157181 -6.84040286651346 19.6961550602441 -3.47296355333869 0 0 37 18 19 37 19 20 37 20 21 37 21 22 37 22 23 37 23 24 37 24 25 37 25 26 37 26 27 37 27 28 37 28 29 37 29 30 37 30 31 37 31 32 37 32 33 37 33 34 37 34 35 37 35 36 37 36 1 37 1 2 37 2 3 37 3 4 37 4 5 37 5 6 37 6 7 37 7 8 37 8 9 37 9 10 37 10 11 37 11 12 37 12 13 37 13 14 37 14 15 37 15 16 37 16 17 37 17 18 
+
+TShapes 57
+Ve
+1e-07
+100 -2.44921270764475e-14 800
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 6.28318530717959
+2  1 2 0 0 6.28318530717959
+2  2 1 0 0 6.28318530717959
+6  1 2 0
+6  2 1 0
+0
+
+0101100
++57 0 -57 0 *
+Wi
+
+0101000
++56 0 *
+Fa
+0  1e-07 1 0
+2  1
+0101000
++55 0 *
+Ve
+3.77011308578173e-06
+86.6025403784438 -50 400
+0 0
+
+0101101
+*
+Ve
+3.77011308578173e-06
+100 -1.83690953073357e-14 350
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  2 0 0 1
+2  3 2 0 0 1
+2  4 3 1 0 1
+6  3 2 0
+6  4 3 0
+0
+
+0101000
++53 0 -52 0 *
+Ve
+1e-07
+100 -2.44921270764475e-14 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 350
+3  5 6CN 2 0 0 350
+7  5 6 2 0
+0
+
+0101000
++50 0 -52 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 6.28318530717959
+2  7 2 0 0 6.28318530717959
+2  8 4 0 0 6.28318530717959
+6  7 2 0
+6  8 4 0
+0
+
+0101100
++50 0 -50 0 *
+Ve
+3.77011308578173e-06
+86.6025403784439 50 400
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  5 0 0 1
+2  9 2 0 0 1
+2  10 3 1 0 1
+6  9 2 0
+6  10 3 0
+0
+
+0101000
++52 0 -47 0 *
+Ve
+3.77011308578173e-06
+100 -2.44921270764475e-14 450
+0 0
+
+0101101
+*
+Ed
+ 3.77011308578173e-06 1 1 0
+1  6 0 0 1
+2  11 2 0 0 1
+2  12 3 1 0 1
+6  11 2 0
+6  12 3 0
+0
+
+0101000
++45 0 -47 0 *
+Ed
+ 1e-07 1 1 0
+1  3 0 450 800
+3  5 6CN 2 0 450 800
+7  13 14 2 0
+0
+
+0101000
++45 0 -57 0 *
+Ed
+ 3.77011308578173e-06 1 1 0
+1  7 0 0 1
+2  13 2 0 0 1
+2  14 3 1 0 1
+6  15 2 0
+6  16 3 0
+0
+
+0101000
++53 0 -45 0 *
+Wi
+
+0101000
+-51 0 +49 0 +48 0 -49 0 -46 0 +44 0 -43 0 -56 0 +43 0 +42 0 
+*
+Fa
+0  1e-07 2 0
+2  2
+0101000
++41 0 *
+Ve
+7.99539616382488e-05
+190 20 445.825756949558
+0 0
+
+0101101
+*
+Ve
+7.99539616382488e-05
+210 -4.89842541528951e-15 450
+0 0
+
+0101101
+*
+Ed
+ 7.99539616382488e-05 1 1 0
+1  8 0 0 1
+2  15 3 1 0 1
+2  16 5 2 0 1
+6  17 3 0
+6  18 5 0
+0
+
+0101000
++39 0 -38 0 *
+Ed
+ 7.99539616382488e-05 1 1 0
+1  9 0 0 1
+2  17 3 1 0 1
+2  18 5 2 0 1
+6  19 3 0
+6  20 5 0
+0
+
+0101000
++38 0 -39 0 *
+Wi
+
+0101000
+-37 0 -36 0 *
+Ve
+1.92831599071361e-06
+190 -20 354.174243050442
+0 0
+
+0101101
+*
+Ve
+1.92831599071361e-06
+170 -1.22460635382238e-14 350
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  10 0 0 1
+2  19 3 1 0 1
+2  20 5 3 0 1
+6  21 3 0
+6  22 6 0
+0
+
+0101000
++34 0 -33 0 *
+Ed
+ 1e-07 1 1 0
+1  11 0 100 170
+3  21 22CN 3 0 100 170
+7  23 24 3 4
+0
+
+0101000
++52 4 -33 4 *
+Ve
+1.92831599071361e-06
+190 20 354.174243050442
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  12 0 0 1
+2  23 3 1 0 1
+2  24 5 3 0 1
+6  25 3 0
+6  26 6 0
+0
+
+0101000
++33 0 -30 0 *
+Ve
+1.92831599071361e-06
+210 -8.57224447675664e-15 350
+0 0
+
+0101101
+*
+Ed
+ 1.92831599071361e-06 1 1 0
+1  13 0 0 1
+2  25 3 1 0 1
+2  26 5 3 0 1
+6  27 3 0
+6  28 6 0
+0
+
+0101000
++28 0 -30 0 *
+Ve
+1e-07
+50 -1.22460635382238e-14 300
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  11 0 210 300
+3  21 22CN 3 0 210 300
+7  29 30 3 4
+0
+
+0101000
++28 4 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  14 0 0 6.28318530717959
+2  27 3 0 0 6.28318530717959
+2  28 6 0 0 6.28318530717959
+6  31 3 4
+6  32 7 0
+0
+
+0101100
++26 0 -26 0 *
+Ed
+ 1.92831599071361e-06 1 1 0
+1  15 0 0 1
+2  29 3 1 0 1
+2  30 5 3 0 1
+6  33 3 0
+6  34 6 0
+0
+
+0101000
++34 0 -28 0 *
+Wi
+
+0101000
+-32 0 +31 1 +51 0 -42 0 -44 0 +46 0 -31 1 -29 0 +27 0 -25 1 
+-24 1 +25 1 +23 0 *
+Fa
+0  1e-07 3 1
+2  3
+0101000
++35 0 +22 0 *
+Wi
+
+0101000
+-48 0 *
+Fa
+0  1e-07 4 0
+2  4
+0101000
+-20 0 *
+Ve
+1e-07
+20 -4.89842541528951e-15 200
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 70 200
+3  31 32CN 5 0 70 200
+7  35 36 5 5
+0
+
+0101000
++38 5 -18 0 *
+Ed
+ 1e-07 1 1 0
+1  17 0 0 6.28318530717959
+2  33 5 0 0 6.28318530717959
+2  34 7 0 0 6.28318530717959
+2  35 5 6 0 6.28318530717959
+6  37 5 5
+6  38 8 0
+0
+
+0101100
++18 0 -18 0 *
+Wi
+
+0101000
++36 0 -17 2 -16 2 +17 2 +37 0 *
+Fa
+0  1e-07 5 2
+2  5
+0101000
++15 0 *
+Ve
+1e-07
+20 -4.89842541528951e-15 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  16 0 0 130
+3  31 32CN 5 0 0 130
+7  39 40 6 7
+0
+
+0101000
++13 0 -28 7 *
+Ed
+ 1e-07 1 1 0
+1  18 0 0 6.28318530717959
+2  36 5 0 0 6.28318530717959
+2  37 8 0 0 6.28318530717959
+2  38 5 8 0 6.28318530717959
+6  41 6 7
+6  42 9 0
+0
+
+0101100
++13 0 -13 0 *
+Wi
+
+0101000
+-23 0 +12 3 +11 3 -12 3 -27 0 +29 0 +32 0 *
+Fa
+0  1e-07 5 3
+2  6
+0101000
++10 0 *
+Wi
+
+0101000
++24 0 *
+Fa
+0  1e-07 6 0
+2  7
+0101000
++8 0 *
+Wi
+
+0101000
++16 0 *
+Fa
+0  1e-07 7 0
+2  8
+0101000
++6 0 *
+Wi
+
+0101000
+-11 0 *
+Fa
+0  1e-07 8 0
+2  9
+0101000
+-4 0 *
+Sh
+
+0101000
++54 0 +40 0 +21 0 -19 0 +14 0 +9 0 +7 1 +5 2 -3 3 *
+So
+
+0100000
++2 0 *
+
++1 0 
\ No newline at end of file
diff --git a/src/TEST_PY/test_BIELLE_bad_assoc.py b/src/TEST_PY/test_BIELLE_bad_assoc.py
new file mode 100755 (executable)
index 0000000..0b84818
--- /dev/null
@@ -0,0 +1,1063 @@
+# -*- coding: latin-1 -*-\r
+\r
+#===============================================\r
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS \r
+#===============================================\r
+\r
+\r
+import os\r
+import GEOM\r
+import geompy\r
+import smesh\r
+import hexablock\r
+import math\r
+import SALOMEDS\r
+\r
+\r
+STEP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/crank.stp")\r
+\r
+\r
+#=============================\r
+# CREATION DOCUMENT\r
+#=============================\r
+\r
+doc = hexablock.addDocument()\r
+\r
+#=============================\r
+# CREATION DU MODELE\r
+#=============================\r
+\r
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres\r
+\r
+#=============================\r
+# PARAMETRES\r
+#=============================\r
+\r
+R = 40.0\r
+\r
+r_grd = R\r
+r_grd_t = R/2\r
+\r
+r_pte = R\r
+r_pte_t = R/2\r
+\r
+l = 200.0\r
+h = 0.019999999553*2\r
+#h = 40.\r
+\r
+# Taille du grand cylindre\r
+dr_grd = R\r
+da_grd = 360\r
+dl_grd = h\r
+\r
+nr_grd = 1\r
+na_grd = 6\r
+nl_grd = 1\r
+\r
+# Taille du petit cylindre\r
+dr_pte = R\r
+da_pte = 360\r
+dl_pte = h\r
+\r
+nr_pte = 1\r
+na_pte = 6\r
+nl_pte = 1\r
+\r
+\r
+#=============================\r
+# Creation des vecteurs\r
+#=============================\r
+\r
+dx = doc.addVector(l, 0, 0)\r
+dy = doc.addVector(0, l, 0)\r
+dz = doc.addVector(0, 0, l)\r
+\r
+#=================================================\r
+# Creation des centres des grilles cylindriques\r
+#=================================================\r
+\r
+c_grd = doc.addVertex(0, 0, 0)\r
+c_pte = doc.addVertex(2*l, 0, 0)\r
+dx_prime = doc.addVectorVertices( c_grd, c_pte )\r
+\r
+#=================================================\r
+# Creation de la grande grille cylindrique\r
+#=================================================\r
+\r
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)\r
+\r
+# on obtient une liste qui contient 6 hexaedres eguaux\r
+\r
+# 30 = pi/6\r
+# 60 = pi/3\r
+# 45 = pi/4\r
+# 90 = pi/2\r
+# 180 = pi\r
+\r
+alpha_x = 2*R*math.cos(math.pi/3)\r
+alpha_y = 2*R*math.sin(math.pi/3)\r
+\r
+x1 = doc.findVertex( 2*R, 0, h )\r
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )\r
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )\r
+x4 = doc.findVertex( 2*R, 0, 0 )\r
+\r
+quad_11 = doc.findQuad(x1, x2)\r
+quad_12 = doc.findQuad(x1, x3)\r
+\r
+quad_list = [ quad_11 , quad_12 ]\r
+\r
+#=================================================\r
+# Creation de la petite grille cylindrique\r
+#=================================================\r
+\r
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )\r
+\r
+# on obtient une liste qui contient 6 hexaedres eguaux\r
+\r
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )\r
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )\r
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )\r
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )\r
+\r
+quad_21 = doc.findQuad(y1, y2)\r
+quad_22 = doc.findQuad(y1, y3)\r
+\r
+#=================================================\r
+# Assemblage des deux grilles cylindriques\r
+#=================================================\r
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )\r
+\r
+\r
+#===================================================================\r
+# Recuperation des vertex du model hexa bielle pour l association\r
+#===================================================================\r
+\r
+# NB:\r
+# h = haut\r
+# b = bas\r
+# g = grand\r
+# p = petit\r
+# t = trou\r
+\r
+alpha_x = 2*R*math.cos(math.pi/3)\r
+alpha_y = 2*R*math.sin(math.pi/3)\r
+\r
+# Face du haut grand trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )\r
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )\r
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )\r
+\r
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )\r
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )\r
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )\r
+\r
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )\r
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )\r
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )\r
+\r
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )\r
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )\r
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )\r
+\r
+#----------- \r
+#x_mod_h_g = doc.findVertex( -alpha_x , -alpha_y , h )\r
+#y_mod_h_g = doc.findVertex( -alpha_x , 0 , h )\r
+#z_mod_h_g = doc.findVertex( -alpha_x , alpha_y , h )\r
+\r
+#u_mod_h_g = doc.findVertex( alpha_x , -alpha_y , h )\r
+#v_mod_h_g = doc.findVertex( alpha_x , 0 , h )\r
+#w_mod_h_g = doc.findVertex( alpha_x , alpha_y , h )\r
+\r
+#x_mod_h_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , h )\r
+#y_mod_h_g_t = doc.findVertex( -alpha_x/2 , 0 , h )\r
+#z_mod_h_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , h )\r
+\r
+#u_mod_h_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , h )\r
+#v_mod_h_g_t = doc.findVertex( alpha_x/2 , 0 , h )\r
+#w_mod_h_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , h )\r
+#-----------\r
+\r
+assert x_mod_h_g\r
+assert y_mod_h_g\r
+assert z_mod_h_g\r
+\r
+assert u_mod_h_g\r
+assert v_mod_h_g\r
+assert w_mod_h_g\r
+\r
+assert x_mod_h_g_t\r
+assert y_mod_h_g_t #\r
+assert z_mod_h_g_t\r
+\r
+assert u_mod_h_g_t #\r
+assert v_mod_h_g_t\r
+assert w_mod_h_g_t #\r
+\r
+\r
+# Face du haut petit trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )\r
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )\r
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )\r
+\r
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )\r
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )\r
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )\r
+\r
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )\r
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )\r
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )\r
+\r
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )\r
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )\r
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )\r
+\r
+\r
+#-----------\r
+#x_mod_h_p = doc.findVertex( l + alpha_x , -alpha_y , h )\r
+#y_mod_h_p = doc.findVertex( l + alpha_x , 0 , h )\r
+#z_mod_h_p = doc.findVertex( l + alpha_x , alpha_y , h )\r
+\r
+#u_mod_h_p = doc.findVertex( l - alpha_x , -alpha_y , h )\r
+#v_mod_h_p = doc.findVertex( l - alpha_x , 0 , h )\r
+#w_mod_h_p = doc.findVertex( l - alpha_x , alpha_y , h )\r
+\r
+#x_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , h )\r
+#y_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , 0 , h )\r
+#z_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , h )\r
+\r
+#u_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , h )\r
+#v_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , 0 , h )\r
+#w_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , h )\r
+#-----------\r
+\r
+#-----------\r
+assert x_mod_h_p\r
+assert y_mod_h_p\r
+assert z_mod_h_p\r
+\r
+assert u_mod_h_p\r
+assert v_mod_h_p\r
+assert w_mod_h_p\r
+\r
+assert x_mod_h_p_t\r
+assert y_mod_h_p_t\r
+assert z_mod_h_p_t\r
+\r
+assert u_mod_h_p_t\r
+assert v_mod_h_p_t\r
+assert w_mod_h_p_t\r
+#-----------\r
+\r
+# Face du bas grand trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )\r
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )\r
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )\r
+\r
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )\r
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )\r
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )\r
+\r
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )\r
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )\r
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )\r
+\r
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )\r
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )\r
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )\r
+\r
+#-----------\r
+#x_mod_b_g = doc.findVertex( -alpha_x , -alpha_y , 0 )\r
+#y_mod_b_g = doc.findVertex( -alpha_x , 0 , 0 )\r
+#z_mod_b_g = doc.findVertex( -alpha_x , alpha_y , 0 )\r
+\r
+#u_mod_b_g = doc.findVertex( alpha_x , -alpha_y , 0 )\r
+#v_mod_b_g = doc.findVertex( alpha_x , 0 , 0 )\r
+#w_mod_b_g = doc.findVertex( alpha_x , alpha_y , 0 )\r
+\r
+#x_mod_b_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , 0 )\r
+#y_mod_b_g_t = doc.findVertex( -alpha_x/2 , 0 , 0 )\r
+#z_mod_b_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , 0 )\r
+\r
+#u_mod_b_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , 0 )\r
+#v_mod_b_g_t = doc.findVertex( alpha_x/2 , 0 , 0 )\r
+#w_mod_b_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , 0 )\r
+#-----------\r
+\r
+assert x_mod_b_g\r
+assert y_mod_b_g\r
+assert z_mod_b_g\r
+\r
+assert u_mod_b_g\r
+assert v_mod_b_g\r
+assert w_mod_b_g\r
+\r
+assert x_mod_b_g_t\r
+assert y_mod_b_g_t\r
+assert z_mod_b_g_t\r
+\r
+assert u_mod_b_g_t\r
+assert v_mod_b_g_t\r
+assert w_mod_b_g_t\r
+\r
+\r
+# Face du bas petit trou\r
+\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )\r
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )\r
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )\r
+\r
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )\r
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )\r
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )\r
+\r
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )\r
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )\r
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )\r
+\r
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )\r
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )\r
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )\r
+\r
+\r
+#-----------\r
+#x_mod_b_p = doc.findVertex( l + alpha_x , -alpha_y , 0 )\r
+#y_mod_b_p = doc.findVertex( l + alpha_x , 0 , 0 )\r
+#z_mod_b_p = doc.findVertex( l + alpha_x , alpha_y , 0 )\r
+\r
+#u_mod_b_p = doc.findVertex( l - alpha_x , -alpha_y , 0 )\r
+#v_mod_b_p = doc.findVertex( l - alpha_x , 0 , 0 )\r
+#w_mod_b_p = doc.findVertex( l - alpha_x , alpha_y , 0 )\r
+\r
+#x_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , 0 )\r
+#y_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , 0 , 0 )\r
+#z_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , 0 )\r
+\r
+#u_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , 0 )\r
+#v_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , 0 , 0 )\r
+#w_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , 0 )\r
+#-----------\r
+\r
+#-----------\r
+assert x_mod_b_p\r
+assert y_mod_b_p\r
+assert z_mod_b_p\r
+\r
+assert u_mod_b_p\r
+assert v_mod_b_p\r
+assert w_mod_b_p\r
+\r
+assert x_mod_b_p_t\r
+assert y_mod_b_p_t\r
+assert z_mod_b_p_t\r
+\r
+assert u_mod_b_p_t\r
+assert v_mod_b_p_t\r
+assert w_mod_b_p_t\r
+#-----------\r
+\r
+\r
+\r
+#===================================================================\r
+# Recuperation des points de la geometrie bielle pour l association\r
+#===================================================================\r
+Bielle_geom = geompy.Import(STEP_PATH, "STEP")\r
+\r
+geompy.addToStudy(Bielle_geom, "Bielle_geom")\r
+\r
+Pt_A = geompy.MakeVertex(0, 0, h/2.)\r
+Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)\r
+\r
+\r
+Pt_B = geompy.MakeVertex(0, 0, -h/2.)\r
+Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)\r
+\r
+\r
+# NB:\r
+# h = haut\r
+# b = bas\r
+# g = grand\r
+# p = petit\r
+# t = trou\r
+\r
+\r
+y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)\r
+geompy.addToStudy( y_h_g , "y_h_g" )\r
+y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)\r
+geompy.addToStudy( y_b_g , "y_b_g" )\r
+\r
+v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)\r
+geompy.addToStudy( v_h_p , "v_h_p" )\r
+v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)\r
+geompy.addToStudy( v_b_p , "v_b_p" )\r
+\r
+Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)\r
+Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)\r
+\r
+\r
+\r
+x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)\r
+geompy.addToStudy( x_h_g , "x_h_g" )\r
+x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)\r
+geompy.addToStudy( x_b_g , "x_b_g" )\r
+\r
+z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1)\r
+geompy.addToStudy( z_h_g , "z_h_g" )\r
+z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)\r
+geompy.addToStudy( z_b_g , "z_b_g" )\r
+\r
+w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)\r
+geompy.addToStudy( w_h_p , "w_h_p" )\r
+w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)\r
+geompy.addToStudy( w_b_p , "w_b_p" )\r
+\r
+u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)\r
+geompy.addToStudy( u_h_p , "u_h_p" )\r
+u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)\r
+geompy.addToStudy( u_b_p , "u_b_p" )\r
+\r
+\r
+\r
+Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)\r
+\r
+\r
+\r
+y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)\r
+geompy.addToStudy(y_h_g_t, "y_h_g_t")\r
+y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)\r
+geompy.addToStudy(y_b_g_t, "y_b_g_t")\r
+\r
+z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)\r
+geompy.addToStudy(z_h_g_t, "z_h_g_t")\r
+z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)\r
+geompy.addToStudy(z_b_g_t, "z_b_g_t")\r
+\r
+w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)\r
+geompy.addToStudy(w_h_g_t, "w_h_g_t")\r
+w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)\r
+geompy.addToStudy(w_b_g_t, "w_b_g_t")\r
+\r
+v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)\r
+geompy.addToStudy(v_h_g_t, "v_h_g_t")\r
+v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)\r
+geompy.addToStudy(v_b_g_t, "v_b_g_t")\r
+\r
+u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)\r
+geompy.addToStudy(u_h_g_t, "u_h_g_t")\r
+u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)\r
+geompy.addToStudy(u_b_g_t, "u_b_g_t")\r
+\r
+x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)\r
+geompy.addToStudy(x_h_g_t, "x_h_g_t")\r
+x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)\r
+geompy.addToStudy(x_b_g_t, "x_b_g_t")\r
+\r
+\r
+\r
+Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)\r
+\r
+y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)\r
+geompy.addToStudy(y_h_p_t, "y_h_p_t")\r
+y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)\r
+geompy.addToStudy(y_b_p_t, "y_b_p_t")\r
+\r
+z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)\r
+geompy.addToStudy(z_h_p_t, "z_h_p_t")\r
+z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)\r
+geompy.addToStudy(z_b_p_t, "z_b_p_t")\r
+\r
+w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)\r
+geompy.addToStudy(w_h_p_t, "w_h_p_t")\r
+w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)\r
+geompy.addToStudy(w_b_p_t, "w_b_p_t")\r
+\r
+v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)\r
+geompy.addToStudy(v_h_p_t, "v_h_p_t")\r
+v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)\r
+geompy.addToStudy(v_b_p_t, "v_b_p_t")\r
+\r
+u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)\r
+geompy.addToStudy(u_h_p_t, "u_h_p_t")\r
+u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)\r
+geompy.addToStudy(u_b_p_t, "u_b_p_t")\r
+\r
+x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)\r
+geompy.addToStudy(x_h_p_t, "x_h_p_t")\r
+x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)\r
+geompy.addToStudy(x_b_p_t, "x_b_p_t")\r
+\r
+\r
+\r
+Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)\r
+\r
+u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)\r
+geompy.addToStudy(u_h_g, "u_h_g")\r
+\r
+u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)\r
+geompy.addToStudy(u_b_g, "u_b_g")\r
+\r
+x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)\r
+geompy.addToStudy(x_h_p, "x_h_p")\r
+x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)\r
+geompy.addToStudy(x_b_p, "x_b_p")\r
+\r
+\r
+Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)\r
+\r
+w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)\r
+geompy.addToStudy(w_h_g, "w_h_g")\r
+\r
+w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)\r
+geompy.addToStudy(w_b_g, "w_b_g")\r
+\r
+z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)\r
+geompy.addToStudy(z_h_p, "z_h_p")\r
+z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)\r
+geompy.addToStudy(z_b_p, "z_b_p")\r
+\r
+Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)\r
+\r
+v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)\r
+geompy.addToStudy(v_h_g, "v_h_g")\r
+v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)\r
+geompy.addToStudy(v_b_g, "v_b_g")\r
+\r
+\r
+Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)\r
+\r
+y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)\r
+geompy.addToStudy(y_h_p, "y_h_p")\r
+y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)\r
+geompy.addToStudy(y_b_p, "y_b_p")\r
+\r
+\r
+#=======================\r
+# CREATION ASSOCIATION\r
+#=======================\r
+\r
+#===========================================\r
+# association des sommets de la face du haut\r
+#===========================================\r
+\r
+# grand trou\r
+\r
+x_mod_h_g.setAssociation( x_h_g )\r
+y_mod_h_g.setAssociation( y_h_g )\r
+z_mod_h_g.setAssociation( z_h_g )\r
+u_mod_h_g.setAssociation( u_h_g )\r
+v_mod_h_g.setAssociation( v_h_g )\r
+w_mod_h_g.setAssociation( w_h_g )\r
+\r
+x_mod_h_g_t.setAssociation( x_h_g_t )\r
+y_mod_h_g_t.setAssociation( y_h_g_t )\r
+z_mod_h_g_t.setAssociation( z_h_g_t )\r
+u_mod_h_g_t.setAssociation( u_h_g_t )\r
+v_mod_h_g_t.setAssociation( v_h_g_t )\r
+w_mod_h_g_t.setAssociation( w_h_g_t )\r
+\r
+# petit trou\r
+\r
+x_mod_h_p.setAssociation( x_h_p )\r
+y_mod_h_p.setAssociation( y_h_p )\r
+z_mod_h_p.setAssociation( z_h_p )\r
+u_mod_h_p.setAssociation( u_h_p )\r
+v_mod_h_p.setAssociation( v_h_p )\r
+w_mod_h_p.setAssociation( w_h_p )\r
+\r
+x_mod_h_p_t.setAssociation( x_h_p_t )\r
+y_mod_h_p_t.setAssociation( y_h_p_t )\r
+z_mod_h_p_t.setAssociation( z_h_p_t )\r
+u_mod_h_p_t.setAssociation( u_h_p_t )\r
+v_mod_h_p_t.setAssociation( v_h_p_t )\r
+w_mod_h_p_t.setAssociation( w_h_p_t )\r
+\r
+\r
+#===========================================\r
+# association des sommets de la face du bas\r
+#===========================================\r
+\r
+# grand trou\r
+\r
+x_mod_b_g.setAssociation( x_b_g )\r
+y_mod_b_g.setAssociation( y_b_g )\r
+z_mod_b_g.setAssociation( z_b_g )\r
+u_mod_b_g.setAssociation( u_b_g )\r
+v_mod_b_g.setAssociation( v_b_g )\r
+w_mod_b_g.setAssociation( w_b_g )\r
+\r
+x_mod_b_g_t.setAssociation( x_b_g_t )\r
+y_mod_b_g_t.setAssociation( y_b_g_t )\r
+z_mod_b_g_t.setAssociation( z_b_g_t )\r
+u_mod_b_g_t.setAssociation( u_b_g_t )\r
+v_mod_b_g_t.setAssociation( v_b_g_t )\r
+w_mod_b_g_t.setAssociation( w_b_g_t )\r
+\r
+# petit trou\r
+\r
+x_mod_b_p.setAssociation( x_b_p )\r
+y_mod_b_p.setAssociation( y_b_p )\r
+z_mod_b_p.setAssociation( z_b_p )\r
+u_mod_b_p.setAssociation( u_b_p )\r
+v_mod_b_p.setAssociation( v_b_p )\r
+w_mod_b_p.setAssociation( w_b_p )\r
+\r
+x_mod_b_p_t.setAssociation( x_b_p_t )\r
+y_mod_b_p_t.setAssociation( y_b_p_t )\r
+z_mod_b_p_t.setAssociation( z_b_p_t )\r
+u_mod_b_p_t.setAssociation( u_b_p_t )\r
+v_mod_b_p_t.setAssociation( v_b_p_t )\r
+w_mod_b_p_t.setAssociation( w_b_p_t )\r
+\r
+\r
+\r
+\r
+#=================================\r
+# Creation association des edges\r
+#=================================\r
+\r
+\r
+All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])\r
+\r
+## recuperer les arrondies du haut de la geometrie\r
+\r
+Edge_Arr_grd_g_h = All_Edges_Bielle[20]\r
+geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )\r
+\r
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )\r
+Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )\r
+\r
+\r
+Edge_Arr_grd_d_h = All_Edges_Bielle[22]\r
+geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )\r
+\r
+Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )\r
+Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )\r
+\r
+\r
+Edge_Arr_pte_g_h = All_Edges_Bielle[8]\r
+geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )\r
+\r
+Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )\r
+Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )\r
+\r
+Edge_Arr_pte_d_h = All_Edges_Bielle[10]\r
+geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )\r
+\r
+Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )\r
+Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )\r
+\r
+# recuperer les arrondies du bas de la geometrie\r
+\r
+Edge_Arr_grd_g_b = All_Edges_Bielle[19]\r
+geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )\r
+\r
+Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )\r
+Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )\r
+\r
+Edge_Arr_grd_d_b = All_Edges_Bielle[21]\r
+geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )\r
+\r
+Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )\r
+Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )\r
+\r
+Edge_Arr_pte_g_b = All_Edges_Bielle[7]\r
+geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )\r
+\r
+Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )\r
+Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )\r
+\r
+Edge_Arr_pte_d_b = All_Edges_Bielle[9]\r
+geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )\r
+\r
+Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )\r
+Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )\r
+\r
+\r
+# recuperer les grand rayons de la geometrie\r
+\r
+Edge_Ray_grd_g_h = All_Edges_Bielle[28]\r
+geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )\r
+Edge_Ray_grd_d_h = All_Edges_Bielle[1]\r
+geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )\r
+\r
+Edge_Ray_grd_g_b = All_Edges_Bielle[27]\r
+geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )\r
+Edge_Ray_grd_d_b = All_Edges_Bielle[0]\r
+geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )\r
+\r
+\r
+\r
+X_pln1 = geompy.MakeVertex( 0 , 0 , 0 )\r
+Vec_X = geompy.MakeVectorDXDYDZ( 0 , 1 , 0 )\r
+Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )\r
+\r
+Parti_Grd_Ray = geompy.MakePartition([ Edge_Ray_grd_g_h , Edge_Ray_grd_d_h , Edge_Ray_grd_g_b , Edge_Ray_grd_d_b ], [ Plan1 ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+geompy.addToStudy( Parti_Grd_Ray , "Parti_Grd_Ray" )\r
+\r
+\r
+All_Edges_Parti_Grd_Ray = geompy.SubShapeAllSorted(Parti_Grd_Ray, geompy.ShapeType["EDGE"])\r
+\r
+\r
+Grd_Ray_0 = All_Edges_Parti_Grd_Ray[0]\r
+geompy.addToStudy( Grd_Ray_0 , "Grd_Ray_0" ) \r
+\r
+##Edge_Arr_grd_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 0 )\r
+Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )\r
+Edge_Grd_Ray_0_mod.addAssociation( Grd_Ray_0, 0., 1. )\r
+\r
+\r
+Grd_Ray_1 = All_Edges_Parti_Grd_Ray[1]\r
+geompy.addToStudy( Grd_Ray_1 , "Grd_Ray_1" )\r
+\r
+##Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 1 )\r
+Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )\r
+Edge_Grd_Ray_1_mod.addAssociation( Grd_Ray_1, 0., 1. )\r
+\r
+Grd_Ray_2 = All_Edges_Parti_Grd_Ray[2]\r
+geompy.addToStudy( Grd_Ray_2 , "Grd_Ray_2" )\r
+\r
+##Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 0 )\r
+Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )\r
+Edge_Grd_Ray_2_mod.addAssociation( Grd_Ray_2, 0., 1. )\r
+\r
+Grd_Ray_3 = All_Edges_Parti_Grd_Ray[3]\r
+geompy.addToStudy( Grd_Ray_3 , "Grd_Ray_3" )\r
+\r
+##Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 1 )\r
+Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )\r
+Edge_Grd_Ray_3_mod.addAssociation( Grd_Ray_3, 0., 1. )\r
+\r
+Grd_Ray_4 = All_Edges_Parti_Grd_Ray[4]\r
+geompy.addToStudy( Grd_Ray_4 , "Grd_Ray_4" )\r
+\r
+Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )\r
+Edge_Grd_Ray_4_mod.addAssociation( Grd_Ray_4, 0., 1. )\r
+#Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b , 0., 1. )\r
+\r
+\r
+Grd_Ray_5 = All_Edges_Parti_Grd_Ray[5]\r
+geompy.addToStudy( Grd_Ray_5 , "Grd_Ray_5" )\r
+\r
+Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )\r
+Edge_Grd_Ray_5_mod.addAssociation( Grd_Ray_5, 0., 1. )\r
+\r
+Grd_Ray_6 = All_Edges_Parti_Grd_Ray[6]\r
+geompy.addToStudy( Grd_Ray_6 , "Grd_Ray_6" )\r
+\r
+Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )\r
+Edge_Grd_Ray_6_mod.addAssociation( Grd_Ray_6, 0., 1. )\r
+\r
+Grd_Ray_7 = All_Edges_Parti_Grd_Ray[7]\r
+geompy.addToStudy( Grd_Ray_7 , "Grd_Ray_7" )\r
+\r
+Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )\r
+Edge_Arr_grd_g_h_mod.addAssociation( Grd_Ray_7, 0., 1. )\r
+\r
+\r
+# recuperer les rayons des trous de la bielle de la geometrie\r
+\r
+Edge_Trou_grd_h = All_Edges_Bielle[26]\r
+geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )\r
+\r
+Edge_Trou_grd_b = All_Edges_Bielle[25]\r
+geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )\r
+\r
+Edge_Trou_pte_h = All_Edges_Bielle[3]\r
+geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )\r
+\r
+Edge_Trou_pte_b = All_Edges_Bielle[2]\r
+geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )\r
+\r
+Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )\r
+\r
+All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]\r
+geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )\r
+\r
+Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )\r
+Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )\r
+\r
+Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]\r
+geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )\r
+\r
+Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )\r
+Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )\r
+\r
+Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]\r
+geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )\r
+\r
+Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )\r
+Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )\r
+\r
+Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]\r
+geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )\r
+\r
+Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )\r
+Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )\r
+\r
+Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]\r
+geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )\r
+\r
+Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )\r
+Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )\r
+\r
+Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]\r
+geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )\r
+\r
+Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )\r
+Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )\r
+\r
+\r
+\r
+Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+geompy.addToStudy( Partition_Trou_grd_bas , "Partition_Trou_grd_bas" )\r
+\r
+\r
+All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]\r
+geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )\r
+\r
+Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )\r
+Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )\r
+\r
+Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]\r
+geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )\r
+\r
+Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )\r
+Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )\r
+\r
+Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]\r
+geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )\r
+\r
+Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )\r
+Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )\r
+\r
+Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]\r
+geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )\r
+\r
+Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )\r
+Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )\r
+\r
+Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]\r
+geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )\r
+\r
+Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )\r
+Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )\r
+\r
+Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]\r
+geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )\r
+\r
+Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )\r
+Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )\r
+\r
+\r
+\r
+\r
+\r
+Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )\r
+\r
+\r
+All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]\r
+geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )\r
+\r
+Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )\r
+Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )\r
+\r
+Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]\r
+geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )\r
+\r
+Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )\r
+Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )\r
+\r
+Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]\r
+geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )\r
+\r
+Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )\r
+Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )\r
+\r
+Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]\r
+geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )\r
+\r
+Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )\r
+Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )\r
+\r
+Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]\r
+geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )\r
+\r
+Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )\r
+Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )\r
+\r
+Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]\r
+geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )\r
+\r
+Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )\r
+Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )\r
+\r
+\r
+\r
+\r
+Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+geompy.addToStudy( Partition_Trou_pte_bas , "Partition_Trou_pte_bas" )\r
+\r
+\r
+All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])\r
+\r
+Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]\r
+geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )\r
+\r
+Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )\r
+Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )\r
+\r
+Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]\r
+geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )\r
+\r
+Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )\r
+Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )\r
+\r
+Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]\r
+geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )\r
+\r
+Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )\r
+Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )\r
+\r
+Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]\r
+geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )\r
+\r
+Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )\r
+Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )\r
+\r
+Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]\r
+geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )\r
+\r
+Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )\r
+Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )\r
+\r
+Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]\r
+geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )\r
+\r
+Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )\r
+Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )\r
+\r
+#====================================\r
+# CREATION DES FACES DES ARRONDIES\r
+#====================================\r
+\r
+All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])\r
+\r
+Face_Arron_1 = All_Face_Arron_Bielle[2]\r
+geompy.addToStudy(Face_Arron_1, "Face_Arron_1")\r
+\r
+Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )\r
+\r
+Face_Arron_2 = All_Face_Arron_Bielle[3]\r
+geompy.addToStudy(Face_Arron_2, "Face_Arron_2")\r
+\r
+Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )\r
+\r
+Face_Arron_3 = All_Face_Arron_Bielle[8]\r
+geompy.addToStudy(Face_Arron_3, "Face_Arron_3")\r
+\r
+Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )\r
+\r
+Face_Arron_4 = All_Face_Arron_Bielle[9]\r
+geompy.addToStudy(Face_Arron_4, "Face_Arron_4")\r
+\r
+Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )\r
+\r
+\r
+\r
+\r
+\r
+\r
+#====================================\r
+# CREATION MAILLAGE\r
+#====================================\r
+\r
+\r
+#=================================================\r
+# Definir les groupes d elements pour le maillage\r
+#=================================================\r
+\r
+# On definit 3 groupes de mailles\r
+\r
+# groupe d edges (arretes)\r
+\r
+Edge_grp = doc.addEdgeGroup("Edge_grp")\r
+Nbr_Edg = doc.countEdge()\r
+#print Nbr_Edg\r
+for i in range(Nbr_Edg):\r
+    Edge_i = doc.getEdge(i)\r
+    Edge_grp.addElement(Edge_i)\r
+\r
+\r
+# groupe de quads (faces)\r
+Quad_grp = doc.addQuadGroup("Quad_grp")\r
+Nbr_Qad = doc.countQuad()\r
+#print Nbr_Qad\r
+for i in range(Nbr_Qad):\r
+    Quad_i = doc.getQuad(i)\r
+    Quad_grp.addElement(Quad_i)\r
+\r
+# groupe d hexas (solids)\r
+Hexa_grp = doc.addHexaGroup("Hexa_grp")\r
+Nbr_Hex = doc.countHexa()\r
+#print Nbr_Hex\r
+for i in range(Nbr_Hex):\r
+    Hexa_i = doc.getHexa(i)\r
+    Hexa_grp.addElement(Hexa_i)\r
+\r
+\r
+\r
+# groupe de noeuds de vertex pour tout le modele \r
+\r
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")\r
+Nbr_Vx = doc.countVertex()\r
+print Nbr_Vx\r
+\r
+for i in range(Nbr_Vx):\r
+    Vertex_i = doc.getVertex(i)\r
+    Vertex_Nod_Grp.addElement(Vertex_i)\r
+\r
+#====================================\r
+# Definir une loi de discretisation\r
+#====================================\r
+# definir une loi: le choix de la loi reste aux utilisateurs\r
+Law = doc.addLaw( "Uniform" , 4 )\r
+\r
+#n = doc.countLaw()\r
+#print n\r
+\r
+# chercher les propagations du modele\r
+N_Propa = doc.countPropagation()\r
+\r
+for j in range(N_Propa):\r
+    Propa = doc.getPropagation(j)\r
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage\r
+\r
+mesh = hexablock.mesh("test_BIELLE_bad_assoc:hexas", doc)\r
+#mesh = hexablock.mesh("test_BIELLE_bad_assoc:quads", doc, 2)\r
+#mesh = hexablock.mesh("test_BIELLE_bad_assoc:edges", doc, 1)\r
+#mesh = hexablock.mesh("test_BIELLE_bad_assoc:nodes", doc, 0)\r
+\r
+print  " --- MAILLAGE HEXAHEDRIQUE --- "\r
+print "Nombre d hexaedres:"   , mesh.NbHexas()\r
+print "Nombre de quadrangles:", mesh.NbQuadrangles()\r
+print "Nombre de segments:"   , mesh.NbEdges()\r
+print "Nombre de noeuds:"     , mesh.NbNodes()\r
diff --git a/src/TEST_PY/test_BIELLE_no_assoc.py b/src/TEST_PY/test_BIELLE_no_assoc.py
new file mode 100755 (executable)
index 0000000..c6cb7b3
--- /dev/null
@@ -0,0 +1,1057 @@
+# -*- coding: latin-1 -*-\r
+\r
+#===============================================\r
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS \r
+#===============================================\r
+\r
+import os\r
+import GEOM\r
+import geompy\r
+import smesh\r
+import hexablock\r
+import math\r
+import SALOMEDS\r
+\r
+\r
+#STEP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/crank.stp")\r
+\r
+#=============================\r
+# CREATION DOCUMENT\r
+#=============================\r
+\r
+doc = hexablock.addDocument()\r
+\r
+#=============================\r
+# CREATION DU MODELE\r
+#=============================\r
+\r
+# Pour la bielle on doit creer deux grilles cylindriques et prismer les quadrangles entre ces deux dernieres\r
+\r
+#=============================\r
+# PARAMETRES\r
+#=============================\r
+\r
+R = 40.0\r
+\r
+r_grd = R\r
+r_grd_t = R/2\r
+\r
+r_pte = R\r
+r_pte_t = R/2\r
+\r
+l = 200.0\r
+#h = 0.019999999553*2\r
+h = 40.\r
+\r
+# Taille du grand cylindre\r
+dr_grd = R\r
+da_grd = 360\r
+dl_grd = h\r
+\r
+nr_grd = 1\r
+na_grd = 6\r
+nl_grd = 1\r
+\r
+# Taille du petit cylindre\r
+dr_pte = R\r
+da_pte = 360\r
+dl_pte = h\r
+\r
+nr_pte = 1\r
+na_pte = 6\r
+nl_pte = 1\r
+\r
+\r
+#=============================\r
+# Creation des vecteurs\r
+#=============================\r
+\r
+dx = doc.addVector(l, 0, 0)\r
+dy = doc.addVector(0, l, 0)\r
+dz = doc.addVector(0, 0, l)\r
+\r
+#=================================================\r
+# Creation des centres des grilles cylindriques\r
+#=================================================\r
+\r
+c_grd = doc.addVertex(0, 0, 0)\r
+c_pte = doc.addVertex(2*l, 0, 0)\r
+dx_prime = doc.addVectorVertices( c_grd, c_pte )\r
+\r
+#=================================================\r
+# Creation de la grande grille cylindrique\r
+#=================================================\r
+\r
+grille_cyl_grd = doc.makeCylindrical(c_grd, dx, dz, dr_grd, da_grd, dl_grd, nr_grd, na_grd, nl_grd, False)\r
+\r
+# on obtient une liste qui contient 6 hexaedres eguaux\r
+\r
+# 30 = pi/6\r
+# 60 = pi/3\r
+# 45 = pi/4\r
+# 90 = pi/2\r
+# 180 = pi\r
+\r
+alpha_x = 2*R*math.cos(math.pi/3)\r
+alpha_y = 2*R*math.sin(math.pi/3)\r
+\r
+x1 = doc.findVertex( 2*R, 0, h )\r
+x2 = doc.findVertex( alpha_x, alpha_y, 0 )\r
+x3 = doc.findVertex( alpha_x, -alpha_y, 0 )\r
+x4 = doc.findVertex( 2*R, 0, 0 )\r
+\r
+quad_11 = doc.findQuad(x1, x2)\r
+quad_12 = doc.findQuad(x1, x3)\r
+\r
+quad_list = [ quad_11 , quad_12 ]\r
+\r
+#=================================================\r
+# Creation de la petite grille cylindrique\r
+#=================================================\r
+\r
+grille_cyl_pte = doc.makeTranslation( grille_cyl_grd , dx_prime )\r
+\r
+# on obtient une liste qui contient 6 hexaedres eguaux\r
+\r
+y1 = doc.findVertex( 2*l - 2*R , 0 , h )\r
+y2 = doc.findVertex( 2*l - alpha_x , alpha_y , 0 )\r
+y3 = doc.findVertex( 2*l - alpha_x , -alpha_y , 0 )\r
+y4 = doc.findVertex( 2*l - 2*R , 0 , 0 )\r
+\r
+quad_21 = doc.findQuad(y1, y2)\r
+quad_22 = doc.findQuad(y1, y3)\r
+\r
+#=================================================\r
+# Assemblage des deux grilles cylindriques\r
+#=================================================\r
+model_biell_fin = doc.joinQuads( quad_list , quad_21 , x1 , y1 , x4 , y4 , 1 )\r
+\r
+\r
+#===================================================================\r
+# Recuperation des vertex du model hexa bielle pour l association\r
+#===================================================================\r
+\r
+# NB:\r
+# h = haut\r
+# b = bas\r
+# g = grand\r
+# p = petit\r
+# t = trou\r
+\r
+alpha_x = 2*R*math.cos(math.pi/3)\r
+alpha_y = 2*R*math.sin(math.pi/3)\r
+\r
+# Face du haut grand trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 1 )\r
+w_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 1 )\r
+z_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 1 )\r
+\r
+y_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 1 )\r
+x_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 1 )\r
+u_mod_h_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 1 )\r
+\r
+v_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 1 )\r
+w_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 1 )\r
+z_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 1 )\r
+\r
+y_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 1 )\r
+x_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 1 )\r
+u_mod_h_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 1 )\r
+\r
+#----------- \r
+#x_mod_h_g = doc.findVertex( -alpha_x , -alpha_y , h )\r
+#y_mod_h_g = doc.findVertex( -alpha_x , 0 , h )\r
+#z_mod_h_g = doc.findVertex( -alpha_x , alpha_y , h )\r
+\r
+#u_mod_h_g = doc.findVertex( alpha_x , -alpha_y , h )\r
+#v_mod_h_g = doc.findVertex( alpha_x , 0 , h )\r
+#w_mod_h_g = doc.findVertex( alpha_x , alpha_y , h )\r
+\r
+#x_mod_h_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , h )\r
+#y_mod_h_g_t = doc.findVertex( -alpha_x/2 , 0 , h )\r
+#z_mod_h_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , h )\r
+\r
+#u_mod_h_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , h )\r
+#v_mod_h_g_t = doc.findVertex( alpha_x/2 , 0 , h )\r
+#w_mod_h_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , h )\r
+#-----------\r
+\r
+assert x_mod_h_g\r
+assert y_mod_h_g\r
+assert z_mod_h_g\r
+\r
+assert u_mod_h_g\r
+assert v_mod_h_g\r
+assert w_mod_h_g\r
+\r
+assert x_mod_h_g_t\r
+assert y_mod_h_g_t #\r
+assert z_mod_h_g_t\r
+\r
+assert u_mod_h_g_t #\r
+assert v_mod_h_g_t\r
+assert w_mod_h_g_t #\r
+\r
+\r
+# Face du haut petit trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+v_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 1 )\r
+w_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 1 )\r
+z_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 1 )\r
+\r
+y_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 1 )\r
+x_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 1 )\r
+u_mod_h_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 1 )\r
+\r
+v_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 1 )\r
+w_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 1 )\r
+z_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 1 )\r
+\r
+y_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 1 )\r
+x_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 1 )\r
+u_mod_h_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 1 )\r
+\r
+\r
+#-----------\r
+#x_mod_h_p = doc.findVertex( l + alpha_x , -alpha_y , h )\r
+#y_mod_h_p = doc.findVertex( l + alpha_x , 0 , h )\r
+#z_mod_h_p = doc.findVertex( l + alpha_x , alpha_y , h )\r
+\r
+#u_mod_h_p = doc.findVertex( l - alpha_x , -alpha_y , h )\r
+#v_mod_h_p = doc.findVertex( l - alpha_x , 0 , h )\r
+#w_mod_h_p = doc.findVertex( l - alpha_x , alpha_y , h )\r
+\r
+#x_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , h )\r
+#y_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , 0 , h )\r
+#z_mod_h_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , h )\r
+\r
+#u_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , h )\r
+#v_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , 0 , h )\r
+#w_mod_h_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , h )\r
+#-----------\r
+\r
+#-----------\r
+assert x_mod_h_p\r
+assert y_mod_h_p\r
+assert z_mod_h_p\r
+\r
+assert u_mod_h_p\r
+assert v_mod_h_p\r
+assert w_mod_h_p\r
+\r
+assert x_mod_h_p_t\r
+assert y_mod_h_p_t\r
+assert z_mod_h_p_t\r
+\r
+assert u_mod_h_p_t\r
+assert v_mod_h_p_t\r
+assert w_mod_h_p_t\r
+#-----------\r
+\r
+# Face du bas grand trou\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 0 , 0 )\r
+w_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 1 , 0 )\r
+z_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 2 , 0 )\r
+\r
+y_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 3 , 0 )\r
+x_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 4 , 0 )\r
+u_mod_b_g = grille_cyl_grd.getVertexIJK( 1 , 5 , 0 )\r
+\r
+v_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 0 , 0 )\r
+w_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 1 , 0 )\r
+z_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 2 , 0 )\r
+\r
+y_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 3 , 0 )\r
+x_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 4 , 0 )\r
+u_mod_b_g_t = grille_cyl_grd.getVertexIJK( 0 , 5 , 0 )\r
+\r
+#-----------\r
+#x_mod_b_g = doc.findVertex( -alpha_x , -alpha_y , 0 )\r
+#y_mod_b_g = doc.findVertex( -alpha_x , 0 , 0 )\r
+#z_mod_b_g = doc.findVertex( -alpha_x , alpha_y , 0 )\r
+\r
+#u_mod_b_g = doc.findVertex( alpha_x , -alpha_y , 0 )\r
+#v_mod_b_g = doc.findVertex( alpha_x , 0 , 0 )\r
+#w_mod_b_g = doc.findVertex( alpha_x , alpha_y , 0 )\r
+\r
+#x_mod_b_g_t = doc.findVertex( -alpha_x/2 , -alpha_y/2 , 0 )\r
+#y_mod_b_g_t = doc.findVertex( -alpha_x/2 , 0 , 0 )\r
+#z_mod_b_g_t = doc.findVertex( -alpha_x/2 , alpha_y/2 , 0 )\r
+\r
+#u_mod_b_g_t = doc.findVertex( alpha_x/2 , -alpha_y/2 , 0 )\r
+#v_mod_b_g_t = doc.findVertex( alpha_x/2 , 0 , 0 )\r
+#w_mod_b_g_t = doc.findVertex( alpha_x/2 , alpha_y/2 , 0 )\r
+#-----------\r
+\r
+assert x_mod_b_g\r
+assert y_mod_b_g\r
+assert z_mod_b_g\r
+\r
+assert u_mod_b_g\r
+assert v_mod_b_g\r
+assert w_mod_b_g\r
+\r
+assert x_mod_b_g_t\r
+assert y_mod_b_g_t\r
+assert z_mod_b_g_t\r
+\r
+assert u_mod_b_g_t\r
+assert v_mod_b_g_t\r
+assert w_mod_b_g_t\r
+\r
+\r
+# Face du bas petit trou\r
+\r
+\r
+## RQ:On remplace la fonction findVertex par getVertexIJK\r
+\r
+v_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 0 , 0 )\r
+w_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 1 , 0 )\r
+z_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 2 , 0 )\r
+\r
+y_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 3 , 0 )\r
+x_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 4 , 0 )\r
+u_mod_b_p = grille_cyl_pte.getVertexIJK( 1 , 5 , 0 )\r
+\r
+v_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 0 , 0 )\r
+w_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 1 , 0 )\r
+z_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 2 , 0 )\r
+\r
+y_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 3 , 0 )\r
+x_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 4 , 0 )\r
+u_mod_b_p_t = grille_cyl_pte.getVertexIJK( 0 , 5 , 0 )\r
+\r
+\r
+#-----------\r
+#x_mod_b_p = doc.findVertex( l + alpha_x , -alpha_y , 0 )\r
+#y_mod_b_p = doc.findVertex( l + alpha_x , 0 , 0 )\r
+#z_mod_b_p = doc.findVertex( l + alpha_x , alpha_y , 0 )\r
+\r
+#u_mod_b_p = doc.findVertex( l - alpha_x , -alpha_y , 0 )\r
+#v_mod_b_p = doc.findVertex( l - alpha_x , 0 , 0 )\r
+#w_mod_b_p = doc.findVertex( l - alpha_x , alpha_y , 0 )\r
+\r
+#x_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , -alpha_y/2 , 0 )\r
+#y_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , 0 , 0 )\r
+#z_mod_b_p_t = doc.findVertex( l + (alpha_x/2) , alpha_y/2 , 0 )\r
+\r
+#u_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , -alpha_y/2 , 0 )\r
+#v_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , 0 , 0 )\r
+#w_mod_b_p_t = doc.findVertex( l - (alpha_x/2) , alpha_y/2 , 0 )\r
+#-----------\r
+\r
+#-----------\r
+assert x_mod_b_p\r
+assert y_mod_b_p\r
+assert z_mod_b_p\r
+\r
+assert u_mod_b_p\r
+assert v_mod_b_p\r
+assert w_mod_b_p\r
+\r
+assert x_mod_b_p_t\r
+assert y_mod_b_p_t\r
+assert z_mod_b_p_t\r
+\r
+assert u_mod_b_p_t\r
+assert v_mod_b_p_t\r
+assert w_mod_b_p_t\r
+#-----------\r
+\r
+\r
+\r
+##===================================================================\r
+## Recuperation des points de la geometrie bielle pour l association\r
+##===================================================================\r
+#Bielle_geom = geompy.Import(STEP_PATH, "STEP")\r
+\r
+#geompy.addToStudy(Bielle_geom, "Bielle_geom")\r
+\r
+#Pt_A = geompy.MakeVertex(0, 0, h/2.)\r
+#Face_haut = geompy.GetFaceNearPoint(Bielle_geom, Pt_A)\r
+\r
+\r
+#Pt_B = geompy.MakeVertex(0, 0, -h/2.)\r
+#Face_bas = geompy.GetFaceNearPoint(Bielle_geom, Pt_B)\r
+\r
+\r
+## NB:\r
+## h = haut\r
+## b = bas\r
+## g = grand\r
+## p = petit\r
+## t = trou\r
+\r
+\r
+#y_h_g = geompy.MakeVertexOnSurface(Face_haut, 1, 0.5)\r
+#geompy.addToStudy( y_h_g , "y_h_g" )\r
+#y_b_g = geompy.MakeVertexWithRef(y_h_g, 0, 0, -h)\r
+#geompy.addToStudy( y_b_g , "y_b_g" )\r
+\r
+#v_h_p = geompy.MakeVertexOnSurface(Face_haut, 0, 0.5)\r
+#geompy.addToStudy( v_h_p , "v_h_p" )\r
+#v_b_p = geompy.MakeVertexWithRef(v_h_p, 0, 0, -h)\r
+#geompy.addToStudy( v_b_p , "v_b_p" )\r
+\r
+#Edge_haut_grd = geompy.GetEdgeNearPoint(Bielle_geom, y_h_g)\r
+#Edge_haut_pte = geompy.GetEdgeNearPoint(Bielle_geom, v_h_p)\r
+\r
+\r
+\r
+#x_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 0)\r
+#geompy.addToStudy( x_h_g , "x_h_g" )\r
+#x_b_g = geompy.MakeVertexWithRef(x_h_g, 0, 0, -h)\r
+#geompy.addToStudy( x_b_g , "x_b_g" )\r
+\r
+#z_h_g = geompy.MakeVertexOnCurve(Edge_haut_grd, 1)\r
+#geompy.addToStudy( z_h_g , "z_h_g" )\r
+#z_b_g = geompy.MakeVertexWithRef(z_h_g, 0, 0, -h)\r
+#geompy.addToStudy( z_b_g , "z_b_g" )\r
+\r
+#w_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 0)\r
+#geompy.addToStudy( w_h_p , "w_h_p" )\r
+#w_b_p = geompy.MakeVertexWithRef(w_h_p, 0, 0, -h)\r
+#geompy.addToStudy( w_b_p , "w_b_p" )\r
+\r
+#u_h_p = geompy.MakeVertexOnCurve(Edge_haut_pte, 1)\r
+#geompy.addToStudy( u_h_p , "u_h_p" )\r
+#u_b_p = geompy.MakeVertexWithRef(u_h_p, 0, 0, -h)\r
+#geompy.addToStudy( u_b_p , "u_b_p" )\r
+\r
+\r
+\r
+#Edge_haut_grd_trou = geompy.GetEdgesByLength(Face_haut, 0.147, 0.148)\r
+\r
+\r
+\r
+#y_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0)\r
+#geompy.addToStudy(y_h_g_t, "y_h_g_t")\r
+#y_b_g_t = geompy.MakeVertexWithRef(y_h_g_t, 0, 0, -h)\r
+#geompy.addToStudy(y_b_g_t, "y_b_g_t")\r
+\r
+#z_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.2)\r
+#geompy.addToStudy(z_h_g_t, "z_h_g_t")\r
+#z_b_g_t = geompy.MakeVertexWithRef(z_h_g_t, 0, 0, -h)\r
+#geompy.addToStudy(z_b_g_t, "z_b_g_t")\r
+\r
+#w_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.35)\r
+#geompy.addToStudy(w_h_g_t, "w_h_g_t")\r
+#w_b_g_t = geompy.MakeVertexWithRef(w_h_g_t, 0, 0, -h)\r
+#geompy.addToStudy(w_b_g_t, "w_b_g_t")\r
+\r
+#v_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.5)\r
+#geompy.addToStudy(v_h_g_t, "v_h_g_t")\r
+#v_b_g_t = geompy.MakeVertexWithRef(v_h_g_t, 0, 0, -h)\r
+#geompy.addToStudy(v_b_g_t, "v_b_g_t")\r
+\r
+#u_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.65)\r
+#geompy.addToStudy(u_h_g_t, "u_h_g_t")\r
+#u_b_g_t = geompy.MakeVertexWithRef(u_h_g_t, 0, 0, -h)\r
+#geompy.addToStudy(u_b_g_t, "u_b_g_t")\r
+\r
+#x_h_g_t = geompy.MakeVertexOnCurve(Edge_haut_grd_trou, 0.8)\r
+#geompy.addToStudy(x_h_g_t, "x_h_g_t")\r
+#x_b_g_t = geompy.MakeVertexWithRef(x_h_g_t, 0, 0, -h)\r
+#geompy.addToStudy(x_b_g_t, "x_b_g_t")\r
+\r
+\r
+\r
+#Edge_haut_pte_trou = geompy.GetEdgesByLength(Face_haut, 0.094, 0.095)\r
+\r
+#y_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0)\r
+#geompy.addToStudy(y_h_p_t, "y_h_p_t")\r
+#y_b_p_t = geompy.MakeVertexWithRef(y_h_p_t, 0, 0, -h)\r
+#geompy.addToStudy(y_b_p_t, "y_b_p_t")\r
+\r
+#z_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.2)\r
+#geompy.addToStudy(z_h_p_t, "z_h_p_t")\r
+#z_b_p_t = geompy.MakeVertexWithRef(z_h_p_t, 0, 0, -h)\r
+#geompy.addToStudy(z_b_p_t, "z_b_p_t")\r
+\r
+#w_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.35)\r
+#geompy.addToStudy(w_h_p_t, "w_h_p_t")\r
+#w_b_p_t = geompy.MakeVertexWithRef(w_h_p_t, 0, 0, -h)\r
+#geompy.addToStudy(w_b_p_t, "w_b_p_t")\r
+\r
+#v_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.5)\r
+#geompy.addToStudy(v_h_p_t, "v_h_p_t")\r
+#v_b_p_t = geompy.MakeVertexWithRef(v_h_p_t, 0, 0, -h)\r
+#geompy.addToStudy(v_b_p_t, "v_b_p_t")\r
+\r
+#u_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.65)\r
+#geompy.addToStudy(u_h_p_t, "u_h_p_t")\r
+#u_b_p_t = geompy.MakeVertexWithRef(u_h_p_t, 0, 0, -h)\r
+#geompy.addToStudy(u_b_p_t, "u_b_p_t")\r
+\r
+#x_h_p_t = geompy.MakeVertexOnCurve(Edge_haut_pte_trou, 0.8)\r
+#geompy.addToStudy(x_h_p_t, "x_h_p_t")\r
+#x_b_p_t = geompy.MakeVertexWithRef(x_h_p_t, 0, 0, -h)\r
+#geompy.addToStudy(x_b_p_t, "x_b_p_t")\r
+\r
+\r
+\r
+#Edge_haut_droite = geompy.GetEdgesByLength(Face_haut, 0.136, 0.137)\r
+\r
+#u_h_g = geompy.MakeVertexOnCurve(Edge_haut_droite, 1)\r
+#geompy.addToStudy(u_h_g, "u_h_g")\r
+\r
+#u_b_g = geompy.MakeVertexWithRef(u_h_g, 0, 0, -h)\r
+#geompy.addToStudy(u_b_g, "u_b_g")\r
+\r
+#x_h_p = geompy.MakeVertexOnCurve(Edge_haut_droite, 0)\r
+#geompy.addToStudy(x_h_p, "x_h_p")\r
+#x_b_p = geompy.MakeVertexWithRef(x_h_p, 0, 0, -h)\r
+#geompy.addToStudy(x_b_p, "x_b_p")\r
+\r
+\r
+#Edge_haut_gauche = geompy.GetEdgesByLength(Face_haut, 0.131, 0.132)\r
+\r
+#w_h_g = geompy.MakeVertexOnCurve(Edge_haut_gauche, 0)\r
+#geompy.addToStudy(w_h_g, "w_h_g")\r
+\r
+#w_b_g = geompy.MakeVertexWithRef(w_h_g, 0, 0, -h)\r
+#geompy.addToStudy(w_b_g, "w_b_g")\r
+\r
+#z_h_p = geompy.MakeVertexOnCurve(Edge_haut_gauche, 1)\r
+#geompy.addToStudy(z_h_p, "z_h_p")\r
+#z_b_p = geompy.MakeVertexWithRef(z_h_p, 0, 0, -h)\r
+#geompy.addToStudy(z_b_p, "z_b_p")\r
+\r
+#Edge_v_grd = geompy.MakeLineTwoPnt(u_h_g, w_h_g)\r
+\r
+#v_h_g = geompy.MakeVertexOnCurve(Edge_v_grd, 0.5)\r
+#geompy.addToStudy(v_h_g, "v_h_g")\r
+#v_b_g = geompy.MakeVertexWithRef(v_h_g, 0, 0, -h)\r
+#geompy.addToStudy(v_b_g, "v_b_g")\r
+\r
+\r
+#Edge_v_pte = geompy.MakeLineTwoPnt(x_h_p, z_h_p)\r
+\r
+#y_h_p = geompy.MakeVertexOnCurve(Edge_v_pte, 0.5)\r
+#geompy.addToStudy(y_h_p, "y_h_p")\r
+#y_b_p = geompy.MakeVertexWithRef(y_h_p, 0, 0, -h)\r
+#geompy.addToStudy(y_b_p, "y_b_p")\r
+\r
+\r
+##=======================\r
+## CREATION ASSOCIATION\r
+##=======================\r
+\r
+##===========================================\r
+## association des sommets de la face du haut\r
+##===========================================\r
+\r
+## grand trou\r
+\r
+#x_mod_h_g.setAssociation( x_h_g )\r
+#y_mod_h_g.setAssociation( y_h_g )\r
+#z_mod_h_g.setAssociation( z_h_g )\r
+#u_mod_h_g.setAssociation( u_h_g )\r
+#v_mod_h_g.setAssociation( v_h_g )\r
+#w_mod_h_g.setAssociation( w_h_g )\r
+\r
+#x_mod_h_g_t.setAssociation( x_h_g_t )\r
+#y_mod_h_g_t.setAssociation( y_h_g_t )\r
+#z_mod_h_g_t.setAssociation( z_h_g_t )\r
+#u_mod_h_g_t.setAssociation( u_h_g_t )\r
+#v_mod_h_g_t.setAssociation( v_h_g_t )\r
+#w_mod_h_g_t.setAssociation( w_h_g_t )\r
+\r
+## petit trou\r
+\r
+#x_mod_h_p.setAssociation( x_h_p )\r
+#y_mod_h_p.setAssociation( y_h_p )\r
+#z_mod_h_p.setAssociation( z_h_p )\r
+#u_mod_h_p.setAssociation( u_h_p )\r
+#v_mod_h_p.setAssociation( v_h_p )\r
+#w_mod_h_p.setAssociation( w_h_p )\r
+\r
+#x_mod_h_p_t.setAssociation( x_h_p_t )\r
+#y_mod_h_p_t.setAssociation( y_h_p_t )\r
+#z_mod_h_p_t.setAssociation( z_h_p_t )\r
+#u_mod_h_p_t.setAssociation( u_h_p_t )\r
+#v_mod_h_p_t.setAssociation( v_h_p_t )\r
+#w_mod_h_p_t.setAssociation( w_h_p_t )\r
+\r
+\r
+##===========================================\r
+## association des sommets de la face du bas\r
+##===========================================\r
+\r
+## grand trou\r
+\r
+#x_mod_b_g.setAssociation( x_b_g )\r
+#y_mod_b_g.setAssociation( y_b_g )\r
+#z_mod_b_g.setAssociation( z_b_g )\r
+#u_mod_b_g.setAssociation( u_b_g )\r
+#v_mod_b_g.setAssociation( v_b_g )\r
+#w_mod_b_g.setAssociation( w_b_g )\r
+\r
+#x_mod_b_g_t.setAssociation( x_b_g_t )\r
+#y_mod_b_g_t.setAssociation( y_b_g_t )\r
+#z_mod_b_g_t.setAssociation( z_b_g_t )\r
+#u_mod_b_g_t.setAssociation( u_b_g_t )\r
+#v_mod_b_g_t.setAssociation( v_b_g_t )\r
+#w_mod_b_g_t.setAssociation( w_b_g_t )\r
+\r
+## petit trou\r
+\r
+#x_mod_b_p.setAssociation( x_b_p )\r
+#y_mod_b_p.setAssociation( y_b_p )\r
+#z_mod_b_p.setAssociation( z_b_p )\r
+#u_mod_b_p.setAssociation( u_b_p )\r
+#v_mod_b_p.setAssociation( v_b_p )\r
+#w_mod_b_p.setAssociation( w_b_p )\r
+\r
+#x_mod_b_p_t.setAssociation( x_b_p_t )\r
+#y_mod_b_p_t.setAssociation( y_b_p_t )\r
+#z_mod_b_p_t.setAssociation( z_b_p_t )\r
+#u_mod_b_p_t.setAssociation( u_b_p_t )\r
+#v_mod_b_p_t.setAssociation( v_b_p_t )\r
+#w_mod_b_p_t.setAssociation( w_b_p_t )\r
+\r
+\r
+\r
+\r
+##=================================\r
+## Creation association des edges\r
+##=================================\r
+\r
+\r
+#All_Edges_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["EDGE"])\r
+\r
+### recuperer les arrondies du haut de la geometrie\r
+\r
+#Edge_Arr_grd_g_h = All_Edges_Bielle[20]\r
+#geompy.addToStudy( Edge_Arr_grd_g_h , "Edge_Arr_grd_g_h" )\r
+\r
+#Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 1 )\r
+#Edge_Arr_grd_g_h_mod.addAssociation( Edge_Arr_grd_g_h, 0., 1. )\r
+\r
+\r
+#Edge_Arr_grd_d_h = All_Edges_Bielle[22]\r
+#geompy.addToStudy( Edge_Arr_grd_d_h , "Edge_Arr_grd_d_h" )\r
+\r
+#Edge_Arr_grd_d_h_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 1 )\r
+#Edge_Arr_grd_d_h_mod.addAssociation( Edge_Arr_grd_d_h, 0., 1. )\r
+\r
+\r
+#Edge_Arr_pte_g_h = All_Edges_Bielle[8]\r
+#geompy.addToStudy( Edge_Arr_pte_g_h , "Edge_Arr_pte_g_h" )\r
+\r
+#Edge_Arr_pte_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 1 )\r
+#Edge_Arr_pte_g_h_mod.addAssociation( Edge_Arr_pte_g_h, 0., 1. )\r
+\r
+#Edge_Arr_pte_d_h = All_Edges_Bielle[10]\r
+#geompy.addToStudy( Edge_Arr_pte_d_h , "Edge_Arr_pte_d_h" )\r
+\r
+#Edge_Arr_pte_d_h_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 1 )\r
+#Edge_Arr_pte_d_h_mod.addAssociation( Edge_Arr_pte_d_h, 0., 1. )\r
+\r
+## recuperer les arrondies du bas de la geometrie\r
+\r
+#Edge_Arr_grd_g_b = All_Edges_Bielle[19]\r
+#geompy.addToStudy( Edge_Arr_grd_g_b , "Edge_Arr_grd_g_b" )\r
+\r
+#Edge_Arr_grd_g_b_mod = grille_cyl_grd.getEdgeJ( 1 , 1 , 0 )\r
+#Edge_Arr_grd_g_b_mod.addAssociation( Edge_Arr_grd_g_b, 0., 1. )\r
+\r
+#Edge_Arr_grd_d_b = All_Edges_Bielle[21]\r
+#geompy.addToStudy( Edge_Arr_grd_d_b , "Edge_Arr_grd_d_b" )\r
+\r
+#Edge_Arr_grd_d_b_mod = grille_cyl_grd.getEdgeJ( 1 , 4 , 0 )\r
+#Edge_Arr_grd_d_b_mod.addAssociation( Edge_Arr_grd_d_b, 0., 1. )\r
+\r
+#Edge_Arr_pte_g_b = All_Edges_Bielle[7]\r
+#geompy.addToStudy( Edge_Arr_pte_g_b , "Edge_Arr_pte_g_b" )\r
+\r
+#Edge_Arr_pte_g_b_mod = grille_cyl_pte.getEdgeJ( 1 , 1 , 0 )\r
+#Edge_Arr_pte_g_b_mod.addAssociation( Edge_Arr_pte_g_b, 0., 1. )\r
+\r
+#Edge_Arr_pte_d_b = All_Edges_Bielle[9]\r
+#geompy.addToStudy( Edge_Arr_pte_d_b , "Edge_Arr_pte_d_b" )\r
+\r
+#Edge_Arr_pte_d_b_mod = grille_cyl_pte.getEdgeJ( 1 , 4 , 0 )\r
+#Edge_Arr_pte_d_b_mod.addAssociation( Edge_Arr_pte_d_b, 0., 1. )\r
+\r
+\r
+## recuperer les grand rayons de la geometrie\r
+\r
+#Edge_Ray_grd_g_h = All_Edges_Bielle[28]\r
+#geompy.addToStudy( Edge_Ray_grd_g_h , "Edge_Ray_grd_g_h" )\r
+#Edge_Ray_grd_d_h = All_Edges_Bielle[1]\r
+#geompy.addToStudy( Edge_Ray_grd_d_h , "Edge_Ray_grd_d_h" )\r
+\r
+#Edge_Ray_grd_g_b = All_Edges_Bielle[27]\r
+#geompy.addToStudy( Edge_Ray_grd_g_b , "Edge_Ray_grd_g_b" )\r
+#Edge_Ray_grd_d_b = All_Edges_Bielle[0]\r
+#geompy.addToStudy( Edge_Ray_grd_d_b , "Edge_Ray_grd_d_b" )\r
+\r
+\r
+\r
+#X_pln1 = geompy.MakeVertex( 0 , 0 , 0 )\r
+#Vec_X = geompy.MakeVectorDXDYDZ( 0 , 1 , 0 )\r
+#Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )\r
+\r
+#Parti_Grd_Ray = geompy.MakePartition([ Edge_Ray_grd_g_h , Edge_Ray_grd_d_h , Edge_Ray_grd_g_b , Edge_Ray_grd_d_b ], [ Plan1 ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+#geompy.addToStudy( Parti_Grd_Ray , "Parti_Grd_Ray" )\r
+\r
+\r
+#All_Edges_Parti_Grd_Ray = geompy.SubShapeAllSorted(Parti_Grd_Ray, geompy.ShapeType["EDGE"])\r
+\r
+\r
+#Grd_Ray_0 = All_Edges_Parti_Grd_Ray[0]\r
+#geompy.addToStudy( Grd_Ray_0 , "Grd_Ray_0" ) \r
+\r
+###Edge_Arr_grd_g_h_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 0 )\r
+#Edge_Grd_Ray_0_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 0 )\r
+#Edge_Grd_Ray_0_mod.addAssociation( Grd_Ray_0, 0., 1. )\r
+\r
+\r
+#Grd_Ray_1 = All_Edges_Parti_Grd_Ray[1]\r
+#geompy.addToStudy( Grd_Ray_1 , "Grd_Ray_1" )\r
+\r
+###Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 2 , 1 )\r
+#Edge_Grd_Ray_1_mod = grille_cyl_pte.getEdgeJ( 1 , 0 , 1 )\r
+#Edge_Grd_Ray_1_mod.addAssociation( Grd_Ray_1, 0., 1. )\r
+\r
+#Grd_Ray_2 = All_Edges_Parti_Grd_Ray[2]\r
+#geompy.addToStudy( Grd_Ray_2 , "Grd_Ray_2" )\r
+\r
+###Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 0 )\r
+#Edge_Grd_Ray_2_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 0 )\r
+#Edge_Grd_Ray_2_mod.addAssociation( Grd_Ray_2, 0., 1. )\r
+\r
+#Grd_Ray_3 = All_Edges_Parti_Grd_Ray[3]\r
+#geompy.addToStudy( Grd_Ray_3 , "Grd_Ray_3" )\r
+\r
+###Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 3 , 1 )\r
+#Edge_Grd_Ray_3_mod = grille_cyl_pte.getEdgeJ( 1 , 5 , 1 )\r
+#Edge_Grd_Ray_3_mod.addAssociation( Grd_Ray_3, 0., 1. )\r
+\r
+#Grd_Ray_4 = All_Edges_Parti_Grd_Ray[4]\r
+#geompy.addToStudy( Grd_Ray_4 , "Grd_Ray_4" )\r
+\r
+#Edge_Grd_Ray_4_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 0 )\r
+#Edge_Grd_Ray_4_mod.addAssociation( Grd_Ray_4, 0., 1. )\r
+##Edge_Grd_Ray_4_mod.addAssociation( Edge_Ray_grd_g_b , 0., 1. )\r
+\r
+\r
+#Grd_Ray_5 = All_Edges_Parti_Grd_Ray[5]\r
+#geompy.addToStudy( Grd_Ray_5 , "Grd_Ray_5" )\r
+\r
+#Edge_Grd_Ray_5_mod = grille_cyl_grd.getEdgeJ( 1 , 2 , 1 )\r
+#Edge_Grd_Ray_5_mod.addAssociation( Grd_Ray_5, 0., 1. )\r
+\r
+#Grd_Ray_6 = All_Edges_Parti_Grd_Ray[6]\r
+#geompy.addToStudy( Grd_Ray_6 , "Grd_Ray_6" )\r
+\r
+#Edge_Grd_Ray_6_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 0 )\r
+#Edge_Grd_Ray_6_mod.addAssociation( Grd_Ray_6, 0., 1. )\r
+\r
+#Grd_Ray_7 = All_Edges_Parti_Grd_Ray[7]\r
+#geompy.addToStudy( Grd_Ray_7 , "Grd_Ray_7" )\r
+\r
+#Edge_Arr_grd_g_h_mod = grille_cyl_grd.getEdgeJ( 1 , 3 , 1 )\r
+#Edge_Arr_grd_g_h_mod.addAssociation( Grd_Ray_7, 0., 1. )\r
+\r
+\r
+## recuperer les rayons des trous de la bielle de la geometrie\r
+\r
+#Edge_Trou_grd_h = All_Edges_Bielle[26]\r
+#geompy.addToStudy( Edge_Trou_grd_h , "Edge_Trou_grd_h" )\r
+\r
+#Edge_Trou_grd_b = All_Edges_Bielle[25]\r
+#geompy.addToStudy( Edge_Trou_grd_b , "Edge_Trou_grd_b" )\r
+\r
+#Edge_Trou_pte_h = All_Edges_Bielle[3]\r
+#geompy.addToStudy( Edge_Trou_pte_h , "Edge_Trou_pte_h" )\r
+\r
+#Edge_Trou_pte_b = All_Edges_Bielle[2]\r
+#geompy.addToStudy( Edge_Trou_pte_b , "Edge_Trou_pte_b" )\r
+\r
+#Partition_Trou_grd_haut = geompy.MakePartition([ Edge_Trou_grd_h ], [ z_h_g_t , w_h_g_t , v_h_g_t , u_h_g_t , x_h_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+#geompy.addToStudy( Partition_Trou_grd_haut , "Partition_Trou_grd_haut" )\r
+\r
+#All_Edge_Partition_Trou_grd_haut = geompy.SubShapeAllSorted(Partition_Trou_grd_haut, geompy.ShapeType["EDGE"])\r
+\r
+#Edge_Trou_grd_h_0 = All_Edge_Partition_Trou_grd_haut[0]\r
+#geompy.addToStudy( Edge_Trou_grd_h_0 , "Edge_Trou_grd_h_0" )\r
+\r
+#Edge_Trou_grd_h_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 1 )\r
+#Edge_Trou_grd_h_0_mod.addAssociation( Edge_Trou_grd_h_0, 0., 1. )\r
+\r
+#Edge_Trou_grd_h_2 = All_Edge_Partition_Trou_grd_haut[2]\r
+#geompy.addToStudy( Edge_Trou_grd_h_2 , "Edge_Trou_grd_h_2" )\r
+\r
+#Edge_Trou_grd_h_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 1 )\r
+#Edge_Trou_grd_h_2_mod.addAssociation( Edge_Trou_grd_h_2, 0., 1. )\r
+\r
+#Edge_Trou_grd_h_4 = All_Edge_Partition_Trou_grd_haut[4]\r
+#geompy.addToStudy( Edge_Trou_grd_h_4 , "Edge_Trou_grd_h_4" )\r
+\r
+#Edge_Trou_grd_h_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 1 )\r
+#Edge_Trou_grd_h_4_mod.addAssociation( Edge_Trou_grd_h_4, 0., 1. )\r
+\r
+#Edge_Trou_grd_h_5 = All_Edge_Partition_Trou_grd_haut[5]\r
+#geompy.addToStudy( Edge_Trou_grd_h_5 , "Edge_Trou_grd_h_5" )\r
+\r
+#Edge_Trou_grd_h_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 1 )\r
+#Edge_Trou_grd_h_5_mod.addAssociation( Edge_Trou_grd_h_5, 0., 1. )\r
+\r
+#Edge_Trou_grd_h_3 = All_Edge_Partition_Trou_grd_haut[3]\r
+#geompy.addToStudy( Edge_Trou_grd_h_3 , "Edge_Trou_grd_h_3" )\r
+\r
+#Edge_Trou_grd_h_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 1 )\r
+#Edge_Trou_grd_h_3_mod.addAssociation( Edge_Trou_grd_h_3, 0., 1. )\r
+\r
+#Edge_Trou_grd_h_1 = All_Edge_Partition_Trou_grd_haut[1]\r
+#geompy.addToStudy( Edge_Trou_grd_h_1 , "Edge_Trou_grd_h_1" )\r
+\r
+#Edge_Trou_grd_h_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 1 )\r
+#Edge_Trou_grd_h_1_mod.addAssociation( Edge_Trou_grd_h_1, 0., 1. )\r
+\r
+\r
+\r
+#Partition_Trou_grd_bas = geompy.MakePartition([ Edge_Trou_grd_b ], [ z_b_g_t , w_b_g_t , v_b_g_t , u_b_g_t , x_b_g_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+#geompy.addToStudy( Partition_Trou_grd_bas , "Partition_Trou_grd_bas" )\r
+\r
+\r
+#All_Edge_Partition_Trou_grd_bas = geompy.SubShapeAllSorted(Partition_Trou_grd_bas, geompy.ShapeType["EDGE"])\r
+\r
+#Edge_Trou_grd_b_0 = All_Edge_Partition_Trou_grd_bas[0]\r
+#geompy.addToStudy( Edge_Trou_grd_b_0 , "Edge_Trou_grd_b_0" )\r
+\r
+#Edge_Trou_grd_b_0_mod = grille_cyl_grd.getEdgeJ( 0 , 0 , 0 )\r
+#Edge_Trou_grd_b_0_mod.addAssociation( Edge_Trou_grd_b_0, 0., 1. )\r
+\r
+#Edge_Trou_grd_b_2 = All_Edge_Partition_Trou_grd_bas[2]\r
+#geompy.addToStudy( Edge_Trou_grd_b_2 , "Edge_Trou_grd_b_2" )\r
+\r
+#Edge_Trou_grd_b_2_mod = grille_cyl_grd.getEdgeJ( 0 , 1 , 0 )\r
+#Edge_Trou_grd_b_2_mod.addAssociation( Edge_Trou_grd_b_2, 0., 1. )\r
+\r
+#Edge_Trou_grd_b_4 = All_Edge_Partition_Trou_grd_bas[4]\r
+#geompy.addToStudy( Edge_Trou_grd_b_4 , "Edge_Trou_grd_b_4" )\r
+\r
+#Edge_Trou_grd_b_4_mod = grille_cyl_grd.getEdgeJ( 0 , 2 , 0 )\r
+#Edge_Trou_grd_b_4_mod.addAssociation( Edge_Trou_grd_b_4, 0., 1. )\r
+\r
+#Edge_Trou_grd_b_5 = All_Edge_Partition_Trou_grd_bas[5]\r
+#geompy.addToStudy( Edge_Trou_grd_b_5 , "Edge_Trou_grd_b_5" )\r
+\r
+#Edge_Trou_grd_b_5_mod = grille_cyl_grd.getEdgeJ( 0 , 3 , 0 )\r
+#Edge_Trou_grd_b_5_mod.addAssociation( Edge_Trou_grd_b_5, 0., 1. )\r
+\r
+#Edge_Trou_grd_b_3 = All_Edge_Partition_Trou_grd_bas[3]\r
+#geompy.addToStudy( Edge_Trou_grd_b_3 , "Edge_Trou_grd_b_3" )\r
+\r
+#Edge_Trou_grd_b_3_mod = grille_cyl_grd.getEdgeJ( 0 , 4 , 0 )\r
+#Edge_Trou_grd_b_3_mod.addAssociation( Edge_Trou_grd_b_3, 0., 1. )\r
+\r
+#Edge_Trou_grd_b_1 = All_Edge_Partition_Trou_grd_bas[1]\r
+#geompy.addToStudy( Edge_Trou_grd_b_1 , "Edge_Trou_grd_b_1" )\r
+\r
+#Edge_Trou_grd_b_1_mod = grille_cyl_grd.getEdgeJ( 0 , 5 , 0 )\r
+#Edge_Trou_grd_b_1_mod.addAssociation( Edge_Trou_grd_b_1, 0., 1. )\r
+\r
+\r
+\r
+\r
+\r
+#Partition_Trou_pte_haut = geompy.MakePartition([ Edge_Trou_pte_h ], [ z_h_p_t , w_h_p_t , v_h_p_t , u_h_p_t , x_h_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+#geompy.addToStudy( Partition_Trou_pte_haut , "Partition_Trou_pte_haut" )\r
+\r
+\r
+#All_Edge_Partition_Trou_pte_haut = geompy.SubShapeAllSorted(Partition_Trou_pte_haut, geompy.ShapeType["EDGE"])\r
+\r
+#Edge_Trou_pte_h_0 = All_Edge_Partition_Trou_pte_haut[0]\r
+#geompy.addToStudy( Edge_Trou_pte_h_0 , "Edge_Trou_pte_h_0" )\r
+\r
+#Edge_Trou_pte_h_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 1 )\r
+#Edge_Trou_pte_h_0_mod.addAssociation( Edge_Trou_pte_h_0, 0., 1. )\r
+\r
+#Edge_Trou_pte_h_2 = All_Edge_Partition_Trou_pte_haut[2]\r
+#geompy.addToStudy( Edge_Trou_pte_h_2 , "Edge_Trou_pte_h_2" )\r
+\r
+#Edge_Trou_pte_h_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 1 )\r
+#Edge_Trou_pte_h_2_mod.addAssociation( Edge_Trou_pte_h_2, 0., 1. )\r
+\r
+#Edge_Trou_pte_h_4 = All_Edge_Partition_Trou_pte_haut[4]\r
+#geompy.addToStudy( Edge_Trou_pte_h_4 , "Edge_Trou_pte_h_4" )\r
+\r
+#Edge_Trou_pte_h_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 1 )\r
+#Edge_Trou_pte_h_4_mod.addAssociation( Edge_Trou_pte_h_4, 0., 1. )\r
+\r
+#Edge_Trou_pte_h_5 = All_Edge_Partition_Trou_pte_haut[5]\r
+#geompy.addToStudy( Edge_Trou_pte_h_5 , "Edge_Trou_pte_h_5" )\r
+\r
+#Edge_Trou_pte_h_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 1 )\r
+#Edge_Trou_pte_h_5_mod.addAssociation( Edge_Trou_pte_h_5, 0., 1. )\r
+\r
+#Edge_Trou_pte_h_3 = All_Edge_Partition_Trou_pte_haut[3]\r
+#geompy.addToStudy( Edge_Trou_pte_h_3 , "Edge_Trou_pte_h_3" )\r
+\r
+#Edge_Trou_pte_h_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 1 )\r
+#Edge_Trou_pte_h_3_mod.addAssociation( Edge_Trou_pte_h_3, 0., 1. )\r
+\r
+#Edge_Trou_pte_h_1 = All_Edge_Partition_Trou_pte_haut[1]\r
+#geompy.addToStudy( Edge_Trou_pte_h_1 , "Edge_Trou_pte_h_1" )\r
+\r
+#Edge_Trou_pte_h_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 1 )\r
+#Edge_Trou_pte_h_1_mod.addAssociation( Edge_Trou_pte_h_1, 0., 1. )\r
+\r
+\r
+\r
+\r
+#Partition_Trou_pte_bas = geompy.MakePartition([ Edge_Trou_pte_b ], [ z_b_p_t , w_b_p_t , v_b_p_t , u_b_p_t , x_b_p_t ], [], [], geompy.ShapeType["EDGE"], 0, [], 0)\r
+#geompy.addToStudy( Partition_Trou_pte_bas , "Partition_Trou_pte_bas" )\r
+\r
+\r
+#All_Edge_Partition_Trou_pte_bas = geompy.SubShapeAllSorted(Partition_Trou_pte_bas, geompy.ShapeType["EDGE"])\r
+\r
+#Edge_Trou_pte_b_0 = All_Edge_Partition_Trou_pte_bas[0]\r
+#geompy.addToStudy( Edge_Trou_pte_b_0 , "Edge_Trou_pte_b_0" )\r
+\r
+#Edge_Trou_pte_b_0_mod = grille_cyl_pte.getEdgeJ( 0 , 0 , 0 )\r
+#Edge_Trou_pte_b_0_mod.addAssociation( Edge_Trou_pte_b_0, 0., 1. )\r
+\r
+#Edge_Trou_pte_b_2 = All_Edge_Partition_Trou_pte_bas[2]\r
+#geompy.addToStudy( Edge_Trou_pte_b_2 , "Edge_Trou_pte_b_2" )\r
+\r
+#Edge_Trou_pte_b_2_mod = grille_cyl_pte.getEdgeJ( 0 , 1 , 0 )\r
+#Edge_Trou_pte_b_2_mod.addAssociation( Edge_Trou_pte_b_2, 0., 1. )\r
+\r
+#Edge_Trou_pte_b_4 = All_Edge_Partition_Trou_pte_bas[4]\r
+#geompy.addToStudy( Edge_Trou_pte_b_4 , "Edge_Trou_pte_b_4" )\r
+\r
+#Edge_Trou_pte_b_4_mod = grille_cyl_pte.getEdgeJ( 0 , 2 , 0 )\r
+#Edge_Trou_pte_b_4_mod.addAssociation( Edge_Trou_pte_b_4, 0., 1. )\r
+\r
+#Edge_Trou_pte_b_5 = All_Edge_Partition_Trou_pte_bas[5]\r
+#geompy.addToStudy( Edge_Trou_pte_b_5 , "Edge_Trou_pte_b_5" )\r
+\r
+#Edge_Trou_pte_b_5_mod = grille_cyl_pte.getEdgeJ( 0 , 3 , 0 )\r
+#Edge_Trou_pte_b_5_mod.addAssociation( Edge_Trou_pte_b_5, 0., 1. )\r
+\r
+#Edge_Trou_pte_b_3 = All_Edge_Partition_Trou_pte_bas[3]\r
+#geompy.addToStudy( Edge_Trou_pte_b_3 , "Edge_Trou_pte_b_3" )\r
+\r
+#Edge_Trou_pte_b_3_mod = grille_cyl_pte.getEdgeJ( 0 , 4 , 0 )\r
+#Edge_Trou_pte_b_3_mod.addAssociation( Edge_Trou_pte_b_3, 0., 1. )\r
+\r
+#Edge_Trou_pte_b_1 = All_Edge_Partition_Trou_pte_bas[1]\r
+#geompy.addToStudy( Edge_Trou_pte_b_1 , "Edge_Trou_pte_b_1" )\r
+\r
+#Edge_Trou_pte_b_1_mod = grille_cyl_pte.getEdgeJ( 0 , 5 , 0 )\r
+#Edge_Trou_pte_b_1_mod.addAssociation( Edge_Trou_pte_b_1, 0., 1. )\r
+\r
+##====================================\r
+## CREATION DES FACES DES ARRONDIES\r
+##====================================\r
+\r
+#All_Face_Arron_Bielle = geompy.SubShapeAllSorted(Bielle_geom, geompy.ShapeType["FACE"])\r
+\r
+#Face_Arron_1 = All_Face_Arron_Bielle[2]\r
+#geompy.addToStudy(Face_Arron_1, "Face_Arron_1")\r
+\r
+#Quad_Arron_1 = grille_cyl_pte.getQuadJK( 1 , 1 , 0 )\r
+\r
+#Face_Arron_2 = All_Face_Arron_Bielle[3]\r
+#geompy.addToStudy(Face_Arron_2, "Face_Arron_2")\r
+\r
+#Quad_Arron_2 = grille_cyl_pte.getQuadJK( 1 , 4 , 0 )\r
+\r
+#Face_Arron_3 = All_Face_Arron_Bielle[8]\r
+#geompy.addToStudy(Face_Arron_3, "Face_Arron_3")\r
+\r
+#Quad_Arron_3 = grille_cyl_grd.getQuadJK( 1 , 1 , 0 )\r
+\r
+#Face_Arron_4 = All_Face_Arron_Bielle[9]\r
+#geompy.addToStudy(Face_Arron_4, "Face_Arron_4")\r
+\r
+#Quad_Arron_4 = grille_cyl_grd.getQuadJK( 1 , 4 , 0 )\r
+\r
+\r
+\r
+\r
+\r
+\r
+#====================================\r
+# CREATION MAILLAGE\r
+#====================================\r
+\r
+\r
+#=================================================\r
+# Definir les groupes d elements pour le maillage\r
+#=================================================\r
+\r
+# On definit 3 groupes de mailles\r
+\r
+# groupe d edges (arretes)\r
+\r
+Edge_grp = doc.addEdgeGroup("Edge_grp")\r
+Nbr_Edg = doc.countEdge()\r
+#print Nbr_Edg\r
+for i in range(Nbr_Edg):\r
+    Edge_i = doc.getEdge(i)\r
+    Edge_grp.addElement(Edge_i)\r
+\r
+\r
+# groupe de quads (faces)\r
+Quad_grp = doc.addQuadGroup("Quad_grp")\r
+Nbr_Qad = doc.countQuad()\r
+#print Nbr_Qad\r
+for i in range(Nbr_Qad):\r
+    Quad_i = doc.getQuad(i)\r
+    Quad_grp.addElement(Quad_i)\r
+\r
+# groupe d hexas (solids)\r
+Hexa_grp = doc.addHexaGroup("Hexa_grp")\r
+Nbr_Hex = doc.countHexa()\r
+#print Nbr_Hex\r
+for i in range(Nbr_Hex):\r
+    Hexa_i = doc.getHexa(i)\r
+    Hexa_grp.addElement(Hexa_i)\r
+\r
+\r
+\r
+# groupe de noeuds de vertex pour tout le modele \r
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")\r
+Nbr_Vx = doc.countVertex()\r
+#print Nbr_Vx\r
+for i in range(Nbr_Vx):\r
+    Vertex_i = doc.getVertex(i)\r
+    Vertex_Nod_Grp.addElement(Vertex_i)\r
+    \r
+\r
+#====================================\r
+# Definir une loi de discretisation\r
+#====================================\r
+# definir une loi: le choix de la loi reste aux utilisateurs\r
+Law = doc.addLaw( "Uniform" , 4 )\r
+\r
+#n = doc.countLaw()\r
+#print n\r
+\r
+# chercher les propagations du modele\r
+N_Propa = doc.countPropagation()\r
+\r
+for j in range(N_Propa):\r
+    Propa = doc.getPropagation(j)\r
+    Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage\r
+\r
+mesh = hexablock.mesh("test_BIELLE_no_assoc", doc)\r
+\r
+print  " --- MAILLAGE HEXAHEDRIQUE --- "\r
+print "Nombre d hexaedres:"   , mesh.NbHexas()\r
+print "Nombre de quadrangles:", mesh.NbQuadrangles()\r
+print "Nombre de segments:"   , mesh.NbEdges()\r
+print "Nombre de noeuds:"     , mesh.NbNodes()\r
diff --git a/src/TEST_PY/test_HEXABLOCK.py b/src/TEST_PY/test_HEXABLOCK.py
new file mode 100755 (executable)
index 0000000..cc27682
--- /dev/null
@@ -0,0 +1,400 @@
+# -*- coding: latin-1 -*-
+
+import hexablock
+
+
+# ======================================================== test_sphere
+def test_sphere ():
+  doc = hexablock.addDocument ()
+  orig = doc.addVertex (0,0,0)
+
+  ncouches = 1
+  k = 0.8
+  decal  = doc.addVector (1,1,1)
+  sphere = doc.makeSpherical (orig, decal, ncouches, k)
+
+  for nc in range(ncouches):
+    cell = sphere.getStrate (nc, Q_A)
+    cell.remove ()
+
+  sphere.saveVtk ("sphere.vtk")
+  print "test_sphere OK"
+
+# ======================================================== test_cartesi1
+def test_cartesi1 ():
+  size_x = 15
+  size_y = 12
+  size_z = 8
+
+  doc = hexablock.addDocument ()
+  orig = doc.addVertex (0,0,0)
+
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 ) #CS_NOT_SPEC (makeCartesian1)
+
+   #for (int nz=0 nz<size_z  nz++)
+       #for (int ny=nz+1 ny<size_y-nz-1  ny++)
+           #for (int nx=nz+1 nx<size_x-nz-1  nx++)
+               
+               ##  grid.getHexa (nx, ny, nz).remove ()
+               #Hexa* cell = grid.getHexa (nx, ny, nz)
+               #cell.remove ()
+
+  grid.saveVtk ("hexa1.vtk")
+  print "test_cartesi1 OK"
+  # doc.dump ()
+
+## ======================================================== afficher
+##define Afficher(elt) afficher (#elt, elt)
+#def afficher (cpchar nom, EltBase* elt):
+
+   #if (elt==NULL)
+      
+      #printf (" .... %s = 0x0\n", nom)
+      #return HOK
+      
+
+   #printf (" .... %s = 0x%08lx = %03d\n", nom, (unsigned long) elt, elt.getId())
+   #return HOK
+
+# ======================================================== test_find
+def test_find ():
+   size_x = 2
+   size_y = 2
+   size_z = 2
+
+   doc = hexablock.addDocument ()
+
+   orig = doc.addVertex (0,0,0)
+   dirVr  = doc.addVector (1,1,1)
+   grid = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+   grid.saveVtk ("mini1.vtk")
+   #doc.dump()
+
+   v00 = doc.findVertex (0, 0, 0)
+   v02 = doc.findVertex (1, 1, 0)
+   v06 = doc.findVertex (1, 1, 1)
+   v08 = doc.findVertex (2, 1, 0)
+   v10 = doc.findVertex (2, 1, 1)
+   v22 = doc.findVertex (2, 1, 2)
+   v26 = doc.findVertex (2, 2, 2)
+
+   assert v00
+   assert v02
+   assert v06
+   assert v08
+   assert v10
+   assert v22
+   assert v26
+
+   assert doc.findEdge (v06, v10)
+   assert doc.findEdge (v10, v06)
+
+
+   assert doc.findQuad (v02, v10)
+   assert doc.findQuad (v06, v08)
+   assert not doc.findQuad (v02, v06)
+
+
+   assert doc.findHexa (v00, v06)
+   assert doc.findHexa (v06, v26)
+   assert doc.findHexa (v26, v06)
+   print "test_find OK"
+
+# ======================================================== test_joint
+def test_joint ():
+  dimx = 11
+  dimy = 11
+  dimz = 2
+  doc = hexablock.addDocument ()
+
+  orig1 = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  grid1 = doc.makeCartesian1(orig1, dirVr, dimx,dimy,dimz , 0, 0, 0 )
+
+  orig2 = doc.addVertex  (dimx/2.0,0,8)
+  vectj = doc.addVector (0,1,0)
+  vecti = doc.addVector (1,0,0)
+  grid2 = doc.makeCylindrical (orig2, vecti, vectj, 1, 180, 1,dimz,dimy,dimx, False)
+  
+  mx = dimx/2
+  my = dimy/2
+  prems = grid1.getQuad1 (hexablock.DIR_Z, mx, my, dimz)
+  cible = grid2.getQuad1 (hexablock.DIR_X, dimz, mx, my)
+
+  v1 = prems.getVertex (0)
+  v2 = cible.getVertex (0)
+  v3 = prems.getVertex (1)
+  v4 = cible.getVertex (3)
+
+  liste  = []
+  miroir = []
+
+  liste += [prems]
+  for nx in range (dimx):
+    if ( nx != mx ):
+      liste += [grid1.getQuad1 (hexablock.DIR_Z, nx, my, dimz)]
+
+  for ny in range (dimy):
+    if ( ny != my ):
+      liste += [grid1.getQuad1 (hexablock.DIR_Z, mx, ny, dimz)]
+
+   # Elements* joint = 
+   #
+  doc.joinQuads(liste, cible, v1, v2, v3, v4, 5)
+  doc.saveVtk ("joint.vtk")
+  print "test_joint OK"
+
+# ======================================================== test_hexa1
+def test_hexa1 ():
+   size_x = 1
+   size_y = 1
+   size_z = 1
+
+   doc = hexablock.addDocument ()
+   orig  = doc.addVertex (0,0,0)
+   dirVr = doc.addVector (1,1,1)
+   #  Elements*  grid = 
+   doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+   #doc.dump ()
+   print "test_hexa1 OK"
+
+# ======================================================== test_decoupage
+def test_decoupage ():
+  size_x = 2
+  size_y = 1
+  size_z = 1
+
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+  #arete = grid.getEdge ( HEXA_ORB.hexablock.DIR_Z, 0, 0, 0)
+  arete = grid.getEdge1( hexablock.DIR_Z, 0, 0, 0 )
+
+  #doc.dump()
+  doc.saveVtk ("no_decoupe.vtk")
+  doc.cut (arete, 1)
+
+  #doc .dump ()
+  doc .saveVtk ("decoupe.vtk")
+  # doc .saveFile ()
+  print "test_decoupage OK"
+
+# ======================================================== test_gen_xml
+def test_gen_xml ():
+
+  size_x = 2
+  size_y = 2
+  size_z = 2
+
+  doc = hexablock.addDocument ()
+
+  orig  = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  cell    = grid.getHexa (0)
+  face    = cell.getQuad (0)
+  arete   = cell.getEdge (0)
+  noeud   = cell.getVertex (0)
+
+  #CS_TODO?
+  #shape1 = Shape()
+  #shape2 = Shape()
+  #shape3 = Shape()
+
+  #noeud.setAssociation (shape1)
+  #arete.setAssociation (shape2)
+  #face .setAssociation (shape3)
+
+  law1 = doc.addLaw("loi1", 1)
+  law2 = doc.addLaw("loi2", 2)
+  law3 = doc.addLaw("loi3", 3)
+
+  law1.setKind (hexablock.UNIFORM)
+  law2.setKind (hexablock.ARITHMETIC)
+  law3.setKind (hexablock.GEOMETRIC)
+
+  prop1 = doc.getPropagation (0)
+  prop2 = doc.getPropagation (1)
+  prop3 = doc.getPropagation (2)
+
+  prop1.setLaw (law1)
+  prop2.setLaw (law2)
+  prop3.setLaw (law3)
+
+  prop1.setWay (True)
+  prop2.setWay (False)
+  prop3.setWay (True)
+
+  doc .saveVtk ("mini.vtk")
+  doc .setFile ("Essai")
+  doc .saveFile ()
+  print "test_gen_xml OK"
+
+
+
+# ======================================================== test_relecture
+def test_relecture ():
+  doc = hexablock.loadDocument ("Essai")
+
+  #doc .dump ()
+  doc .saveVtk ("restore.vtk")
+  print "test_relecture OK"
+
+# ======================================================== test_clone
+def test_clone ():
+  size_x = 2
+  size_y = 2
+  size_z = 2
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  bond  = doc.addVector (0, 0, 7)
+  #  Elements* grid2 = doc.makeTranslation (grid, bond)
+  doc.makeTranslation (grid, bond)
+
+  doc.saveVtk ("clonage.vtk")
+  #doc.dump()
+  print "test_clone OK"
+
+# ======================================================== test_separ
+def test_separ ():
+  size_x = 2
+  size_y = 2
+  size_z = 2
+
+  doc = hexablock.addDocument ()
+
+  orig  = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  doc .saveVtk ("separ.vtk")
+  #doc .dump()
+  print "test_separ OK"
+
+
+# ======================================================== test_cyl
+def test_cyl ():
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  haut = doc.addVector (0,0,1)
+  base = doc.addVector (1,0,0)
+
+  dr = 1
+  # double da = 360 # degres
+  dl = 1
+  nr = 2
+  na = 9
+  nl = 5
+
+  cyl1 = doc.makeCylindrical(orig,base,haut,dr, 360,dl,nr,na,nl)
+  cyl1.saveVtk ("cylindre_full.vtk")
+
+  cyl2 = doc.makeCylindrical(orig,haut,base,dr, 270,dl,nr,na,nl)
+  cyl2.saveVtk ("cylindre_34.vtk")
+
+  # doc.dump ()
+  print "test_cyl OK"
+
+# ======================================================== test_propagation
+def test_propagation ():
+  size_x = 2
+  size_y = 1
+  size_z = 1
+
+  doc = hexablock.addDocument ()
+
+  orig = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+
+  doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  nb = doc.countPropagation ()
+
+  for nro in range(nb):
+    prop  = doc .getPropagation (nro)
+    edges = prop.getEdges ()
+    print " ____________________________________ Prop nro %s\n"%nro
+    for e in edges:
+      way = e.getWay ()
+      if (way):
+        print "     (%s,%s)\n"%( e.getVertex(0).name, e.getVertex(1).name )
+      else:
+        print "     (%s,%s)\n"%( e.getVertex(1).name, e.getVertex(0).name )
+
+  #doc.dump  ()
+  doc.saveVtk ("test_propagation.vtk")
+  doc.setFile ("test_propagation")
+  doc.saveFile ()
+  print "test_propagation OK"
+
+
+# ======================================================== test_move
+def test_move ():
+  size_x = 1
+  size_y = 1
+  size_z = 2
+
+  doc = hexablock.addDocument ()
+
+  orig  = doc.addVertex (0,0,0)
+  dirVr = doc.addVector (1,1,1)
+  grid  = doc.makeCartesian1 (orig, dirVr, size_x,size_y,size_z, 0, 0, 0 )
+
+  enhaut = doc.addVector (0, 0, 5)
+  devant = doc.addVector (5, 0, 0)
+  agauche = doc.addVector (0, 5, 0)
+
+  #CS_TODO?
+  #matrice = Matrix() 
+  #matrice.defTranslation (enhaut)
+
+  cube    = grid.getHexa (1)
+  dessous = cube.getQuad (0)#(Q_A) #CS_TODO?
+  #dessous.dump()
+
+  grid2 = doc.makeTranslation (grid, devant)
+  doc.makeTranslation (grid, agauche)
+  cube2 = grid2.getHexa (1)
+
+  cube .disconnectQuad (dessous)
+  
+  #CS_TODO?
+  #cube .transform( matrice )
+  #cube2.transform( matrice )
+
+
+  doc .saveVtk ("move.vtk")
+  #doc .dump()
+  print "test_move OK, CS_TODO?"
+
+
+
+
+#test_sphere () KO
+test_cartesi1 ()
+test_find ()
+test_joint ()
+test_hexa1 ()
+test_decoupage ()
+test_gen_xml ()
+#test_relecture () KO
+#test_clone ()
+#test_separ ()
+#test_cyl ()
+#test_propagation ()
+#test_move ()
+
diff --git a/src/TEST_PY/test_INTER_3_CYLINDRE_no_assoc.py b/src/TEST_PY/test_INTER_3_CYLINDRE_no_assoc.py
new file mode 100755 (executable)
index 0000000..fadde8d
--- /dev/null
@@ -0,0 +1,415 @@
+# -*- coding: latin-1 -*-
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import SALOME
+import geompy
+import smesh
+import hexablock
+import math
+
+
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument()
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour l'intersection des trois cylindres on doit s enservir des modeles predefinis des cylindres deja decoupes
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 5.0
+
+r_pte = R
+
+r_moy = 2*R
+
+r_grd = 4*R
+
+l = 200
+h = 100
+
+# Taille du 1er petit cylindre
+dr_pte_1 = 20
+da_pte_1 = 360
+dl_pte_1 = 200
+
+nr_pte_1 = 1
+na_pte_1 = 4 #remplissage a l interieur de 1 hexa
+nl_pte_1 = 1
+
+# Taille du 1er grand cylindre
+dr_grd_1 = 50
+da_grd_1 = 360
+dl_grd_1 = 150
+
+nr_grd_1 = 1
+na_grd_1 = 12 #remplissage a l interieur de 8 hexas
+nl_grd_1 = 1
+
+# Taille du 2eme petit cylindre
+dr_pte_2 = 50
+da_pte_2 = 360
+dl_pte_2 = 200
+
+nr_pte_2 = 1
+na_pte_2 = 12 #remplissage a l interieur de 8 hexas
+nl_pte_2 = 1
+
+# Taille du 2eme grand cylindre
+dr_grd_2 = 100
+da_grd_2 = 360
+dl_grd_2 = 400
+
+nr_grd_2 = 1
+na_grd_2 = 18 #remplissage a l interieur de 8 hexas
+nl_grd_2 = 1
+
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+DX = doc.addVector( 1 , 0 , 0 )
+DY = doc.addVector( 0 , 1 , 0 )
+DZ = doc.addVector( 0 , 0 , 1 )
+
+
+#===================================
+# Creation des centres de cylindres
+#===================================
+
+C_pte_1 = doc.addVertex( -h , 0 , h )
+C_grd_1 = doc.addVertex( 0 , 0 , 0 )
+
+C_pte_2 = doc.addVertex( 0 , 0 , 3*h )
+C_grd_2 = doc.addVertex( -2*h , 0 , 4*h )
+
+#C_pte_1 = doc.addVertex( 190 , 0 , 220 )
+#C_grd_1 = doc.addVertex( 300 , 0 , 400 )
+
+#C_pte_2 = doc.addVertex( 200 , 0 , 400 )
+#C_grd_2 = doc.addVertex( 0 , 0 , 0 )
+
+
+#================================
+# Creation du 1er petit cylindre
+#================================
+
+Cyl_pte_1 = doc.addCylinder( C_pte_1 , DX , dr_pte_1 , dl_pte_1 )
+#Cyl_pte_1 = doc.addCylinder( C_pte_1 , DX , 5 , 100 )
+#Cyl_pte_1.saveVtk("/tmp/Cyl_pte_1.vtk")
+
+#================================
+# Creation du 1er grand cylindre
+#================================
+
+Cyl_grd_1 = doc.addCylinder( C_grd_1 , DZ , dr_grd_1 , dl_grd_1 )
+#Cyl_grd_1 = doc.addCylinder( C_grd_1 , DZ , 10 , 200 )
+#Cyl_grd_1.saveVtk("/tmp/Cyl_grd_1.vtk")
+
+#================================
+# Creation du 2eme petit cylindre
+#================================
+
+Cyl_pte_2 = doc.addCylinder( C_pte_2 , DZ , dr_pte_2 , dl_pte_2 )
+#Cyl_pte_2 = doc.addCylinder( C_pte_2 , DZ , 10 , 200 )
+#Cyl_pte_2.saveVtk("/tmp/Cyl_pte_2.vtk")
+
+#================================
+# Creation du 2eme grand cylindre
+#================================
+
+Cyl_grd_2 = doc.addCylinder( C_grd_2 , DX , dr_grd_2 , dl_grd_2 )
+#Cyl_grd_2 = doc.addCylinder( C_grd_2 , DX , 20 , 200 )
+#Cyl_grd_2.saveVtk("/tmp/Cyl_grd_2.vtk")
+
+
+
+#=================================
+# Intersection cylindres decoupes
+#=================================
+
+
+Cyl_Decou_Cyl_pte_grd_1 = doc.makeCylinders( Cyl_pte_1 , Cyl_grd_1 )
+
+Cyl_Decou_Cyl_pte_grd_2 = doc.makeCylinders( Cyl_pte_2 , Cyl_grd_2 )
+
+
+
+#====================================================================
+# Recuperation des quads qui servent a fusionner les deux partitions
+#====================================================================
+
+
+
+# reperer les quads du 1er decoupe des cylindres
+# on a besoin des quads IJ dans le plan XY
+
+#ni = 2
+#nj = 4
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 4
+#0 <= k < nk + 1 = 5
+
+#quad_decoup1_x0_y0_z4 = Cyl_Decou_Cyl_pte_grd_1.getQuadIJ( 1 , 0 , 0 , 4 )
+
+#vx_1 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 0 , 0 , 4 )
+#vx_2 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 1 , 2 , 4 )
+
+
+#ni = 2
+#nj = 8
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 8
+#0 <= k < nk + 1 = 5
+
+#quad_decoup1_x1_y0_z4 = Cyl_Decou_Cyl_pte_grd_1.getQuadIJ( 1 , 1 , 0 , 4 )
+
+#vx_1 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 0 , 4 )
+#vx_2 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 1 , 4 )
+
+
+
+
+# reperer les quads du 2eme decoupe des cylindres
+# on a besoin des quads IJ dans le plan XY
+
+#ni = 2
+#nj = 4
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 4
+#0 <= k < nk + 1 = 5
+
+quad_decoup2_x0_y0_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 0 , 0 )
+quad_decoup2_x0_y1_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 1 , 0 )
+quad_decoup2_x0_y2_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 2 , 0 )
+quad_decoup2_x0_y3_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 0 , 3 , 0 )
+
+#list_quad_decoup2_x0 = [ quad_decoup2_x0_y0_z0 , quad_decoup2_x0_y1_z0 , quad_decoup2_x0_y2_z0 , quad_decoup2_x0_y3_z0 ]
+
+#vx_1_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 0 , 0 , 0 )
+#vx_2_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 1 , 2 , 0 )
+
+
+
+#ni = 2
+#nj = 8
+#nk = 4
+
+#0 <= i < ni = 2
+#0 <= j < nj = 8
+#0 <= k < nk + 1 = 5
+
+#for j in [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 ]:
+    #for i in [ 0 , 1 ]:
+       #quad_list = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , i , j , 0 )
+
+quad_decoup2_x1_y0_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 0 , 0 )
+quad_decoup2_x1_y1_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 1 , 0 )
+quad_decoup2_x1_y2_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 2 , 0 )
+quad_decoup2_x1_y3_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 3 , 0 )
+quad_decoup2_x1_y4_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 4 , 0 )
+quad_decoup2_x1_y5_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 5 , 0 )
+quad_decoup2_x1_y6_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 6 , 0 )
+quad_decoup2_x1_y7_z0 = Cyl_Decou_Cyl_pte_grd_2.getQuadIJ( 0 , 1 , 7 , 0 )
+
+list_quad_decoup2_x1 = [ quad_decoup2_x1_y2_z0 , quad_decoup2_x0_y0_z0 , quad_decoup2_x0_y1_z0 , quad_decoup2_x0_y2_z0 , quad_decoup2_x0_y3_z0 , quad_decoup2_x1_y0_z0 , quad_decoup2_x1_y1_z0 , quad_decoup2_x1_y2_z0 , quad_decoup2_x1_y3_z0 , quad_decoup2_x1_y4_z0 , quad_decoup2_x1_y5_z0 , quad_decoup2_x1_y6_z0 , quad_decoup2_x1_y7_z0 ]
+
+quad_decoup1_x1_y0_z4 = Cyl_Decou_Cyl_pte_grd_1.getQuadIJ( 1 , 1 , 0 , 4 )
+
+vx_1 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 0 , 4 )
+vx_2 = Cyl_Decou_Cyl_pte_grd_1.getVertexIJK( 1 , 2 , 1 , 4 )
+
+vx_1_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 2 , 2 , 0 )
+vx_2_prim = Cyl_Decou_Cyl_pte_grd_2.getVertexIJK( 0 , 2 , 3 , 0 )
+
+
+jointure = doc.joinQuads( list_quad_decoup2_x1 , quad_decoup1_x1_y0_z4 , vx_1_prim , vx_1 , vx_2_prim , vx_2 , 3 )
+
+
+
+
+#jointure.saveVtk("/tmp/jointure.vtk")
+#doc.saveVtk("/tmp/inter.vtk")
+
+
+##==========================
+## CREATION ASSOCIATION
+##==========================
+
+
+##========================================
+## INTERSECTION DES TROIS CYLINDRES GEOM
+##========================================
+
+#Inter_Cylin_geom = geompy.Import("/export/home/PR_HEX/SCRIPTS/cao_cea/tees.brep", "BREP")
+
+#geompy.addToStudy(Inter_Cylin_geom, "Inter_Cylin_geom")
+#36
+
+## Remarque:
+### 1- On a utiliser les memes parametres de la geometrie des trois cylindres dans l'espace
+###    pour construire notre modele hexa ( intersection des trois cylindres )
+### 2- On conclu qu'on a pas besoin d'une association pts par pts comme les 3 cas tests precedemment
+###    realises
+### 3- l'association sa se fait automatiquement
+### 4- donc on passe directement a la creation du maillage
+
+
+
+
+
+
+
+
+
+##====================================
+## CREATION GROUPES DU MAILLAGE
+##====================================
+
+# On definit 3 groupes de mailles
+
+# groupe d edges (arretes)
+
+Edge_grp = doc.addEdgeGroup("Edge_grp")
+Nbr_Edg = doc.countEdge()
+#print Nbr_Edg
+for i in range(Nbr_Edg):
+    Edge_i = doc.getEdge(i)
+    Edge_grp.addElement(Edge_i)
+
+
+# groupe de quads (faces)
+Quad_grp = doc.addQuadGroup("Quad_grp")
+Nbr_Qad = doc.countQuad()
+#print Nbr_Qad
+for i in range(Nbr_Qad):
+    Quad_i = doc.getQuad(i)
+    Quad_grp.addElement(Quad_i)
+
+# groupe d hexas (solids)
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+#print Nbr_Hex
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+
+# groupe de noeuds de vertex pour tout le modele 
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+#print Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+
+
+
+##====================================
+## CREATION MAILLAGE
+##====================================
+
+
+##====================================
+## Definir une loi de discretisation
+##====================================
+
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+Law = doc.addLaw( "Uniform" , 4 )
+
+#petit test
+n = doc.countLaw()
+print n
+
+# chercher les propagations du modele
+
+N_Propa = doc.countPropagation()
+
+for j in range(N_Propa):
+       Propa = doc.getPropagation(j)
+       Propa.setLaw( Law )# appliquer la loi de discretisation sur tout le modele et generer le maillage
+
+try:
+    mesh = hexablock.mesh("test_INTER_3_CYLINDRE_no_assoc", doc)
+except SALOME.SALOME_Exception, ex:
+    print "Mesh computation failed, exception caught:"
+    print "    ", ex.details.text
+except:
+    import traceback
+    print "Mesh computation failed, exception caught:"
+    traceback.print_exc()
+
+
+print "Nombre d'hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+
+#nQuad = doc.countQuad();
+#print "countQuad = ",nQuad
+
+###qds = [2,6,10,14]
+##qds = [2,6,10,14]
+##for j in qds:
+#for j in range(nQuad):
+  #q = doc.getQuad(j)
+  ##ok = smesh.computeQuad(q, False)
+  #ok = smesh.computeQuad(q, True)
+  #print "quad j->",j
+  #print "ok ->",ok
+
+
+## --------------------
+## Maillage hexaédrique
+## --------------------
+#mesh = mesh.ExportMED( "3cyl.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "3cyl.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  4*" -- ijk --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/TEST_PY/test_TUYAU_COURBE_no_assoc.py b/src/TEST_PY/test_TUYAU_COURBE_no_assoc.py
new file mode 100755 (executable)
index 0000000..2e34a26
--- /dev/null
@@ -0,0 +1,448 @@
+# -*- coding: latin-1 -*-
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+
+import os
+#import GEOM
+import geompy
+import smesh
+import hexablock
+import math
+#import SALOMEDS
+
+
+BREP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/tuyau.brep")
+
+#=============================
+# CREATION DOCUMENT
+#=============================
+
+doc = hexablock.addDocument()
+
+#=============================
+# CREATION DU MODELE
+#=============================
+
+# Pour le tuyau on doit creer une grille cylindrique
+
+#=============================
+# PARAMETRES
+#=============================
+
+R = 4.5
+
+r = 4.5
+r_t = 3.6
+
+h = 75.0
+
+# Taille du cylindre
+dr = R
+da = 360
+dl = h
+
+nr = 1
+na = 4
+nl = 1
+
+
+#=============================
+# Creation des vecteurs
+#=============================
+
+dx = doc.addVector(h, 0, 0)
+dy = doc.addVector(0, h, 0)
+dz = doc.addVector(0, 0, h)
+
+
+#=================================================
+# Creation du centre de la grille cylindrique
+#=================================================
+
+c = doc.addVertex(0, 0, 0)
+
+#=================================================
+# Creation de la grille cylindrique
+#=================================================
+
+grille_cyl = doc.makeCylindrical(c, dx, dz, dr, da, dl, nr, na, nl, False)
+
+# on obtient une liste qui contient 4 hexaedres eguaux
+
+# 30° = pi/6
+# 60° = pi/3
+# 45° = pi/4
+# 90° = pi/2
+# 180° = pi
+
+
+#=================================================
+# Model tuyau final
+#=================================================
+
+model_tuyau_fin = grille_cyl
+
+
+#model_tuyau_fin.saveVtk("/tmp/tuyau.vtk")
+#grille_cyl.saveVtk("/tmp/grille_cyl.vtk")
+
+
+
+#===================================================================
+# Recuperation des vertex du model hexa tuyau pour l'association
+#===================================================================
+
+## NB:
+## h = haut
+## b = bas
+## g = grand
+## p = petit
+## t = trou
+
+
+# Face du haut grand rayon
+
+x_mod_h = doc.findVertex( 2*R , 0 , h )
+y_mod_h = doc.findVertex( 0 , 2*R , h )
+z_mod_h = doc.findVertex( -2*R , 0 , h )
+u_mod_h = doc.findVertex( 0 , -2*R , h )
+
+# Face du haut petit rayon
+
+x_mod_h_t = doc.findVertex( R , 0 , h )
+y_mod_h_t = doc.findVertex( 0 , R , h )
+z_mod_h_t = doc.findVertex( -R , 0 , h )
+u_mod_h_t = doc.findVertex( 0 , -R , h )
+
+
+# Face du bas grand rayon
+
+x_mod_b = doc.findVertex( 2*R , 0 , 0 )
+y_mod_b = doc.findVertex( 0 , 2*R , 0 )
+z_mod_b = doc.findVertex( -2*R , 0 , 0 )
+u_mod_b = doc.findVertex( 0 , -2*R , 0 )
+
+# Face du bas petit rayon
+
+x_mod_b_t = doc.findVertex( R , 0 , 0 )
+y_mod_b_t = doc.findVertex( 0 , R , 0 )
+z_mod_b_t = doc.findVertex( -R , 0 , 0 )
+u_mod_b_t = doc.findVertex( 0 , -R , 0 )
+
+
+#===================================================================
+# Recuperation des points de la geometrie tuyau pour l'association
+#===================================================================
+Tuyau_geom = geompy.Import(BREP_PATH, "BREP")
+geompy.addToStudy(Tuyau_geom, "Tuyau_geom")
+
+
+Pt_A = geompy.MakeVertex( h , 20 , 4.5 )
+Edge_haut_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_A)
+
+
+Pt_B = geompy.MakeVertex( h , 20 , 3.6 )
+Edge_haut_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_B)
+
+
+Pt_C = geompy.MakeVertex( h , 20 , -4.5 )
+Edge_haut_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_C)
+
+
+
+Pt_D = geompy.MakeVertex( h , 20 , -3.6 )
+Edge_haut_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_D)
+
+
+
+# NB:
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+
+# Face tuyau du haut
+x_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 0.5)
+y_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 1)
+z_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0.5)
+u_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0)
+
+
+
+x_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 0.5)
+y_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 1)
+z_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0.5)
+u_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0)
+
+
+
+Pt_E = geompy.MakeVertex( 0 , 0 , 2 )
+Edge_bas_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_E)
+
+
+Pt_F = geompy.MakeVertex( 0 , 0 , 1.6 )
+Edge_bas_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_F)
+
+
+Pt_G = geompy.MakeVertex( 0 , 0 , -2 )
+Edge_bas_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_G)
+
+
+
+Pt_H = geompy.MakeVertex( 0 , 0 , -1.6 )
+Edge_bas_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_H)
+
+
+
+# Face tuyau du bas
+x_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 0.5)
+y_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 1)
+z_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0.5)
+u_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0)
+
+
+
+x_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 0.5)
+y_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 1)
+z_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0.5)
+u_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0)
+
+
+
+
+bp_law = doc.getLaw(0)
+bp_law.setNodes(4)
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+##=================================================
+## Definir les groupes d'elements pour le maillage
+##=================================================
+
+# groupe de Hexa(volumes) 
+Hexa_grp = doc.addHexaGroup("Hexa_all_grp")
+Nbr_Hex = doc.countHexa()
+print "doc.countHexa()->",Nbr_Hex
+
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+#Nbr_elm_hex = Hexa_grp.countElement()
+#print "Hexa_all_grp  countElement() ->",Nbr_elm_hex
+
+for i in range(Nbr_Hex):
+    Hexa_grp = doc.addHexaGroup("Hexa_grp"+str(i))
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+
+# groupe de quads (faces)
+Quad_grp_haut = doc.addQuadGroup("Quad_grp_haut")
+
+Quad_h_1 = doc.findQuad( x_mod_h , y_mod_h_t )
+Quad_h_2 = doc.findQuad( y_mod_h_t , z_mod_h )
+Quad_h_3 = doc.findQuad( z_mod_h , u_mod_h_t )
+Quad_h_4 = doc.findQuad( u_mod_h_t , x_mod_h )
+
+assert Quad_h_1
+assert Quad_h_2
+assert Quad_h_3
+assert Quad_h_4
+
+
+for Quad_h_i in [ Quad_h_1 , Quad_h_2 , Quad_h_3 , Quad_h_4 ]:
+    Quad_grp_haut.addElement(Quad_h_i)
+
+
+
+Nbr_elm_qad_haut = Quad_grp_haut.countElement()
+print "Nbr_elm_qad_haut ->",Nbr_elm_qad_haut
+
+
+Quad_grp_bas = doc.addQuadGroup("Quad_grp_bas")
+
+Quad_b_1 = doc.findQuad( x_mod_b , y_mod_b_t )
+Quad_b_2 = doc.findQuad( y_mod_b_t , z_mod_b )
+Quad_b_3 = doc.findQuad( z_mod_b , u_mod_b_t )
+Quad_b_4 = doc.findQuad( u_mod_b_t , x_mod_b )
+
+
+assert Quad_b_1
+assert Quad_b_2
+assert Quad_b_3
+assert Quad_b_4
+
+for Quad_b_i in [ Quad_b_1 , Quad_b_2 , Quad_b_3 , Quad_b_4 ]:
+    Quad_grp_bas.addElement(Quad_b_i)
+
+
+Nbr_elm_qad_bas = Quad_grp_bas.countElement()
+print "Nbr_elm_qad_bas->",Nbr_elm_qad_bas
+
+
+# groupe de Edges
+
+Edge_Mod_ext_h = doc.findEdge( y_mod_h , y_mod_b )
+Edge_Mod_int_h = doc.findEdge( y_mod_h_t , y_mod_b_t )
+
+Edge_Mod_int_b = doc.findEdge( u_mod_h_t , u_mod_b_t )
+Edge_Mod_ext_b = doc.findEdge( u_mod_h , u_mod_b )
+
+Edge_Mod_ext_g = doc.findEdge( x_mod_h , x_mod_b )
+Edge_Mod_int_g = doc.findEdge( x_mod_h_t , x_mod_b_t )
+
+Edge_Mod_int_d = doc.findEdge( z_mod_h_t , z_mod_b_t )
+Edge_Mod_ext_d = doc.findEdge( z_mod_h , z_mod_b )
+
+
+Edge_Grp_haut = doc.addEdgeGroup("Edge_Grp_haut")
+Edge_Grp_haut.addElement(Edge_Mod_ext_h)
+Edge_Grp_haut.addElement(Edge_Mod_int_h)
+
+Edge_Grp_gauche = doc.addEdgeGroup("Edge_Grp_gauche")
+Edge_Grp_gauche.addElement(Edge_Mod_ext_g)
+Edge_Grp_gauche.addElement(Edge_Mod_int_g)
+
+Edge_Grp_bas = doc.addEdgeGroup("Edge_Grp_bas")
+Edge_Grp_bas.addElement(Edge_Mod_int_b)
+Edge_Grp_bas.addElement(Edge_Mod_ext_b)
+
+Edge_Grp_droit = doc.addEdgeGroup("Edge_Grp_droit")
+Edge_Grp_droit.addElement(Edge_Mod_int_d)
+Edge_Grp_droit.addElement(Edge_Mod_ext_d)
+
+
+
+# groupe de noeuds de Hexa 
+Hexa_Nod_Grp = doc.addHexaNodeGroup("Hexa_Nod_Grp")
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_Nod_Grp.addElement(Hexa_i)
+
+
+# groupe de noeuds de Quad 
+Quad_Nod_Grp_h_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_h_1")
+Quad_Nod_Grp_h_1.addElement(Quad_h_1)
+
+Quad_Nod_Grp_b_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_b_1")
+Quad_Nod_Grp_b_1.addElement(Quad_b_1)
+
+# groupe de noeuds de Edge 
+Edge_Nod_Grp_b = doc.addEdgeNodeGroup("Edge_Nod_Grp_b")
+Edge_Nod_Grp_b.addElement(Edge_Mod_int_b)
+Edge_Nod_Grp_b.addElement(Edge_Mod_ext_b)
+
+Edge_Nod_Grp_h = doc.addEdgeNodeGroup("Edge_Nod_Grp_h")
+Edge_Nod_Grp_h.addElement(Edge_Mod_int_d)
+Edge_Nod_Grp_h.addElement(Edge_Mod_ext_d)
+
+
+
+
+# groupe de noeuds de vertex pour tout le modele
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+
+Nbr_Vx = doc.countVertex()
+print "doc.countVertex()->",Nbr_Vx
+
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+Nbr_elm_vex = Vertex_Nod_Grp.countElement()
+
+if Nbr_elm_vex == Nbr_Vx:
+    print "Vertex node group OK (on group :%s  on model : %s)"%(Nbr_elm_vex, Nbr_Vx)
+else:
+    print "Vertex node group KO (on group :%s  on model : %s)"%(Nbr_elm_vex, Nbr_Vx)
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+#Law_X = doc.addLaw( "Uniform" , 4 )
+#Law_Y = doc.addLaw( "Arithmetic" , 2 )
+#Law_Z = doc.addLaw( "Geometric" , 3 )
+
+
+Law_X = doc.addLaw( "Arithmetic" , 5 )
+Law_X.setKind(hexablock.ARITHMETIC)
+Law_X.setCoefficient(0.1)
+
+Law_Y = doc.addLaw( "Arithmetic" , 3 )
+Law_Y.setKind(hexablock.ARITHMETIC)
+Law_Y.setCoefficient(0.1)
+
+#Law_Z = doc.addLaw( "Geometric" , 4 )
+Law_Z = doc.addLaw( "Arithmetic" , 5 )
+Law_Z.setKind(hexablock.ARITHMETIC)
+Law_Z.setCoefficient(0.05)
+
+
+# chercher les propagations du modele
+Edge_Law_X = doc.findEdge( x_mod_h , x_mod_h_t )
+Edge_Law_Y = doc.findEdge( y_mod_h , y_mod_h_t )
+Edge_Law_Z = doc.findEdge( y_mod_h , y_mod_b )
+
+
+Propa_X = doc.findPropagation( Edge_Law_X )
+Propa_Y = doc.findPropagation( Edge_Law_Y )
+Propa_Z = doc.findPropagation( Edge_Law_Z )
+
+
+
+# appliquer la loi de discretisation sur tout le modele et generer le maillage
+Propa_X.setLaw( Law_X )
+Propa_Y.setLaw( Law_Y )
+Propa_Z.setLaw( Law_Z )
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh = hexablock.mesh("test_TUYAU_COURBE_no_assoc", doc)
+
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+salome.sg.updateObjBrowser(1)
+
+#Nombre d hexaedres: 480
+#Nombre de quadrangles: 496
+#Nombre de segments: 160
+#Nombre de noeuds: 700
+
+allGroups = mesh.GetGroups()
+print  " --- GROUPES --- "
+for aGroup in allGroups:
+    print "\nNOM:", aGroup.GetName()
+    print "IDS:", aGroup.GetIDs()
+
+
+
+## --------------------
+## Maillage hexaédrique
+## --------------------
+#mesh = mesh.ExportMED( "tuyau.noassoc.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "tuyau.noassoc.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  " --- MAILLAGE HEXAHEDRIQUE --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
diff --git a/src/TEST_PY/test_TUYAU_COURBE_weird_assoc.py b/src/TEST_PY/test_TUYAU_COURBE_weird_assoc.py
new file mode 100755 (executable)
index 0000000..8f83b87
--- /dev/null
@@ -0,0 +1,790 @@
+# -*- coding: latin-1 -*-
+
+#===============================================
+# By Karima DEBCHI YATAGHENE Nov 2009 at CS 
+#===============================================
+import os
+import geompy
+import smesh
+import hexablock
+import math
+
+# chemin du fichier BREP contenant la CAO
+BREP_PATH = os.path.expandvars("$HEXA_ROOT_DIR/bin/salome/tuyau.brep")
+
+
+
+
+#===================================================================
+#               LE MODELE:
+#   (Pour le tuyau on doit creer une grille cylindrique)
+#===================================================================
+
+
+#=============================
+# PARAMETRES
+#=============================
+R = 4.5
+r = 4.5
+r_t = 3.6
+h = 75.0
+
+
+#=================================================
+# Creation du document
+#=================================================
+doc = hexablock.addDocument()
+
+#=================================================
+# Creation du tuyau (grille cylindrique) dans le document
+#=================================================
+# centre de la grille cylindrique
+c = doc.addVertex(0, 0, 0) 
+
+# vecteurs de la grille cylindrique
+dx = doc.addVector(h, 0, 0)
+dy = doc.addVector(0, h, 0)
+dz = doc.addVector(0, 0, h)
+
+# taille du cylindre
+dr = R
+da = 360
+dl = h
+
+nr = 1
+na = 4
+nl = 1
+
+model_tuyau_fin = doc.makeCylindrical(c, dx, dz, dr, da, dl, nr, na, nl, False)
+# note: on obtient une liste qui contient 4 hexaedres eguaux
+
+
+#===================================================================
+# Recuperation des vertex,edges et quads du model pour l'association
+#
+# h = haut
+# b = bas
+# g = grand
+# p = petit
+# t = trou
+#===================================================================
+
+#=========================
+#       VERTEX
+#=========================
+
+# Face du haut 
+#   grand rayon
+x_mod_h = doc.findVertex( 2*R , 0 , h )
+y_mod_h = doc.findVertex( 0 , 2*R , h )
+z_mod_h = doc.findVertex( -2*R , 0 , h )
+u_mod_h = doc.findVertex( 0 , -2*R , h )
+
+#   petit rayon
+x_mod_h_t = doc.findVertex( R , 0 , h )
+y_mod_h_t = doc.findVertex( 0 , R , h )
+z_mod_h_t = doc.findVertex( -R , 0 , h )
+u_mod_h_t = doc.findVertex( 0 , -R , h )
+
+# Face du bas
+#   grand rayon
+x_mod_b = doc.findVertex( 2*R , 0 , 0 )
+y_mod_b = doc.findVertex( 0 , 2*R , 0 )
+z_mod_b = doc.findVertex( -2*R , 0 , 0 )
+u_mod_b = doc.findVertex( 0 , -2*R , 0 )
+
+#   petit rayon
+x_mod_b_t = doc.findVertex( R , 0 , 0 )
+y_mod_b_t = doc.findVertex( 0 , R , 0 )
+z_mod_b_t = doc.findVertex( -R , 0 , 0 )
+u_mod_b_t = doc.findVertex( 0 , -R , 0 )
+
+
+# vérifications
+assert x_mod_h
+assert y_mod_h
+assert z_mod_h
+assert u_mod_h
+
+assert x_mod_h_t
+assert y_mod_h_t
+assert z_mod_h_t
+assert u_mod_h_t
+
+assert x_mod_b
+assert y_mod_b
+assert z_mod_b
+assert u_mod_b
+
+assert x_mod_b_t
+assert y_mod_b_t
+assert z_mod_b_t
+assert u_mod_b_t
+
+
+#=========================
+#       EDGES
+#=========================
+
+# Face du haut
+
+#   grand rayon
+edge_mod_face_h_1_1 = doc.findEdge( y_mod_h , z_mod_h )
+edge_mod_face_h_1_2 = doc.findEdge( z_mod_h , u_mod_h )
+edge_mod_face_h_2_1 = doc.findEdge( y_mod_h,  x_mod_h )
+edge_mod_face_h_2_2 = doc.findEdge( x_mod_h,  u_mod_h )
+
+#   petit rayon
+edge_mod_t_face_h_1_1 = doc.findEdge( y_mod_h_t , z_mod_h_t )
+edge_mod_t_face_h_1_2 = doc.findEdge( z_mod_h_t , u_mod_h_t )
+edge_mod_t_face_h_2_1 = doc.findEdge( y_mod_h_t,  x_mod_h_t )
+edge_mod_t_face_h_2_2 = doc.findEdge( x_mod_h_t,  u_mod_h_t )
+
+
+# Face du bas
+
+#   grand rayon
+edge_mod_face_b_1_1 = doc.findEdge( y_mod_b , z_mod_b )
+edge_mod_face_b_1_2 = doc.findEdge( z_mod_b , u_mod_b )
+edge_mod_face_b_2_1 = doc.findEdge( y_mod_b,  x_mod_b )
+edge_mod_face_b_2_2 = doc.findEdge( x_mod_b,  u_mod_b )
+
+#   petit rayon
+edge_mod_t_face_b_1_1 = doc.findEdge( y_mod_b_t , z_mod_b_t )
+edge_mod_t_face_b_1_2 = doc.findEdge( z_mod_b_t , u_mod_b_t )
+edge_mod_t_face_b_2_1 = doc.findEdge( y_mod_b_t,  x_mod_b_t )
+edge_mod_t_face_b_2_2 = doc.findEdge( x_mod_b_t,  u_mod_b_t )
+
+
+
+# Joignant faces haut et du bas
+Edge_Mod_ext_h = doc.findEdge( y_mod_h , y_mod_b )
+Edge_Mod_int_h = doc.findEdge( y_mod_h_t , y_mod_b_t )
+
+Edge_Mod_int_b = doc.findEdge( u_mod_h_t , u_mod_b_t )
+Edge_Mod_ext_b = doc.findEdge( u_mod_h , u_mod_b )
+
+Edge_Mod_ext_g = doc.findEdge( x_mod_h , x_mod_b )
+Edge_Mod_int_g = doc.findEdge( x_mod_h_t , x_mod_b_t )
+
+Edge_Mod_int_d = doc.findEdge( z_mod_h_t , z_mod_b_t )
+Edge_Mod_ext_d = doc.findEdge( z_mod_h , z_mod_b )
+
+
+# vérifications
+assert edge_mod_face_h_1_1
+assert edge_mod_face_h_1_2
+assert edge_mod_face_h_2_1
+assert edge_mod_face_h_2_2
+
+assert edge_mod_t_face_h_1_1
+assert edge_mod_t_face_h_1_2
+assert edge_mod_t_face_h_2_1
+assert edge_mod_t_face_h_2_2
+
+assert edge_mod_face_b_1_1
+assert edge_mod_face_b_1_2
+assert edge_mod_face_b_2_1
+assert edge_mod_face_b_2_2
+
+assert edge_mod_t_face_b_1_1
+assert edge_mod_t_face_b_1_2
+assert edge_mod_t_face_b_2_1
+assert edge_mod_t_face_b_2_2
+
+
+assert Edge_Mod_ext_h
+assert Edge_Mod_int_h
+
+assert Edge_Mod_int_b
+assert Edge_Mod_ext_b
+
+assert Edge_Mod_ext_g
+assert Edge_Mod_int_g
+
+assert Edge_Mod_int_d
+assert Edge_Mod_ext_d
+
+
+
+#=========================
+#       QUADS
+#=========================
+Quad_mod_0 = model_tuyau_fin.getQuadJK( 1 , 0 , 0 )
+Quad_mod_1 = model_tuyau_fin.getQuadJK( 1 , 1 , 0 )
+Quad_mod_2 = model_tuyau_fin.getQuadJK( 1 , 2 , 0 )
+Quad_mod_3 = model_tuyau_fin.getQuadJK( 1 , 3 , 0 )
+
+
+
+#===================================================================
+#               LA GEOMETRIE
+#===================================================================
+
+#===================================================================
+# Recuperation des points de la geometrie tuyau pour l'association
+#
+#===================================================================
+Tuyau_geom = geompy.Import(BREP_PATH, "BREP")
+
+
+#=========================
+#       SOMMETS
+#=========================
+Pt_A = geompy.MakeVertex( h , 20 , 4.5 )
+Pt_B = geompy.MakeVertex( h , 20 , 3.6 )
+Pt_C = geompy.MakeVertex( h , 20 , -4.5 )
+Pt_D = geompy.MakeVertex( h , 20 , -3.6 )
+Pt_E = geompy.MakeVertex( 0 , 0 , 2 )
+Pt_F = geompy.MakeVertex( 0 , 0 , 1.6 )
+Pt_G = geompy.MakeVertex( 0 , 0 , -2 )
+Pt_H = geompy.MakeVertex( 0 , 0 , -1.6 )
+
+# Face du bas
+Edge_bas_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_E)
+Edge_bas_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_F)
+Edge_bas_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_G)
+Edge_bas_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_H)
+## Grand rayon
+x_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 0.5)
+y_b = geompy.MakeVertexOnCurve(Edge_bas_droite_grd, 1)
+z_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0.5)
+u_b = geompy.MakeVertexOnCurve(Edge_bas_gauche_grd, 0)
+
+## Petit rayon
+x_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 0.5)
+y_b_t = geompy.MakeVertexOnCurve(Edge_bas_droite_pte, 1)
+z_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0.5)
+u_b_t = geompy.MakeVertexOnCurve(Edge_bas_gauche_pte, 0)
+
+
+# Face du haut
+Edge_haut_droite_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_A)
+Edge_haut_droite_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_B)
+Edge_haut_gauche_grd = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_C)
+Edge_haut_gauche_pte = geompy.GetEdgeNearPoint(Tuyau_geom, Pt_D)
+## Grand rayon
+x_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 0.5)
+y_h = geompy.MakeVertexOnCurve(Edge_haut_droite_grd, 1)
+z_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0.5)
+u_h = geompy.MakeVertexOnCurve(Edge_haut_gauche_grd, 0)
+
+## Petit rayon
+x_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 0.5)
+y_h_t = geompy.MakeVertexOnCurve(Edge_haut_droite_pte, 1)
+z_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0.5)
+u_h_t = geompy.MakeVertexOnCurve(Edge_haut_gauche_pte, 0)
+
+
+
+#=========================
+#       EDGES
+#=========================
+All_Edges_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["EDGE"] )
+
+# Face du haut
+## Grand rayon
+edge_face_h_1   = All_Edges_Tuy_1[11]
+edge_face_h_2   = All_Edges_Tuy_1[14]
+## Petit rayon
+edge_t_face_h_1 = All_Edges_Tuy_1[12]
+edge_t_face_h_2 = All_Edges_Tuy_1[13]
+
+
+# Face du bas
+## Grand rayon
+edge_face_b_1   = All_Edges_Tuy_1[1]
+edge_face_b_2   = All_Edges_Tuy_1[4]
+##  Petit rayon
+edge_t_face_b_1 = All_Edges_Tuy_1[2]
+edge_t_face_b_2 = All_Edges_Tuy_1[3]
+
+
+# Joignant les 2 faces
+
+## edges complètes
+Edge_Tuy_ext_h = All_Edges_Tuy_1[6]
+Edge_Tuy_int_h = All_Edges_Tuy_1[7]
+Edge_Tuy_int_b = All_Edges_Tuy_1[8]
+Edge_Tuy_ext_b = All_Edges_Tuy_1[9]
+
+Pt_Z = geompy.MakeVertex( 75 , 20 , 0 )
+Pt_Z_1 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , 10 )
+Pt_Z_2 = geompy.MakeVertexWithRef( Pt_Z , 0 , 0 , -10 )
+Line_Z1_Z2 = geompy.MakeLineTwoPnt( Pt_Z_1 , Pt_Z_2 )
+
+
+All_Edge_Tuy_ext_h = geompy.SubShapeAllSorted( Edge_Tuy_ext_h , geompy.ShapeType["VERTEX"] )
+
+Vx_Edg_Tuy_ext_h_1 = All_Edge_Tuy_ext_h[0]
+Vx_Edg_Tuy_ext_h_2 = All_Edge_Tuy_ext_h[1]
+
+Vx_Edg_Tuy_ext_h_1_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_1 , -10 , -10 , 0 )
+Vx_Edg_Tuy_ext_h_2_trans = geompy.MakeVertexWithRef( Vx_Edg_Tuy_ext_h_2 , 10 , 0 , 0 )
+
+Line_1 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_1, Vx_Edg_Tuy_ext_h_1_trans)
+Line_2 = geompy.MakeLineTwoPnt(Vx_Edg_Tuy_ext_h_2, Vx_Edg_Tuy_ext_h_2_trans)
+
+Wire = geompy.MakeWire([Line_1, Line_2, Edge_Tuy_ext_h])
+Pipe_Z = geompy.MakePipe( Line_Z1_Z2 , Wire )
+Pipe_Ztt = geompy.MakePipe( Line_Z1_Z2 , Edge_Tuy_ext_h )
+Partition_Ztt = geompy.MakePartition([Tuyau_geom], [Pipe_Ztt], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
+All_Edges_Tuy_2tt = geompy.SubShapeAllSorted( Partition_Ztt , geompy.ShapeType["EDGE"] )
+
+Edge_Tuy_ext_g = All_Edges_Tuy_2tt[12]
+Edge_Tuy_int_g = All_Edges_Tuy_2tt[13]
+Edge_Tuy_ext_d = All_Edges_Tuy_2tt[10]
+Edge_Tuy_int_d = All_Edges_Tuy_2tt[11]
+
+## une edge en plusieurs(4) morceaux : Edge_Tuy_ext_h
+X_pln1 = geompy.MakeVertexWithRef( Pt_Z , -20 , 0 , 0 )
+Vec_X = geompy.MakeVectorDXDYDZ( 1 , 0 , 0 )
+
+Plan1 = geompy.MakePlane( X_pln1 , Vec_X , 200 )
+Plan2 = geompy.MakeTranslation( Plan1 , -20 , 0 , 0 )
+Plan3 = geompy.MakeTranslation( Plan1 , -40 , 0 , 0 )
+
+Partition_Edge_g_d_h_b = geompy.MakePartition([
+    Edge_Tuy_ext_h,
+    Edge_Tuy_int_h,
+    Edge_Tuy_ext_b,
+    Edge_Tuy_int_b,
+    Edge_Tuy_ext_g,
+    Edge_Tuy_int_g,
+    Edge_Tuy_ext_d,
+    Edge_Tuy_int_d], 
+    [Plan1, Plan2, Plan3], [], [], geompy.ShapeType["EDGE"], 0, [], 0)
+
+All_Edge_g_d_h_b = geompy.SubShapeAllSorted( Partition_Edge_g_d_h_b , geompy.ShapeType["EDGE"] )
+Edge_Tuy_ext_h_1 = All_Edge_g_d_h_b[0]
+Edge_Tuy_ext_h_2 = All_Edge_g_d_h_b[15]
+Edge_Tuy_ext_h_3 = All_Edge_g_d_h_b[23]
+Edge_Tuy_ext_h_4 = All_Edge_g_d_h_b[31]
+
+
+
+## une edge découpée en plusieurs morceaux n'épousant pas la géométrie: 
+VX_A = geompy.MakeVertexOnCurve(Edge_Tuy_ext_d, 0.)
+VX_B = geompy.MakeVertexOnCurve(Edge_Tuy_ext_d, 1.)
+VX_C = geompy.MakeVertexOnCurve(Edge_Tuy_ext_d, 0.25)
+#VX_Cbis = geompy.MakeVertexWithRef(VX_C, -10, 10, 0)
+VX_Cbis = geompy.MakeVertexWithRef(VX_C, -5, 1, -4)
+
+weird_part = geompy.MakePartition([Edge_Tuy_ext_d], [VX_C], [], [], geompy.ShapeType["EDGE"])
+
+weird_edge0 = geompy.GetEdge(weird_part, VX_C, VX_B)
+weird_edge1 = geompy.MakeEdge(VX_Cbis, VX_C )
+weird_edge2 = geompy.MakeEdge(VX_A, VX_Cbis   )
+
+
+#=========================
+#       FACES
+#=========================
+All_Faces_Tuy_1 = geompy.SubShapeAllSorted( Tuyau_geom , geompy.ShapeType["FACE"] )
+
+Face_Tuy_ext_1 = All_Faces_Tuy_1[4]
+Face_Tuy_ext_2 = All_Faces_Tuy_1[5]
+
+Partition_Face = geompy.MakePartition([ Face_Tuy_ext_1 , Face_Tuy_ext_2 ], [ Plan1 , Plan2 , Plan3 , Pipe_Z ], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+
+
+All_Faces_Partition_Face = geompy.SubShapeAllSorted( Partition_Face , geompy.ShapeType["FACE"] )
+
+## -------------------------------------
+Face_0 = All_Faces_Partition_Face[0]
+Face_6 = All_Faces_Partition_Face[6]
+Face_10 = All_Faces_Partition_Face[10]
+Face_14 = All_Faces_Partition_Face[14]
+
+## -------------------------------------
+Face_1 = All_Faces_Partition_Face[1]
+Face_7 = All_Faces_Partition_Face[7]
+Face_11 = All_Faces_Partition_Face[11]
+Face_15 = All_Faces_Partition_Face[15]
+
+## -------------------------------------
+Face_2 = All_Faces_Partition_Face[2]
+Face_4 = All_Faces_Partition_Face[4]
+Face_8 = All_Faces_Partition_Face[8]
+Face_12 = All_Faces_Partition_Face[12]
+
+## -------------------------------------
+Face_3 = All_Faces_Partition_Face[3]
+Face_5 = All_Faces_Partition_Face[5]
+Face_9 = All_Faces_Partition_Face[9]
+Face_13 = All_Faces_Partition_Face[13]
+
+
+
+
+
+#==========================================================
+#               LES ASSOCIATIONS
+#==========================================================
+
+##===========================================
+##          VERTEX
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+x_mod_h.setAssociation( x_h )
+y_mod_h.setAssociation( y_h )
+z_mod_h.setAssociation( z_h )
+u_mod_h.setAssociation( u_h )
+
+## Petit rayon
+x_mod_h_t.setAssociation( x_h_t )
+y_mod_h_t.setAssociation( y_h_t )
+z_mod_h_t.setAssociation( z_h_t )
+u_mod_h_t.setAssociation( u_h_t )
+
+
+# Face du bas
+
+## Grand rayon
+x_mod_b.setAssociation( x_b )
+y_mod_b.setAssociation( y_b )
+z_mod_b.setAssociation( z_b )
+u_mod_b.setAssociation( u_b )
+
+## Petit rayon
+x_mod_b_t.setAssociation( x_b_t )
+y_mod_b_t.setAssociation( y_b_t )
+z_mod_b_t.setAssociation( z_b_t )
+u_mod_b_t.setAssociation( u_b_t )
+
+
+##===========================================
+##          EDGES
+##===========================================
+
+# Face du haut
+
+## Grand rayon
+edge_mod_face_h_1_1.addAssociation( edge_face_h_1, 0.5, 1. )
+edge_mod_face_h_1_2.addAssociation( edge_face_h_1, 0., 0.5 )
+edge_mod_face_h_2_1.addAssociation( edge_face_h_2, 0.5, 1. )
+edge_mod_face_h_2_2.addAssociation( edge_face_h_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_h_1_1.addAssociation( edge_t_face_h_1, 0.5, 1. )
+edge_mod_t_face_h_1_2.addAssociation( edge_t_face_h_1, 0., 0.5 )
+edge_mod_t_face_h_2_1.addAssociation( edge_t_face_h_2, 0.5, 1. )
+edge_mod_t_face_h_2_2.addAssociation( edge_t_face_h_2, 0., 0.5 )
+
+# Face du bas
+
+## Grand rayon
+edge_mod_face_b_1_1.addAssociation( edge_face_b_1, 0.5, 1. )
+edge_mod_face_b_1_2.addAssociation( edge_face_b_1, 0., 0.5 )
+edge_mod_face_b_2_1.addAssociation( edge_face_b_2, 0.5, 1. )
+edge_mod_face_b_2_2.addAssociation( edge_face_b_2, 0., 0.5 )
+
+## Petit rayon
+edge_mod_t_face_b_1_1.addAssociation( edge_t_face_b_1, 0.5, 1. )
+edge_mod_t_face_b_1_2.addAssociation( edge_t_face_b_1, 0., 0.5 )
+edge_mod_t_face_b_2_1.addAssociation( edge_t_face_b_2, 0.5, 1. )
+edge_mod_t_face_b_2_2.addAssociation( edge_t_face_b_2, 0., 0.5 )
+
+
+
+# Joignant les 2 faces
+#Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_1, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_2, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_3, 0., 1. )
+Edge_Mod_ext_h.addAssociation( Edge_Tuy_ext_h_4, 0., 1. )
+Edge_Mod_int_h.addAssociation( Edge_Tuy_int_h, 0., 1. )
+
+Edge_Mod_int_b.addAssociation( Edge_Tuy_int_b, 0., 1. )
+Edge_Mod_ext_b.addAssociation( Edge_Tuy_ext_b, 0., 1. )
+
+Edge_Mod_ext_g.addAssociation( Edge_Tuy_ext_g, 0., 1. )
+Edge_Mod_int_g.addAssociation( Edge_Tuy_int_g, 0., 1. )
+
+Edge_Mod_int_d.addAssociation( Edge_Tuy_int_d, 0., 1. )
+#Edge_Mod_ext_d.addAssociation( Edge_Tuy_ext_d, 0., 1. )
+Edge_Mod_ext_d.addAssociation( weird_edge0, 0., 1. )
+Edge_Mod_ext_d.addAssociation( weird_edge1, 0., 1. )
+Edge_Mod_ext_d.addAssociation( weird_edge2, 0., 1. )
+
+
+
+##===========================================
+##          FACES
+##===========================================
+
+#Quad_mod_1.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_1.addAssociation( Face_0 )
+Quad_mod_1.addAssociation( Face_6 )
+Quad_mod_1.addAssociation( Face_10 )
+Quad_mod_1.addAssociation( Face_14 )
+
+#Quad_mod_0.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_0.addAssociation( Face_1 )
+Quad_mod_0.addAssociation( Face_7 )
+Quad_mod_0.addAssociation( Face_11 )
+Quad_mod_0.addAssociation( Face_15 )
+
+#Quad_mod_2.addAssociation( Face_Tuy_ext_1 )
+Quad_mod_2.addAssociation( Face_2 )
+Quad_mod_2.addAssociation( Face_4 )
+Quad_mod_2.addAssociation( Face_8 )
+Quad_mod_2.addAssociation( Face_12 )
+
+#Quad_mod_3.addAssociation( Face_Tuy_ext_2 )
+Quad_mod_3.addAssociation( Face_3 )
+Quad_mod_3.addAssociation( Face_5 )
+Quad_mod_3.addAssociation( Face_9 )
+Quad_mod_3.addAssociation( Face_13 )
+
+
+
+#==========================================================
+#       LA GEOMETRIE DANS L'ARBRE D'ETUDE SALOME
+#==========================================================
+#for i,e in enumerate(All_Edges_Tuy_1): geompy.addToStudy( e, "edge_"+str(i) )
+geompy.addToStudy(Tuyau_geom, "Tuyau_geom")
+geompy.addToStudy( x_h, "x_h" )
+geompy.addToStudy( y_h, "y_h" )
+geompy.addToStudy( z_h, "z_h" )
+geompy.addToStudy( u_h, "u_h" )
+geompy.addToStudy( x_h_t, "x_h_t")
+geompy.addToStudy( y_h_t, "y_h_t" )
+geompy.addToStudy( z_h_t, "z_h_t" )
+geompy.addToStudy( u_h_t, "u_h_t" )
+
+geompy.addToStudy( x_b, "x_b")
+geompy.addToStudy( y_b, "y_b" )
+geompy.addToStudy( z_b, "z_b" )
+geompy.addToStudy( u_b, "u_b")
+geompy.addToStudy( x_b_t, "x_b_t" )
+geompy.addToStudy( y_b_t, "y_b_t" )
+geompy.addToStudy( z_b_t, "z_b_t" )
+geompy.addToStudy( u_b_t, "u_b_t" )
+
+
+#geompy.addToStudy(Line_Z1_Z2, "Line_Z1_Z2")
+#geompy.addToStudy(Pipe_Ztt, "Pipe_Ztt")
+#geompy.addToStudy( Partition_Ztt , "Partition_Ztt" )
+geompy.addToStudy( Edge_Tuy_ext_h , "Edge_Tuy_ext_h" )
+geompy.addToStudy( Edge_Tuy_int_h , "Edge_Tuy_int_h" )
+geompy.addToStudy( Edge_Tuy_int_b , "Edge_Tuy_int_b" )
+geompy.addToStudy( Edge_Tuy_ext_b , "Edge_Tuy_ext_b" )
+geompy.addToStudy( Edge_Tuy_ext_g , "Edge_Tuy_ext_g" )
+geompy.addToStudy( Edge_Tuy_int_g , "Edge_Tuy_int_g" )
+geompy.addToStudy( Edge_Tuy_ext_d , "Edge_Tuy_ext_d" )
+geompy.addToStudy( Edge_Tuy_int_d , "Edge_Tuy_int_d" )
+#geompy.addToStudy( Partition_Edge_g_d_h_b , "Partition_Edge_g_d_h_b" )
+geompy.addToStudy( Face_Tuy_ext_1 , "Face_Tuy_ext_1" )
+geompy.addToStudy( Face_Tuy_ext_2 , "Face_Tuy_ext_2" )
+#geompy.addToStudy( Partition_Face , "Partition_Face" )
+geompy.addToStudy( Face_0 , "Face_0" )
+geompy.addToStudy( Face_1 , "Face_1" )
+geompy.addToStudy( Face_2 , "Face_2" )
+geompy.addToStudy( Face_3 , "Face_3" )
+geompy.addToStudy( Face_4 , "Face_4" )
+geompy.addToStudy( Face_5 , "Face_5" )
+geompy.addToStudy( Face_6 , "Face_6" )
+geompy.addToStudy( Face_7 , "Face_7" )
+geompy.addToStudy( Face_8 , "Face_8" )
+geompy.addToStudy( Face_9 , "Face_9" )
+geompy.addToStudy( Face_10 , "Face_10" )
+geompy.addToStudy( Face_11 , "Face_11" )
+geompy.addToStudy( Face_12 , "Face_12" )
+geompy.addToStudy( Face_13 , "Face_13" )
+geompy.addToStudy( Face_14 , "Face_14" )
+geompy.addToStudy( Face_15 , "Face_15" )
+
+
+
+
+
+#====================================
+# CREATION MAILLAGE
+#====================================
+
+
+##=================================================
+## Definir les groupes d'elements pour le maillage
+##=================================================
+
+# groupe de Hexa(volumes) 
+Hexa_grp = doc.addHexaGroup("Hexa_grp")
+Nbr_Hex = doc.countHexa()
+
+
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_grp.addElement(Hexa_i)
+
+Nbr_elm_hex = Hexa_grp.countElement()
+print "Hexa_grp.countElement() ->",Nbr_elm_hex
+
+
+# groupe de quads (faces)
+Quad_grp_haut = doc.addQuadGroup("Quad_grp_haut")
+Quad_h_1 = doc.findQuad( x_mod_h , y_mod_h_t )
+Quad_h_2 = doc.findQuad( y_mod_h_t , z_mod_h )
+Quad_h_3 = doc.findQuad( z_mod_h , u_mod_h_t )
+Quad_h_4 = doc.findQuad( u_mod_h_t , x_mod_h )
+
+assert Quad_h_1
+assert Quad_h_2
+assert Quad_h_3
+assert Quad_h_4
+
+for Quad_h_i in [ Quad_h_1 , Quad_h_2 , Quad_h_3 , Quad_h_4 ]:
+    Quad_grp_haut.addElement(Quad_h_i)
+
+
+Quad_grp_bas = doc.addQuadGroup("Quad_grp_bas")
+Quad_b_1 = doc.findQuad( x_mod_b , y_mod_b_t )
+Quad_b_2 = doc.findQuad( y_mod_b_t , z_mod_b )
+Quad_b_3 = doc.findQuad( z_mod_b , u_mod_b_t )
+Quad_b_4 = doc.findQuad( u_mod_b_t , x_mod_b )
+
+
+assert Quad_b_1
+assert Quad_b_2
+assert Quad_b_3
+assert Quad_b_4
+
+for Quad_b_i in [ Quad_b_1 , Quad_b_2 , Quad_b_3 , Quad_b_4 ]:
+    Quad_grp_bas.addElement(Quad_b_i)
+
+#Nbr_elm_qad_bas = Quad_grp_bas.countElement()
+#print "Nbr_elm_qad_bas->",Nbr_elm_qad_bas
+
+
+
+# groupe de Edges
+Edge_Grp_haut = doc.addEdgeGroup("Edge_Grp_haut")
+Edge_Grp_haut.addElement(Edge_Mod_ext_h)
+Edge_Grp_haut.addElement(Edge_Mod_int_h)
+
+Edge_Grp_gauche = doc.addEdgeGroup("Edge_Grp_gauche")
+Edge_Grp_gauche.addElement(Edge_Mod_ext_g)
+Edge_Grp_gauche.addElement(Edge_Mod_int_g)
+
+Edge_Grp_bas = doc.addEdgeGroup("Edge_Grp_bas")
+Edge_Grp_bas.addElement(Edge_Mod_int_b)
+Edge_Grp_bas.addElement(Edge_Mod_ext_b)
+
+Edge_Grp_droit = doc.addEdgeGroup("Edge_Grp_droit")
+Edge_Grp_droit.addElement(Edge_Mod_int_d)
+Edge_Grp_droit.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de Hexa 
+Hexa_Nod_Grp = doc.addHexaNodeGroup("Hexa_Nod_Grp")
+for i in range(Nbr_Hex):
+    Hexa_i = doc.getHexa(i)
+    Hexa_Nod_Grp.addElement(Hexa_i)
+
+# groupe de noeuds de Quad 
+Quad_Nod_Grp_h_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_h_1")
+Quad_Nod_Grp_h_1.addElement(Quad_h_1)
+
+Quad_Nod_Grp_b_1 = doc.addQuadNodeGroup("Quad_Nod_Grp_b_1")
+Quad_Nod_Grp_b_1.addElement(Quad_b_1)
+
+# groupe de noeuds de Edge 
+Edge_Nod_Grp_b = doc.addEdgeNodeGroup("Edge_Nod_Grp_b")
+Edge_Nod_Grp_b.addElement(Edge_Mod_int_b)
+Edge_Nod_Grp_b.addElement(Edge_Mod_ext_b)
+
+Edge_Nod_Grp_h = doc.addEdgeNodeGroup("Edge_Nod_Grp_h")
+Edge_Nod_Grp_h.addElement(Edge_Mod_int_d)
+Edge_Nod_Grp_h.addElement(Edge_Mod_ext_d)
+
+
+# groupe de noeuds de vertex pour tout le modele
+Vertex_Nod_Grp = doc.addVertexNodeGroup("Vertex_Nod_Grp")
+Nbr_Vx = doc.countVertex()
+for i in range(Nbr_Vx):
+    Vertex_i = doc.getVertex(i)
+    Vertex_Nod_Grp.addElement(Vertex_i)
+
+
+#====================================
+# Definir une loi de discretisation
+#====================================
+bp_law = doc.getLaw(0)
+bp_law.setNodes(4)
+
+# definir une loi: le choix de la loi reste aux utilisateurs
+
+#Law_X = doc.addLaw( "Uniform" , 4 )
+#Law_Y = doc.addLaw( "Arithmetic" , 2 )
+#Law_Z = doc.addLaw( "Geometric" , 3 )
+Law_X = doc.addLaw( "Arithmetic" , 5 )
+Law_X.setKind(hexablock.ARITHMETIC)
+Law_X.setCoefficient(0.1)
+
+Law_Y = doc.addLaw( "Arithmetic" , 3 )
+Law_Y.setKind(hexablock.ARITHMETIC)
+Law_Y.setCoefficient(0.1)
+
+#Law_Z = doc.addLaw( "Geometric" , 4 )
+Law_Z = doc.addLaw( "Arithmetic" , 5 )
+Law_Z.setKind(hexablock.ARITHMETIC)
+Law_Z.setCoefficient(0.05)
+
+
+# chercher les propagations du modele
+Edge_Law_X = doc.findEdge( x_mod_h , x_mod_h_t )
+Edge_Law_Y = doc.findEdge( y_mod_h , y_mod_h_t )
+Edge_Law_Z = doc.findEdge( y_mod_h , y_mod_b )
+
+Propa_X = doc.findPropagation( Edge_Law_X )
+Propa_Y = doc.findPropagation( Edge_Law_Y )
+Propa_Z = doc.findPropagation( Edge_Law_Z )
+
+# appliquer la loi de discretisation sur tout le modele et generer le maillage
+Propa_X.setLaw( Law_X )
+Propa_Y.setLaw( Law_Y )
+Propa_Z.setLaw( Law_Z )
+
+print  " --- MAILLAGE HEXAHEDRIQUE --- "
+mesh = hexablock.mesh("test_TUYAU_COURBE_weird_assoc", doc)
+
+print "Nombre d hexaedres:"   , mesh.NbHexas()
+print "Nombre de quadrangles:", mesh.NbQuadrangles()
+print "Nombre de segments:"   , mesh.NbEdges()
+print "Nombre de noeuds:"     , mesh.NbNodes()
+
+salome.sg.updateObjBrowser(1)
+
+#Nombre d hexaedres: 480
+#Nombre de quadrangles: 496
+#Nombre de segments: 160
+#Nombre de noeuds: 700
+
+allGroups = mesh.GetGroups()
+print  " --- GROUPES --- "
+for aGroup in allGroups:
+    print "\nNOM:", aGroup.GetName()
+    print "IDS:", aGroup.GetIDs()
+
+
+
+## --------------------
+## Maillage hexaédrique
+## --------------------
+#mesh = mesh.ExportMED( "tuyau.med", 1 )
+#maillages = smesh.CreateMeshesFromMED( "tuyau.med" )
+
+#ijk = maillages[0][0]
+
+#ijk.Hexahedron()
+
+#ijk.Compute()
+
+#print  " --- MAILLAGE HEXAHEDRIQUE --- "
+#print "Nombre d hexaedres:", ijk.NbHexas()
+#print "Nombre de quadrangles:", ijk.NbQuadrangles()
+#print "Nombre de segments:", ijk.NbEdges()
+#print "Nombre de noeuds:", ijk.NbNodes()
diff --git a/src/TEST_PY/tuyau.brep b/src/TEST_PY/tuyau.brep
new file mode 100755 (executable)
index 0000000..ec768b0
--- /dev/null
@@ -0,0 +1,426 @@
+DBRep_DrawableShape
+
+CASCADE Topology V1, (c) Matra-Datavision
+Locations 0
+Curve2ds 28
+1 0 0 0 1 
+1 0 0 0 1 
+1 0 0 1 0 
+3 5.0000000000000009 0 -1 -0 -0 1 5 2
+1 3.1415926535897931 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 0 1 1 0 
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 4.5
+3 5.0000000000000009 0 -1 -0 -0 1 5 2
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 4.5
+1 0 0 1 0 
+1 0 0 1 0 
+1 0 0 1 0 
+3 5.0000000000000009 0 -1 -0 -0 1 4 1.6000000000000001
+1 10.000000000000002 2.4492935982947064e-16 -1 -4.8985871965894112e-17 
+1 10.000000000000002 2.4492935982947064e-16 -1 -4.8985871965894112e-17 
+1 0 0 0 1 
+1 0 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 3.1415926535897931 0 0 1 
+1 0 1 1 0 
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 3.6000000000000001
+3 5.0000000000000009 0 -1 -0 -0 1 4 1.6000000000000001
+2 0 -4.5 -6.123233995736766e-17 1 1 6.123233995736766e-17 3.6000000000000001
+1 0 -0 6.1232339957367759e-17 -1 
+1 0 -0 6.1232339957367759e-17 -1 
+1 1.1021821192326179e-15 -9 -1.8369701987210317e-16 1 
+1 1.1021821192326179e-15 -9 -1.8369701987210317e-16 1 
+Curves 16
+7 1 0  7 8 2  3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 -5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 -3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 -8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1
+ 0 8 1 8
+7 0 0  10 11 2  3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  3.5355339059328195 -3.5355339059328195 -0.62831853071801369  3.1478202812511471 -3.1478202812511471 -1.2566370068591419  2.3723834259365431 -2.3723834259365431 -1.7988274783398068  1.2775986014269276 -1.2775986014269276 -2.1687580291315651  1.1719514247943195e-12 -1.1719514247943195e-12 -2.3005529012372383  -1.2775986014289811 1.2775986014289811 -2.1687580291316819  -2.3723834259351833 2.3723834259351833 -1.7988274783396521  -3.1478202812517777 3.1478202812517777 -1.256637006859245  -3.5355339059326556 3.5355339059326556 -0.62831853071798205  -3.5355339059327386 3.5355339059327386 2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 1 0  7 8 2  -3.5355339059327386 3.5355339059327386 2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 -1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 -5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 -1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 -1.5086264655892687e-15  1 75.000000000000014 24.5 -1.5086264655892687e-15  1
+ 0 8 1 8
+7 0 0  10 11 2  75 15.5 0  74.999999999999105 15.49999999999994 -1.4137166941154202  75.000000000003425 15.993478879707238 -2.8274332654334842  74.999999999990621 16.98044886550209 -4.0473618262637086  75.000000000018389 18.373882457535071 -4.8797055655472787  74.999999999974861 19.999999999996184 -5.1762440277824107  75.00000000002386 21.626117542471153 -4.879705565547396  74.999999999984084 23.019551134494474 -4.047361826263554  75.000000000007219 24.006521120294067 -2.8274332654335823  74.999999999998124 24.499999999999748 -1.4137166941153954  75.000000000000014 24.5 -1.5086264655892687e-15 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  3.5355339059327386 -3.5355339059327386 -4.4408920985006262e-16  3.5355339059328195 -3.5355339059328195 0.62831853071801369  3.1478202812511471 -3.1478202812511471 1.2566370068591419  2.3723834259365431 -2.3723834259365431 1.7988274783398068  1.2775986014269276 -1.2775986014269276 2.1687580291315651  1.1719514247943195e-12 -1.1719514247943195e-12 2.3005529012372383  -1.2775986014289811 1.2775986014289811 2.1687580291316819  -2.3723834259351833 2.3723834259351833 1.7988274783396521  -3.1478202812517777 3.1478202812517777 1.256637006859245  -3.5355339059326556 3.5355339059326556 0.62831853071798205  -3.5355339059327386 3.5355339059327386 -2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  75 15.5 0  74.999999999999105 15.49999999999994 1.4137166941154202  75.000000000003425 15.993478879707238 2.8274332654334842  74.999999999990621 16.98044886550209 4.0473618262637086  75.000000000018389 18.373882457535071 4.8797055655472787  74.999999999974861 19.999999999996184 5.1762440277824107  75.00000000002386 21.626117542471153 4.879705565547396  74.999999999984084 23.019551134494474 4.047361826263554  75.000000000007219 24.006521120294067 2.8274332654335823  74.999999999998124 24.499999999999748 1.4137166941153954  75.000000000000014 24.5 1.5086264655892687e-15 
+ 0 11 3.1415926535897931 11
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654757 0.70710678118654757 0 
+7 0 0  10 11 2  2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  2.8284271247462276 -2.8284271247462276 -0.50265482457439326  2.5182562250010312 -2.5182562250010312 -1.0053096054873778  1.8979067407489889 -1.8979067407489889 -1.4390619826717084  1.0220788811419279 -1.0220788811419279 -1.7350064233054643  4.6762593797211755e-13 -4.6762593797211755e-13 -1.8404423209895382  -1.0220788811427488 1.0220788811427488 -1.73500642330558  -1.8979067407484411 1.8979067407484411 -1.4390619826715594  -2.5182562250012874 2.5182562250012874 -1.0053096054874726  -2.8284271247461601 2.8284271247461601 -0.50265482457436672  -2.8284271247461903 2.8284271247461903 2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+1 -3.5355339059327378 3.5355339059327378 -2.4492935982947064e-16 0.70710678118654757 -0.70710678118654757 4.8985871965894125e-17 
+7 1 0  7 8 2  2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 -8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 -3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 4.4408920985006262e-16  1 75 16.399999999999999 4.4408920985006262e-16  1
+ 0 8 1 8
+7 1 0  7 8 2  -2.8284271247461903 2.8284271247461903 2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 -4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 -1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 -1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 2.141842990487521e-16  1 75.000000000000014 23.600000000000001 2.1418429904875208e-16  1
+ 0 8 1 8
+7 0 0  10 11 2  75 16.399999999999999 4.4408920985006262e-16  74.999999999999105 16.399999999999604 -1.1309733552923305  75.000000000003425 16.79478310376723 -2.2619466123468186  74.999999999990621 17.584359092398095 -3.2378894610108695  75.000000000018389 18.699105966034271 -3.9037644524379904  74.999999999974861 19.999999999989107 -4.1409952222257402  75.00000000002386 21.300894033984143 -3.9037644524380775  74.999999999984084 22.415640907590802 -3.2378894610107412  75.000000000007219 23.205216896237388 -2.261946612346911  74.999999999998124 23.599999999999262 -1.1309733552923047  75.000000000000014 23.600000000000001 2.1418429904875208e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  2.8284271247461912 -2.8284271247461912 -4.4408920985006262e-16  2.8284271247462276 -2.8284271247462276 0.50265482457439326  2.5182562250010312 -2.5182562250010312 1.0053096054873778  1.8979067407489889 -1.8979067407489889 1.4390619826717084  1.0220788811419279 -1.0220788811419279 1.7350064233054643  4.6762593797211755e-13 -4.6762593797211755e-13 1.8404423209895382  -1.0220788811427488 1.0220788811427488 1.73500642330558  -1.8979067407484411 1.8979067407484411 1.4390619826715594  -2.5182562250012874 2.5182562250012874 1.0053096054874726  -2.8284271247461601 2.8284271247461601 0.50265482457436672  -2.8284271247461903 2.8284271247461903 -2.2204460492503131e-16 
+ 0 11 3.1415926535897931 11
+7 0 0  10 11 2  75 16.399999999999999 -4.4408920985006262e-16  74.999999999999105 16.399999999999604 1.1309733552923305  75.000000000003425 16.79478310376723 2.2619466123468186  74.999999999990621 17.584359092398095 3.2378894610108695  75.000000000018389 18.699105966034271 3.9037644524379904  74.999999999974861 19.999999999989107 4.1409952222257402  75.00000000002386 21.300894033984143 3.9037644524380775  74.999999999984084 22.415640907590802 3.2378894610107412  75.000000000007219 23.205216896237388 2.261946612346911  74.999999999998124 23.599999999999262 1.1309733552923047  75.000000000000014 23.600000000000001 -2.1418429904875208e-16 
+ 0 11 3.1415926535897931 11
+1 75 15.5 2.7554552980815448e-16 0 1 -6.1232339957367759e-17 
+1 75 24.5 -8.2663658942446333e-16 0 -1 1.8369701987210317e-16 
+Polygon3D 0
+PolygonOnTriangulations 0
+Surfaces 8
+9 1 0 0 0 10 7 11 8 2 2 3.5355339059327386 -3.5355339059327386 4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 -5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 -3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 -8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1 
+3.5355339059328195 -3.5355339059328195 -0.62831853071801369  1 9.604885542379284 5.6779402750195667 -0.73164124169730604  0.99999999999999989 18.214762018200037 14.344823330601164 -1.0469888149911395  1.0000000000000058 31.904943295730241 14.237869646359984 -0.39948502431303995  0.99999999999998868 37.172160522650039 17.649881411357878 -2.4092611365725189  1.0000000000000071 52.812746249132488 14.816123728706323 -1.1284938924273324  0.99999999999999833 63.447227270625511 15.499999999999938 -1.4137166941154204  1 74.999999999999105 15.49999999999994 -1.4137166941154202  1 
+3.1478202812511471 -3.1478202812511471 -1.2566370068591419  1 9.2729214810444986 6.0754899681670214 -1.463282419842884  0.99999999999999989 17.996467481271083 14.829610120007128 -2.0939775390394035  1.0000000000000058 31.697282681850869 14.286806537772526 -0.79897001392370559  0.99999999999998868 37.435707603251764 18.516402695092999 -4.8185220638754691  1.0000000000000071 52.733554746481623 15.206631940884614 -2.2569876868315566  0.99999999999999833 63.447227270622655 15.993478879707236 -2.8274332654334846  1 75.000000000003425 15.993478879707238 -2.8274332654334842  1 
+2.3723834259365431 -2.3723834259365431 -1.7988274783398068  1 8.6089851336806884 6.8705992041127821 -2.0946324284719631  0.99999999999999989 17.559872998990649 15.799195709829741 -2.9974482015801436  1.0000000000000058 31.28195630911361 14.384681533173158 -1.1436948041305759  0.99999999999998868 37.962808294048074 20.249466731308765 -6.897528758237212  1.0000000000000071 52.575169779178417 15.987658040456525 -3.2307909501209608  0.99999999999999833 63.447227270628531 16.98044886550209 -4.0473618262637086  1 74.999999999990621 16.98044886550209 -4.0473618262637086  1 
+1.2775986014269276 -1.2775986014269276 -2.1687580291315651  1 7.6716200438365361 7.9931580809223801 -2.5253955435015549  0.99999999999999989 16.943475918531011 17.168085494405027 -3.6138762234641644  1.0000000000000058 30.695586178585053 14.522864363617154 -1.3788967086524706  0.99999999999998868 38.706984732566291 22.696258103010518 -8.3160119887771682  1.0000000000000071 52.351557169731038 17.090333926265838 -3.8952061261517525  0.99999999999999833 63.447227270621916 18.373882457535071 -4.8797055655472787  1 75.000000000018389 18.373882457535071 -4.8797055655472787  1 
+1.1719514247943195e-12 -1.1719514247943195e-12 -2.3005529012372383  1 6.5777280744114703 9.3031686135167266 -2.6788631863653043  0.99999999999999989 16.224149133738432 18.76556075628185 -3.8334905595379762  1.0000000000000058 30.011300424905656 14.684121797300168 -1.462691909845385  0.99999999999998868 39.575428243818408 25.551629463869848 -8.8213739156197359  1.0000000000000071 52.09060437734513 18.377141286086164 -4.1319168086379028  0.99999999999999833 63.447227270625667 19.999999999996184 -5.1762440277824107  1 74.999999999974861 19.999999999996184 -5.1762440277824107  1 
+-1.2775986014289811 1.2775986014289811 -2.1687580291316819  1 5.4838361049540145 10.613179146115629 -2.5253955435017352  0.99999999999999989 15.504822348881138 20.363036018212849 -3.613876223464215  1.0000000000000058 29.327014671318086 14.845379230678686 -1.3788967086533002  0.99999999999998868 40.443871755058836 28.407000824990529 -8.3160119887766726  1.0000000000000071 51.829651584897462 19.663948645853612 -3.8952061261520572  0.99999999999999833 63.447227270625788 21.626117542471153 -4.879705565547396  1 75.00000000002386 21.626117542471153 -4.879705565547396  1 
+-2.3723834259351833 2.3723834259351833 -1.7988274783396521  1 4.5464710151344043 11.735738022921637 -2.0946324284717539  0.99999999999999989 14.888425268470534 21.73192580274673 -2.9974482015801169  1.0000000000000058 28.740644540721632 14.983562061355201 -1.1436948041293928  0.99999999999998868 41.188048193587157 30.853792196494638 -6.8975287582379137  1.0000000000000071 51.606038975498372 20.766624531703982 -3.2307909501205487  0.99999999999999833 63.447227270623706 23.019551134494478 -4.047361826263554  1 74.999999999984084 23.019551134494474 -4.047361826263554  1 
+-3.1478202812517777 3.1478202812517777 -1.256637006859245  1 3.8825346677568429 12.530847258869537 -1.4632824198430057  0.99999999999999989 14.451830786163059 22.701511392593083 -2.093977539039428  1.0000000000000058 28.32531816801977 15.081437056623322 -0.79897001392448364  0.99999999999998868 41.715148884378252 32.586856232821489 -4.8185220638750348  1.0000000000000071 51.447654008166793 21.547650631251887 -2.2569876868317986  0.99999999999999833 63.447227270625731 24.006521120294064 -2.8274332654335819  1 75.000000000007219 24.006521120294067 -2.8274332654335823  1 
+-3.5355339059326556 3.5355339059326556 -0.62831853071798205  1 3.5505706064273257 12.928396952016087 -0.73164124169727363  0.99999999999999989 14.233536249244064 23.186298181990281 -1.0469888149911422  1.0000000000000058 28.117657554128364 15.130373948086152 -0.39948502431278238  0.99999999999998868 41.978695964980815 33.453377516515026 -2.4092611365726784  1.0000000000000071 51.368462505527397 21.938158843439282 -1.1284938924272563  0.99999999999999833 63.447227270624651 24.499999999999744 -1.4137166941153956  1 74.999999999998124 24.499999999999748 -1.4137166941153954  1 
+-3.5355339059327386 3.5355339059327386 2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 -1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 -5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 -1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 -1.5086264655892687e-15  1 75.000000000000014 24.5 -1.5086264655892687e-15  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+9 1 0 0 0 10 7 11 8 2 2 3.5355339059327386 -3.5355339059327386 -4.4408920985006262e-16  1 9.6048855423786907 5.6779402750195374 5.742238377723344e-16  0.99999999999999989 18.214762018199355 14.344823330601708 3.1843740466902976e-15  1.0000000000000058 31.904943295729403 14.237869646355081 -1.2028108957336017e-14  0.99999999999998868 37.172160522651843 17.64988141136174 8.7773709183773399e-15  1.0000000000000071 52.812746249130484 14.81612372870539 -2.3298725788871153e-15  0.99999999999999833 63.447227270624914 15.5 0  1 75 15.5 0  1 
+3.5355339059328195 -3.5355339059328195 0.62831853071801369  1 9.604885542379284 5.6779402750195667 0.73164124169730604  0.99999999999999989 18.214762018200037 14.344823330601164 1.0469888149911395  1.0000000000000058 31.904943295730241 14.237869646359984 0.39948502431303995  0.99999999999998868 37.172160522650039 17.649881411357878 2.4092611365725189  1.0000000000000071 52.812746249132488 14.816123728706323 1.1284938924273324  0.99999999999999833 63.447227270625511 15.499999999999938 1.4137166941154204  1 74.999999999999105 15.49999999999994 1.4137166941154202  1 
+3.1478202812511471 -3.1478202812511471 1.2566370068591419  1 9.2729214810444986 6.0754899681670214 1.463282419842884  0.99999999999999989 17.996467481271083 14.829610120007128 2.0939775390394035  1.0000000000000058 31.697282681850869 14.286806537772526 0.79897001392370559  0.99999999999998868 37.435707603251764 18.516402695092999 4.8185220638754691  1.0000000000000071 52.733554746481623 15.206631940884614 2.2569876868315566  0.99999999999999833 63.447227270622655 15.993478879707236 2.8274332654334846  1 75.000000000003425 15.993478879707238 2.8274332654334842  1 
+2.3723834259365431 -2.3723834259365431 1.7988274783398068  1 8.6089851336806884 6.8705992041127821 2.0946324284719631  0.99999999999999989 17.559872998990649 15.799195709829741 2.9974482015801436  1.0000000000000058 31.28195630911361 14.384681533173158 1.1436948041305759  0.99999999999998868 37.962808294048074 20.249466731308765 6.897528758237212  1.0000000000000071 52.575169779178417 15.987658040456525 3.2307909501209608  0.99999999999999833 63.447227270628531 16.98044886550209 4.0473618262637086  1 74.999999999990621 16.98044886550209 4.0473618262637086  1 
+1.2775986014269276 -1.2775986014269276 2.1687580291315651  1 7.6716200438365361 7.9931580809223801 2.5253955435015549  0.99999999999999989 16.943475918531011 17.168085494405027 3.6138762234641644  1.0000000000000058 30.695586178585053 14.522864363617154 1.3788967086524706  0.99999999999998868 38.706984732566291 22.696258103010518 8.3160119887771682  1.0000000000000071 52.351557169731038 17.090333926265838 3.8952061261517525  0.99999999999999833 63.447227270621916 18.373882457535071 4.8797055655472787  1 75.000000000018389 18.373882457535071 4.8797055655472787  1 
+1.1719514247943195e-12 -1.1719514247943195e-12 2.3005529012372383  1 6.5777280744114703 9.3031686135167266 2.6788631863653043  0.99999999999999989 16.224149133738432 18.76556075628185 3.8334905595379762  1.0000000000000058 30.011300424905656 14.684121797300168 1.462691909845385  0.99999999999998868 39.575428243818408 25.551629463869848 8.8213739156197359  1.0000000000000071 52.09060437734513 18.377141286086164 4.1319168086379028  0.99999999999999833 63.447227270625667 19.999999999996184 5.1762440277824107  1 74.999999999974861 19.999999999996184 5.1762440277824107  1 
+-1.2775986014289811 1.2775986014289811 2.1687580291316819  1 5.4838361049540145 10.613179146115629 2.5253955435017352  0.99999999999999989 15.504822348881138 20.363036018212849 3.613876223464215  1.0000000000000058 29.327014671318086 14.845379230678686 1.3788967086533002  0.99999999999998868 40.443871755058836 28.407000824990529 8.3160119887766726  1.0000000000000071 51.829651584897462 19.663948645853612 3.8952061261520572  0.99999999999999833 63.447227270625788 21.626117542471153 4.879705565547396  1 75.00000000002386 21.626117542471153 4.879705565547396  1 
+-2.3723834259351833 2.3723834259351833 1.7988274783396521  1 4.5464710151344043 11.735738022921637 2.0946324284717539  0.99999999999999989 14.888425268470534 21.73192580274673 2.9974482015801169  1.0000000000000058 28.740644540721632 14.983562061355201 1.1436948041293928  0.99999999999998868 41.188048193587157 30.853792196494638 6.8975287582379137  1.0000000000000071 51.606038975498372 20.766624531703982 3.2307909501205487  0.99999999999999833 63.447227270623706 23.019551134494478 4.047361826263554  1 74.999999999984084 23.019551134494474 4.047361826263554  1 
+-3.1478202812517777 3.1478202812517777 1.256637006859245  1 3.8825346677568429 12.530847258869537 1.4632824198430057  0.99999999999999989 14.451830786163059 22.701511392593083 2.093977539039428  1.0000000000000058 28.32531816801977 15.081437056623322 0.79897001392448364  0.99999999999998868 41.715148884378252 32.586856232821489 4.8185220638750348  1.0000000000000071 51.447654008166793 21.547650631251887 2.2569876868317986  0.99999999999999833 63.447227270625731 24.006521120294064 2.8274332654335819  1 75.000000000007219 24.006521120294067 2.8274332654335823  1 
+-3.5355339059326556 3.5355339059326556 0.62831853071798205  1 3.5505706064273257 12.928396952016087 0.73164124169727363  0.99999999999999989 14.233536249244064 23.186298181990281 1.0469888149911422  1.0000000000000058 28.117657554128364 15.130373948086152 0.39948502431278238  0.99999999999998868 41.978695964980815 33.453377516515026 2.4092611365726784  1.0000000000000071 51.368462505527397 21.938158843439282 1.1284938924272563  0.99999999999999833 63.447227270624651 24.499999999999744 1.4137166941153956  1 74.999999999998124 24.499999999999748 1.4137166941153954  1 
+-3.5355339059327386 3.5355339059327386 -2.2204460492503131e-16  1 3.5505706064268643 12.92839695201633 1.5975347728255742e-15  0.99999999999999989 14.233536249242547 23.186298181990903 5.559004606855246e-15  1.0000000000000058 28.117657554132329 15.130373948082415 -1.4762487599297348e-14  0.99999999999998868 41.978695964977959 33.453377516518131 1.3515968997086305e-14  1.0000000000000071 51.368462505527539 21.938158843438853 -1.6901778625232096e-15  0.99999999999999833 63.447227270624914 24.500000000000004 1.5086264655892687e-15  1 75.000000000000014 24.5 1.5086264655892687e-15  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654746 -0.70710678118654746 0 -0.70710678118654757 0.70710678118654757 0 -0 0 -1 
+1 75 15.5 2.7554552980815448e-16 -1 0 0 0 0 -1 -0 -1 -0 
+1 3.5355339059327378 -3.5355339059327378 0 -0.70710678118654757 -0.70710678118654757 -0 -0.70710678118654757 0.70710678118654757 -0 -0 0 1 
+1 75 15.5 -2.7554552980815448e-16 -1 -0 -0 -0 -0 1 -0 -1 0 
+9 1 0 0 0 10 7 11 8 2 2 2.8284271247461912 -2.8284271247461912 4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 -8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 -3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 4.4408920985006262e-16  1 75 16.399999999999999 4.4408920985006262e-16  1 
+2.8284271247462276 -2.8284271247462276 -0.50265482457439326  1 9.0159805468328216 6.4281751612018621 -0.58553428033384047  1 17.777778499971209 15.165580394865655 -0.83702922341251151  0.99999999999998979 31.571168515297988 14.409868988295917 -0.32030380321158969  1.0000000000000278 37.648394581614838 19.182925960534281 -1.9273256235209786  0.99999999999997424 52.676169344089331 15.539676739546854 -0.90272885493142008  1.0000000000000095 63.449895514330436 16.399999999999601 -1.1309733552923305  1 74.999999999999105 16.399999999999604 -1.1309733552923305  1 
+2.5182562250010312 -2.5182562250010312 -1.0053096054873778  1 8.7505280572964637 6.7462367156950842 -1.1710685098071594  1 17.602833142044837 15.553363260898562 -1.674058374119779  0.99999999999998979 31.405486331285697 14.449023136926375 -0.64060757859783735  1.0000000000000278 37.85906535224138 19.876260232829232 -3.8546510796345723  0.99999999999997424 52.612831948476334 15.852024391121061 -1.8054576314498902  1.0000000000000095 63.449895514327579 16.79478310376723 -2.2619466123468186  1 75.000000000003425 16.79478310376723 -2.2619466123468186  1 
+1.8979067407489889 -1.8979067407489889 -1.4390619826717084  1 8.2196165014000666 7.3823677049416423 -1.676339470317372  1 17.252938091745996 16.328938600612986 -2.3963500893836529  0.99999999999998979 31.074117858447767 14.527332404383019 -0.91700507699040601  1.0000000000000278 38.280412112952412 21.262945955287442 -5.5177845659494009  0.99999999999997424 52.486155588068115 16.476727432979835 -2.5844430656618647  1.0000000000000095 63.449895514333448 17.584359092398095 -3.2378894610108699  1 74.999999999990621 17.584359092398095 -3.2378894610108695  1 
+1.0220788811419279 -1.0220788811419279 -1.7350064233054643  1 7.4700597701643572 8.2804763628600888 -2.021080247871553  1 16.758945849069651 17.423918941557226 -2.8891617231474176  0.99999999999998979 30.606281988837953 14.637891757957481 -1.1055880274247882  1.0000000000000278 38.875282006554237 23.220710117598962 -6.6525221148448219  0.99999999999997424 52.307310133244791 17.358701774719187 -3.1159361956481719  1.0000000000000095 63.44989551432684 18.699105966034271 -3.9037644524379909  1 75.000000000018389 18.699105966034271 -3.9037644524379904  1 
+4.6762593797211755e-13 -4.6762593797211755e-13 -1.8404423209895382  1 6.5953375324381369 9.3285566244738707 -2.1439007788875823  1 16.182463800463946 18.701745707871858 -3.064735343935824  0.99999999999998979 30.060324062636926 14.76691297991343 -1.1727743297930939  1.0000000000000278 39.569486864737151 25.505393554351894 -7.0567941864600172  0.99999999999997424 52.098599985188997 18.387953514714269 -3.3052908432768442  1.0000000000000095 63.449895514330578 19.999999999989107 -4.1409952222257402  1 74.999999999974861 19.999999999989107 -4.1409952222257402  1 
+-1.0220788811427488 1.0220788811427488 -1.73500642330558  1 5.7206152947181215 10.376636886096147 -2.0210802478716676  1 15.605981751912061 19.97957247426147 -2.8891617231474713  0.99999999999998979 29.514366136174079 14.895934201537747 -1.1055880274253354  1.0000000000000278 40.26369172315826 27.790076991440177 -6.6525221148445537  0.99999999999997424 51.889889837005235 19.417205254669291 -3.1159361956483513  1.0000000000000095 63.449895514330713 21.300894033984143 -3.9037644524380779  1 75.00000000002386 21.300894033984143 -3.9037644524380775  1 
+-1.8979067407484411 1.8979067407484411 -1.4390619826715594  1 4.9710585634781923 11.274745544008159 -1.6763394703172221  1 15.111989509197203 21.074552815149307 -2.3963500893835668  0.99999999999998979 29.04653026675712 15.006493555362955 -0.91700507698972389  1.0000000000000278 40.858561616586826 29.747841153500076 -5.5177845659496922  0.99999999999997424 51.711044382278359 20.299179596439458 -2.584443065661632  1.0000000000000095 63.449895514328631 22.415640907590799 -3.2378894610107416  1 74.999999999984084 22.415640907590802 -3.2378894610107412  1 
+-2.5182562250012874 2.5182562250012874 -1.0053096054874726  1 4.4401470075837057 11.910876533258277 -1.1710685098072586  1 14.762094458918183 21.850128154895057 -1.6740583741198436  0.99999999999998979 28.715161793814971 15.084802822679471 -0.6406075785982992  1.0000000000000278 41.279908377390043 31.134526876097311 -3.8546510796343862  0.99999999999997424 51.584368021816545 20.92388263828046 -1.8054576314500514  1.0000000000000095 63.449895514330656 23.205216896237385 -2.261946612346911  1 75.000000000007219 23.205216896237388 -2.261946612346911  1 
+-2.8284271247461601 2.8284271247461601 -0.50265482457436672  1 4.1746945180467883 12.228938087750157 -0.58553428033381372  1 14.587149100984806 22.237911020916648 -0.83702922341252328  0.99999999999998979 28.549479609841558 15.123956971361764 -0.3203038032113672  1.0000000000000278 41.490579147982118 31.82786114834126 -1.9273256235211105  0.99999999999997424 51.521030626224039 21.236230289861044 -0.90272885493134847  1.0000000000000095 63.449895514329569 23.599999999999262 -1.1309733552923047  1 74.999999999998124 23.599999999999262 -1.1309733552923047  1 
+-2.8284271247461903 2.8284271247461903 2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 -4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 -1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 -1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 2.141842990487521e-16  1 75.000000000000014 23.600000000000001 2.1418429904875208e-16  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+9 1 0 0 0 10 7 11 8 2 2 2.8284271247461912 -2.8284271247461912 -4.4408920985006262e-16  1 9.0159805468327825 6.4281751612018496 -2.0133058846416192e-16  1 17.777778499972118 15.165580394866463 8.0236115873956118e-16  0.99999999999998979 31.571168515292573 14.409868988290894 -5.8731757129539919e-15  1.0000000000000278 37.64839458161984 19.182925960538899 3.5800583136374853e-15  0.99999999999997424 52.67616934408646 15.539676739546138 -1.5172914623676952e-15  1.0000000000000095 63.449895514329839 16.399999999999999 -4.4408920985006262e-16  1 75 16.399999999999999 -4.4408920985006262e-16  1 
+2.8284271247462276 -2.8284271247462276 0.50265482457439326  1 9.0159805468328216 6.4281751612018621 0.58553428033384047  1 17.777778499971209 15.165580394865655 0.83702922341251151  0.99999999999998979 31.571168515297988 14.409868988295917 0.32030380321158969  1.0000000000000278 37.648394581614838 19.182925960534281 1.9273256235209786  0.99999999999997424 52.676169344089331 15.539676739546854 0.90272885493142008  1.0000000000000095 63.449895514330436 16.399999999999601 1.1309733552923305  1 74.999999999999105 16.399999999999604 1.1309733552923305  1 
+2.5182562250010312 -2.5182562250010312 1.0053096054873778  1 8.7505280572964637 6.7462367156950842 1.1710685098071594  1 17.602833142044837 15.553363260898562 1.674058374119779  0.99999999999998979 31.405486331285697 14.449023136926375 0.64060757859783735  1.0000000000000278 37.85906535224138 19.876260232829232 3.8546510796345723  0.99999999999997424 52.612831948476334 15.852024391121061 1.8054576314498902  1.0000000000000095 63.449895514327579 16.79478310376723 2.2619466123468186  1 75.000000000003425 16.79478310376723 2.2619466123468186  1 
+1.8979067407489889 -1.8979067407489889 1.4390619826717084  1 8.2196165014000666 7.3823677049416423 1.676339470317372  1 17.252938091745996 16.328938600612986 2.3963500893836529  0.99999999999998979 31.074117858447767 14.527332404383019 0.91700507699040601  1.0000000000000278 38.280412112952412 21.262945955287442 5.5177845659494009  0.99999999999997424 52.486155588068115 16.476727432979835 2.5844430656618647  1.0000000000000095 63.449895514333448 17.584359092398095 3.2378894610108699  1 74.999999999990621 17.584359092398095 3.2378894610108695  1 
+1.0220788811419279 -1.0220788811419279 1.7350064233054643  1 7.4700597701643572 8.2804763628600888 2.021080247871553  1 16.758945849069651 17.423918941557226 2.8891617231474176  0.99999999999998979 30.606281988837953 14.637891757957481 1.1055880274247882  1.0000000000000278 38.875282006554237 23.220710117598962 6.6525221148448219  0.99999999999997424 52.307310133244791 17.358701774719187 3.1159361956481719  1.0000000000000095 63.44989551432684 18.699105966034271 3.9037644524379909  1 75.000000000018389 18.699105966034271 3.9037644524379904  1 
+4.6762593797211755e-13 -4.6762593797211755e-13 1.8404423209895382  1 6.5953375324381369 9.3285566244738707 2.1439007788875823  1 16.182463800463946 18.701745707871858 3.064735343935824  0.99999999999998979 30.060324062636926 14.76691297991343 1.1727743297930939  1.0000000000000278 39.569486864737151 25.505393554351894 7.0567941864600172  0.99999999999997424 52.098599985188997 18.387953514714269 3.3052908432768442  1.0000000000000095 63.449895514330578 19.999999999989107 4.1409952222257402  1 74.999999999974861 19.999999999989107 4.1409952222257402  1 
+-1.0220788811427488 1.0220788811427488 1.73500642330558  1 5.7206152947181215 10.376636886096147 2.0210802478716676  1 15.605981751912061 19.97957247426147 2.8891617231474713  0.99999999999998979 29.514366136174079 14.895934201537747 1.1055880274253354  1.0000000000000278 40.26369172315826 27.790076991440177 6.6525221148445537  0.99999999999997424 51.889889837005235 19.417205254669291 3.1159361956483513  1.0000000000000095 63.449895514330713 21.300894033984143 3.9037644524380779  1 75.00000000002386 21.300894033984143 3.9037644524380775  1 
+-1.8979067407484411 1.8979067407484411 1.4390619826715594  1 4.9710585634781923 11.274745544008159 1.6763394703172221  1 15.111989509197203 21.074552815149307 2.3963500893835668  0.99999999999998979 29.04653026675712 15.006493555362955 0.91700507698972389  1.0000000000000278 40.858561616586826 29.747841153500076 5.5177845659496922  0.99999999999997424 51.711044382278359 20.299179596439458 2.584443065661632  1.0000000000000095 63.449895514328631 22.415640907590799 3.2378894610107416  1 74.999999999984084 22.415640907590802 3.2378894610107412  1 
+-2.5182562250012874 2.5182562250012874 1.0053096054874726  1 4.4401470075837057 11.910876533258277 1.1710685098072586  1 14.762094458918183 21.850128154895057 1.6740583741198436  0.99999999999998979 28.715161793814971 15.084802822679471 0.6406075785982992  1.0000000000000278 41.279908377390043 31.134526876097311 3.8546510796343862  0.99999999999997424 51.584368021816545 20.92388263828046 1.8054576314500514  1.0000000000000095 63.449895514330656 23.205216896237385 2.261946612346911  1 75.000000000007219 23.205216896237388 2.261946612346911  1 
+-2.8284271247461601 2.8284271247461601 0.50265482457436672  1 4.1746945180467883 12.228938087750157 0.58553428033381372  1 14.587149100984806 22.237911020916648 0.83702922341252328  0.99999999999998979 28.549479609841558 15.123956971361764 0.3203038032113672  1.0000000000000278 41.490579147982118 31.82786114834126 1.9273256235211105  0.99999999999997424 51.521030626224039 21.236230289861044 0.90272885493134847  1.0000000000000095 63.449895514329569 23.599999999999262 1.1309733552923047  1 74.999999999998124 23.599999999999262 1.1309733552923047  1 
+-2.8284271247461903 2.8284271247461903 -2.2204460492503131e-16  1 4.1746945180469197 12.228938087750445 4.3498515050138725e-16  1 14.587149100985133 22.237911020917949 1.2111033831702273e-15  0.99999999999998979 28.549479609839526 15.123956971356947 -2.3425383791132212e-15  1.0000000000000278 41.490579147983965 31.827861148346255 1.0269151715707795e-15  0.99999999999997424 51.521030626222753 21.236230289860686 -5.1873396212586411e-16  1.0000000000000095 63.449895514329832 23.600000000000001 -2.141842990487521e-16  1 75.000000000000014 23.600000000000001 -2.1418429904875208e-16  1 
+
+0 11
+3.1415926535897931 11
+
+0 8
+1 8
+
+Triangulations 0
+
+TShapes 42
+Ve
+1.00000011584738e-07
+3.53553390593274 -3.53553390593274 0
+0 0
+
+0101101
+*
+Ve
+2.00001022062862e-07
+75 15.5 -6.88863824520386e-17
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  1 0 0 1
+2  1 1 0 0 1
+2  2 2 0 0 1
+0
+
+0101000
++42 0 -41 0 *
+Ve
+2.00001005003195e-07
+-3.53553390593273 3.53553390593274 -7.40818758532816e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  2 0 0 3.14159265358979
+2  3 1 0 0 3.14159265358979
+2  4 3 0 0 3.14159265358979
+0
+
+0101000
++42 0 -39 0 *
+Ve
+2.00001041588069e-07
+75 24.5 2.06659147356116e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  3 0 0 1
+2  5 1 0 0 1
+2  6 2 0 0 1
+0
+
+0101000
++39 0 -37 0 *
+Ed
+ 1e-07 1 1 0
+1  4 0 0 3.14159265358979
+2  7 1 0 0 3.14159265358979
+2  8 4 0 0 3.14159265358979
+0
+
+0101000
++41 0 -37 0 *
+Wi
+
+0101000
+-40 0 +38 0 +36 0 -35 0 *
+Fa
+1  1e-07 1 0
+
+0111000
++34 0 *
+Ed
+ 1e-07 1 1 0
+1  5 0 0 3.14159265358979
+2  3 2 0 0 3.14159265358979
+2  9 5 0 0 3.14159265358979
+0
+
+0101000
++42 0 -39 0 *
+Ed
+ 1e-07 1 1 0
+1  6 0 0 3.14159265358979
+2  7 2 0 0 3.14159265358979
+2  10 6 0 0 3.14159265358979
+0
+
+0101000
++41 0 -37 0 *
+Wi
+
+0101000
+-40 0 +32 0 +36 0 -31 0 *
+Fa
+1  1e-07 2 0
+
+0111000
++30 0 *
+Ve
+1.00000003092948e-07
+2.82842712474619 -2.82842712474619 0
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  7 0 0 1
+2  11 3 0 0 1
+2  12 5 0 0 1
+0
+
+0101000
++42 0 -28 0 *
+Ve
+2.000010012582e-07
+-2.82842712474619 2.82842712474619 9.68596121552874e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  8 0 0 3.14159265358979
+2  13 7 0 0 3.14159265358979
+2  14 3 0 0 3.14159265358979
+0
+
+0101000
++28 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  9 0 0 1
+2  15 3 0 0 1
+2  16 5 0 0 1
+0
+
+0101000
++39 0 -26 0 *
+Wi
+
+0101000
++38 0 -27 0 -25 0 +24 0 *
+Fa
+0  1e-07 3 0
+
+0111000
+-23 0 *
+Ve
+2.00001030198519e-07
+75 16.4 -5.51091059616309e-17
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  10 0 0 1
+2  17 7 0 0 1
+2  18 8 0 0 1
+0
+
+0101000
++28 0 -21 0 *
+Ve
+2.00001064344293e-07
+75 23.5999999999999 1.65327317884893e-16
+0 0
+
+0101101
+*
+Ed
+ 1e-07 1 1 0
+1  11 0 0 1
+2  19 7 0 0 1
+2  20 8 0 0 1
+0
+
+0101000
++26 0 -19 0 *
+Ed
+ 1e-07 1 1 0
+1  12 0 0 3.14159265358979
+2  21 7 0 0 3.14159265358979
+2  22 4 0 0 3.14159265358979
+0
+
+0101000
++21 0 -19 0 *
+Wi
+
+0101000
+-20 0 +25 0 +18 0 -17 0 *
+Fa
+1  1e-07 7 0
+
+0111000
++16 0 *
+Ed
+ 1e-07 1 1 0
+1  13 0 0 3.14159265358979
+2  13 8 0 0 3.14159265358979
+2  23 5 0 0 3.14159265358979
+0
+
+0101000
++28 0 -26 0 *
+Ed
+ 1e-07 1 1 0
+1  14 0 0 3.14159265358979
+2  21 8 0 0 3.14159265358979
+2  24 6 0 0 3.14159265358979
+0
+
+0101000
++21 0 -19 0 *
+Wi
+
+0101000
+-20 0 +14 0 +18 0 -13 0 *
+Fa
+1  1e-07 8 0
+
+0111000
++12 0 *
+Wi
+
+0101000
++32 0 -27 0 -14 0 +24 0 *
+Fa
+0  1e-07 5 0
+
+0111000
+-10 0 *
+Ed
+ 1e-07 1 1 0
+1  15 0 0 0.899999999999999
+2  25 4 0 0 0.899999999999999
+2  26 6 0 0 0.899999999999999
+0
+
+0101000
++41 0 -21 0 *
+Ed
+ 1e-07 1 1 0
+1  16 0 0 0.899999999999999
+2  27 4 0 0 0.899999999999999
+2  28 6 0 0 0.899999999999999
+0
+
+0101000
++37 0 -19 0 *
+Wi
+
+0101000
++35 0 -8 0 -17 0 +7 0 *
+Fa
+0  1e-07 4 0
+
+0111000
+-6 0 *
+Wi
+
+0101000
++31 0 -8 0 -13 0 +7 0 *
+Fa
+0  1e-07 6 0
+
+0111000
+-4 0 *
+Sh
+
+0101100
++33 0 -29 0 +22 0 -15 0 +11 0 -9 0 -5 0 +3 0 *
+So
+
+1100000
++2 0 *
+
++1 0 
\ No newline at end of file